--copy-source="$1" \
--pretty=no \
"$BUILDDIR"/systemd.raw
-
- cp "$BUILDDIR"/systemd.raw "$OUTPUTDIR"
}
--expression "s/^_tag=.*/_tag=$(cat meson.version)/" \
--expression "s/^pkgrel=.*/pkgrel=$(date "+%Y%m%d%H%M%S" --date "@$TS")/"
+(
+ shopt -s nullglob
+ rm -f "$BUILDDIR"/*.pkg.tar
+)
+
# We get around makepkg's root check by setting EUID to something else.
# Linting the PKGBUILD takes multiple seconds every build so avoid that by nuking all the linting functions.
# shellcheck disable=SC2046
_systemd_UPSTREAM=1 \
_systemd_QUIET=$( ((MESON_VERBOSE)); echo $? ) \
BUILDDIR="$PWD/pkg/$PKG_SUBDIR" \
- PKGDEST="$OUTPUTDIR" \
+ PKGDEST="$BUILDDIR" \
PKGEXT=".pkg.tar" \
MESON_EXTRA_CONFIGURE_OPTIONS="$MKOSI_MESON_OPTIONS $MESON_OPTIONS"
-(
- shopt -s nullglob
- rm -f "$BUILDDIR"/*.pkg.tar
-)
-
-cp "$OUTPUTDIR"/*.pkg.tar "$PACKAGEDIR"
-cp "$OUTPUTDIR"/*.pkg.tar "$BUILDDIR"
+cp "$BUILDDIR"/*.pkg.tar "$PACKAGEDIR"
MKOSI_MESON_OPTIONS="$MKOSI_MESON_OPTIONS --wipe"
fi
+(
+ shopt -s nullglob
+ rm -f "$BUILDDIR"/*.rpm
+)
+
IFS=
# TODO: Replace meson_build and meson_install overrides with "--undefine __meson_verbose" once
# https://github.com/mesonbuild/meson/pull/12835 is available.
$( ((WITH_DOCS)) || echo "--without=docs") \
--define "_topdir /var/tmp" \
--define "_sourcedir $PWD/pkg/$PKG_SUBDIR" \
- --define "_rpmdir $OUTPUTDIR" \
+ --define "_rpmdir $BUILDDIR" \
${BUILDDIR:+"--define=_vpath_builddir $BUILDDIR"} \
--define "_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" \
--define "_binary_payload w.ufdio" \
--noclean \
"pkg/$PKG_SUBDIR/systemd.spec"
-(
- shopt -s nullglob
- rm -f "$BUILDDIR"/*.rpm
-)
-
-cp "$OUTPUTDIR"/*.rpm "$PACKAGEDIR"
-cp "$OUTPUTDIR"/*.rpm "$BUILDDIR"
+cp "$BUILDDIR"/*.rpm "$PACKAGEDIR"
make_sysext_unsigned /var/tmp/BUILD/*/BUILDROOT
rm -f "$BUILDDIR"/*.deb "$BUILDDIR"/*.ddeb
cp ../*.deb ../*.ddeb "$PACKAGEDIR"
- cp ../*.deb ../*.ddeb "$OUTPUTDIR"
cp ../*.deb ../*.ddeb "$BUILDDIR"
+
# These conflict with the packages that we actually want to install, so remove them
rm -f "$BUILDDIR"/systemd-standalone-*.deb "$BUILDDIR"/systemd-standalone-*.ddeb
)
$( ((WITH_TESTS)) || echo "--nocheck") \
--define "_topdir /var/tmp" \
--define "_sourcedir $PWD/pkg/$PKG_SUBDIR" \
- --define "_rpmdir $OUTPUTDIR" \
+ --define "_rpmdir $BUILDDIR" \
${BUILDDIR:+"--define=_vpath_builddir $BUILDDIR"} \
--define "_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" \
--define "_binary_payload w.ufdio" \
return $EXIT_STATUS
}
+(
+ shopt -s nullglob
+ rm -f "$BUILDDIR"/*.rpm
+)
+
if ! build; then
if [[ ! -s /tmp/unpackaged-files ]]; then
exit 1
build --noprep --nocheck
fi
-(
- shopt -s nullglob
- rm -f "$BUILDDIR"/*.rpm
-)
-
-cp "$OUTPUTDIR"/*.rpm "$PACKAGEDIR"
-cp "$OUTPUTDIR"/*.rpm "$BUILDDIR"
+cp "$BUILDDIR"/*.rpm "$PACKAGEDIR"
make_sysext_unsigned /var/tmp/BUILD/*/BUILDROOT
set -e
set -o nounset
+find "$BUILDDIR" \( -name "*.rpm" -o -name "*.deb" -o -name "*.pkg.tar" -o -name systemd.raw \) -exec cp -t "$OUTPUTDIR" {} \;
+
useradd \
--uid 4711 \
--user-group \