index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
author | Luke Shumaker <lukeshu@parabola.nu> | 2017-04-20 13:49:19 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@parabola.nu> | 2018-05-29 15:11:15 -0400 |
commit | 14dcf83982cc143d7269237fe469b2c01dc5599f (patch) | |
tree | 9cde7d1a12a3c54d2263c760060f50550f65f27d | |
parent | ecec46875507644ebe0d347378e12063d47fbafe (diff) |
-rw-r--r-- | makechrootpkg.in | 15 |
diff --git a/makechrootpkg.in b/makechrootpkg.in index a302e4d..4cfc6b4 100644 --- a/makechrootpkg.in +++ b/makechrootpkg.in @@ -254,10 +254,25 @@ _chrootbuild() { # shellcheck source=/dev/null . /etc/profile + local srcext + srcext="$( + # shellcheck source=makepkg-x86_64.conf + . /etc/makepkg.conf || exit + # shellcheck source=PKGBUILD.proto + . /startdir/PKGBUILD || exit + if [ "$arch" = any ]; then + pkgarch=any + else + pkgarch=$CARCH + fi + printf '%s\n' "-$pkgarch$SRCEXT" + )" || return + # 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; SRCEXT="${1}" makepkg "${@:2}" --allsource' -bash "$srcext" "$@" || return sudo --preserve-env=SOURCE_DATE_EPOCH -iu builduser bash -c 'cd /startdir; makepkg "$@" --noextract --noprepare' -bash "$@" } |