summaryrefslogtreecommitdiff
path: root/src/chroot-tools/makechrootpkg.sh.patch
diff options
context:
space:
mode:
Diffstat (limited to 'src/chroot-tools/makechrootpkg.sh.patch')
-rw-r--r--src/chroot-tools/makechrootpkg.sh.patch27
1 files changed, 13 insertions, 14 deletions
diff --git a/src/chroot-tools/makechrootpkg.sh.patch b/src/chroot-tools/makechrootpkg.sh.patch
index d6c96f9..817eaa5 100644
--- a/src/chroot-tools/makechrootpkg.sh.patch
+++ b/src/chroot-tools/makechrootpkg.sh.patch
@@ -1,5 +1,5 @@
--- makechrootpkg.sh.in 2014-01-05 18:51:41.463720929 -0500
-+++ makechrootpkg.sh.ugly 2014-01-05 18:52:41.624501065 -0500
++++ makechrootpkg.sh.ugly 2014-02-05 19:01:17.583560384 -0500
@@ -12,6 +12,7 @@
shopt -s nullglob
@@ -206,7 +206,7 @@
makepkg --config="$copydir/etc/makepkg.conf" --verifysource -o
else
( export SRCDEST BUILDDIR="$builddir"
-@@ -277,20 +331,18 @@
+@@ -277,10 +331,10 @@
(( $? != 0 )) && die "Could not download sources."
# Clean up garbage from verifysource
@@ -218,11 +218,8 @@
+_chrootprepare() {
# This function isn't run in makechrootpkg,
# so no global variables
-- local run_namcap="$1"; shift
-- local makepkg_args=("$@")
--
- . /etc/profile
- export HOME=/build
+ local run_namcap="$1"; shift
+@@ -291,6 +345,7 @@
shopt -s nullglob
# XXX: Workaround makepkg disliking read-only dirs
@@ -230,10 +227,12 @@
ln -sft /srcdest /srcdest_host/*
ln -sft /startdir /startdir_host/*
-@@ -313,9 +365,23 @@
- rm PKGBUILD*
+@@ -314,8 +369,25 @@
cp /startdir_host/PKGBUILD* .
chown nobody PKGBUILD*
+
++ # Sync deps now, as networking may be disabled during _chrootbuild
++ sudo -u nobody makepkg "${makepkg_args[@]}" -eo
+}
+
+_chrootbuild() {
@@ -247,14 +246,14 @@
+ shopt -s nullglob
+
+ cd /startdir
-
++
# Safety check
if [[ ! -w PKGBUILD ]]; then
+ # XXX: internationalize this message
echo "Can't write to PKGBUILD!"
exit 1
fi
-@@ -333,12 +399,24 @@
+@@ -333,12 +405,24 @@
exit 0
}
@@ -279,7 +278,7 @@
for l in "$copydir"/logdest/*; do
[[ $l == */logpipe.* ]] && continue
chown "$src_owner" "$l"
-@@ -352,6 +430,10 @@
+@@ -352,6 +436,10 @@
}
# }}}
@@ -290,7 +289,7 @@
umask 0022
load_vars /etc/makepkg.conf
-@@ -363,30 +445,45 @@
+@@ -363,30 +451,45 @@
[[ -d $SRCPKGDEST ]] || SRCPKGDEST=$PWD
[[ -d $LOGDEST ]] || LOGDEST=$PWD
@@ -342,7 +341,7 @@
if (( ret != 0 )); then
if $temp_chroot; then
-@@ -397,3 +494,4 @@
+@@ -397,3 +500,4 @@
else
true
fi