Skip to content

Commit 5a4334d

Browse files
committed
gnu patches: move to use quilt
1 parent 8b46229 commit 5a4334d

11 files changed

+49
-42
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: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,15 @@ if [ "$(uname)" == "Linux" ]; then
9494
export SELINUX_ENABLED=1
9595
fi
9696

97+
# Set up quilt for patch management
98+
export QUILT_PATCHES="${ME_dir}/gnu-patches/"
99+
ls -d ${QUILT_PATCHES}/
100+
ls ${QUILT_PATCHES}/
101+
cd "$path_GNU"
102+
pwd
103+
quilt push -a
104+
cd -
105+
97106
"${MAKE}" PROFILE="${UU_MAKE_PROFILE}"
98107

99108
cp "${UU_BUILD_DIR}/install" "${UU_BUILD_DIR}/ginstall" # The GNU tests rename this script before running, to avoid confusion with the make target
@@ -221,8 +230,6 @@ grep -rlE '/usr/local/bin/\s?/usr/local/bin' init.cfg tests/* | xargs -r sed -Ei
221230
# we should not regress our project just to match what GNU is going.
222231
# So, do some changes on the fly
223232

224-
eval cat "$path_UUTILS/util/gnu-patches/*.patch" | patch -N -r - -d "$path_GNU" -p 1 -i - || true
225-
226233
sed -i -e "s|rm: cannot remove 'e/slink'|rm: cannot remove 'e'|g" tests/rm/fail-eacces.sh
227234

228235
sed -i -e "s|rm: cannot remove 'a/b/file'|rm: cannot remove 'a'|g" tests/rm/cycle.sh

util/gnu-patches/tests_cksum_base64.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
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
5-
@@ -91,8 +91,8 @@ my $prog = 'cksum';
1+
Index: gnu/tests/cksum/cksum-base64.pl
2+
===================================================================
3+
--- gnu.orig/tests/cksum/cksum-base64.pl
4+
+++ gnu/tests/cksum/cksum-base64.pl
5+
@@ -92,8 +92,8 @@ my $prog = 'cksum';
66
my $fail = run_tests ($program_name, $prog, \@Tests, $save_temps, $verbose);
77

88
# Ensure hash names from cksum --help match those in @pairs above.

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},

util/gnu-patches/tests_factor_factor.pl.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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
1+
Index: gnu/tests/factor/factor.pl
2+
===================================================================
3+
--- gnu.orig/tests/factor/factor.pl
4+
+++ gnu/tests/factor/factor.pl
55
@@ -61,12 +61,14 @@ my @Tests =
66
# Map newer glibc diagnostic to expected.
77
# Also map OpenBSD 5.1's "unknown option" to expected "invalid option".
@@ -16,7 +16,7 @@ index b1406c266..3d97cd6a5 100755
1616
['cont', 'a 4',
1717
{OUT => "4: 2 2\n"},
1818
- {ERR => "$prog: 'a' is not a valid positive integer\n"},
19-
+ {ERR => "$prog: warning: a: invalid digit found in string\n"},
19+
+ {ERR => "$prog: warning: 'a' is not a valid positive integer\n"},
2020
{EXIT => 1}],
2121
['bug-2012-a', '465658903', {OUT => '15259 30517'}],
2222
['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 = '';

util/gnu-patches/tests_sort_merge.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/sort/sort-merge.pl b/tests/sort/sort-merge.pl
2-
index 89eed0c64..c2f5aa7e5 100755
3-
--- a/tests/sort/sort-merge.pl
4-
+++ b/tests/sort/sort-merge.pl
1+
Index: gnu/tests/sort/sort-merge.pl
2+
===================================================================
3+
--- gnu.orig/tests/sort/sort-merge.pl
4+
+++ gnu/tests/sort/sort-merge.pl
55
@@ -43,22 +43,22 @@ my @Tests =
66
# check validation of --batch-size option
77
['nmerge-0', "-m --batch-size=0", @inputs,

0 commit comments

Comments
 (0)