SHA256
1
0
forked from pool/coreutils

Accepting request 310289 from home:bernhard-voelker

- coreutils-doc-adjust-reference-to-info-nodes-in-man-pages.patch:
  add upstream patch:
  doc: adjust reference to info nodes in man pages (boo#933396)
- coreutils-i18n.patch: Use a later version of the previous patch
  to fix the sort I18N issue (boo#928749, CVE-2015-4041) to also
  avoid CVE-2015-4042.
  https://github.com/pixelb/coreutils/commit/bea5e36cc876

OBS-URL: https://build.opensuse.org/request/show/310289
OBS-URL: https://build.opensuse.org/package/show/Base:System/coreutils?expand=0&rev=260
This commit is contained in:
Bernhard Voelker 2015-06-04 11:27:32 +00:00 committed by Git OBS Bridge
parent ec1de2b338
commit 188d3e2e8b
7 changed files with 113 additions and 13 deletions

View File

@ -0,0 +1,66 @@
Upstream patch on top of v8.23, i.e. to be removed with v8.24:
Fixes https://bugzilla.opensuse.org/show_bug.cgi?id=933396
Upstream patch:
http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=e4627416b4be
From e4627416b4be078a184372b9b0582517612a3c39 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
Date: Tue, 9 Sep 2014 02:05:45 +0100
Subject: [PATCH] doc: adjust reference to info nodes in man pages
old form: coreutils '$cmd invocation'
new form: '(coreutils) $cmd invocation'
The old form erroneously referenced the node for the 'coreutils'
multi-call program. Now that problematic node name was renamed
in commit v8.23-18-g72e470b, but the newer less ambiguous form
also has the advantage of working with the pinfo viewer for example.
Full discussion at http://bugs.gnu.org/18428
* man/local.mk: Adjust man page references to texinfo nodes.
* src/system.h: Adjust --help references to texinfo nodes.
---
man/dummy-man | 2 +-
man/local.mk | 2 +-
src/system.h | 3 ++-
3 files changed, 4 insertions(+), 3 deletions(-)
Index: man/dummy-man
===================================================================
--- man/dummy-man.orig
+++ man/dummy-man
@@ -69,5 +69,5 @@ The full documentation for
is maintained as a Texinfo manual, which should be accessible
on your system via the command
.IP
-.B info coreutils $bs(aq$progname invocation$bs(aq
+.B info $bs(aq(coreutils) $progname invocation$bs(aq
END
Index: man/local.mk
===================================================================
--- man/local.mk.orig
+++ man/local.mk
@@ -102,7 +102,7 @@ man/dynamic-deps.mk: Makefile
--source='$(PACKAGE_STRING)' \
--include=$(srcdir)/man/$$name.x \
--output=$$t/$$name.1 $$t/$$argv \
- --info-page='coreutils \(aq'$$name' invocation\(aq' \
+ --info-page='\(aq(coreutils) '$$name' invocation\(aq' \
&& sed \
-e 's|$*\.td/||g' \
-e '/For complete documentation/d' \
Index: src/system.h
===================================================================
--- src/system.h.orig
+++ src/system.h
@@ -582,7 +582,8 @@ emit_ancillary_info (void)
last_component (program_name));
}
printf (_("For complete documentation, run: "
- "info coreutils '%s invocation'\n"), last_component (program_name));
+ "info '(coreutils) %s invocation'\n"),
+ last_component (program_name));
}
static inline void

View File

@ -4,7 +4,7 @@
src/fold.c | 308 ++++++++++++++++--
src/join.c | 363 ++++++++++++++++++---
src/pr.c | 444 +++++++++++++++++++++++---
src/sort.c | 743 +++++++++++++++++++++++++++++++++++++++++---
src/sort.c | 745 +++++++++++++++++++++++++++++++++++++++++---
src/unexpand.c | 228 +++++++++++++
src/uniq.c | 265 +++++++++++++++
tests/i18n/sort.sh | 29 +
@ -19,7 +19,7 @@
tests/misc/unexpand.pl | 39 ++
tests/misc/uniq.pl | 55 +++
tests/pr/pr-tests.pl | 49 ++
21 files changed, 3224 insertions(+), 180 deletions(-)
21 files changed, 3226 insertions(+), 180 deletions(-)
Index: lib/linebuffer.h
===================================================================
@ -3152,7 +3152,7 @@ Index: src/sort.c
else if (key->random)
diff = compare_random (ta, tlena, tb, tlenb);
else if (key->version)
@@ -2695,6 +3135,191 @@ keycompare (struct line const *a, struct
@@ -2695,6 +3135,193 @@ keycompare (struct line const *a, struct
return key->reverse ? -diff : diff;
}
@ -3262,8 +3262,10 @@ Index: src/sort.c
+
+ if (ignore || translate)
+ {
+ char *copy_a = (char *) xmalloc((lena + lenb) * MB_CUR_MAX + 2);
+ char *copy_b = copy_a + (lena * MB_CUR_MAX) + 1;
+ if (SIZE_MAX - lenb - 2 < lena)
+ xalloc_die ();
+ char *copy_a = (char *) xnmalloc (lena + lenb + 2, MB_CUR_MAX);
+ char *copy_b = copy_a + lena * MB_CUR_MAX + 1;
+ size_t new_len_a, new_len_b;
+ size_t i, j;
+
@ -3344,7 +3346,7 @@ Index: src/sort.c
/* Compare two lines A and B, returning negative, zero, or positive
depending on whether A compares less than, equal to, or greater than B. */
@@ -2722,7 +3347,7 @@ compare (struct line const *a, struct li
@@ -2722,7 +3349,7 @@ compare (struct line const *a, struct li
diff = - NONZERO (blen);
else if (blen == 0)
diff = 1;
@ -3353,7 +3355,7 @@ Index: src/sort.c
{
/* Note xmemcoll0 is a performance enhancement as
it will not unconditionally write '\0' after the
@@ -4121,6 +4746,7 @@ set_ordering (char const *s, struct keyf
@@ -4121,6 +4748,7 @@ set_ordering (char const *s, struct keyf
break;
case 'f':
key->translate = fold_toupper;
@ -3361,7 +3363,7 @@ Index: src/sort.c
break;
case 'g':
key->general_numeric = true;
@@ -4198,7 +4824,7 @@ main (int argc, char **argv)
@@ -4198,7 +4826,7 @@ main (int argc, char **argv)
initialize_exit_failure (SORT_FAILURE);
hard_LC_COLLATE = hard_locale (LC_COLLATE);
@ -3370,7 +3372,7 @@ Index: src/sort.c
hard_LC_TIME = hard_locale (LC_TIME);
#endif
@@ -4219,6 +4845,29 @@ main (int argc, char **argv)
@@ -4219,6 +4847,29 @@ main (int argc, char **argv)
thousands_sep = -1;
}
@ -3400,7 +3402,7 @@ Index: src/sort.c
have_read_stdin = false;
inittables ();
@@ -4493,13 +5142,34 @@ main (int argc, char **argv)
@@ -4493,13 +5144,34 @@ main (int argc, char **argv)
case 't':
{
@ -3439,7 +3441,7 @@ Index: src/sort.c
else
{
/* Provoke with 'sort -txx'. Complain about
@@ -4510,9 +5180,12 @@ main (int argc, char **argv)
@@ -4510,9 +5182,12 @@ main (int argc, char **argv)
quote (optarg));
}
}

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Wed Jun 3 10:56:39 UTC 2015 - mail@bernhard-voelker.de
- coreutils-doc-adjust-reference-to-info-nodes-in-man-pages.patch:
add upstream patch:
doc: adjust reference to info nodes in man pages (boo#933396)
- coreutils-i18n.patch: Use a later version of the previous patch
to fix the sort I18N issue (boo#928749, CVE-2015-4041) to also
avoid CVE-2015-4042.
https://github.com/pixelb/coreutils/commit/bea5e36cc876
-------------------------------------------------------------------
Tue May 12 09:32:53 UTC 2015 - mail@bernhard-voelker.de

View File

@ -156,6 +156,10 @@ Patch503: coreutils-tests-rm-ext3-perf-increase-timeout.patch
# Work around false positives of the testsuite on OBS/aarch64.
Patch504: coreutils-tests-aarch64-env.patch
# Upstream patch on top of v8.23 (to be removed in v8.24).
# Fix reference to info pages in man pages (boo#933396).
Patch505: coreutils-doc-adjust-reference-to-info-nodes-in-man-pages.patch
# ================================================
%description
These are the GNU core utilities. This package is the union of
@ -210,6 +214,7 @@ the GNU fileutils, sh-utils, and textutils packages.
%patch503
%patch504
%patch505
#???## We need to statically link to gmp, otherwise we have a build loop
#???#sed -i s,'$(LIB_GMP)',%%{_libdir}/libgmp.a,g Makefile.in

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Wed Jun 3 10:56:39 UTC 2015 - mail@bernhard-voelker.de
- coreutils-doc-adjust-reference-to-info-nodes-in-man-pages.patch:
add upstream patch:
doc: adjust reference to info nodes in man pages (boo#933396)
- coreutils-i18n.patch: Use a later version of the previous patch
to fix the sort I18N issue (boo#928749, CVE-2015-4041) to also
avoid CVE-2015-4042.
https://github.com/pixelb/coreutils/commit/bea5e36cc876
-------------------------------------------------------------------
Tue May 12 09:32:53 UTC 2015 - mail@bernhard-voelker.de

View File

@ -156,6 +156,10 @@ Patch503: coreutils-tests-rm-ext3-perf-increase-timeout.patch
# Work around false positives of the testsuite on OBS/aarch64.
Patch504: coreutils-tests-aarch64-env.patch
# Upstream patch on top of v8.23 (to be removed in v8.24).
# Fix reference to info pages in man pages (boo#933396).
Patch505: coreutils-doc-adjust-reference-to-info-nodes-in-man-pages.patch
# ================================================
%description
These are the GNU core utilities. This package is the union of
@ -210,6 +214,7 @@ the GNU fileutils, sh-utils, and textutils packages.
%patch503
%patch504
%patch505
#???## We need to statically link to gmp, otherwise we have a build loop
#???#sed -i s,'$(LIB_GMP)',%%{_libdir}/libgmp.a,g Makefile.in

View File

@ -32,7 +32,7 @@ Index: src/sort.c
char const *translate = key->translate;
bool const *ignore = key->ignore;
@@ -3253,6 +3256,12 @@ keycompare_mb (const struct line *a, con
@@ -3255,6 +3258,12 @@ keycompare_mb (const struct line *a, con
texta = copy_a; textb = copy_b;
lena = new_len_a; lenb = new_len_b;
}
@ -45,7 +45,7 @@ Index: src/sort.c
if (key->random)
diff = compare_random (texta, lena, textb, lenb);
@@ -3276,13 +3285,22 @@ keycompare_mb (const struct line *a, con
@@ -3278,13 +3287,22 @@ keycompare_mb (const struct line *a, con
diff = 1;
else if (hard_LC_COLLATE && !folding)
{