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.patch44
1 files changed, 25 insertions, 19 deletions
diff --git a/src/chroot-tools/makechrootpkg.sh.patch b/src/chroot-tools/makechrootpkg.sh.patch
index a17b2d3..6d5fc22 100644
--- a/src/chroot-tools/makechrootpkg.sh.patch
+++ b/src/chroot-tools/makechrootpkg.sh.patch
@@ -1,5 +1,5 @@
---- makechrootpkg.sh.in 2015-04-13 12:25:34.551599741 -0400
-+++ makechrootpkg.sh.ugly 2015-04-13 12:25:34.574932652 -0400
+--- makechrootpkg.sh.in 2015-06-06 14:36:36.135418975 -0600
++++ makechrootpkg.sh.ugly 2015-06-06 14:36:12.398465200 -0600
@@ -1,4 +1,6 @@
#!/bin/bash
+# License: GNU GPLv2
@@ -140,7 +140,7 @@
$repack || rm -rf "$copydir/build"
mkdir -p "$copydir/build"
-@@ -192,12 +231,12 @@
+@@ -193,12 +232,12 @@
printf 'builduser:x:%d:100:builduser:/:/usr/bin/nologin\n' "$builduser_uid" >>"$copydir/etc/passwd"
chown -R "$builduser_uid" "$copydir"/{build,pkgdest,srcpkgdest,logdest,srcdest,startdir}
@@ -155,7 +155,7 @@
sed -i '/^PACKAGER=/d' "$copydir/etc/makepkg.conf"
echo "PACKAGER='${PACKAGER}'" >> "$copydir/etc/makepkg.conf"
fi
-@@ -210,8 +249,20 @@
+@@ -211,10 +250,25 @@
chmod 440 "$copydir/etc/sudoers.d/builduser-pacman"
fi
@@ -170,13 +170,18 @@
+
# This is a little gross, but this way the script is recreated every time in the
# working copy
-+ printf $'#!/bin/bash\n%s\n_chrootprepare "$@"' "$(declare -f _chrootprepare)" \
-+ > "$copydir/chrootprepare"
-+ chmod +x "$copydir/chrootprepare"
{
printf '#!/bin/bash\n'
++ declare -f _chrootprepare
++ printf '_chrootprepare "$@"\n'
++ } > "$copydir/chrootprepare"
++ chmod +x "$copydir/chrootprepare"
++ {
++ printf '#!/bin/bash\n'
declare -f _chrootbuild
-@@ -232,13 +283,19 @@
+ printf '_chrootbuild "$@" || exit\n'
+
+@@ -231,13 +285,19 @@
chmod +x "$copydir/chrootbuild"
}
@@ -198,7 +203,7 @@
makepkg --config="$copydir/etc/makepkg.conf" --verifysource -o
else
( export SRCDEST BUILDDIR="$builddir"
-@@ -248,10 +305,10 @@
+@@ -247,10 +307,10 @@
(( $? != 0 )) && die "Could not download sources."
# Clean up garbage from verifysource
@@ -211,7 +216,7 @@
# This function isn't run in makechrootpkg,
# so no global variables
-@@ -260,6 +317,7 @@
+@@ -259,6 +319,7 @@
shopt -s nullglob
# XXX: Workaround makepkg disliking read-only dirs
@@ -219,7 +224,7 @@
ln -sft /srcdest /srcdest_host/*
ln -sft /startdir /startdir_host/*
-@@ -289,15 +347,42 @@
+@@ -288,15 +349,42 @@
exit 1
fi
@@ -263,7 +268,7 @@
for l in "$copydir"/logdest/*; do
[[ $l == */logpipe.* ]] && continue
chown "$src_owner" "$l"
-@@ -311,6 +396,9 @@
+@@ -310,6 +398,9 @@
}
# }}}
@@ -273,7 +278,7 @@
orig_argv=("$@")
while getopts 'hcur:I:l:nTD:d:' arg; do
-@@ -376,30 +464,45 @@
+@@ -375,30 +466,45 @@
[[ -d $SRCPKGDEST ]] || SRCPKGDEST=$PWD
[[ -d $LOGDEST ]] || LOGDEST=$PWD
@@ -297,22 +302,23 @@
+ [[ -f PKGBUILD ]] || exit $ret
+fi
--prepare_chroot
-+prepare_chroot "$copydir" "$USER_HOME" "$repack"
-
-download_sources
+download_sources "$copydir" "$src_owner"
+-prepare_chroot
++prepare_chroot "$copydir" "$USER_HOME" "$repack"
+
if arch-nspawn "$copydir" \
--bind-ro="$PWD:/startdir_host" \
--bind-ro="$SRCDEST:/srcdest_host" \
"${bindmounts_ro[@]}" "${bindmounts_rw[@]}" \
+- /chrootbuild "${makepkg_args[@]}"
+ /chrootprepare &&
-+ arch-nspawn "$copydir" \
++ arch-nspawn "$copydir" \
+ --bind-ro="$PWD:/startdir_host" \
+ --bind-ro="$SRCDEST:/srcdest_host" \
+ "${bindmounts_ro[@]}" "${bindmounts_rw[@]}" \
- /chrootbuild "${makepkg_args[@]}"
++ /chrootbuild
then
- move_products
+ move_products "$copydir" "$src_owner"
@@ -325,7 +331,7 @@
if (( ret != 0 )); then
if $temp_chroot; then
-@@ -410,3 +513,4 @@
+@@ -409,3 +515,4 @@
else
true
fi