summaryrefslogtreecommitdiffstats
path: root/mkosi.images/build
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2024-08-27 13:17:38 +0200
committerDaan De Meyer <daan.j.demeyer@gmail.com>2024-08-28 16:14:05 +0200
commit00a2a67d814651cd3d6e2dff6dab22a3f8e5f5f3 (patch)
tree928bb7c82037391241a19acd79fef24f54c15aa9 /mkosi.images/build
parentmkosi: Update to latest (diff)
downloadsystemd-00a2a67d814651cd3d6e2dff6dab22a3f8e5f5f3.tar.xz
systemd-00a2a67d814651cd3d6e2dff6dab22a3f8e5f5f3.zip
mkosi: Don't apply distribution specific patches
rpm upstream is going to imply --noprep when running with --build-in-place so let's do the same on older versions of rpm (https://github.com/rpm-software-management/rpm/commit/e0925ad6e3185030b004343f73a5917fdc562d6c) Also, to keep things consistent between distros, run with --noprepare on Arch Linux as well (we already skip patches on Debian/Ubuntu). To keep things working on Arch, we apply the one downstream patch manually ourselves.
Diffstat (limited to 'mkosi.images/build')
-rwxr-xr-xmkosi.images/build/mkosi.conf.d/arch/mkosi.build.chroot5
-rwxr-xr-xmkosi.images/build/mkosi.conf.d/centos-fedora/mkosi.build.chroot7
-rwxr-xr-xmkosi.images/build/mkosi.conf.d/centos-fedora/mkosi.prepare1
-rwxr-xr-xmkosi.images/build/mkosi.conf.d/opensuse/mkosi.build.chroot1
-rwxr-xr-xmkosi.images/build/mkosi.conf.d/opensuse/mkosi.prepare1
5 files changed, 15 insertions, 0 deletions
diff --git a/mkosi.images/build/mkosi.conf.d/arch/mkosi.build.chroot b/mkosi.images/build/mkosi.conf.d/arch/mkosi.build.chroot
index 176f0b8869..8d501ecb76 100755
--- a/mkosi.images/build/mkosi.conf.d/arch/mkosi.build.chroot
+++ b/mkosi.images/build/mkosi.conf.d/arch/mkosi.build.chroot
@@ -67,12 +67,17 @@ sed --in-place "pkg/$PKG_SUBDIR/PKGBUILD" \
--expression "s/^_tag=.*/_tag=$(cat meson.version)/" \
--expression "s/^pkgrel=.*/pkgrel=$(date "+%Y%m%d%H%M%S" --date "@$TS")/"
+# Replace cdrom/dialout/tape groups with optical/uucp/storage. We apply this patch manually because we run
+# with --noprepare.
+patch -Np1 -i pkg/arch/0001-Use-Arch-Linux-device-access-groups.patch
+
# We get around makepkg's root check by setting EUID to something else.
# shellcheck disable=SC2046
env --chdir="pkg/$PKG_SUBDIR" \
EUID=123 \
makepkg \
--noextract \
+ --noprepare \
$( ((WITH_TESTS)) || echo --nocheck) \
--force \
_systemd_UPSTREAM=1 \
diff --git a/mkosi.images/build/mkosi.conf.d/centos-fedora/mkosi.build.chroot b/mkosi.images/build/mkosi.conf.d/centos-fedora/mkosi.build.chroot
index ce69aa33b7..b372b2264b 100755
--- a/mkosi.images/build/mkosi.conf.d/centos-fedora/mkosi.build.chroot
+++ b/mkosi.images/build/mkosi.conf.d/centos-fedora/mkosi.build.chroot
@@ -53,6 +53,12 @@ if ((WIPE)) && [[ -d "$BUILDDIR/meson-private" ]]; then
MKOSI_MESON_OPTIONS="$MKOSI_MESON_OPTIONS --wipe"
fi
+# Hack to work around https://github.com/rpm-software-management/rpm/issues/3216.
+# TODO: Remove when rpm 4.20 gets into Rawhide.
+mkdir -p "/var/tmp/BUILD/systemd-${VERSION/\~/_}-build"
+mkdir -p "/var/tmp/BUILD/systemd-${VERSION/\~/_}-build/SPECPARTS"
+ln -s /work/src "/var/tmp/BUILD/systemd-${VERSION/\~/_}-build/systemd-$VERSION"
+
IFS=
# TODO: Replace meson_build and meson_install overrides with "--undefine __meson_verbose" once
# https://github.com/mesonbuild/meson/pull/12835 is available.
@@ -66,6 +72,7 @@ CC_LD="$( ((LLVM)) && echo lld)" \
CXX_LD="$( ((LLVM)) && echo lld)" \
rpmbuild \
-bb \
+ --noprep \
--build-in-place \
--with upstream \
$( ((WITH_TESTS)) || echo "--nocheck") \
diff --git a/mkosi.images/build/mkosi.conf.d/centos-fedora/mkosi.prepare b/mkosi.images/build/mkosi.conf.d/centos-fedora/mkosi.prepare
index 6028dc355b..a7e8353cf6 100755
--- a/mkosi.images/build/mkosi.conf.d/centos-fedora/mkosi.prepare
+++ b/mkosi.images/build/mkosi.conf.d/centos-fedora/mkosi.prepare
@@ -32,6 +32,7 @@ sed '/Source0/d' --in-place "pkg/$PKG_SUBDIR/systemd.spec"
until mkosi-chroot \
rpmbuild \
-br \
+ --noprep \
--build-in-place \
--with upstream \
--define "_topdir /var/tmp" \
diff --git a/mkosi.images/build/mkosi.conf.d/opensuse/mkosi.build.chroot b/mkosi.images/build/mkosi.conf.d/opensuse/mkosi.build.chroot
index 173468f6c1..e44bf0e079 100755
--- a/mkosi.images/build/mkosi.conf.d/opensuse/mkosi.build.chroot
+++ b/mkosi.images/build/mkosi.conf.d/opensuse/mkosi.build.chroot
@@ -69,6 +69,7 @@ build() {
CXX_LD="$( ((LLVM)) && echo lld)" \
rpmbuild \
-bb \
+ --noprep \
--build-in-place \
--with upstream \
$( ((WITH_TESTS)) || echo "--nocheck") \
diff --git a/mkosi.images/build/mkosi.conf.d/opensuse/mkosi.prepare b/mkosi.images/build/mkosi.conf.d/opensuse/mkosi.prepare
index 24f07fd459..b7dc231dda 100755
--- a/mkosi.images/build/mkosi.conf.d/opensuse/mkosi.prepare
+++ b/mkosi.images/build/mkosi.conf.d/opensuse/mkosi.prepare
@@ -30,6 +30,7 @@ mkosi-chroot \
until mkosi-chroot \
rpmbuild \
-bd \
+ --noprep \
--build-in-place \
--with upstream \
--define "_topdir /var/tmp" \