index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | makechrootpkg.in | 19 |
diff --git a/makechrootpkg.in b/makechrootpkg.in index 9253544..2398818 100644 --- a/makechrootpkg.in +++ b/makechrootpkg.in @@ -186,6 +186,7 @@ prepare_chroot() { [[ -r $USER_HOME/$x ]] || continue $install -m 644 "$USER_HOME/$x" "$copydir/build/$x" done + echo 'keyserver-options auto-key-retrieve' >> "$copydir/build/.gnupg/gpg.conf" sed -e '/^MAKEFLAGS=/d' -e '/^PACKAGER=/d' -i "$copydir/etc/makepkg.conf" for x in BUILDDIR=/build PKGDEST=/pkgdest SRCPKGDEST=/srcpkgdest SRCDEST=/srcdest LOGDEST=/logdest \ @@ -228,6 +229,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. @@ -237,7 +241,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 @@ -250,17 +257,13 @@ download_sources() { local copydir=$1 local makepkg_user=$2 - local builddir - builddir="$(mktemp -d)" - chmod 1777 "$builddir" + setup_workdir + chown "$makepkg_user" "$WORKDIR" # Ensure sources are downloaded - sudo -u "$makepkg_user" env SRCDEST="$SRCDEST" BUILDDIR="$builddir" \ + sudo -u "$makepkg_user" env SRCDEST="$SRCDEST" BUILDDIR="$WORKDIR" \ makepkg --config="$copydir/etc/makepkg.conf" --verifysource -o || die "Could not download sources." - - # Clean up garbage from verifysource - rm -rf "$builddir" } # Usage: move_products $copydir $owner |