This fixes two issues:
1. I was investigating why currently, pmbootstrap build --force
libcamera would fail. It turns out that the problem was possible to
reduce down to apk add eudev-dev resulting in installing eudev-dev
instead of systemd-dev, even with the systemd repository enabled.
This is because apk actually thinks it has a higher version:
name <eudev-dev> selected from selectable list
select_package: eudev-dev (requirers=1, autosel=1, iif=0, order_id=0x40005807)
consider systemd-dev-261_rc4-r0 iif_triggered=0, tag_ok=1, selectable=1, available=1, flags=0x0, provider_priority=100, installed=0
prefer existing package
choose as new provider
consider eudev-dev-3.2.14-r6 iif_triggered=0, tag_ok=1, selectable=1, available=1, flags=0x0, provider_priority=100, installed=0
select latest by requested name (greater)
choose as new provider
consider libudev-zero-dev-1.0.4-r0 iif_triggered=0, tag_ok=1, selectable=1, available=1, flags=0x0, provider_priority=20, installed=0
select latest by requested name (less)
selecting: eudev-dev-3.2.14-r6, available: 1
assign eudev-dev to eudev-dev-3.2.14-r6
disqualify_package: systemd-dev-261_rc4-r0 (conflicting provides)
disqualify_package: libudev-zero-dev-1.0.4-r0 (conflicting provides)
And why is that? It's because we have two providers here: One is
eudev-dev with a provider version of 3.2.14-r6, and the other is
systemd-dev with a provider version that is empty. This then results
in apk thinking the version number is greater, as seen above in the
verbose output. An unversioned provides= for an exact package name
match will never, ever, ever have any effect, even if the priority is
set super high, because the version number comparison is before apk
even starts looking at provider priorities.
Therefore, we should not have unversioned provides for eudev,
eudev-dev, eudev-libs and udev. Since those have fairly low version
numbers, we can just provide them with systemd's version number and
we'll be fine. This will now result in apk actually installing
systemd-dev when eudev-dev is prompted for installation.
2. After fixing the aforementioned issue, I noticed that I couldn't
build anything anymore. This is because my dependency tree would pull
in systemd and systemd-udev - completely normal. However, both
systemd and systemd-udev were providing eudev, and apk will refuse to
install two packages that provide the same thing at the same time.
The fix for this is to just not provide eudev in the top-level
systemd package and rather let systemd-udev do that.
With this, I can now finally build libcamera again!
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8857>
initramfs starts USB NCM gadget and unudhcpd for SSH login.
This requires special handling since unudhpcd is unmanaged by the
service manager until the userspace is started. Once entered in userspace,
the usb-moded-developer-mode needs to be activated which configures
NetworkManager and starts unudhcpd under the service manager.
This way, a full handover is possible and the gadgets can be properly
switched without any leftovers from the initramfs due to the unmanaged
situation.
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8553>
In the previous commits,
- enabled bootloader support on 32-bit architectures,
- fixed libpwquality dependency,
- enabled libarchive and zlib supports,
- enabled xen kexec support,
- enabled valgrind support,
- added systemd-tests subpackage,
- added upstream build support.
So, let's bump the pkgrel to make them take effects.
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8718>
For https://github.com/systemd/systemd/pull/39823
The upstream systemd's mkosi build requires that systemd-boot and ukify
are also built from the upstream source files.
Also, mkosi needs to pass specific source and build directories,
override default meson options, and so on. To support them, this adds
several extra environment variables support:
- $_systemd_upstream,
- $_meson_extra_configure_options,
- $_meson_builddir,
- $_upstream_srcdir.
Note, postmarketOS image built with mkosi already enables usr-merge. Hence
several symlink paths are changed when $_systemd_upstream is set.
This should not change any behavior when the above environment variables
are _not_ set.
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8718>
systemd supports using gcc or clang for bpf compilation, using clang
seems easier since the gcc option requires bpf-gcc and a few other tools
that don't seem to be packaged in Alpine.
This isn't working on ARM (see #4411 ), but we can enable it now for x86
and in preparation for a kernel fix on ARM later.
Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8779>
systemd-stage0 is currently at pkgrel=1, while systemd is still at
pkgrel=0. However, systemd provides systemd-stage0=$pkgver-r$pkgrel, so
currently, installing systemd-stage0 will always install systemd-stage0
instead of systemd. Their pkgrels MUST be kept in sync.
[ci:skip-vercheck]: the stage0 package change is only a new comment
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8709>
When building dbus against systemd-stage0, we need to have libucontext
installed. Since systemd-stage0 uses !tracedeps, it needs to be
specified manually in depends. I've reproduced the build error locally
and verified that this fixes it.
Fix for:
[195/243] Linking target test/manual-test-thread-blocking
ninja: job failed: cc -o test/test-sd-activation test/test-sd-activation.p/sd-activation.c.o -Wl,--as-needed -Wl,--no-undefined -pie -Wl,--as-needed,-O1,--sort-common -Wl,-z,pack-relative-relocs -Os -fstack-clash-protection -Wformat -Werror=format-security '-Wl,-rpath,$ORIGIN/../dbus' -Wl,--start-group test/libdbus-testutils.a dbus/libdbus-1.so.3.38.3 dbus/libdbus-internal.a /usr/lib/libglib-2.0.so /usr/lib/libintl.so /usr/lib/libgio-2.0.so /usr/lib/libgobject-2.0.so -pthread /usr/lib/libsystemd.so -Wl,--end-group
/usr/lib/gcc/aarch64-alpine-linux-musl/15.2.0/../../../../aarch64-alpine-linux-musl/bin/ld: warning: libucontext.so.1, needed by /usr/lib/libsystemd.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc/aarch64-alpine-linux-musl/15.2.0/../../../../aarch64-alpine-linux-musl/bin/ld: /usr/lib/libsystemd.so: undefined reference to `swapcontext'
/usr/lib/gcc/aarch64-alpine-linux-musl/15.2.0/../../../../aarch64-alpine-linux-musl/bin/ld: /usr/lib/libsystemd.so: undefined reference to `getcontext'
/usr/lib/gcc/aarch64-alpine-linux-musl/15.2.0/../../../../aarch64-alpine-linux-musl/bin/ld: /usr/lib/libsystemd.so: undefined reference to `makecontext'
collect2: error: ld returned 1 exit status
Related: https://builds.sr.ht/~postmarketos/job/1776990
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8704>
If the user installed bazaar, the service makes sure to e.g. continue
downloading apps and refresh flatpak metadata (which should make startup
faster) while being closed.
Note that we currently don't pre-install bazaar on any UI, but will
bring a benefit to those who choose to manually install it.
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8583>