]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mkosi: Copy built packages to output directory 31985/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 27 Mar 2024 13:05:44 +0000 (14:05 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 27 Mar 2024 15:14:17 +0000 (16:14 +0100)
This allows the built packages to be inspected if needed, or installed
on the host system for anyone who's daring enough to do so.

mkosi.images/system/mkosi.clean [new file with mode: 0755]
mkosi.images/system/mkosi.conf.d/10-arch/mkosi.build.chroot
mkosi.images/system/mkosi.conf.d/10-centos-fedora/mkosi.build.chroot
mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.build.chroot
mkosi.images/system/mkosi.conf.d/10-opensuse/mkosi.build.chroot

diff --git a/mkosi.images/system/mkosi.clean b/mkosi.images/system/mkosi.clean
new file mode 100755 (executable)
index 0000000..cb716c4
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/bash
+set -e
+
+rm -f "$OUTPUTDIR"/*.{rpm,deb,pkg.tar}
index 1c5f582701863147d26cc1c3eb090cf1879fdbfe..9cdee05b185595cb7bb5f1fcea433386072ace64 100755 (executable)
@@ -50,6 +50,8 @@ env --chdir="pkg/$PKG_SUBDIR" \
     _systemd_UPSTREAM=1 \
     _systemd_QUIET=1 \
     BUILDDIR="$PWD/pkg/$PKG_SUBDIR" \
-    PKGDEST="$PACKAGEDIR" \
+    PKGDEST="$OUTPUTDIR" \
     PKGEXT=".pkg.tar" \
     MESON_EXTRA_CONFIGURE_OPTIONS="-D mode=developer -D b_sanitize=${SANITIZERS:-none}"
+
+cp "$OUTPUTDIR"/*.pkg.tar "$PACKAGEDIR"
index b8b130e0e858030c689e8856f3e08617a052e444..66bcff92d75bd9c892d125413f2c99b2bcc04040 100755 (executable)
@@ -24,7 +24,7 @@ rpmbuild \
     $( ((WITH_DOCS))  || echo "--without docs") \
     --define "_topdir /var/tmp" \
     --define "_sourcedir pkg/$PKG_SUBDIR" \
-    --define "_rpmdir $PACKAGEDIR" \
+    --define "_rpmdir $OUTPUTDIR" \
     ${BUILDDIR:+--define} \
     ${BUILDDIR:+"_vpath_builddir $BUILDDIR"} \
     --define "_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" \
@@ -46,3 +46,5 @@ rpmbuild \
     --define "__script_requires %{nil}" \
     --undefine _lto_cflags \
     "pkg/$PKG_SUBDIR/systemd.spec"
+
+cp "$OUTPUTDIR"/*.rpm "$PACKAGEDIR"
index 7fb650f5013bdf8f8df235e70309ea4e050ac371..106b8ed4e6ce1acf070114d559e96a75bce2df90 100755 (executable)
@@ -86,4 +86,5 @@ if ! build; then
     build
 fi
 
-mv ../*.deb "$PACKAGEDIR"
+cp ../*.deb "$PACKAGEDIR"
+cp ../*.deb "$OUTPUTDIR"
index b809a10bb01dfbd4e3e4864725714629ea293bdd..3d45b43117992820b3beae7b9316f2a6fb9b48d3 100755 (executable)
@@ -29,7 +29,7 @@ build() {
         $( ((WITH_TESTS)) || echo --nocheck) \
         --define "_topdir /var/tmp" \
         --define "_sourcedir pkg/$PKG_SUBDIR" \
-        --define "_rpmdir $PACKAGEDIR" \
+        --define "_rpmdir $OUTPUTDIR" \
         ${BUILDDIR:+--define} \
         ${BUILDDIR:+"_vpath_builddir $BUILDDIR"} \
         --define "_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" \
@@ -61,3 +61,5 @@ if ! build; then
     cat /tmp/unpackaged-files >>"pkg/$PKG_SUBDIR/files.systemd"
     build --noprep --nocheck
 fi
+
+cp "$OUTPUTDIR"/*.rpm "$PACKAGEDIR"