From: Daan De Meyer Date: Mon, 12 Aug 2024 10:19:37 +0000 (+0200) Subject: mkosi: Always specify _sourcedir as an absolute path X-Git-Tag: v257-rc1~607^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=71acb00c28a2d02fd582267a9bc263cd0ef9bd97;p=thirdparty%2Fsystemd.git mkosi: Always specify _sourcedir as an absolute path A relative path is not supported by rpm so let's make sure we specify it as an absolute path. --- 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 b372b2264b2..a790a8c0833 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 @@ -78,7 +78,7 @@ CXX_LD="$( ((LLVM)) && echo lld)" \ $( ((WITH_TESTS)) || echo "--nocheck") \ $( ((WITH_DOCS)) || echo "--without=docs") \ --define "_topdir /var/tmp" \ - --define "_sourcedir pkg/$PKG_SUBDIR" \ + --define "_sourcedir $PWD/pkg/$PKG_SUBDIR" \ --define "_rpmdir $OUTPUTDIR" \ ${BUILDDIR:+"--define=_vpath_builddir $BUILDDIR"} \ --define "_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" \ 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 a7e8353cf6f..4fef26f8810 100755 --- a/mkosi.images/build/mkosi.conf.d/centos-fedora/mkosi.prepare +++ b/mkosi.images/build/mkosi.conf.d/centos-fedora/mkosi.prepare @@ -17,7 +17,7 @@ mkosi-chroot \ --query \ --buildrequires \ --define "_topdir /var/tmp" \ - --define "_sourcedir pkg/$PKG_SUBDIR" \ + --define "_sourcedir $PWD/pkg/$PKG_SUBDIR" \ "pkg/$PKG_SUBDIR/systemd.spec" | grep --invert-match --regexp systemd --regexp /bin/sh --regexp "rpmlib(" --regexp udev --regexp grubby --regexp sdubby | sort --unique | @@ -36,7 +36,7 @@ until mkosi-chroot \ --build-in-place \ --with upstream \ --define "_topdir /var/tmp" \ - --define "_sourcedir pkg/$PKG_SUBDIR" \ + --define "_sourcedir $PWD/pkg/$PKG_SUBDIR" \ --define "_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" \ "pkg/$PKG_SUBDIR/systemd.spec" do 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 e44bf0e0794..b127e9d01ae 100755 --- a/mkosi.images/build/mkosi.conf.d/opensuse/mkosi.build.chroot +++ b/mkosi.images/build/mkosi.conf.d/opensuse/mkosi.build.chroot @@ -74,7 +74,7 @@ build() { --with upstream \ $( ((WITH_TESTS)) || echo "--nocheck") \ --define "_topdir /var/tmp" \ - --define "_sourcedir pkg/$PKG_SUBDIR" \ + --define "_sourcedir $PWD/pkg/$PKG_SUBDIR" \ --define "_rpmdir $OUTPUTDIR" \ ${BUILDDIR:+"--define=_vpath_builddir $BUILDDIR"} \ --define "_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" \ diff --git a/mkosi.images/build/mkosi.conf.d/opensuse/mkosi.prepare b/mkosi.images/build/mkosi.conf.d/opensuse/mkosi.prepare index b7dc231dda4..c4a95807155 100755 --- a/mkosi.images/build/mkosi.conf.d/opensuse/mkosi.prepare +++ b/mkosi.images/build/mkosi.conf.d/opensuse/mkosi.prepare @@ -20,7 +20,7 @@ mkosi-chroot \ --query \ --buildrequires \ --define "_topdir /var/tmp" \ - --define "_sourcedir pkg/$PKG_SUBDIR" \ + --define "_sourcedir $PWD/pkg/$PKG_SUBDIR" \ "pkg/$PKG_SUBDIR/systemd.spec" | grep --invert-match --regexp systemd --regexp /bin/sh --regexp "rpmlib(" --regexp udev | sort --unique | @@ -34,7 +34,7 @@ until mkosi-chroot \ --build-in-place \ --with upstream \ --define "_topdir /var/tmp" \ - --define "_sourcedir pkg/$PKG_SUBDIR" \ + --define "_sourcedir $PWD/pkg/$PKG_SUBDIR" \ --define "_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" \ "pkg/$PKG_SUBDIR/systemd.spec" do