This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 3.x development tree".
The branch, master has been updated via e5317bd9b5b140e9bf74b222a9af9e26ab2c4e66 (commit) from 50b7f3a2894fac678924095cf5e52c9b3fad86f3 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit e5317bd9b5b140e9bf74b222a9af9e26ab2c4e66 Author: Stefan Schantl stefan.schantl@ipfire.org Date: Wed Apr 10 19:08:21 2013 +0200
coreutils: Update to 8.21.
This is a minor update to the latest stable version of coreutils.
Fixes #10304.
-----------------------------------------------------------------------
Summary of changes: coreutils/coreutils.nm | 6 +- coreutils/patches/coreutils-i18n.patch | 535 ++++++++++----------- .../patches/coreutils-ipfire-disabled-tests.patch | 126 +++-- coreutils/patches/coreutils-selinux.patch | 202 ++++---- 4 files changed, 431 insertions(+), 438 deletions(-)
Difference in files: diff --git a/coreutils/coreutils.nm b/coreutils/coreutils.nm index 6eff896..f377aae 100644 --- a/coreutils/coreutils.nm +++ b/coreutils/coreutils.nm @@ -4,7 +4,7 @@ ###############################################################################
name = coreutils -version = 8.19 +version = 8.21 release = 1
groups = System/Base @@ -25,6 +25,7 @@ build autoconf automake e2fsprogs-devel + gettext-devel gmp-devel libacl-devel libattr-devel @@ -50,8 +51,7 @@ build gl_cv_func_mknod_works=yes
prepare_cmds - aclocal -I m4 - autoconf --force + autoreconf -vfi end
test diff --git a/coreutils/patches/coreutils-i18n.patch b/coreutils/patches/coreutils-i18n.patch index a5b9aaf..0e25f49 100644 --- a/coreutils/patches/coreutils-i18n.patch +++ b/coreutils/patches/coreutils-i18n.patch @@ -1,6 +1,6 @@ -diff -urNp coreutils-8.19-orig/lib/linebuffer.h coreutils-8.19/lib/linebuffer.h ---- coreutils-8.19-orig/lib/linebuffer.h 2012-01-06 10:14:31.000000000 +0100 -+++ coreutils-8.19/lib/linebuffer.h 2012-08-20 13:52:04.061593006 +0200 +diff -urNp coreutils-8.21-orig/lib/linebuffer.h coreutils-8.21/lib/linebuffer.h +--- coreutils-8.21-orig/lib/linebuffer.h 2013-01-02 13:34:46.000000000 +0100 ++++ coreutils-8.21/lib/linebuffer.h 2013-02-15 14:25:07.758469108 +0100 @@ -21,6 +21,11 @@
# include <stdio.h> @@ -23,9 +23,9 @@ diff -urNp coreutils-8.19-orig/lib/linebuffer.h coreutils-8.19/lib/linebuffer.h };
/* Initialize linebuffer LINEBUFFER for use. */ -diff -urNp coreutils-8.19-orig/src/cut.c coreutils-8.19/src/cut.c ---- coreutils-8.19-orig/src/cut.c 2012-07-21 16:54:31.000000000 +0200 -+++ coreutils-8.19/src/cut.c 2012-08-20 13:52:52.299593173 +0200 +diff -urNp coreutils-8.21-orig/src/cut.c coreutils-8.21/src/cut.c +--- coreutils-8.21-orig/src/cut.c 2013-02-05 00:40:31.000000000 +0100 ++++ coreutils-8.21/src/cut.c 2013-02-15 14:25:07.760467982 +0100 @@ -28,6 +28,11 @@ #include <assert.h> #include <getopt.h> @@ -170,7 +170,7 @@ diff -urNp coreutils-8.19-orig/src/cut.c coreutils-8.19/src/cut.c
/* True if the --output-delimiter=STRING option was specified. */ static bool output_delimiter_specified; -@@ -206,7 +283,7 @@ Mandatory arguments to long options are +@@ -205,7 +282,7 @@ Print selected parts of lines from each -f, --fields=LIST select only these fields; also print any line\n\ that contains no delimiter character, unless\n\ the -s option is specified\n\ @@ -179,35 +179,7 @@ diff -urNp coreutils-8.19-orig/src/cut.c coreutils-8.19/src/cut.c "), stdout); fputs (_("\ --complement complement the set of selected bytes, characters\n\ -@@ -365,7 +442,7 @@ set_fields (const char *fieldstr) - in_digits = false; - /* Starting a range. */ - if (dash_found) -- FATAL_ERROR (_("invalid byte or field list")); -+ FATAL_ERROR (_("invalid byte, character or field list")); - dash_found = true; - fieldstr++; - -@@ -389,14 +466,16 @@ set_fields (const char *fieldstr) - if (!rhs_specified) - { - /* 'n-'. From 'initial' to end of line. */ -- eol_range_start = initial; -+ if (eol_range_start == 0 || -+ (eol_range_start != 0 && eol_range_start > initial)) -+ eol_range_start = initial; - field_found = true; - } - else - { - /* 'm-n' or '-n' (1-n). */ - if (value < initial) -- FATAL_ERROR (_("invalid decreasing range")); -+ FATAL_ERROR (_("invalid byte, character or field list")); - - /* Is there already a range going to end of line? */ - if (eol_range_start != 0) -@@ -476,6 +555,9 @@ set_fields (const char *fieldstr) +@@ -480,6 +557,9 @@ set_fields (const char *fieldstr) if (operating_mode == byte_mode) error (0, 0, _("byte offset %s is too large"), quote (bad_num)); @@ -217,16 +189,7 @@ diff -urNp coreutils-8.19-orig/src/cut.c coreutils-8.19/src/cut.c else error (0, 0, _("field number %s is too large"), quote (bad_num)); -@@ -486,7 +568,7 @@ set_fields (const char *fieldstr) - fieldstr++; - } - else -- FATAL_ERROR (_("invalid byte or field list")); -+ FATAL_ERROR (_("invalid byte, character or field list")); - } - - max_range_endpoint = 0; -@@ -581,6 +663,77 @@ cut_bytes (FILE *stream) +@@ -588,6 +668,77 @@ cut_bytes (FILE *stream) } }
@@ -304,7 +267,7 @@ diff -urNp coreutils-8.19-orig/src/cut.c coreutils-8.19/src/cut.c /* Read from stream STREAM, printing to standard output any selected fields. */
static void -@@ -703,13 +856,195 @@ cut_fields (FILE *stream) +@@ -709,13 +860,195 @@ cut_fields (FILE *stream) } }
@@ -503,7 +466,7 @@ diff -urNp coreutils-8.19-orig/src/cut.c coreutils-8.19/src/cut.c }
/* Process file FILE to standard output. -@@ -761,6 +1096,8 @@ main (int argc, char **argv) +@@ -767,6 +1100,8 @@ main (int argc, char **argv) bool ok; bool delim_specified = false; char *spec_list_string IF_LINT ( = NULL); @@ -512,7 +475,7 @@ diff -urNp coreutils-8.19-orig/src/cut.c coreutils-8.19/src/cut.c
initialize_main (&argc, &argv); set_program_name (argv[0]); -@@ -783,7 +1120,6 @@ main (int argc, char **argv) +@@ -789,7 +1124,6 @@ main (int argc, char **argv) switch (optc) { case 'b': @@ -520,7 +483,7 @@ diff -urNp coreutils-8.19-orig/src/cut.c coreutils-8.19/src/cut.c /* Build the byte list. */ if (operating_mode != undefined_mode) FATAL_ERROR (_("only one type of list may be specified")); -@@ -791,6 +1127,14 @@ main (int argc, char **argv) +@@ -797,6 +1131,14 @@ main (int argc, char **argv) spec_list_string = optarg; break;
@@ -535,7 +498,7 @@ diff -urNp coreutils-8.19-orig/src/cut.c coreutils-8.19/src/cut.c case 'f': /* Build the field list. */ if (operating_mode != undefined_mode) -@@ -802,10 +1146,35 @@ main (int argc, char **argv) +@@ -808,10 +1150,36 @@ main (int argc, char **argv) case 'd': /* New delimiter. */ /* Interpret -d '' to mean 'use the NUL byte as the delimiter.' */ @@ -560,6 +523,7 @@ diff -urNp coreutils-8.19-orig/src/cut.c coreutils-8.19/src/cut.c + if (wcdelim != L'\0' && *(optarg + delimlen) != '\0') + FATAL_ERROR (_("the delimiter must be a single character")); + memcpy (mbdelim, optarg, delimlen); ++ mbdelim[delimlen] = '\0'; + } + } + @@ -575,7 +539,7 @@ diff -urNp coreutils-8.19-orig/src/cut.c coreutils-8.19/src/cut.c break;
case OUTPUT_DELIMITER_OPTION: -@@ -818,6 +1187,7 @@ main (int argc, char **argv) +@@ -824,6 +1191,7 @@ main (int argc, char **argv) break;
case 'n': @@ -583,16 +547,7 @@ diff -urNp coreutils-8.19-orig/src/cut.c coreutils-8.19/src/cut.c break;
case 's': -@@ -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")); - -- if (delim != '\0' && operating_mode != field_mode) -+ if (delim_specified && operating_mode != field_mode) - FATAL_ERROR (_("an input delimiter may be specified only\ - when operating on fields")); - -@@ -867,15 +1237,34 @@ main (int argc, char **argv) +@@ -873,15 +1241,34 @@ main (int argc, char **argv) }
if (!delim_specified) @@ -633,9 +588,10 @@ diff -urNp coreutils-8.19-orig/src/cut.c coreutils-8.19/src/cut.c }
if (optind == argc) -diff -urNp coreutils-8.19-orig/src/expand.c coreutils-8.19/src/expand.c ---- coreutils-8.19-orig/src/expand.c 2012-07-21 16:54:31.000000000 +0200 -+++ coreutils-8.19/src/expand.c 2012-08-20 13:54:02.974621693 +0200 +Binary files coreutils-8.21-orig/src/.cut.c.swp and coreutils-8.21/src/.cut.c.swp differ +diff -urNp coreutils-8.21-orig/src/expand.c coreutils-8.21/src/expand.c +--- coreutils-8.21-orig/src/expand.c 2013-01-31 01:46:24.000000000 +0100 ++++ coreutils-8.21/src/expand.c 2013-02-15 14:25:07.774467536 +0100 @@ -37,12 +37,29 @@ #include <stdio.h> #include <getopt.h> @@ -666,7 +622,7 @@ diff -urNp coreutils-8.19-orig/src/expand.c coreutils-8.19/src/expand.c /* The official name of this program (e.g., no 'g' prefix). */ #define PROGRAM_NAME "expand"
-@@ -358,6 +375,142 @@ expand (void) +@@ -357,6 +374,142 @@ expand (void) } }
@@ -809,7 +765,7 @@ diff -urNp coreutils-8.19-orig/src/expand.c coreutils-8.19/src/expand.c int main (int argc, char **argv) { -@@ -422,7 +575,12 @@ main (int argc, char **argv) +@@ -421,7 +574,12 @@ main (int argc, char **argv)
file_list = (optind < argc ? &argv[optind] : stdin_argv);
@@ -823,9 +779,9 @@ diff -urNp coreutils-8.19-orig/src/expand.c coreutils-8.19/src/expand.c
if (have_read_stdin && fclose (stdin) != 0) error (EXIT_FAILURE, errno, "-"); -diff -urNp coreutils-8.19-orig/src/fold.c coreutils-8.19/src/fold.c ---- coreutils-8.19-orig/src/fold.c 2012-07-21 16:54:31.000000000 +0200 -+++ coreutils-8.19/src/fold.c 2012-08-20 13:52:04.066592980 +0200 +diff -urNp coreutils-8.21-orig/src/fold.c coreutils-8.21/src/fold.c +--- coreutils-8.21-orig/src/fold.c 2013-01-31 01:46:24.000000000 +0100 ++++ coreutils-8.21/src/fold.c 2013-02-15 14:25:07.789467891 +0100 @@ -22,12 +22,34 @@ #include <getopt.h> #include <sys/types.h> @@ -907,15 +863,15 @@ diff -urNp coreutils-8.19-orig/src/fold.c coreutils-8.19/src/fold.c {"spaces", no_argument, NULL, 's'}, {"width", required_argument, NULL, 'w'}, {GETOPT_HELP_OPTION_DECL}, -@@ -77,6 +120,7 @@ Mandatory arguments to long options are - "), stdout); +@@ -76,6 +119,7 @@ standard output.\n\ + fputs (_("\ -b, --bytes count bytes rather than columns\n\ + -c, --characters count characters rather than columns\n\ -s, --spaces break at spaces\n\ -w, --width=WIDTH use WIDTH columns instead of 80\n\ "), stdout); -@@ -94,7 +138,7 @@ Mandatory arguments to long options are +@@ -93,7 +137,7 @@ standard output.\n\ static size_t adjust_column (size_t column, char c) { @@ -924,7 +880,7 @@ diff -urNp coreutils-8.19-orig/src/fold.c coreutils-8.19/src/fold.c { if (c == '\b') { -@@ -117,30 +161,14 @@ adjust_column (size_t column, char c) +@@ -116,30 +160,14 @@ adjust_column (size_t column, char c) to stdout, with maximum line length WIDTH. Return true if successful. */
@@ -957,7 +913,7 @@ diff -urNp coreutils-8.19-orig/src/fold.c coreutils-8.19/src/fold.c
fadvise (istream, FADVISE_SEQUENTIAL);
-@@ -170,6 +198,15 @@ fold_file (char const *filename, size_t +@@ -169,6 +197,15 @@ fold_file (char const *filename, size_t bool found_blank = false; size_t logical_end = offset_out;
@@ -973,7 +929,7 @@ diff -urNp coreutils-8.19-orig/src/fold.c coreutils-8.19/src/fold.c /* Look for the last blank. */ while (logical_end) { -@@ -216,11 +253,221 @@ fold_file (char const *filename, size_t +@@ -215,11 +252,221 @@ fold_file (char const *filename, size_t line_out[offset_out++] = c; }
@@ -1196,7 +1152,7 @@ diff -urNp coreutils-8.19-orig/src/fold.c coreutils-8.19/src/fold.c if (ferror (istream)) { error (0, saved_errno, "%s", filename); -@@ -253,7 +500,8 @@ main (int argc, char **argv) +@@ -252,7 +499,8 @@ main (int argc, char **argv)
atexit (close_stdout);
@@ -1206,7 +1162,7 @@ diff -urNp coreutils-8.19-orig/src/fold.c coreutils-8.19/src/fold.c
while ((optc = getopt_long (argc, argv, shortopts, longopts, NULL)) != -1) { -@@ -262,7 +510,15 @@ main (int argc, char **argv) +@@ -261,7 +509,15 @@ main (int argc, char **argv) switch (optc) { case 'b': /* Count bytes rather than columns. */ @@ -1223,9 +1179,9 @@ diff -urNp coreutils-8.19-orig/src/fold.c coreutils-8.19/src/fold.c break;
case 's': /* Break at word boundaries. */ -diff -urNp coreutils-8.19-orig/src/join.c coreutils-8.19/src/join.c ---- coreutils-8.19-orig/src/join.c 2012-07-21 16:54:31.000000000 +0200 -+++ coreutils-8.19/src/join.c 2012-08-20 13:52:04.069594876 +0200 +diff -urNp coreutils-8.21-orig/src/join.c coreutils-8.21/src/join.c +--- coreutils-8.21-orig/src/join.c 2013-01-31 01:46:24.000000000 +0100 ++++ coreutils-8.21/src/join.c 2013-02-15 14:25:07.804467922 +0100 @@ -22,18 +22,32 @@ #include <sys/types.h> #include <getopt.h> @@ -1444,7 +1400,7 @@ diff -urNp coreutils-8.19-orig/src/join.c coreutils-8.19/src/join.c static void freeline (struct line *line) { -@@ -313,56 +472,115 @@ keycmp (struct line const *line1, struct +@@ -313,56 +472,130 @@ keycmp (struct line const *line1, struct size_t jf_1, size_t jf_2) { /* Start of field to compare in each file. */ @@ -1458,6 +1414,7 @@ diff -urNp coreutils-8.19-orig/src/join.c coreutils-8.19/src/join.c + size_t len[2]; /* Length of fields to compare. */ int diff; + int i, j; ++ int mallocd = 0;
if (jf_1 < line1->nfields) { @@ -1513,7 +1470,8 @@ diff -urNp coreutils-8.19-orig/src/join.c coreutils-8.19/src/join.c + + for (i = 0; i < 2; i++) + { -+ copy[i] = alloca (len[i] + 1); ++ mallocd = 1; ++ copy[i] = xmalloc (len[i] + 1); + + for (j = 0; j < MIN (len[0], len[1]);) + { @@ -1553,7 +1511,8 @@ diff -urNp coreutils-8.19-orig/src/join.c coreutils-8.19/src/join.c + { + for (i = 0; i < 2; i++) + { -+ copy[i] = alloca (len[i] + 1); ++ mallocd = 1; ++ copy[i] = xmalloc (len[i] + 1); + + for (j = 0; j < MIN (len[0], len[1]); j++) + copy[i][j] = toupper (beg[i][j]); @@ -1572,9 +1531,21 @@ diff -urNp coreutils-8.19-orig/src/join.c coreutils-8.19/src/join.c }
+ if (hard_LC_COLLATE) -+ return xmemcoll ((char *) copy[0], len[0], (char *) copy[1], len[1]); ++ { ++ diff = xmemcoll ((char *) copy[0], len[0], (char *) copy[1], len[1]); ++ ++ if (mallocd) ++ for (i = 0; i < 2; i++) ++ free (copy[i]); ++ ++ return diff; ++ } + diff = memcmp (copy[0], copy[1], MIN (len[0], len[1])); + ++ if (mallocd) ++ for (i = 0; i < 2; i++) ++ free (copy[i]); ++ + if (diff) return diff; @@ -1583,7 +1554,7 @@ diff -urNp coreutils-8.19-orig/src/join.c coreutils-8.19/src/join.c }
/* Check that successive input lines PREV and CURRENT from input file -@@ -454,6 +672,11 @@ get_line (FILE *fp, struct line **linep, +@@ -454,6 +687,11 @@ get_line (FILE *fp, struct line **linep, } ++line_no[which - 1];
@@ -1595,7 +1566,7 @@ diff -urNp coreutils-8.19-orig/src/join.c coreutils-8.19/src/join.c xfields (line);
if (prevline[which - 1]) -@@ -553,21 +776,28 @@ prfield (size_t n, struct line const *li +@@ -553,21 +791,28 @@ prfield (size_t n, struct line const *li
/* Output all the fields in line, other than the join field. */
@@ -1627,7 +1598,7 @@ diff -urNp coreutils-8.19-orig/src/join.c coreutils-8.19/src/join.c prfield (i, line); } } -@@ -578,7 +808,6 @@ static void +@@ -578,7 +823,6 @@ static void prjoin (struct line const *line1, struct line const *line2) { const struct outlist *outlist; @@ -1635,7 +1606,7 @@ diff -urNp coreutils-8.19-orig/src/join.c coreutils-8.19/src/join.c size_t field; struct line const *line;
-@@ -612,7 +841,7 @@ prjoin (struct line const *line1, struct +@@ -612,7 +856,7 @@ prjoin (struct line const *line1, struct o = o->next; if (o == NULL) break; @@ -1644,7 +1615,7 @@ diff -urNp coreutils-8.19-orig/src/join.c coreutils-8.19/src/join.c } putchar ('\n'); } -@@ -1090,21 +1319,46 @@ main (int argc, char **argv) +@@ -1090,21 +1334,46 @@ main (int argc, char **argv)
case 't': { @@ -1701,9 +1672,9 @@ diff -urNp coreutils-8.19-orig/src/join.c coreutils-8.19/src/join.c break;
case NOCHECK_ORDER_OPTION: -diff -urNp coreutils-8.19-orig/src/pr.c coreutils-8.19/src/pr.c ---- coreutils-8.19-orig/src/pr.c 2012-07-21 16:54:31.000000000 +0200 -+++ coreutils-8.19/src/pr.c 2012-08-20 13:52:04.074593445 +0200 +diff -urNp coreutils-8.21-orig/src/pr.c coreutils-8.21/src/pr.c +--- coreutils-8.21-orig/src/pr.c 2013-01-31 01:46:24.000000000 +0100 ++++ coreutils-8.21/src/pr.c 2013-02-15 14:25:07.819467936 +0100 @@ -312,6 +312,32 @@
#include <getopt.h> @@ -1824,7 +1795,7 @@ diff -urNp coreutils-8.19-orig/src/pr.c coreutils-8.19/src/pr.c
/* (-i) The width of the output tab. */ static int chars_per_output_tab = 8; -@@ -638,7 +692,13 @@ static int power_10; +@@ -634,7 +688,13 @@ static int line_number; static bool numbered_lines = false;
/* (-n) Character which follows each line number. */ @@ -1839,7 +1810,7 @@ diff -urNp coreutils-8.19-orig/src/pr.c coreutils-8.19/src/pr.c
/* (-n) line counting starts with 1st line of input file (not with 1st line of 1st page printed). */ -@@ -691,6 +751,7 @@ static bool use_col_separator = false; +@@ -687,6 +747,7 @@ static bool use_col_separator = false; -a|COLUMN|-m is a 'space' and with the -J option a 'tab'. */ static char *col_sep_string = (char *) ""; static int col_sep_length = 0; @@ -1847,7 +1818,7 @@ diff -urNp coreutils-8.19-orig/src/pr.c coreutils-8.19/src/pr.c static char *column_separator = (char *) " "; static char *line_separator = (char *) "\t";
-@@ -847,6 +908,13 @@ separator_string (const char *optarg_S) +@@ -843,6 +904,13 @@ separator_string (const char *optarg_S) col_sep_length = (int) strlen (optarg_S); col_sep_string = xmalloc (col_sep_length + 1); strcpy (col_sep_string, optarg_S); @@ -1861,7 +1832,7 @@ diff -urNp coreutils-8.19-orig/src/pr.c coreutils-8.19/src/pr.c }
int -@@ -871,6 +939,21 @@ main (int argc, char **argv) +@@ -867,6 +935,21 @@ main (int argc, char **argv)
atexit (close_stdout);
@@ -1883,7 +1854,7 @@ diff -urNp coreutils-8.19-orig/src/pr.c coreutils-8.19/src/pr.c n_files = 0; file_names = (argc > 1 ? xmalloc ((argc - 1) * sizeof (char *)) -@@ -947,8 +1030,12 @@ main (int argc, char **argv) +@@ -943,8 +1026,12 @@ main (int argc, char **argv) break; case 'e': if (optarg) @@ -1898,7 +1869,7 @@ diff -urNp coreutils-8.19-orig/src/pr.c coreutils-8.19/src/pr.c /* Could check tab width > 0. */ untabify_input = true; break; -@@ -961,8 +1048,12 @@ main (int argc, char **argv) +@@ -957,8 +1044,12 @@ main (int argc, char **argv) break; case 'i': if (optarg) @@ -1913,7 +1884,7 @@ diff -urNp coreutils-8.19-orig/src/pr.c coreutils-8.19/src/pr.c /* Could check tab width > 0. */ tabify_output = true; break; -@@ -989,8 +1080,8 @@ main (int argc, char **argv) +@@ -985,8 +1076,8 @@ main (int argc, char **argv) case 'n': numbered_lines = true; if (optarg) @@ -1924,7 +1895,7 @@ diff -urNp coreutils-8.19-orig/src/pr.c coreutils-8.19/src/pr.c break; case 'N': skip_count = false; -@@ -1029,7 +1120,7 @@ main (int argc, char **argv) +@@ -1025,7 +1116,7 @@ main (int argc, char **argv) old_s = false; /* Reset an additional input of -s, -S dominates -s */ col_sep_string = bad_cast (""); @@ -1933,7 +1904,7 @@ diff -urNp coreutils-8.19-orig/src/pr.c coreutils-8.19/src/pr.c use_col_separator = true; if (optarg) separator_string (optarg); -@@ -1186,10 +1277,45 @@ main (int argc, char **argv) +@@ -1182,10 +1273,45 @@ main (int argc, char **argv) a number. */
static void @@ -1981,7 +1952,7 @@ diff -urNp coreutils-8.19-orig/src/pr.c coreutils-8.19/src/pr.c if (*arg) { long int tmp_long; -@@ -1211,6 +1337,11 @@ static void +@@ -1207,6 +1333,11 @@ static void init_parameters (int number_of_files) { int chars_used_by_number = 0; @@ -1993,7 +1964,7 @@ diff -urNp coreutils-8.19-orig/src/pr.c coreutils-8.19/src/pr.c
lines_per_body = lines_per_page - lines_per_header - lines_per_footer; if (lines_per_body <= 0) -@@ -1248,7 +1379,7 @@ init_parameters (int number_of_files) +@@ -1244,7 +1375,7 @@ init_parameters (int number_of_files) else col_sep_string = column_separator;
@@ -2002,7 +1973,7 @@ diff -urNp coreutils-8.19-orig/src/pr.c coreutils-8.19/src/pr.c use_col_separator = true; } /* It's rather pointless to define a TAB separator with column -@@ -1279,11 +1410,11 @@ init_parameters (int number_of_files) +@@ -1274,11 +1405,11 @@ init_parameters (int number_of_files) + TAB_WIDTH (chars_per_input_tab, chars_per_number); */
/* Estimate chars_per_text without any margin and keep it constant. */ @@ -2016,7 +1987,7 @@ diff -urNp coreutils-8.19-orig/src/pr.c coreutils-8.19/src/pr.c
/* The number is part of the column width unless we are printing files in parallel. */ -@@ -1298,7 +1429,7 @@ init_parameters (int number_of_files) +@@ -1287,7 +1418,7 @@ init_parameters (int number_of_files) }
chars_per_column = (chars_per_line - chars_used_by_number @@ -2025,7 +1996,7 @@ diff -urNp coreutils-8.19-orig/src/pr.c coreutils-8.19/src/pr.c
if (chars_per_column < 1) error (EXIT_FAILURE, 0, _("page width too narrow")); -@@ -1315,7 +1446,7 @@ init_parameters (int number_of_files) +@@ -1305,7 +1436,7 @@ init_parameters (int number_of_files) We've to use 8 as the lower limit, if we use chars_per_default_tab = 8 to expand a tab which is not an input_tab-char. */ free (clump_buff); @@ -2034,7 +2005,7 @@ diff -urNp coreutils-8.19-orig/src/pr.c coreutils-8.19/src/pr.c } /* Open the necessary files, -@@ -1423,7 +1554,7 @@ init_funcs (void) +@@ -1413,7 +1544,7 @@ init_funcs (void)
/* Enlarge p->start_position of first column to use the same form of padding_not_printed with all columns. */ @@ -2043,7 +2014,7 @@ diff -urNp coreutils-8.19-orig/src/pr.c coreutils-8.19/src/pr.c
/* This loop takes care of all but the rightmost column. */
-@@ -1457,7 +1588,7 @@ init_funcs (void) +@@ -1447,7 +1578,7 @@ init_funcs (void) } else { @@ -2052,7 +2023,7 @@ diff -urNp coreutils-8.19-orig/src/pr.c coreutils-8.19/src/pr.c h_next = h + chars_per_column; } } -@@ -1748,9 +1879,9 @@ static void +@@ -1738,9 +1869,9 @@ static void align_column (COLUMN *p) { padding_not_printed = p->start_position; @@ -2064,7 +2035,7 @@ diff -urNp coreutils-8.19-orig/src/pr.c coreutils-8.19/src/pr.c padding_not_printed = ANYWHERE; }
-@@ -2021,13 +2152,13 @@ store_char (char c) +@@ -2011,13 +2142,13 @@ store_char (char c) /* May be too generous. */ buff = X2REALLOC (buff, &buff_allocated); } @@ -2078,9 +2049,9 @@ diff -urNp coreutils-8.19-orig/src/pr.c coreutils-8.19/src/pr.c - int i; + int i, j; char *s; - int left_cut; + int num_width;
-@@ -2050,22 +2181,24 @@ add_line_number (COLUMN *p) +@@ -2034,22 +2165,24 @@ add_line_number (COLUMN *p) /* Tabification is assumed for multiple columns, also for n-separators, but 'default n-separator = TAB' hasn't been given priority over equal column_width also specified by POSIX. */ @@ -2109,7 +2080,7 @@ diff -urNp coreutils-8.19-orig/src/pr.c coreutils-8.19/src/pr.c output_position = POS_AFTER_TAB (chars_per_output_tab, output_position); } -@@ -2226,7 +2359,7 @@ print_white_space (void) +@@ -2210,7 +2343,7 @@ print_white_space (void) while (goal - h_old > 1 && (h_new = POS_AFTER_TAB (chars_per_output_tab, h_old)) <= goal) { @@ -2118,7 +2089,7 @@ diff -urNp coreutils-8.19-orig/src/pr.c coreutils-8.19/src/pr.c h_old = h_new; } while (++h_old <= goal) -@@ -2246,6 +2379,7 @@ print_sep_string (void) +@@ -2230,6 +2363,7 @@ print_sep_string (void) { char *s; int l = col_sep_length; @@ -2126,7 +2097,7 @@ diff -urNp coreutils-8.19-orig/src/pr.c coreutils-8.19/src/pr.c
s = col_sep_string;
-@@ -2259,6 +2393,7 @@ print_sep_string (void) +@@ -2243,6 +2377,7 @@ print_sep_string (void) { for (; separators_not_printed > 0; --separators_not_printed) { @@ -2134,7 +2105,7 @@ diff -urNp coreutils-8.19-orig/src/pr.c coreutils-8.19/src/pr.c while (l-- > 0) { /* 3 types of sep_strings: spaces only, spaces and chars, -@@ -2272,12 +2407,15 @@ print_sep_string (void) +@@ -2256,12 +2391,15 @@ print_sep_string (void) } else { @@ -2151,7 +2122,7 @@ diff -urNp coreutils-8.19-orig/src/pr.c coreutils-8.19/src/pr.c /* sep_string ends with some spaces */ if (spaces_not_printed > 0) print_white_space (); -@@ -2305,7 +2443,7 @@ print_clump (COLUMN *p, int n, char *clu +@@ -2289,7 +2427,7 @@ print_clump (COLUMN *p, int n, char *clu required number of tabs and spaces. */
static void @@ -2160,7 +2131,7 @@ diff -urNp coreutils-8.19-orig/src/pr.c coreutils-8.19/src/pr.c { if (tabify_output) { -@@ -2329,6 +2467,74 @@ print_char (char c) +@@ -2313,6 +2451,74 @@ print_char (char c) putchar (c); }
@@ -2235,7 +2206,7 @@ diff -urNp coreutils-8.19-orig/src/pr.c coreutils-8.19/src/pr.c /* Skip to page PAGE before printing. PAGE may be larger than total number of pages. */
-@@ -2508,9 +2714,9 @@ read_line (COLUMN *p) +@@ -2492,9 +2698,9 @@ read_line (COLUMN *p) align_empty_cols = false; }
@@ -2247,7 +2218,7 @@ diff -urNp coreutils-8.19-orig/src/pr.c coreutils-8.19/src/pr.c padding_not_printed = ANYWHERE; }
-@@ -2611,9 +2817,9 @@ print_stored (COLUMN *p) +@@ -2595,9 +2801,9 @@ print_stored (COLUMN *p) } }
@@ -2259,7 +2230,7 @@ diff -urNp coreutils-8.19-orig/src/pr.c coreutils-8.19/src/pr.c padding_not_printed = ANYWHERE; }
-@@ -2626,8 +2832,8 @@ print_stored (COLUMN *p) +@@ -2610,8 +2816,8 @@ print_stored (COLUMN *p) if (spaces_not_printed == 0) { output_position = p->start_position + end_vector[line]; @@ -2270,7 +2241,7 @@ diff -urNp coreutils-8.19-orig/src/pr.c coreutils-8.19/src/pr.c }
return true; -@@ -2646,7 +2852,7 @@ print_stored (COLUMN *p) +@@ -2630,7 +2836,7 @@ print_stored (COLUMN *p) number of characters is 1.) */
static int @@ -2279,7 +2250,7 @@ diff -urNp coreutils-8.19-orig/src/pr.c coreutils-8.19/src/pr.c { unsigned char uc = c; char *s = clump_buff; -@@ -2656,10 +2862,10 @@ char_to_clump (char c) +@@ -2640,10 +2846,10 @@ char_to_clump (char c) int chars; int chars_per_c = 8;
@@ -2292,7 +2263,7 @@ diff -urNp coreutils-8.19-orig/src/pr.c coreutils-8.19/src/pr.c { width = TAB_WIDTH (chars_per_c, input_position);
-@@ -2740,6 +2946,154 @@ char_to_clump (char c) +@@ -2724,6 +2930,154 @@ char_to_clump (char c) return chars; }
@@ -2447,9 +2418,9 @@ diff -urNp coreutils-8.19-orig/src/pr.c coreutils-8.19/src/pr.c /* We've just printed some files and need to clean up things before looking for more options and printing the next batch of files.
-diff -urNp coreutils-8.19-orig/src/sort.c coreutils-8.19/src/sort.c ---- coreutils-8.19-orig/src/sort.c 2012-08-18 07:39:29.000000000 +0200 -+++ coreutils-8.19/src/sort.c 2012-08-20 13:52:04.079596072 +0200 +diff -urNp coreutils-8.21-orig/src/sort.c coreutils-8.21/src/sort.c +--- coreutils-8.21-orig/src/sort.c 2013-01-31 01:46:24.000000000 +0100 ++++ coreutils-8.21/src/sort.c 2013-02-15 14:25:07.828467769 +0100 @@ -29,6 +29,14 @@ #include <sys/wait.h> #include <signal.h> @@ -2518,7 +2489,7 @@ diff -urNp coreutils-8.19-orig/src/sort.c coreutils-8.19/src/sort.c
/* Flag to remove consecutive duplicate lines from the output. Only the last of a sequence of equal lines will be output. */ -@@ -784,6 +812,46 @@ reap_all (void) +@@ -783,6 +811,46 @@ reap_all (void) reap (-1); }
@@ -2565,7 +2536,7 @@ diff -urNp coreutils-8.19-orig/src/sort.c coreutils-8.19/src/sort.c /* Clean up any remaining temporary files. */
static void -@@ -1224,7 +1292,7 @@ zaptemp (char const *name) +@@ -1223,7 +1291,7 @@ zaptemp (char const *name) free (node); }
@@ -2574,7 +2545,7 @@ diff -urNp coreutils-8.19-orig/src/sort.c coreutils-8.19/src/sort.c
static int struct_month_cmp (void const *m1, void const *m2) -@@ -1239,7 +1307,7 @@ struct_month_cmp (void const *m1, void c +@@ -1238,7 +1306,7 @@ struct_month_cmp (void const *m1, void c /* Initialize the character class tables. */
static void @@ -2583,7 +2554,7 @@ diff -urNp coreutils-8.19-orig/src/sort.c coreutils-8.19/src/sort.c { size_t i;
-@@ -1251,7 +1319,7 @@ inittables (void) +@@ -1250,7 +1318,7 @@ inittables (void) fold_toupper[i] = toupper (i); }
@@ -2592,7 +2563,7 @@ diff -urNp coreutils-8.19-orig/src/sort.c coreutils-8.19/src/sort.c /* If we're not in the "C" locale, read different names for months. */ if (hard_LC_TIME) { -@@ -1333,6 +1401,84 @@ specify_nmerge (int oi, char c, char con +@@ -1332,6 +1400,84 @@ specify_nmerge (int oi, char c, char con xstrtol_fatal (e, oi, c, long_options, s); }
@@ -2677,7 +2648,7 @@ diff -urNp coreutils-8.19-orig/src/sort.c coreutils-8.19/src/sort.c /* Specify the amount of main memory to use when sorting. */ static void specify_sort_size (int oi, char c, char const *s) -@@ -1565,7 +1711,7 @@ buffer_linelim (struct buffer const *buf +@@ -1564,7 +1710,7 @@ buffer_linelim (struct buffer const *buf by KEY in LINE. */
static char * @@ -2686,7 +2657,7 @@ diff -urNp coreutils-8.19-orig/src/sort.c coreutils-8.19/src/sort.c { char *ptr = line->text, *lim = ptr + line->length - 1; size_t sword = key->sword; -@@ -1574,10 +1720,10 @@ begfield (struct line const *line, struc +@@ -1573,10 +1719,10 @@ begfield (struct line const *line, struc /* The leading field separator itself is included in a field when -t is absent. */
@@ -2699,7 +2670,7 @@ diff -urNp coreutils-8.19-orig/src/sort.c coreutils-8.19/src/sort.c ++ptr; if (ptr < lim) ++ptr; -@@ -1603,11 +1749,70 @@ begfield (struct line const *line, struc +@@ -1602,11 +1748,70 @@ begfield (struct line const *line, struc return ptr; }
@@ -2771,7 +2742,7 @@ diff -urNp coreutils-8.19-orig/src/sort.c coreutils-8.19/src/sort.c { char *ptr = line->text, *lim = ptr + line->length - 1; size_t eword = key->eword, echar = key->echar; -@@ -1622,10 +1827,10 @@ limfield (struct line const *line, struc +@@ -1621,10 +1826,10 @@ limfield (struct line const *line, struc 'beginning' is the first character following the delimiting TAB. Otherwise, leave PTR pointing at the first 'blank' character after the preceding field. */ @@ -2784,7 +2755,7 @@ diff -urNp coreutils-8.19-orig/src/sort.c coreutils-8.19/src/sort.c ++ptr; if (ptr < lim && (eword || echar)) ++ptr; -@@ -1671,10 +1876,10 @@ limfield (struct line const *line, struc +@@ -1670,10 +1875,10 @@ limfield (struct line const *line, struc */
/* Make LIM point to the end of (one byte past) the current field. */ @@ -2797,7 +2768,7 @@ diff -urNp coreutils-8.19-orig/src/sort.c coreutils-8.19/src/sort.c if (newlim) lim = newlim; } -@@ -1705,6 +1910,130 @@ limfield (struct line const *line, struc +@@ -1704,6 +1909,130 @@ limfield (struct line const *line, struc return ptr; }
@@ -2928,7 +2899,7 @@ diff -urNp coreutils-8.19-orig/src/sort.c coreutils-8.19/src/sort.c /* Fill BUF reading from FP, moving buf->left bytes from the end of buf->buf to the beginning first. If EOF is reached and the file wasn't terminated by a newline, supply one. Set up BUF's line -@@ -1791,8 +2120,22 @@ fillbuf (struct buffer *buf, FILE *fp, c +@@ -1790,8 +2119,22 @@ fillbuf (struct buffer *buf, FILE *fp, c else { if (key->skipsblanks) @@ -2953,7 +2924,7 @@ diff -urNp coreutils-8.19-orig/src/sort.c coreutils-8.19/src/sort.c line->keybeg = line_start; } } -@@ -1913,7 +2256,7 @@ human_numcompare (char const *a, char co +@@ -1912,7 +2255,7 @@ human_numcompare (char const *a, char co hideously fast. */
static int @@ -2962,7 +2933,7 @@ diff -urNp coreutils-8.19-orig/src/sort.c coreutils-8.19/src/sort.c { while (blanks[to_uchar (*a)]) a++; -@@ -1923,6 +2266,25 @@ numcompare (char const *a, char const *b +@@ -1922,6 +2265,25 @@ numcompare (char const *a, char const *b return strnumcmp (a, b, decimal_point, thousands_sep); }
@@ -2988,7 +2959,7 @@ diff -urNp coreutils-8.19-orig/src/sort.c coreutils-8.19/src/sort.c /* Work around a problem whereby the long double value returned by glibc's strtold ("NaN", ...) contains uninitialized bits: clear all bytes of A and B before calling strtold. FIXME: remove this function once -@@ -1973,7 +2335,7 @@ general_numcompare (char const *sa, char +@@ -1972,7 +2334,7 @@ general_numcompare (char const *sa, char Return 0 if the name in S is not recognized. */
static int @@ -2997,7 +2968,7 @@ diff -urNp coreutils-8.19-orig/src/sort.c coreutils-8.19/src/sort.c { size_t lo = 0; size_t hi = MONTHS_PER_YEAR; -@@ -2248,15 +2610,14 @@ debug_key (struct line const *line, stru +@@ -2247,15 +2609,14 @@ debug_key (struct line const *line, stru char saved = *lim; *lim = '\0';
@@ -3015,7 +2986,7 @@ diff -urNp coreutils-8.19-orig/src/sort.c coreutils-8.19/src/sort.c else if (key->general_numeric) ignore_value (strtold (beg, &tighter_lim)); else if (key->numeric || key->human_numeric) -@@ -2400,7 +2761,7 @@ key_warnings (struct keyfield const *gke +@@ -2399,7 +2760,7 @@ key_warnings (struct keyfield const *gke bool maybe_space_aligned = !hard_LC_COLLATE && default_key_compare (key) && !(key->schar || key->echar); bool line_offset = key->eword == 0 && key->echar != 0; /* -k1.x,1.y */ @@ -3024,7 +2995,7 @@ diff -urNp coreutils-8.19-orig/src/sort.c coreutils-8.19/src/sort.c && ((!key->skipsblanks && !(implicit_skip || maybe_space_aligned)) || (!key->skipsblanks && key->schar) || (!key->skipeblanks && key->echar))) -@@ -2458,11 +2819,83 @@ key_warnings (struct keyfield const *gke +@@ -2457,11 +2818,87 @@ key_warnings (struct keyfield const *gke error (0, 0, _("option '-r' only applies to last-resort comparison")); }
@@ -3051,13 +3022,13 @@ diff -urNp coreutils-8.19-orig/src/sort.c coreutils-8.19/src/sort.c + if (len == 0) + return 0; + -+ month = (char *) alloca (len + 1); ++ month = (char *) xmalloc (len + 1); + -+ tmp = (char *) alloca (len + 1); ++ tmp = (char *) xmalloc (len + 1); + memcpy (tmp, s, len); + tmp[len] = '\0'; + pp = (const char **)&tmp; -+ month_wcs = (wchar_t *) alloca ((len + 1) * sizeof (wchar_t)); ++ month_wcs = (wchar_t *) xmalloc ((len + 1) * sizeof (wchar_t)); + memset (&state, '\0', sizeof(mbstate_t)); + + wclength = mbsrtowcs (month_wcs, pp, len + 1, &state); @@ -3096,6 +3067,10 @@ diff -urNp coreutils-8.19-orig/src/sort.c coreutils-8.19/src/sort.c + if (ea && result) + *ea = s + strlen (monthtab[lo].name); + ++ free (month); ++ free (tmp); ++ free (month_wcs); ++ + return result; +} +#endif @@ -3109,7 +3084,7 @@ diff -urNp coreutils-8.19-orig/src/sort.c coreutils-8.19/src/sort.c { struct keyfield *key = keylist;
-@@ -2547,7 +2980,7 @@ keycompare (struct line const *a, struct +@@ -2546,7 +2983,7 @@ keycompare (struct line const *a, struct else if (key->human_numeric) diff = human_numcompare (ta, tb); else if (key->month) @@ -3118,7 +3093,7 @@ diff -urNp coreutils-8.19-orig/src/sort.c coreutils-8.19/src/sort.c else if (key->random) diff = compare_random (ta, tlena, tb, tlenb); else if (key->version) -@@ -2663,6 +3096,180 @@ keycompare (struct line const *a, struct +@@ -2662,6 +3099,181 @@ keycompare (struct line const *a, struct return key->reverse ? -diff : diff; }
@@ -3174,7 +3149,7 @@ diff -urNp coreutils-8.19-orig/src/sort.c coreutils-8.19/src/sort.c + { + if (ignore || translate) + { -+ char *copy_a = (char *) alloca (lena + 1 + lenb + 1); ++ char *copy_a = (char *) xmalloc (lena + 1 + lenb + 1); + char *copy_b = copy_a + lena + 1; + size_t new_len_a, new_len_b; + size_t i, j; @@ -3250,6 +3225,7 @@ diff -urNp coreutils-8.19-orig/src/sort.c coreutils-8.19/src/sort.c + IGNORE_CHARS (new_len_b, lenb, textb, copy_b, + wc_b, mblength_b, state_b); + diff = xmemcoll (copy_a, new_len_a, copy_b, new_len_b); ++ free(copy_a); + } + else if (lena == 0) + diff = - NONZERO (lenb); @@ -3299,7 +3275,7 @@ diff -urNp coreutils-8.19-orig/src/sort.c coreutils-8.19/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. */
-@@ -4158,7 +4765,7 @@ main (int argc, char **argv) +@@ -4157,7 +4769,7 @@ main (int argc, char **argv) initialize_exit_failure (SORT_FAILURE);
hard_LC_COLLATE = hard_locale (LC_COLLATE); @@ -3308,7 +3284,7 @@ diff -urNp coreutils-8.19-orig/src/sort.c coreutils-8.19/src/sort.c hard_LC_TIME = hard_locale (LC_TIME); #endif
-@@ -4179,6 +4786,29 @@ main (int argc, char **argv) +@@ -4178,6 +4790,29 @@ main (int argc, char **argv) thousands_sep = -1; }
@@ -3338,7 +3314,7 @@ diff -urNp coreutils-8.19-orig/src/sort.c coreutils-8.19/src/sort.c have_read_stdin = false; inittables ();
-@@ -4453,13 +5083,34 @@ main (int argc, char **argv) +@@ -4452,13 +5087,34 @@ main (int argc, char **argv)
case 't': { @@ -3377,7 +3353,7 @@ diff -urNp coreutils-8.19-orig/src/sort.c coreutils-8.19/src/sort.c else { /* Provoke with 'sort -txx'. Complain about -@@ -4470,9 +5121,12 @@ main (int argc, char **argv) +@@ -4469,9 +5125,12 @@ main (int argc, char **argv) quote (optarg)); } } @@ -3392,9 +3368,9 @@ diff -urNp coreutils-8.19-orig/src/sort.c coreutils-8.19/src/sort.c } break;
-diff -urNp coreutils-8.19-orig/src/unexpand.c coreutils-8.19/src/unexpand.c ---- coreutils-8.19-orig/src/unexpand.c 2012-07-21 16:54:31.000000000 +0200 -+++ coreutils-8.19/src/unexpand.c 2012-08-20 13:52:04.081596774 +0200 +diff -urNp coreutils-8.21-orig/src/unexpand.c coreutils-8.21/src/unexpand.c +--- coreutils-8.21-orig/src/unexpand.c 2013-01-31 01:46:24.000000000 +0100 ++++ coreutils-8.21/src/unexpand.c 2013-02-15 14:25:07.834467715 +0100 @@ -38,12 +38,29 @@ #include <stdio.h> #include <getopt.h> @@ -3425,7 +3401,7 @@ diff -urNp coreutils-8.19-orig/src/unexpand.c coreutils-8.19/src/unexpand.c /* The official name of this program (e.g., no 'g' prefix). */ #define PROGRAM_NAME "unexpand"
-@@ -103,6 +120,208 @@ static struct option const longopts[] = +@@ -103,6 +120,210 @@ static struct option const longopts[] = {NULL, 0, NULL, 0} };
@@ -3445,6 +3421,7 @@ diff -urNp coreutils-8.19-orig/src/unexpand.c coreutils-8.19/src/unexpand.c + wint_t wc; /* A gotten wide character. */ + size_t mblength; /* The byte size of a multibyte character + which shows as same character as WC. */ ++ bool prev_tab = false; + + /* Index in `tab_list' of next tabstop: */ + int tab_index = 0; /* For calculating width of pending tabs. */ @@ -3523,7 +3500,7 @@ diff -urNp coreutils-8.19-orig/src/unexpand.c coreutils-8.19/src/unexpand.c +flush_pend_mb: + /* Flush pending spaces. Print as many tabs as possible, + then print the rest as spaces. */ -+ if (pending == 1) ++ if (pending == 1 && column != 1 && !prev_tab) + { + putchar (' '); + pending = 0; @@ -3624,6 +3601,7 @@ diff -urNp coreutils-8.19-orig/src/unexpand.c coreutils-8.19/src/unexpand.c + fwrite (bufpos, sizeof(char), mblength, stdout); + } + } ++ prev_tab = wc == L'\t'; + buflen -= mblength; + bufpos += mblength; + } @@ -3634,7 +3612,7 @@ diff -urNp coreutils-8.19-orig/src/unexpand.c coreutils-8.19/src/unexpand.c void usage (int status) { -@@ -524,7 +743,12 @@ main (int argc, char **argv) +@@ -523,7 +742,12 @@ main (int argc, char **argv)
file_list = (optind < argc ? &argv[optind] : stdin_argv);
@@ -3648,9 +3626,9 @@ diff -urNp coreutils-8.19-orig/src/unexpand.c coreutils-8.19/src/unexpand.c
if (have_read_stdin && fclose (stdin) != 0) error (EXIT_FAILURE, errno, "-"); -diff -urNp coreutils-8.19-orig/src/uniq.c coreutils-8.19/src/uniq.c ---- coreutils-8.19-orig/src/uniq.c 2012-07-21 16:54:31.000000000 +0200 -+++ coreutils-8.19/src/uniq.c 2012-08-20 13:52:04.083502506 +0200 +diff -urNp coreutils-8.21-orig/src/uniq.c coreutils-8.21/src/uniq.c +--- coreutils-8.21-orig/src/uniq.c 2013-01-31 01:46:24.000000000 +0100 ++++ coreutils-8.21/src/uniq.c 2013-02-15 14:25:07.839467991 +0100 @@ -21,6 +21,16 @@ #include <getopt.h> #include <sys/types.h> @@ -3700,7 +3678,7 @@ diff -urNp coreutils-8.19-orig/src/uniq.c coreutils-8.19/src/uniq.c static struct option const longopts[] = { {"count", no_argument, NULL, 'c'}, -@@ -206,7 +232,7 @@ size_opt (char const *opt, char const *m +@@ -205,7 +231,7 @@ size_opt (char const *opt, char const *m return a pointer to the beginning of the line's field to be compared. */
static char * _GL_ATTRIBUTE_PURE @@ -3709,7 +3687,7 @@ diff -urNp coreutils-8.19-orig/src/uniq.c coreutils-8.19/src/uniq.c { size_t count; char const *lp = line->buffer; -@@ -226,6 +252,83 @@ find_field (struct linebuffer const *lin +@@ -225,6 +251,83 @@ find_field (struct linebuffer const *lin return line->buffer + i; }
@@ -3793,7 +3771,7 @@ diff -urNp coreutils-8.19-orig/src/uniq.c coreutils-8.19/src/uniq.c /* Return false if two strings OLD and NEW match, true if not. OLD and NEW point not to the beginnings of the lines but rather to the beginnings of the fields to compare. -@@ -234,6 +337,8 @@ find_field (struct linebuffer const *lin +@@ -233,6 +336,8 @@ find_field (struct linebuffer const *lin static bool different (char *old, char *new, size_t oldlen, size_t newlen) { @@ -3802,7 +3780,7 @@ diff -urNp coreutils-8.19-orig/src/uniq.c coreutils-8.19/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 +@@ -240,14 +345,100 @@ different (char *old, char *new, size_t
if (ignore_case) { @@ -3810,14 +3788,18 @@ diff -urNp coreutils-8.19-orig/src/uniq.c coreutils-8.19/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 (oldlen + 1); ++ copy_new = xmalloc (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; @@ -3829,6 +3811,7 @@ diff -urNp coreutils-8.19-orig/src/uniq.c coreutils-8.19/src/uniq.c + } + + return xmemcoll (copy_old, oldlen, copy_new, newlen); ++ +} + +#if HAVE_MBRTOWC @@ -3853,7 +3836,7 @@ diff -urNp coreutils-8.19-orig/src/uniq.c coreutils-8.19/src/uniq.c + + for (i = 0; i < 2; i++) + { -+ copy[i] = alloca (len[i] + 1); ++ copy[i] = xmalloc (len[i] + 1); + + for (j = 0, chars = 0; j < len[i] && chars < check_chars; chars++) + { @@ -3893,14 +3876,17 @@ diff -urNp coreutils-8.19-orig/src/uniq.c coreutils-8.19/src/uniq.c + copy[i][j] = '\0'; + len[i] = j; + } ++ int rc = xmemcoll (copy[0], len[0], copy[1], len[1]); ++ free (copy[0]); ++ free (copy[1]); ++ return rc; + -+ return xmemcoll (copy[0], len[0], copy[1], len[1]); } +#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 +@@ -303,15 +494,43 @@ check_file (const char *infile, const ch { char *prevfield IF_LINT ( = NULL); size_t prevlen IF_LINT ( = 0); @@ -3944,7 +3930,7 @@ diff -urNp coreutils-8.19-orig/src/uniq.c coreutils-8.19/src/uniq.c if (prevline->length == 0 || different (thisfield, prevfield, thislen, prevlen)) { -@@ -331,17 +542,26 @@ check_file (const char *infile, const ch +@@ -330,17 +549,26 @@ check_file (const char *infile, const ch size_t prevlen; uintmax_t match_count = 0; bool first_delimiter = true; @@ -3971,7 +3957,7 @@ diff -urNp coreutils-8.19-orig/src/uniq.c coreutils-8.19/src/uniq.c if (readlinebuffer_delim (thisline, stdin, delimiter) == 0) { if (ferror (stdin)) -@@ -350,6 +570,14 @@ check_file (const char *infile, const ch +@@ -349,6 +577,14 @@ check_file (const char *infile, const ch } thisfield = find_field (thisline); thislen = thisline->length - 1 - (thisfield - thisline->buffer); @@ -3986,7 +3972,7 @@ diff -urNp coreutils-8.19-orig/src/uniq.c coreutils-8.19/src/uniq.c match = !different (thisfield, prevfield, thislen, prevlen); match_count += match;
-@@ -382,6 +610,9 @@ check_file (const char *infile, const ch +@@ -381,6 +617,9 @@ check_file (const char *infile, const ch SWAP_LINES (prevline, thisline); prevfield = thisfield; prevlen = thislen; @@ -3996,7 +3982,7 @@ diff -urNp coreutils-8.19-orig/src/uniq.c coreutils-8.19/src/uniq.c if (!match) match_count = 0; } -@@ -427,6 +658,19 @@ main (int argc, char **argv) +@@ -426,6 +665,19 @@ main (int argc, char **argv)
atexit (close_stdout);
@@ -4016,32 +4002,21 @@ diff -urNp coreutils-8.19-orig/src/uniq.c coreutils-8.19/src/uniq.c skip_chars = 0; skip_fields = 0; check_chars = SIZE_MAX; -diff -urNp coreutils-8.19-orig/tests/Makefile.am coreutils-8.19/tests/Makefile.am ---- coreutils-8.19-orig/tests/Makefile.am 2012-08-20 13:51:39.856841699 +0200 -+++ coreutils-8.19/tests/Makefile.am 2012-08-20 13:52:04.085491266 +0200 -@@ -247,6 +247,7 @@ TESTS = \ - misc/sort-debug-warn \ - misc/sort-discrim \ - misc/sort-files0-from \ -+ misc/sort-mb-tests \ - misc/sort-float \ - misc/sort-merge \ - misc/sort-merge-fdlimit \ -@@ -551,6 +552,10 @@ TESTS = \ - $(root_tests) - - pr_data = \ -+ misc/mb1.X \ -+ misc/mb1.I \ -+ misc/mb2.X \ -+ misc/mb2.I \ - pr/0F \ - pr/0FF \ - pr/0FFnt \ -diff -urNp coreutils-8.19-orig/tests/misc/cut coreutils-8.19/tests/misc/cut ---- coreutils-8.19-orig/tests/misc/cut 2012-07-21 16:54:31.000000000 +0200 -+++ coreutils-8.19/tests/misc/cut 2012-08-20 13:52:04.086593767 +0200 -@@ -23,14 +23,15 @@ use strict; +diff -urNp coreutils-8.21-orig/tests/local.mk coreutils-8.21/tests/local.mk +--- coreutils-8.21-orig/tests/local.mk 2013-02-15 14:24:32.645654553 +0100 ++++ coreutils-8.21/tests/local.mk 2013-02-15 14:25:07.873467648 +0100 +@@ -325,6 +325,7 @@ all_tests = \ + tests/misc/sort-discrim.sh \ + tests/misc/sort-files0-from.pl \ + tests/misc/sort-float.sh \ ++ tests/misc/sort-mb-tests.sh \ + tests/misc/sort-merge.pl \ + tests/misc/sort-merge-fdlimit.sh \ + tests/misc/sort-month.sh \ +diff -urNp coreutils-8.21-orig/tests/misc/cut.pl coreutils-8.21/tests/misc/cut.pl +--- coreutils-8.21-orig/tests/misc/cut.pl 2013-02-05 00:40:31.000000000 +0100 ++++ coreutils-8.21/tests/misc/cut.pl 2013-02-15 14:27:18.974468564 +0100 +@@ -23,9 +23,10 @@ use strict; # Turn off localization of executable's output. @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
@@ -4055,24 +4030,9 @@ diff -urNp coreutils-8.19-orig/tests/misc/cut coreutils-8.19/tests/misc/cut
my $prog = 'cut'; my $try = "Try '$prog --help' for more information.\n"; - my $from_1 = "$prog: fields and positions are numbered from 1\n$try"; --my $inval = "$prog: invalid byte or field list\n$try"; -+my $inval = "$prog: invalid byte, character or field list\n$try"; - my $no_endpoint = "$prog: invalid range with no endpoint: -\n$try"; - - my @Tests = -@@ -147,7 +148,7 @@ my @Tests = - - # None of the following invalid ranges provoked an error up to coreutils-6.9. - ['inval1', qw(-f 2-0), {IN=>''}, {OUT=>''}, {EXIT=>1}, -- {ERR=>"$prog: invalid decreasing range\n$try"}], -+ {ERR=>"$prog: invalid byte, character or field list\n$try"}], - ['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}, -diff -urNp coreutils-8.19-orig/tests/misc/expand coreutils-8.19/tests/misc/expand ---- coreutils-8.19-orig/tests/misc/expand 2012-07-21 16:54:31.000000000 +0200 -+++ coreutils-8.19/tests/misc/expand 2012-08-20 13:55:44.188467648 +0200 +diff -urNp coreutils-8.21-orig/tests/misc/expand.pl coreutils-8.21/tests/misc/expand.pl +--- coreutils-8.21-orig/tests/misc/expand.pl 2013-01-31 01:46:24.000000000 +0100 ++++ coreutils-8.21/tests/misc/expand.pl 2013-02-15 14:25:07.891468472 +0100 @@ -23,6 +23,15 @@ use strict; # Turn off localization of executable's output. @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3; @@ -4127,97 +4087,84 @@ diff -urNp coreutils-8.19-orig/tests/misc/expand coreutils-8.19/tests/misc/expan my $save_temps = $ENV{DEBUG}; my $verbose = $ENV{VERBOSE};
-diff -urNp coreutils-8.19-orig/tests/misc/mb1.I coreutils-8.19/tests/misc/mb1.I ---- coreutils-8.19-orig/tests/misc/mb1.I 1970-01-01 01:00:00.000000000 +0100 -+++ coreutils-8.19/tests/misc/mb1.I 2012-08-20 13:52:04.086593767 +0200 +diff -urNp coreutils-8.21-orig/tests/misc/mb1.I coreutils-8.21/tests/misc/mb1.I +--- coreutils-8.21-orig/tests/misc/mb1.I 1970-01-01 01:00:00.000000000 +0100 ++++ coreutils-8.21/tests/misc/mb1.I 2013-02-15 14:25:07.902467891 +0100 @@ -0,0 +1,4 @@ +Apple@10 +Banana@5 +Citrus@20 +Cherry@30 -diff -urNp coreutils-8.19-orig/tests/misc/mb1.X coreutils-8.19/tests/misc/mb1.X ---- coreutils-8.19-orig/tests/misc/mb1.X 1970-01-01 01:00:00.000000000 +0100 -+++ coreutils-8.19/tests/misc/mb1.X 2012-08-20 13:52:04.087526516 +0200 +diff -urNp coreutils-8.21-orig/tests/misc/mb1.X coreutils-8.21/tests/misc/mb1.X +--- coreutils-8.21-orig/tests/misc/mb1.X 1970-01-01 01:00:00.000000000 +0100 ++++ coreutils-8.21/tests/misc/mb1.X 2013-02-15 14:25:07.917467426 +0100 @@ -0,0 +1,4 @@ +Banana@5 +Apple@10 +Citrus@20 +Cherry@30 -diff -urNp coreutils-8.19-orig/tests/misc/mb2.I coreutils-8.19/tests/misc/mb2.I ---- coreutils-8.19-orig/tests/misc/mb2.I 1970-01-01 01:00:00.000000000 +0100 -+++ coreutils-8.19/tests/misc/mb2.I 2012-08-20 13:52:04.088593815 +0200 +diff -urNp coreutils-8.21-orig/tests/misc/mb2.I coreutils-8.21/tests/misc/mb2.I +--- coreutils-8.21-orig/tests/misc/mb2.I 1970-01-01 01:00:00.000000000 +0100 ++++ coreutils-8.21/tests/misc/mb2.I 2013-02-15 14:25:07.933467390 +0100 @@ -0,0 +1,4 @@ +Apple@AA10@@20 +Banana@AA5@@30 +Citrus@AA20@@5 +Cherry@AA30@@10 -diff -urNp coreutils-8.19-orig/tests/misc/mb2.X coreutils-8.19/tests/misc/mb2.X ---- coreutils-8.19-orig/tests/misc/mb2.X 1970-01-01 01:00:00.000000000 +0100 -+++ coreutils-8.19/tests/misc/mb2.X 2012-08-20 13:52:04.088593815 +0200 +diff -urNp coreutils-8.21-orig/tests/misc/mb2.X coreutils-8.21/tests/misc/mb2.X +--- coreutils-8.21-orig/tests/misc/mb2.X 1970-01-01 01:00:00.000000000 +0100 ++++ coreutils-8.21/tests/misc/mb2.X 2013-02-15 14:25:08.002467808 +0100 @@ -0,0 +1,4 @@ +Citrus@AA20@@5 +Cherry@AA30@@10 +Apple@AA10@@20 +Banana@AA5@@30 -diff -urNp coreutils-8.19-orig/tests/misc/sort-mb-tests coreutils-8.19/tests/misc/sort-mb-tests ---- coreutils-8.19-orig/tests/misc/sort-mb-tests 1970-01-01 01:00:00.000000000 +0100 -+++ coreutils-8.19/tests/misc/sort-mb-tests 2012-08-20 13:52:04.089593318 +0200 -@@ -0,0 +1,58 @@ -+#! /bin/sh -+case $# in -+ 0) xx='../src/sort';; -+ *) xx="$1";; -+esac -+test "$VERBOSE" && echo=echo || echo=: -+$echo testing program: $xx -+errors=0 -+test "$srcdir" || srcdir=. -+test "$VERBOSE" && $xx --version 2> /dev/null +diff -urNp coreutils-8.21-orig/tests/misc/sort-mb-tests.sh coreutils-8.21/tests/misc/sort-mb-tests.sh +--- coreutils-8.21-orig/tests/misc/sort-mb-tests.sh 1970-01-01 01:00:00.000000000 +0100 ++++ coreutils-8.21/tests/misc/sort-mb-tests.sh 2013-02-18 17:44:03.852275681 +0100 +@@ -0,0 +1,45 @@ ++#!/bin/sh ++# Verify sort's multi-byte support. ++ ++. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src ++print_ver_ sort + +export LC_ALL=en_US.UTF-8 -+locale -k LC_CTYPE 2>&1 | grep -q charmap.*UTF-8 || exit 77 -+errors=0 -+ -+$xx -t @ -k2 -n misc/mb1.I > misc/mb1.O -+code=$? -+if test $code != 0; then -+ $echo "Test mb1 failed: $xx return code $code differs from expected value 0" -+ errors=`expr $errors + 1` -+else -+ cmp misc/mb1.O $srcdir/misc/mb1.X > /dev/null 2>&1 -+ case $? in -+ 0) if test "$VERBOSE"; then $echo "passed mb1"; fi;; -+ 1) $echo "Test mb1 failed: files misc/mb1.O and $srcdir/misc/mb1.X differ" 1>&2 -+ (diff -c misc/mb1.O $srcdir/misc/mb1.X) 2> /dev/null -+ errors=`expr $errors + 1`;; -+ 2) $echo "Test mb1 may have failed." 1>&2 -+ $echo The command "cmp misc/mb1.O $srcdir/misc/mb1.X" failed. 1>&2 -+ errors=`expr $errors + 1`;; -+ esac -+fi -+ -+$xx -t @ -k4 -n misc/mb2.I > misc/mb2.O -+code=$? -+if test $code != 0; then -+ $echo "Test mb2 failed: $xx return code $code differs from expected value 0" 1>&2 -+ errors=`expr $errors + 1` -+else -+ cmp misc/mb2.O $srcdir/misc/mb2.X > /dev/null 2>&1 -+ case $? in -+ 0) if test "$VERBOSE"; then $echo "passed mb2"; fi;; -+ 1) $echo "Test mb2 failed: files misc/mb2.O and $srcdir/misc/mb2.X differ" 1>&2 -+ (diff -c misc/mb2.O $srcdir/misc/mb2.X) 2> /dev/null -+ errors=`expr $errors + 1`;; -+ 2) $echo "Test mb2 may have failed." 1>&2 -+ $echo The command "cmp misc/mb2.O $srcdir/misc/mb2.X" failed. 1>&2 -+ errors=`expr $errors + 1`;; -+ esac -+fi -+ -+if test $errors = 0; then -+ $echo Passed all 113 tests. 1>&2 -+else -+ $echo Failed $errors tests. 1>&2 -+fi -+test $errors = 0 || errors=1 -+exit $errors ++locale -k LC_CTYPE | grep -q "charmap.*UTF-8" \ ++ || skip_ "No UTF-8 locale available" ++ ++ ++cat <<EOF > exp ++Banana@5 ++Apple@10 ++Citrus@20 ++Cherry@30 ++EOF ++ ++cat <<EOF | sort -t @ -k2 -n > out || fail=1 ++Apple@10 ++Banana@5 ++Citrus@20 ++Cherry@30 ++EOF ++ ++compare exp out || { fail=1; cat out; } ++ ++ ++cat <<EOF > exp ++Citrus@AA20@@5 ++Cherry@AA30@@10 ++Apple@AA10@@20 ++Banana@AA5@@30 ++EOF ++ ++cat <<EOF | sort -t @ -k4 -n > out || fail=1 ++Apple@AA10@@20 ++Banana@AA5@@30 ++Citrus@AA20@@5 ++Cherry@AA30@@10 ++EOF ++ ++compare exp out || { fail=1; cat out; } ++ ++Exit $fail diff --git a/coreutils/patches/coreutils-ipfire-disabled-tests.patch b/coreutils/patches/coreutils-ipfire-disabled-tests.patch index 775e638..d77afb3 100644 --- a/coreutils/patches/coreutils-ipfire-disabled-tests.patch +++ b/coreutils/patches/coreutils-ipfire-disabled-tests.patch @@ -1,40 +1,86 @@ -diff -Nur a/tests/Makefile.am b/tests/Makefile.am ---- a/tests/Makefile.am 2012-08-18 08:02:47.000000000 +0200 -+++ b/tests/Makefile.am 2012-08-26 14:57:03.065516651 +0200 -@@ -24,7 +24,6 @@ - - root_tests = \ - chown/basic \ -- cp/cp-a-selinux \ - cp/preserve-gid \ - cp/special-bits \ - cp/cp-mv-enotsup-xattr \ -@@ -199,7 +198,6 @@ - misc/groups-version \ - misc/head-c \ - misc/head-pos \ -- misc/id-context \ - misc/id-groups \ - misc/id-setgid \ - misc/md5sum \ -@@ -252,7 +250,6 @@ - misc/sort-merge \ - misc/sort-merge-fdlimit \ - misc/sort-month \ -- misc/sort-exit-early \ - misc/sort-rand \ - misc/sort-spinlock-abuse \ - misc/sort-stale-thread-mem \ -@@ -421,12 +418,10 @@ - du/trailing-slash \ - du/two-args \ - id/gnu-zero-uids \ -- id/no-context \ - install/basic-1 \ - install/create-leading \ - install/d-slashdot \ - install/install-C \ -- install/install-C-selinux \ - install/strip-program \ - install/trap \ - ln/backup-1 \ +diff -Nur b/gnulib-tests/gnulib.mk a/gnulib-tests/gnulib.mk +--- b/gnulib-tests/gnulib.mk 2013-02-07 17:58:44.000000000 +0100 ++++ a/gnulib-tests/gnulib.mk 2013-04-01 20:59:40.550543124 +0200 +@@ -524,10 +524,10 @@ + + ## begin gnulib module fdutimensat-tests + +-TESTS += test-fdutimensat +-check_PROGRAMS += test-fdutimensat +-test_fdutimensat_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME) @LIBINTL@ +-EXTRA_DIST += nap.h test-futimens.h test-lutimens.h test-utimens.h test-utimens-common.h test-fdutimensat.c macros.h ++#TESTS += test-fdutimensat ++#check_PROGRAMS += test-fdutimensat ++#test_fdutimensat_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME) @LIBINTL@ ++#EXTRA_DIST += nap.h test-futimens.h test-lutimens.h test-utimens.h test-utimens-common.h test-fdutimensat.c macros.h + + ## end gnulib module fdutimensat-tests + +@@ -2438,19 +2438,19 @@ + + ## begin gnulib module utimens-tests + +-TESTS += test-utimens +-check_PROGRAMS += test-utimens +-test_utimens_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME) @LIBINTL@ +-EXTRA_DIST += nap.h test-futimens.h test-lutimens.h test-utimens.h test-utimens-common.h test-utimens.c macros.h ++#TESTS += test-utimens ++#check_PROGRAMS += test-utimens ++#test_utimens_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME) @LIBINTL@ ++#EXTRA_DIST += nap.h test-futimens.h test-lutimens.h test-utimens.h test-utimens-common.h test-utimens.c macros.h + + ## end gnulib module utimens-tests + + ## begin gnulib module utimensat-tests + +-TESTS += test-utimensat +-check_PROGRAMS += test-utimensat +-test_utimensat_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME) @LIBINTL@ +-EXTRA_DIST += nap.h test-lutimens.h test-utimens.h test-utimens-common.h test-utimensat.c signature.h macros.h ++#TESTS += test-utimensat ++#check_PROGRAMS += test-utimensat ++#test_utimensat_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME) @LIBINTL@ ++#EXTRA_DIST += nap.h test-lutimens.h test-utimens.h test-utimens-common.h test-utimensat.c signature.h macros.h + + ## end gnulib module utimensat-tests + +diff -Nur b/tests/local.mk a/tests/local.mk +--- b/tests/local.mk 2013-02-11 11:30:12.000000000 +0100 ++++ a/tests/local.mk 2013-04-01 19:42:42.212419701 +0200 +@@ -108,7 +108,6 @@ + + all_root_tests = \ + tests/chown/basic.sh \ +- tests/cp/cp-a-selinux.sh \ + tests/cp/preserve-gid.sh \ + tests/cp/special-bits.sh \ + tests/cp/cp-mv-enotsup-xattr.sh \ +@@ -274,7 +273,6 @@ + tests/misc/groups-version.sh \ + tests/misc/head-c.sh \ + tests/misc/head-pos.sh \ +- tests/misc/id-context.sh \ + tests/misc/id-groups.sh \ + tests/misc/id-setgid.sh \ + tests/misc/md5sum.pl \ +@@ -328,7 +326,6 @@ + tests/misc/sort-merge.pl \ + tests/misc/sort-merge-fdlimit.sh \ + tests/misc/sort-month.sh \ +- tests/misc/sort-exit-early.sh \ + tests/misc/sort-rand.sh \ + tests/misc/sort-spinlock-abuse.sh \ + tests/misc/sort-stale-thread-mem.sh \ +@@ -503,12 +500,10 @@ + tests/du/trailing-slash.sh \ + tests/du/two-args.sh \ + tests/id/gnu-zero-uids.sh \ +- tests/id/no-context.sh \ + tests/install/basic-1.sh \ + tests/install/create-leading.sh \ + tests/install/d-slashdot.sh \ + tests/install/install-C.sh \ +- tests/install/install-C-selinux.sh \ + tests/install/strip-program.sh \ + tests/install/trap.sh \ + tests/ln/backup-1.sh \ diff --git a/coreutils/patches/coreutils-selinux.patch b/coreutils/patches/coreutils-selinux.patch index 501b33e..a151acb 100644 --- a/coreutils/patches/coreutils-selinux.patch +++ b/coreutils/patches/coreutils-selinux.patch @@ -1,7 +1,7 @@ -diff -urNp coreutils-8.13-orig/configure.ac coreutils-8.13/configure.ac ---- coreutils-8.13-orig/configure.ac 2011-09-09 10:29:52.584690353 +0200 -+++ coreutils-8.13/configure.ac 2011-09-09 10:30:39.524564991 +0200 -@@ -141,6 +141,13 @@ if test "$gl_gcc_warnings" = yes; then +diff -urNp coreutils-8.21-orig/configure.ac coreutils-8.21/configure.ac +--- coreutils-8.21-orig/configure.ac 2013-01-31 01:46:24.000000000 +0100 ++++ coreutils-8.21/configure.ac 2013-02-15 14:31:58.937482694 +0100 +@@ -204,6 +204,13 @@ if test "$gl_gcc_warnings" = yes; then AC_SUBST([GNULIB_TEST_WARN_CFLAGS]) fi
@@ -14,19 +14,33 @@ diff -urNp coreutils-8.13-orig/configure.ac coreutils-8.13/configure.ac + AC_FUNC_FORK
- AC_ARG_ENABLE(pam, AS_HELP_STRING([--disable-pam], -diff -urNp coreutils-8.13-orig/man/chcon.x coreutils-8.13/man/chcon.x ---- coreutils-8.13-orig/man/chcon.x 2009-09-01 13:01:16.000000000 +0200 -+++ coreutils-8.13/man/chcon.x 2011-09-09 10:30:39.524564991 +0200 + optional_bin_progs= +diff -urNp coreutils-8.21-orig/init.cfg coreutils-8.21/init.cfg +--- coreutils-8.21-orig/init.cfg 2013-01-31 01:46:24.000000000 +0100 ++++ coreutils-8.21/init.cfg 2013-02-15 14:31:58.957469955 +0100 +@@ -308,8 +308,8 @@ require_selinux_() + + # Independent of whether SELinux is enabled system-wide, + # the current file system may lack SELinux support. +- case $(ls -Zd .) in +- '? .'|'unlabeled .') ++ case $(ls -Zd . | cut -f4 -d" ") in ++ '?'|'unlabeled') + skip_ "this system (or maybe just" \ + "the current file system) lacks SELinux support" + ;; +diff -urNp coreutils-8.21-orig/man/chcon.x coreutils-8.21/man/chcon.x +--- coreutils-8.21-orig/man/chcon.x 2011-08-23 15:44:01.000000000 +0200 ++++ coreutils-8.21/man/chcon.x 2013-02-15 14:31:58.937482694 +0100 @@ -1,4 +1,4 @@ [NAME] -chcon - change file security context +chcon - change file SELinux security context [DESCRIPTION] ." Add any additional description here -diff -urNp coreutils-8.13-orig/man/runcon.x coreutils-8.13/man/runcon.x ---- coreutils-8.13-orig/man/runcon.x 2009-09-01 13:01:16.000000000 +0200 -+++ coreutils-8.13/man/runcon.x 2011-09-09 10:30:39.544686472 +0200 +diff -urNp coreutils-8.21-orig/man/runcon.x coreutils-8.21/man/runcon.x +--- coreutils-8.21-orig/man/runcon.x 2011-08-23 15:44:01.000000000 +0200 ++++ coreutils-8.21/man/runcon.x 2013-02-15 14:31:58.938486496 +0100 @@ -1,5 +1,5 @@ [NAME] -runcon - run command with specified security context @@ -34,22 +48,22 @@ diff -urNp coreutils-8.13-orig/man/runcon.x coreutils-8.13/man/runcon.x [DESCRIPTION] Run COMMAND with completely-specified CONTEXT, or with current or transitioned security context modified by one or more of LEVEL, -diff -urNp coreutils-8.13-orig/src/chcon.c coreutils-8.13/src/chcon.c ---- coreutils-8.13-orig/src/chcon.c 2011-07-28 12:38:27.000000000 +0200 -+++ coreutils-8.13/src/chcon.c 2011-09-09 10:30:39.562561252 +0200 -@@ -356,7 +356,7 @@ Usage: %s [OPTION]... CONTEXT FILE...\n\ +diff -urNp coreutils-8.21-orig/src/chcon.c coreutils-8.21/src/chcon.c +--- coreutils-8.21-orig/src/chcon.c 2013-01-31 01:46:24.000000000 +0100 ++++ coreutils-8.21/src/chcon.c 2013-02-15 14:31:58.939469828 +0100 +@@ -355,7 +355,7 @@ Usage: %s [OPTION]... CONTEXT FILE...\n\ "), program_name, program_name, program_name); fputs (_("\ -Change the security context of each FILE to CONTEXT.\n\ +Change the SELinux security context of each FILE to CONTEXT.\n\ With --reference, change the security context of each FILE to that of RFILE.\n\ - \n\ "), stdout); -diff -urNp coreutils-8.13-orig/src/copy.c coreutils-8.13/src/copy.c ---- coreutils-8.13-orig/src/copy.c 2011-07-28 12:38:27.000000000 +0200 -+++ coreutils-8.13/src/copy.c 2011-09-09 10:30:39.564562214 +0200 -@@ -2244,6 +2244,8 @@ copy_internal (char const *src_name, cha + +diff -urNp coreutils-8.21-orig/src/copy.c coreutils-8.21/src/copy.c +--- coreutils-8.21-orig/src/copy.c 2013-02-07 10:37:05.000000000 +0100 ++++ coreutils-8.21/src/copy.c 2013-02-15 14:31:58.941467872 +0100 +@@ -2315,6 +2315,8 @@ copy_internal (char const *src_name, cha { /* Here, we are crossing a file system boundary and cp's -x option is in effect: so don't copy the contents of this directory. */ @@ -58,12 +72,12 @@ diff -urNp coreutils-8.13-orig/src/copy.c coreutils-8.13/src/copy.c } else { -diff -urNp coreutils-8.13-orig/src/copy.h coreutils-8.13/src/copy.h ---- coreutils-8.13-orig/src/copy.h 2011-07-28 12:38:27.000000000 +0200 -+++ coreutils-8.13/src/copy.h 2011-09-09 10:30:39.565563712 +0200 -@@ -158,6 +158,9 @@ struct cp_options - bool preserve_mode; +diff -urNp coreutils-8.21-orig/src/copy.h coreutils-8.21/src/copy.h +--- coreutils-8.21-orig/src/copy.h 2013-01-31 01:46:24.000000000 +0100 ++++ coreutils-8.21/src/copy.h 2013-02-15 14:31:58.943470982 +0100 +@@ -159,6 +159,9 @@ struct cp_options bool preserve_timestamps; + bool explicit_no_preserve_mode;
+ /* If true, attempt to set specified security context */ + bool set_security_context; @@ -71,9 +85,9 @@ diff -urNp coreutils-8.13-orig/src/copy.h coreutils-8.13/src/copy.h /* Enabled for mv, and for cp by the --preserve=links option. If true, attempt to preserve in the destination files any logical hard links between the source files. If used with cp's -diff -urNp coreutils-8.13-orig/src/cp.c coreutils-8.13/src/cp.c ---- coreutils-8.13-orig/src/cp.c 2011-07-28 12:38:27.000000000 +0200 -+++ coreutils-8.13/src/cp.c 2011-09-09 10:30:39.566562062 +0200 +diff -urNp coreutils-8.21-orig/src/cp.c coreutils-8.21/src/cp.c +--- coreutils-8.21-orig/src/cp.c 2013-02-07 10:37:05.000000000 +0100 ++++ coreutils-8.21/src/cp.c 2013-02-15 14:31:58.945468929 +0100 @@ -141,6 +141,7 @@ static struct option const long_opts[] = {"target-directory", required_argument, NULL, 't'}, {"update", no_argument, NULL, 'u'}, @@ -82,7 +96,7 @@ diff -urNp coreutils-8.13-orig/src/cp.c coreutils-8.13/src/cp.c {GETOPT_HELP_OPTION_DECL}, {GETOPT_VERSION_OPTION_DECL}, {NULL, 0, NULL, 0} -@@ -204,6 +205,9 @@ Mandatory arguments to long options are +@@ -201,6 +202,9 @@ Copy SOURCE to DEST, or multiple SOURCE( all\n\ "), stdout); fputs (_("\ @@ -92,7 +106,7 @@ diff -urNp coreutils-8.13-orig/src/cp.c coreutils-8.13/src/cp.c --no-preserve=ATTR_LIST don't preserve the specified attributes\n\ --parents use full source file name under DIRECTORY\n\ "), stdout); -@@ -230,6 +234,7 @@ Mandatory arguments to long options are +@@ -227,6 +231,7 @@ Copy SOURCE to DEST, or multiple SOURCE( destination file is missing\n\ -v, --verbose explain what is being done\n\ -x, --one-file-system stay on this file system\n\ @@ -100,8 +114,8 @@ diff -urNp coreutils-8.13-orig/src/cp.c coreutils-8.13/src/cp.c "), stdout); fputs (HELP_OPTION_DESCRIPTION, stdout); fputs (VERSION_OPTION_DESCRIPTION, stdout); -@@ -786,6 +791,7 @@ cp_option_init (struct cp_options *x) - x->preserve_timestamps = false; +@@ -784,6 +789,7 @@ cp_option_init (struct cp_options *x) + x->explicit_no_preserve_mode = false; x->preserve_security_context = false; x->require_preserve_context = false; + x->set_security_context = false; @@ -134,7 +148,7 @@ diff -urNp coreutils-8.13-orig/src/cp.c coreutils-8.13/src/cp.c case 'd': x.preserve_links = true; x.dereference = DEREF_NEVER; -@@ -1090,6 +1106,27 @@ main (int argc, char **argv) +@@ -1091,6 +1107,27 @@ main (int argc, char **argv) x.one_file_system = true; break;
@@ -162,10 +176,10 @@ diff -urNp coreutils-8.13-orig/src/cp.c coreutils-8.13/src/cp.c case 'S': make_backups = true; backup_suffix_string = optarg; -diff -urNp coreutils-8.13-orig/src/id.c coreutils-8.13/src/id.c ---- coreutils-8.13-orig/src/id.c 2011-07-28 12:38:27.000000000 +0200 -+++ coreutils-8.13/src/id.c 2011-09-09 10:30:39.567562153 +0200 -@@ -107,7 +107,7 @@ int +diff -urNp coreutils-8.21-orig/src/id.c coreutils-8.21/src/id.c +--- coreutils-8.21-orig/src/id.c 2013-01-31 01:46:24.000000000 +0100 ++++ coreutils-8.21/src/id.c 2013-02-15 14:31:58.946469154 +0100 +@@ -106,7 +106,7 @@ int main (int argc, char **argv) { int optc; @@ -174,10 +188,10 @@ diff -urNp coreutils-8.13-orig/src/id.c coreutils-8.13/src/id.c
/* If true, output the list of all group IDs. -G */ bool just_group_list = false; -diff -urNp coreutils-8.13-orig/src/install.c coreutils-8.13/src/install.c ---- coreutils-8.13-orig/src/install.c 2011-07-28 12:38:27.000000000 +0200 -+++ coreutils-8.13/src/install.c 2011-09-09 10:30:39.569562422 +0200 -@@ -261,6 +261,7 @@ cp_option_init (struct cp_options *x) +diff -urNp coreutils-8.21-orig/src/install.c coreutils-8.21/src/install.c +--- coreutils-8.21-orig/src/install.c 2013-02-07 10:37:05.000000000 +0100 ++++ coreutils-8.21/src/install.c 2013-02-15 14:31:58.948469440 +0100 +@@ -280,6 +280,7 @@ cp_option_init (struct cp_options *x) x->data_copy_required = true; x->require_preserve = false; x->require_preserve_context = false; @@ -185,7 +199,7 @@ diff -urNp coreutils-8.13-orig/src/install.c coreutils-8.13/src/install.c x->require_preserve_xattr = false; x->recursive = false; x->sparse_mode = SPARSE_AUTO; -@@ -622,7 +623,7 @@ Mandatory arguments to long options are +@@ -639,7 +640,7 @@ In the 4th form, create all components o -v, --verbose print the name of each directory as it is created\n\ "), stdout); fputs (_("\ @@ -194,7 +208,7 @@ diff -urNp coreutils-8.13-orig/src/install.c coreutils-8.13/src/install.c -Z, --context=CONTEXT set SELinux security context of files and directories\ \n\ "), stdout); -@@ -765,7 +766,7 @@ main (int argc, char **argv) +@@ -782,7 +783,7 @@ main (int argc, char **argv) we'll actually use backup_suffix_string. */ backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX");
@@ -203,7 +217,7 @@ diff -urNp coreutils-8.13-orig/src/install.c coreutils-8.13/src/install.c NULL)) != -1) { switch (optc) -@@ -835,6 +836,7 @@ main (int argc, char **argv) +@@ -853,6 +854,7 @@ main (int argc, char **argv) no_target_directory = true; break;
@@ -211,7 +225,7 @@ diff -urNp coreutils-8.13-orig/src/install.c coreutils-8.13/src/install.c case PRESERVE_CONTEXT_OPTION: if ( ! selinux_enabled) { -@@ -842,6 +844,10 @@ main (int argc, char **argv) +@@ -860,6 +862,10 @@ main (int argc, char **argv) "this kernel is not SELinux-enabled")); break; } @@ -222,7 +236,7 @@ diff -urNp coreutils-8.13-orig/src/install.c coreutils-8.13/src/install.c x.preserve_security_context = true; use_default_selinux_context = false; break; -@@ -853,6 +859,7 @@ main (int argc, char **argv) +@@ -871,6 +877,7 @@ main (int argc, char **argv) break; } scontext = optarg; @@ -230,10 +244,10 @@ diff -urNp coreutils-8.13-orig/src/install.c coreutils-8.13/src/install.c use_default_selinux_context = false; break; case_GETOPT_HELP_CHAR; -diff -urNp coreutils-8.13-orig/src/ls.c coreutils-8.13/src/ls.c ---- coreutils-8.13-orig/src/ls.c 2011-07-28 12:38:27.000000000 +0200 -+++ coreutils-8.13/src/ls.c 2011-09-09 10:30:39.575562845 +0200 -@@ -166,7 +166,8 @@ enum filetype +diff -urNp coreutils-8.21-orig/src/ls.c coreutils-8.21/src/ls.c +--- coreutils-8.21-orig/src/ls.c 2013-02-03 04:24:02.000000000 +0100 ++++ coreutils-8.21/src/ls.c 2013-02-15 14:31:58.953469008 +0100 +@@ -165,7 +165,8 @@ enum filetype symbolic_link, sock, whiteout, @@ -243,7 +257,7 @@ diff -urNp coreutils-8.13-orig/src/ls.c coreutils-8.13/src/ls.c };
/* Display letters and indicators for each filetype. -@@ -282,6 +283,7 @@ +@@ -281,6 +282,7 @@ static void queue_directory (char const bool command_line_arg); static void sort_files (void); static void parse_ls_color (void); @@ -251,7 +265,7 @@ diff -urNp coreutils-8.13-orig/src/ls.c coreutils-8.13/src/ls.c
/* Initial size of hash table. Most hierarchies are likely to be shallower than this. */ -@@ -352,7 +354,7 @@ static struct pending *pending_dirs; +@@ -350,7 +352,7 @@ static struct pending *pending_dirs;
static struct timespec current_time;
@@ -260,7 +274,7 @@ diff -urNp coreutils-8.13-orig/src/ls.c coreutils-8.13/src/ls.c static char UNKNOWN_SECURITY_CONTEXT[] = "?";
/* Whether any of the files has an ACL. This affects the width of the -@@ -392,7 +394,9 @@ enum format +@@ -390,7 +392,9 @@ enum format one_per_line, /* -1 */ many_per_line, /* -C */ horizontal, /* -x */ @@ -271,7 +285,7 @@ diff -urNp coreutils-8.13-orig/src/ls.c coreutils-8.13/src/ls.c };
static enum format format; -@@ -794,6 +798,9 @@ enum +@@ -793,6 +797,9 @@ enum SHOW_CONTROL_CHARS_OPTION, SI_OPTION, SORT_OPTION, @@ -353,7 +367,7 @@ diff -urNp coreutils-8.13-orig/src/ls.c coreutils-8.13/src/ls.c
/* FIXME: put this in a function. */ { -@@ -1947,13 +1957,27 @@ decode_switches (int argc, char **argv) +@@ -1941,13 +1951,27 @@ decode_switches (int argc, char **argv) break;
case 'Z': @@ -382,7 +396,7 @@ diff -urNp coreutils-8.13-orig/src/ls.c coreutils-8.13/src/ls.c default: usage (LS_FAILURE); } -@@ -2757,6 +2783,7 @@ gobble_file (char const *name, enum file +@@ -2883,6 +2907,7 @@ gobble_file (char const *name, enum file memset (f, '\0', sizeof *f); f->stat.st_ino = inode; f->filetype = type; @@ -390,7 +404,7 @@ diff -urNp coreutils-8.13-orig/src/ls.c coreutils-8.13/src/ls.c
if (command_line_arg || format_needs_stat -@@ -2869,7 +2896,7 @@ gobble_file (char const *name, enum file +@@ -2995,7 +3020,7 @@ gobble_file (char const *name, enum file && print_with_color && is_colored (C_CAP)) f->has_capability = has_capability_cache (absolute_name, f);
@@ -399,7 +413,7 @@ diff -urNp coreutils-8.13-orig/src/ls.c coreutils-8.13/src/ls.c { bool have_selinux = false; bool have_acl = false; -@@ -2892,7 +2919,7 @@ gobble_file (char const *name, enum file +@@ -3016,7 +3041,7 @@ gobble_file (char const *name, enum file err = 0; }
@@ -408,7 +422,7 @@ diff -urNp coreutils-8.13-orig/src/ls.c coreutils-8.13/src/ls.c { int n = file_has_acl_cache (absolute_name, f); err = (n < 0); -@@ -2911,7 +2938,8 @@ gobble_file (char const *name, enum file +@@ -3035,7 +3060,8 @@ gobble_file (char const *name, enum file }
if (S_ISLNK (f->stat.st_mode) @@ -418,7 +432,7 @@ diff -urNp coreutils-8.13-orig/src/ls.c coreutils-8.13/src/ls.c { struct stat linkstats;
-@@ -2931,6 +2959,7 @@ gobble_file (char const *name, enum file +@@ -3054,6 +3080,7 @@ gobble_file (char const *name, enum file command line are automatically traced if not being listed as files. */ if (!command_line_arg || format == long_format @@ -426,7 +440,7 @@ diff -urNp coreutils-8.13-orig/src/ls.c coreutils-8.13/src/ls.c || !S_ISDIR (linkstats.st_mode)) { /* Get the linked-to file's mode for the filetype indicator -@@ -2970,7 +2999,7 @@ gobble_file (char const *name, enum file +@@ -3087,7 +3114,7 @@ gobble_file (char const *name, enum file block_size_width = len; }
@@ -435,7 +449,7 @@ diff -urNp coreutils-8.13-orig/src/ls.c coreutils-8.13/src/ls.c { if (print_owner) { -@@ -3471,6 +3500,13 @@ print_current_files (void) +@@ -3591,6 +3618,13 @@ print_current_files (void) print_long_format (sorted_file[i]); DIRED_PUTCHAR ('\n'); } @@ -449,7 +463,7 @@ diff -urNp coreutils-8.13-orig/src/ls.c coreutils-8.13/src/ls.c break; } } -@@ -3633,6 +3669,67 @@ format_inode (char *buf, size_t buflen, +@@ -3753,6 +3787,67 @@ format_inode (char *buf, size_t buflen, : (char *) "?"); }
@@ -517,7 +531,7 @@ diff -urNp coreutils-8.13-orig/src/ls.c coreutils-8.13/src/ls.c /* Print information about F in long format. */ static void print_long_format (const struct fileinfo *f) -@@ -3724,9 +3821,15 @@ print_long_format (const struct fileinfo +@@ -3844,9 +3939,15 @@ print_long_format (const struct fileinfo The latter is wrong when nlink_width is zero. */ p += strlen (p);
@@ -534,7 +548,7 @@ diff -urNp coreutils-8.13-orig/src/ls.c coreutils-8.13/src/ls.c { DIRED_FPUTS (buf, stdout, p - buf);
-@@ -3739,9 +3842,6 @@ print_long_format (const struct fileinfo +@@ -3859,9 +3960,6 @@ print_long_format (const struct fileinfo if (print_author) format_user (f->stat.st_author, author_width, f->stat_ok);
@@ -544,7 +558,7 @@ diff -urNp coreutils-8.13-orig/src/ls.c coreutils-8.13/src/ls.c p = buf; }
-@@ -4086,9 +4186,6 @@ print_file_name_and_frills (const struct +@@ -4207,9 +4305,6 @@ print_file_name_and_frills (const struct : human_readable (ST_NBLOCKS (f->stat), buf, human_output_opts, ST_NBLOCKSIZE, output_block_size));
@@ -554,7 +568,7 @@ diff -urNp coreutils-8.13-orig/src/ls.c coreutils-8.13/src/ls.c size_t width = print_name_with_quoting (f, false, NULL, start_col);
if (indicator_style != none) -@@ -4292,9 +4389,6 @@ length_of_file_name_and_frills (const st +@@ -4417,9 +4512,6 @@ length_of_file_name_and_frills (const st output_block_size)) : block_size_width);
@@ -564,7 +578,7 @@ diff -urNp coreutils-8.13-orig/src/ls.c coreutils-8.13/src/ls.c quote_name (NULL, f->name, filename_quoting_options, &name_width); len += name_width;
-@@ -4733,9 +4827,16 @@ Mandatory arguments to long options are +@@ -4856,9 +4948,16 @@ Sort entries alphabetically if none of - -w, --width=COLS assume screen width instead of current value\n\ -x list entries by lines instead of by columns\n\ -X sort alphabetically by entry extension\n\ @@ -582,9 +596,9 @@ diff -urNp coreutils-8.13-orig/src/ls.c coreutils-8.13/src/ls.c fputs (HELP_OPTION_DESCRIPTION, stdout); fputs (VERSION_OPTION_DESCRIPTION, stdout); emit_size_note (); -diff -urNp coreutils-8.13-orig/src/mkdir.c coreutils-8.13/src/mkdir.c ---- coreutils-8.13-orig/src/mkdir.c 2011-07-28 12:38:27.000000000 +0200 -+++ coreutils-8.13/src/mkdir.c 2011-09-09 10:30:39.576564256 +0200 +diff -urNp coreutils-8.21-orig/src/mkdir.c coreutils-8.21/src/mkdir.c +--- coreutils-8.21-orig/src/mkdir.c 2013-01-31 01:46:24.000000000 +0100 ++++ coreutils-8.21/src/mkdir.c 2013-02-15 14:31:58.954469576 +0100 @@ -38,6 +38,7 @@ static struct option const longopts[] = { @@ -593,9 +607,9 @@ diff -urNp coreutils-8.13-orig/src/mkdir.c coreutils-8.13/src/mkdir.c {"mode", required_argument, NULL, 'm'}, {"parents", no_argument, NULL, 'p'}, {"verbose", no_argument, NULL, 'v'}, -diff -urNp coreutils-8.13-orig/src/mknod.c coreutils-8.13/src/mknod.c ---- coreutils-8.13-orig/src/mknod.c 2011-07-28 12:38:27.000000000 +0200 -+++ coreutils-8.13/src/mknod.c 2011-09-09 10:30:39.577563177 +0200 +diff -urNp coreutils-8.21-orig/src/mknod.c coreutils-8.21/src/mknod.c +--- coreutils-8.21-orig/src/mknod.c 2013-01-31 01:46:24.000000000 +0100 ++++ coreutils-8.21/src/mknod.c 2013-02-15 14:31:58.955470548 +0100 @@ -35,7 +35,7 @@
static struct option const longopts[] = @@ -605,46 +619,32 @@ diff -urNp coreutils-8.13-orig/src/mknod.c coreutils-8.13/src/mknod.c {"mode", required_argument, NULL, 'm'}, {GETOPT_HELP_OPTION_DECL}, {GETOPT_VERSION_OPTION_DECL}, -diff -urNp coreutils-8.13-orig/src/mv.c coreutils-8.13/src/mv.c ---- coreutils-8.13-orig/src/mv.c 2011-07-28 12:38:27.000000000 +0200 -+++ coreutils-8.13/src/mv.c 2011-09-09 10:30:39.578562234 +0200 -@@ -118,6 +118,7 @@ cp_option_init (struct cp_options *x) - x->preserve_mode = true; +diff -urNp coreutils-8.21-orig/src/mv.c coreutils-8.21/src/mv.c +--- coreutils-8.21-orig/src/mv.c 2013-02-07 10:37:05.000000000 +0100 ++++ coreutils-8.21/src/mv.c 2013-02-15 14:31:58.956469593 +0100 +@@ -120,6 +120,7 @@ cp_option_init (struct cp_options *x) x->preserve_timestamps = true; + x->explicit_no_preserve_mode= false; x->preserve_security_context = selinux_enabled; + x->set_security_context = false; x->reduce_diagnostics = false; x->data_copy_required = true; x->require_preserve = false; /* FIXME: maybe make this an option */ -diff -urNp coreutils-8.13-orig/src/runcon.c coreutils-8.13/src/runcon.c ---- coreutils-8.13-orig/src/runcon.c 2011-07-28 12:38:27.000000000 +0200 -+++ coreutils-8.13/src/runcon.c 2011-09-09 10:30:39.579564283 +0200 -@@ -86,7 +86,7 @@ Usage: %s CONTEXT COMMAND [args]\n\ +diff -urNp coreutils-8.21-orig/src/runcon.c coreutils-8.21/src/runcon.c +--- coreutils-8.21-orig/src/runcon.c 2013-01-31 01:46:24.000000000 +0100 ++++ coreutils-8.21/src/runcon.c 2013-02-15 14:31:58.956469593 +0100 +@@ -85,7 +85,7 @@ Usage: %s CONTEXT COMMAND [args]\n\ or: %s [ -c ] [-u USER] [-r ROLE] [-t TYPE] [-l RANGE] COMMAND [args]\n\ "), program_name, program_name); fputs (_("\ -Run a program in a different security context.\n\ +Run a program in a different SELinux security context.\n\ With neither CONTEXT nor COMMAND, print the current security context.\n\ - \n\ - CONTEXT Complete security context\n\ -diff -urNp coreutils-8.17-orig/tests/init.cfg coreutils-8.17/tests/init.cfg ---- coreutils-8.17-orig/tests/init.cfg -+++ coreutils-8.17/tests/init.cfg -@@ -253,8 +253,8 @@ require_selinux_() + "), stdout);
- # Independent of whether SELinux is enabled system-wide, - # the current file system may lack SELinux support. -- case $(ls -Zd .) in -- '? .'|'unlabeled .') -+ case $(ls -Zd . | cut -f4 -d" ") in -+ '?'|'unlabeled') - skip_ "this system (or maybe just" \ - "the current file system) lacks SELinux support" - ;; -diff -urNp coreutils-8.17-orig/tests/misc/selinux coreutils-8.17/tests/misc/selinux ---- coreutils-8.17-orig/tests/misc/selinux -+++ coreutils-8.17/tests/misc/selinux +diff -urNp coreutils-8.21-orig/tests/misc/selinux.sh coreutils-8.21/tests/misc/selinux.sh +--- coreutils-8.21-orig/tests/misc/selinux.sh 2013-01-31 01:46:24.000000000 +0100 ++++ coreutils-8.21/tests/misc/selinux.sh 2013-02-15 14:31:58.957469955 +0100 @@ -37,7 +37,7 @@ chcon $ctx f d p ||
# inspect that context with both ls -Z and stat.
hooks/post-receive -- IPFire 3.x development tree