Skip to content

Commit e5da3ee

Browse files
committed
gnu patches: move to use quilt
1 parent 47e0a0f commit e5da3ee

13 files changed

+58
-80
lines changed

.github/workflows/GnuTests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ jobs:
105105
run: |
106106
## Install dependencies
107107
sudo apt-get update
108-
sudo apt-get install -y autoconf autopoint bison texinfo gperf gcc g++ gdb python3-pyinotify jq valgrind libexpect-perl libacl1-dev libattr1-dev libcap-dev libselinux1-dev attr
108+
sudo apt-get install -y autoconf autopoint bison texinfo gperf gcc g++ gdb python3-pyinotify jq valgrind libexpect-perl libacl1-dev libattr1-dev libcap-dev libselinux1-dev attr quilt
109109
- name: Add various locales
110110
shell: bash
111111
run: |

util/build-gnu.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,11 @@ grep -rlE '/usr/local/bin/\s?/usr/local/bin' init.cfg tests/* | xargs -r sed -Ei
219219
# we should not regress our project just to match what GNU is going.
220220
# So, do some changes on the fly
221221

222-
eval cat "$path_UUTILS/util/gnu-patches/*.patch" | patch -N -r - -d "$path_GNU" -p 1 -i - || true
222+
# Set up quilt for patch management
223+
export QUILT_PATCHES="$path_UUTILS/util/gnu-patches"
224+
cd "$path_GNU"
225+
quilt push
226+
#eval cat "$path_UUTILS/util/gnu-patches/*.patch" | patch -N -r - -d "$path_GNU" -p 1 -i -
223227

224228
sed -i -e "s|rm: cannot remove 'e/slink'|rm: cannot remove 'e'|g" tests/rm/fail-eacces.sh
225229

util/gnu-patches/debug-stat-nano.patch

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
diff --git a/tests/stat/stat-nanoseconds.sh b/tests/stat/stat-nanoseconds.sh
2-
index a4f55cf6d..53855576d 100755
3-
--- a/tests/stat/stat-nanoseconds.sh
4-
+++ b/tests/stat/stat-nanoseconds.sh
1+
Index: gnu/tests/stat/stat-nanoseconds.sh
2+
===================================================================
3+
--- gnu.orig/tests/stat/stat-nanoseconds.sh
4+
+++ gnu/tests/stat/stat-nanoseconds.sh
55
@@ -1,6 +1,6 @@
66
#!/bin/sh
77
# Exercise format strings involving %:X, %:Y, etc.
@@ -10,23 +10,7 @@ index a4f55cf6d..53855576d 100755
1010
# Copyright (C) 2010-2024 Free Software Foundation, Inc.
1111

1212
# This program is free software: you can redistribute it and/or modify
13-
@@ -16,7 +16,7 @@
14-
# You should have received a copy of the GNU General Public License
15-
# along with this program. If not, see <https://www.gnu.org/licenses/>.
16-
17-
-. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
18-
+. "${srcdir=.}/tests/init.sh";
19-
print_ver_ stat
20-
21-
# Set this to avoid problems with weird time zones.
22-
@@ -24,23 +24,35 @@ TZ=UTC0
23-
export TZ
24-
25-
# Use a timestamp near the Epoch to avoid trouble with leap seconds.
26-
-touch -d '1970-01-01 18:43:33.023456789' k || framework_failure_
27-
+/usr/bin/touch -d '1970-01-01 18:43:33.023456789' k || framework_failure_
28-
29-
ls --full-time | grep 18:43:33.023456789 \
13+
@@ -30,17 +30,29 @@ ls --full-time | grep 18:43:33.023456789
3014
|| skip_ this file system does not support sub-second timestamps
3115

3216
test "$(stat -c %Y k)" = 67413 || fail=1

util/gnu-patches/tests_cksum_base64.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
diff --git a/tests/cksum/cksum-base64.pl b/tests/cksum/cksum-base64.pl
2-
index a037a1628..c6d87d447 100755
3-
--- a/tests/cksum/cksum-base64.pl
4-
+++ b/tests/cksum/cksum-base64.pl
1+
Index: gnu/tests/cksum/cksum-base64.pl
2+
===================================================================
3+
--- gnu.orig/tests/cksum/cksum-base64.pl
4+
+++ gnu/tests/cksum/cksum-base64.pl
55
@@ -91,8 +91,8 @@ my $prog = 'cksum';
66
my $fail = run_tests ($program_name, $prog, \@Tests, $save_temps, $verbose);
77

util/gnu-patches/tests_comm.pl.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
diff --git a/tests/misc/comm.pl b/tests/misc/comm.pl
2-
index 5bd5f56d7..8322d92ba 100755
3-
--- a/tests/misc/comm.pl
4-
+++ b/tests/misc/comm.pl
1+
Index: gnu/tests/misc/comm.pl
2+
===================================================================
3+
--- gnu.orig/tests/misc/comm.pl
4+
+++ gnu/tests/misc/comm.pl
55
@@ -73,18 +73,24 @@ my @Tests =
66

77
# invalid missing command line argument (1)

util/gnu-patches/tests_cut_error_msg.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
diff --git a/tests/cut/cut.pl b/tests/cut/cut.pl
2-
index 1670db02e..ed633792a 100755
3-
--- a/tests/cut/cut.pl
4-
+++ b/tests/cut/cut.pl
1+
Index: gnu/tests/cut/cut.pl
2+
===================================================================
3+
--- gnu.orig/tests/cut/cut.pl
4+
+++ gnu/tests/cut/cut.pl
55
@@ -29,13 +29,15 @@ my $mb_locale = $ENV{LOCALE_FR_UTF8};
66

77
my $prog = 'cut';

util/gnu-patches/tests_dup_source.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
diff --git a/tests/mv/dup-source.sh b/tests/mv/dup-source.sh
2-
index 7bcd82fc3..0f9005296 100755
3-
--- a/tests/mv/dup-source.sh
4-
+++ b/tests/mv/dup-source.sh
5-
@@ -83,7 +83,7 @@ $i: cannot stat 'a': No such file or directory
1+
Index: gnu/tests/mv/dup-source.sh
2+
===================================================================
3+
--- gnu.orig/tests/mv/dup-source.sh
4+
+++ gnu/tests/mv/dup-source.sh
5+
@@ -83,7 +83,7 @@ $i: cannot stat 'a': No such file or dir
66
$i: cannot stat 'a': No such file or directory
77
$i: cannot stat 'b': No such file or directory
88
$i: cannot move './b' to a subdirectory of itself, 'b/b'

util/gnu-patches/tests_env_env-S.pl.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
diff --git a/tests/env/env-S.pl b/tests/env/env-S.pl
2-
index 710ca82cf..af7cf6efa 100755
3-
--- a/tests/env/env-S.pl
4-
+++ b/tests/env/env-S.pl
1+
Index: gnu/tests/env/env-S.pl
2+
===================================================================
3+
--- gnu.orig/tests/env/env-S.pl
4+
+++ gnu/tests/env/env-S.pl
55
@@ -209,27 +209,28 @@ my @Tests =
66
{ERR=>"$prog: no terminating quote in -S string\n"}],
77
['err5', q[-S'A=B\\q'], {EXIT=>125},
Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,14 @@
1-
diff --git a/tests/factor/factor.pl b/tests/factor/factor.pl
2-
index b1406c266..3d97cd6a5 100755
3-
--- a/tests/factor/factor.pl
4-
+++ b/tests/factor/factor.pl
5-
@@ -61,12 +61,14 @@ my @Tests =
6-
# Map newer glibc diagnostic to expected.
7-
# Also map OpenBSD 5.1's "unknown option" to expected "invalid option".
1+
Index: gnu/tests/factor/factor.pl
2+
===================================================================
3+
--- gnu.orig/tests/factor/factor.pl
4+
+++ gnu/tests/factor/factor.pl
5+
@@ -63,7 +63,8 @@ my @Tests =
86
{ERR_SUBST => q!s/'1'/1/;s/unknown/invalid/!},
9-
- {ERR => "$prog: invalid option -- 1\n"
10-
- . "Try '$prog --help' for more information.\n"},
11-
+ {ERR => "error: unexpected argument '-1' found\n\n"
12-
+ . " tip: to pass '-1' as a value, use '-- -1'\n\n"
7+
{ERR => "error: unexpected argument '-1' found\n\n"
8+
. " tip: to pass '-1' as a value, use '-- -1'\n\n"
9+
- . "Usage: factor [OPTION]... [NUMBER]...\n"},
1310
+ . "Usage: factor [OPTION]... [NUMBER]...\n\n"
1411
+ . "For more information, try '--help'.\n"},
1512
{EXIT => 1}],
1613
['cont', 'a 4',
1714
{OUT => "4: 2 2\n"},
18-
- {ERR => "$prog: 'a' is not a valid positive integer\n"},
19-
+ {ERR => "$prog: warning: a: invalid digit found in string\n"},
20-
{EXIT => 1}],
21-
['bug-2012-a', '465658903', {OUT => '15259 30517'}],
22-
['bug-2012-b', '2242724851', {OUT => '33487 66973'}],

util/gnu-patches/tests_invalid_opt.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
diff --git a/tests/misc/invalid-opt.pl b/tests/misc/invalid-opt.pl
2-
index 4b9c4c184..4ccd89482 100755
3-
--- a/tests/misc/invalid-opt.pl
4-
+++ b/tests/misc/invalid-opt.pl
1+
Index: gnu/tests/misc/invalid-opt.pl
2+
===================================================================
3+
--- gnu.orig/tests/misc/invalid-opt.pl
4+
+++ gnu/tests/misc/invalid-opt.pl
55
@@ -74,23 +74,13 @@ foreach my $prog (@built_programs)
66
defined $out
77
or $out = '';

0 commit comments

Comments
 (0)