index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | src/makechrootpkg.in | 16 |
diff --git a/src/makechrootpkg.in b/src/makechrootpkg.in index 9df14e8..30f78c8 100644 --- a/src/makechrootpkg.in +++ b/src/makechrootpkg.in @@ -184,6 +184,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 @@ -222,6 +225,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. @@ -229,7 +235,7 @@ _chrootbuild() { sudo --preserve-env=SOURCE_DATE_EPOCH \ --preserve-env=BUILDTOOL \ --preserve-env=BUILDTOOLVER \ - -iu builduser bash -c 'cd /startdir; makepkg "$@"' -bash "$@" + -iu builduser bash -c 'cd /startdir; GIT_TERMINAL_PROMPT=0 CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse makepkg "$@"' -bash "$@" ret=$? case $ret in 0|14) @@ -241,7 +247,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 @@ -254,7 +263,7 @@ download_sources() { # Ensure sources are downloaded sudo -u "$makepkg_user" --preserve-env=GNUPGHOME,SSH_AUTH_SOCK \ env SRCDEST="$SRCDEST" BUILDDIR="$WORKDIR" \ - makepkg --config="$copydir/etc/makepkg.conf" --verifysource -o "${verifysource_args[@]}" || + GIT_TERMINAL_PROMPT=0 makepkg --config="$copydir/etc/makepkg.conf" --verifysource -o "${verifysource_args[@]}" || die "Could not download sources." } @@ -350,6 +359,7 @@ done umask 0022 ORIG_HOME=$HOME +PKGEXT=$PKGEXT IFS=: read -r _ _ _ _ _ HOME _ < <(getent passwd "${SUDO_USER:-$USER}") load_makepkg_config HOME=$ORIG_HOME |