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.
This commit is contained in:
@@ -67,12 +67,17 @@ sed --in-place "pkg/$PKG_SUBDIR/PKGBUILD" \
|
|||||||
--expression "s/^_tag=.*/_tag=$(cat meson.version)/" \
|
--expression "s/^_tag=.*/_tag=$(cat meson.version)/" \
|
||||||
--expression "s/^pkgrel=.*/pkgrel=$(date "+%Y%m%d%H%M%S" --date "@$TS")/"
|
--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.
|
# We get around makepkg's root check by setting EUID to something else.
|
||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
env --chdir="pkg/$PKG_SUBDIR" \
|
env --chdir="pkg/$PKG_SUBDIR" \
|
||||||
EUID=123 \
|
EUID=123 \
|
||||||
makepkg \
|
makepkg \
|
||||||
--noextract \
|
--noextract \
|
||||||
|
--noprepare \
|
||||||
$( ((WITH_TESTS)) || echo --nocheck) \
|
$( ((WITH_TESTS)) || echo --nocheck) \
|
||||||
--force \
|
--force \
|
||||||
_systemd_UPSTREAM=1 \
|
_systemd_UPSTREAM=1 \
|
||||||
|
|||||||
@@ -53,6 +53,12 @@ if ((WIPE)) && [[ -d "$BUILDDIR/meson-private" ]]; then
|
|||||||
MKOSI_MESON_OPTIONS="$MKOSI_MESON_OPTIONS --wipe"
|
MKOSI_MESON_OPTIONS="$MKOSI_MESON_OPTIONS --wipe"
|
||||||
fi
|
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=
|
IFS=
|
||||||
# TODO: Replace meson_build and meson_install overrides with "--undefine __meson_verbose" once
|
# TODO: Replace meson_build and meson_install overrides with "--undefine __meson_verbose" once
|
||||||
# https://github.com/mesonbuild/meson/pull/12835 is available.
|
# https://github.com/mesonbuild/meson/pull/12835 is available.
|
||||||
@@ -66,6 +72,7 @@ CC_LD="$( ((LLVM)) && echo lld)" \
|
|||||||
CXX_LD="$( ((LLVM)) && echo lld)" \
|
CXX_LD="$( ((LLVM)) && echo lld)" \
|
||||||
rpmbuild \
|
rpmbuild \
|
||||||
-bb \
|
-bb \
|
||||||
|
--noprep \
|
||||||
--build-in-place \
|
--build-in-place \
|
||||||
--with upstream \
|
--with upstream \
|
||||||
$( ((WITH_TESTS)) || echo "--nocheck") \
|
$( ((WITH_TESTS)) || echo "--nocheck") \
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ sed '/Source0/d' --in-place "pkg/$PKG_SUBDIR/systemd.spec"
|
|||||||
until mkosi-chroot \
|
until mkosi-chroot \
|
||||||
rpmbuild \
|
rpmbuild \
|
||||||
-br \
|
-br \
|
||||||
|
--noprep \
|
||||||
--build-in-place \
|
--build-in-place \
|
||||||
--with upstream \
|
--with upstream \
|
||||||
--define "_topdir /var/tmp" \
|
--define "_topdir /var/tmp" \
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ build() {
|
|||||||
CXX_LD="$( ((LLVM)) && echo lld)" \
|
CXX_LD="$( ((LLVM)) && echo lld)" \
|
||||||
rpmbuild \
|
rpmbuild \
|
||||||
-bb \
|
-bb \
|
||||||
|
--noprep \
|
||||||
--build-in-place \
|
--build-in-place \
|
||||||
--with upstream \
|
--with upstream \
|
||||||
$( ((WITH_TESTS)) || echo "--nocheck") \
|
$( ((WITH_TESTS)) || echo "--nocheck") \
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ mkosi-chroot \
|
|||||||
until mkosi-chroot \
|
until mkosi-chroot \
|
||||||
rpmbuild \
|
rpmbuild \
|
||||||
-bd \
|
-bd \
|
||||||
|
--noprep \
|
||||||
--build-in-place \
|
--build-in-place \
|
||||||
--with upstream \
|
--with upstream \
|
||||||
--define "_topdir /var/tmp" \
|
--define "_topdir /var/tmp" \
|
||||||
|
|||||||
Reference in New Issue
Block a user