forked from pool/quilt
- Update to version 0.64:
o Performance: Several optimizations o Test suite: Several fixes and coverage improvements o Test suite: Run the tests in predictable order o files: Add support for unapplied patches o graph: Check for graphviz availability o mail: Remove procmail dependency o push: Do not use interactive mode with -f o Obsoletes dont-substitute-release.patch o Obsoletes hackweek-11-*.patch o Obsoletes inspect-skip-version-check.patch o Obsoletes pop-add-auto-refresh.patch o Obsoletes push-add-auto-refresh.patch o Obsoletes quilt-check-modified-series-rearm.patch o Obsoletes quilt-check-modified-series.patch o Obsoletes quilt-el-fix-patch-select-completion.patch o Obsoletes quilt-el-fix-tramp-support.patch o Obsoletes quilt-format-options-pass-through.patch o Obsoletes setup-check-for-rpmbuild.patch o Obsoletes setup-fix-tar-with-long-options.patch o Obsoletes setup-skip-version-check.patch - Refresh suse-workaround-pseudo-release.patch OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm/quilt?expand=0&rev=99
This commit is contained in:
parent
8a2058fdaf
commit
2fcc003ecd
@ -1,43 +0,0 @@
|
||||
From: Jean Delvare <jdelvare@suse.de>
|
||||
Subject: mail: Don't include the release number in User-Agent
|
||||
Upstream: Committed (2c8ddc751606ad7c36381269af1f64b4c62ba44c)
|
||||
|
||||
@RELEASE@ is replaced with the package-level release number in two
|
||||
places: the spec file, where it is legitimate, and the mail command's
|
||||
User-Agent string, where I think it is not. The package release
|
||||
number should not affect the contents of the package, otherwise it
|
||||
makes it difficult to compare build results.
|
||||
|
||||
I have checked other MUA (Mutt, Thunderbird, Claws Mail) and they all
|
||||
only include the version, not the release number in their User-Agent
|
||||
string.
|
||||
|
||||
Drop the @RELEASE@ replacement rule to make sure we don't use it
|
||||
accidentally anywhere in the future. The spec file has its own build
|
||||
rule so it is not affected.
|
||||
---
|
||||
Makefile.in | 1 -
|
||||
quilt/mail.in | 2 +-
|
||||
2 files changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -264,7 +264,6 @@ $(patsubst %.in,%,$(wildcard bin/*.in qu
|
||||
-e 's:@PATCH''@:$(PATCH):g' \
|
||||
-e 's:@STAT_HARDLINK''@:$(STAT_HARDLINK):g' \
|
||||
-e 's:@VERSION''@:$(VERSION):g' \
|
||||
- -e 's:@RELEASE''@:$(RELEASE):g' \
|
||||
-e 's:@ETCDIR''@:$(etcdir):g' \
|
||||
-e 's:@LOCALEDIR''@:$(localedir):g' \
|
||||
-e 's:@DOCSUBDIR''@:$(docdir):g' \
|
||||
--- a/quilt/mail.in
|
||||
+++ b/quilt/mail.in
|
||||
@@ -495,7 +495,7 @@ introduction="$(gen_tempfile)"
|
||||
(
|
||||
cat <<-EOF
|
||||
Message-Id: <$(msgid)>
|
||||
- User-Agent: quilt/@VERSION@-@RELEASE@
|
||||
+ User-Agent: quilt/@VERSION@
|
||||
Date: $(date --rfc-822)
|
||||
From: ${opt_from:-$opt_sender}
|
||||
To: $(IFS=,; echo "${opt_to[*]}")
|
@ -1,18 +0,0 @@
|
||||
From: Jean Delvare <jdelvare@suse.de>
|
||||
Subject: inspect: Comment update
|
||||
Upstream: Committed (40f5bfbbd4f0a3f9e74c2129a142aab7f6f8ac14)
|
||||
---
|
||||
quilt/scripts/inspect.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/quilt/scripts/inspect.in
|
||||
+++ b/quilt/scripts/inspect.in
|
||||
@@ -150,7 +150,7 @@ done > $tmpdir/md5sums
|
||||
echo >&4
|
||||
shopt -u nullglob
|
||||
|
||||
-# wrapper script for patch and tar
|
||||
+# wrapper script for patch, tar and unzip
|
||||
cat <<-'EOF' > $tmpdir/bin/wrapper
|
||||
#! @BASH@
|
||||
|
@ -1,98 +0,0 @@
|
||||
From: Jean Delvare <jdelvare@suse.de>
|
||||
Subject: setup/inspect: Cleanups
|
||||
Upstream: Committed (aa5d1389f7ce7ca2fc51e791ec33b68404fdea6b)
|
||||
|
||||
* Drop quotes that aren't needed and break syntax highlighting in some
|
||||
editors.
|
||||
* Coding style cleanups.
|
||||
---
|
||||
quilt/scripts/inspect.in | 23 +++++++++++++----------
|
||||
quilt/setup.in | 6 +++---
|
||||
2 files changed, 16 insertions(+), 13 deletions(-)
|
||||
|
||||
--- a/quilt/scripts/inspect.in
|
||||
+++ b/quilt/scripts/inspect.in
|
||||
@@ -65,7 +65,7 @@ else
|
||||
specdir=$PWD
|
||||
fi
|
||||
|
||||
-tmpdir="$(gen_tempfile -d ${VARTMPDIR:-/var/tmp}/${0##*/})"
|
||||
+tmpdir=$(gen_tempfile -d ${VARTMPDIR:-/var/tmp}/${0##*/})
|
||||
mkdir -p $tmpdir || exit 1
|
||||
add_exit_handler "rm -rf $tmpdir"
|
||||
mkdir -p $tmpdir/build
|
||||
@@ -116,7 +116,7 @@ do
|
||||
filetype="xz"
|
||||
;;
|
||||
*)
|
||||
- filetype="$(file -b "$file")"
|
||||
+ filetype=$(file -b "$file")
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -239,7 +239,8 @@ cat <<-'EOF' > $tmpdir/bin/wrapper
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
-i|--input)
|
||||
- if [ $# -ge 2 ]; then
|
||||
+ if [ $# -ge 2 ]
|
||||
+ then
|
||||
echo "$2"
|
||||
return
|
||||
fi
|
||||
@@ -372,12 +373,13 @@ cat <<-'EOF' > $tmpdir/bin/wrapper
|
||||
inputfile=$(unzip_input_file "$@")
|
||||
;;
|
||||
esac
|
||||
- if [ -z "$inputfile" ]; then
|
||||
- # put data from stdin into tmpfile
|
||||
- cat > $tmpdir/data
|
||||
+ if [ -z "$inputfile" ]
|
||||
+ then
|
||||
+ # put data from stdin into tmpfile
|
||||
+ cat > $tmpdir/data
|
||||
fi
|
||||
|
||||
- unpackfile="$(original_file ${inputfile:-$tmpdir/data})"
|
||||
+ unpackfile=$(original_file ${inputfile:-$tmpdir/data})
|
||||
if [ -n "$unpackfile" ]
|
||||
then
|
||||
case "${0##*/}" in
|
||||
@@ -403,10 +405,11 @@ cat <<-'EOF' > $tmpdir/bin/wrapper
|
||||
fi
|
||||
|
||||
PATH=${PATH#*:}
|
||||
- if [ -n "$inputfile" ]; then
|
||||
- ${0##*/} "$@"
|
||||
+ if [ -n "$inputfile" ]
|
||||
+ then
|
||||
+ ${0##*/} "$@"
|
||||
else
|
||||
- ${0##*/} "$@" < $tmpdir/data
|
||||
+ ${0##*/} "$@" < $tmpdir/data
|
||||
fi
|
||||
EOF
|
||||
|
||||
--- a/quilt/setup.in
|
||||
+++ b/quilt/setup.in
|
||||
@@ -205,7 +205,7 @@ case "$1" in
|
||||
"# Source: "*)
|
||||
shift 2
|
||||
source="$@"
|
||||
- filetype="$(file -b "$source")"
|
||||
+ filetype=$(file -b "$source")
|
||||
case "$filetype" in
|
||||
Zip*)
|
||||
echo "unzip ${tar_dir:-.} ${source// /\\ }"
|
||||
@@ -273,9 +273,9 @@ while read tag dir arg1 arg2
|
||||
do
|
||||
case "$tag" in
|
||||
tar|unzip)
|
||||
- tar_dir="$dir"
|
||||
+ tar_dir=$dir
|
||||
[ "$tar_dir" = . ] && tar_dir=
|
||||
- tar_file="$arg1"
|
||||
+ tar_file=$arg1
|
||||
;;
|
||||
patch)
|
||||
if [ ! -e "$prefix$dir/$QUILT_PATCHES" ]
|
@ -1,20 +0,0 @@
|
||||
From: Jean Delvare <jdelvare@suse.de>
|
||||
Subject: inspect: List all options in usage text
|
||||
Upstream: Committed (c57b81b7367ebc6f3757b114302b537d6e305431)
|
||||
|
||||
Options -v and --sourcedir were not listed.
|
||||
---
|
||||
quilt/scripts/inspect.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/quilt/scripts/inspect.in
|
||||
+++ b/quilt/scripts/inspect.in
|
||||
@@ -21,7 +21,7 @@ cd ${SUBDIR:-.}
|
||||
|
||||
usage()
|
||||
{
|
||||
- echo "Usage: ${0##*/} [--fuzz=N] specfile"
|
||||
+ echo "Usage: ${0##*/} [-v] [--sourcedir dir] [--fuzz=N] specfile"
|
||||
exit 1
|
||||
}
|
||||
|
@ -1,32 +0,0 @@
|
||||
From: Jean Delvare <jdelvare@suse.de>
|
||||
Subject: inspect: Pass through the wrappers when appropriate
|
||||
Upstream: Committed (e3ee2d8596cbac98d29d72292b6b45706c0010af)
|
||||
|
||||
The wrappers may be called before the %prep section is entered, in
|
||||
which case RPM_BUILD_DIR isn't set yet. In that case we want to
|
||||
pass trough transparently.
|
||||
---
|
||||
quilt/scripts/inspect.in | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/quilt/scripts/inspect.in
|
||||
+++ b/quilt/scripts/inspect.in
|
||||
@@ -358,6 +358,10 @@ cat <<-'EOF' > $tmpdir/bin/wrapper
|
||||
echo "$dir"
|
||||
}
|
||||
|
||||
+ PATH=${PATH#*:}
|
||||
+ # If we are called too early, pass through without processing
|
||||
+ [ -n "$RPM_BUILD_DIR" ] || exec ${0##*/} "$@"
|
||||
+
|
||||
tmpdir=${RPM_BUILD_DIR%/*}
|
||||
rm -f $tmpdir/data
|
||||
case "${0##*/}" in
|
||||
@@ -404,7 +408,6 @@ cat <<-'EOF' > $tmpdir/bin/wrapper
|
||||
esac
|
||||
fi
|
||||
|
||||
- PATH=${PATH#*:}
|
||||
if [ -n "$inputfile" ]
|
||||
then
|
||||
${0##*/} "$@"
|
@ -1,24 +0,0 @@
|
||||
From: Jean Delvare <jdelvare@suse.de>
|
||||
Subject: inspect: Don't explicitly delete the temporary data file
|
||||
Upstream: Committed (3931a551f43751c6c18e6439864a7d012f2d5f4e)
|
||||
|
||||
This temporary data file is overwritten as needed and the directory
|
||||
it sits in is blasted when the script exits, so there is no point in
|
||||
explicitly deleting this file at the beginning of each wrapper
|
||||
invocation.
|
||||
|
||||
This simple change speeds up "inspect" by 3-4% in my tests.
|
||||
---
|
||||
quilt/scripts/inspect.in | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
--- a/quilt/scripts/inspect.in
|
||||
+++ b/quilt/scripts/inspect.in
|
||||
@@ -363,7 +363,6 @@ cat <<-'EOF' > $tmpdir/bin/wrapper
|
||||
[ -n "$RPM_BUILD_DIR" ] || exec ${0##*/} "$@"
|
||||
|
||||
tmpdir=${RPM_BUILD_DIR%/*}
|
||||
- rm -f $tmpdir/data
|
||||
case "${0##*/}" in
|
||||
patch)
|
||||
inputfile=$(patch_input_file "$@")
|
@ -1,24 +0,0 @@
|
||||
From: Jean Delvare <jdelvare@suse.de>
|
||||
Subject: inspect: Exclude more files from md5sums
|
||||
Upstream: Committed (367ef38abdfc93ceef435f805c97af7a092ea46e)
|
||||
|
||||
A few more files can be excluded from md5sums as we know they are
|
||||
neither patches nor archives:
|
||||
* _constraints, _service and baselibs.conf, from the Build Service
|
||||
* signature files
|
||||
* rpmlintrc files
|
||||
---
|
||||
quilt/scripts/inspect.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/quilt/scripts/inspect.in
|
||||
+++ b/quilt/scripts/inspect.in
|
||||
@@ -95,7 +95,7 @@ for file in $sourcedir/*
|
||||
do
|
||||
basename=${file##*/}
|
||||
case "$basename" in
|
||||
- ready|bigpack|MD5SUMS|MD5SUMS.meta|*.spec|*.changes)
|
||||
+ ready|bigpack|_constraints|_service|baselibs.conf|MD5SUMS|MD5SUMS.meta|*.spec|*.changes|*.sig|*.sign|*rpmlintrc)
|
||||
continue
|
||||
;;
|
||||
esac
|
@ -1,47 +0,0 @@
|
||||
From: Jean Delvare <jdelvare@suse.de>
|
||||
Subject: setup: Introduce function normalize_path
|
||||
Upstream: Committed (1e8e4ff9b8027235d0577369719c0c58ba460cf8)
|
||||
|
||||
Move the path normalization code to a separate function, to avoid
|
||||
redundancy and make the code more readable.
|
||||
---
|
||||
quilt/setup.in | 21 +++++++++++----------
|
||||
1 file changed, 11 insertions(+), 10 deletions(-)
|
||||
|
||||
--- a/quilt/setup.in
|
||||
+++ b/quilt/setup.in
|
||||
@@ -71,6 +71,15 @@ check_for_existing_files()
|
||||
return $status
|
||||
}
|
||||
|
||||
+# Resolve ".." in path and clean up double slashes
|
||||
+normalize_path()
|
||||
+{
|
||||
+ echo "$1" | sed -r -e 's://:/:g' \
|
||||
+ -e ':again' \
|
||||
+ -e 's:/[^/]+/\.\.(/|$):\1:g' \
|
||||
+ -e 'tagain'
|
||||
+}
|
||||
+
|
||||
create_symlink()
|
||||
{
|
||||
local target=$1 link=$2 up
|
||||
@@ -80,16 +89,8 @@ create_symlink()
|
||||
return
|
||||
fi
|
||||
|
||||
- set -- "$(echo "$PWD/$target" | \
|
||||
- sed -r -e 's://:/:g' \
|
||||
- -e ':again' \
|
||||
- -e 's:/[^/]+/\.\.(/|$):\1:g' \
|
||||
- -e 'tagain')" \
|
||||
- "$(echo "$PWD/$link" | \
|
||||
- sed -r -e 's://:/:g' \
|
||||
- -e ':again' \
|
||||
- -e 's:/[^/]+/\.\.(/|$):\1:g' \
|
||||
- -e 'tagain')"
|
||||
+ set -- "$(normalize_path "$PWD/$target")" \
|
||||
+ "$(normalize_path "$PWD/$link")"
|
||||
while [ "${1%%/*}" = "${2%%/*}" ]
|
||||
do
|
||||
set -- "${1#*/}" "${2#*/}"
|
@ -1,598 +0,0 @@
|
||||
From: Jean Delvare <jdelvare@suse.de>
|
||||
Subject: inspect: Split the patch/tar/unzip wrapper to a separate script
|
||||
Upstream: Committed (9f1f21a1fcd6700c9f9fda8c1b953f7e76538c76)
|
||||
|
||||
I couldn't find any reason why the patch/tar/unzip wrapper is
|
||||
generated each time inspect is invoked. Make it a separate script in
|
||||
its own right and let the patch, tar and unzip links point to it.
|
||||
|
||||
This makes this piece of code easier to read, edit, trace and debug.
|
||||
This also solves the case where the filesystem hosting the temporary
|
||||
files is mounted with noexec.
|
||||
---
|
||||
Makefile.in | 6
|
||||
quilt/scripts/inspect-wrapper.in | 265 ++++++++++++++++++++++++++++++++++++
|
||||
quilt/scripts/inspect.in | 282 ---------------------------------------
|
||||
3 files changed, 271 insertions(+), 282 deletions(-)
|
||||
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -79,8 +79,8 @@ QUILT := $(QUILT_IN)
|
||||
SRC += $(QUILT_SRC:%=quilt/%)
|
||||
DIRT += $(QUILT_IN:%=quilt/%)
|
||||
|
||||
-SCRIPTS_IN := patchfns inspect dependency-graph edmail \
|
||||
- remove-trailing-ws backup-files
|
||||
+SCRIPTS_IN := patchfns inspect inspect-wrapper dependency-graph \
|
||||
+ edmail remove-trailing-ws backup-files
|
||||
|
||||
SCRIPTS_SRC := $(SCRIPTS_IN:%=%.in)
|
||||
SCRIPTS := $(SCRIPTS_IN)
|
||||
@@ -391,7 +391,7 @@ test/.depend : Makefile $(TESTS)
|
||||
-e 's:quilt/graph:quilt/graph quilt/scripts/dependency-graph:' \
|
||||
-e 's:quilt/mail:quilt/mail quilt/scripts/edmail:' \
|
||||
-e 's:quilt/refresh:quilt/refresh quilt/scripts/remove-trailing-ws:' \
|
||||
- -e 's:quilt/setup:quilt/setup quilt/scripts/inspect:' \
|
||||
+ -e 's:quilt/setup:quilt/setup quilt/scripts/inspect quilt/scripts/inspect-wrapper:' \
|
||||
> $@
|
||||
|
||||
ifneq ($(shell . $(QUILTRC) ; echo $$QUILT_PATCHES_PREFIX),)
|
||||
--- /dev/null
|
||||
+++ b/quilt/scripts/inspect-wrapper.in
|
||||
@@ -0,0 +1,265 @@
|
||||
+#! @BASH@
|
||||
+
|
||||
+# find original data file by md5sum
|
||||
+original_file()
|
||||
+{
|
||||
+ local file=$1 md5sum
|
||||
+
|
||||
+ set -- $(md5sum < $file)
|
||||
+ md5sum=$1
|
||||
+ while read md5sum_ file_
|
||||
+ do
|
||||
+ if [ "$md5sum" = "$md5sum_" ]
|
||||
+ then
|
||||
+ echo ${file_#\*}
|
||||
+ return 0
|
||||
+ fi
|
||||
+ done < $tmpdir/md5sums
|
||||
+
|
||||
+ # Try harder
|
||||
+ if ! [ -e $tmpdir/more-md5sums ]
|
||||
+ then
|
||||
+ ( cd $RPM_BUILD_DIR
|
||||
+ find . -type f \
|
||||
+ | sed -e 's:^.\/::' \
|
||||
+ | xargs md5sum \
|
||||
+ ) > $tmpdir/more-md5sums
|
||||
+ fi
|
||||
+
|
||||
+ while read md5sum_ file_
|
||||
+ do
|
||||
+ if [ "$md5sum" = "$md5sum_" ]
|
||||
+ then
|
||||
+ echo ${file_#\*}
|
||||
+ return 0
|
||||
+ fi
|
||||
+ done < $tmpdir/more-md5sums
|
||||
+
|
||||
+ return 1
|
||||
+}
|
||||
+
|
||||
+# Extract a command line option with or without argument
|
||||
+cmdline_option()
|
||||
+{
|
||||
+ local letter=$1 no_arg=$2
|
||||
+ shift
|
||||
+
|
||||
+ while [ $# -ne 0 ]
|
||||
+ do
|
||||
+ if [ "${1:0:2}" = -$letter ]
|
||||
+ then
|
||||
+ if [ -z "$no_arg" ]
|
||||
+ then
|
||||
+ [ "$1" = -$letter ] && set -- "$1$2"
|
||||
+ fi
|
||||
+ echo $1
|
||||
+ break
|
||||
+ fi
|
||||
+ shift
|
||||
+ done
|
||||
+}
|
||||
+
|
||||
+# Extract the -p option from the command line
|
||||
+strip_option()
|
||||
+{
|
||||
+ set -- $(cmdline_option p "$@")
|
||||
+ [ "$1" != -p1 ] && echo $1
|
||||
+}
|
||||
+
|
||||
+# Extract the -R option from the command line
|
||||
+reverse_option()
|
||||
+{
|
||||
+ set -- $(cmdline_option R no_arg "$@")
|
||||
+ echo $1
|
||||
+}
|
||||
+
|
||||
+patch_opt_d()
|
||||
+{
|
||||
+ local subdir=$(cmdline_option d "$@")
|
||||
+ [ -z "$subdir" ] || echo "${subdir:2}"
|
||||
+
|
||||
+}
|
||||
+
|
||||
+patch_input_file()
|
||||
+{
|
||||
+ while [ $# -gt 0 ]
|
||||
+ do
|
||||
+ case "$1" in
|
||||
+ -i|--input)
|
||||
+ if [ $# -ge 2 ]
|
||||
+ then
|
||||
+ echo "$2"
|
||||
+ return
|
||||
+ fi
|
||||
+ ;;
|
||||
+ -i*)
|
||||
+ echo "${1#-i}"
|
||||
+ return
|
||||
+ ;;
|
||||
+ --input=*)
|
||||
+ echo "${1#--input=}"
|
||||
+ return
|
||||
+ ;;
|
||||
+ esac
|
||||
+ shift
|
||||
+ done
|
||||
+ return 1
|
||||
+}
|
||||
+
|
||||
+tar_input_file()
|
||||
+{
|
||||
+ case "$1" in
|
||||
+ # Modern option format
|
||||
+ -*)
|
||||
+ while [ $# -gt 0 ]
|
||||
+ do
|
||||
+ case "$1" in
|
||||
+ # Extract the file name (long option)
|
||||
+ --file)
|
||||
+ echo "$2"
|
||||
+ return
|
||||
+ ;;
|
||||
+ --file=*)
|
||||
+ echo "${1#--file=}"
|
||||
+ return
|
||||
+ ;;
|
||||
+ # Skip other long options
|
||||
+ --*)
|
||||
+ shift
|
||||
+ ;;
|
||||
+ # Extract the file name (short option)
|
||||
+ -*f)
|
||||
+ echo "$2"
|
||||
+ return
|
||||
+ ;;
|
||||
+ -f*)
|
||||
+ echo "${1#-f}"
|
||||
+ return
|
||||
+ ;;
|
||||
+ # Skip other short options and parameters
|
||||
+ *)
|
||||
+ shift
|
||||
+ ;;
|
||||
+ esac
|
||||
+ done
|
||||
+ ;;
|
||||
+ # Legacy option format (must always come first)
|
||||
+ *C*f*)
|
||||
+ echo "$3"
|
||||
+ return
|
||||
+ ;;
|
||||
+ *f*)
|
||||
+ echo "$2"
|
||||
+ return
|
||||
+ ;;
|
||||
+ ?*)
|
||||
+ # Eat legacy options and try again
|
||||
+ until [ $# -eq 0 -o "${1:0:1}" = "-" ]
|
||||
+ do
|
||||
+ shift
|
||||
+ done
|
||||
+ tar_input_file "$@"
|
||||
+ return
|
||||
+ ;;
|
||||
+ esac
|
||||
+ return 1
|
||||
+}
|
||||
+
|
||||
+unzip_input_file()
|
||||
+{
|
||||
+ while [ $# -gt 0 ]
|
||||
+ do
|
||||
+ case "$1" in
|
||||
+ -*)
|
||||
+ shift
|
||||
+ ;;
|
||||
+ *)
|
||||
+ echo "$1"
|
||||
+ return
|
||||
+ ;;
|
||||
+ esac
|
||||
+ done
|
||||
+ return 1
|
||||
+}
|
||||
+
|
||||
+tar_opt_C()
|
||||
+{
|
||||
+ case "$1" in
|
||||
+ *C*f*)
|
||||
+ echo "$2"
|
||||
+ return ;;
|
||||
+ esac
|
||||
+}
|
||||
+
|
||||
+pwd_to_dir()
|
||||
+{
|
||||
+ local subdir=$1 dir
|
||||
+
|
||||
+ if [ -n "$subdir" ]
|
||||
+ then
|
||||
+ dir=$(cd "$subdir" && echo $PWD)
|
||||
+ else
|
||||
+ dir=$PWD
|
||||
+ fi
|
||||
+ dir=${dir/$RPM_BUILD_DIR}
|
||||
+ dir=${dir##/}
|
||||
+ dir=${dir// /\\ }
|
||||
+
|
||||
+ echo "$dir"
|
||||
+}
|
||||
+
|
||||
+PATH=${PATH#*:}
|
||||
+# If we are called too early, pass through without processing
|
||||
+[ -n "$RPM_BUILD_DIR" ] || exec ${0##*/} "$@"
|
||||
+
|
||||
+tmpdir=${RPM_BUILD_DIR%/*}
|
||||
+case "${0##*/}" in
|
||||
+patch)
|
||||
+ inputfile=$(patch_input_file "$@")
|
||||
+ ;;
|
||||
+tar)
|
||||
+ inputfile=$(tar_input_file "$@")
|
||||
+ # For tar, file - means read from stdin
|
||||
+ [ "$inputfile" = "-" ] && inputfile=
|
||||
+ ;;
|
||||
+unzip)
|
||||
+ inputfile=$(unzip_input_file "$@")
|
||||
+ ;;
|
||||
+esac
|
||||
+if [ -z "$inputfile" ]
|
||||
+then
|
||||
+ # put data from stdin into tmpfile
|
||||
+ cat > $tmpdir/data
|
||||
+fi
|
||||
+
|
||||
+unpackfile=$(original_file ${inputfile:-$tmpdir/data})
|
||||
+if [ -n "$unpackfile" ]
|
||||
+then
|
||||
+ case "${0##*/}" in
|
||||
+ patch)
|
||||
+ echo -n p >&4
|
||||
+ subdir=$(patch_opt_d "$@")
|
||||
+ dir=$(pwd_to_dir $subdir)
|
||||
+ echo "${0##*/} ${dir:-.} $unpackfile" \
|
||||
+ $(strip_option "$@") $(reverse_option "$@") >&3
|
||||
+ ;;
|
||||
+ tar)
|
||||
+ echo -n t >&4
|
||||
+ subdir=$(tar_opt_C "$@")
|
||||
+ dir=$(pwd_to_dir $subdir)
|
||||
+ echo "${0##*/} ${dir:-.} $unpackfile" >&3
|
||||
+ ;;
|
||||
+ unzip)
|
||||
+ echo -n Z >&4
|
||||
+ dir=$(pwd_to_dir)
|
||||
+ echo "${0##*/} ${dir:-.} $unpackfile" >&3
|
||||
+ ;;
|
||||
+ esac
|
||||
+fi
|
||||
+
|
||||
+if [ -n "$inputfile" ]
|
||||
+then
|
||||
+ ${0##*/} "$@"
|
||||
+else
|
||||
+ ${0##*/} "$@" < $tmpdir/data
|
||||
+fi
|
||||
--- a/quilt/scripts/inspect.in
|
||||
+++ b/quilt/scripts/inspect.in
|
||||
@@ -150,285 +150,9 @@ done > $tmpdir/md5sums
|
||||
echo >&4
|
||||
shopt -u nullglob
|
||||
|
||||
-# wrapper script for patch, tar and unzip
|
||||
-cat <<-'EOF' > $tmpdir/bin/wrapper
|
||||
- #! @BASH@
|
||||
-
|
||||
- # find original data file by md5sum
|
||||
- original_file()
|
||||
- {
|
||||
- local file=$1 md5sum
|
||||
-
|
||||
- set -- $(md5sum < $file)
|
||||
- md5sum=$1
|
||||
- while read md5sum_ file_
|
||||
- do
|
||||
- if [ "$md5sum" = "$md5sum_" ]
|
||||
- then
|
||||
- echo ${file_#\*}
|
||||
- return 0
|
||||
- fi
|
||||
- done < $tmpdir/md5sums
|
||||
-
|
||||
- # Try harder
|
||||
- if ! [ -e $tmpdir/more-md5sums ]
|
||||
- then
|
||||
- ( cd $RPM_BUILD_DIR
|
||||
- find . -type f \
|
||||
- | sed -e 's:^.\/::' \
|
||||
- | xargs md5sum \
|
||||
- ) > $tmpdir/more-md5sums
|
||||
- fi
|
||||
-
|
||||
- while read md5sum_ file_
|
||||
- do
|
||||
- if [ "$md5sum" = "$md5sum_" ]
|
||||
- then
|
||||
- echo ${file_#\*}
|
||||
- return 0
|
||||
- fi
|
||||
- done < $tmpdir/more-md5sums
|
||||
-
|
||||
- return 1
|
||||
- }
|
||||
-
|
||||
- # Extract a command line option with or without argument
|
||||
- cmdline_option()
|
||||
- {
|
||||
- local letter=$1 no_arg=$2
|
||||
- shift
|
||||
-
|
||||
- while [ $# -ne 0 ]
|
||||
- do
|
||||
- if [ "${1:0:2}" = -$letter ]
|
||||
- then
|
||||
- if [ -z "$no_arg" ]
|
||||
- then
|
||||
- [ "$1" = -$letter ] && set -- "$1$2"
|
||||
- fi
|
||||
- echo $1
|
||||
- break
|
||||
- fi
|
||||
- shift
|
||||
- done
|
||||
- }
|
||||
-
|
||||
- # Extract the -p option from the command line
|
||||
- strip_option()
|
||||
- {
|
||||
- set -- $(cmdline_option p "$@")
|
||||
- [ "$1" != -p1 ] && echo $1
|
||||
- }
|
||||
-
|
||||
- # Extract the -R option from the command line
|
||||
- reverse_option()
|
||||
- {
|
||||
- set -- $(cmdline_option R no_arg "$@")
|
||||
- echo $1
|
||||
- }
|
||||
-
|
||||
- patch_opt_d()
|
||||
- {
|
||||
- local subdir=$(cmdline_option d "$@")
|
||||
- [ -z "$subdir" ] || echo "${subdir:2}"
|
||||
-
|
||||
- }
|
||||
-
|
||||
- patch_input_file()
|
||||
- {
|
||||
- while [ $# -gt 0 ]; do
|
||||
- case "$1" in
|
||||
- -i|--input)
|
||||
- if [ $# -ge 2 ]
|
||||
- then
|
||||
- echo "$2"
|
||||
- return
|
||||
- fi
|
||||
- ;;
|
||||
- -i*)
|
||||
- echo "${1#-i}"
|
||||
- return
|
||||
- ;;
|
||||
- --input=*)
|
||||
- echo "${1#--input=}"
|
||||
- return
|
||||
- ;;
|
||||
- esac
|
||||
- shift
|
||||
- done
|
||||
- return 1
|
||||
- }
|
||||
-
|
||||
- tar_input_file()
|
||||
- {
|
||||
- case "$1" in
|
||||
- # Modern option format
|
||||
- -*)
|
||||
- while [ $# -gt 0 ]; do
|
||||
- case "$1" in
|
||||
- # Extract the file name (long option)
|
||||
- --file)
|
||||
- echo "$2"
|
||||
- return
|
||||
- ;;
|
||||
- --file=*)
|
||||
- echo "${1#--file=}"
|
||||
- return
|
||||
- ;;
|
||||
- # Skip other long options
|
||||
- --*)
|
||||
- shift
|
||||
- ;;
|
||||
- # Extract the file name (short option)
|
||||
- -*f)
|
||||
- echo "$2"
|
||||
- return
|
||||
- ;;
|
||||
- -f*)
|
||||
- echo "${1#-f}"
|
||||
- return
|
||||
- ;;
|
||||
- # Skip other short options and parameters
|
||||
- *)
|
||||
- shift
|
||||
- ;;
|
||||
- esac
|
||||
- done
|
||||
- ;;
|
||||
- # Legacy option format (must always come first)
|
||||
- *C*f*)
|
||||
- echo "$3"
|
||||
- return
|
||||
- ;;
|
||||
- *f*)
|
||||
- echo "$2"
|
||||
- return
|
||||
- ;;
|
||||
- ?*)
|
||||
- # Eat legacy options and try again
|
||||
- until [ $# -eq 0 -o "${1:0:1}" = "-" ]; do
|
||||
- shift
|
||||
- done
|
||||
- tar_input_file "$@"
|
||||
- return
|
||||
- ;;
|
||||
- esac
|
||||
- return 1
|
||||
- }
|
||||
-
|
||||
- unzip_input_file()
|
||||
- {
|
||||
- while [ $# -gt 0 ]; do
|
||||
- case "$1" in
|
||||
- -*)
|
||||
- shift
|
||||
- ;;
|
||||
- *)
|
||||
- echo "$1"
|
||||
- return
|
||||
- ;;
|
||||
- esac
|
||||
- done
|
||||
- return 1
|
||||
- }
|
||||
-
|
||||
- tar_opt_C()
|
||||
- {
|
||||
- case "$1" in
|
||||
- *C*f*)
|
||||
- echo "$2"
|
||||
- return ;;
|
||||
- esac
|
||||
- }
|
||||
-
|
||||
- pwd_to_dir()
|
||||
- {
|
||||
- local subdir=$1 dir
|
||||
-
|
||||
- if [ -n "$subdir" ]
|
||||
- then
|
||||
- dir=$(cd "$subdir" && echo $PWD)
|
||||
- else
|
||||
- dir=$PWD
|
||||
- fi
|
||||
- dir=${dir/$RPM_BUILD_DIR}
|
||||
- dir=${dir##/}
|
||||
- dir=${dir// /\\ }
|
||||
-
|
||||
- echo "$dir"
|
||||
- }
|
||||
-
|
||||
- PATH=${PATH#*:}
|
||||
- # If we are called too early, pass through without processing
|
||||
- [ -n "$RPM_BUILD_DIR" ] || exec ${0##*/} "$@"
|
||||
-
|
||||
- tmpdir=${RPM_BUILD_DIR%/*}
|
||||
- case "${0##*/}" in
|
||||
- patch)
|
||||
- inputfile=$(patch_input_file "$@")
|
||||
- ;;
|
||||
- tar)
|
||||
- inputfile=$(tar_input_file "$@")
|
||||
- # For tar, file - means read from stdin
|
||||
- [ "$inputfile" = "-" ] && inputfile=
|
||||
- ;;
|
||||
- unzip)
|
||||
- inputfile=$(unzip_input_file "$@")
|
||||
- ;;
|
||||
- esac
|
||||
- if [ -z "$inputfile" ]
|
||||
- then
|
||||
- # put data from stdin into tmpfile
|
||||
- cat > $tmpdir/data
|
||||
- fi
|
||||
-
|
||||
- unpackfile=$(original_file ${inputfile:-$tmpdir/data})
|
||||
- if [ -n "$unpackfile" ]
|
||||
- then
|
||||
- case "${0##*/}" in
|
||||
- patch)
|
||||
- echo -n p >&4
|
||||
- subdir=$(patch_opt_d "$@")
|
||||
- dir=$(pwd_to_dir $subdir)
|
||||
- echo "${0##*/} ${dir:-.} $unpackfile" \
|
||||
- $(strip_option "$@") $(reverse_option "$@") >&3
|
||||
- ;;
|
||||
- tar)
|
||||
- echo -n t >&4
|
||||
- subdir=$(tar_opt_C "$@")
|
||||
- dir=$(pwd_to_dir $subdir)
|
||||
- echo "${0##*/} ${dir:-.} $unpackfile" >&3
|
||||
- ;;
|
||||
- unzip)
|
||||
- echo -n Z >&4
|
||||
- dir=$(pwd_to_dir)
|
||||
- echo "${0##*/} ${dir:-.} $unpackfile" >&3
|
||||
- ;;
|
||||
- esac
|
||||
- fi
|
||||
-
|
||||
- if [ -n "$inputfile" ]
|
||||
- then
|
||||
- ${0##*/} "$@"
|
||||
- else
|
||||
- ${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
|
||||
-ln -s wrapper $tmpdir/bin/unzip
|
||||
+ln -s $QUILT_DIR/scripts/inspect-wrapper $tmpdir/bin/patch
|
||||
+ln -s $QUILT_DIR/scripts/inspect-wrapper $tmpdir/bin/tar
|
||||
+ln -s $QUILT_DIR/scripts/inspect-wrapper $tmpdir/bin/unzip
|
||||
|
||||
# let rpm do all the dirty specfile stuff ...
|
||||
echo -n "### rpmbuild: " >&4
|
@ -1,29 +0,0 @@
|
||||
From: Jean Delvare <jdelvare@suse.de>
|
||||
Subject: inspect-wrapper: Minor code optimization
|
||||
Upstream: Committed (f159ee6f0bcd6b9abdc8830a1228d902e93311ae)
|
||||
|
||||
Don't test if inputfile is set twice in a row.
|
||||
---
|
||||
quilt/scripts/inspect-wrapper.in | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/quilt/scripts/inspect-wrapper.in
|
||||
+++ b/quilt/scripts/inspect-wrapper.in
|
||||
@@ -226,13 +226,15 @@ unzip)
|
||||
inputfile=$(unzip_input_file "$@")
|
||||
;;
|
||||
esac
|
||||
-if [ -z "$inputfile" ]
|
||||
+if [ -n "$inputfile" ]
|
||||
then
|
||||
+ unpackfile=$(original_file "$inputfile")
|
||||
+else
|
||||
# put data from stdin into tmpfile
|
||||
cat > $tmpdir/data
|
||||
+ unpackfile=$(original_file $tmpdir/data)
|
||||
fi
|
||||
|
||||
-unpackfile=$(original_file ${inputfile:-$tmpdir/data})
|
||||
if [ -n "$unpackfile" ]
|
||||
then
|
||||
case "${0##*/}" in
|
@ -1,74 +0,0 @@
|
||||
From: Jean Delvare <jdelvare@suse.de>
|
||||
Subject: setup: Fix path to extra patches in series file
|
||||
Upstream: Committed (1e5d95849e4a09427efefc7bd7e9f33bf911f526)
|
||||
|
||||
Extra patches (typically contained in archives) end up in the working
|
||||
directory, not the source directory where regular patches live. In
|
||||
the most common case, it makes no difference because both directories
|
||||
are the same. However, as soon as options -d or --sourcedir are used
|
||||
in conjunction with extra patches, the working directory and the
|
||||
source directory are different, and the paths to the extra patches in
|
||||
the series file get wrong.
|
||||
|
||||
While we can't possible handle the case where the source and working
|
||||
directories are completely different, we can easily handle the most
|
||||
typical case where the working directory is a subdirectory of the
|
||||
source directory.
|
||||
---
|
||||
quilt/scripts/inspect-wrapper.in | 2 +-
|
||||
quilt/setup.in | 26 ++++++++++++++++++++++++++
|
||||
2 files changed, 27 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/quilt/scripts/inspect-wrapper.in
|
||||
+++ b/quilt/scripts/inspect-wrapper.in
|
||||
@@ -30,7 +30,7 @@ original_file()
|
||||
do
|
||||
if [ "$md5sum" = "$md5sum_" ]
|
||||
then
|
||||
- echo ${file_#\*}
|
||||
+ echo $QUILT_SETUP_PREFIX${file_#\*}
|
||||
return 0
|
||||
fi
|
||||
done < $tmpdir/more-md5sums
|
||||
--- a/quilt/setup.in
|
||||
+++ b/quilt/setup.in
|
||||
@@ -101,6 +101,27 @@ create_symlink()
|
||||
ln -s "${1:-.}" "$link"
|
||||
}
|
||||
|
||||
+dir_to_dir()
|
||||
+{
|
||||
+ local from=$1 to=$2
|
||||
+
|
||||
+ [ "${from:0:1}" = / ] || from=$PWD/$from
|
||||
+ from=$(normalize_path "$from")
|
||||
+
|
||||
+ [ "${to:0:1}" = / ] || to=$PWD/$to
|
||||
+ to=$(normalize_path "$to")
|
||||
+
|
||||
+ # If the target is a subdirectory of the origin, we can express the path
|
||||
+ # in a relative way. Otherwise, return the absolute path.
|
||||
+ if [ "${to:0:${#from}}" = "$from" ]
|
||||
+ then
|
||||
+ to=${to:${#from}}
|
||||
+ to=${to#/}
|
||||
+ fi
|
||||
+
|
||||
+ echo "$to"
|
||||
+}
|
||||
+
|
||||
usage()
|
||||
{
|
||||
printf $"Usage: quilt setup [-d path-prefix] [-v] [--sourcedir dir] [--fuzz=N] {specfile|seriesfile}\n"
|
||||
@@ -170,6 +191,11 @@ fi
|
||||
tmpfile=$(gen_tempfile)
|
||||
add_exit_handler "rm -f $tmpfile"
|
||||
|
||||
+# The patches link will point to the source directory, while extra patches
|
||||
+# may be available under $prefix. If the latter is a subdirectory of the former,
|
||||
+# a prefix can be added to fix up the path to the extra patches.
|
||||
+export QUILT_SETUP_PREFIX=$(dir_to_dir "$sourcedir" "$prefix")
|
||||
+
|
||||
case "$1" in
|
||||
*.spec)
|
||||
spec_file=$1
|
@ -1,53 +0,0 @@
|
||||
From: Jean Delvare <jdelvare@suse.de>
|
||||
Subject: inspect-wrapper: Trace calls earlier
|
||||
Upstream: Committed (d56b11e711533b0adae8b0fd6b36ec01807d62b1)
|
||||
|
||||
Trace the calls to the patch/tar/unzip wrapper earlier. That way, if
|
||||
anything goes wrong, we know which type of file was being processed.
|
||||
Even if nothing goes wrong, the user now sees the file type as it is
|
||||
being processed (which can take a long time.)
|
||||
---
|
||||
quilt/scripts/inspect-wrapper.in | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/quilt/scripts/inspect-wrapper.in
|
||||
+++ b/quilt/scripts/inspect-wrapper.in
|
||||
@@ -215,14 +215,17 @@ PATH=${PATH#*:}
|
||||
tmpdir=${RPM_BUILD_DIR%/*}
|
||||
case "${0##*/}" in
|
||||
patch)
|
||||
+ echo -n p >&4
|
||||
inputfile=$(patch_input_file "$@")
|
||||
;;
|
||||
tar)
|
||||
+ echo -n t >&4
|
||||
inputfile=$(tar_input_file "$@")
|
||||
# For tar, file - means read from stdin
|
||||
[ "$inputfile" = "-" ] && inputfile=
|
||||
;;
|
||||
unzip)
|
||||
+ echo -n Z >&4
|
||||
inputfile=$(unzip_input_file "$@")
|
||||
;;
|
||||
esac
|
||||
@@ -239,20 +242,17 @@ if [ -n "$unpackfile" ]
|
||||
then
|
||||
case "${0##*/}" in
|
||||
patch)
|
||||
- echo -n p >&4
|
||||
subdir=$(patch_opt_d "$@")
|
||||
dir=$(pwd_to_dir $subdir)
|
||||
echo "${0##*/} ${dir:-.} $unpackfile" \
|
||||
$(strip_option "$@") $(reverse_option "$@") >&3
|
||||
;;
|
||||
tar)
|
||||
- echo -n t >&4
|
||||
subdir=$(tar_opt_C "$@")
|
||||
dir=$(pwd_to_dir $subdir)
|
||||
echo "${0##*/} ${dir:-.} $unpackfile" >&3
|
||||
;;
|
||||
unzip)
|
||||
- echo -n Z >&4
|
||||
dir=$(pwd_to_dir)
|
||||
echo "${0##*/} ${dir:-.} $unpackfile" >&3
|
||||
;;
|
@ -1,221 +0,0 @@
|
||||
From: Jean Delvare <jdelvare@suse.de>
|
||||
Subject: setup: Add --fast option
|
||||
Upstream: Committed (c0f677497b760028ae8aafb72d4d08604aa7870e)
|
||||
|
||||
This is an alternative implementation of "quilt setup" for rpm spec
|
||||
files, which is much faster than the original implementation. The
|
||||
idea is to have rpmbuild generate our working tree directly, instead
|
||||
of taking note of everything it does and then replaying that record
|
||||
from scratch.
|
||||
|
||||
The new implementation is enabled with option --fast. The original
|
||||
implementation can be selected with --slow, which is the default.
|
||||
Having this option makes it possible to set the default to --fast in
|
||||
~/.quiltrc and revert to --slow on the command line on a case-by-case
|
||||
basis. This will also make it easier if we decide to change the
|
||||
default in the future.
|
||||
|
||||
In general, the generated working tree should be the same with --slow
|
||||
or --fast. There are 3 known exceptions though:
|
||||
* The header of the series files is incomplete when using --fast,
|
||||
which means that you can't reuse these series files to feed "quilt
|
||||
setup" later.
|
||||
* If the spec file generates files other than with the tar, unzip and
|
||||
patch commands, you wouldn't get these files in your working tree
|
||||
with --slow, but with --fast you will.
|
||||
* With --fast, all patches are added to the series file, regardless
|
||||
of whether they apply or not. This also means that patches which
|
||||
fail to apply are not reported as such until you attempt to push
|
||||
them.
|
||||
|
||||
On large packages, this alternative implementation was found to be
|
||||
up to 4 times faster than the original implementation.
|
||||
---
|
||||
This is my SUSE hackweek 11 project, more information at:
|
||||
https://hackweek.suse.com/11/projects/194
|
||||
|
||||
quilt/scripts/inspect-wrapper.in | 5 ++++
|
||||
quilt/scripts/inspect.in | 23 ++++++++++++++++++--
|
||||
quilt/setup.in | 43 +++++++++++++++++++++++++++++++++++----
|
||||
3 files changed, 64 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/quilt/scripts/inspect-wrapper.in
|
||||
+++ b/quilt/scripts/inspect-wrapper.in
|
||||
@@ -220,12 +220,14 @@ patch)
|
||||
;;
|
||||
tar)
|
||||
echo -n t >&4
|
||||
+ [ -n "$QUILT_SETUP_FAST" ] && exec ${0##*/} "$@"
|
||||
inputfile=$(tar_input_file "$@")
|
||||
# For tar, file - means read from stdin
|
||||
[ "$inputfile" = "-" ] && inputfile=
|
||||
;;
|
||||
unzip)
|
||||
echo -n Z >&4
|
||||
+ [ -n "$QUILT_SETUP_FAST" ] && exec ${0##*/} "$@"
|
||||
inputfile=$(unzip_input_file "$@")
|
||||
;;
|
||||
esac
|
||||
@@ -259,6 +261,9 @@ then
|
||||
esac
|
||||
fi
|
||||
|
||||
+# In fast mode, we don't actually apply patches
|
||||
+[ ${0##*/}$QUILT_SETUP_FAST = patch1 ] && exit 0
|
||||
+
|
||||
if [ -n "$inputfile" ]
|
||||
then
|
||||
${0##*/} "$@"
|
||||
--- a/quilt/scripts/inspect.in
|
||||
+++ b/quilt/scripts/inspect.in
|
||||
@@ -21,11 +21,11 @@ cd ${SUBDIR:-.}
|
||||
|
||||
usage()
|
||||
{
|
||||
- echo "Usage: ${0##*/} [-v] [--sourcedir dir] [--fuzz=N] specfile"
|
||||
+ echo "Usage: ${0##*/} [-v] [--sourcedir dir] [--targetdir dir] [--fuzz=N] specfile"
|
||||
exit 1
|
||||
}
|
||||
|
||||
-options=$(getopt -o v --long sourcedir:,fuzz: -n "${0##*/}" -- "$@") || exit
|
||||
+options=$(getopt -o v --long sourcedir:,targetdir:,fuzz: -n "${0##*/}" -- "$@") || exit
|
||||
|
||||
eval set -- "$options"
|
||||
|
||||
@@ -40,6 +40,9 @@ do
|
||||
--sourcedir)
|
||||
sourcedir=${2%/}/
|
||||
shift 2 ;;
|
||||
+ --targetdir)
|
||||
+ targetdir=$2
|
||||
+ shift 2 ;;
|
||||
--fuzz)
|
||||
# Only works with rpm 4.6 and later
|
||||
DEFINE_FUZZ="%define _default_patch_fuzz $2"
|
||||
@@ -68,8 +71,16 @@ fi
|
||||
tmpdir=$(gen_tempfile -d ${VARTMPDIR:-/var/tmp}/${0##*/})
|
||||
mkdir -p $tmpdir || exit 1
|
||||
add_exit_handler "rm -rf $tmpdir"
|
||||
-mkdir -p $tmpdir/build
|
||||
mkdir -p $tmpdir/bin
|
||||
+if [ -n "$targetdir" ]
|
||||
+then
|
||||
+ # Fast mode
|
||||
+ [ -d "$targetdir" ] || mkdir -p "$targetdir" || exit 1
|
||||
+ ln -s "$targetdir" $tmpdir/build
|
||||
+else
|
||||
+ # Standard mode
|
||||
+ mkdir -p $tmpdir/build
|
||||
+fi
|
||||
|
||||
# Older versions of Suse packages have a symbolic release number, and rpmbuild
|
||||
# won't like that, so change it to something compliant.
|
||||
@@ -98,6 +109,11 @@ do
|
||||
ready|bigpack|_constraints|_service|baselibs.conf|MD5SUMS|MD5SUMS.meta|*.spec|*.changes|*.sig|*.sign|*rpmlintrc)
|
||||
continue
|
||||
;;
|
||||
+ # In fast mode, we are only interested in patches, so filter out
|
||||
+ # archives
|
||||
+ *.tar|*.tar.Z|*.tar.gz|*.tgz|*.tar.bz2|*.tar.xz|*.zip)
|
||||
+ [ -n "$targetdir" ] && continue
|
||||
+ ;;
|
||||
esac
|
||||
[ -f "$file" ] || continue
|
||||
echo -n "." >&4
|
||||
@@ -158,6 +174,7 @@ ln -s $QUILT_DIR/scripts/inspect-wrapper
|
||||
echo -n "### rpmbuild: " >&4
|
||||
|
||||
export PATH="$tmpdir/bin:$PATH"
|
||||
+export QUILT_SETUP_FAST=${targetdir:+1}
|
||||
rpmbuild --eval "%define _sourcedir $sourcedir" \
|
||||
--eval "%define _specdir $specdir" \
|
||||
--eval "%define _builddir $tmpdir/build" \
|
||||
--- a/quilt/setup.in
|
||||
+++ b/quilt/setup.in
|
||||
@@ -124,7 +124,7 @@ dir_to_dir()
|
||||
|
||||
usage()
|
||||
{
|
||||
- printf $"Usage: quilt setup [-d path-prefix] [-v] [--sourcedir dir] [--fuzz=N] {specfile|seriesfile}\n"
|
||||
+ printf $"Usage: quilt setup [-d path-prefix] [-v] [--sourcedir dir] [--fuzz=N] [--slow|--fast] {specfile|seriesfile}\n"
|
||||
if [ x$1 = x-h ]
|
||||
then
|
||||
printf $"
|
||||
@@ -139,6 +139,17 @@ Initializes a source tree from an rpm sp
|
||||
|
||||
--fuzz=N
|
||||
Set the maximum fuzz factor (needs rpm 4.6 or later).
|
||||
+
|
||||
+--slow Use the original, slow method to process the spec file. This is the
|
||||
+ default for now, but that might change in the future. In this mode,
|
||||
+ rpmbuild generates a working tree in a temporary directory while all
|
||||
+ its actions are recorded, and then everything is replayed from scratch
|
||||
+ in the target directory.
|
||||
+
|
||||
+--fast Use an alternative, faster method to process the spec file. In this
|
||||
+ mode, rpmbuild is told to generate a working tree directly in the
|
||||
+ target directory. If the input is a series file, it is assumed that
|
||||
+ all archives have been extracted manually beforehand.
|
||||
"
|
||||
exit 0
|
||||
else
|
||||
@@ -146,7 +157,7 @@ Initializes a source tree from an rpm sp
|
||||
fi
|
||||
}
|
||||
|
||||
-options=`getopt -o d:vh --long sourcedir:,fuzz: -- "$@"`
|
||||
+options=`getopt -o d:vh --long sourcedir:,fuzz:,slow,fast -- "$@"`
|
||||
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
@@ -175,6 +186,12 @@ do
|
||||
--fuzz)
|
||||
opt_fuzz="--fuzz $2"
|
||||
shift 2 ;;
|
||||
+ --slow)
|
||||
+ opt_fast=
|
||||
+ shift ;;
|
||||
+ --fast)
|
||||
+ opt_fast=1
|
||||
+ shift ;;
|
||||
--)
|
||||
shift
|
||||
break ;;
|
||||
@@ -208,8 +225,24 @@ case "$1" in
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- if ! $QUILT_DIR/scripts/inspect $verbose $opt_sourcedir $opt_fuzz \
|
||||
- "$spec_file" 2>&1 > $tmpfile
|
||||
+ if [ -n "$opt_fast" ]
|
||||
+ then
|
||||
+ if [ "${prefix:0:1}" = / ]
|
||||
+ then
|
||||
+ targetdir=$prefix
|
||||
+ else
|
||||
+ targetdir=$PWD/$prefix
|
||||
+ fi
|
||||
+
|
||||
+ $QUILT_DIR/scripts/inspect $verbose $opt_sourcedir $opt_fuzz \
|
||||
+ --targetdir "$targetdir" \
|
||||
+ "$spec_file" 2>&1 > $tmpfile
|
||||
+ else
|
||||
+ $QUILT_DIR/scripts/inspect $verbose $opt_sourcedir $opt_fuzz \
|
||||
+ "$spec_file" 2>&1 > $tmpfile
|
||||
+ fi
|
||||
+
|
||||
+ if [ $? -ne 0 ]
|
||||
then
|
||||
printf $"The %%prep section of %s failed; results may be incomplete\n" "$spec_file"
|
||||
if [ -z "$verbose" ]
|
||||
@@ -257,8 +290,10 @@ case "$1" in
|
||||
esac
|
||||
|
||||
# Make sure that unpacking will not overwrite anything
|
||||
+[ -n "$opt_fast" ] || \
|
||||
check_for_existing_directories || exit 1
|
||||
|
||||
+[ -n "$opt_fast" ] || \
|
||||
while read tag dir arg1 arg2
|
||||
do
|
||||
case "$tag" in
|
@ -1,27 +0,0 @@
|
||||
From: Jean Delvare <jdelvare@suse.de>
|
||||
Date: Tue, 20 Jan 2015 20:54:54 +0100
|
||||
Subject: setup: Let normalize_path deal with "."
|
||||
Upstream: Committed (3fd706a50b7dbb4f8db6e5db014729db51e6beb0)
|
||||
|
||||
Let function normalize_path handle "." path components. Otherwise
|
||||
invocations like "quilt setup --sourcedir=. foo.spec" may produce
|
||||
invalid series files, and "quilt setup -d ./dir foo.spec"
|
||||
generates a broken "patches" link.
|
||||
|
||||
diff --git a/quilt/setup.in b/quilt/setup.in
|
||||
index df76368..7f69f35 100644
|
||||
--- a/quilt/setup.in
|
||||
+++ b/quilt/setup.in
|
||||
@@ -71,10 +71,11 @@ check_for_existing_files()
|
||||
return $status
|
||||
}
|
||||
|
||||
-# Resolve ".." in path and clean up double slashes
|
||||
+# Resolve ".." in path and clean up double slashes and "."
|
||||
normalize_path()
|
||||
{
|
||||
echo "$1" | sed -r -e 's://:/:g' \
|
||||
+ -e 's:/./:/:g' \
|
||||
-e ':again' \
|
||||
-e 's:/[^/]+/\.\.(/|$):\1:g' \
|
||||
-e 'tagain'
|
@ -1,22 +0,0 @@
|
||||
From: Jean Delvare <jdelvare@suse.de>
|
||||
Date: Sat, 24 Jan 2015 21:32:04 +0100
|
||||
Subject: setup: Fix link creation
|
||||
Upstream: Committed (c55c1993ffee5d137ff40fcab0f59520ddcb00bf)
|
||||
|
||||
Fix funtion create_symlink. If the link has an absolute path then its
|
||||
target should be set to an absolute path as well. This fixes the use
|
||||
of "quilt setup" with an absolute -d path and a relative --sourcedir
|
||||
path.
|
||||
|
||||
diff --git a/quilt/setup.in b/quilt/setup.in
|
||||
index 7f69f35..ddb1f00 100644
|
||||
--- a/quilt/setup.in
|
||||
+++ b/quilt/setup.in
|
||||
@@ -86,6 +86,7 @@ create_symlink()
|
||||
local target=$1 link=$2 up
|
||||
if [ "${target:0:1}" = / -o "${link:0:1}" = / ]
|
||||
then
|
||||
+ [ "${target:0:1}" = / ] || target=$PWD/$target
|
||||
ln -s "$target" "$link"
|
||||
return
|
||||
fi
|
@ -1,27 +0,0 @@
|
||||
From: Jean Delvare <jdelvare@suse.de>
|
||||
Subject: setup: Fix removal of "." components in normalize_path
|
||||
Upstream: Submitted (2015-02-03)
|
||||
|
||||
The code was broken in 3 ways:
|
||||
* I forgot to escape the "." so it would match any character.
|
||||
* The g flag is not enough to catch consecutive "." components,
|
||||
because pattern matches can't overlap.
|
||||
* A trailing "." component would not be removed.
|
||||
|
||||
This fixes commit 3fd706a50b7dbb4f8db6e5db014729db51e6beb0
|
||||
("setup: Let normalize_path deal with "."".)
|
||||
---
|
||||
quilt/setup.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/quilt/setup.in
|
||||
+++ b/quilt/setup.in
|
||||
@@ -75,7 +75,7 @@ check_for_existing_files()
|
||||
normalize_path()
|
||||
{
|
||||
echo "$1" | sed -r -e 's://:/:g' \
|
||||
- -e 's:/./:/:g' \
|
||||
+ -e 's:/\.(/\.)*(/|$):\2:g' \
|
||||
-e ':again' \
|
||||
-e 's:/[^/]+/\.\.(/|$):\1:g' \
|
||||
-e 'tagain'
|
@ -1,25 +0,0 @@
|
||||
From: Jean Delvare <jdelvare@suse.de>
|
||||
Subject: setup: Fix a corner case in create_symlink
|
||||
Upstream: Submitted (2015-02-03)
|
||||
References: boo#916007
|
||||
|
||||
When a link's target is the directory it lives in, create_symlink
|
||||
would erroneously link to "..". Fix the code to properly link to "."
|
||||
instead.
|
||||
|
||||
Credits to Robert Milasan for spotting the bug.
|
||||
---
|
||||
quilt/setup.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/quilt/setup.in
|
||||
+++ b/quilt/setup.in
|
||||
@@ -97,7 +97,7 @@ create_symlink()
|
||||
do
|
||||
set -- "${1#*/}" "${2#*/}"
|
||||
done
|
||||
- up=$(echo "${2%/*}" | sed -re 's:[^/]+:..:g')
|
||||
+ up=$(echo "$2" | sed -r -e 's:(^|/)[^/]*$::' -e 's:[^/]+:..:g')
|
||||
set -- "${up:+$up/}$1"
|
||||
set -- "${1%/}"
|
||||
ln -s "${1:-.}" "$link"
|
@ -1,24 +0,0 @@
|
||||
From: Jean Delvare <jdelvare@suse.de>
|
||||
Subject: inspect: Skip version check
|
||||
Upstream: Committed (6a5fcdc24dc47419da4cd688fe7fbfa189c91976)
|
||||
|
||||
Commit a626fcf8b95f2ff51701a00d65043b9f65207514 (setup: Skip version
|
||||
check) is insufficient for spec file-based setup commands. inspect
|
||||
itself also sources patchfns, so it must also skip the version check
|
||||
explicitly.
|
||||
---
|
||||
quilt/scripts/inspect.in | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
--- a/quilt/scripts/inspect.in
|
||||
+++ b/quilt/scripts/inspect.in
|
||||
@@ -8,6 +8,9 @@
|
||||
|
||||
: ${QUILT_DIR=@QUILT_DIR@}
|
||||
|
||||
+# Version check is irrelevant to this script.
|
||||
+skip_version_check=1
|
||||
+
|
||||
if ! [ -r $QUILT_DIR/scripts/patchfns ]
|
||||
then
|
||||
echo "Cannot read library $QUILT_DIR/scripts/patchfns" >&2
|
@ -1,89 +0,0 @@
|
||||
From: Jean Delvare <jdelvare@suse.de>
|
||||
Subject: pop: Add --refresh option
|
||||
Upstream: Committed (7189482be1393c7b9e6170410d820f1867e8ec93)
|
||||
|
||||
Add an option to automatically refresh each patch before it gets
|
||||
unapplied.
|
||||
---
|
||||
quilt/pop.in | 11 +++++++++--
|
||||
test/auto-refresh.test | 27 +++++++++++++++++++++++++++
|
||||
2 files changed, 36 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/quilt/pop.in
|
||||
+++ b/quilt/pop.in
|
||||
@@ -19,7 +19,7 @@ fi
|
||||
|
||||
usage()
|
||||
{
|
||||
- printf $"Usage: quilt pop [-afRqv] [num|patch]\n"
|
||||
+ printf $"Usage: quilt pop [-afRqv] [--refresh] [num|patch]\n"
|
||||
if [ x$1 = x-h ]
|
||||
then
|
||||
printf $"
|
||||
@@ -41,6 +41,9 @@ completion can be used.
|
||||
-q Quiet operation.
|
||||
|
||||
-v Verbose operation.
|
||||
+
|
||||
+--refresh
|
||||
+ Automatically refresh every patch before it gets unapplied.
|
||||
"
|
||||
exit 0
|
||||
else
|
||||
@@ -163,7 +166,7 @@ remove_patch()
|
||||
return $status
|
||||
}
|
||||
|
||||
-options=`getopt -o fRqvah -- "$@"`
|
||||
+options=`getopt -o fRqvah --long refresh -- "$@"`
|
||||
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
@@ -194,6 +197,9 @@ do
|
||||
shift ;;
|
||||
-h)
|
||||
usage -h ;;
|
||||
+ --refresh)
|
||||
+ opt_refresh=1
|
||||
+ shift ;;
|
||||
--)
|
||||
shift
|
||||
break ;;
|
||||
@@ -239,6 +245,7 @@ fi
|
||||
|
||||
for patch in $patches
|
||||
do
|
||||
+ [ -z "$opt_refresh" ] || quilt_command refresh $QUILT_REFRESH_ARGS
|
||||
if ! remove_patch "$patch"
|
||||
then
|
||||
exit 1
|
||||
--- /dev/null
|
||||
+++ b/test/auto-refresh.test
|
||||
@@ -0,0 +1,27 @@
|
||||
+$ mkdir patches
|
||||
+
|
||||
+$ echo a > a
|
||||
+$ echo b > b
|
||||
+
|
||||
+$ quilt new a.patch
|
||||
+> Patch patches/a.patch is now on top
|
||||
+$ quilt add a
|
||||
+> File a added to patch patches/a.patch
|
||||
+$ echo A > a
|
||||
+
|
||||
+$ quilt new b.patch
|
||||
+> Patch patches/b.patch is now on top
|
||||
+$ quilt add b
|
||||
+> File b added to patch patches/b.patch
|
||||
+$ echo B > b
|
||||
+
|
||||
+$ quilt pop -a --refresh
|
||||
+> Refreshed patch patches/b.patch
|
||||
+> Removing patch patches/b.patch
|
||||
+> Restoring b
|
||||
+>
|
||||
+> Refreshed patch patches/a.patch
|
||||
+> Removing patch patches/a.patch
|
||||
+> Restoring a
|
||||
+>
|
||||
+> No patches applied
|
@ -1,87 +0,0 @@
|
||||
From: Jean Delvare <jdelvare@suse.de>
|
||||
Subject: push: Add --refresh option
|
||||
Upstream: Committed (a6987289e594d5bf0492fce7067723bc2ceb2cfc)
|
||||
|
||||
Add an option to automatically refresh each patch after is was
|
||||
successfully applied.
|
||||
---
|
||||
quilt/push.in | 11 +++++++++--
|
||||
test/auto-refresh.test | 22 ++++++++++++++++++++++
|
||||
2 files changed, 31 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/quilt/push.in
|
||||
+++ b/quilt/push.in
|
||||
@@ -21,7 +21,7 @@ setup_colors
|
||||
|
||||
usage()
|
||||
{
|
||||
- printf $"Usage: quilt push [-afqv] [--merge[=merge|diff3]] [--leave-rejects] [--color[=always|auto|never]] [num|patch]\n"
|
||||
+ printf $"Usage: quilt push [-afqv] [--merge[=merge|diff3]] [--leave-rejects] [--color[=always|auto|never]] [--refresh] [num|patch]\n"
|
||||
if [ x$1 = x-h ]
|
||||
then
|
||||
printf $"
|
||||
@@ -53,6 +53,9 @@ be used.
|
||||
|
||||
--color[=always|auto|never]
|
||||
Use syntax coloring (auto activates it only if the output is a tty).
|
||||
+
|
||||
+--refresh
|
||||
+ Automatically refresh every patch after it was successfully applied.
|
||||
"
|
||||
exit 0
|
||||
else
|
||||
@@ -294,7 +297,7 @@ check_duplicate_patches()
|
||||
return 1
|
||||
}
|
||||
|
||||
-options=`getopt -o fqvam::h --long fuzz:,merge::,leave-rejects,color:: -- "$@"`
|
||||
+options=`getopt -o fqvam::h --long fuzz:,merge::,leave-rejects,color::,refresh -- "$@"`
|
||||
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
@@ -352,6 +355,9 @@ do
|
||||
usage ;;
|
||||
esac
|
||||
shift 2 ;;
|
||||
+ --refresh)
|
||||
+ opt_refresh=1
|
||||
+ shift ;;
|
||||
--)
|
||||
shift
|
||||
break ;;
|
||||
@@ -412,6 +418,7 @@ do
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
+ [ -z "$opt_refresh" ] || quilt_command refresh $QUILT_REFRESH_ARGS
|
||||
[ -n "$opt_quiet" ] || echo
|
||||
done \
|
||||
| cleanup_patch_output \
|
||||
--- a/test/auto-refresh.test
|
||||
+++ b/test/auto-refresh.test
|
||||
@@ -25,3 +25,25 @@ $ quilt pop -a --refresh
|
||||
> Restoring a
|
||||
>
|
||||
> No patches applied
|
||||
+
|
||||
+$ quilt push -a --refresh
|
||||
+> Applying patch patches/a.patch
|
||||
+> patching file a
|
||||
+> Patch patches/a.patch is unchanged
|
||||
+>
|
||||
+> Applying patch patches/b.patch
|
||||
+> patching file b
|
||||
+> Patch patches/b.patch is unchanged
|
||||
+>
|
||||
+> Now at patch patches/b.patch
|
||||
+
|
||||
+$ quilt pop -a --refresh
|
||||
+> Patch patches/b.patch is unchanged
|
||||
+> Removing patch patches/b.patch
|
||||
+> Restoring b
|
||||
+>
|
||||
+> Patch patches/a.patch is unchanged
|
||||
+> Removing patch patches/a.patch
|
||||
+> Restoring a
|
||||
+>
|
||||
+> No patches applied
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:79ee1884720bc23456fd9943c1cf990b2f1460e46b41ed26b747399c91602b0f
|
||||
size 342022
|
3
quilt-0.64.tar.bz2
Normal file
3
quilt-0.64.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c325fda0945bae48de8647f214cf125cdfcf056771798593ccfca9c101fb8bb3
|
||||
size 354564
|
@ -1,88 +0,0 @@
|
||||
From: Jean Delvare <jdelvare@suse.de>
|
||||
Subject: pop: Rearm consistency check if needed
|
||||
Upstream: Committed (b42985c9b2a5f8329ad393842487c4142951818e)
|
||||
|
||||
If the series file is inconsistent, "quilt pop" will disable the
|
||||
consistency check as it updates the timestamp of the database file.
|
||||
It's OK if all patches are popped. If not then the series file may
|
||||
still be inconsistent. In that case, we want to update the timestamp
|
||||
of the series file, to rearm the consistency check.
|
||||
---
|
||||
quilt/pop.in | 9 +++++++++
|
||||
test/altered-series.test | 23 +++++++++++++++++------
|
||||
2 files changed, 26 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/quilt/pop.in
|
||||
+++ b/quilt/pop.in
|
||||
@@ -243,6 +243,13 @@ then
|
||||
exit 2
|
||||
fi
|
||||
|
||||
+# We will update the list of applied patches, which in turn will disable the
|
||||
+# consistency check. Enable it again if needed.
|
||||
+if [ -z "$opt_all" -a ! "$DB" -nt "$SERIES" ] && ! consistency_check
|
||||
+then
|
||||
+ rearm_check=1
|
||||
+fi
|
||||
+
|
||||
for patch in $patches
|
||||
do
|
||||
[ -z "$opt_refresh" ] || quilt_command refresh $QUILT_REFRESH_ARGS
|
||||
@@ -264,6 +271,8 @@ else
|
||||
# corner cases such as files added to a patch but not modified.
|
||||
$QUILT_DIR/scripts/backup-files -L -s -B "$QUILT_PC/$patch/" -
|
||||
printf $"Now at patch %s\n" "$(print_patch "$patch")"
|
||||
+
|
||||
+ [ -z "$rearm_check" ] || touch "$SERIES"
|
||||
fi
|
||||
### Local Variables:
|
||||
### mode: shell-script
|
||||
--- a/test/altered-series.test
|
||||
+++ b/test/altered-series.test
|
||||
@@ -6,22 +6,24 @@ $ cat > patches/series
|
||||
< 02.patch
|
||||
< 03.patch
|
||||
|
||||
-$ quilt push -q
|
||||
+$ quilt push -q 2
|
||||
> Applying patch patches/01.patch
|
||||
> Patch patches/01.patch does not exist; applied empty patch
|
||||
-> Now at patch patches/01.patch
|
||||
+> Applying patch patches/02.patch
|
||||
+> Patch patches/02.patch does not exist; applied empty patch
|
||||
+> Now at patch patches/02.patch
|
||||
|
||||
$ quilt series -v
|
||||
-> = patches/01.patch
|
||||
-> patches/02.patch
|
||||
+> + patches/01.patch
|
||||
+> = patches/02.patch
|
||||
> patches/03.patch
|
||||
|
||||
# Touch the series file but preserve the order -> OK
|
||||
$ touch patches/series
|
||||
|
||||
$ quilt series -v
|
||||
-> = patches/01.patch
|
||||
-> patches/02.patch
|
||||
+> + patches/01.patch
|
||||
+> = patches/02.patch
|
||||
> patches/03.patch
|
||||
|
||||
# Change the order of the patch series -> complain
|
||||
@@ -33,6 +35,15 @@ $ cat > patches/series
|
||||
$ quilt series -v
|
||||
> The series file no longer matches the applied patches. Please run 'quilt pop -a'.
|
||||
|
||||
+$ quilt pop
|
||||
+> Patch patches/02.patch appears to be empty, removing
|
||||
+>
|
||||
+> Now at patch patches/01.patch
|
||||
+
|
||||
+# That wasn't enough, keep complaining
|
||||
+$ quilt series -v
|
||||
+> The series file no longer matches the applied patches. Please run 'quilt pop -a'.
|
||||
+
|
||||
$ quilt pop -a
|
||||
> Patch patches/01.patch appears to be empty, removing
|
||||
>
|
@ -1,139 +0,0 @@
|
||||
From: Jean Delvare <jdelvare@suse.de>
|
||||
Subject: Check for series file consistency
|
||||
Upstream: Committed (54268c1aab28ce763ec028982bf54236488dacc5)
|
||||
|
||||
Quilt allows manual changes to the series file to some degree. For
|
||||
example, adding comments or reordering patches in the unapplied
|
||||
section of the series file is OK. However, changing the order of
|
||||
applied patches breaks a number of assumptions and can cause quilt to
|
||||
produce unexpected or confusing results.
|
||||
|
||||
For example, starting from this:
|
||||
|
||||
+ patches/01.patch
|
||||
= patches/02.patch
|
||||
patches/03.patch
|
||||
patches/04.patch
|
||||
|
||||
and moving the last patch at the beginning of the series file,
|
||||
"quilt series -v" will print:
|
||||
|
||||
+ patches/04.patch
|
||||
+ patches/01.patch
|
||||
= patches/02.patch
|
||||
patches/03.patch
|
||||
|
||||
That is, it will claim that 04.patch is applied, while it it not.
|
||||
Likewise, 04.patch would be listed by neither "quilt applied" nor
|
||||
"quilt unapplied".
|
||||
|
||||
While addressing all such cases would certainly be possible, that
|
||||
would require a significant amount of work, and would come with
|
||||
performance penalties. It would also be difficult to be certain that
|
||||
all issues have been found and addressed. So it seems more reasonable
|
||||
to simply spot such manual changes to the series file and ask the user
|
||||
to pop all patches to start from a clean state as needed.
|
||||
---
|
||||
quilt/scripts/patchfns.in | 35 ++++++++++++++++++++++++++++++++---
|
||||
test/altered-series.test | 44 ++++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 76 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/quilt/scripts/patchfns.in
|
||||
+++ b/quilt/scripts/patchfns.in
|
||||
@@ -948,6 +948,24 @@ version_check()
|
||||
return 1
|
||||
}
|
||||
|
||||
+consistency_check()
|
||||
+{
|
||||
+ local top applied patches
|
||||
+
|
||||
+ top=$(top_patch)
|
||||
+ applied=$(applied_before "$top")
|
||||
+ patches=$(patches_before "$top")
|
||||
+
|
||||
+ if [ "$applied" != "$patches" ]
|
||||
+ then
|
||||
+ return 1
|
||||
+ else
|
||||
+ # Skip check until series file is modified again
|
||||
+ touch "$DB"
|
||||
+ return 0
|
||||
+ fi
|
||||
+}
|
||||
+
|
||||
print_patch()
|
||||
{
|
||||
echo "${QUILT_PATCHES_PREFIX:+$SUBDIR_DOWN$QUILT_PATCHES/}$1"
|
||||
@@ -1094,10 +1112,21 @@ fi
|
||||
|
||||
DB="$QUILT_PC/applied-patches"
|
||||
|
||||
-if [ -z "$skip_version_check" ] && ! version_check
|
||||
+if [ -z "$skip_version_check" ]
|
||||
then
|
||||
- printf $"The working tree was created by an older version of quilt. Please run 'quilt upgrade'.\n" >&2
|
||||
- exit 1
|
||||
+ if ! version_check
|
||||
+ then
|
||||
+ printf $"The working tree was created by an older version of quilt. Please run 'quilt upgrade'.\n" >&2
|
||||
+ exit 1
|
||||
+ fi
|
||||
+
|
||||
+ # Check if series file was modified manually, and if this is the case,
|
||||
+ # make sure it is still consistent with the applied patches
|
||||
+ if [ -s "$DB" -a ! "$DB" -nt "$SERIES" ] && [ "$QUILT_COMMAND" != pop ] && ! consistency_check
|
||||
+ then
|
||||
+ printf $"The series file no longer matches the applied patches. Please run 'quilt pop -a'.\n" >&2
|
||||
+ exit 1
|
||||
+ fi
|
||||
fi
|
||||
### Local Variables:
|
||||
### mode: shell-script
|
||||
--- /dev/null
|
||||
+++ b/test/altered-series.test
|
||||
@@ -0,0 +1,44 @@
|
||||
+# Check that manual changes to the series file are detected
|
||||
+
|
||||
+$ mkdir patches
|
||||
+$ cat > patches/series
|
||||
+< 01.patch
|
||||
+< 02.patch
|
||||
+< 03.patch
|
||||
+
|
||||
+$ quilt push -q
|
||||
+> Applying patch patches/01.patch
|
||||
+> Patch patches/01.patch does not exist; applied empty patch
|
||||
+> Now at patch patches/01.patch
|
||||
+
|
||||
+$ quilt series -v
|
||||
+> = patches/01.patch
|
||||
+> patches/02.patch
|
||||
+> patches/03.patch
|
||||
+
|
||||
+# Touch the series file but preserve the order -> OK
|
||||
+$ touch patches/series
|
||||
+
|
||||
+$ quilt series -v
|
||||
+> = patches/01.patch
|
||||
+> patches/02.patch
|
||||
+> patches/03.patch
|
||||
+
|
||||
+# Change the order of the patch series -> complain
|
||||
+$ cat > patches/series
|
||||
+< 03.patch
|
||||
+< 01.patch
|
||||
+< 02.patch
|
||||
+
|
||||
+$ quilt series -v
|
||||
+> The series file no longer matches the applied patches. Please run 'quilt pop -a'.
|
||||
+
|
||||
+$ quilt pop -a
|
||||
+> Patch patches/01.patch appears to be empty, removing
|
||||
+>
|
||||
+> No patches applied
|
||||
+
|
||||
+$ quilt series -v
|
||||
+> patches/03.patch
|
||||
+> patches/01.patch
|
||||
+> patches/02.patch
|
@ -1,22 +0,0 @@
|
||||
From: Leonid Movshovich <event.riga@gmail.com>
|
||||
Date: Sun, 18 Jan 2015 10:04:56 +0100
|
||||
Subject: quilt-el: Fix patch select completion
|
||||
Upstream: Committed (88decf920d2741ab4411f75827ce72beb0dc6995)
|
||||
|
||||
A typo in quilt-patch-list prevents patch select completion operation.
|
||||
|
||||
Reviewed and tested by Satoru Takeuchi.
|
||||
|
||||
diff --git a/lib/quilt.el b/lib/quilt.el
|
||||
index 0a57b05..be359e5 100644
|
||||
--- a/lib/quilt.el
|
||||
+++ b/lib/quilt.el
|
||||
@@ -126,7 +126,7 @@
|
||||
|
||||
(defun quilt-patch-list ()
|
||||
"Return the list of the name of patches."
|
||||
- (quilt-cmd-to-list "seriess"))
|
||||
+ (quilt-cmd-to-list "series"))
|
||||
|
||||
(defun quilt-files-affected (&optional first last)
|
||||
"Return the file names which modified from FIRST to LAST."
|
@ -1,32 +0,0 @@
|
||||
From: Leonid Movshovich <event.riga@gmail.com>
|
||||
Date: Sun, 18 Jan 2015 10:04:52 +0100
|
||||
Subject: quilt-el: Fix tramp support
|
||||
Upstream: Committed (7be8f49a95a528e4c46df0cfe26877457c95ac0e)
|
||||
|
||||
quilt-find-dir goes to endless recursion if root is not '/'. This
|
||||
holds for files opened with tramp for example.
|
||||
|
||||
Reviewed and tested by Satoru Takeuchi.
|
||||
|
||||
diff --git a/lib/quilt.el b/lib/quilt.el
|
||||
index 6fe1c32..0a57b05 100644
|
||||
--- a/lib/quilt.el
|
||||
+++ b/lib/quilt.el
|
||||
@@ -45,14 +45,14 @@
|
||||
(or (getenv "QUILT_PATCHES")
|
||||
"patches")))
|
||||
|
||||
-(defun quilt-find-dir (fn)
|
||||
+(defun quilt-find-dir (fn &optional prefn)
|
||||
"Return the top level dir of quilt from FN."
|
||||
- (if (or (not fn) (equal fn "/"))
|
||||
+ (if (or (not fn) (equal fn "/") (equal fn prefn))
|
||||
nil
|
||||
(let ((d (file-name-directory fn)))
|
||||
(if (file-accessible-directory-p (concat d "/.pc"))
|
||||
d
|
||||
- (quilt-find-dir (directory-file-name d))))))
|
||||
+ (quilt-find-dir (directory-file-name d) d)))))
|
||||
|
||||
(defun quilt-dir (&optional fn)
|
||||
"Return the top level dir of quilt from FN. FN is just a hint and find from other way if FN is nil."
|
@ -1,24 +0,0 @@
|
||||
From: Jean Delvare <jdelvare@suse.de>
|
||||
Subject: Allow patch format options to pass through
|
||||
Upstream: Committed (5fd023e14932bd01dbd5cbd6636a7ea5531c5d40)
|
||||
|
||||
In order to make "quilt_command refresh" work properly, we must ensure
|
||||
that format options are passed through.
|
||||
---
|
||||
quilt/scripts/patchfns.in | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
--- a/quilt/scripts/patchfns.in
|
||||
+++ b/quilt/scripts/patchfns.in
|
||||
@@ -976,6 +976,11 @@ quilt_command()
|
||||
local command=$1
|
||||
shift
|
||||
|
||||
+ # Refreshing here must produce the same output as "quilt refresh" on
|
||||
+ # the command line
|
||||
+ export QUILT_NO_DIFF_INDEX
|
||||
+ export QUILT_NO_DIFF_TIMESTAMPS
|
||||
+
|
||||
QUILT_COMMAND="" bash $BASH_OPTS -c "${SUBDIR:+cd $SUBDIR;} . $QUILT_DIR/$command" "quilt $command" "$@"
|
||||
}
|
||||
|
@ -1,3 +1,44 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 16 15:43:04 CET 2015 - jdelvare@suse.de
|
||||
|
||||
- Update to version 0.64:
|
||||
o Performance: Several optimizations
|
||||
o Test suite: Several fixes and coverage improvements
|
||||
o Test suite: Run the tests in predictable order
|
||||
o files: Add support for unapplied patches
|
||||
o graph: Check for graphviz availability
|
||||
o mail: Remove procmail dependency
|
||||
o push: Do not use interactive mode with -f
|
||||
o Obsoletes dont-substitute-release.patch
|
||||
o Obsoletes hackweek-11-01-comment-update.patch
|
||||
o Obsoletes hackweek-11-02-cleanups.patch
|
||||
o Obsoletes hackweek-11-03-inspect-list-all-options.patch
|
||||
o Obsoletes hackweek-11-04-pass-through.patch
|
||||
o Obsoletes hackweek-11-05-no-explicit-rm.patch
|
||||
o Obsoletes hackweek-11-06-exclude-from-md5sums.patch
|
||||
o Obsoletes hackweek-11-07-normalize-path.patch
|
||||
o Obsoletes hackweek-11-08-inspect-split-wrapper-script.patch
|
||||
o Obsoletes hackweek-11-09-inspect-temporary-data-file.patch
|
||||
o Obsoletes hackweek-11-10-setup-fix-path-to-extra-patches.patch
|
||||
o Obsoletes hackweek-11-11-setup-trace-call-first.patch
|
||||
o Obsoletes hackweek-11-12-setup-alternative-implementation-v2.patch
|
||||
o Obsoletes hackweek-11-13-setup-let-normalize_path-deal-with-dot.patch
|
||||
o Obsoletes hackweek-11-14-setup-fix-link-creation.patch
|
||||
o Obsoletes hackweek-11-15-setup-missing-escape-in-normalize_path.patch
|
||||
o Obsoletes hackweek-11-16-setup-fix-create_symlink-corner-case.patch
|
||||
o Obsoletes inspect-skip-version-check.patch
|
||||
o Obsoletes pop-add-auto-refresh.patch
|
||||
o Obsoletes push-add-auto-refresh.patch
|
||||
o Obsoletes quilt-check-modified-series-rearm.patch
|
||||
o Obsoletes quilt-check-modified-series.patch
|
||||
o Obsoletes quilt-el-fix-patch-select-completion.patch
|
||||
o Obsoletes quilt-el-fix-tramp-support.patch
|
||||
o Obsoletes quilt-format-options-pass-through.patch
|
||||
o Obsoletes setup-check-for-rpmbuild.patch
|
||||
o Obsoletes setup-fix-tar-with-long-options.patch
|
||||
o Obsoletes setup-skip-version-check.patch
|
||||
- Refresh suse-workaround-pseudo-release.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 4 08:52:03 CET 2015 - jdelvare@suse.de
|
||||
|
||||
|
58
quilt.spec
58
quilt.spec
@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
Name: quilt
|
||||
Version: 0.63
|
||||
Version: 0.64
|
||||
Release: 0
|
||||
Summary: A Tool for Working with Many Patches
|
||||
License: GPL-2.0+
|
||||
@ -43,34 +43,6 @@ Patch1: expand.diff
|
||||
Patch2: quilt-support-vimdiff.patch
|
||||
Patch3: patch-wrapper-rpm.diff
|
||||
Patch4: suse-workaround-pseudo-release.patch
|
||||
Patch5: setup-skip-version-check.patch
|
||||
Patch6: setup-check-for-rpmbuild.patch
|
||||
Patch7: setup-fix-tar-with-long-options.patch
|
||||
Patch8: quilt-format-options-pass-through.patch
|
||||
Patch9: pop-add-auto-refresh.patch
|
||||
Patch10: push-add-auto-refresh.patch
|
||||
Patch11: inspect-skip-version-check.patch
|
||||
Patch12: quilt-check-modified-series.patch
|
||||
Patch13: quilt-check-modified-series-rearm.patch
|
||||
Patch14: quilt-el-fix-tramp-support.patch
|
||||
Patch15: quilt-el-fix-patch-select-completion.patch
|
||||
Patch16: dont-substitute-release.patch
|
||||
Patch61: hackweek-11-01-comment-update.patch
|
||||
Patch62: hackweek-11-02-cleanups.patch
|
||||
Patch63: hackweek-11-03-inspect-list-all-options.patch
|
||||
Patch64: hackweek-11-04-pass-through.patch
|
||||
Patch65: hackweek-11-05-no-explicit-rm.patch
|
||||
Patch66: hackweek-11-06-exclude-from-md5sums.patch
|
||||
Patch67: hackweek-11-07-normalize-path.patch
|
||||
Patch68: hackweek-11-08-inspect-split-wrapper-script.patch
|
||||
Patch69: hackweek-11-09-inspect-temporary-data-file.patch
|
||||
Patch70: hackweek-11-10-setup-fix-path-to-extra-patches.patch
|
||||
Patch71: hackweek-11-11-setup-trace-call-first.patch
|
||||
Patch72: hackweek-11-12-setup-alternative-implementation-v2.patch
|
||||
Patch73: hackweek-11-13-setup-let-normalize_path-deal-with-dot.patch
|
||||
Patch74: hackweek-11-14-setup-fix-link-creation.patch
|
||||
Patch75: hackweek-11-15-setup-missing-escape-in-normalize_path.patch
|
||||
Patch76: hackweek-11-16-setup-fix-create_symlink-corner-case.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildArch: noarch
|
||||
%if 0%{?suse_version}
|
||||
@ -96,34 +68,6 @@ http://www.zip.com.au/~akpm/linux/patches/.
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
%patch13 -p1
|
||||
%patch14 -p1
|
||||
%patch15 -p1
|
||||
%patch16 -p1
|
||||
%patch61 -p1
|
||||
%patch62 -p1
|
||||
%patch63 -p1
|
||||
%patch64 -p1
|
||||
%patch65 -p1
|
||||
%patch66 -p1
|
||||
%patch67 -p1
|
||||
%patch68 -p1
|
||||
%patch69 -p1
|
||||
%patch70 -p1
|
||||
%patch71 -p1
|
||||
%patch72 -p1
|
||||
%patch73 -p1
|
||||
%patch74 -p1
|
||||
%patch75 -p1
|
||||
%patch76 -p1
|
||||
|
||||
%build
|
||||
# --with-rpmbuild=/usr/lib/rpm/rpmb:
|
||||
|
@ -1,28 +0,0 @@
|
||||
From: Jean Delvare <jdelvare@suse.de>
|
||||
Subject: setup: Check for rpmbuild availability
|
||||
References: bnc#873817
|
||||
Upstream: Committed (bf8bc1cfc097ab7692d2ce41a9933ea3b0d9e5e7)
|
||||
|
||||
Before running inspect on a spec file, verify that rpmbuild is
|
||||
available. Print a user-friendly error message if not.
|
||||
---
|
||||
quilt/setup.in | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
--- a/quilt/setup.in
|
||||
+++ b/quilt/setup.in
|
||||
@@ -173,6 +173,14 @@ case "$1" in
|
||||
*.spec)
|
||||
spec_file=$1
|
||||
|
||||
+ # check if rpmbuild is installed before running inspect
|
||||
+ if ! type rpmbuild &> /dev/null
|
||||
+ then
|
||||
+ printf $"You have to install '%s' (from package %s) to use 'quilt %s'\n" \
|
||||
+ rpmbuild rpm-build setup >&2
|
||||
+ exit 1
|
||||
+ fi
|
||||
+
|
||||
if ! $QUILT_DIR/scripts/inspect $verbose $opt_sourcedir $opt_fuzz \
|
||||
"$spec_file" 2>&1 > $tmpfile
|
||||
then
|
@ -1,87 +0,0 @@
|
||||
From: Jean Delvare <jdelvare@suse.de>
|
||||
Subject: inspect: Handle long options passed to tar
|
||||
Upstream: Committed (1e9f433f693b4ee09ebf3267222b11694448e81f)
|
||||
|
||||
The command line interface to tar is complex and sometimes confusing,
|
||||
but we should still do our best to figure out where the file name is
|
||||
on that command line.
|
||||
|
||||
Add support for the --file FILE and --file=FILE options. Other long
|
||||
options must be explicitly skipped, as well as short options not
|
||||
containing the letter "f".
|
||||
|
||||
With this we should be good to go in most real-world cases, but
|
||||
there are still a few corner cases we may not handle properly. Let's
|
||||
just hope we never hit them.
|
||||
|
||||
Reported by Petr Tesarik.
|
||||
---
|
||||
Changes since v1:
|
||||
* Fix an endless loop when trying to parse options "x --file file".
|
||||
* On "-xC software -f file", the previous code would extract "-f" as
|
||||
the file name, instead of "file".
|
||||
|
||||
quilt/scripts/inspect.in | 45 +++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 45 insertions(+)
|
||||
|
||||
--- a/quilt/scripts/inspect.in
|
||||
+++ b/quilt/scripts/inspect.in
|
||||
@@ -258,13 +258,58 @@ cat <<-'EOF' > $tmpdir/bin/wrapper
|
||||
tar_input_file()
|
||||
{
|
||||
case "$1" in
|
||||
+ # Modern option format
|
||||
+ -*)
|
||||
+ while [ $# -gt 0 ]; do
|
||||
+ case "$1" in
|
||||
+ # Extract the file name (long option)
|
||||
+ --file)
|
||||
+ echo "$2"
|
||||
+ return
|
||||
+ ;;
|
||||
+ --file=*)
|
||||
+ echo "${1#--file=}"
|
||||
+ return
|
||||
+ ;;
|
||||
+ # Skip other long options
|
||||
+ --*)
|
||||
+ shift
|
||||
+ ;;
|
||||
+ # Extract the file name (short option)
|
||||
+ -*f)
|
||||
+ echo "$2"
|
||||
+ return
|
||||
+ ;;
|
||||
+ -f*)
|
||||
+ echo "${1#-f}"
|
||||
+ return
|
||||
+ ;;
|
||||
+ # Skip other short options and parameters
|
||||
+ *)
|
||||
+ shift
|
||||
+ ;;
|
||||
+ esac
|
||||
+ done
|
||||
+ ;;
|
||||
+ # Legacy option format (must always come first)
|
||||
*C*f*)
|
||||
echo "$3"
|
||||
+ return
|
||||
;;
|
||||
*f*)
|
||||
echo "$2"
|
||||
+ return
|
||||
+ ;;
|
||||
+ ?*)
|
||||
+ # Eat legacy options and try again
|
||||
+ until [ $# -eq 0 -o "${1:0:1}" = "-" ]; do
|
||||
+ shift
|
||||
+ done
|
||||
+ tar_input_file "$@"
|
||||
+ return
|
||||
;;
|
||||
esac
|
||||
+ return 1
|
||||
}
|
||||
|
||||
unzip_input_file()
|
@ -1,43 +0,0 @@
|
||||
From: Jean Delvare <jdelvare@suse.de>
|
||||
Subject: setup: Skip version check
|
||||
Upstream: Committed (a626fcf8b95f2ff51701a00d65043b9f65207514)
|
||||
|
||||
The version check is irrelevant when running "quilt setup", as it is
|
||||
creating a brand new working tree anyway.
|
||||
|
||||
Reported by Petr Tesarik.
|
||||
---
|
||||
diff --git a/quilt/setup.in b/quilt/setup.in
|
||||
index 36d0d24..a90c5ad 100644
|
||||
--- a/quilt/setup.in
|
||||
+++ b/quilt/setup.in
|
||||
@@ -6,6 +6,9 @@
|
||||
#
|
||||
# See the COPYING and AUTHORS files for more details.
|
||||
|
||||
+# Version check is irrelevant to this command.
|
||||
+skip_version_check=1
|
||||
+
|
||||
# Read in library functions
|
||||
if [ "$(type -t patch_file_name)" != function ]
|
||||
then
|
||||
diff --git a/test/setup.test b/test/setup.test
|
||||
index 5a39475..69725ec 100644
|
||||
--- a/test/setup.test
|
||||
+++ b/test/setup.test
|
||||
@@ -32,6 +32,13 @@ $ quilt push -qa
|
||||
> Now at patch patches/again.diff
|
||||
$ cd ..
|
||||
$ rm -rf dir
|
||||
+
|
||||
+# Quilt setup should happily ignore patches and .pc directories
|
||||
+$ mkdir .pc patches
|
||||
+$ quilt setup series
|
||||
+> Unpacking archive dir.tar.gz
|
||||
+$ rm -rf dir .pc patches
|
||||
+
|
||||
$ quilt setup -d other series
|
||||
> Unpacking archive dir.tar.gz
|
||||
$ cd other/dir
|
||||
--
|
||||
cgit v0.9.0.2
|
@ -5,23 +5,23 @@ newer versions of rpmbuild don't like. Filter them out to make rpmbuild
|
||||
happy again. Packages in openSUSE 11.4 and later no longer need this.
|
||||
|
||||
---
|
||||
quilt/scripts/inspect.in | 8 ++++++++
|
||||
quilt/setup.in | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
--- quilt-0.51.orig/quilt/scripts/inspect.in
|
||||
+++ quilt-0.51/quilt/scripts/inspect.in
|
||||
@@ -67,6 +67,14 @@ add_exit_handler "rm -rf $tmpdir"
|
||||
mkdir -p $tmpdir/build
|
||||
mkdir -p $tmpdir/bin
|
||||
--- a/quilt/setup.in
|
||||
+++ b/quilt/setup.in
|
||||
@@ -230,6 +230,14 @@ inspect()
|
||||
mkdir -p $tmpdir/build
|
||||
fi
|
||||
|
||||
+# Older versions of Suse packages have a symbolic release number, and rpmbuild
|
||||
+# won't like that, so change it to something compliant.
|
||||
+if grep -q '^Release:.*[<>]' "$specdir/$specfile"
|
||||
+then
|
||||
+ sed -e '/^Release:/s/[<>]//g' < "$specdir/$specfile" > $tmpdir/"$specfile"
|
||||
+ specdir=$tmpdir
|
||||
+fi
|
||||
+ # Older versions of Suse packages have a symbolic release number, and
|
||||
+ # rpmbuild won't like that, so change it to something compliant.
|
||||
+ if grep -q '^Release:.*[<>]' "$specdir/$specfile"
|
||||
+ then
|
||||
+ sed -e '/^Release:/s/[<>]//g' < "$specdir/$specfile" > $tmpdir/"$specfile"
|
||||
+ specdir=$tmpdir
|
||||
+ fi
|
||||
+
|
||||
# Redirect file descriptors
|
||||
# 5 is used in verbose mode, 4 in non-verbose mode, and 2 for both (real errors)
|
||||
if [ -n "$verbose" ]
|
||||
# Redirect file descriptors
|
||||
# 5 is used in verbose mode, 4 in non-verbose mode, and 2 for both (real errors)
|
||||
if [ -n "$verbose" ]
|
||||
|
Loading…
Reference in New Issue
Block a user