diff --git a/extra-repos/systemd/systemd/APKBUILD b/extra-repos/systemd/systemd/APKBUILD index 859c4b12c..5ec8fcc57 100644 --- a/extra-repos/systemd/systemd/APKBUILD +++ b/extra-repos/systemd/systemd/APKBUILD @@ -156,6 +156,7 @@ subpackages=" source="$pkgname-$pkgver.tar.gz::https://github.com/systemd/systemd/archive/refs/tags/v$_pkgver.tar.gz wired.network + bless-boot.patch " builddir="$srcdir/systemd-$_pkgver" @@ -181,15 +182,6 @@ _default_zshcomp() { } build() { - # The "bless boot" is built conditionally on -Dbootloader=enabled, but it - # doesn't seem to actually depend on anything in src/systemd/boot. There's a lot - # of stuff that gets enabled with that flag, and we don't actually want any of - # it (it's packaged separately as 'systemd-boot' in Alpine aports). By removing - # the condition, we can build/package the bless boot stuff without having to - # unnecessarily build the bootloader. - sed -i "/'ENABLE_BOOTLOADER',/d" src/bless-boot/meson.build - sed -i "/systemd-bless-boot.service.in/,/},/ s/'ENABLE_BOOTLOADER', //" units/meson.build - # TODO: after usr-merge completion: remove hardcoded "-D*-path" options abuild-meson \ -Dlibc=musl \ @@ -479,4 +471,5 @@ libs() { sha512sums=" 7cbeca5dad6413a876809200583854ddc706b7a69deff958eb1ca1afb726cf4dec014006c10d1945c450b754811d4b95a80fe1778cb3136997f6d11b11c0560e systemd-259.1.tar.gz 81c897fed8a3fbfb67ec591b2398a5d65e4af1b3ef379376c157c98d71f085b707f8ebc896d5571a94f99f8fc84fd6b43e3b879ca9b0d57fc6c4596034c7a777 wired.network +8b0360acd46f8918ccaf4bcfbf8b2e60ba0d1d6ea6c575fa51668e129b421edc3e7503db7790b6abce8d926b6c8493c02893f70eb481e3fdd935c7b90f442474 bless-boot.patch " diff --git a/extra-repos/systemd/systemd/bless-boot.patch b/extra-repos/systemd/systemd/bless-boot.patch new file mode 100644 index 000000000..c1b2c9e0b --- /dev/null +++ b/extra-repos/systemd/systemd/bless-boot.patch @@ -0,0 +1,78 @@ +From 92d7efca25415462fae8c20eafde1f826c017bb5 Mon Sep 17 00:00:00 2001 +From: Clayton Craft +Date: Thu, 24 Jul 2025 18:26:37 -0700 +Subject: [PATCH] Enable bless-boot generator + +This does a hack to removing the need to build the stuff in src/boot for +enabling bless-boot. Previously I tried to enable bless-boot by adding +-Dbootloader=enable, which would be required without this hack, but +cross-compiling systemd/src/boot failed on 32-bit archs and it seemed +unnecessary to go down that rabbit hole to debug/fix. + +Why? Because: + +1) It's not actually needed for building the stuff I care about enabling +in this MR (systemd-bless-boot and its generator). These things build +and work just fine without building stuff in src/boot. + +2) Even if it worked, we would have to remove the artifacts made +from src/boot and not package them here. They would conflict with the +systemd-boot package in Alpine. + +So it seems pointless to waste time fixing some weird cross-compiling +issue for some components that don't actually need to be built to enable +the extra features I want and would be discarded anyways in package() + +Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6840 + +--- + +The "bless boot" is built conditionally on -Dbootloader=enabled, but it +doesn't seem to actually depend on anything in src/systemd/boot. There's a lot +of stuff that gets enabled with that flag, and we don't actually want any of +it (it's packaged separately as 'systemd-boot' in Alpine aports). By removing +the condition, we can build/package the bless boot stuff without having to +unnecessarily build the bootloader. + +Signed-off-by: Achill Gilgenast +--- + src/bless-boot/meson.build | 2 -- + units/meson.build | 2 +- + 2 files changed, 1 insertion(+), 3 deletions(-) + +diff --git a/src/bless-boot/meson.build b/src/bless-boot/meson.build +index ae814f1b29d1..a8815f288712 100644 +--- a/src/bless-boot/meson.build ++++ b/src/bless-boot/meson.build +@@ -15,7 +15,6 @@ executables += [ + 'public' : true, + 'conditions' : [ + 'HAVE_BLKID', +- 'ENABLE_BOOTLOADER', + ], + 'sources' : files('bless-boot.c'), + 'link_with' : boot_link_with, +@@ -24,7 +23,6 @@ executables += [ + 'name' : 'systemd-bless-boot-generator', + 'conditions' : [ + 'HAVE_BLKID', +- 'ENABLE_BOOTLOADER', + ], + 'sources' : files('bless-boot-generator.c'), + 'link_with' : boot_link_with, +diff --git a/units/meson.build b/units/meson.build +index 113a935c90b0..2d0444c0b10a 100644 +--- a/units/meson.build ++++ b/units/meson.build +@@ -277,7 +277,7 @@ units = [ + }, + { + 'file' : 'systemd-bless-boot.service.in', +- 'conditions' : ['ENABLE_BOOTLOADER', 'HAVE_BLKID'], ++ 'conditions' : ['HAVE_BLKID'], + }, + { 'file' : 'systemd-boot-check-no-failures.service.in' }, + { +-- +2.53.0 +