Skip to content

Commit

Permalink
build-aux: use an init process for the nix container
Browse files Browse the repository at this point in the history
Signed-off-by: Giuseppe Scrivano <[email protected]>
  • Loading branch information
giuseppe committed Dec 13, 2024
1 parent 0ec1522 commit d793348
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build-aux/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ mkdir -p /nix
NIX_ARGS="--extra-experimental-features nix-command --print-build-logs --option cores $(nproc) --option max-jobs $(nproc)"

for ARCH in amd64 arm64 ppc64le riscv64 s390x; do
$RUNTIME run --rm $RUNTIME_EXTRA_ARGS --privileged -v /nix:/nix -v ${PWD}:${PWD} -w ${PWD} ${NIX_IMAGE} \
$RUNTIME run --init --rm $RUNTIME_EXTRA_ARGS --privileged -v /nix:/nix -v ${PWD}:${PWD} -w ${PWD} ${NIX_IMAGE} \
nix $NIX_ARGS build --max-jobs auto --file nix/default-${ARCH}.nix
cp ./result/bin/crun $OUTDIR/crun-$VERSION-linux-${ARCH}

rm -rf result

$RUNTIME run --rm $RUNTIME_EXTRA_ARGS --privileged -v /nix:/nix -v ${PWD}:${PWD} -w ${PWD} ${NIX_IMAGE} \
$RUNTIME run --init --rm $RUNTIME_EXTRA_ARGS --privileged -v /nix:/nix -v ${PWD}:${PWD} -w ${PWD} ${NIX_IMAGE} \
nix $NIX_ARGS build --max-jobs auto --file nix/default-${ARCH}.nix --arg enableSystemd false
cp ./result/bin/crun $OUTDIR/crun-$VERSION-linux-${ARCH}-disable-systemd

Expand Down

0 comments on commit d793348

Please sign in to comment.