diff --git a/coreutils-i18n.patch b/coreutils-i18n.patch index 059f254..d492aad 100644 --- a/coreutils-i18n.patch +++ b/coreutils-i18n.patch @@ -1,3 +1,9 @@ +From 01010419a6499768563e7b2f3fd56cf16edda75e Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Mon, 4 Oct 2021 08:54:37 +0200 +Subject: [PATCH] coreutils-i18n.patch + +--- bootstrap.conf | 1 + configure.ac | 2 + lib/linebuffer.h | 8 + @@ -13,7 +19,7 @@ src/local.mk | 4 +- src/pr.c | 443 ++++++++++++++++++-- src/sort.c | 792 +++++++++++++++++++++++++++++++++--- - src/unexpand.c | 101 ++++- + src/unexpand.c | 103 ++++- src/uniq.c | 119 +++++- tests/Coreutils.pm | 3 + tests/expand/mb.sh | 183 +++++++++ @@ -29,7 +35,7 @@ tests/misc/uniq.pl | 55 +++ tests/pr/pr-tests.pl | 49 +++ tests/unexpand/mb.sh | 172 ++++++++ - 31 files changed, 3698 insertions(+), 242 deletions(-) + 31 files changed, 3700 insertions(+), 242 deletions(-) create mode 100644 lib/mbfile.c create mode 100644 lib/mbfile.h create mode 100644 m4/mbfile.m4 @@ -4267,7 +4273,7 @@ index 7d6100f..04cd646 100644 { /* Go back one column, and force recalculation of the next tab stop. */ -@@ -218,9 +277,9 @@ unexpand (void) +@@ -218,9 +277,11 @@ unexpand (void) next_tab_column = column; tab_index -= !!tab_index; } @@ -4275,11 +4281,13 @@ index 7d6100f..04cd646 100644 + else if (!mb_iseq (c, '\n')) { - column++; -+ column += mb_width (c); ++ /* mb_width() returns 0 for control characters */ ++ const int width = mb_width (c); ++ column += (width) ? width : 1; if (!column) die (EXIT_FAILURE, 0, _("input line is too long")); } -@@ -228,8 +287,11 @@ unexpand (void) +@@ -228,8 +289,11 @@ unexpand (void) if (pending) { if (pending > 1 && one_blank_before_tab_stop) @@ -4293,7 +4301,7 @@ index 7d6100f..04cd646 100644 die (EXIT_FAILURE, errno, _("write error")); pending = 0; one_blank_before_tab_stop = false; -@@ -239,16 +301,17 @@ unexpand (void) +@@ -239,16 +303,17 @@ unexpand (void) convert &= convert_entire_line || blank; } @@ -4483,7 +4491,7 @@ diff --git a/tests/Coreutils.pm b/tests/Coreutils.pm index fad7ab9..c9021a6 100644 --- a/tests/Coreutils.pm +++ b/tests/Coreutils.pm -@@ -264,6 +264,9 @@ sub run_tests ($$$$$) +@@ -269,6 +269,9 @@ sub run_tests ($$$$$) # Yes, this is an arbitrary limit. If it causes trouble, # consider removing it. my $max = 30; diff --git a/coreutils.changes b/coreutils.changes index 0c3945b..55f816d 100644 --- a/coreutils.changes +++ b/coreutils.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Tue Aug 2 11:05:45 UTC 2022 - Dirk Müller + +- add missing hostname buildrequires + +------------------------------------------------------------------- +Mon Aug 1 21:16:27 UTC 2022 - Dirk Müller + +- refresh coreutils-i18n.patch to prevent unexpand from failing on control + characters (brc#2112870) (bsc#1202029) +- extend psuffix handling to be quilt(1) compatible + ------------------------------------------------------------------- Tue Apr 26 08:21:58 UTC 2022 - Dirk Müller diff --git a/coreutils.spec b/coreutils.spec index c312ae9..2f1cc15 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -20,12 +20,14 @@ # macros but OBS and the bots that rely on parser information from # OBS can't deal with all of them %global flavor @BUILD_FLAVOR@%{nil} -%if "%{flavor}" != "" -%define psuffix -%{flavor} +%if "%{flavor}" == "single" +%global psuffix -single +%elif "%{flavor}" == "testsuite" +%global psuffix -testsuite %else -%define psuffix %{nil} +%global psuffix %{nil} %endif -Name: coreutils%{psuffix} +Name: coreutils%{?psuffix} Version: 9.1 Release: 0 Summary: GNU Core Utilities @@ -64,6 +66,7 @@ Patch810: coreutils-skip-tests-rm-ext3-perf.patch Patch850: gnulib-simple-backup-fix.patch BuildRequires: automake BuildRequires: gmp-devel +BuildRequires: hostname BuildRequires: libacl-devel BuildRequires: libattr-devel BuildRequires: libcap-devel