From 68faa20e2d4511b43062f8279cc407aee735b275 Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Tue, 2 Oct 2018 13:53:13 -0500 Subject: quilt: Upgrade to 0.65. * gnu/packages/patches/quilt-test-fix-regex.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/patchutils.scm (quilt)[version]: Upgrade to 0.65. [source]: Use patch. [arguments]: Adjust 'patch-tests' phase for new tests. Re-enable "mail" test. --- gnu/packages/patchutils.scm | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'gnu/packages/patchutils.scm') diff --git a/gnu/packages/patchutils.scm b/gnu/packages/patchutils.scm index a68e369912..0cf111ac47 100644 --- a/gnu/packages/patchutils.scm +++ b/gnu/packages/patchutils.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014 Eric Bavier +;;; Copyright © 2014, 2018 Eric Bavier ;;; Copyright © 2015, 2018 Leo Famulari ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; @@ -92,7 +92,7 @@ (define-public patchutils (define-public quilt (package (name "quilt") - (version "0.61") + (version "0.65") (source (origin (method url-fetch) @@ -100,7 +100,8 @@ (define-public quilt name "-" version ".tar.gz")) (sha256 (base32 - "1hwz58djkq9cv46sjwxbp2v5m8yjr41kd0nm1zm1xm6418khmv0y")))) + "06b816m2gz9jfif7k9v2hrm7fz76zjg5pavf7hd3ifybwn4cgjzn")) + (patches (search-patches "quilt-test-fix-regex.patch")))) (build-system gnu-build-system) (inputs `(("perl" ,perl) ("less" ,less) @@ -116,8 +117,16 @@ (define-public quilt '("test/run" "test/edit.test") (("/bin/sh") (which "sh"))) - ;; TODO: Run the mail tests once the mail feature can be supported. - (delete-file "test/mail.test") + (substitute* "test/create-delete.test" + ;; We'd rather use quilt's compat/getopt than declare a + ;; dependency on util-linux, but this test fails because of + ;; compat/getopt's handling of "---" in this test, so remove it + ;; for now. + ((" ---") "")) + (substitute* '("test/empty-files.test" "test/faildiff.test") + ;; compat/getopt seems not to handle splitting of short opts + ;; from its arguments. + (("-pab") "-p ab")) #t)) (add-after 'install 'wrap-program ;; quilt's configure checks for the absolute path to the utilities it -- cgit v1.2.3 From 24a80064ca7faf504563af33217e07372285fb2f Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Tue, 2 Oct 2018 14:01:55 -0500 Subject: quilt: Install translations. * gnu/packages/patchutils.scm (quilt)[native-inputs]: New field. --- gnu/packages/patchutils.scm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gnu/packages/patchutils.scm') diff --git a/gnu/packages/patchutils.scm b/gnu/packages/patchutils.scm index 0cf111ac47..767799768c 100644 --- a/gnu/packages/patchutils.scm +++ b/gnu/packages/patchutils.scm @@ -31,6 +31,7 @@ (define-module (gnu packages patchutils) #:use-module (gnu packages bash) #:use-module (gnu packages file) #:use-module (gnu packages gawk) + #:use-module (gnu packages gettext) #:use-module (gnu packages less) #:use-module (gnu packages mail) #:use-module (gnu packages ncurses) @@ -103,6 +104,8 @@ (define-public quilt "06b816m2gz9jfif7k9v2hrm7fz76zjg5pavf7hd3ifybwn4cgjzn")) (patches (search-patches "quilt-test-fix-regex.patch")))) (build-system gnu-build-system) + (native-inputs + `(("gettext" ,gnu-gettext))) (inputs `(("perl" ,perl) ("less" ,less) ("file" ,file) -- cgit v1.2.3 From d7d1fc821091de98d66dac71ceed390d82434e40 Mon Sep 17 00:00:00 2001 From: Eric Bavier <<bavier@cray.com>> Date: Tue, 2 Oct 2018 14:50:45 -0500 Subject: quilt: Add diffstat input. * gnu/packages/patchutils.scm (quilt)[inputs]: Add diffstat. [arguments]: Add it to wrapper. --- gnu/packages/patchutils.scm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'gnu/packages/patchutils.scm') diff --git a/gnu/packages/patchutils.scm b/gnu/packages/patchutils.scm index 767799768c..da20ae1c3f 100644 --- a/gnu/packages/patchutils.scm +++ b/gnu/packages/patchutils.scm @@ -37,6 +37,7 @@ (define-module (gnu packages patchutils) #:use-module (gnu packages ncurses) #:use-module (gnu packages perl) #:use-module (gnu packages python) + #:use-module (gnu packages version-control) #:use-module (gnu packages xml)) (define-public patchutils @@ -109,7 +110,8 @@ (define-public quilt (inputs `(("perl" ,perl) ("less" ,less) ("file" ,file) - ("ed" ,ed))) + ("ed" ,ed) + ("diffstat" ,diffstat))) (arguments '(#:parallel-tests? #f #:phases @@ -140,6 +142,7 @@ (define-public quilt (coreutils (assoc-ref inputs "coreutils")) (diffutils (assoc-ref inputs "diffutils")) (findutils (assoc-ref inputs "findutils")) + (diffstat (assoc-ref inputs "diffstat")) (less (assoc-ref inputs "less")) (file (assoc-ref inputs "file")) (ed (assoc-ref inputs "ed")) @@ -151,7 +154,8 @@ (define-public quilt ,(map (lambda (dir) (string-append dir "/bin")) (list coreutils diffutils findutils - less file ed sed bash grep))))) + less file ed sed bash grep + diffstat))))) #t))))) (home-page "https://savannah.nongnu.org/projects/quilt/") (synopsis "Script for managing patches to software") -- cgit v1.2.3 From 43eb42ef017aa4752503fb2913781bb446716c1e Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Wed, 3 Oct 2018 10:23:51 -0500 Subject: quilt: Remove test workarounds. * gnu/packages/patches/quilt-compat-getopt-fix-second-separator.patch, gnu/packages/patches/quilt-compat-getopt-fix-option-with-nondigit-param.patch: New files. * gnu/local.mk (dist_patch_DATA): Add them. * gnu/packages/patchutils.scm (quilt)[source]: Use them. [arguments]: Remove workarounds in 'patch-tests' phase. --- gnu/local.mk | 2 + ...pat-getopt-fix-option-with-nondigit-param.patch | 45 +++++++++++++++++ .../quilt-compat-getopt-fix-second-separator.patch | 58 ++++++++++++++++++++++ gnu/packages/patchutils.scm | 14 ++---- 4 files changed, 108 insertions(+), 11 deletions(-) create mode 100644 gnu/packages/patches/quilt-compat-getopt-fix-option-with-nondigit-param.patch create mode 100644 gnu/packages/patches/quilt-compat-getopt-fix-second-separator.patch (limited to 'gnu/packages/patchutils.scm') diff --git a/gnu/local.mk b/gnu/local.mk index b2fda4ac69..61e5913a01 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1102,6 +1102,8 @@ dist_patch_DATA = \ %D%/packages/patches/quagga-reproducible-build.patch \ %D%/packages/patches/quickswitch-fix-dmenu-check.patch \ %D%/packages/patches/quilt-test-fix-regex.patch \ + %D%/packages/patches/quilt-compat-getopt-fix-second-separator.patch \ + %D%/packages/patches/quilt-compat-getopt-fix-option-with-nondigit-param.patch \ %D%/packages/patches/qtwebkit-pbutils-include.patch \ %D%/packages/patches/rapicorn-isnan.patch \ %D%/packages/patches/raptor2-heap-overflow.patch \ diff --git a/gnu/packages/patches/quilt-compat-getopt-fix-option-with-nondigit-param.patch b/gnu/packages/patches/quilt-compat-getopt-fix-option-with-nondigit-param.patch new file mode 100644 index 0000000000..6bbec67e75 --- /dev/null +++ b/gnu/packages/patches/quilt-compat-getopt-fix-option-with-nondigit-param.patch @@ -0,0 +1,45 @@ +From: Jean Delvare +Subject: compat/getopt: Allow non-digit parameter embedded in short option + +The compatibility getopt script allows only digit parameters to be +embedded in short options. Util-linux's getopt implementation does +not have such a restriction and allows any parameter to be embedded +in short options. As a consequence, using the compatibility getopt +script would choke for example on "-pab", which is a legal option +of the "quilt refresh" command. + +Remove the limitation on digits so that the compatibility getopt +script allows what util-linux allows. This fixes the second half +of bug #54772: +https://savannah.nongnu.org/bugs/index.php?54772 + +As a side note, this feature of the compatibility script was broken +anyway, as it would output the digits in reverse order. + +Signed-off-by: Jean Delvare +--- + compat/getopt.in | 13 ++++--------- + 1 file changed, 4 insertions(+), 9 deletions(-) + +--- quilt.orig/compat/getopt.in 2018-10-03 16:05:56.818667040 +0200 ++++ quilt/compat/getopt.in 2018-10-03 16:12:17.624841732 +0200 +@@ -108,15 +108,10 @@ foreach my $word (@words) { + if (scalar(@letters) == 0) { + $need_param = $letter; + } else { +- # short options can have numerical args +- # embedded in the short option list: -UO +- die "unexpected character after option $letter" +- if ($letters[$#letters] !~ /[0-9]/); +- my @digits; +- while (scalar(@letters) && ($letters[$#letters] =~ /[0-9]/)) { +- push @digits, pop @letters; +- } +- push @options, quote_word(join('', reverse @digits)); ++ # short options can have args ++ # embedded in the short option list ++ push @options, quote_word(join('', reverse @letters)); ++ @letters = (); + } + } + } diff --git a/gnu/packages/patches/quilt-compat-getopt-fix-second-separator.patch b/gnu/packages/patches/quilt-compat-getopt-fix-second-separator.patch new file mode 100644 index 0000000000..cde2c8d41c --- /dev/null +++ b/gnu/packages/patches/quilt-compat-getopt-fix-second-separator.patch @@ -0,0 +1,58 @@ +From: Jean Delvare +Subject: compat/getopt: Handle a second separator + +getopt can be passed 2 '--' separators. The first one tells that +getopt options are over and target program options start. The second +one tells that the target program's options are over and following +arguments should be treated as non-options even if they look like +options. + +This second separator was not handled, causing the compatibility +getopt script to treat the following arguments as options, eventually +failing one way or another. + +Properly detect and handle the second separator. This fixes the first +half of bug #54772: +https://savannah.nongnu.org/bugs/index.php?54772 + +Signed-off-by: Jean Delvare +--- + compat/getopt.in | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + +--- quilt.orig/compat/getopt.in 2018-10-03 15:23:21.147620172 +0200 ++++ quilt/compat/getopt.in 2018-10-03 16:05:56.818667040 +0200 +@@ -8,12 +8,12 @@ + + use strict; + +-my $opts; ++my $opts = ''; + my @words; + my $found_sep = 0; + + foreach my $arg (@ARGV) { +- if ($arg eq '--') { ++ if (!$found_sep && $arg eq '--') { + $found_sep = 1; + } + else { +@@ -62,10 +62,17 @@ sub quote_word + return "'$word'"; + } + ++# there can be a second separator, to inhibit processing following arguments ++# as options ++$found_sep = 0; + foreach my $word (@words) { ++ if ($word eq '--') { ++ $found_sep = 1; ++ next; ++ } + + # allow '-' to be an option value +- if (!$need_param && $word !~ /^-./) { ++ if ($found_sep || (!$need_param && $word !~ /^-./)) { + push @barewords, quote_word($word); + next; + } diff --git a/gnu/packages/patchutils.scm b/gnu/packages/patchutils.scm index da20ae1c3f..688e62cdc8 100644 --- a/gnu/packages/patchutils.scm +++ b/gnu/packages/patchutils.scm @@ -103,7 +103,9 @@ (define-public quilt (sha256 (base32 "06b816m2gz9jfif7k9v2hrm7fz76zjg5pavf7hd3ifybwn4cgjzn")) - (patches (search-patches "quilt-test-fix-regex.patch")))) + (patches (search-patches "quilt-test-fix-regex.patch" + "quilt-compat-getopt-fix-second-separator.patch" + "quilt-compat-getopt-fix-option-with-nondigit-param.patch")))) (build-system gnu-build-system) (native-inputs `(("gettext" ,gnu-gettext))) @@ -122,16 +124,6 @@ (define-public quilt '("test/run" "test/edit.test") (("/bin/sh") (which "sh"))) - (substitute* "test/create-delete.test" - ;; We'd rather use quilt's compat/getopt than declare a - ;; dependency on util-linux, but this test fails because of - ;; compat/getopt's handling of "---" in this test, so remove it - ;; for now. - ((" ---") "")) - (substitute* '("test/empty-files.test" "test/faildiff.test") - ;; compat/getopt seems not to handle splitting of short opts - ;; from its arguments. - (("-pab") "-p ab")) #t)) (add-after 'install 'wrap-program ;; quilt's configure checks for the absolute path to the utilities it -- cgit v1.2.3