Skip to content

Commit e50e81d

Browse files
authored
Merge pull request #7127 from sylvestre/debug2
gnu patches: move to use quilt
2 parents 0b72d3a + 0b63fe5 commit e50e81d

13 files changed

+57
-41
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: |

DEVELOPMENT.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,8 @@ DEBUG=1 bash util/run-gnu-test.sh tests/misc/sm3sum.pl
241241

242242
Note that GNU test suite relies on individual utilities (not the multicall binary).
243243

244+
You also need to install [quilt](https://savannah.nongnu.org/projects/quilt), a tool used to manage a stack of patches for modifying GNU tests.
245+
244246
On FreeBSD, you need to install packages for GNU coreutils and sed (used in shell scripts instead of system commands):
245247

246248
```shell

util/build-gnu.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,12 @@ 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+
cd "$path_GNU"
100+
quilt push -a
101+
cd -
102+
97103
"${MAKE}" PROFILE="${UU_MAKE_PROFILE}"
98104

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

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

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

util/gnu-patches/series

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
tests_factor_factor.pl.patch
2+
tests_cksum_base64.patch
3+
tests_comm.pl.patch
4+
tests_cut_error_msg.patch
5+
tests_dup_source.patch
6+
tests_env_env-S.pl.patch
7+
tests_invalid_opt.patch
8+
tests_ls_no_cap.patch
9+
tests_sort_merge.pl.patch
10+
tests_tsort.patch

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: 4 additions & 4 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".

0 commit comments

Comments
 (0)