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-03-26 18:20:56 -0400 |
commit | 4785073727971d575375c193c882f38231849f5e (patch) | |
tree | f907d7a38d2a56cc35ecd25cd1fa3c7bae62c673 | |
parent | 21295553ad1d110050359b2d20257533d9bb7d44 (diff) |
-rw-r--r-- | makechrootpkg.in | 15 |
diff --git a/makechrootpkg.in b/makechrootpkg.in index 0c21ed5..b594de2 100644 --- a/makechrootpkg.in +++ b/makechrootpkg.in @@ -259,10 +259,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 "$@" } |