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.patch41
1 files changed, 22 insertions, 19 deletions
diff --git a/src/chroot-tools/makechrootpkg.sh.patch b/src/chroot-tools/makechrootpkg.sh.patch
index 5cea39a..8180d89 100644
--- a/src/chroot-tools/makechrootpkg.sh.patch
+++ b/src/chroot-tools/makechrootpkg.sh.patch
@@ -1,5 +1,5 @@
---- makechrootpkg.sh.in 2014-03-21 13:59:31.239683366 -0400
-+++ makechrootpkg.sh.ugly 2014-03-21 14:19:20.747789508 -0400
+--- makechrootpkg.sh.in 2014-05-10 22:03:27.956692573 -0400
++++ makechrootpkg.sh.ugly 2014-05-10 22:09:15.376594518 -0400
@@ -1,4 +1,6 @@
#!/bin/bash
+# License: GNU GPLv2
@@ -12,8 +12,8 @@
shopt -s nullglob
+init_variables() {
- _makepkg_args=(-s --noconfirm -L --holdver)
- makepkg_args=("${_makepkg_args[@]}")
+ default_makepkg_args=(-s --noconfirm -L --holdver)
+ makepkg_args=("${default_makepkg_args[@]}")
repack=false
@@ -29,9 +32,10 @@
bindmounts_rw=()
@@ -35,7 +35,7 @@
while getopts 'hcur:I:l:nTD:d:' arg; do
case "$arg" in
h) usage ;;
-@@ -93,9 +98,6 @@
+@@ -91,9 +96,6 @@
[[ ! -d $chrootdir ]] && die "No chroot dir defined, or invalid path '%s'" "$passeddir"
[[ ! -d $chrootdir/root ]] && die "Missing chroot dir root directory. Try using: mkarchroot %s/root base-devel" "$chrootdir"
@@ -45,7 +45,7 @@
if [[ ${copy:0:1} = / ]]; then
copydir=$copy
else
-@@ -115,30 +117,48 @@
+@@ -113,30 +115,48 @@
esac
done
@@ -100,11 +100,14 @@
# 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,11 +179,16 @@
+@@ -157,14 +177,19 @@
# Drop the read lock again
lock_close 8
- fi
+
+ # Update mtime
+ touch "$copydir"
}
-clean_temporary() {
@@ -120,7 +123,7 @@
if [[ "$chroottype" == btrfs ]] && ! mountpoint -q "$copydir"; then
btrfs subvolume delete "$copydir" >/dev/null ||
die "Unable to delete subvolume %s" "$copydir"
-@@ -178,9 +203,14 @@
+@@ -179,9 +204,14 @@
stat_done
}
@@ -135,7 +138,7 @@
for install_pkg in "${install_pkgs[@]}"; do
pkgname="${install_pkg##*/}"
cp "$install_pkg" "$copydir/$pkgname"
-@@ -193,11 +223,19 @@
+@@ -194,11 +224,19 @@
rm "$copydir/$pkgname"
done
@@ -157,7 +160,7 @@
$repack || rm -rf "$copydir/build"
mkdir -p "$copydir/build"
-@@ -236,12 +274,12 @@
+@@ -237,12 +275,12 @@
chown -R nobody "$copydir"/{build,pkgdest,srcpkgdest,logdest,srcdest,startdir}
@@ -172,7 +175,7 @@
sed -i '/^PACKAGER=/d' "$copydir/etc/makepkg.conf"
echo "PACKAGER='${PACKAGER}'" >> "$copydir/etc/makepkg.conf"
fi
-@@ -254,20 +292,38 @@
+@@ -255,20 +293,38 @@
chmod 440 "$copydir/etc/sudoers.d/nobody-pacman"
fi
@@ -213,7 +216,7 @@
makepkg --config="$copydir/etc/makepkg.conf" --verifysource -o
else
( export SRCDEST BUILDDIR="$builddir"
-@@ -277,10 +333,10 @@
+@@ -278,10 +334,10 @@
(( $? != 0 )) && die "Could not download sources."
# Clean up garbage from verifysource
@@ -226,7 +229,7 @@
# This function isn't run in makechrootpkg,
# so no global variables
local run_namcap="$1"; shift
-@@ -291,6 +347,7 @@
+@@ -292,6 +348,7 @@
shopt -s nullglob
# XXX: Workaround makepkg disliking read-only dirs
@@ -234,7 +237,7 @@
ln -sft /srcdest /srcdest_host/*
ln -sft /startdir /startdir_host/*
-@@ -316,11 +373,29 @@
+@@ -317,11 +374,29 @@
# Safety check
if [[ ! -w PKGBUILD ]]; then
@@ -265,7 +268,7 @@
if $run_namcap; then
pacman -S --needed --noconfirm namcap
-@@ -333,12 +408,24 @@
+@@ -334,12 +409,24 @@
exit 0
}
@@ -290,7 +293,7 @@
for l in "$copydir"/logdest/*; do
[[ $l == */logpipe.* ]] && continue
chown "$src_owner" "$l"
-@@ -352,6 +439,10 @@
+@@ -353,6 +440,10 @@
}
# }}}
@@ -300,8 +303,8 @@
+
umask 0022
- load_vars /etc/makepkg.conf
-@@ -363,30 +454,45 @@
+ load_vars "$USER_HOME/.makepkg.conf"
+@@ -364,30 +455,45 @@
[[ -d $SRCPKGDEST ]] || SRCPKGDEST=$PWD
[[ -d $LOGDEST ]] || LOGDEST=$PWD
@@ -353,7 +356,7 @@
if (( ret != 0 )); then
if $temp_chroot; then
-@@ -397,3 +503,4 @@
+@@ -398,3 +504,4 @@
else
true
fi