summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/chroot-tools/makechrootpkg.sh.patch27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/chroot-tools/makechrootpkg.sh.patch b/src/chroot-tools/makechrootpkg.sh.patch
index fb2f2d0..4082bdd 100644
--- a/src/chroot-tools/makechrootpkg.sh.patch
+++ b/src/chroot-tools/makechrootpkg.sh.patch
@@ -1,5 +1,5 @@
---- makechrootpkg.sh.in 2013-09-26 23:35:59.000000000 -0400
-+++ makechrootpkg.sh.ugly 2013-09-26 23:33:45.000000000 -0400
+--- makechrootpkg.sh.in 2013-10-15 21:33:17.000000000 -0400
++++ makechrootpkg.sh.ugly 2013-10-25 19:05:08.000000000 -0400
@@ -12,6 +12,7 @@
shopt -s nullglob
@@ -162,16 +162,17 @@
sed -i '/^PACKAGER=/d' "$copydir/etc/makepkg.conf"
echo "PACKAGER='${PACKAGER}'" >> "$copydir/etc/makepkg.conf"
fi
-@@ -244,20 +279,37 @@
+@@ -244,20 +279,38 @@
chmod 440 "$copydir/etc/sudoers.d/nobody-pacman"
fi
+ if ! grep -q '^\[repo\]' "$copydir/etc/pacman.conf"; then
-+ cat >> "$copydir/etc/pacman.conf" <<EOF
-+[repo]
++ local line=$(grep -n '^\[' "$copydir/etc/pacman.conf" |grep -Fv ':[options]'|sed 's/:.*//;1q')
++ local ins='[repo]
+SigLevel = Optional TrustAll
+Server = file:///repo
-+EOF
++'
++ sed -i "${line}i${ins//$'\n'/\n}" "$copydir/etc/pacman.conf"
+ fi
+
# This is a little gross, but this way the script is recreated every time in the
@@ -203,7 +204,7 @@
makepkg --config="$copydir/etc/makepkg.conf" --verifysource -o
else
( export SRCDEST BUILDDIR="$builddir"
-@@ -267,20 +319,15 @@
+@@ -267,20 +320,15 @@
(( $? != 0 )) && die "Could not download sources."
# Clean up garbage from verifysource
@@ -227,7 +228,7 @@
ln -sft /srcdest /srcdest_host/*
ln -sft /startdir /startdir_host/*
-@@ -295,15 +342,27 @@
+@@ -295,15 +343,27 @@
done
done
@@ -260,7 +261,7 @@
echo "Can't write to PKGBUILD!"
exit 1
fi
-@@ -321,12 +380,24 @@
+@@ -321,12 +381,24 @@
exit 0
}
@@ -285,7 +286,7 @@
for l in "$copydir"/logdest/*; do
chown "$src_owner" "$l"
mv "$l" "$LOGDEST"
-@@ -334,6 +405,10 @@
+@@ -334,6 +406,10 @@
}
# }}}
@@ -296,7 +297,7 @@
umask 0022
load_vars /etc/makepkg.conf
-@@ -344,17 +419,25 @@
+@@ -344,17 +420,25 @@
[[ -d $SRCDEST ]] || SRCDEST=$PWD
[[ -d $LOGDEST ]] || LOGDEST=$PWD
@@ -329,7 +330,7 @@
if arch-nspawn "$copydir" \
--bind-ro="$PWD:/startdir_host" \
-@@ -362,12 +445,12 @@
+@@ -362,12 +446,12 @@
"${bindmounts_ro[@]}" "${bindmounts_rw[@]}" \
/chrootbuild "${makepkg_args[@]}"
then
@@ -344,7 +345,7 @@
if (( ret != 0 )); then
if $temp_chroot; then
-@@ -378,3 +461,4 @@
+@@ -378,3 +462,4 @@
else
true
fi