Compare commits

...

4 Commits

Author SHA1 Message Date
Pablo Correa Gomez ede5a131fb Merge branch 'add-systemd-subpackage' into 'master'
abuild: add systemd splitfunc

See merge request alpine/abuild!272
2024-04-26 08:28:56 +00:00
Piraty a45d12d4c3
abuild-rootbld: copy SRCDEST value from host to chroot
Otherwise the default hardcoded in abuild-fetch (var/cache/distfiles) is
used.

(in the same vein as 6864df03aa)

Fixes: 1582617 ("abuild-rootbld: clear environment for bwrap container")
2024-04-26 00:24:09 +02:00
Natanael Copa 68d6aa65f4 abuild: skip /var/run in fhs check
We have many package containing directories under /var/run. Allow those
for now.

Partially reverts commit 08d2d81587 (abuild: extend fhs check)
2024-04-21 10:37:44 +02:00
Pablo Correa Gómez 7b6a0a8526 abuild: add systemd splitfunc
Co-authored-by: Caleb Connolly <caleb@postmarketos.org>
2024-04-11 14:01:53 +02:00
1 changed files with 25 additions and 1 deletions

View File

@ -782,7 +782,7 @@ postcheck() {
msg "Running postcheck for $name"
# checking for FHS compat
if ! options_has "!fhs"; then
for i in srv usr/local opt var/run tmp var/tmp var/lock var/empty home sys proc mnt dev; do
for i in srv usr/local opt tmp var/tmp var/lock var/empty home sys proc mnt dev; do
for j in "$dir"/"$i"/* "$dir"/"$i"/.[!.]* "$dir"/"$i"/..?*; do
if [ -L "$j" ] || [ -e "$j" ]; then
error "Packages must not put anything under /$i"
@ -827,6 +827,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
@ -1389,6 +1394,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"
@ -2155,6 +2165,19 @@ openrc() {
default_openrc
}
# predefined splitfunc systemd
default_systemd() {
depends="$depends_systemd"
pkgdesc="$pkgdesc (systemd files)"
install_if="systemd ${subpkgname%-service}=$pkgver-r$pkgrel"
amove usr/lib/systemd
}
systemd() {
default_systemd
}
default_devhelp() {
depends=""
pkgdesc="$pkgname - devhelp files"
@ -2625,6 +2648,7 @@ rootbld() {
--setenv CARCH "$CARCH" \
--setenv HOME "$HOME" \
--setenv REPODEST "$REPODEST" \
--setenv SRCDEST "$SRCDEST" \
--setenv ABUILD_USERDIR "$ABUILD_USERDIR" \
${ABUILD_BOOTSTRAP:+--setenv ABUILD_BOOTSTRAP "$ABUILD_BOOTSTRAP"} \
${APORTS_BOOTSTRAP:+--setenv APORTS_BOOTSTRAP "$APORTS_BOOTSTRAP"} \