From b1773440be67eb9a5ac157c64d2d357bb1163f53 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 3 Aug 2018 12:27:39 -0400 Subject: Revert "makechrootpkg: _chrootbuild: Split into _chroot{prepare,build}" This reverts commit ad54ac08ae475134f1ef6242cf4a831aa4ab770a. --- makechrootpkg.in | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/makechrootpkg.in b/makechrootpkg.in index 4cfc6b4..183e688 100644 --- a/makechrootpkg.in +++ b/makechrootpkg.in @@ -211,12 +211,6 @@ Server = file:///repo # This is a little gross, but this way the script is recreated every time in the # working copy - { - printf '#!/bin/bash\n' - declare -f _chrootprepare - printf '_chrootprepare "$@"\n' - } > "$copydir/chrootprepare" - chmod +x "$copydir/chrootprepare" { printf '#!/bin/bash\n' declare -f _chrootbuild @@ -233,20 +227,6 @@ Server = file:///repo # These functions aren't run in makechrootpkg, # so no global variables -_chrootprepare() { - # No coredumps - ulimit -c 0 - - # shellcheck source=/dev/null - . /etc/profile - - # Beware, there are some stupid arbitrary rules on how you can - # use "$" in arguments to commands with "sudo -i". ${foo} or - # ${1} is OK, but $foo or $1 isn't. - # https://bugzilla.sudo.ws/show_bug.cgi?id=765 - sudo --preserve-env=SOURCE_DATE_EPOCH -iu builduser bash -c 'cd /startdir; makepkg "$@" --nobuild' -bash "$@" -} - _chrootbuild() { # No coredumps ulimit -c 0 @@ -273,7 +253,7 @@ _chrootbuild() { # ${1} is OK, but $foo or $1 isn't. # https://bugzilla.sudo.ws/show_bug.cgi?id=765 sudo --preserve-env=SOURCE_DATE_EPOCH -iu builduser bash -c 'cd /startdir; SRCEXT="${1}" makepkg "${@:2}" --allsource' -bash "$srcext" "$@" || return - sudo --preserve-env=SOURCE_DATE_EPOCH -iu builduser bash -c 'cd /startdir; makepkg "$@" --noextract --noprepare' -bash "$@" + sudo --preserve-env=SOURCE_DATE_EPOCH -iu builduser bash -c 'cd /startdir; makepkg "$@"' -bash "$@" } _chrootnamcap() { @@ -457,11 +437,6 @@ main() { prepare_chroot "$copydir" "$USER_HOME" "$keepbuilddir" "$run_namcap" if arch-nspawn "$copydir" \ - --bind="$PWD:/startdir" \ - --bind="$SRCDEST:/srcdest" \ - "${bindmounts_ro[@]}" "${bindmounts_rw[@]}" \ - /chrootprepare "${makepkg_args[@]}" && - arch-nspawn "$copydir" \ --bind="$PWD:/startdir" \ --bind="$SRCDEST:/srcdest" \ "${bindmounts_ro[@]}" "${bindmounts_rw[@]}" \ -- cgit v1.2.2