diff --git a/quilt.changes b/quilt.changes index 76ac7ca..7cb27ed 100644 --- a/quilt.changes +++ b/quilt.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Sun Jun 20 22:22:41 CEST 2010 - jdelvare@suse.de + +- setup-add-fuzz-parameter.patch: Add a --fuzz parameter to quilt + setup and inspect (bnc#615073). +- setup-support-reverse-patch.patch: Handle reverted patches in + spec files (bnc#615065). + ------------------------------------------------------------------- Wed May 19 10:01:44 UTC 2010 - puzel@novell.com diff --git a/quilt.spec b/quilt.spec index af802ab..ba6a5bb 100644 --- a/quilt.spec +++ b/quilt.spec @@ -43,6 +43,8 @@ Patch8: fix-fr-import-message.diff Patch9: lzma-xz-support.patch Patch10: inspect-lzma-xz.patch Patch11: fix-patch-version-detection.patch +Patch12: setup-add-fuzz-parameter.patch +Patch13: setup-support-reverse-patch.patch Url: http://savannah.nongnu.org/projects/quilt BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -62,7 +64,7 @@ Authors: %prep %setup -q -%patch -p1 -P 1 -P 2 -P 3 -P 4 -P 5 -P 6 -P 7 -P 8 -P 9 -P 10 -P 11 +%patch -p1 -P 1 -P 2 -P 3 -P 4 -P 5 -P 6 -P 7 -P 8 -P 9 -P 10 -P 11 -P 12 -P 13 %build autoconf diff --git a/setup-add-fuzz-parameter.patch b/setup-add-fuzz-parameter.patch new file mode 100644 index 0000000..27e06ab --- /dev/null +++ b/setup-add-fuzz-parameter.patch @@ -0,0 +1,97 @@ +From: Jean Delvare +Subject: Add a --fuzz parameter to quilt setup and inspect +References: bnc#615073 + +Let quilt setup and inspect overrule the _default_patch_fuzz +setting of rpmbuild, by adding a --fuzz option to both. This is +particularly useful when working on an old source tree with a +recent version of patch which defaults to fuzz 0. +--- + quilt/scripts/inspect.in | 9 +++++++-- + quilt/setup.in | 12 +++++++++--- + 2 files changed, 16 insertions(+), 5 deletions(-) + +--- quilt-0.48.orig/quilt/scripts/inspect.in ++++ quilt-0.48/quilt/scripts/inspect.in +@@ -17,11 +17,11 @@ fi + cd ${SUBDIR:-.} + + usage() { +- echo "Usage: ${0##*/} specfile" ++ echo "Usage: ${0##*/} [--fuzz=N] specfile" + exit 1 + } + +-options=$(getopt -o v --long sourcedir: -n "${0##*/}" -- "$@") || exit ++options=$(getopt -o v --long sourcedir:,fuzz: -n "${0##*/}" -- "$@") || exit + + eval set -- "$options" + +@@ -36,6 +36,10 @@ do + --sourcedir) + sourcedir=${2%/}/ + shift 2 ;; ++ --fuzz) ++ # Only works with rpm 4.6 and later ++ DEFINE_FUZZ="%define _default_patch_fuzz $2" ++ shift 2 ;; + --) + shift + break ;; +@@ -269,6 +273,7 @@ rpmbuild --eval "%define _sourcedir $sou + --eval "%define _builddir $tmpdir/build" \ + --eval "%define __patch $tmpdir/bin/patch" \ + --eval "%define __tar $tmpdir/bin/tar" \ ++ --eval "$DEFINE_FUZZ" \ + --nodeps \ + -bp "$specdir/$specfile" < /dev/null >&2 + status=$? +--- quilt-0.48.orig/quilt/setup.in ++++ quilt-0.48/quilt/setup.in +@@ -72,7 +72,7 @@ create_symlink() { + + usage() + { +- printf $"Usage: quilt setup [-d path-prefix] [-v] [--sourcedir dir] {specfile|seriesfile}\n" ++ printf $"Usage: quilt setup [-d path-prefix] [-v] [--sourcedir dir] [--fuzz=N] {specfile|seriesfile}\n" + if [ x$1 = x-h ] + then + printf $" +@@ -84,6 +84,9 @@ Initializes a source tree from an rpm sp + Directory that contains the package sources. Defaults to \`.'. + + -v Verbose debug output. ++ ++--fuzz=N ++ Set the maximum fuzz factor (needs rpm 4.6 or later). + " + exit 0 + else +@@ -91,7 +94,7 @@ Initializes a source tree from an rpm sp + fi + } + +-options=`getopt -o d:vh --long sourcedir: -- "$@"` ++options=`getopt -o d:vh --long sourcedir:,fuzz: -- "$@"` + + if [ $? -ne 0 ] + then +@@ -117,6 +120,9 @@ do + --sourcedir) + sourcedir=${2%/}/ + shift 2 ;; ++ --fuzz) ++ opt_fuzz="--fuzz $2" ++ shift 2 ;; + --) + shift + break ;; +@@ -137,7 +143,7 @@ case "$1" in + *.spec) + spec_file=$1 + +- if ! $QUILT_DIR/scripts/inspect $verbose $opt_sourcedir \ ++ if ! $QUILT_DIR/scripts/inspect $verbose $opt_sourcedir $opt_fuzz \ + "$spec_file" 2>&1 > $tmpfile + then + printf $"The %%prep section of %s failed; results may be incomplete\n" "$spec_file" diff --git a/setup-support-reverse-patch.patch b/setup-support-reverse-patch.patch new file mode 100644 index 0000000..8d7c553 --- /dev/null +++ b/setup-support-reverse-patch.patch @@ -0,0 +1,40 @@ +From: Jean Delvare +Subject: Handle reverted patches in spec files +References: bnc#615065 + +Let inspect (and thus quilt setup) handle reversed patches +in spec files. +--- + quilt/scripts/inspect.in | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +--- quilt-0.48.orig/quilt/scripts/inspect.in ++++ quilt-0.48/quilt/scripts/inspect.in +@@ -185,6 +185,18 @@ cat <<-'EOF' > $tmpdir/bin/wrapper + fi + } + ++ # Extract the -R option from the command line ++ reverse_option() { ++ while [ $# -ne 0 -a "$1" != -R ] ++ do ++ shift ++ done ++ if [ "$1" = -R ] ++ then ++ echo $1 ++ fi ++ } ++ + patch_input_file() { + while [ $# -gt 0 ]; do + case "$1" in +@@ -244,7 +256,7 @@ cat <<-'EOF' > $tmpdir/bin/wrapper + patch) + echo -n p >&4 + echo "${0##*/} ${dir:-.} $unpackfile" \ +- $(strip_option "$@") >&3 ++ $(strip_option "$@") $(reverse_option "$@") >&3 + ;; + tar) + echo -n t >&4