SHA256
1
0
forked from pool/coreutils

- Avoid segmentation fault in "uniq" with long line input (bnc#796243, VUL-1)

* src/cut.c: Instead of usig unreliable alloca() stack allocation,
    use heap allocation via xmalloc()+free().
    (coreutils-i18n.patch)
- Fix test-suite errors (bnc#798261).
  * tests/cp/fiemap-FMR: Fix path to src directory and declare
    require_valgrind_ function.
    (coreutils-cp-corrupt-fragmented-sparse.patch)
  * tests/misc/cut:
    Fix src/cut.c to properly pass output-delimiter tests.
    Synchronize cut.c related part of the i18n patch with Fedora's.
    Merge coreutils-i18n-infloop.patch into coreutils-i18n.patch.
    Merge coreutils-i18n-uninit.patch into coreutils-i18n.patch.
    In tests/misc/cut, do not replace the non-i18n error messages.
    (coreutils-i18n.patch)
  * tests/rm/ext3-perf:
    This test failed due to heavy parallel CPU and/or disk load because it
    is based on timeouts. Do not run the test-suite with 'make -jN.
    (coreutils.spec, coreutils-testsuite.spec)
  * Further spec changes:
    Run more tests: also run "very expensive" tests; add acl, python-pyinotify,
    strace and valgrind to the build requirements.
    Remove patch5 and patch6 as they are now merged into coreutils-i18n.patch
    (see above).
    (coreutils.spec, coreutils-testsuite.spec)
- Maintenance changes:
  (coreutils.spec, coreutils-testsuite.spec)
  * Add perl and texinfo to the build requirements as they are needed to
    re-generate the man pages and the texinfo documentation.
  * Remove already-active "-Wall" compiler option from CFLAGS variable.
  * Install the compressed test-suite.log into the documentation directory
    of the coreutils-testsuite package (section %check and %files).
  * Properly guard the spec sections for the coreutils and the
    coreutils-testsuite package.
  * Update patches to reflect new line numbers.

OBS-URL: https://build.opensuse.org/package/show/Base:System/coreutils?expand=0&rev=172
This commit is contained in:
Bernhard Voelker 2013-01-16 19:09:57 +00:00 committed by Git OBS Bridge
parent 1e206d4651
commit 26558dd009
26 changed files with 364 additions and 199 deletions

View File

@ -10,8 +10,8 @@ Subject: [PATCH 7/7] compile su with -fpie
Index: lib/Makefile.am
===================================================================
--- lib/Makefile.am.orig 2012-03-24 19:22:13.000000000 +0100
+++ lib/Makefile.am 2013-01-10 13:24:08.147010847 +0100
--- lib/Makefile.am.orig
+++ lib/Makefile.am
@@ -28,7 +28,7 @@ noinst_LIBRARIES =
include gnulib.mk
@ -23,8 +23,8 @@ Index: lib/Makefile.am
buffer-lcm.c buffer-lcm.h
Index: src/Makefile.am
===================================================================
--- src/Makefile.am.orig 2013-01-10 13:18:47.278685407 +0100
+++ src/Makefile.am 2013-01-10 13:24:08.148010823 +0100
--- src/Makefile.am.orig
+++ src/Makefile.am
@@ -361,6 +361,11 @@ uptime_LDADD += $(GETLOADAVG_LIBS)
su_SOURCES = su.c getdef.c
su_LDADD += $(LIB_CRYPT) $(PAM_LIBS)

View File

@ -15,8 +15,8 @@ Subject: [PATCH 5/7] honor settings in /etc/default/su resp /etc/login.defs
Index: src/Makefile.am
===================================================================
--- src/Makefile.am.orig 2013-01-10 13:18:47.251686056 +0100
+++ src/Makefile.am 2013-01-10 13:18:47.278685407 +0100
--- src/Makefile.am.orig
+++ src/Makefile.am
@@ -358,6 +358,7 @@ factor_LDADD += $(LIB_GMP)
uptime_LDADD += $(GETLOADAVG_LIBS)
@ -27,8 +27,8 @@ Index: src/Makefile.am
# for various ACL functions
Index: src/Makefile.in
===================================================================
--- src/Makefile.in.orig 2012-05-10 19:42:28.000000000 +0200
+++ src/Makefile.in 2013-01-10 13:20:27.447278185 +0100
--- src/Makefile.in.orig
+++ src/Makefile.in
@@ -592,8 +592,8 @@ stdbuf_DEPENDENCIES = $(am__DEPENDENCIES
stty_SOURCES = stty.c
stty_OBJECTS = stty.$(OBJEXT)
@ -42,8 +42,8 @@ Index: src/Makefile.in
sum_OBJECTS = sum.$(OBJEXT)
Index: src/getdef.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ src/getdef.c 2013-01-10 13:18:47.279685382 +0100
--- /dev/null
+++ src/getdef.c
@@ -0,0 +1,259 @@
+/* Copyright (C) 2003, 2004, 2005 Thorsten Kukuk
+ Author: Thorsten Kukuk <kukuk@suse.de>
@ -306,8 +306,8 @@ Index: src/getdef.c
+#endif
Index: src/getdef.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ src/getdef.h 2013-01-10 13:18:47.279685382 +0100
--- /dev/null
+++ src/getdef.h
@@ -0,0 +1,29 @@
+/* Copyright (C) 2003, 2005 Thorsten Kukuk
+ Author: Thorsten Kukuk <kukuk@suse.de>
@ -340,8 +340,8 @@ Index: src/getdef.h
+#endif /* _GETDEF_H_ */
Index: src/su.c
===================================================================
--- src/su.c.orig 2013-01-10 13:18:47.272685552 +0100
+++ src/su.c 2013-01-10 13:18:47.279685382 +0100
--- src/su.c.orig
+++ src/su.c
@@ -111,6 +111,8 @@
# include <paths.h>
#endif

View File

@ -7,10 +7,10 @@ Subject: [PATCH 3/7] log all su attempts
src/su.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/su.c b/src/su.c
index 1d3d007..2a9e423 100644
--- a/src/su.c
+++ b/src/su.c
Index: coreutils-8.17/src/su.c
===================================================================
--- coreutils-8.17.orig/src/su.c
+++ coreutils-8.17/src/su.c
@@ -75,6 +75,9 @@
#if HAVE_SYSLOG_H && HAVE_SYSLOG
@ -21,6 +21,3 @@ index 1d3d007..2a9e423 100644
#else
# undef SYSLOG_SUCCESS
# undef SYSLOG_FAILURE
--
1.7.1

View File

@ -9,8 +9,8 @@ Subject: [PATCH 6/7] make sure /sbin resp /usr/sbin are in PATH
Index: src/su.c
===================================================================
--- src/su.c.orig 2012-04-16 13:00:25.489424170 +0200
+++ src/su.c 2012-04-16 13:01:12.161193827 +0200
--- src/su.c.orig
+++ src/su.c
@@ -458,6 +458,117 @@ correct_password (const struct passwd *p
#endif /* !USE_PAM */
}

View File

@ -11,8 +11,8 @@ Subject: [PATCH 1/7] pam support for su
Index: configure.ac
===================================================================
--- configure.ac.orig 2012-03-24 19:22:13.000000000 +0100
+++ configure.ac 2012-04-16 12:59:28.737919405 +0200
--- configure.ac.orig
+++ configure.ac
@@ -185,6 +185,20 @@ fi
AC_FUNC_FORK
@ -36,8 +36,8 @@ Index: configure.ac
gl_ADD_PROG([optional_bin_progs], [chroot]))
Index: src/Makefile.am
===================================================================
--- src/Makefile.am.orig 2012-03-24 19:22:13.000000000 +0100
+++ src/Makefile.am 2012-04-16 12:59:28.737919405 +0200
--- src/Makefile.am.orig
+++ src/Makefile.am
@@ -357,8 +357,8 @@ factor_LDADD += $(LIB_GMP)
# for getloadavg
uptime_LDADD += $(GETLOADAVG_LIBS)
@ -51,8 +51,8 @@ Index: src/Makefile.am
copy_LDADD += $(LIB_ACL)
Index: src/su.c
===================================================================
--- src/su.c.orig 2012-03-24 19:22:13.000000000 +0100
+++ src/su.c 2012-04-16 13:00:06.496924665 +0200
--- src/su.c.orig
+++ src/su.c
@@ -37,6 +37,16 @@
restricts who can su to UID 0 accounts. RMS considers that to
be fascist.

View File

@ -7,10 +7,10 @@ Subject: [PATCH 4/7] set sane default path
src/su.c | 12 ++----------
1 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/src/su.c b/src/su.c
index 2a9e423..0071622 100644
--- a/src/su.c
+++ b/src/su.c
Index: coreutils-8.17/src/su.c
===================================================================
--- coreutils-8.17.orig/src/su.c
+++ coreutils-8.17/src/su.c
@@ -112,18 +112,10 @@
#endif
@ -32,6 +32,3 @@ index 2a9e423..0071622 100644
/* The shell to run if none is given in the user's passwd entry. */
#define DEFAULT_SHELL "/bin/sh"
--
1.7.1

View File

@ -9,9 +9,9 @@ Subject: [PATCH 2/7] update man page for pam
Index: doc/coreutils.texi
===================================================================
--- doc/coreutils.texi.orig 2012-04-16 13:18:07.651694291 +0200
+++ doc/coreutils.texi 2012-04-16 13:18:14.825522204 +0200
@@ -15796,8 +15796,11 @@ to certain shells, etc.).
--- doc/coreutils.texi.orig
+++ doc/coreutils.texi
@@ -15806,8 +15806,11 @@ to certain shells, etc.).
@findex syslog
@command{su} can optionally be compiled to use @code{syslog} to report
failed, and optionally successful, @command{su} attempts. (If the system
@ -25,7 +25,7 @@ Index: doc/coreutils.texi
The program accepts the following options. Also see @ref{Common options}.
@@ -15878,33 +15881,6 @@ Exit status:
@@ -15888,33 +15891,6 @@ Exit status:
the exit status of the subshell otherwise
@end display

View File

@ -2,7 +2,7 @@ Index: src/sort.c
===================================================================
--- src/sort.c.orig
+++ src/sort.c
@@ -5288,7 +5288,11 @@ main (int argc, char **argv)
@@ -5286,7 +5286,11 @@ main (int argc, char **argv)
{
if (!nthreads)
{

View File

@ -12,8 +12,8 @@ Date: Fri Jul 22 14:48:42 2011 +0200
Index: lib/acl-internal.h
===================================================================
--- lib/acl-internal.h.orig 2012-03-09 08:31:00.000000000 +0100
+++ lib/acl-internal.h 2012-04-16 13:17:12.470016537 +0200
--- lib/acl-internal.h.orig
+++ lib/acl-internal.h
@@ -142,6 +142,12 @@ rpl_acl_set_fd (int fd, acl_t acl)
# endif
@ -29,8 +29,8 @@ Index: lib/acl-internal.h
# define acl_from_mode(mode) (NULL)
Index: lib/file-has-acl.c
===================================================================
--- lib/file-has-acl.c.orig 2012-03-09 08:31:00.000000000 +0100
+++ lib/file-has-acl.c 2012-04-16 13:17:12.471016513 +0200
--- lib/file-has-acl.c.orig
+++ lib/file-has-acl.c
@@ -492,12 +492,20 @@ file_has_acl (char const *name, struct s
/* Linux, FreeBSD, MacOS X, IRIX, Tru64 */
int ret;
@ -55,8 +55,8 @@ Index: lib/file-has-acl.c
{
Index: m4/acl.m4
===================================================================
--- m4/acl.m4.orig 2012-01-06 10:14:31.000000000 +0100
+++ m4/acl.m4 2012-04-16 13:17:12.471016513 +0200
--- m4/acl.m4.orig
+++ m4/acl.m4
@@ -33,7 +33,7 @@ AC_DEFUN([gl_FUNC_ACL],
AC_CHECK_FUNCS(
[acl_get_file acl_get_fd acl_set_file acl_set_fd \
@ -68,9 +68,9 @@ Index: m4/acl.m4
acl_to_short_text acl_free_text])
Index: ChangeLog
===================================================================
--- ChangeLog.orig 2012-03-26 14:15:03.000000000 +0200
+++ ChangeLog 2012-04-16 13:17:12.474016441 +0200
@@ -2815,6 +2815,14 @@
--- ChangeLog.orig
+++ ChangeLog
@@ -3272,6 +3272,14 @@
MacOS X 10.7 has an fdatasync that is not declared, and is rumored to
be ineffective. (Bug#9141)

View File

@ -1,8 +1,8 @@
Index: doc/coreutils.texi
===================================================================
--- doc/coreutils.texi.orig 2012-04-16 13:12:04.624344318 +0200
+++ doc/coreutils.texi 2012-04-16 13:13:08.231837183 +0200
@@ -12447,6 +12447,16 @@ This section describes commands that man
--- doc/coreutils.texi.orig
+++ doc/coreutils.texi
@@ -12457,6 +12457,16 @@ This section describes commands that man
@command{basename} removes any leading directory components from
@var{name}. Synopsis:

View File

@ -1,8 +1,8 @@
Index: doc/coreutils.info
===================================================================
--- doc/coreutils.info.orig 2012-03-26 14:08:30.000000000 +0200
+++ doc/coreutils.info 2012-04-18 11:17:09.917545246 +0200
@@ -12788,6 +12788,10 @@ and optionally successful, `su' attempts
--- doc/coreutils.info.orig
+++ doc/coreutils.info
@@ -12796,6 +12796,10 @@ and optionally successful, `su' attempts
`syslog'.) However, GNU `su' does not check if the user is a member of
the `wheel' group; see below.
@ -13,7 +13,7 @@ Index: doc/coreutils.info
The program accepts the following options. Also see *note Common
options::.
@@ -12796,6 +12800,12 @@ options::.
@@ -12804,6 +12808,12 @@ options::.
Pass COMMAND, a single command line to run, to the shell with a
`-c' option instead of starting an interactive shell.
@ -28,8 +28,8 @@ Index: doc/coreutils.info
Pass the `-f' option to the shell. This probably only makes sense
Index: src/su.c
===================================================================
--- src/su.c.orig 2012-04-18 11:17:09.856546407 +0200
+++ src/su.c 2012-04-18 11:17:09.917545246 +0200
--- src/su.c.orig
+++ src/su.c
@@ -141,6 +141,9 @@ static bool simulate_login;
/* If true, change some environment vars to indicate the user su'd to. */
static bool change_environment;

View File

@ -53,7 +53,7 @@ Index: tests/cp/fiemap-FMR
===================================================================
--- /dev/null
+++ tests/cp/fiemap-FMR
@@ -0,0 +1,31 @@
@@ -0,0 +1,41 @@
+#!/bin/sh
+# Trigger a free-memory read bug in cp from coreutils-[8.11..8.19]
+
@ -72,9 +72,19 @@ Index: tests/cp/fiemap-FMR
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. "${srcdir=.}/init.sh"; path_prepend_ ./src
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+print_ver_ cp
+
+# Skip the current test if valgrind doesn't work,
+# which could happen if not installed,
+# or hasn't support for the built architecture,
+# or hasn't appropriate error suppressions installed etc.
+require_valgrind_()
+{
+ valgrind --error-exitcode=1 true 2>/dev/null ||
+ skip_ "requires a working valgrind"
+}
+
+require_valgrind_
+require_perl_
+: ${PERL=perl}

View File

@ -1,7 +1,7 @@
Index: gnulib-tests/test-getaddrinfo.c
===================================================================
--- gnulib-tests/test-getaddrinfo.c.orig 2012-04-16 13:18:02.424819645 +0200
+++ gnulib-tests/test-getaddrinfo.c 2012-04-16 13:18:07.737692228 +0200
--- gnulib-tests/test-getaddrinfo.c.orig
+++ gnulib-tests/test-getaddrinfo.c
@@ -86,11 +86,7 @@ simple (char const *host, char const *se
the test merely because someone is down the country on their
in-law's farm. */

View File

@ -1,8 +1,8 @@
Index: m4/gnulib-comp.m4
===================================================================
--- m4/gnulib-comp.m4.orig 2012-03-20 23:34:39.000000000 +0100
+++ m4/gnulib-comp.m4 2012-04-16 12:57:23.373219154 +0200
@@ -1584,7 +1584,6 @@ gl_POSIXTM
--- m4/gnulib-comp.m4.orig
+++ m4/gnulib-comp.m4
@@ -1597,7 +1597,6 @@ gl_POSIXTM
gl_POSIXVER
gl_FUNC_PRINTF_FREXP
gl_FUNC_PRINTF_FREXPL

View File

@ -1,14 +0,0 @@
Index: src/sort.c
===================================================================
--- src/sort.c.orig 2012-04-16 13:23:11.726363043 +0200
+++ src/sort.c 2012-04-16 13:23:20.474151036 +0200
@@ -3161,7 +3161,8 @@ keycompare_mb (const struct line *a, con
if (MBLENGTH == (size_t)-2 || MBLENGTH == (size_t)-1) \
STATE = state_bak; \
if (!ignore) \
- COPY[NEW_LEN++] = TEXT[i++]; \
+ COPY[NEW_LEN++] = TEXT[i]; \
+ i++; \
continue; \
} \
\

View File

@ -1,16 +0,0 @@
Index: src/cut.c
===================================================================
--- src/cut.c.orig 2012-04-16 13:17:12.321020103 +0200
+++ src/cut.c 2012-04-16 13:17:12.333019817 +0200
@@ -869,7 +869,10 @@ cut_fields_mb (FILE *stream)
c = getc (stream);
empty_input = (c == EOF);
if (c != EOF)
- ungetc (c, stream);
+ {
+ ungetc (c, stream);
+ wc = 0;
+ }
else
wc = WEOF;

View File

@ -19,8 +19,8 @@
Index: lib/linebuffer.h
===================================================================
--- lib/linebuffer.h.orig 2012-01-06 10:14:31.000000000 +0100
+++ lib/linebuffer.h 2012-06-19 12:13:47.369654318 +0200
--- lib/linebuffer.h.orig
+++ lib/linebuffer.h
@@ -21,6 +21,11 @@
# include <stdio.h>
@ -45,8 +45,8 @@ Index: lib/linebuffer.h
/* Initialize linebuffer LINEBUFFER for use. */
Index: src/cut.c
===================================================================
--- src/cut.c.orig 2012-05-02 10:31:47.000000000 +0200
+++ src/cut.c 2012-06-19 12:13:47.370654294 +0200
--- src/cut.c.orig
+++ src/cut.c
@@ -28,6 +28,11 @@
#include <assert.h>
#include <getopt.h>
@ -136,7 +136,7 @@ Index: src/cut.c
static size_t field_1_bufsize;
-/* The largest field or byte index used as an endpoint of a closed
+/* The largest field, character or byte index used as an endpoint of a closed
+/* The largest byte, character or field index used as an endpoint of a closed
or degenerate range specification; this doesn't include the starting
index of right-open-ended ranges. For example, with either range spec
'2-5,9-', '2-3,5,9-' this variable would be set to 5. */
@ -247,7 +247,7 @@ Index: src/cut.c
}
max_range_endpoint = 0;
@@ -581,6 +663,63 @@ cut_bytes (FILE *stream)
@@ -581,6 +663,77 @@ cut_bytes (FILE *stream)
}
}
@ -271,7 +271,10 @@ Index: src/cut.c
+ size_t mblength; /* The byte size of a multibyte character which shows
+ as same character as WC. */
+ mbstate_t state; /* State of the stream. */
+ int convfail; /* 1, when conversion is failed. Otherwise 0. */
+ int convfail = 0; /* 1, when conversion is failed. Otherwise 0. */
+ /* Whether to begin printing delimiters between ranges for the current line.
+ Set after we've begun printing data corresponding to the first range. */
+ bool print_delimiter = false;
+
+ idx = 0;
+ buflen = 0;
@ -294,12 +297,23 @@ Index: src/cut.c
+ {
+ putchar ('\n');
+ idx = 0;
+ print_delimiter = false;
+ }
+ else
+ {
+ bool range_start;
+ bool *rs = output_delimiter_specified ? &range_start : NULL;
+ idx += (operating_mode == byte_mode) ? mblength : 1;
+ if (print_kth (idx, NULL))
+ fwrite (bufpos, mblength, sizeof(char), stdout);
+ if (print_kth (idx, rs))
+ {
+ if (rs && *rs && print_delimiter)
+ {
+ fwrite (output_delimiter_string, sizeof (char),
+ output_delimiter_length, stdout);
+ }
+ print_delimiter = true;
+ fwrite (bufpos, mblength, sizeof(char), stdout);
+ }
+ }
+
+ buflen -= mblength;
@ -311,7 +325,7 @@ Index: src/cut.c
/* Read from stream STREAM, printing to standard output any selected fields. */
static void
@@ -703,13 +842,192 @@ cut_fields (FILE *stream)
@@ -703,13 +856,195 @@ cut_fields (FILE *stream)
}
}
@ -331,7 +345,7 @@ Index: src/cut.c
+ size_t mblength; /* The byte size of a multibyte character which shows
+ as same character as WC. */
+ mbstate_t state; /* State of the stream. */
+ int convfail; /* 1, when conversion is failed. Otherwise 0. */
+ int convfail = 0; /* 1, when conversion is failed. Otherwise 0. */
+
+ found_any_selected_field = 0;
+ field_idx = 1;
@ -342,7 +356,10 @@ Index: src/cut.c
+ c = getc (stream);
+ empty_input = (c == EOF);
+ if (c != EOF)
+ {
+ ungetc (c, stream);
+ wc = 0;
+ }
+ else
+ wc = WEOF;
+
@ -380,7 +397,7 @@ Index: src/cut.c
+ break;
+ }
+
+ if (wc == WEOF)
+ if (len <= 0 && wc == WEOF)
+ break;
+
+ /* If the first field extends to the end of line (it is not
@ -507,7 +524,7 @@ Index: src/cut.c
}
/* Process file FILE to standard output.
@@ -761,6 +1079,8 @@ main (int argc, char **argv)
@@ -761,6 +1096,8 @@ main (int argc, char **argv)
bool ok;
bool delim_specified = false;
char *spec_list_string IF_LINT ( = NULL);
@ -516,7 +533,7 @@ Index: src/cut.c
initialize_main (&argc, &argv);
set_program_name (argv[0]);
@@ -783,7 +1103,6 @@ main (int argc, char **argv)
@@ -783,7 +1120,6 @@ main (int argc, char **argv)
switch (optc)
{
case 'b':
@ -524,7 +541,7 @@ Index: src/cut.c
/* Build the byte list. */
if (operating_mode != undefined_mode)
FATAL_ERROR (_("only one type of list may be specified"));
@@ -791,6 +1110,14 @@ main (int argc, char **argv)
@@ -791,6 +1127,14 @@ main (int argc, char **argv)
spec_list_string = optarg;
break;
@ -539,7 +556,7 @@ Index: src/cut.c
case 'f':
/* Build the field list. */
if (operating_mode != undefined_mode)
@@ -802,10 +1129,35 @@ main (int argc, char **argv)
@@ -802,10 +1146,35 @@ main (int argc, char **argv)
case 'd':
/* New delimiter. */
/* Interpret -d '' to mean 'use the NUL byte as the delimiter.' */
@ -579,7 +596,7 @@ Index: src/cut.c
break;
case OUTPUT_DELIMITER_OPTION:
@@ -818,6 +1170,7 @@ main (int argc, char **argv)
@@ -818,6 +1187,7 @@ main (int argc, char **argv)
break;
case 'n':
@ -587,7 +604,7 @@ Index: src/cut.c
break;
case 's':
@@ -840,7 +1193,7 @@ main (int argc, char **argv)
@@ -840,7 +1210,7 @@ main (int argc, char **argv)
if (operating_mode == undefined_mode)
FATAL_ERROR (_("you must specify a list of bytes, characters, or fields"));
@ -596,7 +613,7 @@ Index: src/cut.c
FATAL_ERROR (_("an input delimiter may be specified only\
when operating on fields"));
@@ -867,15 +1220,34 @@ main (int argc, char **argv)
@@ -867,15 +1237,34 @@ main (int argc, char **argv)
}
if (!delim_specified)
@ -639,8 +656,8 @@ Index: src/cut.c
if (optind == argc)
Index: src/expand.c
===================================================================
--- src/expand.c.orig 2012-05-01 22:55:08.000000000 +0200
+++ src/expand.c 2012-06-19 12:13:47.370654294 +0200
--- src/expand.c.orig
+++ src/expand.c
@@ -37,12 +37,29 @@
#include <stdio.h>
#include <getopt.h>
@ -830,8 +847,8 @@ Index: src/expand.c
error (EXIT_FAILURE, errno, "-");
Index: src/fold.c
===================================================================
--- src/fold.c.orig 2012-04-29 13:45:30.000000000 +0200
+++ src/fold.c 2012-06-19 12:13:47.370654294 +0200
--- src/fold.c.orig
+++ src/fold.c
@@ -22,12 +22,34 @@
#include <getopt.h>
#include <sys/types.h>
@ -1232,8 +1249,8 @@ Index: src/fold.c
case 's': /* Break at word boundaries. */
Index: src/join.c
===================================================================
--- src/join.c.orig 2012-05-02 10:31:47.000000000 +0200
+++ src/join.c 2012-06-19 12:13:47.371654270 +0200
--- src/join.c.orig
+++ src/join.c
@@ -22,18 +22,32 @@
#include <sys/types.h>
#include <getopt.h>
@ -1712,8 +1729,8 @@ Index: src/join.c
case NOCHECK_ORDER_OPTION:
Index: src/pr.c
===================================================================
--- src/pr.c.orig 2012-05-10 09:14:30.000000000 +0200
+++ src/pr.c 2012-06-19 12:15:34.144102794 +0200
--- src/pr.c.orig
+++ src/pr.c
@@ -312,6 +312,32 @@
#include <getopt.h>
@ -2438,8 +2455,8 @@ Index: src/pr.c
Index: src/sort.c
===================================================================
--- src/sort.c.orig 2012-05-04 12:06:22.000000000 +0200
+++ src/sort.c 2012-06-19 12:16:37.982577478 +0200
--- src/sort.c.orig
+++ src/sort.c
@@ -22,12 +22,21 @@
#include <config.h>
@ -3115,7 +3132,7 @@ Index: src/sort.c
else if (key->random)
diff = compare_random (ta, tlena, tb, tlenb);
else if (key->version)
@@ -2647,6 +3081,179 @@ keycompare (struct line const *a, struct
@@ -2647,6 +3081,180 @@ keycompare (struct line const *a, struct
return key->reverse ? -diff : diff;
}
@ -3197,7 +3214,8 @@ Index: src/sort.c
+ if (MBLENGTH == (size_t)-2 || MBLENGTH == (size_t)-1) \
+ STATE = state_bak; \
+ if (!ignore) \
+ COPY[NEW_LEN++] = TEXT[i++]; \
+ COPY[NEW_LEN++] = TEXT[i]; \
+ i++; \
+ continue; \
+ } \
+ \
@ -3295,7 +3313,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. */
@@ -4107,7 +4714,7 @@ main (int argc, char **argv)
@@ -4107,7 +4715,7 @@ main (int argc, char **argv)
initialize_exit_failure (SORT_FAILURE);
hard_LC_COLLATE = hard_locale (LC_COLLATE);
@ -3304,7 +3322,7 @@ Index: src/sort.c
hard_LC_TIME = hard_locale (LC_TIME);
#endif
@@ -4128,6 +4735,29 @@ main (int argc, char **argv)
@@ -4128,6 +4736,29 @@ main (int argc, char **argv)
thousands_sep = -1;
}
@ -3334,7 +3352,7 @@ Index: src/sort.c
have_read_stdin = false;
inittables ();
@@ -4398,13 +5028,34 @@ main (int argc, char **argv)
@@ -4398,13 +5029,34 @@ main (int argc, char **argv)
case 't':
{
@ -3373,7 +3391,7 @@ Index: src/sort.c
else
{
/* Provoke with 'sort -txx'. Complain about
@@ -4415,9 +5066,12 @@ main (int argc, char **argv)
@@ -4415,9 +5067,12 @@ main (int argc, char **argv)
quote (optarg));
}
}
@ -3390,8 +3408,8 @@ Index: src/sort.c
Index: src/unexpand.c
===================================================================
--- src/unexpand.c.orig 2012-05-01 22:55:08.000000000 +0200
+++ src/unexpand.c 2012-06-19 12:13:47.373654222 +0200
--- src/unexpand.c.orig
+++ src/unexpand.c
@@ -38,12 +38,29 @@
#include <stdio.h>
#include <getopt.h>
@ -3647,8 +3665,8 @@ Index: src/unexpand.c
error (EXIT_FAILURE, errno, "-");
Index: src/uniq.c
===================================================================
--- src/uniq.c.orig 2012-05-01 22:55:08.000000000 +0200
+++ src/uniq.c 2012-06-19 12:13:47.374654199 +0200
--- src/uniq.c.orig
+++ src/uniq.c
@@ -21,6 +21,16 @@
#include <getopt.h>
#include <sys/types.h>
@ -3800,7 +3818,7 @@ Index: src/uniq.c
if (check_chars < oldlen)
oldlen = check_chars;
if (check_chars < newlen)
@@ -241,14 +346,92 @@ different (char *old, char *new, size_t
@@ -241,14 +346,100 @@ different (char *old, char *new, size_t
if (ignore_case)
{
@ -3808,14 +3826,19 @@ Index: src/uniq.c
- return oldlen != newlen || memcasecmp (old, new, oldlen);
+ size_t i;
+
+ copy_old = alloca (oldlen + 1);
+ copy_new = alloca (oldlen + 1);
+ copy_old = xmalloc (sizeof(char) * (oldlen + 1));
+ copy_new = xmalloc (sizeof(char) * (oldlen + 1));
+
+ for (i = 0; i < oldlen; i++)
+ {
+ copy_old[i] = toupper (old[i]);
+ copy_new[i] = toupper (new[i]);
+ }
+
+ bool rc = xmemcoll (copy_old, oldlen, copy_new, newlen);
+ free (copy_old);
+ free (copy_new);
+ return rc;
}
- else if (hard_LC_COLLATE)
- return xmemcoll (old, oldlen, new, newlen) != 0;
@ -3851,7 +3874,7 @@ Index: src/uniq.c
+
+ for (i = 0; i < 2; i++)
+ {
+ copy[i] = alloca (len[i] + 1);
+ copy[i] = xmalloc (sizeof(char) * (len[i] + 1));
+
+ for (j = 0, chars = 0; j < len[i] && chars < check_chars; chars++)
+ {
@ -3892,13 +3915,16 @@ Index: src/uniq.c
+ len[i] = j;
+ }
+
+ return xmemcoll (copy[0], len[0], copy[1], len[1]);
+ int rc = xmemcoll (copy[0], len[0], copy[1], len[1]);
+ free (copy[0]);
+ free (copy[1]);
+ return rc;
}
+#endif
/* Output the line in linebuffer LINE to standard output
provided that the switches say it should be output.
@@ -304,15 +487,43 @@ check_file (const char *infile, const ch
@@ -304,15 +495,43 @@ check_file (const char *infile, const ch
{
char *prevfield IF_LINT ( = NULL);
size_t prevlen IF_LINT ( = 0);
@ -3942,7 +3968,7 @@ Index: src/uniq.c
if (prevline->length == 0
|| different (thisfield, prevfield, thislen, prevlen))
{
@@ -331,17 +542,26 @@ check_file (const char *infile, const ch
@@ -331,17 +550,26 @@ check_file (const char *infile, const ch
size_t prevlen;
uintmax_t match_count = 0;
bool first_delimiter = true;
@ -3969,7 +3995,7 @@ Index: src/uniq.c
if (readlinebuffer_delim (thisline, stdin, delimiter) == 0)
{
if (ferror (stdin))
@@ -350,6 +570,15 @@ check_file (const char *infile, const ch
@@ -350,6 +578,15 @@ check_file (const char *infile, const ch
}
thisfield = find_field (thisline);
thislen = thisline->length - 1 - (thisfield - thisline->buffer);
@ -3985,7 +4011,7 @@ Index: src/uniq.c
match = !different (thisfield, prevfield, thislen, prevlen);
match_count += match;
@@ -382,6 +611,9 @@ check_file (const char *infile, const ch
@@ -382,6 +619,9 @@ check_file (const char *infile, const ch
SWAP_LINES (prevline, thisline);
prevfield = thisfield;
prevlen = thislen;
@ -3995,7 +4021,7 @@ Index: src/uniq.c
if (!match)
match_count = 0;
}
@@ -427,6 +659,19 @@ main (int argc, char **argv)
@@ -427,6 +667,19 @@ main (int argc, char **argv)
atexit (close_stdout);
@ -4017,8 +4043,8 @@ Index: src/uniq.c
check_chars = SIZE_MAX;
Index: tests/Makefile.am
===================================================================
--- tests/Makefile.am.orig 2012-05-10 16:36:42.000000000 +0200
+++ tests/Makefile.am 2012-06-19 12:13:47.374654199 +0200
--- tests/Makefile.am.orig
+++ tests/Makefile.am
@@ -247,6 +247,7 @@ TESTS = \
misc/sort-debug-warn \
misc/sort-discrim \
@ -4040,8 +4066,8 @@ Index: tests/Makefile.am
pr/0FFnt \
Index: tests/misc/cut
===================================================================
--- tests/misc/cut.orig 2012-02-03 10:22:06.000000000 +0100
+++ tests/misc/cut 2012-06-19 12:13:47.374654199 +0200
--- tests/misc/cut.orig
+++ tests/misc/cut
@@ -30,7 +30,7 @@ my $mb_locale = $ENV{LOCALE_FR_UTF8};
my $prog = 'cut';
my $try = "Try '$prog --help' for more information.\n";
@ -4060,10 +4086,31 @@ Index: tests/misc/cut
['inval2', qw(-f -), {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR=>$no_endpoint}],
['inval3', '-f', '4,-', {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR=>$no_endpoint}],
['inval4', '-f', '1-2,-', {IN=>''}, {OUT=>''}, {EXIT=>1},
@@ -176,13 +176,13 @@ if ($mb_locale ne 'C')
# non-MB: invalid byte or field list
# MB: invalid byte, character or field list
# Adjust the expected error output accordingly.
- if (grep {ref $_ eq 'HASH' && exists $_->{ERR} && $_->{ERR} eq $inval}
- (@new_t))
- {
- my $sub = {ERR_SUBST => 's/, character//'};
- push @new_t, $sub;
- push @$t, $sub;
- }
+# if (grep {ref $_ eq 'HASH' && exists $_->{ERR} && $_->{ERR} eq $inval}
+# (@new_t))
+# {
+# my $sub = {ERR_SUBST => 's/, character//'};
+# push @new_t, $sub;
+# push @$t, $sub;
+# }
push @new, ["$test_name-mb", @new_t, {ENV => "LC_ALL=$mb_locale"}];
}
push @Tests, @new;
Index: tests/misc/mb1.I
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ tests/misc/mb1.I 2012-06-19 12:13:47.374654199 +0200
--- /dev/null
+++ tests/misc/mb1.I
@@ -0,0 +1,4 @@
+Apple10
+Banana5
@ -4071,8 +4118,8 @@ Index: tests/misc/mb1.I
+Cherry30
Index: tests/misc/mb1.X
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ tests/misc/mb1.X 2012-06-19 12:13:47.374654199 +0200
--- /dev/null
+++ tests/misc/mb1.X
@@ -0,0 +1,4 @@
+Banana5
+Apple10
@ -4080,8 +4127,8 @@ Index: tests/misc/mb1.X
+Cherry30
Index: tests/misc/mb2.I
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ tests/misc/mb2.I 2012-06-19 12:13:47.374654199 +0200
--- /dev/null
+++ tests/misc/mb2.I
@@ -0,0 +1,4 @@
+Apple1020
+Banana530
@ -4089,8 +4136,8 @@ Index: tests/misc/mb2.I
+Cherry3010
Index: tests/misc/mb2.X
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ tests/misc/mb2.X 2012-06-19 12:13:47.374654199 +0200
--- /dev/null
+++ tests/misc/mb2.X
@@ -0,0 +1,4 @@
+Citrus205
+Cherry3010
@ -4098,8 +4145,8 @@ Index: tests/misc/mb2.X
+Banana530
Index: tests/misc/sort-mb-tests
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ tests/misc/sort-mb-tests 2012-06-19 12:13:47.375654176 +0200
--- /dev/null
+++ tests/misc/sort-mb-tests
@@ -0,0 +1,58 @@
+#! /bin/sh
+case $# in

View File

@ -13,8 +13,8 @@ Andreas Gruenbacher <agruen@suse.de>
Index: src/chgrp.c
===================================================================
--- src/chgrp.c.orig 2012-03-24 19:22:13.000000000 +0100
+++ src/chgrp.c 2012-04-16 13:22:03.004026462 +0200
--- src/chgrp.c.orig
+++ src/chgrp.c
@@ -88,7 +88,7 @@ parse_group (const char *name)
{
unsigned long int tmp;

View File

@ -1,7 +1,7 @@
Index: gnulib-tests/test-isnanl.h
===================================================================
--- gnulib-tests/test-isnanl.h.orig 2012-01-06 08:20:50.000000000 +0100
+++ gnulib-tests/test-isnanl.h 2012-04-16 13:22:02.969027310 +0200
--- gnulib-tests/test-isnanl.h.orig
+++ gnulib-tests/test-isnanl.h
@@ -47,7 +47,7 @@ main ()
/* Quiet NaN. */
ASSERT (isnanl (NaNl ()));
@ -29,8 +29,8 @@ Index: gnulib-tests/test-isnanl.h
}
Index: tests/misc/help-version
===================================================================
--- tests/misc/help-version.orig 2012-03-24 19:22:13.000000000 +0100
+++ tests/misc/help-version 2012-04-16 13:22:02.970027285 +0200
--- tests/misc/help-version.orig
+++ tests/misc/help-version
@@ -251,6 +251,7 @@ parted_setup () { args="-s $tmp_in mklab
for i in $built_programs; do
# Skip these.
@ -41,8 +41,8 @@ Index: tests/misc/help-version
echo z |gzip > $zin
Index: tests/other-fs-tmpdir
===================================================================
--- tests/other-fs-tmpdir.orig 2012-03-24 19:22:13.000000000 +0100
+++ tests/other-fs-tmpdir 2012-04-16 13:22:02.970027285 +0200
--- tests/other-fs-tmpdir.orig
+++ tests/other-fs-tmpdir
@@ -43,6 +43,9 @@ for d in $CANDIDATE_TMP_DIRS; do
done

View File

@ -1,7 +1,7 @@
Index: src/join.c
===================================================================
--- src/join.c.orig 2012-04-16 16:54:22.032279169 +0200
+++ src/join.c 2012-04-16 16:54:22.163275636 +0200
--- src/join.c.orig
+++ src/join.c
@@ -1320,7 +1320,7 @@ main (int argc, char **argv)
case 't':

View File

@ -1,7 +1,7 @@
Index: doc/coreutils.texi
===================================================================
--- doc/coreutils.texi.orig 2012-03-26 07:38:37.000000000 +0200
+++ doc/coreutils.texi 2012-04-16 13:22:12.487797130 +0200
--- doc/coreutils.texi.orig
+++ doc/coreutils.texi
@@ -66,7 +66,6 @@
* groups: (coreutils)groups invocation. Print group names a user is in.
* head: (coreutils)head invocation. Output the first part of files.
@ -27,7 +27,7 @@ Index: doc/coreutils.texi
* hostid invocation:: Print numeric host identifier
* uptime invocation:: Print system uptime and load
@@ -14135,7 +14133,6 @@ information.
@@ -14145,7 +14143,6 @@ information.
* arch invocation:: Print machine hardware name.
* nproc invocation:: Print the number of processors.
* uname invocation:: Print system information.
@ -35,7 +35,7 @@ Index: doc/coreutils.texi
* hostid invocation:: Print numeric host identifier.
* uptime invocation:: Print system uptime and load.
@end menu
@@ -14922,15 +14919,6 @@ easily available, as is the case with Li
@@ -14932,15 +14929,6 @@ easily available, as is the case with Li
Print the machine hardware name (sometimes called the hardware class
or hardware type).
@ -51,7 +51,7 @@ Index: doc/coreutils.texi
@item -p
@itemx --processor
@opindex -p
@@ -14984,30 +14972,6 @@ Print the kernel version.
@@ -14994,30 +14982,6 @@ Print the kernel version.
@exitstatus
@ -84,8 +84,8 @@ Index: doc/coreutils.texi
@section @command{hostid}: Print numeric host identifier
Index: man/Makefile.am
===================================================================
--- man/Makefile.am.orig 2012-03-26 11:50:41.000000000 +0200
+++ man/Makefile.am 2012-04-16 13:22:02.980027043 +0200
--- man/Makefile.am.orig
+++ man/Makefile.am
@@ -199,7 +199,7 @@ check-x-vs-1:
@PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \
t=$@-t; \
@ -97,9 +97,9 @@ Index: man/Makefile.am
rm $$t
Index: man/Makefile.in
===================================================================
--- man/Makefile.in.orig 2012-03-26 11:50:44.000000000 +0200
+++ man/Makefile.in 2012-04-16 13:22:02.980027043 +0200
@@ -2030,7 +2030,7 @@ check-x-vs-1:
--- man/Makefile.in.orig
+++ man/Makefile.in
@@ -2065,7 +2065,7 @@ check-x-vs-1:
@PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \
t=$@-t; \
(cd $(srcdir) && ls -1 *.x) | sed 's/\.x$$//' | $(ASSORT) > $$t;\

View File

@ -1,7 +1,7 @@
Index: src/uname.c
===================================================================
--- src/uname.c.orig 2012-03-24 21:26:51.000000000 +0100
+++ src/uname.c 2012-04-16 13:22:02.996026656 +0200
--- src/uname.c.orig
+++ src/uname.c
@@ -337,6 +337,36 @@ main (int argc, char **argv)
# endif
}

View File

@ -1,3 +1,47 @@
-------------------------------------------------------------------
Wed Jan 16 18:26:15 UTC 2013 - mail@bernhard-voelker.de
- Avoid segmentation fault in "uniq" with long line input (bnc#796243, VUL-1)
* src/cut.c: Instead of usig unreliable alloca() stack allocation,
use heap allocation via xmalloc()+free().
(coreutils-i18n.patch)
- Fix test-suite errors (bnc#798261).
* tests/cp/fiemap-FMR: Fix path to src directory and declare
require_valgrind_ function.
(coreutils-cp-corrupt-fragmented-sparse.patch)
* tests/misc/cut:
Fix src/cut.c to properly pass output-delimiter tests.
Synchronize cut.c related part of the i18n patch with Fedora's.
Merge coreutils-i18n-infloop.patch into coreutils-i18n.patch.
Merge coreutils-i18n-uninit.patch into coreutils-i18n.patch.
In tests/misc/cut, do not replace the non-i18n error messages.
(coreutils-i18n.patch)
* tests/rm/ext3-perf:
This test failed due to heavy parallel CPU and/or disk load because it
is based on timeouts. Do not run the test-suite with 'make -jN.
(coreutils.spec, coreutils-testsuite.spec)
* Further spec changes:
Run more tests: also run "very expensive" tests; add acl, python-pyinotify,
strace and valgrind to the build requirements.
Remove patch5 and patch6 as they are now merged into coreutils-i18n.patch
(see above).
(coreutils.spec, coreutils-testsuite.spec)
- Maintenance changes:
(coreutils.spec, coreutils-testsuite.spec)
* Add perl and texinfo to the build requirements as they are needed to
re-generate the man pages and the texinfo documentation.
* Remove already-active "-Wall" compiler option from CFLAGS variable.
* Install the compressed test-suite.log into the documentation directory
of the coreutils-testsuite package (section %check and %files).
* Properly guard the spec sections for the coreutils and the
coreutils-testsuite package.
* Update patches to reflect new line numbers.
-------------------------------------------------------------------
Thu Jan 10 21:18:52 CET 2013 - phisama@suse.de

View File

@ -27,9 +27,15 @@ BuildRequires: libacl-devel
BuildRequires: libcap-devel
BuildRequires: libselinux-devel
BuildRequires: pam-devel
BuildRequires: perl
BuildRequires: texinfo
%if "%{name}" == "coreutils-testsuite"
BuildRequires: acl
BuildRequires: gdb
BuildRequires: perl-Expect
BuildRequires: python-pyinotify
BuildRequires: strace
BuildRequires: valgrind
%endif
BuildRequires: xz
Url: http://www.gnu.org/software/coreutils/
@ -62,8 +68,6 @@ Patch1: coreutils-remove_hostname_documentation.patch
Patch2: coreutils-gl_printf_safe.patch
#Remove the bogus coreutils version from the i18n patch name
Patch4: coreutils-i18n.patch
Patch5: coreutils-i18n-uninit.patch
Patch6: coreutils-i18n-infloop.patch
Patch8: coreutils-sysinfo.patch
Patch16: coreutils-invalid-ids.patch
Patch20: coreutils-8.6-pam-support-for-su.diff
@ -88,6 +92,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
# prerequires
#PreReq: permissions
# ================================================
%description
Basic file, shell, and text manipulation utilities. The package
contains the following programs:
@ -101,12 +106,11 @@ sha224sum sha256sum sha384sum sha512sum shred shuf sleep sort split
stat stty su sum sync tac tail tee test timeout touch tr true tsort tty
uname unexpand uniq unlink uptime users vdir wc who whoami yes
# ================================================
%lang_package
%prep
%setup -q -n coreutils-%{version}
%patch4
%patch5
%patch6
%patch0
%patch1
%patch2
@ -118,7 +122,6 @@ uname unexpand uniq unlink uptime users vdir wc who whoami yes
%patch23 -p1
%patch24
%patch25
#
%patch30
%patch31
%patch32
@ -137,11 +140,12 @@ xz -dc %{S:4} >po/de.po
# We need to statically link to gmp, otherwise we have a build loop
sed -i s,'$(LIB_GMP)',%{_libdir}/libgmp.a,g src/Makefile.am
# ================================================
%build
%if 0%{suse_version} >= 1200
AUTOPOINT=true autoreconf -fi
%endif
export CFLAGS="%optflags -Wall"
export CFLAGS="%optflags"
%configure --libexecdir=%{_libdir} --without-included-regex \
--enable-install-program=arch,su \
gl_cv_func_printf_directive_n=yes \
@ -151,12 +155,19 @@ export CFLAGS="%optflags -Wall"
make -C po update-po
make %{?_smp_mflags} V=1
%if "%{name}" == "coreutils-testsuite"
# ================================================
%check
make %{?_smp_mflags} check-very-expensive
%if "%{name}" == "coreutils-testsuite"
# Avoid parallel make, because otherwise some timeout based tests like
# rm/ext3-perf may fail due to high CPU or IO load.
make check-very-expensive
install -d -m 755 %{buildroot}%{_docdir}/%{name}
xz -c tests/test-suite.log > %{buildroot}%{_docdir}/%{name}/test-suite.log.xz
%endif
# ================================================
%install
%if "%{name}" == "coreutils"
%makeinstall pkglibexecdir=%{_libdir}/%{name}
test -f %{buildroot}%{_bindir}/su || \
install src/su %{buildroot}%{_bindir}/su
@ -164,7 +175,7 @@ test -f %{buildroot}%{_bindir}/su || \
install -d %{buildroot}/bin
for i in arch basename cat chgrp chmod chown cp date dd df echo false kill ln ls mkdir mknod mktemp mv pwd rm rmdir sleep sort stat stty su sync touch true uname readlink md5sum
do
ln -sf %{_bindir}/$i %{buildroot}/bin/$i
ln -sf %{_bindir}/$i %{buildroot}/bin/$i
done
#EndUsrMerge
install -d -m 755 %{buildroot}/etc/pam.d
@ -174,19 +185,26 @@ install -d -m 755 %{buildroot}/etc/default
install -m 644 %{S:2} %{buildroot}/etc/default/su
echo '.so man1/test.1' > %{buildroot}/%{_mandir}/man1/\[.1
%find_lang coreutils
%endif
# ================================================
%post
%install_info --info-dir=%{_infodir} %{_infodir}/coreutils.info.gz
# may fail if permissions is not there, but there is no way around that
%set_permissions %{_bindir}/su
# ================================================
%postun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/coreutils.info.gz
# ================================================
%verifyscript
%verify_permissions -e %{_bindir}/su
# ================================================
%files
%if "%{name}" == "coreutils"
%defattr(-,root,root)
%doc README NEWS
%config %{_sysconfdir}/pam.d/su
@ -205,4 +223,14 @@ echo '.so man1/test.1' > %{buildroot}/%{_mandir}/man1/\[.1
%files lang -f coreutils.lang
%defattr(-,root,root)
%else
# test-suite
%dir %{_docdir}/%{name}
%doc %{_docdir}/%{name}/test-suite.log.xz
%endif
# ================================================
%changelog

View File

@ -1,3 +1,47 @@
-------------------------------------------------------------------
Wed Jan 16 18:26:15 UTC 2013 - mail@bernhard-voelker.de
- Avoid segmentation fault in "uniq" with long line input (bnc#796243, VUL-1)
* src/cut.c: Instead of usig unreliable alloca() stack allocation,
use heap allocation via xmalloc()+free().
(coreutils-i18n.patch)
- Fix test-suite errors (bnc#798261).
* tests/cp/fiemap-FMR: Fix path to src directory and declare
require_valgrind_ function.
(coreutils-cp-corrupt-fragmented-sparse.patch)
* tests/misc/cut:
Fix src/cut.c to properly pass output-delimiter tests.
Synchronize cut.c related part of the i18n patch with Fedora's.
Merge coreutils-i18n-infloop.patch into coreutils-i18n.patch.
Merge coreutils-i18n-uninit.patch into coreutils-i18n.patch.
In tests/misc/cut, do not replace the non-i18n error messages.
(coreutils-i18n.patch)
* tests/rm/ext3-perf:
This test failed due to heavy parallel CPU and/or disk load because it
is based on timeouts. Do not run the test-suite with 'make -jN.
(coreutils.spec, coreutils-testsuite.spec)
* Further spec changes:
Run more tests: also run "very expensive" tests; add acl, python-pyinotify,
strace and valgrind to the build requirements.
Remove patch5 and patch6 as they are now merged into coreutils-i18n.patch
(see above).
(coreutils.spec, coreutils-testsuite.spec)
- Maintenance changes:
(coreutils.spec, coreutils-testsuite.spec)
* Add perl and texinfo to the build requirements as they are needed to
re-generate the man pages and the texinfo documentation.
* Remove already-active "-Wall" compiler option from CFLAGS variable.
* Install the compressed test-suite.log into the documentation directory
of the coreutils-testsuite package (section %check and %files).
* Properly guard the spec sections for the coreutils and the
coreutils-testsuite package.
* Update patches to reflect new line numbers.
-------------------------------------------------------------------
Thu Jan 10 21:18:52 CET 2013 - phisama@suse.de

View File

@ -27,9 +27,15 @@ BuildRequires: libacl-devel
BuildRequires: libcap-devel
BuildRequires: libselinux-devel
BuildRequires: pam-devel
BuildRequires: perl
BuildRequires: texinfo
%if "%{name}" == "coreutils-testsuite"
BuildRequires: acl
BuildRequires: gdb
BuildRequires: perl-Expect
BuildRequires: python-pyinotify
BuildRequires: strace
BuildRequires: valgrind
%endif
BuildRequires: xz
Url: http://www.gnu.org/software/coreutils/
@ -62,8 +68,6 @@ Patch1: coreutils-remove_hostname_documentation.patch
Patch2: coreutils-gl_printf_safe.patch
#Remove the bogus coreutils version from the i18n patch name
Patch4: coreutils-i18n.patch
Patch5: coreutils-i18n-uninit.patch
Patch6: coreutils-i18n-infloop.patch
Patch8: coreutils-sysinfo.patch
Patch16: coreutils-invalid-ids.patch
Patch20: coreutils-8.6-pam-support-for-su.diff
@ -88,6 +92,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
# prerequires
#PreReq: permissions
# ================================================
%description
Basic file, shell, and text manipulation utilities. The package
contains the following programs:
@ -101,12 +106,11 @@ sha224sum sha256sum sha384sum sha512sum shred shuf sleep sort split
stat stty su sum sync tac tail tee test timeout touch tr true tsort tty
uname unexpand uniq unlink uptime users vdir wc who whoami yes
# ================================================
%lang_package
%prep
%setup -q -n coreutils-%{version}
%patch4
%patch5
%patch6
%patch0
%patch1
%patch2
@ -118,7 +122,6 @@ uname unexpand uniq unlink uptime users vdir wc who whoami yes
%patch23 -p1
%patch24
%patch25
#
%patch30
%patch31
%patch32
@ -137,11 +140,12 @@ xz -dc %{S:4} >po/de.po
# We need to statically link to gmp, otherwise we have a build loop
sed -i s,'$(LIB_GMP)',%{_libdir}/libgmp.a,g src/Makefile.am
# ================================================
%build
%if 0%{suse_version} >= 1200
AUTOPOINT=true autoreconf -fi
%endif
export CFLAGS="%optflags -Wall"
export CFLAGS="%optflags"
%configure --libexecdir=%{_libdir} --without-included-regex \
--enable-install-program=arch,su \
gl_cv_func_printf_directive_n=yes \
@ -151,12 +155,19 @@ export CFLAGS="%optflags -Wall"
make -C po update-po
make %{?_smp_mflags} V=1
%if "%{name}" == "coreutils-testsuite"
# ================================================
%check
make %{?_smp_mflags} check-very-expensive
%if "%{name}" == "coreutils-testsuite"
# Avoid parallel make, because otherwise some timeout based tests like
# rm/ext3-perf may fail due to high CPU or IO load.
make check-very-expensive
install -d -m 755 %{buildroot}%{_docdir}/%{name}
xz -c tests/test-suite.log > %{buildroot}%{_docdir}/%{name}/test-suite.log.xz
%endif
# ================================================
%install
%if "%{name}" == "coreutils"
%makeinstall pkglibexecdir=%{_libdir}/%{name}
test -f %{buildroot}%{_bindir}/su || \
install src/su %{buildroot}%{_bindir}/su
@ -164,7 +175,7 @@ test -f %{buildroot}%{_bindir}/su || \
install -d %{buildroot}/bin
for i in arch basename cat chgrp chmod chown cp date dd df echo false kill ln ls mkdir mknod mktemp mv pwd rm rmdir sleep sort stat stty su sync touch true uname readlink md5sum
do
ln -sf %{_bindir}/$i %{buildroot}/bin/$i
ln -sf %{_bindir}/$i %{buildroot}/bin/$i
done
#EndUsrMerge
install -d -m 755 %{buildroot}/etc/pam.d
@ -174,19 +185,26 @@ install -d -m 755 %{buildroot}/etc/default
install -m 644 %{S:2} %{buildroot}/etc/default/su
echo '.so man1/test.1' > %{buildroot}/%{_mandir}/man1/\[.1
%find_lang coreutils
%endif
# ================================================
%post
%install_info --info-dir=%{_infodir} %{_infodir}/coreutils.info.gz
# may fail if permissions is not there, but there is no way around that
%set_permissions %{_bindir}/su
# ================================================
%postun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/coreutils.info.gz
# ================================================
%verifyscript
%verify_permissions -e %{_bindir}/su
# ================================================
%files
%if "%{name}" == "coreutils"
%defattr(-,root,root)
%doc README NEWS
%config %{_sysconfdir}/pam.d/su
@ -205,4 +223,14 @@ echo '.so man1/test.1' > %{buildroot}/%{_mandir}/man1/\[.1
%files lang -f coreutils.lang
%defattr(-,root,root)
%else
# test-suite
%dir %{_docdir}/%{name}
%doc %{_docdir}/%{name}/test-suite.log.xz
%endif
# ================================================
%changelog