mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 11:07:44 +00:00
gnu patches: move to use quilt
This commit is contained in:
parent
6a5f2aa334
commit
0b63fe5f43
13 changed files with 57 additions and 41 deletions
2
.github/workflows/GnuTests.yml
vendored
2
.github/workflows/GnuTests.yml
vendored
|
@ -105,7 +105,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
## Install dependencies
|
## Install dependencies
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
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
|
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
|
||||||
- name: Add various locales
|
- name: Add various locales
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -241,6 +241,8 @@ DEBUG=1 bash util/run-gnu-test.sh tests/misc/sm3sum.pl
|
||||||
|
|
||||||
Note that GNU test suite relies on individual utilities (not the multicall binary).
|
Note that GNU test suite relies on individual utilities (not the multicall binary).
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
On FreeBSD, you need to install packages for GNU coreutils and sed (used in shell scripts instead of system commands):
|
On FreeBSD, you need to install packages for GNU coreutils and sed (used in shell scripts instead of system commands):
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
|
|
@ -94,6 +94,12 @@ if [ "$(uname)" == "Linux" ]; then
|
||||||
export SELINUX_ENABLED=1
|
export SELINUX_ENABLED=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Set up quilt for patch management
|
||||||
|
export QUILT_PATCHES="${ME_dir}/gnu-patches/"
|
||||||
|
cd "$path_GNU"
|
||||||
|
quilt push -a
|
||||||
|
cd -
|
||||||
|
|
||||||
"${MAKE}" PROFILE="${UU_MAKE_PROFILE}"
|
"${MAKE}" PROFILE="${UU_MAKE_PROFILE}"
|
||||||
|
|
||||||
cp "${UU_BUILD_DIR}/install" "${UU_BUILD_DIR}/ginstall" # The GNU tests rename this script before running, to avoid confusion with the make target
|
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
|
||||||
# we should not regress our project just to match what GNU is going.
|
# we should not regress our project just to match what GNU is going.
|
||||||
# So, do some changes on the fly
|
# So, do some changes on the fly
|
||||||
|
|
||||||
eval cat "$path_UUTILS/util/gnu-patches/*.patch" | patch -N -r - -d "$path_GNU" -p 1 -i - || true
|
|
||||||
|
|
||||||
sed -i -e "s|rm: cannot remove 'e/slink'|rm: cannot remove 'e'|g" tests/rm/fail-eacces.sh
|
sed -i -e "s|rm: cannot remove 'e/slink'|rm: cannot remove 'e'|g" tests/rm/fail-eacces.sh
|
||||||
|
|
||||||
sed -i -e "s|rm: cannot remove 'a/b/file'|rm: cannot remove 'a'|g" tests/rm/cycle.sh
|
sed -i -e "s|rm: cannot remove 'a/b/file'|rm: cannot remove 'a'|g" tests/rm/cycle.sh
|
||||||
|
|
10
util/gnu-patches/series
Normal file
10
util/gnu-patches/series
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
tests_factor_factor.pl.patch
|
||||||
|
tests_cksum_base64.patch
|
||||||
|
tests_comm.pl.patch
|
||||||
|
tests_cut_error_msg.patch
|
||||||
|
tests_dup_source.patch
|
||||||
|
tests_env_env-S.pl.patch
|
||||||
|
tests_invalid_opt.patch
|
||||||
|
tests_ls_no_cap.patch
|
||||||
|
tests_sort_merge.pl.patch
|
||||||
|
tests_tsort.patch
|
|
@ -1,8 +1,8 @@
|
||||||
diff --git a/tests/cksum/cksum-base64.pl b/tests/cksum/cksum-base64.pl
|
Index: gnu/tests/cksum/cksum-base64.pl
|
||||||
index a037a1628..c6d87d447 100755
|
===================================================================
|
||||||
--- a/tests/cksum/cksum-base64.pl
|
--- gnu.orig/tests/cksum/cksum-base64.pl
|
||||||
+++ b/tests/cksum/cksum-base64.pl
|
+++ gnu/tests/cksum/cksum-base64.pl
|
||||||
@@ -91,8 +91,8 @@ my $prog = 'cksum';
|
@@ -92,8 +92,8 @@ my $prog = 'cksum';
|
||||||
my $fail = run_tests ($program_name, $prog, \@Tests, $save_temps, $verbose);
|
my $fail = run_tests ($program_name, $prog, \@Tests, $save_temps, $verbose);
|
||||||
|
|
||||||
# Ensure hash names from cksum --help match those in @pairs above.
|
# Ensure hash names from cksum --help match those in @pairs above.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
diff --git a/tests/misc/comm.pl b/tests/misc/comm.pl
|
Index: gnu/tests/misc/comm.pl
|
||||||
index 5bd5f56d7..8322d92ba 100755
|
===================================================================
|
||||||
--- a/tests/misc/comm.pl
|
--- gnu.orig/tests/misc/comm.pl
|
||||||
+++ b/tests/misc/comm.pl
|
+++ gnu/tests/misc/comm.pl
|
||||||
@@ -73,18 +73,24 @@ my @Tests =
|
@@ -73,18 +73,24 @@ my @Tests =
|
||||||
|
|
||||||
# invalid missing command line argument (1)
|
# invalid missing command line argument (1)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
diff --git a/tests/cut/cut.pl b/tests/cut/cut.pl
|
Index: gnu/tests/cut/cut.pl
|
||||||
index 1670db02e..ed633792a 100755
|
===================================================================
|
||||||
--- a/tests/cut/cut.pl
|
--- gnu.orig/tests/cut/cut.pl
|
||||||
+++ b/tests/cut/cut.pl
|
+++ gnu/tests/cut/cut.pl
|
||||||
@@ -29,13 +29,15 @@ my $mb_locale = $ENV{LOCALE_FR_UTF8};
|
@@ -29,13 +29,15 @@ my $mb_locale = $ENV{LOCALE_FR_UTF8};
|
||||||
|
|
||||||
my $prog = 'cut';
|
my $prog = 'cut';
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
diff --git a/tests/mv/dup-source.sh b/tests/mv/dup-source.sh
|
Index: gnu/tests/mv/dup-source.sh
|
||||||
index 7bcd82fc3..0f9005296 100755
|
===================================================================
|
||||||
--- a/tests/mv/dup-source.sh
|
--- gnu.orig/tests/mv/dup-source.sh
|
||||||
+++ b/tests/mv/dup-source.sh
|
+++ gnu/tests/mv/dup-source.sh
|
||||||
@@ -83,7 +83,7 @@ $i: cannot stat 'a': No such file or directory
|
@@ -83,7 +83,7 @@ $i: cannot stat 'a': No such file or dir
|
||||||
$i: cannot stat 'a': No such file or directory
|
$i: cannot stat 'a': No such file or directory
|
||||||
$i: cannot stat 'b': No such file or directory
|
$i: cannot stat 'b': No such file or directory
|
||||||
$i: cannot move './b' to a subdirectory of itself, 'b/b'
|
$i: cannot move './b' to a subdirectory of itself, 'b/b'
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
diff --git a/tests/env/env-S.pl b/tests/env/env-S.pl
|
Index: gnu/tests/env/env-S.pl
|
||||||
index 710ca82cf..af7cf6efa 100755
|
===================================================================
|
||||||
--- a/tests/env/env-S.pl
|
--- gnu.orig/tests/env/env-S.pl
|
||||||
+++ b/tests/env/env-S.pl
|
+++ gnu/tests/env/env-S.pl
|
||||||
@@ -209,27 +209,28 @@ my @Tests =
|
@@ -209,27 +209,28 @@ my @Tests =
|
||||||
{ERR=>"$prog: no terminating quote in -S string\n"}],
|
{ERR=>"$prog: no terminating quote in -S string\n"}],
|
||||||
['err5', q[-S'A=B\\q'], {EXIT=>125},
|
['err5', q[-S'A=B\\q'], {EXIT=>125},
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
diff --git a/tests/factor/factor.pl b/tests/factor/factor.pl
|
Index: gnu/tests/factor/factor.pl
|
||||||
index b1406c266..3d97cd6a5 100755
|
===================================================================
|
||||||
--- a/tests/factor/factor.pl
|
--- gnu.orig/tests/factor/factor.pl
|
||||||
+++ b/tests/factor/factor.pl
|
+++ gnu/tests/factor/factor.pl
|
||||||
@@ -61,12 +61,14 @@ my @Tests =
|
@@ -61,12 +61,14 @@ my @Tests =
|
||||||
# Map newer glibc diagnostic to expected.
|
# Map newer glibc diagnostic to expected.
|
||||||
# Also map OpenBSD 5.1's "unknown option" to expected "invalid option".
|
# Also map OpenBSD 5.1's "unknown option" to expected "invalid option".
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
diff --git a/tests/misc/invalid-opt.pl b/tests/misc/invalid-opt.pl
|
Index: gnu/tests/misc/invalid-opt.pl
|
||||||
index 4b9c4c184..4ccd89482 100755
|
===================================================================
|
||||||
--- a/tests/misc/invalid-opt.pl
|
--- gnu.orig/tests/misc/invalid-opt.pl
|
||||||
+++ b/tests/misc/invalid-opt.pl
|
+++ gnu/tests/misc/invalid-opt.pl
|
||||||
@@ -74,23 +74,13 @@ foreach my $prog (@built_programs)
|
@@ -74,23 +74,13 @@ foreach my $prog (@built_programs)
|
||||||
defined $out
|
defined $out
|
||||||
or $out = '';
|
or $out = '';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
diff --git a/tests/sort/sort-merge.pl b/tests/sort/sort-merge.pl
|
Index: gnu/tests/sort/sort-merge.pl
|
||||||
index 89eed0c64..c2f5aa7e5 100755
|
===================================================================
|
||||||
--- a/tests/sort/sort-merge.pl
|
--- gnu.orig/tests/sort/sort-merge.pl
|
||||||
+++ b/tests/sort/sort-merge.pl
|
+++ gnu/tests/sort/sort-merge.pl
|
||||||
@@ -43,22 +43,22 @@ my @Tests =
|
@@ -43,22 +43,22 @@ my @Tests =
|
||||||
# check validation of --batch-size option
|
# check validation of --batch-size option
|
||||||
['nmerge-0', "-m --batch-size=0", @inputs,
|
['nmerge-0', "-m --batch-size=0", @inputs,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
diff --git a/tests/misc/tsort.pl b/tests/misc/tsort.pl
|
Index: gnu/tests/misc/tsort.pl
|
||||||
index 70bdc474c..4fd420a4e 100755
|
===================================================================
|
||||||
--- a/tests/misc/tsort.pl
|
--- gnu.orig/tests/misc/tsort.pl
|
||||||
+++ b/tests/misc/tsort.pl
|
+++ gnu/tests/misc/tsort.pl
|
||||||
@@ -54,8 +54,10 @@ my @Tests =
|
@@ -54,8 +54,10 @@ my @Tests =
|
||||||
|
|
||||||
['only-one', {IN => {f => ""}}, {IN => {g => ""}},
|
['only-one', {IN => {f => ""}}, {IN => {g => ""}},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue