The recent optimization of not running "mkinitfs" during the trigger
script when running in pmbootstrap lead to unexpected behavior for some
use cases: testing initramfs changes and upgrading the initramfs in the
chroot (e.g. with pmbootstrap chroot --image). Let the user know that it
gets skipped and tell them how they can force building a new initramfs,
as discussed with Caleb.
[ci:skip-build]: already built successfully in CI
Set CGO_ENABLED=1 to fix the following when cross compiling with
cross-native2 from x86_64 to (armv7,riscv64,armhf):
-buildmode=pie requires external (cgo) linking, but cgo is not enabled
Depends: pmbootstrap MR 2565
Related: https://gitlab.alpinelinux.org/alpine/aports/-/issues/15809
Don't run mkinitfs inside "pmbootstrap install" with the trigger
script, as it triggers multiple times as the rootfs gets constructed,
slowing down the process. Instead, pmbootstrap runs "mkinitfs"
explicitly once at the end of "pmbootstrap install".
pmaports master has pmbootstrap_min_version=2.3.2 in pmaports.cfg, which
already runs "mkinitfs" at the end of "pmbootstrap install", see
pmb/install/_install.py, install_system_image().
pmbootstrap > 3.3.1 is stricter with the dependencies, it will only
install packages that are in makedepends during builds. Before it also
installed packages from depends.
Add postmarketos-mvcfg to makedepends, as it gets used in build().
postmarketos-mvcfg will be removed in the future (see issue 3580), but
let's unbreak the build first.
Related: pmbootstrap issue 2574
[ci:skip-build]: already built successfully in CI
Fix that building phosh, gnome, plasma-mobile images fails with:
==> Generating vmlinuz.kpart
Building depthcharge image for board 'Unnamed veyron board' ('veyron').
Couldn't build a small enough image for this board.
Related: https://builds.sr.ht/~postmarketos/job/1422513#task-img-1544
Related: bpo issue 153
[ci:skip-build]: already built successfully in CI
Our libcamera fork needs a rebuild, as pointed out by the
upstream-compat monitoring job:
Increase 'libcamera' pkgrel (9 -> 10), missing depend(s): so:libgtest.so.1.15.2
[ci:skip-build]: already built successfully in CI
Add a funding-manifest-urls file, as required by the floss.fund funding
manifest:
> If the manifest references URLs, such as a project's webpage, that are not
> on the same domain as the funding.json manifest itself, then the wellKnown
> URL must point to a /.well-known/funding-manifest-urls file. This file should
> contain URL (one or more) of the funding.json manifest URLs that reference
> it. This establishes provenance and verifies that that the publisher of the
> manifest is authorised to solicit funding on behalf of the URLs (entity,
> projects) described in the manifest. This follows the .well-known convention.
Related: https://floss.fund/funding-manifest/
Related: postmarketos.org MR 345
CONFIG_LEDS_GROUP_MULTICOLOR just had to be re-enabled to fix a
regression. Add this to kconfigcheck to prevent disabling it by
accident in the future. Adjust the description of the Librem 5
specific section while at it.
[ci:skip-build] [ci:skip-vercheck]: no need to rebuild
Explicitly generate qwayland-plasma-shell.h first, in order to fix:
In file included from /usr/include/PlasmaQuick/PlasmaQuick/PlasmaShellWaylandIntegration:1,
from /home/pmos/build/src/plasma-workspace-6.1.2/shell/panelconfigview.cpp:35:
/usr/include/PlasmaQuick/plasmaquick/plasmashellwaylandintegration.h:14:10: fatal error: qwayland-plasma-shell.h: No such file or directory
14 | #include "qwayland-plasma-shell.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Related: https://invent.kde.org/plasma/plasma-workspace/-/issues/132
[ci:skip-vercheck]
[ci:skip-build] times out after >3hr in gitlab CI
Fix for:
In systemd-services.trigger line 14:
systemctl $cmd $service
^--^ SC2086 (info): Double quote to prevent globbing and word splitting.
^------^ SC2086 (info): Double quote to prevent globbing and word splitting.
Should be =$pkgver-r$pkgrel instead of =$_pkgver-r$pkgrel. Otherwise CI
fails, and it is right, we do want to provide the very high version so
we don't install the regular package by accident if the regular package
gets upgraded before this forked version.
Let's put everything systemd related in an extra-repos directory, so it
is clear that the packages from here will end up in a separate, optional
binary package repository.
Add the dependency, so the systemd-services package gets built as part
of the bootstrap. Otherwise no service files will be installed, as the
individual service files get pulled in via install_if, and that only
works if a binary package is available.
Current pinephone images built pmbootstrap >= 3.0.0 don't boot on the
pinephone anymore. At least part of this must be the switch from GPT to
MBR that has been done by default in pmbootstrap. Set msdos explicitly
to revert this for the pinephone.
With Tow-Boot we could probably use GPT instead, but this should be a
well-tested, concious decision. Let's fix this regression first.
[ci:skip-build]: already built successfully in CI
Fix the bug that prevented "pmbootstrap install" from working with
postmarketos-ui-gnome (not -mobile).
This bug has been here in pmaports for a long time, but until recent
changes in apk's resolver code, this did not fail (apk installed
gnome-extensions-app instead of gnome-mobile-extensions-app in that
scenario).
How it happened:
* postmarketos-ui-gnome has _pmb_recommends="gnome-extensions-app".
* pmbootstrap: pmb.install._install.get_recommends() works like this:
1. Look at the packages i in _pmb_recommends of the packages that
will be installed in "pmbootstrap install".
2. For each package j in _pmb_recommends of i:
2.1 Add all packages in j's _pmb_recommends to the list of
packages to be installed.
(2.2 Recurse by doing 1. with each package in j's _pmb_recommends.)
* In step 2:
* pmaports doesn't have a gnome-extensions-app (it's in Alpine, a
subpackage of gnome-shell).
* Therefore our gnome-shell-mobile fork gets looked at, which has a
gnome-mobile-extensions-app subpackage that provides
gnome-extensions-app.
* pmbootstrap looks at the _pmb_recommends of the gnome-shell-mobile
package, which has "gnome-mobile-extensions-app" (this is wrong,
it should be in postmarektos-ui-gnome-mobile instead and this patch
fixes this!).
* pmbootstrap adds the "gnome-mobile-extensions-app" to the list of
packages to be installed.
* The result is an "apk add" line that has "postmarketos-ui-gnome" and
"gnome-mobile-extensions-app" (and more packages), which results in a
conflict betwen gnome and gnome-mobile packages.
Fixes: issue 3360
[ci:skip-vercheck]: _pmb_recommends changes don't need package rebuilds
[ci:skip-build]: already built successfully in CI
Ensure postmarketos-base-nofde is built before this package, otherwise
bootstrapping this on a new stable branch fails. This does not need to
be backported, as postmarketos-base-nofde has already been built for
v24.12.
Related: https://builds.sr.ht/~postmarketos/job/1384748
Move the polkit-elogind into depends= instead of pmb_recommends=, so
packages depending on postmarketos-base-ui-gnome can build successfully
again. The previous fix only helped for "pmbootstrap install", this fix
will help for both cases.
Without this, e.g. postmarketos-base-ui-gnome-mobile fails to build:
https://builds.sr.ht/~postmarketos/job/1384469
[ci:skip-build]: already built successfully in CI
Add polkit-elogind to _pmb_recommends, to help apk resolve the polkit
depends again. Otherwise it fails with a conflict since recent changes
in apk's dependency resolving code.
Fixes: issue 3349
[ci:skip-vercheck]: pmb_recommends change doesn't need rebuild
[ci:skip-build]: already built successfully in CI
Change <=…-r0 to <=…-r999 as it was just bumped to fix a build error and
might be bumped again in the future. I've also tried just removing -r0,
but that results in a conflict.
Split -nofde into a separate package to resolve the cyclic depenency:
postmarketos-base -> postmarketos-initramfs -> postmarketos-base-nofde
Fixes: issue 3236
[ci:skip-build]: already built successfully in CI
Fill out makedepends, so pmbootstrap and bpo know that these packages
need to be built before building postmarketos-cros-common, because it
has subpackages depending on these packages. Without this,
bootstrapping v24.12 currently fails:
https://builds.sr.ht/~postmarketos/job/1381582
This is intended behavior, abuild works the same way:
https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10138
[ci:skip-build]: already built successfully in CI
Fix the following error during "pmbootstrap install":
ERROR: unable to select packages:
sudo-1.9.16_p1-r1:
conflicts: doas-sudo-shim-0.1.1-r1[cmd:sudo=1.9.16_p1-r1]
breaks: doas-sudo-shim-0.1.1-r1[!sudo]
satisfies: postmarketos-base-38-r0[sudo-virt]
postmarketos-base-nofde-38-r0[sudo-virt]
doas-sudo-shim-0.1.1-r1:
conflicts: sudo-1.9.16_p1-r1[cmd:sudo=0.1.1-r1]
satisfies: postmarketos-base-doas-38-r0[doas-sudo-shim]
postmarketos-base-38-r0[sudo-virt]
postmarketos-base-nofde-38-r0[sudo-virt]
How the error gets triggered:
* postmarketos-base depends on sudo-virt. During "pmbootstrap install",
pmbootstrap has to resolve this to a sudo implementation (sudo, doas,
...).
* pmbootstrap does this by looking at the packages that get installed
at the same time. Before this patch we did not install doas-sudo-shim
directly through _pmb_recommends, only indirectly through a
postmarketos-base-doas subpackage that pulls doas-sudo-shim in via
install_if.
* pmbootstrap cannot look at install_if as it resolves dependencies,
so it has to pick one and goes for "sudo".
* pmbootstrap tells apk to install a list of packages including "sudo",
and because apk also resolves install_if correctly, the solver fails
at the conflict between "doas-sudo-shim" and "sudo". (This only fails
since apk-tools-static 2.14.6-r0, apparently beforehand apk just
installed "doas-sudo-shim" in this scenario.)
Teaching pmbootstrap to look at install_if while resolving packages
would be one way to fix this. But it would be a lot of effort, not
feasible to quickly stop the problem at hand that breaks "pmbootstrap
install" for all edge installs. IMHO it is not worth implementing this
at all in pmbootstrap, as it is just supposed to do some more or less
basic package resolving until apk takes over and does it properly.
Put doas-sudo-shim in _pmb_recommends so pmbootstrap knows that this is
the sudo implementation we want without looking at install_if.
Remove the now obsolete postmarketos-base-doas subpackage. This will
lead to doas-sudo-shim getting removed for old installations on upgrade,
but it can easily be installed back (doas add doas-sudo-shim). I'll make
an edge post about it and put it in the v24.12 release notes. If we
don't remove it here, we would need to keep this legacy subpackage
around forever and I'd rather avoid that to reduce maintenance effort.
Another alternative to this was removing sudo-virt from depends="". But
that would lead to sudo getting uninstalled for users upgrading from
old releases from before we had doas in pmb_recommends, so I've decided
against it.
Fixes: pmaports issue 3340
Add a workaround so the kernel compile output is not silent (which leads
to pmbootstrap aborting the build). This will be fixed once upgrading to
linux >= 6.2.
Related: pmaports issue 1990
[ci:skip-build]: already built successfully in CI
The package was renamed from postmarketos-cros-keymap to
postmarketos-cros-keymap-openrc, adjust _pmb_recommends.
[ci:skip-build]: already built successfully in CI
Require the pmbootstrap version where we added a workdir migration to
change pmaports git URLs from gitlab.com to gitlab.postmarketos.org.
pmaports at gitlab.com will be fast-forwarded to this commit once, so
users who still have this archived repository configured as upstream
will be notified of this change after next git pull and trying to use
pmbootstrap <2.3.2 with it.
Related: https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/tags/2.3.2
Related: pmbootstrap issue 2471
Alpine's abuild runs build() without fakeroot, and package() with
fakeroot. From the APKBUILD reference page in the Alpine wiki:
> Note: Building in fakeroot will reduce performance for parallel
> builds dramatically. It is for this reason that we split the build
> and package process into two separate functions.
Every now and then we see a package that tries to run a compiler (gcc,
g++, clang, ...) during package() in the APKBUILD. This is a bug in the
APKBUILD / build system of the program we are packaging. All compiling
should be done during build().
Let crossdirect print the following when this happens:
============================================================================================
ERROR: crossdirect was called with: LD_PRELOAD=libfakeroot.so
This means your package tried to run a compiler during package().
This is not supported by crossdirect, and usually not a good idea.
* Try to fix your APKBUILD so it does not run the compiler during package(), only in build()
* If you're using meson install, try to add '--no-rebuild'
* If this is not possible, you can work around it by setting options="!pmb:crossdirect"
(compilation will be slower!)
============================================================================================
Instead of:
ERROR: crossdirect: can't handle LD_PRELOAD: libfakeroot.so
Please report this at: https://gitlab.com/postmarketOS/pmaports/issues
As a workaround, you can compile without crossdirect.
In the past I've also tried to add 'strcmp(ldPreload, "libfakeroot.so") == 0'
(pmaports MR 2231), and today I made the same patch. The current code
looks like it would then work by just using libfakeroot.so from the
native chroot, but it does not work. And as mentioned, if we hit this
then we are compiling in package() which is something we should not do
anyway!
Fixes: pmb issue 2039
Related: pma issue 2351, pma MR 5738
Follow up to MR 5562, which introduced category:librem5. Add the related
option, so CI actually enforces this category for the Librem 5.
[ci:skip-vercheck]: no need to rebuild for this
pmbootstrap used to exit with 0 if "pmbootstrap lint" failed. This was
the case in 2.3.x too, but I assumed this was a regression and fixed it
recently in pmbootstrap MR 2398.
It turns out that the CI code relied on this assumption, it captured the
output of "pmbootstrap lint", and only after it is done it checks if the
output wasn't empty and prints it in that case followed by exit 1.
Now that pmbootstrap actually exits with 1, CI already fails at
"common.run_pmbootstrap" and doesn't get to the part where it would be
printed.
I think "exit 1" on error is actually the right thing to do in
pmbootstrap, so I'll leave that in. Adjust CI to just run "pmbootstrap
lint", removing the additional output capture logic that isn't used
anywhere besides here. This also has the advantage that we get the
output "live", without buffering it completely first.
Without this patch, the GNOME Shell on Mobile specific fork of
gnome-settings-daemon gets installed with Phosh, which leads to the bug
that the screen does not turn on when resuming from suspend in Phosh.
Looks like this was figured out today at FrOSCon in the bring your
problems session, thanks to all involved!
Fix: issue 3062
[ci:skip-build]: already built successfully in CI
Use the new --keep-going parameter so the check doesn't stop on first
error. This was recently added in pmbootstrap MR 2384 to make the
default behavior more userfriendly.
[ci:skip-build]: already built successfully in CI
Make sure that linux-next actually builds, before pushing the change to
pmaports master. Otherwise it may block publishing other aarch64
packages in bpo.