From b20c99121ec69443e2e6affd2d55504a5613d117cfa438d61ac9584bcda35621 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Thu, 31 Jul 2014 16:49:15 +0000 Subject: [PATCH] - setup-skip-version-check.patch: setup: Skip version check. - setup-fix-tar-with-long-options.patch: inspect: Handle long options passed to tar. OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm/quilt?expand=0&rev=85 --- quilt.changes | 7 +++ quilt.spec | 8 +++- setup-check-for-rpmbuild.patch | 2 +- setup-fix-tar-with-long-options.patch | 64 +++++++++++++++++++++++++++ setup-skip-version-check.patch | 43 ++++++++++++++++++ 5 files changed, 121 insertions(+), 3 deletions(-) create mode 100644 setup-fix-tar-with-long-options.patch create mode 100644 setup-skip-version-check.patch diff --git a/quilt.changes b/quilt.changes index 33d9526..87d3c94 100644 --- a/quilt.changes +++ b/quilt.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Jul 31 18:47:10 CEST 2014 - jdelvare@suse.de + +- setup-skip-version-check.patch: setup: Skip version check. +- setup-fix-tar-with-long-options.patch: inspect: Handle long + options passed to tar. + ------------------------------------------------------------------- Mon Jun 9 15:46:01 CEST 2014 - jdelvare@suse.de diff --git a/quilt.spec b/quilt.spec index dafb38a..43ed868 100644 --- a/quilt.spec +++ b/quilt.spec @@ -42,8 +42,10 @@ Source1: suse-start-quilt-mode.el Patch1: expand.diff Patch2: quilt-support-vimdiff.patch Patch3: patch-wrapper-rpm.diff -Patch4: setup-check-for-rpmbuild.patch -Patch5: suse-workaround-pseudo-release.patch +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 BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch Recommends: procmail @@ -68,6 +70,8 @@ http://www.zip.com.au/~akpm/linux/patches/. %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 +%patch7 -p1 %build # --with-rpmbuild=/usr/lib/rpm/rpmb: diff --git a/setup-check-for-rpmbuild.patch b/setup-check-for-rpmbuild.patch index 253a06c..f2f95f7 100644 --- a/setup-check-for-rpmbuild.patch +++ b/setup-check-for-rpmbuild.patch @@ -11,7 +11,7 @@ available. Print a user-friendly error message if not. --- a/quilt/setup.in +++ b/quilt/setup.in -@@ -167,6 +167,14 @@ case "$1" in +@@ -173,6 +173,14 @@ case "$1" in *.spec) spec_file=$1 diff --git a/setup-fix-tar-with-long-options.patch b/setup-fix-tar-with-long-options.patch new file mode 100644 index 0000000..de164ec --- /dev/null +++ b/setup-fix-tar-with-long-options.patch @@ -0,0 +1,64 @@ +From: Jean Delvare +Subject: inspect: Handle long options passed to tar +Upstream: Submitted + +The command line interface to tar is complex and sometimes confusing, +but we should still do our best to figure 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. These +can be addressed later when reported. + +Reported by Petr Tesarik. +--- + quilt/scripts/inspect.in | 34 ++++++++++++++++++++++++++-------- + 1 file changed, 26 insertions(+), 8 deletions(-) + +--- a/quilt/scripts/inspect.in ++++ b/quilt/scripts/inspect.in +@@ -257,14 +257,32 @@ cat <<-'EOF' > $tmpdir/bin/wrapper + + tar_input_file() + { +- case "$1" in +- *C*f*) +- echo "$3" +- ;; +- *f*) +- echo "$2" +- ;; +- esac ++ while [ $# -gt 0 ]; do ++ case "$1" in ++ --file) ++ echo "$2" ++ return ++ ;; ++ --file=*) ++ echo "${1#--file=}" ++ return ++ ;; ++ --*) ++ shift ++ ;; ++ *C*f*) ++ echo "$3" ++ return ++ ;; ++ *f*) ++ echo "$2" ++ return ++ ;; ++ -*) ++ shift ++ ;; ++ esac ++ done + } + + unzip_input_file() diff --git a/setup-skip-version-check.patch b/setup-skip-version-check.patch new file mode 100644 index 0000000..3fe599d --- /dev/null +++ b/setup-skip-version-check.patch @@ -0,0 +1,43 @@ +From: Jean Delvare +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