summaryrefslogtreecommitdiffstats
path: root/mkosi.images
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2024-03-27 14:05:44 +0100
committerDaan De Meyer <daan.j.demeyer@gmail.com>2024-03-27 16:14:17 +0100
commit5524d2838c7d73e33ff2938e7563b008ba829bd4 (patch)
treed0c558f18e2b53d0ac6c19ceb5e8b7c0a423aaee /mkosi.images
parentmkosi: Update to latest (diff)
downloadsystemd-5524d2838c7d73e33ff2938e7563b008ba829bd4.tar.xz
systemd-5524d2838c7d73e33ff2938e7563b008ba829bd4.zip
mkosi: Copy built packages to output directory
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.
Diffstat (limited to 'mkosi.images')
-rwxr-xr-xmkosi.images/system/mkosi.clean4
-rwxr-xr-xmkosi.images/system/mkosi.conf.d/10-arch/mkosi.build.chroot4
-rwxr-xr-xmkosi.images/system/mkosi.conf.d/10-centos-fedora/mkosi.build.chroot4
-rwxr-xr-xmkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.build.chroot3
-rwxr-xr-xmkosi.images/system/mkosi.conf.d/10-opensuse/mkosi.build.chroot4
5 files changed, 15 insertions, 4 deletions
diff --git a/mkosi.images/system/mkosi.clean b/mkosi.images/system/mkosi.clean
new file mode 100755
index 0000000000..cb716c41f7
--- /dev/null
+++ b/mkosi.images/system/mkosi.clean
@@ -0,0 +1,4 @@
+#!/bin/bash
+set -e
+
+rm -f "$OUTPUTDIR"/*.{rpm,deb,pkg.tar}
diff --git a/mkosi.images/system/mkosi.conf.d/10-arch/mkosi.build.chroot b/mkosi.images/system/mkosi.conf.d/10-arch/mkosi.build.chroot
index 1c5f582701..9cdee05b18 100755
--- a/mkosi.images/system/mkosi.conf.d/10-arch/mkosi.build.chroot
+++ b/mkosi.images/system/mkosi.conf.d/10-arch/mkosi.build.chroot
@@ -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"
diff --git a/mkosi.images/system/mkosi.conf.d/10-centos-fedora/mkosi.build.chroot b/mkosi.images/system/mkosi.conf.d/10-centos-fedora/mkosi.build.chroot
index b8b130e0e8..66bcff92d7 100755
--- a/mkosi.images/system/mkosi.conf.d/10-centos-fedora/mkosi.build.chroot
+++ b/mkosi.images/system/mkosi.conf.d/10-centos-fedora/mkosi.build.chroot
@@ -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"
diff --git a/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.build.chroot b/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.build.chroot
index 7fb650f501..106b8ed4e6 100755
--- a/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.build.chroot
+++ b/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.build.chroot
@@ -86,4 +86,5 @@ if ! build; then
build
fi
-mv ../*.deb "$PACKAGEDIR"
+cp ../*.deb "$PACKAGEDIR"
+cp ../*.deb "$OUTPUTDIR"
diff --git a/mkosi.images/system/mkosi.conf.d/10-opensuse/mkosi.build.chroot b/mkosi.images/system/mkosi.conf.d/10-opensuse/mkosi.build.chroot
index b809a10bb0..3d45b43117 100755
--- a/mkosi.images/system/mkosi.conf.d/10-opensuse/mkosi.build.chroot
+++ b/mkosi.images/system/mkosi.conf.d/10-opensuse/mkosi.build.chroot
@@ -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"