Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@parabola.nu>2017-04-20 13:49:19 -0400
committerLuke Shumaker <lukeshu@parabola.nu>2018-01-03 14:58:21 -0500
commitd8c84529df77dc051f27e477f4132a1aebe749ca (patch)
tree8792774130e02daaa6c1c8cac5f9e512fcf67a58
parent31e7c04a7f17fbd0dacb54243578e05f7187522e (diff)
makechrootpkg: Also build --allsource packages
It also sets SRCEXT="-$pkgarch$SRCEXT", so that two runs of makechrootpkg on different architectures don't overwrite eachothers source packages.
-rw-r--r--makechrootpkg.in15
1 files changed, 15 insertions, 0 deletions
diff --git a/makechrootpkg.in b/makechrootpkg.in
index 210ae6e..d357b46 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 "$@"
}