From 196748d419a8e8c014151df5145516923d58fbcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Correa=20G=C3=B3mez?= Date: Thu, 11 Apr 2024 15:12:03 +0200 Subject: [PATCH] main/postmarketos-base: don't depend on alpine-base alpine-base directly depends on openrc. We have had different[1] conversations[2] with upstream. And the main conclussion[3] has been: if you want to do something different, just depend on things yourself. This is indeed what docker images do. So let's just get the things that we want from alpine base (quite some!), and ignore what we don't want (openrc, busybox openrc and init packages). Up until commit 12d125ab8b72f0249fd6aae000170a4fa78a83ab in pmbootstrap every postmarketOS installation would have alpine-base in /etc/apk/world. Therefore, we add a versioned provides to postmarketos-base with a very high version, which conflicts with the upstream version but should be chosen instead. alpine-conf is now a dependency of postmarketos-base-openrc, since it dependes on openrc for calling setup-* scripts. postmarketos-base-systemd already implements those needed. Contrary to the first attempt[4], I have kept the dependency on alpine-release. Changes to that are independent to the usr-merge, and can be done as a follow-up. This should allow to drop the fork of alpine-base currently in the systemd-extra repository! To this day, every single pmOS installation will have alpine-base in the world file, which means that systemd installs will the forked package until users specifically run "apk del alpine-base". We must add this to release notes and to an edge blog post. Alternatively we could have an empty package with a very high version providing alpine-base. This also means that to get installs to work, we need a pmbootstrap release with[5] on it. [1] https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/63935 [2] https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/71686 [3] https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/71686#note_435428 [4] https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/5026 [5] https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/merge_requests/2580 Fixes #2806 Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6475 --- main/postmarketos-base/APKBUILD | 23 +++++++++++++++++++++-- pmaports.cfg | 4 ++-- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/main/postmarketos-base/APKBUILD b/main/postmarketos-base/APKBUILD index 1a3c69d0c..8714735c1 100644 --- a/main/postmarketos-base/APKBUILD +++ b/main/postmarketos-base/APKBUILD @@ -1,15 +1,23 @@ pkgname=postmarketos-base pkgver=44 -pkgrel=2 +pkgrel=3 pkgdesc="Meta package for minimal postmarketOS base" url="https://postmarketos.org" arch="noarch" license="GPL-3.0-or-later" makedepends="postmarketos-initramfs" +# Several of these dependencies come from alpine - base, as the upstream +# recommendation to not depend on openrc has been to copy them here: +# https: // gitlab.alpinelinux.org/alpine/aports/-/merge_requests/71686#note_435428 depends=" - alpine-base + alpine-baselayout + alpine-release + apk-tools + busybox + busybox-suid devicepkg-utils>=0.2.0 eudev + musl-utils openssh-server-pam postmarketos-keys postmarketos-mvcfg @@ -41,6 +49,14 @@ replaces=" " replaces_priority=100 # leave plenty for alpine +# Every postmarketos installation with pmbootstrap <= 3.3.2 has +# alpine-base in /etc/apk/world. But for multiple reasons, we do not +# want to depend on it. So have a versioned provides that conflicts +# with it. See the commit that introduced this message for more details +# THE LINE BELOW MUST NOT BE REMOVED UNTIL WE ARE READY TO DEPEND ON +# alpine-base AGAIN +provides="alpine-base=1000-r0" + _source440=" etc/sudoers etc/doas.d/10-postmarketos.conf @@ -160,6 +176,9 @@ openrc() { " depends=" !systemd + alpine-conf + busybox-mdev-openrc + busybox-openrc eudev-openrc logbookd logbookd-openrc diff --git a/pmaports.cfg b/pmaports.cfg index 7e4cea8a6..f55b3af49 100644 --- a/pmaports.cfg +++ b/pmaports.cfg @@ -1,7 +1,7 @@ # Reference: https://postmarketos.org/pmaports.cfg [pmaports] version=7 -pmbootstrap_min_version=2.3.2 +pmbootstrap_min_version=2.3.3 channel=edge supported_root_filesystems=btrfs,ext4,f2fs supported_firewall=nftables @@ -15,7 +15,7 @@ supported_heimdall_depends=heimdall,android-tools [repo:systemd] pmaports_dir=systemd # Build forks of Alpine packages that support usr_merge -bootstrap_1=abuild alpine-base +bootstrap_1=abuild bootstrap_2=systemd # Build systemd related pkgs without deps on each other bootstrap_3=dbus linux-pam-pmos