diff options
-rw-r--r-- | meta/recipes-devtools/quilt/quilt-native_0.68.bb (renamed from meta/recipes-devtools/quilt/quilt-native_0.67.bb) | 0 | ||||
-rw-r--r-- | meta/recipes-devtools/quilt/quilt.inc | 7 | ||||
-rw-r--r-- | meta/recipes-devtools/quilt/quilt/0001-test-Fix-a-race-condition-in-merge.test.patch | 48 | ||||
-rw-r--r-- | meta/recipes-devtools/quilt/quilt/faildiff-order.patch | 41 | ||||
-rw-r--r-- | meta/recipes-devtools/quilt/quilt/fix-grep-3.8.patch | 144 | ||||
-rw-r--r-- | meta/recipes-devtools/quilt/quilt_0.68.bb (renamed from meta/recipes-devtools/quilt/quilt_0.67.bb) | 0 |
6 files changed, 2 insertions, 238 deletions
diff --git a/meta/recipes-devtools/quilt/quilt-native_0.67.bb b/meta/recipes-devtools/quilt/quilt-native_0.68.bb index 22374425fa..22374425fa 100644 --- a/meta/recipes-devtools/quilt/quilt-native_0.67.bb +++ b/meta/recipes-devtools/quilt/quilt-native_0.68.bb | |||
diff --git a/meta/recipes-devtools/quilt/quilt.inc b/meta/recipes-devtools/quilt/quilt.inc index 1d90d3d84d..19aeae510d 100644 --- a/meta/recipes-devtools/quilt/quilt.inc +++ b/meta/recipes-devtools/quilt/quilt.inc | |||
@@ -11,14 +11,11 @@ SRC_URI = "${SAVANNAH_GNU_MIRROR}/quilt/quilt-${PV}.tar.gz \ | |||
11 | file://run-ptest \ | 11 | file://run-ptest \ |
12 | file://test.sh \ | 12 | file://test.sh \ |
13 | file://0001-tests-Allow-different-output-from-mv.patch \ | 13 | file://0001-tests-Allow-different-output-from-mv.patch \ |
14 | file://fix-grep-3.8.patch \ | ||
15 | file://faildiff-order.patch \ | ||
16 | file://0001-test-Fix-a-race-condition-in-merge.test.patch \ | ||
17 | " | 14 | " |
18 | 15 | ||
19 | SRC_URI:append:class-target = " file://gnu_patch_test_fix_target.patch" | 16 | SRC_URI:append:class-target = " file://gnu_patch_test_fix_target.patch" |
20 | 17 | ||
21 | SRC_URI[sha256sum] = "3be3be0987e72a6c364678bb827e3e1fcc10322b56bc5f02b576698f55013cc2" | 18 | SRC_URI[sha256sum] = "fe8c09de03c106e85b3737c8f03ade147c956b79ed7af485a1c8a3858db38426" |
22 | 19 | ||
23 | inherit autotools-brokensep ptest | 20 | inherit autotools-brokensep ptest |
24 | 21 | ||
@@ -97,5 +94,5 @@ RDEPENDS:${PN}-ptest += "file sed gawk diffutils findutils ed perl \ | |||
97 | perl-module-filehandle perl-module-getopt-std \ | 94 | perl-module-filehandle perl-module-getopt-std \ |
98 | perl-module-posix perl-module-file-temp \ | 95 | perl-module-posix perl-module-file-temp \ |
99 | perl-module-text-parsewords perl-module-overloading \ | 96 | perl-module-text-parsewords perl-module-overloading \ |
100 | bash util-linux-getopt ptest-runner \ | 97 | bash util-linux-getopt ptest-runner coreutils \ |
101 | " | 98 | " |
diff --git a/meta/recipes-devtools/quilt/quilt/0001-test-Fix-a-race-condition-in-merge.test.patch b/meta/recipes-devtools/quilt/quilt/0001-test-Fix-a-race-condition-in-merge.test.patch deleted file mode 100644 index 01d4c8befc..0000000000 --- a/meta/recipes-devtools/quilt/quilt/0001-test-Fix-a-race-condition-in-merge.test.patch +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | From c1ce964f3e9312100a60f03c1e1fdd601e1911f2 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= | ||
3 | <congdanhqx@gmail.com> | ||
4 | Date: Tue, 28 Feb 2023 18:45:15 +0100 | ||
5 | Subject: [PATCH] test: Fix a race condition in merge.test | ||
6 | MIME-Version: 1.0 | ||
7 | Content-Type: text/plain; charset=UTF-8 | ||
8 | Content-Transfer-Encoding: 8bit | ||
9 | |||
10 | Just like commit 4dfe7f9, (test: Fix a race condition, 2023-01-20), | ||
11 | this fix a test race when stdout and stderr in any order. | ||
12 | |||
13 | Upstream-Status: Backport [https://git.savannah.nongnu.org/cgit/quilt.git/commit/?id=c1ce964f3e9312100a60f03c1e1fdd601e1911f2] | ||
14 | Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com> | ||
15 | Signed-off-by: Jean Delvare <jdelvare@suse.de> | ||
16 | --- | ||
17 | test/merge.test | 6 ++++-- | ||
18 | 1 file changed, 4 insertions(+), 2 deletions(-) | ||
19 | |||
20 | diff --git a/test/merge.test b/test/merge.test | ||
21 | index c64b33d..2e67d4f 100644 | ||
22 | --- a/test/merge.test | ||
23 | +++ b/test/merge.test | ||
24 | @@ -39,8 +39,9 @@ Test the patch merging functionality of `quilt diff'. | ||
25 | > Applying patch %{P}c.diff | ||
26 | > Now at patch %{P}c.diff | ||
27 | |||
28 | - $ quilt diff -P b.diff | grep -v "^\\(---\\|+++\\)" | ||
29 | + $ quilt diff -P b.diff >/dev/null | ||
30 | > Warning: more recent patches modify files in patch %{P}b.diff | ||
31 | + $ quilt diff -P b.diff 2>/dev/null | grep -v "^\\(---\\|+++\\)" | ||
32 | >~ Index: [^/]+/abc\.txt | ||
33 | > =================================================================== | ||
34 | > @@ -1,3 +1,3 @@ | ||
35 | @@ -49,8 +50,9 @@ Test the patch merging functionality of `quilt diff'. | ||
36 | > +b+ | ||
37 | > c | ||
38 | |||
39 | - $ quilt diff --combine a.diff -P b.diff | grep -v "^\\(---\\|+++\\)" | ||
40 | + $ quilt diff --combine a.diff -P b.diff >/dev/null | ||
41 | > Warning: more recent patches modify files in patch %{P}b.diff | ||
42 | + $ quilt diff --combine a.diff -P b.diff 2>/dev/null | grep -v "^\\(---\\|+++\\)" | ||
43 | >~ Index: [^/]+/abc\.txt | ||
44 | > =================================================================== | ||
45 | > @@ -1,3 +1,3 @@ | ||
46 | -- | ||
47 | 2.40.0 | ||
48 | |||
diff --git a/meta/recipes-devtools/quilt/quilt/faildiff-order.patch b/meta/recipes-devtools/quilt/quilt/faildiff-order.patch deleted file mode 100644 index f22065a250..0000000000 --- a/meta/recipes-devtools/quilt/quilt/faildiff-order.patch +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | Upstream-Status: Backport | ||
2 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
3 | |||
4 | From 4dfe7f9e702c85243a71e4de267a13e434b6d6c2 Mon Sep 17 00:00:00 2001 | ||
5 | From: Jean Delvare <jdelvare@suse.de> | ||
6 | Date: Fri, 20 Jan 2023 12:56:08 +0100 | ||
7 | Subject: [PATCH] test: Fix a race condition | ||
8 | |||
9 | The test suite does not differentiate between stdout and stderr. When | ||
10 | messages are printed to both, the order in which they will reach us | ||
11 | is apparently not guaranteed. Ideally this would be deterministic, but | ||
12 | until then, explicitly test stdout and stderr separately in the test | ||
13 | case itself. Otherwise the test suite fails randomly, which is a pain | ||
14 | for distribution package maintainers. | ||
15 | |||
16 | This fixes bug #63651 reported by Ross Burton: | ||
17 | https://savannah.nongnu.org/bugs/index.php?63651 | ||
18 | |||
19 | Signed-off-by: Jean Delvare <jdelvare@suse.de> | ||
20 | --- | ||
21 | test/faildiff.test | 3 ++- | ||
22 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
23 | |||
24 | diff --git a/test/faildiff.test b/test/faildiff.test | ||
25 | index 5afb8e3..0444c15 100644 | ||
26 | --- a/test/faildiff.test | ||
27 | +++ b/test/faildiff.test | ||
28 | @@ -27,8 +27,9 @@ What happens on binary files? | ||
29 | > File test.bin added to patch %{P}test.diff | ||
30 | |||
31 | $ printf "\\003\\000\\001" > test.bin | ||
32 | - $ quilt diff -pab --no-index | ||
33 | + $ quilt diff -pab --no-index 2>/dev/null | ||
34 | >~ (Files|Binary files) a/test\.bin and b/test\.bin differ | ||
35 | + $ quilt diff -pab --no-index >/dev/null | ||
36 | > Diff failed on file 'test.bin', aborting | ||
37 | $ echo %{?} | ||
38 | > 1 | ||
39 | -- | ||
40 | 2.34.1 | ||
41 | |||
diff --git a/meta/recipes-devtools/quilt/quilt/fix-grep-3.8.patch b/meta/recipes-devtools/quilt/quilt/fix-grep-3.8.patch deleted file mode 100644 index 68a4b4c195..0000000000 --- a/meta/recipes-devtools/quilt/quilt/fix-grep-3.8.patch +++ /dev/null | |||
@@ -1,144 +0,0 @@ | |||
1 | From f73f8d7f71de2878d3f92881a5fcb8eafd78cb5f Mon Sep 17 00:00:00 2001 | ||
2 | From: Jean Delvare <jdelvare@suse.de> | ||
3 | Date: Fri, 9 Sep 2022 10:10:37 +0200 | ||
4 | Subject: Avoid warnings with grep 3.8 | ||
5 | |||
6 | GNU grep version 3.8 became more strict about needless quoting in | ||
7 | patterns. We have one occurrence of that in quilt, where "/" | ||
8 | characters are being quoted by default. There are cases where they | ||
9 | indeed need to be quoted (typically when used in a sed s/// command) | ||
10 | but most of the time they do not, and this results in the following | ||
11 | warning: | ||
12 | |||
13 | grep: warning: stray \ before / | ||
14 | |||
15 | So rename quote_bre() to quote_sed_re(), and introduce | ||
16 | quote_grep_re() which does not quote "/". | ||
17 | |||
18 | Signed-off-by: Jean Delvare <jdelvare@suse.de> | ||
19 | Upstream-Status: Backport [https://git.savannah.nongnu.org/cgit/quilt.git/commit/?id=f73f8d7f71de2878d3f92881a5fcb8eafd78cb5f] | ||
20 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
21 | --- | ||
22 | quilt/diff.in | 2 +- | ||
23 | quilt/patches.in | 2 +- | ||
24 | quilt/scripts/patchfns.in | 20 +++++++++++++------- | ||
25 | quilt/upgrade.in | 4 ++-- | ||
26 | 4 files changed, 17 insertions(+), 11 deletions(-) | ||
27 | |||
28 | diff --git a/quilt/diff.in b/quilt/diff.in | ||
29 | index e90dc33..07788ff 100644 | ||
30 | --- a/quilt/diff.in | ||
31 | +++ b/quilt/diff.in | ||
32 | @@ -255,7 +255,7 @@ then | ||
33 | # Add all files in the snapshot into the file list (they may all | ||
34 | # have changed). | ||
35 | files=( $(find $QUILT_PC/$snap_subdir -type f \ | ||
36 | - | sed -e "s/^$(quote_bre $QUILT_PC/$snap_subdir/)//" \ | ||
37 | + | sed -e "s/^$(quote_sed_re $QUILT_PC/$snap_subdir/)//" \ | ||
38 | | sort) ) | ||
39 | printf "%s\n" "${files[@]}" >&4 | ||
40 | unset files | ||
41 | diff --git a/quilt/patches.in b/quilt/patches.in | ||
42 | index bb17a46..eac45a9 100644 | ||
43 | --- a/quilt/patches.in | ||
44 | +++ b/quilt/patches.in | ||
45 | @@ -60,7 +60,7 @@ scan_unapplied() | ||
46 | # Quote each file name only once | ||
47 | for file in "${opt_files[@]}" | ||
48 | do | ||
49 | - files_bre[${#files_bre[@]}]=$(quote_bre "$file") | ||
50 | + files_bre[${#files_bre[@]}]=$(quote_grep_re "$file") | ||
51 | done | ||
52 | |||
53 | # "Or" all files in a single pattern | ||
54 | diff --git a/quilt/scripts/patchfns.in b/quilt/scripts/patchfns.in | ||
55 | index c2d5f9d..1bd7233 100644 | ||
56 | --- a/quilt/scripts/patchfns.in | ||
57 | +++ b/quilt/scripts/patchfns.in | ||
58 | @@ -78,8 +78,14 @@ array_join() | ||
59 | done | ||
60 | } | ||
61 | |||
62 | -# Quote a string for use in a basic regular expression. | ||
63 | -quote_bre() | ||
64 | +# Quote a string for use in a regular expression for a grep pattern. | ||
65 | +quote_grep_re() | ||
66 | +{ | ||
67 | + echo "$1" | sed -e 's:\([][^$.*\\]\):\\\1:g' | ||
68 | +} | ||
69 | + | ||
70 | +# Quote a string for use in a regular expression for a sed s/// command. | ||
71 | +quote_sed_re() | ||
72 | { | ||
73 | echo "$1" | sed -e 's:\([][^$/.*\\]\):\\\1:g' | ||
74 | } | ||
75 | @@ -215,7 +221,7 @@ patch_in_series() | ||
76 | |||
77 | if [ -e "$SERIES" ] | ||
78 | then | ||
79 | - grep -q "^$(quote_bre $patch)\([ \t]\|$\)" "$SERIES" | ||
80 | + grep -q "^$(quote_grep_re $patch)\([ \t]\|$\)" "$SERIES" | ||
81 | else | ||
82 | return 1 | ||
83 | fi | ||
84 | @@ -365,7 +371,7 @@ is_applied() | ||
85 | { | ||
86 | local patch=$1 | ||
87 | [ -e $DB ] || return 1 | ||
88 | - grep -q "^$(quote_bre $patch)\$" $DB | ||
89 | + grep -q "^$(quote_grep_re $patch)\$" $DB | ||
90 | } | ||
91 | |||
92 | applied_patches() | ||
93 | @@ -465,7 +471,7 @@ remove_from_db() | ||
94 | local tmpfile | ||
95 | if tmpfile=$(gen_tempfile) | ||
96 | then | ||
97 | - grep -v "^$(quote_bre $patch)\$" $DB > $tmpfile | ||
98 | + grep -v "^$(quote_grep_re $patch)\$" $DB > $tmpfile | ||
99 | cat $tmpfile > $DB | ||
100 | rm -f $tmpfile | ||
101 | [ -s $DB ] || rm -f $DB | ||
102 | @@ -520,7 +526,7 @@ find_patch() | ||
103 | fi | ||
104 | |||
105 | local patch=${1#$SUBDIR_DOWN$QUILT_PATCHES/} | ||
106 | - local bre=$(quote_bre "$patch") | ||
107 | + local bre=$(quote_sed_re "$patch") | ||
108 | set -- $(sed -e "/^$bre\(\|\.patch\|\.diff\?\)\(\|\.gz\|\.bz2\|\.xz\|\.lzma\|\.lz\)\([ "$'\t'"]\|$\)/!d" \ | ||
109 | -e 's/[ '$'\t''].*//' "$SERIES") | ||
110 | if [ $# -eq 1 ] | ||
111 | @@ -631,7 +637,7 @@ files_in_patch() | ||
112 | then | ||
113 | find "$path" -type f \ | ||
114 | -a ! -path "$(quote_glob "$path")/.timestamp" | | ||
115 | - sed -e "s/$(quote_bre "$path")\///" | ||
116 | + sed -e "s/$(quote_sed_re "$path")\///" | ||
117 | fi | ||
118 | } | ||
119 | |||
120 | diff --git a/quilt/upgrade.in b/quilt/upgrade.in | ||
121 | index dbf7d05..866aa33 100644 | ||
122 | --- a/quilt/upgrade.in | ||
123 | +++ b/quilt/upgrade.in | ||
124 | @@ -74,7 +74,7 @@ printf $"Converting meta-data to version %s\n" "$DB_VERSION" | ||
125 | |||
126 | for patch in $(applied_patches) | ||
127 | do | ||
128 | - proper_name="$(grep "^$(quote_bre $patch)"'\(\|\.patch\|\.diff?\)\(\|\.gz\|\.bz2\)\([ \t]\|$\)' $SERIES)" | ||
129 | + proper_name="$(grep "^$(quote_grep_re $patch)"'\(\|\.patch\|\.diff?\)\(\|\.gz\|\.bz2\)\([ \t]\|$\)' $SERIES)" | ||
130 | proper_name=${proper_name#$QUILT_PATCHES/} | ||
131 | proper_name=${proper_name%% *} | ||
132 | if [ -z "$proper_name" ] | ||
133 | @@ -84,7 +84,7 @@ do | ||
134 | fi | ||
135 | |||
136 | if [ "$patch" != "$proper_name" -a -d $QUILT_PC/$patch ] \ | ||
137 | - && grep -q "^$(quote_bre $patch)\$" \ | ||
138 | + && grep -q "^$(quote_grep_re $patch)\$" \ | ||
139 | $QUILT_PC/applied-patches | ||
140 | then | ||
141 | mv $QUILT_PC/$patch $QUILT_PC/$proper_name \ | ||
142 | -- | ||
143 | cgit v1.1 | ||
144 | |||
diff --git a/meta/recipes-devtools/quilt/quilt_0.67.bb b/meta/recipes-devtools/quilt/quilt_0.68.bb index bf9e3c720f..bf9e3c720f 100644 --- a/meta/recipes-devtools/quilt/quilt_0.67.bb +++ b/meta/recipes-devtools/quilt/quilt_0.68.bb | |||