summaryrefslogtreecommitdiff
path: root/src/stage3/stage3.sh
diff options
context:
space:
mode:
authorAndreas Grapentin <andreas@grapentin.org>2018-03-05 14:22:46 +0100
committerAndreas Grapentin <andreas@grapentin.org>2018-03-05 14:22:46 +0100
commit2bcc8559a19b19081ee583f608480e5d80a73b0f (patch)
tree82b500bacc65ac0253c1ecc0193a8f79e8b1b7df /src/stage3/stage3.sh
parentc9805714753fb67b1d76422b19d88fb5fee8105a (diff)
more cleanup in stage2 and tweaks
Diffstat (limited to 'src/stage3/stage3.sh')
-rwxr-xr-xsrc/stage3/stage3.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/stage3/stage3.sh b/src/stage3/stage3.sh
index 075412c..b9f303f 100755
--- a/src/stage3/stage3.sh
+++ b/src/stage3/stage3.sh
@@ -38,6 +38,9 @@ check_exe librechroot
check_exe libremakepkg
check_exe makepkg
+# make sure that binfmt is *enabled* for stage2 build
+echo 1 > /proc/sys/fs/binfmt_misc/status
+
# prepare for the build
. "$_srcdir"/prepare_chroot.sh
. "$_srcdir"/prepare_deptree.sh
@@ -119,17 +122,22 @@ EOF
fi
done
+ # import keys
+ keys="$(source PKGBUILD && echo "${validpgpkeys[@]}")"
+ [ -z "$keys" ] || sudo -u $SUDO_USER gpg --recv-keys $keys
+
# patch if necessary
cp PKGBUILD{,.old}
[ -f "$_srcdir"/patches/$_pkgname.patch ] && \
patch -Np1 -i "$_srcdir"/patches/$_pkgname.patch
+ cp PKGBUILD{,.in}
# substitute common variables
_config="https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain"
_config_sub="$_config;f=config.sub;hb=HEAD"
_config_guess="$_config;f=config.guess;hb=HEAD"
sed -i "s#@CONFIG_SUB@#curl \"$_config_sub\"#g; \
- s#@CONFIG_GUESS@#curl \"$_config_guess\"#g;" \
+ s#@CONFIG_GUESS@#curl \"$_config_guess\"#g" \
PKGBUILD
# enable the target CARCH in arch array