]> git.ipfire.org Git - thirdparty/mkosi.git/commit
Add mkosi-as-caller helper 2023/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 29 Oct 2023 17:22:45 +0000 (18:22 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 1 Nov 2023 21:56:26 +0000 (22:56 +0100)
commitcd8338ff681a0049bd7fec959fcd617d4020c7b5
tree10dd90944434e472a853e2d10376f3680ceacd1a
parentf055d7d3ee516e33e52ae74b1d54264bc50a633f
Add mkosi-as-caller helper

This helper can be used to replace the following pattern which is similar to
something used in the systemd codebase:

SU="setpriv --reuid=${MKOSI_UID:-0} --regid=${MKOSI_GID:-0} --clear-groups"
$SU meson setup "$BUILDDIR/build" "$SRCDIR"
$SU meson compile -C "$BUILDDIR/build"
meson install -C "$BUILDDIR/build" --no-rebuild

With the helper this becomes:

mkosi-as-caller meson setup "$BUILDDIR/build" "$SRCDIR"
mkosi-as-caller meson compile -C "$BUILDDIR/build"
meson install -C "$BUILDDIR/build" --no-rebuild
mkosi/__init__.py
mkosi/resources/mkosi.md