From ec542665485435167bc5213c6e96ee2b776a9eefe989d2d884dc3037081fa00e Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 1 Aug 2022 21:17:24 +0000 Subject: [PATCH 1/4] - refresh coreutils-i18n.patch to prevent unexpand from failing on control characters - extend psuffix handling to be quilt(1) compatible OBS-URL: https://build.opensuse.org/package/show/Base:System/coreutils?expand=0&rev=334 --- coreutils-i18n.patch | 22 +++++++++++++++------- coreutils.changes | 7 +++++++ coreutils.spec | 10 ++++++---- 3 files changed, 28 insertions(+), 11 deletions(-) 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..de1d37e 100644 --- a/coreutils.changes +++ b/coreutils.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Aug 1 21:16:27 UTC 2022 - Dirk Müller + +- refresh coreutils-i18n.patch to prevent unexpand from failing on control + characters +- 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..149ced9 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 From 03bb9aece57e3e4b3a5dc9d2f4faff5f5ac6f166126bbe8448128db7e0f7b162 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Tue, 2 Aug 2022 09:18:33 +0000 Subject: [PATCH 2/4] characters (brc#2112870) - extend psuffix handling to be quilt(1) compatible OBS-URL: https://build.opensuse.org/package/show/Base:System/coreutils?expand=0&rev=335 --- coreutils.changes | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/coreutils.changes b/coreutils.changes index de1d37e..653f13e 100644 --- a/coreutils.changes +++ b/coreutils.changes @@ -2,8 +2,8 @@ Mon Aug 1 21:16:27 UTC 2022 - Dirk Müller - refresh coreutils-i18n.patch to prevent unexpand from failing on control - characters -- extend psuffix handling to be quilt(1) compatible + characters (brc#2112870) +- extend psuffix handling to be quilt(1) compatible ------------------------------------------------------------------- Tue Apr 26 08:21:58 UTC 2022 - Dirk Müller From 16c285303a208230afe800fd94d6e4ab9b1b6d89164ad00ba52908306521dda2 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Tue, 2 Aug 2022 10:55:51 +0000 Subject: [PATCH 3/4] characters (brc#2112870) (bsc#1202029) OBS-URL: https://build.opensuse.org/package/show/Base:System/coreutils?expand=0&rev=336 --- coreutils-i18n.patch | 2 +- coreutils.changes | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/coreutils-i18n.patch b/coreutils-i18n.patch index d492aad..470e79f 100644 --- a/coreutils-i18n.patch +++ b/coreutils-i18n.patch @@ -4283,7 +4283,7 @@ index 7d6100f..04cd646 100644 - column++; + /* mb_width() returns 0 for control characters */ + const int width = mb_width (c); -+ column += (width) ? width : 1; ++ column += MIN(1, width); if (!column) die (EXIT_FAILURE, 0, _("input line is too long")); } diff --git a/coreutils.changes b/coreutils.changes index 653f13e..0d174e0 100644 --- a/coreutils.changes +++ b/coreutils.changes @@ -2,7 +2,7 @@ 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) + characters (brc#2112870) (bsc#1202029) - extend psuffix handling to be quilt(1) compatible ------------------------------------------------------------------- From baaa9116302f251a646a661023d5672fb63c763f1976fbc7f6850f173b416d0f Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Tue, 2 Aug 2022 11:36:28 +0000 Subject: [PATCH 4/4] - add missing hostname buildrequires characters (brc#2112870) (bsc#1202029) OBS-URL: https://build.opensuse.org/package/show/Base:System/coreutils?expand=0&rev=337 --- coreutils-i18n.patch | 2 +- coreutils.changes | 7 ++++++- coreutils.spec | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/coreutils-i18n.patch b/coreutils-i18n.patch index 470e79f..d492aad 100644 --- a/coreutils-i18n.patch +++ b/coreutils-i18n.patch @@ -4283,7 +4283,7 @@ index 7d6100f..04cd646 100644 - column++; + /* mb_width() returns 0 for control characters */ + const int width = mb_width (c); -+ column += MIN(1, width); ++ column += (width) ? width : 1; if (!column) die (EXIT_FAILURE, 0, _("input line is too long")); } diff --git a/coreutils.changes b/coreutils.changes index 0d174e0..55f816d 100644 --- a/coreutils.changes +++ b/coreutils.changes @@ -1,8 +1,13 @@ +------------------------------------------------------------------- +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) + characters (brc#2112870) (bsc#1202029) - extend psuffix handling to be quilt(1) compatible ------------------------------------------------------------------- diff --git a/coreutils.spec b/coreutils.spec index 149ced9..2f1cc15 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -66,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