forked from pool/quilt
- inspect-remap-outputs.patch,
inspect-check-if-wrapper-executable.patch: inspect: Report if patch/tar wrapper can't be executed (quilt setup). OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm/quilt?expand=0&rev=47
This commit is contained in:
parent
abffaf535b
commit
18f5ca442a
31
inspect-check-if-wrapper-executable.patch
Normal file
31
inspect-check-if-wrapper-executable.patch
Normal file
@ -0,0 +1,31 @@
|
||||
inspect: Complain if wrapper script can't be executed.
|
||||
|
||||
There is no guarantee that the wrapper script can be executed.
|
||||
For example user can mount their temporary directories with noexec
|
||||
for security reasons. Instead of failing with no explanation,
|
||||
complain when this situation is detected.
|
||||
---
|
||||
quilt/scripts/inspect.in | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
--- a/quilt/scripts/inspect.in
|
||||
+++ b/quilt/scripts/inspect.in
|
||||
@@ -317,7 +317,18 @@ cat <<-'EOF' > $tmpdir/bin/wrapper
|
||||
${0##*/} "$@" < $tmpdir/data
|
||||
fi
|
||||
EOF
|
||||
+
|
||||
chmod 755 $tmpdir/bin/wrapper
|
||||
+# If $TMPDIR is mounted with noexec, rpmbuild won't be able to execute
|
||||
+# our wrapper script
|
||||
+if [ ! -x $tmpdir/bin/wrapper ]
|
||||
+then
|
||||
+ printf "Cannot execute %s; filesystem mounted with noexec?\n" \
|
||||
+ $tmpdir/bin/wrapper >&2
|
||||
+ printf "Setting %s in ~/.quiltrc may help\n" "VARTMPDIR" >&2
|
||||
+ exit 1
|
||||
+fi
|
||||
+
|
||||
ln -s wrapper $tmpdir/bin/patch
|
||||
ln -s wrapper $tmpdir/bin/tar
|
||||
|
70
inspect-remap-outputs.patch
Normal file
70
inspect-remap-outputs.patch
Normal file
@ -0,0 +1,70 @@
|
||||
inspect: Leave stderr free for actual error reporting.
|
||||
---
|
||||
quilt/scripts/inspect.in | 17 +++++++++--------
|
||||
1 file changed, 9 insertions(+), 8 deletions(-)
|
||||
|
||||
--- quilt-0.50.orig/quilt/scripts/inspect.in
|
||||
+++ quilt-0.50/quilt/scripts/inspect.in
|
||||
@@ -76,11 +76,12 @@ then
|
||||
fi
|
||||
|
||||
# Redirect file descriptors
|
||||
+# 5 is used in verbose mode, 4 in non-verbose mode, and 2 for both (real errors)
|
||||
if [ -n "$verbose" ]
|
||||
then
|
||||
- exec 3>&1 4>/dev/null
|
||||
+ exec 3>&1 5>&2 4>/dev/null
|
||||
else
|
||||
- exec 3>&1 4>&2 2>/dev/null
|
||||
+ exec 3>&1 4>&2 5>/dev/null
|
||||
fi
|
||||
|
||||
# create md5 sums, also for uncompressed files
|
||||
@@ -96,7 +97,7 @@ do
|
||||
esac
|
||||
[ -f "$file" ] || continue
|
||||
echo -n "." >&4
|
||||
- echo "md5sum < $file" >&2
|
||||
+ echo "md5sum < $file" >&5
|
||||
set -- $(md5sum < "$file")
|
||||
echo "$1 $basename"
|
||||
|
||||
@@ -118,25 +119,25 @@ do
|
||||
case "$filetype" in
|
||||
compress*|gzip*)
|
||||
echo -n "g" >&4
|
||||
- echo "gzip -cd $file | md5sum" >&2
|
||||
+ echo "gzip -cd $file | md5sum" >&5
|
||||
set -- $(gzip -cd "$file" | md5sum)
|
||||
echo "$1 $basename"
|
||||
;;
|
||||
bzip2*)
|
||||
echo -n "b" >&4
|
||||
- echo "bzip2 -cd $file | md5sum" >&2
|
||||
+ echo "bzip2 -cd $file | md5sum" >&5
|
||||
set -- $(bzip2 -cd "$file" | md5sum)
|
||||
echo "$1 $basename"
|
||||
;;
|
||||
xz*|XZ*)
|
||||
echo -n "x" >&4
|
||||
- echo "xz -cd $file | md5sum" >&2
|
||||
+ echo "xz -cd $file | md5sum" >&5
|
||||
set -- $(xz -cd "$file" | md5sum)
|
||||
echo "$1 $basename"
|
||||
;;
|
||||
lzma*)
|
||||
echo -n "l" >&4
|
||||
- echo "lzma -cd $file | md5sum" >&2
|
||||
+ echo "lzma -cd $file | md5sum" >&5
|
||||
set -- $(lzma -cd "$file" | md5sum)
|
||||
echo "$1 $basename"
|
||||
;;
|
||||
@@ -339,7 +340,7 @@ rpmbuild --eval "%define _sourcedir $sou
|
||||
--eval "%define __tar $tmpdir/bin/tar" \
|
||||
--eval "$DEFINE_FUZZ" \
|
||||
--nodeps \
|
||||
- -bp "$specdir/$specfile" < /dev/null >&2
|
||||
+ -bp "$specdir/$specfile" < /dev/null >&5 2>&5
|
||||
status=$?
|
||||
echo >&4
|
||||
exit $status
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 17 21:34:30 CET 2012 - jdelvare@suse.de
|
||||
|
||||
- inspect-remap-outputs.patch,
|
||||
inspect-check-if-wrapper-executable.patch: inspect: Report if
|
||||
patch/tar wrapper can't be executed (quilt setup).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 16 14:41:39 CET 2011 - jdelvare@suse.de
|
||||
|
||||
|
@ -44,6 +44,8 @@ Patch6: mail-fix-delivery-address-checking.patch
|
||||
Patch7: fix-inspect.patch
|
||||
Patch8: change-docdir-definition.patch
|
||||
Patch9: patchfns-non-exec.patch
|
||||
Patch10: inspect-remap-outputs.patch
|
||||
Patch11: inspect-check-if-wrapper-executable.patch
|
||||
Url: http://savannah.nongnu.org/projects/quilt
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
@ -72,6 +74,8 @@ Authors:
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
|
||||
%build
|
||||
# --with-rpmbuild=/usr/lib/rpm/rpmb:
|
||||
|
Loading…
Reference in New Issue
Block a user