diff --git a/2bc66c5ea7e507786a45c1b6b15fe74a338240f4.patch b/2bc66c5ea7e507786a45c1b6b15fe74a338240f4.patch new file mode 100644 index 0000000000000000000000000000000000000000..0c87841b58ec52b9afebfcdeb7e1391478787616 --- /dev/null +++ b/2bc66c5ea7e507786a45c1b6b15fe74a338240f4.patch @@ -0,0 +1,40 @@ +diff --git a/NEWS b/NEWS +index 657477ac7..61b5d42f6 100644 +--- a/NEWS ++++ b/NEWS +@@ -20,6 +20,10 @@ GNU coreutils NEWS -*- outline -*- + ls no longer crashes when printing the SELinux context for unstatable files. + [bug introduced in coreutils-6.9.91] + ++ tr no longer crashes when using --complement with certain ++ invalid combinations of case character classes. ++ [bug introduced in coreutils-8.6] ++ + ** Changes in behavior + + cp and install now default to copy-on-write (COW) if available. +diff --git a/src/tr.c b/src/tr.c +index 6f7650764..94794a28e 100644 +--- a/src/tr.c ++++ b/src/tr.c +@@ -1176,7 +1176,7 @@ validate_case_classes (struct Spec_list *s1, struct Spec_list *s2) + bool s1_new_element = true; + bool s2_new_element = true; + +- if (!s2->has_char_class) ++ if (complement || !s2->has_char_class) + return; + + for (int i = 0; i < N_CHARS; i++) +diff --git a/tests/misc/tr-case-class.sh b/tests/misc/tr-case-class.sh +index 470197ee3..9f442c029 100755 +--- a/tests/misc/tr-case-class.sh ++++ b/tests/misc/tr-case-class.sh +@@ -110,4 +110,7 @@ the latter string must not end with a character class' > exp + compare exp out || fail=1 + fi + ++# coreutils 8.6 - 8.32 inclusive, would abort trying to validate the following ++returns_ 1 tr -c '[:upper:]\000-\370' '[:lower:]' < /dev/null || fail=1 ++ + Exit $fail diff --git a/coreutils.spec b/coreutils.spec index f5a08aa750f6eecebb0afdb66bc44e9d689578f4..1269febca71ec4d8aae1dda8b0d1cee4a1537e3f 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -1,6 +1,6 @@ Name: coreutils Version: 8.32 -Release: 2 +Release: 3 License: GPLv3+ Summary: A set of basic GNU tools commonly used in shell scripts Url: https://www.gnu.org/software/coreutils/ @@ -25,6 +25,7 @@ Patch8: skip-the-tests-that-require-selinux-if-selinux-is-di.patch Patch9: coreutils-8.32-ls-removed-dir.patch Patch10: coreutils-8.32-leaf-opt-xfs.patch +Patch6000: 2bc66c5ea7e507786a45c1b6b15fe74a338240f4.patch Conflicts: filesystem < 3 # To avoid clobbering installs @@ -135,6 +136,9 @@ fi %{_mandir}/man*/* %changelog +* 20201117003007632079 patch-tracking 8.32-3 +- append patch file of upstream repository from <2bc66c5ea7e507786a45c1b6b15fe74a338240f4> to <2bc66c5ea7e507786a45c1b6b15fe74a338240f4> + * Wed Aug 26 2020 chenbo pan - 8.32-2 - fix patch error @@ -221,4 +225,4 @@ fi - reintroduce very old Provides (mktemp, sh-utils, textwrap, fileutils, stat) * Thu Jul 12 2018 hexiaowen - 8.30-1 -- Pacakge init +- Pacakge init \ No newline at end of file