Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/makechrootpkg.in
diff options
context:
space:
mode:
Diffstat (limited to 'makechrootpkg.in')
-rw-r--r--makechrootpkg.in12
1 files changed, 11 insertions, 1 deletions
diff --git a/makechrootpkg.in b/makechrootpkg.in
index 126d1da..3f63678 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -170,6 +170,9 @@ prepare_chroot() {
grep -q "^$x" "$copydir/etc/makepkg.conf" && continue
echo "$x" >>"$copydir/etc/makepkg.conf"
done
+ if [ -n "${PKGEXT}" ]; then
+ sed -i 's/^PKGEXT=.*/PKGEXT='"'${PKGEXT}'"'/' "$copydir/etc/makepkg.conf"
+ fi
cat > "$copydir/etc/sudoers.d/builduser-pacman" <<EOF
builduser ALL = NOPASSWD: /usr/bin/pacman
@@ -203,6 +206,9 @@ _chrootbuild() {
# shellcheck source=/dev/null
. /etc/profile
+ # otherwise we might have missing keys
+ pacman-key --populate
+
# 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.
@@ -222,7 +228,10 @@ _chrootbuild() {
_chrootnamcap() {
pacman -S --needed --noconfirm namcap
- for pkgfile in /startdir/PKGBUILD /pkgdest/*; do
+ for pkgfile in /startdir/PKGBUILD /startdir/*.pkg.tar.xz /pkgdest/*; do
+ if [ ! -f "${pkgfile}" ]; then
+ continue
+ fi
echo "Checking ${pkgfile##*/}"
sudo -u builduser namcap "$pkgfile" 2>&1 | tee "/logdest/${pkgfile##*/}-namcap.log"
done
@@ -324,6 +333,7 @@ done
umask 0022
ORIG_HOME=$HOME
+PKGEXT=$PKGEXT
IFS=: read -r _ _ _ _ _ HOME _ < <(getent passwd "${SUDO_USER:-$USER}")
load_makepkg_config
HOME=$ORIG_HOME