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.patch38
1 files changed, 23 insertions, 15 deletions
diff --git a/src/chroot-tools/makechrootpkg.sh.patch b/src/chroot-tools/makechrootpkg.sh.patch
index da02636..ab08bb9 100644
--- a/src/chroot-tools/makechrootpkg.sh.patch
+++ b/src/chroot-tools/makechrootpkg.sh.patch
@@ -1,5 +1,5 @@
--- makechrootpkg.sh.in 2014-11-05 23:52:13.770870816 -0500
-+++ makechrootpkg.sh.ugly 2014-11-06 00:04:08.999835771 -0500
++++ makechrootpkg.sh.ugly 2014-11-06 00:06:34.803542413 -0500
@@ -1,4 +1,6 @@
#!/bin/bash
+# License: GNU GPLv2
@@ -45,7 +45,7 @@
if [[ ${copy:0:1} = / ]]; then
copydir=$copy
else
-@@ -115,30 +117,48 @@
+@@ -115,35 +117,54 @@
esac
done
@@ -99,8 +99,16 @@
- if [[ ! -d $copydir ]] || $clean_first; then
# Get a read lock on the root chroot to make
# sure we don't clone a half-updated chroot
- slock 8 "$chrootdir/root.lock" "Locking clean chroot"
-@@ -159,14 +179,19 @@
+- slock 8 "$chrootdir/root.lock" "Locking clean chroot"
++ slock 8 "$chrootdir/root.lock" \
++ "Locking clean chroot [%s]" "$chrootdir/root"
+
+- stat_busy "Creating clean working copy [%s]" "$copy"
++ stat_busy "Synchronizing chroot copy [%s] -> [%s]" "$chrootdir" "$copy"
+ if [[ "$chroottype" == btrfs ]] && ! mountpoint -q "$copydir"; then
+ if [[ -d $copydir ]]; then
+ btrfs subvolume delete "$copydir" >/dev/null ||
+@@ -159,14 +180,19 @@
# Drop the read lock again
lock_close 8
@@ -123,7 +131,7 @@
if [[ "$chroottype" == btrfs ]] && ! mountpoint -q "$copydir"; then
btrfs subvolume delete "$copydir" >/dev/null ||
die "Unable to delete subvolume %s" "$copydir"
-@@ -181,9 +206,14 @@
+@@ -181,9 +207,14 @@
stat_done
}
@@ -138,7 +146,7 @@
for install_pkg in "${install_pkgs[@]}"; do
pkgname="${install_pkg##*/}"
cp "$install_pkg" "$copydir/$pkgname"
-@@ -196,11 +226,19 @@
+@@ -196,11 +227,19 @@
rm "$copydir/$pkgname"
done
@@ -160,7 +168,7 @@
$repack || rm -rf "$copydir/build"
mkdir -p "$copydir/build"
-@@ -245,12 +283,12 @@
+@@ -245,12 +284,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}
@@ -175,7 +183,7 @@
sed -i '/^PACKAGER=/d' "$copydir/etc/makepkg.conf"
echo "PACKAGER='${PACKAGER}'" >> "$copydir/etc/makepkg.conf"
fi
-@@ -263,8 +301,20 @@
+@@ -263,8 +302,20 @@
chmod 440 "$copydir/etc/sudoers.d/builduser-pacman"
fi
@@ -196,7 +204,7 @@
{
printf '#!/bin/bash\n'
declare -f _chrootbuild
-@@ -285,13 +335,19 @@
+@@ -285,13 +336,19 @@
chmod +x "$copydir/chrootbuild"
}
@@ -218,7 +226,7 @@
makepkg --config="$copydir/etc/makepkg.conf" --verifysource -o
else
( export SRCDEST BUILDDIR="$builddir"
-@@ -301,10 +357,10 @@
+@@ -301,10 +358,10 @@
(( $? != 0 )) && die "Could not download sources."
# Clean up garbage from verifysource
@@ -231,7 +239,7 @@
# This function isn't run in makechrootpkg,
# so no global variables
-@@ -313,6 +369,7 @@
+@@ -313,6 +370,7 @@
shopt -s nullglob
# XXX: Workaround makepkg disliking read-only dirs
@@ -239,7 +247,7 @@
ln -sft /srcdest /srcdest_host/*
ln -sft /startdir /startdir_host/*
-@@ -342,15 +399,42 @@
+@@ -342,15 +400,42 @@
exit 1
fi
@@ -283,7 +291,7 @@
for l in "$copydir"/logdest/*; do
[[ $l == */logpipe.* ]] && continue
chown "$src_owner" "$l"
-@@ -364,6 +448,10 @@
+@@ -364,6 +449,10 @@
}
# }}}
@@ -294,7 +302,7 @@
umask 0022
load_vars "$USER_HOME/.makepkg.conf"
-@@ -375,30 +463,45 @@
+@@ -375,30 +464,45 @@
[[ -d $SRCPKGDEST ]] || SRCPKGDEST=$PWD
[[ -d $LOGDEST ]] || LOGDEST=$PWD
@@ -346,7 +354,7 @@
if (( ret != 0 )); then
if $temp_chroot; then
-@@ -409,3 +512,4 @@
+@@ -409,3 +513,4 @@
else
true
fi