Compare commits

...
Author SHA1 Message Date
Caleb Connolly 8c8947b099 systemd/abuild: drop
we have abuild in both the systemd and edge repos due to #3452

it seems like just adding an explicit bootstrap step is enough to get
things going properly. That probably isn't even needed since it seems
like the bootstrap failure we saw was specific to that scenario and
probably wouldn't show up again. but better safe than sorry.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
2025-01-13 17:15:13 +01:00
6 changed files with 8 additions and 215 deletions

No files matched your search

@@ -1,66 +0,0 @@
From 0bda547b2d7694ab40e0237ea6ae8a25a237ee50 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pablo=20Correa=20G=C3=B3mez?= <ablocorrea@hotmail.com>
Date: Thu, 11 Apr 2024 13:57:26 +0200
Subject: [PATCH 1/2] abuild: add systemd splitfunc
Co-authored-by: Caleb Connolly <caleb@postmarketos.org>
---
abuild.in | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/abuild.in b/abuild.in
index 36317d6..74e47f1 100644
--- a/abuild.in
+++ b/abuild.in
@@ -815,6 +815,11 @@ postcheck() {
&& ! is_openrc_pkg "$name"; then
warning "Found OpenRC directory (/etc/conf.d or /etc/init.d) but name doesn't end with -openrc"
fi
+ # look for /usr/lib/systemd
+ if [ -e "$dir"/usr/lib/systemd ] \
+ && ! is_systemd_pkg "$name"; then
+ warning "Found systemd directory (/usr/lib/systemd) but it's not in a systemd package"
+ fi
# look for /usr/share/doc
if [ -e "$dir"/usr/share/doc ] \
&& ! is_doc_pkg "$name"; then
@@ -1371,6 +1376,11 @@ is_openrc_pkg() {
test "${1%-openrc}" != "$1"
}
+# returns true if this is the -systemd package
+is_systemd_pkg() {
+ test "${1%-systemd}" != "$1" || test "systemd" == "$1"
+}
+
# returns true if this is the -bash-completion package
is_bashcomp_pkg() {
test "${1%-bash-completion}" != "$1"
@@ -2143,6 +2153,24 @@ openrc() {
default_openrc
}
+# predefined splitfunc systemd
+default_systemd() {
+ depends="$depends_systemd"
+ pkgdesc="$pkgdesc (systemd files)"
+ install_if="systemd ${subpkgname%-systemd}=$pkgver-r$pkgrel"
+
+ if [ -d lib/systemd ]; then
+ error "Detected /lib/systemd dir, should be installed to /usr/lib/systemd"
+ return 1
+ fi
+
+ amove usr/lib/systemd
+}
+
+systemd() {
+ default_systemd
+}
+
default_devhelp() {
depends=""
pkgdesc="$pkgname - devhelp files"
--
2.45.2
@@ -1,28 +0,0 @@
From d27596cd67928e4795dc99dbc139b231354c3381 Mon Sep 17 00:00:00 2001
From: Clayton Craft <clayton@craftyguy.net>
Date: Fri, 5 Jul 2024 10:38:50 -0700
Subject: [PATCH 2/2] abuild: add warning in -systemd split func about
non-usr-merged birs
---
abuild.in | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/abuild.in b/abuild.in
index 74e47f1..e5f9be0 100644
--- a/abuild.in
+++ b/abuild.in
@@ -2165,6 +2165,10 @@ default_systemd() {
fi
amove usr/lib/systemd
+
+ if [ -d bin ] || [ -d lib ] || [ -d usr/sbin ]; then
+ warning "Files should be installed to /usr/bin or /usr/lib, not /bin, /lib, or /usr/sbin"
+ fi
}
systemd() {
--
2.45.2
-110
View File
@@ -1,110 +0,0 @@
# Forked from Alpine to add systemd-service support
# HACK: pma#3452: this is now in temp/abuild AND extra-repos/systemd/abuild for
# initial systemd bringup. Until this is resolved, make changes to both
# APKBUILDs at once.
pkgname=abuild
pkgver=99993.12.0
_pkgver=3.12.0
pkgrel=4
pkgdesc="Script to build Alpine Packages"
url="https://git.alpinelinux.org/cgit/abuild/"
arch="all"
license="GPL-2.0-only"
depends="fakeroot scanelf openssl>3 apk-tools>=2.0.7-r1 libc-utils
attr tar pkgconf patch lzip curl libcap-getcap"
makedepends="openssl-dev>3 zlib-dev pkgconfig scdoc"
checkdepends="kyua git"
install="$pkgname.pre-install $pkgname.pre-upgrade"
subpackages="
apkbuild-cpan:cpan:noarch
apkbuild-gem-resolver:gems:noarch
apkbuild-pypi:pypi:noarch
abuild-rootbld:_rootbld:noarch
$pkgname-doc
"
options="suid !check" # tests are SLOW in qemu
pkggroups="abuild"
source="
https://gitlab.alpinelinux.org/alpine/abuild/-/archive/$_pkgver/abuild-$_pkgver.tar.gz
0001-abuild-add-systemd-splitfunc.patch
0002-abuild-add-warning-in-systemd-split-func-about-non-u.patch
"
builddir="$srcdir/$pkgname-$_pkgver"
build() {
make VERSION="$_pkgver-r$pkgrel"
}
check() {
make check
}
package() {
make install VERSION="$_pkgver-r$pkgrel" DESTDIR="$pkgdir"
install -m 644 abuild.conf "$pkgdir"/etc/abuild.conf
case "$CARCH" in
x86*|ppc64le)
# binutils only supports it here
cat >>"$pkgdir"/usr/share/abuild/default.conf <<-EOF
# binutils ld.bfd supports this on this architecture; default to it
export RUSTFLAGS="\$RUSTFLAGS -Clink-arg=-Wl,-z,pack-relative-relocs"
export LDFLAGS="\$LDFLAGS -Wl,-z,pack-relative-relocs"
EOF
esac
case "$CARCH" in
x86_64)
# https://lists.alpinelinux.org/~alpine/devel/%3C1628515011.zujvcn248v.none%40localhost%3E
# note that this is x86-exclusive. on other architectures, this is pretty much always bad
# https://github.com/rust-lang/rust/pull/106380
cat >>"$pkgdir"/usr/share/abuild/default.conf <<-EOF
# -fno-plt has very slight improvements to general code size and speed on x86-only,
# for the common system dynamic linking case
export CFLAGS="\$CFLAGS -fno-plt"
export CXXFLAGS="\$CXXFLAGS -fno-plt"
EOF
;;
esac
install -d -m 775 -g abuild "$pkgdir"/var/cache/distfiles
}
cpan() {
pkgdesc="Script to generate perl APKBUILD from CPAN"
depends="perl perl-libwww perl-json perl-module-build perl-module-build-tiny
perl-lwp-protocol-https"
amove usr/bin/apkbuild-cpan
}
gems() {
pkgdesc="APKBUILD dependency resolver for RubyGems"
depends="ruby ruby-augeas"
amove usr/bin/apkbuild-gem-resolver
}
pypi() {
pkgdesc="Script to generate python3 APKBUILD from PYPI"
depends="perl perl-libwww perl-json perl-module-build-tiny perl-lwp-protocol-https
perl-ipc-system-simple"
amove usr/bin/apkbuild-pypi
}
_rootbld() {
pkgdesc="Build packages in chroot"
depends="abuild bubblewrap cmd:envsubst git"
mkdir -p "$subpkgdir"
}
sha512sums="
00fac67aa96a83f33406dde60bd9526bfa5fdff690b84dbe867b6ed197f147b2afafcdfbda900c005e00a64a42bcb98ca425ffc8bf2158b9540cbb67d935577d abuild-3.12.0.tar.gz
52cc5857b3c93bd4595de1d06c3c600b88871c68f7a1ea51e10d720ddd9c8fb7f0f63cd2f4fe280c0d9adaf607de8b858f4add3e46b1a5a28cc6c711359f6c60 0001-abuild-add-systemd-splitfunc.patch
3782341dac814ecbcb7d2b4242d85f03ca2e4bf9eeb3b1e9524b2c434b05c864f5a4b5b8abc4031085e7e943e90780fe07b1e99d4cfadf0695340ad321647cac 0002-abuild-add-warning-in-systemd-split-func-about-non-u.patch
"
@@ -1,5 +0,0 @@
#!/bin/sh
addgroup -S abuild 2>/dev/null
exit 0
@@ -1 +0,0 @@
abuild.pre-install
+8 -5
View File
@@ -14,12 +14,15 @@ supported_heimdall_depends=heimdall,android-tools
[repo:systemd]
pmaports_dir=systemd
# In some cases abuild might need building so we put it here
# to ensure bootstrapping succeeds. #3452
bootstrap_1=abuild
# Build forks of Alpine packages that support usr_merge
bootstrap_1=abuild alpine-base
bootstrap_2=systemd
bootstrap_2=alpine-base
bootstrap_3=systemd
# Build systemd related pkgs without deps on each other
bootstrap_3=dbus linux-pam-pmos
bootstrap_4=dbus linux-pam-pmos
# Build systemd related pkgs *with* deps on each other
bootstrap_4=systemd dbus linux-pam-pmos
bootstrap_5=systemd dbus linux-pam-pmos
# Marker that bootstrap is done, only needs to be built once
bootstrap_5=postmarketos-base-systemd
bootstrap_6=postmarketos-base-systemd