unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#63150: quilt tests fail
@ 2023-04-28 15:00 Jack Hill
  2023-04-29  8:23 ` Josselin Poiret via Bug reports for GNU Guix
  2023-04-30 10:28 ` bug#63150: (no subject) Maze
  0 siblings, 2 replies; 6+ messages in thread
From: Jack Hill @ 2023-04-28 15:00 UTC (permalink / raw)
  To: 63150

[-- Attachment #1: Type: text/plain, Size: 1630 bytes --]

Hi Guix,

The check phase or quilt (below) currently fails (guix commit 
aecc6e70587f8412cbbb9b2c13141de4f534518e). Maybe something with newer grep 
from core-updates? I'm not sure yet (which is why there is no patch 😁).

```
starting phase `check'
[add-filename-check.test]
6 commands (6 passed, 0 failed)
[altered-series.test]
12 commands (12 passed, 0 failed)
[annotate.test]
31 commands (31 passed, 0 failed)
[applied.test]
15 commands (15 passed, 0 failed)
[auto-refresh.test]
14 commands (14 passed, 0 failed)
[backup-files.test]
119 commands (119 passed, 0 failed)
[colon-in-patch-name.test]
23 commands (23 passed, 0 failed)
[comments.test]
11 commands (11 passed, 0 failed)
[conflicts.test]
39 commands (39 passed, 0 failed)
[create-delete.test]
[4] $ mkdir patches -- ok
[6] $ echo delete > delete -- ok
[7] $ quilt new test.diff -- ok
[10] $ quilt add create -- ok
[13] $ echo create > create -- ok
[14] $ quilt refresh -- ok
[17] $ quilt add delete -- ok
[20] $ rm -f delete -- ok
[21] $ quilt refresh -- ok
[23] $ quilt header -r -- ok
[31] $ quilt patches -v create -- ok
[33] $ quilt patches delete -- ok
[36] $ quilt pop -q -- ok
[40] $ quilt patches create -- ok
[42] $ quilt patches -v delete -- ok
[44] $ quilt patches -- /dev/null dev/null null --- -- failed
grep: warning: stray \ before /       != ~
grep: warning: stray \ before /       != ~
grep: warning: stray \ before /       != ~
[46] $ echo create > create -- ok
[47] $ rm -f delete -- ok
[48] $ patch -p1 --dry-run < patches/test.diff -- ok
19 commands (18 passed, 1 failed)
make: *** [Makefile:411: test/.create-delete.ok] Error 1
```

Best,
Jack

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#63150: quilt tests fail
  2023-04-28 15:00 bug#63150: quilt tests fail Jack Hill
@ 2023-04-29  8:23 ` Josselin Poiret via Bug reports for GNU Guix
  2023-04-30 10:28 ` bug#63150: (no subject) Maze
  1 sibling, 0 replies; 6+ messages in thread
From: Josselin Poiret via Bug reports for GNU Guix @ 2023-04-29  8:23 UTC (permalink / raw)
  To: Jack Hill, 63150

[-- Attachment #1: Type: text/plain, Size: 626 bytes --]

Hi Jack,

Jack Hill <jackhill@jackhill.us> writes:

> The check phase or quilt (below) currently fails (guix commit 
> aecc6e70587f8412cbbb9b2c13141de4f534518e). Maybe something with newer grep 
> from core-updates? I'm not sure yet (which is why there is no patch 😁).
> [...]
> [44] $ quilt patches -- /dev/null dev/null null --- -- failed
> grep: warning: stray \ before /       != ~

Yes, apparently grep 3.8 now warns when characters that don't need to be
escaped are, since it is UB according to POSIX.  Maybe quilt has
resolved the issue upstream and needs to be updated?

Best,
-- 
Josselin Poiret

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 682 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#63150: (no subject)
  2023-04-28 15:00 bug#63150: quilt tests fail Jack Hill
  2023-04-29  8:23 ` Josselin Poiret via Bug reports for GNU Guix
@ 2023-04-30 10:28 ` Maze
  2023-04-30 12:34   ` bug#63150: [PATCH 1/2] gnu: quilt: Fix build because of grep warnings Josselin Poiret via Bug reports for GNU Guix
  2023-04-30 12:34   ` bug#63150: [PATCH 2/2] gnu: quilt: Update to 0.67 Josselin Poiret via Bug reports for GNU Guix
  1 sibling, 2 replies; 6+ messages in thread
From: Maze @ 2023-04-30 10:28 UTC (permalink / raw)
  To: 63150

Guix distributes quilt version 0.66, there is a version 0.67 that quilt
released as a tarball in 2022 but this version still has the bug in its
test suite as it relates to the latest grep.

I just tried, at the time of writing the HEAD (as cloned) of the git
repo of quilt successfully goes through the check target of its Makefile.

I got it through:
git clone https://git.savannah.nongnu.org/git/quilt.git
And I completed the make check with their commit:
c1ce964f3e9312100a60f03c1e1fdd601e1911f2

I have a dire need for quilt to build in guix because I use
netcat-openbsd a lot.  For practical reasons, it would be much better
(for me) if a fix could hit the master branch quickly. Buf if
not... well, I suppose this can be worked around with a special quilt
and a special netcat-openbsd package.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#63150: [PATCH 1/2] gnu: quilt: Fix build because of grep warnings.
  2023-04-30 10:28 ` bug#63150: (no subject) Maze
@ 2023-04-30 12:34   ` Josselin Poiret via Bug reports for GNU Guix
  2023-05-20 19:22     ` Efraim Flashner
  2023-04-30 12:34   ` bug#63150: [PATCH 2/2] gnu: quilt: Update to 0.67 Josselin Poiret via Bug reports for GNU Guix
  1 sibling, 1 reply; 6+ messages in thread
From: Josselin Poiret via Bug reports for GNU Guix @ 2023-04-30 12:34 UTC (permalink / raw)
  To: Maze, 63150; +Cc: Josselin Poiret

From: Josselin Poiret <dev@jpoiret.xyz>

* gnu/packages/patches/quilt-avoid-grep-warnings.patch: New patch.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/patchutils.scm (quilt): Use it.
---
Hi everyone,

This should fix the build and also update quilt.

Best,

 gnu/local.mk                                  |   1 +
 .../patches/quilt-avoid-grep-warnings.patch   | 142 ++++++++++++++++++
 gnu/packages/patchutils.scm                   |   3 +-
 3 files changed, 145 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/quilt-avoid-grep-warnings.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 1a84e5b499..06e5f5aa7f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1825,6 +1825,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/qtwayland-gcc-11.patch			\
   %D%/packages/patches/qtwayland-dont-recreate-callbacks.patch	\
   %D%/packages/patches/qtwayland-cleanup-callbacks.patch	\
+  %D%/packages/patches/quilt-avoid-grep-warnings.patch	\
   %D%/packages/patches/ragel-char-signedness.patch		\
   %D%/packages/patches/randomjungle-disable-static-build.patch	\
   %D%/packages/patches/range-v3-build-with-gcc10.patch	\
diff --git a/gnu/packages/patches/quilt-avoid-grep-warnings.patch b/gnu/packages/patches/quilt-avoid-grep-warnings.patch
new file mode 100644
index 0000000000..b91dc98695
--- /dev/null
+++ b/gnu/packages/patches/quilt-avoid-grep-warnings.patch
@@ -0,0 +1,142 @@
+From f73f8d7f71de2878d3f92881a5fcb8eafd78cb5f Mon Sep 17 00:00:00 2001
+From: Jean Delvare <jdelvare@suse.de>
+Date: Fri, 9 Sep 2022 10:10:37 +0200
+Subject: Avoid warnings with grep 3.8
+
+GNU grep version 3.8 became more strict about needless quoting in
+patterns. We have one occurrence of that in quilt, where "/"
+characters are being quoted by default. There are cases where they
+indeed need to be quoted (typically when used in a sed s/// command)
+but most of the time they do not, and this results in the following
+warning:
+
+grep: warning: stray \ before /
+
+So rename quote_bre() to quote_sed_re(), and introduce
+quote_grep_re() which does not quote "/".
+
+Signed-off-by: Jean Delvare <jdelvare@suse.de>
+---
+ quilt/diff.in             |  2 +-
+ quilt/patches.in          |  2 +-
+ quilt/scripts/patchfns.in | 20 +++++++++++++-------
+ quilt/upgrade.in          |  4 ++--
+ 4 files changed, 17 insertions(+), 11 deletions(-)
+
+diff --git a/quilt/diff.in b/quilt/diff.in
+index e90dc33..07788ff 100644
+--- a/quilt/diff.in
++++ b/quilt/diff.in
+@@ -255,7 +255,7 @@ then
+ 	# Add all files in the snapshot into the file list (they may all
+ 	# have changed).
+ 	files=( $(find $QUILT_PC/$snap_subdir -type f \
+-		  | sed -e "s/^$(quote_bre $QUILT_PC/$snap_subdir/)//" \
++		  | sed -e "s/^$(quote_sed_re $QUILT_PC/$snap_subdir/)//" \
+ 		  | sort) )
+ 	printf "%s\n" "${files[@]}" >&4
+ 	unset files
+diff --git a/quilt/patches.in b/quilt/patches.in
+index bb17a46..eac45a9 100644
+--- a/quilt/patches.in
++++ b/quilt/patches.in
+@@ -60,7 +60,7 @@ scan_unapplied()
+ 	# Quote each file name only once
+ 	for file in "${opt_files[@]}"
+ 	do
+-		files_bre[${#files_bre[@]}]=$(quote_bre "$file")
++		files_bre[${#files_bre[@]}]=$(quote_grep_re "$file")
+ 	done
+ 
+ 	# "Or" all files in a single pattern
+diff --git a/quilt/scripts/patchfns.in b/quilt/scripts/patchfns.in
+index c2d5f9d..1bd7233 100644
+--- a/quilt/scripts/patchfns.in
++++ b/quilt/scripts/patchfns.in
+@@ -78,8 +78,14 @@ array_join()
+ 	done
+ }
+ 
+-# Quote a string for use in a basic regular expression.
+-quote_bre()
++# Quote a string for use in a regular expression for a grep pattern.
++quote_grep_re()
++{
++	echo "$1" | sed -e 's:\([][^$.*\\]\):\\\1:g'
++}
++
++# Quote a string for use in a regular expression for a sed s/// command.
++quote_sed_re()
+ {
+ 	echo "$1" | sed -e 's:\([][^$/.*\\]\):\\\1:g'
+ }
+@@ -215,7 +221,7 @@ patch_in_series()
+ 
+ 	if [ -e "$SERIES" ]
+ 	then
+-		grep -q "^$(quote_bre $patch)\([ \t]\|$\)" "$SERIES"
++		grep -q "^$(quote_grep_re $patch)\([ \t]\|$\)" "$SERIES"
+ 	else
+ 		return 1
+ 	fi
+@@ -365,7 +371,7 @@ is_applied()
+ {
+ 	local patch=$1
+ 	[ -e $DB ] || return 1
+-	grep -q "^$(quote_bre $patch)\$" $DB
++	grep -q "^$(quote_grep_re $patch)\$" $DB
+ }
+ 
+ applied_patches()
+@@ -465,7 +471,7 @@ remove_from_db()
+ 	local tmpfile
+ 	if tmpfile=$(gen_tempfile)
+ 	then
+-		grep -v "^$(quote_bre $patch)\$" $DB > $tmpfile
++		grep -v "^$(quote_grep_re $patch)\$" $DB > $tmpfile
+ 		cat $tmpfile > $DB
+ 		rm -f $tmpfile
+ 		[ -s $DB ] || rm -f $DB
+@@ -520,7 +526,7 @@ find_patch()
+ 		fi
+ 
+ 		local patch=${1#$SUBDIR_DOWN$QUILT_PATCHES/}
+-		local bre=$(quote_bre "$patch")
++		local bre=$(quote_sed_re "$patch")
+ 		set -- $(sed -e "/^$bre\(\|\.patch\|\.diff\?\)\(\|\.gz\|\.bz2\|\.xz\|\.lzma\|\.lz\)\([ "$'\t'"]\|$\)/!d" \
+ 			       -e 's/[ '$'\t''].*//' "$SERIES")
+ 		if [ $# -eq 1 ]
+@@ -631,7 +637,7 @@ files_in_patch()
+ 	then
+ 		find "$path" -type f \
+ 			       -a ! -path "$(quote_glob "$path")/.timestamp" |
+-		sed -e "s/$(quote_bre "$path")\///"
++		sed -e "s/$(quote_sed_re "$path")\///"
+ 	fi
+ }
+ 
+diff --git a/quilt/upgrade.in b/quilt/upgrade.in
+index dbf7d05..866aa33 100644
+--- a/quilt/upgrade.in
++++ b/quilt/upgrade.in
+@@ -74,7 +74,7 @@ printf $"Converting meta-data to version %s\n" "$DB_VERSION"
+ 
+ for patch in $(applied_patches)
+ do
+-	proper_name="$(grep "^$(quote_bre $patch)"'\(\|\.patch\|\.diff?\)\(\|\.gz\|\.bz2\)\([ \t]\|$\)' $SERIES)"
++	proper_name="$(grep "^$(quote_grep_re $patch)"'\(\|\.patch\|\.diff?\)\(\|\.gz\|\.bz2\)\([ \t]\|$\)' $SERIES)"
+ 	proper_name=${proper_name#$QUILT_PATCHES/}
+ 	proper_name=${proper_name%% *}
+ 	if [ -z "$proper_name" ]
+@@ -84,7 +84,7 @@ do
+ 	fi
+ 
+ 	if [ "$patch" != "$proper_name" -a -d $QUILT_PC/$patch ] \
+-	   && grep -q "^$(quote_bre $patch)\$" \
++	   && grep -q "^$(quote_grep_re $patch)\$" \
+ 		   $QUILT_PC/applied-patches
+ 	then
+ 		mv $QUILT_PC/$patch $QUILT_PC/$proper_name \
+-- 
+cgit v1.1
+
diff --git a/gnu/packages/patchutils.scm b/gnu/packages/patchutils.scm
index 0d88a2d943..465e605010 100644
--- a/gnu/packages/patchutils.scm
+++ b/gnu/packages/patchutils.scm
@@ -117,7 +117,8 @@ (define-public quilt
        (uri (string-append "mirror://savannah/quilt/"
                            "quilt-" version ".tar.gz"))
        (sha256
-        (base32 "01vfvk4pqigahx82fhaaffg921ivd3k7rylz1yfvy4zbdyd32jri"))))
+        (base32 "01vfvk4pqigahx82fhaaffg921ivd3k7rylz1yfvy4zbdyd32jri"))
+       (patches (search-patches "quilt-avoid-grep-warnings.patch"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("gettext" ,gettext-minimal)))

base-commit: 4884ee6dd4b1694a4a502dd8058d6c61fa0c0199
-- 
2.39.2





^ permalink raw reply related	[flat|nested] 6+ messages in thread

* bug#63150: [PATCH 2/2] gnu: quilt: Update to 0.67.
  2023-04-30 10:28 ` bug#63150: (no subject) Maze
  2023-04-30 12:34   ` bug#63150: [PATCH 1/2] gnu: quilt: Fix build because of grep warnings Josselin Poiret via Bug reports for GNU Guix
@ 2023-04-30 12:34   ` Josselin Poiret via Bug reports for GNU Guix
  1 sibling, 0 replies; 6+ messages in thread
From: Josselin Poiret via Bug reports for GNU Guix @ 2023-04-30 12:34 UTC (permalink / raw)
  To: Maze, 63150; +Cc: Josselin Poiret

From: Josselin Poiret <dev@jpoiret.xyz>

* gnu/packages/patchutils.scm (quilt): Update to 0.67.
---
 gnu/packages/patchutils.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/patchutils.scm b/gnu/packages/patchutils.scm
index 465e605010..88c2cbc907 100644
--- a/gnu/packages/patchutils.scm
+++ b/gnu/packages/patchutils.scm
@@ -110,14 +110,14 @@ (define-public patchutils
 (define-public quilt
   (package
     (name "quilt")
-    (version "0.66")
+    (version "0.67")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://savannah/quilt/"
                            "quilt-" version ".tar.gz"))
        (sha256
-        (base32 "01vfvk4pqigahx82fhaaffg921ivd3k7rylz1yfvy4zbdyd32jri"))
+        (base32 "1hiw05aqysbnnl15zg2n5cr11k0z7rz85fvq8qv6qap7hw4vxqrv"))
        (patches (search-patches "quilt-avoid-grep-warnings.patch"))))
     (build-system gnu-build-system)
     (native-inputs
-- 
2.39.2





^ permalink raw reply related	[flat|nested] 6+ messages in thread

* bug#63150: [PATCH 1/2] gnu: quilt: Fix build because of grep warnings.
  2023-04-30 12:34   ` bug#63150: [PATCH 1/2] gnu: quilt: Fix build because of grep warnings Josselin Poiret via Bug reports for GNU Guix
@ 2023-05-20 19:22     ` Efraim Flashner
  0 siblings, 0 replies; 6+ messages in thread
From: Efraim Flashner @ 2023-05-20 19:22 UTC (permalink / raw)
  To: Josselin Poiret; +Cc: Maze, 63150-done

[-- Attachment #1: Type: text/plain, Size: 686 bytes --]

On Sun, Apr 30, 2023 at 02:34:27PM +0200, Josselin Poiret via Bug reports for GNU Guix wrote:
> From: Josselin Poiret <dev@jpoiret.xyz>
> 
> * gnu/packages/patches/quilt-avoid-grep-warnings.patch: New patch.
> * gnu/local.mk (dist_patch_DATA): Register it.
> * gnu/packages/patchutils.scm (quilt): Use it.
> ---
> Hi everyone,
> 
> This should fix the build and also update quilt.

It seems I applied basically the same patch and didn't see this patch.
Sorry!

-- 
Efraim Flashner   <efraim@flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-05-20 19:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-28 15:00 bug#63150: quilt tests fail Jack Hill
2023-04-29  8:23 ` Josselin Poiret via Bug reports for GNU Guix
2023-04-30 10:28 ` bug#63150: (no subject) Maze
2023-04-30 12:34   ` bug#63150: [PATCH 1/2] gnu: quilt: Fix build because of grep warnings Josselin Poiret via Bug reports for GNU Guix
2023-05-20 19:22     ` Efraim Flashner
2023-04-30 12:34   ` bug#63150: [PATCH 2/2] gnu: quilt: Update to 0.67 Josselin Poiret via Bug reports for GNU Guix

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).