diff --git a/coreutils-5.3.0-i18n-0.1.patch b/coreutils-5.3.0-i18n-0.1.patch index f4df397..b132d98 100644 --- a/coreutils-5.3.0-i18n-0.1.patch +++ b/coreutils-5.3.0-i18n-0.1.patch @@ -1,6 +1,6 @@ ---- coreutils-6.5/lib/linebuffer.h -+++ coreutils-6.5/lib/linebuffer.h -@@ -22,6 +22,11 @@ +--- coreutils-6.9-316-e6f4b/lib/linebuffer.h ++++ coreutils-6.9-316-e6f4b/lib/linebuffer.h +@@ -21,6 +21,11 @@ # include @@ -12,7 +12,7 @@ /* A `struct linebuffer' holds a line of text. */ struct linebuffer -@@ -29,6 +34,9 @@ +@@ -28,6 +33,9 @@ struct linebuffer size_t size; /* Allocated. */ size_t length; /* Used. */ char *buffer; @@ -22,9 +22,9 @@ }; /* Initialize linebuffer LINEBUFFER for use. */ ---- coreutils-6.5/src/cut.c -+++ coreutils-6.5/src/cut.c -@@ -29,6 +29,12 @@ +--- coreutils-6.9-316-e6f4b/src/cut.c ++++ coreutils-6.9-316-e6f4b/src/cut.c +@@ -28,6 +28,12 @@ #include #include #include @@ -37,7 +37,7 @@ #include "system.h" #include "error.h" -@@ -37,6 +43,13 @@ +@@ -36,6 +42,13 @@ #include "quote.h" #include "xstrndup.h" @@ -51,7 +51,7 @@ /* The official name of this program (e.g., no `g' prefix). */ #define PROGRAM_NAME "cut" -@@ -73,6 +86,54 @@ +@@ -74,6 +87,54 @@ struct range_pair size_t hi; }; @@ -106,7 +106,7 @@ /* This buffer is used to support the semantics of the -s option (or lack of same) when the specified field list includes (does not include) the first field. In both of those cases, the entire -@@ -85,7 +146,7 @@ +@@ -86,7 +147,7 @@ static char *field_1_buffer; /* The number of bytes allocated for FIELD_1_BUFFER. */ static size_t field_1_bufsize; @@ -115,7 +115,7 @@ 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. */ -@@ -97,10 +158,11 @@ +@@ -98,10 +159,11 @@ static size_t eol_range_start; /* This is a bit vector. In byte mode, which bytes to output. @@ -129,7 +129,7 @@ (K <= MAX_RANGE_ENDPOINT and is_printable_field(K)) || (EOL_RANGE_START > 0 && K >= EOL_RANGE_START). */ static unsigned char *printable_field; -@@ -109,9 +171,12 @@ +@@ -110,9 +172,12 @@ enum operating_mode { undefined_mode, @@ -143,7 +143,7 @@ /* Output the given delimeter-separated fields. */ field_mode }; -@@ -121,6 +186,13 @@ +@@ -122,6 +187,13 @@ char *program_name; static enum operating_mode operating_mode; @@ -157,7 +157,7 @@ /* If true do not output lines containing no delimeter characters. Otherwise, all such lines are printed. This option is valid only with field mode. */ -@@ -132,6 +204,9 @@ +@@ -133,6 +205,9 @@ static bool complement; /* The delimeter character for field mode. */ static unsigned char delim; @@ -167,7 +167,7 @@ /* True if the --output-delimiter=STRING option was specified. */ static bool output_delimiter_specified; -@@ -205,7 +280,7 @@ +@@ -206,7 +281,7 @@ Mandatory arguments to long options are -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\ @@ -176,7 +176,7 @@ "), stdout); fputs (_("\ --complement complement the set of selected bytes, characters\n\ -@@ -360,7 +435,7 @@ +@@ -365,7 +440,7 @@ set_fields (const char *fieldstr) in_digits = false; /* Starting a range. */ if (dash_found) @@ -185,26 +185,18 @@ dash_found = true; fieldstr++; -@@ -385,14 +460,16 @@ - if (value == 0) +@@ -388,7 +463,9 @@ 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; ++ 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 byte or field list")); -+ FATAL_ERROR (_("invalid byte, character or field list")); - - /* Is there already a range going to end of line? */ - if (eol_range_start != 0) -@@ -475,7 +552,7 @@ +@@ -485,7 +562,7 @@ set_fields (const char *fieldstr) fieldstr++; } else @@ -213,7 +205,7 @@ } max_range_endpoint = 0; -@@ -568,6 +645,81 @@ +@@ -578,6 +655,81 @@ cut_bytes (FILE *stream) } } @@ -295,7 +287,7 @@ /* Read from stream STREAM, printing to standard output any selected fields. */ static void -@@ -689,13 +841,190 @@ +@@ -700,13 +852,190 @@ cut_fields (FILE *stream) } } @@ -489,7 +481,7 @@ } /* Process file FILE to standard output. -@@ -745,6 +1074,8 @@ +@@ -756,6 +1085,8 @@ main (int argc, char **argv) bool ok; bool delim_specified = false; char *spec_list_string IF_LINT(= NULL); @@ -498,7 +490,7 @@ initialize_main (&argc, &argv); program_name = argv[0]; -@@ -767,7 +1098,6 @@ +@@ -778,7 +1109,6 @@ main (int argc, char **argv) switch (optc) { case 'b': @@ -506,7 +498,7 @@ /* Build the byte list. */ if (operating_mode != undefined_mode) FATAL_ERROR (_("only one type of list may be specified")); -@@ -775,6 +1105,14 @@ +@@ -786,6 +1116,14 @@ main (int argc, char **argv) spec_list_string = optarg; break; @@ -521,7 +513,7 @@ case 'f': /* Build the field list. */ if (operating_mode != undefined_mode) -@@ -786,9 +1124,32 @@ +@@ -797,9 +1135,32 @@ main (int argc, char **argv) case 'd': /* New delimiter. */ /* Interpret -d '' to mean `use the NUL byte as the delimiter.' */ @@ -557,7 +549,7 @@ delim_specified = true; break; -@@ -802,6 +1163,7 @@ +@@ -813,6 +1174,7 @@ main (int argc, char **argv) break; case 'n': @@ -565,7 +557,7 @@ break; case 's': -@@ -824,7 +1186,7 @@ +@@ -835,7 +1197,7 @@ main (int argc, char **argv) if (operating_mode == undefined_mode) FATAL_ERROR (_("you must specify a list of bytes, characters, or fields")); @@ -574,7 +566,7 @@ FATAL_ERROR (_("an input delimiter may be specified only\ when operating on fields")); -@@ -851,15 +1213,34 @@ +@@ -862,15 +1224,34 @@ main (int argc, char **argv) } if (!delim_specified) @@ -615,9 +607,9 @@ } if (optind == argc) ---- coreutils-6.5/src/expand.c -+++ coreutils-6.5/src/expand.c -@@ -38,11 +38,31 @@ +--- coreutils-6.9-316-e6f4b/src/expand.c ++++ coreutils-6.9-316-e6f4b/src/expand.c +@@ -37,11 +37,31 @@ #include #include #include @@ -649,7 +641,7 @@ /* The official name of this program (e.g., no `g' prefix). */ #define PROGRAM_NAME "expand" -@@ -347,9 +367,12 @@ +@@ -346,9 +366,12 @@ expand (void) } else { @@ -665,7 +657,7 @@ } convert &= convert_entire_line | !! isblank (c); -@@ -365,6 +388,165 @@ +@@ -364,6 +387,165 @@ expand (void) } } @@ -831,7 +823,7 @@ int main (int argc, char **argv) { -@@ -429,7 +611,12 @@ +@@ -428,7 +610,12 @@ main (int argc, char **argv) file_list = (optind < argc ? &argv[optind] : stdin_argv); @@ -845,9 +837,9 @@ if (have_read_stdin && fclose (stdin) != 0) error (EXIT_FAILURE, errno, "-"); ---- coreutils-6.5/src/fold.c -+++ coreutils-6.5/src/fold.c -@@ -23,6 +23,19 @@ +--- coreutils-6.9-316-e6f4b/src/fold.c ++++ coreutils-6.9-316-e6f4b/src/fold.c +@@ -22,6 +22,19 @@ #include #include @@ -867,7 +859,7 @@ #include "system.h" #include "error.h" #include "quote.h" -@@ -30,14 +43,57 @@ +@@ -29,14 +42,57 @@ #define TAB_WIDTH 8 @@ -925,7 +917,7 @@ /* If nonzero, try to break on whitespace. */ static bool break_spaces; -@@ -47,11 +103,17 @@ +@@ -46,11 +102,17 @@ static bool count_bytes; /* If nonzero, at least one of the files we read was standard input. */ static bool have_read_stdin; @@ -944,7 +936,7 @@ {"spaces", no_argument, NULL, 's'}, {"width", required_argument, NULL, 'w'}, {GETOPT_HELP_OPTION_DECL}, -@@ -81,6 +143,7 @@ +@@ -80,6 +142,7 @@ Mandatory arguments to long options are "), stdout); fputs (_("\ -b, --bytes count bytes rather than columns\n\ @@ -952,7 +944,7 @@ -s, --spaces break at spaces\n\ -w, --width=WIDTH use WIDTH columns instead of 80\n\ "), stdout); -@@ -98,7 +161,7 @@ +@@ -97,7 +160,7 @@ Mandatory arguments to long options are static size_t adjust_column (size_t column, char c) { @@ -961,7 +953,7 @@ { if (c == '\b') { -@@ -117,14 +180,9 @@ +@@ -116,14 +179,9 @@ adjust_column (size_t column, char c) return column; } @@ -978,7 +970,7 @@ int c; size_t column = 0; /* Screen column where next char will go. */ size_t offset_out = 0; /* Index in `line_out' for next char. */ -@@ -132,20 +190,6 @@ +@@ -131,20 +189,6 @@ fold_file (char const *filename, size_t static size_t allocated_out = 0; int saved_errno; @@ -999,7 +991,7 @@ while ((c = getc (istream)) != EOF) { if (offset_out + 1 >= allocated_out) -@@ -223,6 +267,234 @@ +@@ -222,6 +266,234 @@ fold_file (char const *filename, size_t if (offset_out) fwrite (line_out, sizeof (char), (size_t) offset_out, stdout); @@ -1234,7 +1226,7 @@ if (ferror (istream)) { error (0, saved_errno, "%s", filename); -@@ -255,6 +527,10 @@ +@@ -254,6 +526,10 @@ main (int argc, char **argv) atexit (close_stdout); @@ -1245,7 +1237,7 @@ break_spaces = count_bytes = have_read_stdin = false; while ((optc = getopt_long (argc, argv, shortopts, longopts, NULL)) != -1) -@@ -264,7 +540,15 @@ +@@ -263,7 +539,15 @@ main (int argc, char **argv) switch (optc) { case 'b': /* Count bytes rather than columns. */ @@ -1262,9 +1254,9 @@ break; case 's': /* Break at word boundaries. */ ---- coreutils-6.5/src/join.c -+++ coreutils-6.5/src/join.c -@@ -23,6 +23,16 @@ +--- coreutils-6.9-316-e6f4b/src/join.c ++++ coreutils-6.9-316-e6f4b/src/join.c +@@ -22,6 +22,16 @@ #include #include @@ -1281,7 +1273,7 @@ #include "system.h" #include "error.h" #include "hard-locale.h" -@@ -33,6 +43,11 @@ +@@ -32,6 +42,11 @@ #include "xmemcoll.h" #include "xstrtol.h" @@ -1293,7 +1285,7 @@ /* The official name of this program (e.g., no `g' prefix). */ #define PROGRAM_NAME "join" -@@ -104,10 +119,13 @@ +@@ -103,10 +118,13 @@ static struct outlist outlist_head; /* Last element in `outlist', where a new element can be added. */ static struct outlist *outlist_end = &outlist_head; @@ -1309,7 +1301,7 @@ static struct option const longopts[] = { -@@ -199,10 +217,10 @@ +@@ -198,10 +216,10 @@ xfields (struct line *line) if (ptr == lim) return; @@ -1322,7 +1314,7 @@ extract_field (line, ptr, sep - ptr); } else -@@ -229,6 +247,133 @@ +@@ -228,6 +246,133 @@ xfields (struct line *line) extract_field (line, ptr, lim - ptr); } @@ -1456,7 +1448,7 @@ /* Read a line from FP into LINE and split it into fields. Return true if successful. */ -@@ -249,7 +394,13 @@ +@@ -248,7 +393,13 @@ get_line (FILE *fp, struct line *line) line->nfields_allocated = 0; line->nfields = 0; line->fields = NULL; @@ -1471,7 +1463,7 @@ return true; } -@@ -303,56 +454,115 @@ +@@ -302,56 +453,115 @@ static int keycmp (struct line const *line1, struct line const *line2) { /* Start of field to compare in each file. */ @@ -1609,7 +1601,7 @@ } /* Print field N of LINE if it exists and is nonempty, otherwise -@@ -381,7 +591,8 @@ +@@ -380,7 +590,8 @@ static void prjoin (struct line const *line1, struct line const *line2) { const struct outlist *outlist; @@ -1619,7 +1611,7 @@ outlist = outlist_head.next; if (outlist) -@@ -416,7 +627,7 @@ +@@ -415,7 +626,7 @@ prjoin (struct line const *line1, struct o = o->next; if (o == NULL) break; @@ -1628,7 +1620,7 @@ } putchar ('\n'); } -@@ -434,23 +645,23 @@ +@@ -433,23 +644,23 @@ prjoin (struct line const *line1, struct prfield (join_field_1, line1); for (i = 0; i < join_field_1 && i < line1->nfields; ++i) { @@ -1656,7 +1648,7 @@ prfield (i, line2); } putchar ('\n'); -@@ -862,20 +1073,40 @@ +@@ -858,20 +1069,40 @@ main (int argc, char **argv) case 't': { @@ -1702,9 +1694,9 @@ } break; ---- coreutils-6.5/src/pr.c -+++ coreutils-6.5/src/pr.c -@@ -313,6 +313,32 @@ +--- coreutils-6.9-316-e6f4b/src/pr.c ++++ coreutils-6.9-316-e6f4b/src/pr.c +@@ -312,6 +312,32 @@ #include #include @@ -1737,7 +1729,7 @@ #include "system.h" #include "error.h" #include "hard-locale.h" -@@ -324,6 +350,18 @@ +@@ -323,6 +349,18 @@ #include "strftime.h" #include "xstrtol.h" @@ -1756,7 +1748,7 @@ /* The official name of this program (e.g., no `g' prefix). */ #define PROGRAM_NAME "pr" -@@ -415,8 +453,21 @@ +@@ -414,8 +452,21 @@ struct COLUMN typedef struct COLUMN COLUMN; #define NULLCOL (COLUMN *)0 @@ -1779,7 +1771,7 @@ static bool read_line (COLUMN *p); static bool print_page (void); static bool print_stored (COLUMN *p); -@@ -426,6 +477,7 @@ +@@ -425,6 +476,7 @@ static void print_header (void); static void pad_across_to (int position); static void add_line_number (COLUMN *p); static void getoptarg (char *arg, char switch_char, char *character, @@ -1787,7 +1779,7 @@ int *number); void usage (int status); static void print_files (int number_of_files, char **av); -@@ -440,7 +492,6 @@ +@@ -439,7 +491,6 @@ static void store_char (char c); static void pad_down (int lines); static void read_rest_of_line (COLUMN *p); static void skip_read (COLUMN *p, int column_number); @@ -1795,7 +1787,7 @@ static void cleanup (void); static void print_sep_string (void); static void separator_string (const char *optarg_S); -@@ -455,7 +506,7 @@ +@@ -454,7 +505,7 @@ static COLUMN *column_vector; we store the leftmost columns contiguously in buff. To print a line from buff, get the index of the first character from line_vector[i], and print up to line_vector[i + 1]. */ @@ -1804,7 +1796,7 @@ /* Index of the position in buff where the next character will be stored. */ -@@ -559,7 +610,7 @@ +@@ -558,7 +609,7 @@ static int chars_per_column; static bool untabify_input = false; /* (-e) The input tab character. */ @@ -1813,7 +1805,7 @@ /* (-e) Tabstops are at chars_per_tab, 2*chars_per_tab, 3*chars_per_tab, ... where the leftmost column is 1. */ -@@ -569,7 +620,10 @@ +@@ -568,7 +619,10 @@ static int chars_per_input_tab = 8; static bool tabify_output = false; /* (-i) The output tab character. */ @@ -1825,7 +1817,7 @@ /* (-i) The width of the output tab. */ static int chars_per_output_tab = 8; -@@ -643,7 +697,13 @@ +@@ -642,7 +696,13 @@ static int power_10; static bool numbered_lines = false; /* (-n) Character which follows each line number. */ @@ -1840,7 +1832,7 @@ /* (-n) line counting starts with 1st line of input file (not with 1st line of 1st page printed). */ -@@ -696,6 +756,7 @@ +@@ -695,6 +755,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 = ""; static int col_sep_length = 0; @@ -1848,7 +1840,7 @@ static char *column_separator = " "; static char *line_separator = "\t"; -@@ -852,6 +913,13 @@ +@@ -851,6 +912,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); @@ -1862,7 +1854,7 @@ } int -@@ -877,6 +945,21 @@ +@@ -875,6 +943,21 @@ main (int argc, char **argv) atexit (close_stdout); @@ -1884,7 +1876,7 @@ n_files = 0; file_names = (argc > 1 ? xmalloc ((argc - 1) * sizeof (char *)) -@@ -949,8 +1032,12 @@ +@@ -951,8 +1034,12 @@ main (int argc, char **argv) break; case 'e': if (optarg) @@ -1899,7 +1891,7 @@ /* Could check tab width > 0. */ untabify_input = true; break; -@@ -963,8 +1050,12 @@ +@@ -965,8 +1052,12 @@ main (int argc, char **argv) break; case 'i': if (optarg) @@ -1914,7 +1906,7 @@ /* Could check tab width > 0. */ tabify_output = true; break; -@@ -991,8 +1082,8 @@ +@@ -993,8 +1084,8 @@ main (int argc, char **argv) case 'n': numbered_lines = true; if (optarg) @@ -1925,7 +1917,7 @@ break; case 'N': skip_count = false; -@@ -1031,7 +1122,7 @@ +@@ -1033,7 +1124,7 @@ main (int argc, char **argv) old_s = false; /* Reset an additional input of -s, -S dominates -s */ col_sep_string = ""; @@ -1934,7 +1926,7 @@ use_col_separator = true; if (optarg) separator_string (optarg); -@@ -1188,10 +1279,45 @@ +@@ -1190,10 +1281,45 @@ main (int argc, char **argv) a number. */ static void @@ -1982,7 +1974,7 @@ if (*arg) { long int tmp_long; -@@ -1256,7 +1382,7 @@ +@@ -1252,7 +1378,7 @@ init_parameters (int number_of_files) else col_sep_string = column_separator; @@ -1991,7 +1983,7 @@ use_col_separator = true; } /* It's rather pointless to define a TAB separator with column -@@ -1288,11 +1414,11 @@ +@@ -1283,11 +1409,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. */ @@ -2005,7 +1997,7 @@ /* The number is part of the column width unless we are printing files in parallel. */ -@@ -1307,7 +1433,7 @@ +@@ -1302,7 +1428,7 @@ init_parameters (int number_of_files) } chars_per_column = (chars_per_line - chars_used_by_number - @@ -2014,7 +2006,7 @@ if (chars_per_column < 1) error (EXIT_FAILURE, 0, _("page width too narrow")); -@@ -1432,7 +1558,7 @@ +@@ -1427,7 +1553,7 @@ init_funcs (void) /* Enlarge p->start_position of first column to use the same form of padding_not_printed with all columns. */ @@ -2023,7 +2015,7 @@ /* This loop takes care of all but the rightmost column. */ -@@ -1466,7 +1592,7 @@ +@@ -1461,7 +1587,7 @@ init_funcs (void) } else { @@ -2032,7 +2024,7 @@ h_next = h + chars_per_column; } } -@@ -1756,9 +1882,9 @@ +@@ -1751,9 +1877,9 @@ static void align_column (COLUMN *p) { padding_not_printed = p->start_position; @@ -2044,7 +2036,7 @@ padding_not_printed = ANYWHERE; } -@@ -2029,13 +2155,13 @@ +@@ -2024,13 +2150,13 @@ store_char (char c) /* May be too generous. */ buff = X2REALLOC (buff, &buff_allocated); } @@ -2060,7 +2052,7 @@ char *s; int left_cut; -@@ -2058,22 +2184,24 @@ +@@ -2053,22 +2179,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. */ @@ -2089,7 +2081,7 @@ output_position = POS_AFTER_TAB (chars_per_output_tab, output_position); } -@@ -2234,7 +2362,7 @@ +@@ -2229,7 +2357,7 @@ print_white_space (void) while (goal - h_old > 1 && (h_new = POS_AFTER_TAB (chars_per_output_tab, h_old)) <= goal) { @@ -2098,7 +2090,7 @@ h_old = h_new; } while (++h_old <= goal) -@@ -2254,6 +2382,7 @@ +@@ -2249,6 +2377,7 @@ print_sep_string (void) { char *s; int l = col_sep_length; @@ -2106,7 +2098,7 @@ s = col_sep_string; -@@ -2267,6 +2396,7 @@ +@@ -2262,6 +2391,7 @@ print_sep_string (void) { for (; separators_not_printed > 0; --separators_not_printed) { @@ -2114,7 +2106,7 @@ while (l-- > 0) { /* 3 types of sep_strings: spaces only, spaces and chars, -@@ -2280,12 +2410,15 @@ +@@ -2275,12 +2405,15 @@ print_sep_string (void) } else { @@ -2131,7 +2123,7 @@ /* sep_string ends with some spaces */ if (spaces_not_printed > 0) print_white_space (); -@@ -2312,8 +2445,9 @@ +@@ -2307,8 +2440,9 @@ print_clump (COLUMN *p, int n, char *clu a nonspace is encountered, call print_white_space() to print the required number of tabs and spaces. */ @@ -2142,7 +2134,7 @@ { if (tabify_output) { -@@ -2337,6 +2471,75 @@ +@@ -2332,6 +2466,75 @@ print_char (char c) putchar (c); } @@ -2218,7 +2210,7 @@ /* Skip to page PAGE before printing. PAGE may be larger than total number of pages. */ -@@ -2517,9 +2720,9 @@ +@@ -2509,9 +2712,9 @@ read_line (COLUMN *p) align_empty_cols = false; } @@ -2230,7 +2222,7 @@ padding_not_printed = ANYWHERE; } -@@ -2620,9 +2823,9 @@ +@@ -2612,9 +2815,9 @@ print_stored (COLUMN *p) } } @@ -2242,7 +2234,7 @@ padding_not_printed = ANYWHERE; } -@@ -2635,8 +2838,8 @@ +@@ -2627,8 +2830,8 @@ print_stored (COLUMN *p) if (spaces_not_printed == 0) { output_position = p->start_position + end_vector[line]; @@ -2253,7 +2245,7 @@ } return true; -@@ -2654,8 +2857,9 @@ +@@ -2646,8 +2849,9 @@ print_stored (COLUMN *p) characters in clump_buff. (e.g, the width of '\b' is -1, while the number of characters is 1.) */ @@ -2264,7 +2256,7 @@ { unsigned char uc = c; char *s = clump_buff; -@@ -2665,10 +2869,10 @@ +@@ -2657,10 +2861,10 @@ char_to_clump (char c) int chars; int chars_per_c = 8; @@ -2277,7 +2269,7 @@ { width = TAB_WIDTH (chars_per_c, input_position); -@@ -2739,6 +2943,155 @@ +@@ -2731,6 +2935,155 @@ char_to_clump (char c) return chars; } @@ -2433,11 +2425,11 @@ /* We've just printed some files and need to clean up things before looking for more options and printing the next batch of files. ---- coreutils-6.5/src/sort.c -+++ coreutils-6.5/src/sort.c +--- coreutils-6.9-316-e6f4b/src/sort.c ++++ coreutils-6.9-316-e6f4b/src/sort.c @@ -26,6 +26,19 @@ - #include #include + #include #include +#include + @@ -2453,9 +2445,9 @@ +#endif + #include "system.h" + #include "argmatch.h" #include "error.h" - #include "hard-locale.h" -@@ -50,6 +63,17 @@ +@@ -52,6 +65,17 @@ struct rlimit { size_t rlim_cur; }; # define getrlimit(Resource, Rlp) (-1) #endif @@ -2473,7 +2465,7 @@ /* The official name of this program (e.g., no `g' prefix). */ #define PROGRAM_NAME "sort" -@@ -98,14 +122,38 @@ +@@ -115,14 +139,38 @@ static int decimal_point; /* Thousands separator; if -1, then there isn't one. */ static int thousands_sep; @@ -2513,7 +2505,7 @@ /* The kind of blanks for '-b' to skip in various options. */ enum blanktype { bl_start, bl_end, bl_both }; -@@ -243,13 +291,11 @@ +@@ -260,13 +308,11 @@ static bool reverse; they were read if all keys compare equal. */ static bool stable; @@ -2531,9 +2523,9 @@ /* Flag to remove consecutive duplicate lines from the output. Only the last of a sequence of equal lines will be output. */ -@@ -408,6 +454,43 @@ - static struct tempnode *volatile temphead; - static struct tempnode *volatile *temptail = &temphead; +@@ -638,6 +684,43 @@ reap_some (void) + update_proc (pid); + } +/* Fucntion pointers. */ +static char * @@ -2575,7 +2567,7 @@ /* Clean up any remaining temporary files. */ static void -@@ -561,7 +644,7 @@ +@@ -977,7 +1060,7 @@ zaptemp (const char *name) free (node); } @@ -2584,7 +2576,7 @@ static int struct_month_cmp (const void *m1, const void *m2) -@@ -588,7 +671,7 @@ +@@ -1004,7 +1087,7 @@ inittables (void) fold_toupper[i] = toupper (i); } @@ -2593,7 +2585,7 @@ /* If we're not in the "C" locale, read different names for months. */ if (hard_LC_TIME) { -@@ -614,6 +697,71 @@ +@@ -1030,6 +1113,71 @@ inittables (void) #endif } @@ -2664,8 +2656,8 @@ + /* Specify the amount of main memory to use when sorting. */ static void - specify_sort_size (char const *s) -@@ -824,7 +972,7 @@ + specify_sort_size (int oi, char c, char const *s) +@@ -1240,7 +1388,7 @@ buffer_linelim (struct buffer const *buf by KEY in LINE. */ static char * @@ -2674,7 +2666,7 @@ { char *ptr = line->text, *lim = ptr + line->length - 1; size_t sword = key->sword; -@@ -834,10 +982,10 @@ +@@ -1250,10 +1398,10 @@ begfield (const struct line *line, const /* The leading field separator itself is included in a field when -t is absent. */ @@ -2687,7 +2679,7 @@ ++ptr; if (ptr < lim) ++ptr; -@@ -865,11 +1013,70 @@ +@@ -1281,11 +1429,70 @@ begfield (const struct line *line, const return ptr; } @@ -2759,7 +2751,7 @@ { char *ptr = line->text, *lim = ptr + line->length - 1; size_t eword = key->eword, echar = key->echar; -@@ -882,10 +1089,10 @@ +@@ -1298,10 +1505,10 @@ limfield (const struct line *line, const `beginning' is the first character following the delimiting TAB. Otherwise, leave PTR pointing at the first `blank' character after the preceding field. */ @@ -2772,7 +2764,7 @@ ++ptr; if (ptr < lim && (eword | echar)) ++ptr; -@@ -931,7 +1138,7 @@ +@@ -1347,7 +1554,7 @@ limfield (const struct line *line, const */ /* Make LIM point to the end of (one byte past) the current field. */ @@ -2781,7 +2773,7 @@ { char *newlim; newlim = memchr (ptr, tab, lim - ptr); -@@ -967,6 +1174,107 @@ +@@ -1383,6 +1590,107 @@ limfield (const struct line *line, const return ptr; } @@ -2889,7 +2881,7 @@ /* 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 -@@ -1049,8 +1357,22 @@ +@@ -1465,8 +1773,22 @@ fillbuf (struct buffer *buf, FILE *fp, c else { if (key->skipsblanks) @@ -2914,7 +2906,7 @@ line->keybeg = line_start; } } -@@ -1100,15 +1422,59 @@ +@@ -1521,15 +1843,59 @@ general_numcompare (const char *sa, cons /* FIXME: maybe add option to try expensive FP conversion only if A and B can't be compared more cheaply/accurately. */ @@ -2981,7 +2973,7 @@ return 1; /* Sort numbers in the usual way, where -0 == +0. Put NaNs after -@@ -1126,7 +1492,7 @@ +@@ -1547,7 +1913,7 @@ general_numcompare (const char *sa, cons Return 0 if the name in S is not recognized. */ static int @@ -2990,7 +2982,7 @@ { size_t lo = 0; size_t hi = MONTHS_PER_YEAR; -@@ -1281,11 +1647,79 @@ +@@ -1702,11 +2068,79 @@ compare_random (char *restrict texta, si return diff; } @@ -3071,7 +3063,7 @@ { struct keyfield const *key = keylist; -@@ -1452,12 +1886,189 @@ +@@ -1873,12 +2307,189 @@ keycompare (const struct line *a, const return 0; @@ -3263,7 +3255,7 @@ /* Compare two lines A and B, returning negative, zero, or positive depending on whether A compares less than, equal to, or greater than B. */ -@@ -2253,6 +2864,11 @@ +@@ -2695,6 +3306,11 @@ set_ordering (const char *s, struct keyf break; case 'M': key->month = true; @@ -3275,8 +3267,8 @@ break; case 'n': key->numeric = true; -@@ -2309,7 +2925,7 @@ - atexit (close_stdout); +@@ -2748,7 +3364,7 @@ main (int argc, char **argv) + initialize_exit_failure (SORT_FAILURE); hard_LC_COLLATE = hard_locale (LC_COLLATE); -#if HAVE_NL_LANGINFO @@ -3284,7 +3276,7 @@ hard_LC_TIME = hard_locale (LC_TIME); #endif -@@ -2322,14 +2938,40 @@ +@@ -2761,14 +3377,40 @@ main (int argc, char **argv) add support for multibyte decimal points. */ decimal_point = to_uchar (locale->decimal_point[0]); if (! decimal_point || locale->decimal_point[1]) @@ -3327,7 +3319,7 @@ have_read_stdin = false; inittables (); -@@ -2544,13 +3186,32 @@ +@@ -3017,13 +3659,32 @@ main (int argc, char **argv) case 't': { @@ -3364,7 +3356,7 @@ else { /* Provoke with `sort -txx'. Complain about -@@ -2561,9 +3222,12 @@ +@@ -3034,9 +3695,12 @@ main (int argc, char **argv) quote (optarg)); } } @@ -3378,9 +3370,9 @@ } break; ---- coreutils-6.5/src/unexpand.c -+++ coreutils-6.5/src/unexpand.c -@@ -39,11 +39,34 @@ +--- coreutils-6.9-316-e6f4b/src/unexpand.c ++++ coreutils-6.9-316-e6f4b/src/unexpand.c +@@ -38,11 +38,34 @@ #include #include #include @@ -3415,7 +3407,7 @@ /* The official name of this program (e.g., no `g' prefix). */ #define PROGRAM_NAME "unexpand" -@@ -453,6 +476,237 @@ +@@ -452,6 +475,237 @@ unexpand (void) } } @@ -3653,7 +3645,7 @@ int main (int argc, char **argv) { -@@ -531,7 +785,12 @@ +@@ -530,7 +784,12 @@ main (int argc, char **argv) file_list = (optind < argc ? &argv[optind] : stdin_argv); @@ -3667,9 +3659,9 @@ if (have_read_stdin && fclose (stdin) != 0) error (EXIT_FAILURE, errno, "-"); ---- coreutils-6.5/src/uniq.c -+++ coreutils-6.5/src/uniq.c -@@ -23,6 +23,16 @@ +--- coreutils-6.9-316-e6f4b/src/uniq.c ++++ coreutils-6.9-316-e6f4b/src/uniq.c +@@ -22,6 +22,16 @@ #include #include @@ -3686,7 +3678,7 @@ #include "system.h" #include "argmatch.h" #include "linebuffer.h" -@@ -34,6 +44,13 @@ +@@ -33,6 +43,13 @@ #include "xstrtol.h" #include "memcasecmp.h" @@ -3700,7 +3692,7 @@ /* The official name of this program (e.g., no `g' prefix). */ #define PROGRAM_NAME "uniq" -@@ -109,6 +126,12 @@ +@@ -108,6 +125,12 @@ static enum delimit_method const delimit /* Select whether/how to delimit groups of duplicate lines. */ static enum delimit_method delimit_groups; @@ -3713,7 +3705,7 @@ static struct option const longopts[] = { {"count", no_argument, NULL, 'c'}, -@@ -189,7 +212,7 @@ +@@ -199,7 +222,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 * @@ -3722,7 +3714,7 @@ { size_t count; char *lp = line->buffer; -@@ -210,6 +233,83 @@ +@@ -220,6 +243,83 @@ find_field (const struct linebuffer *lin return lp + i; } @@ -3806,7 +3798,7 @@ /* 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 +334,73 @@ +@@ -244,6 +344,73 @@ different (char *old, char *new, size_t return oldlen != newlen || memcmp (old, new, oldlen); } @@ -3880,16 +3872,15 @@ /* Output the line in linebuffer LINE to standard output provided that the switches say it should be output. MATCH is true if the line matches the previous line. -@@ -286,15 +453,43 @@ +@@ -296,15 +463,42 @@ check_file (const char *infile, const ch { char *prevfield IF_LINT (= NULL); size_t prevlen IF_LINT (= 0); +#if HAVE_MBRTOWC + mbstate_t prevstate; -+ + + memset (&prevstate, '\0', sizeof (mbstate_t)); +#endif - while (!feof (stdin)) { char *thisfield; @@ -3897,7 +3888,7 @@ +#if HAVE_MBRTOWC + mbstate_t thisstate; +#endif - if (readlinebuffer (thisline, stdin) == 0) + if (readlinebuffer_delim (thisline, stdin, delimiter) == 0) break; thisfield = find_field (thisline); thislen = thisline->length - 1 - (thisfield - thisline->buffer); @@ -3924,7 +3915,7 @@ if (prevline->length == 0 || different (thisfield, prevfield, thislen, prevlen)) { -@@ -313,17 +508,26 @@ +@@ -323,17 +517,26 @@ check_file (const char *infile, const ch size_t prevlen; uintmax_t match_count = 0; bool first_delimiter = true; @@ -3932,7 +3923,7 @@ + mbstate_t prevstate; +#endif - if (readlinebuffer (prevline, stdin) == 0) + if (readlinebuffer_delim (prevline, stdin, delimiter) == 0) goto closefiles; prevfield = find_field (prevline); prevlen = prevline->length - 1 - (prevfield - prevline->buffer); @@ -3948,10 +3939,10 @@ +#if HAVE_MBRTOWC + mbstate_t thisstate; +#endif - if (readlinebuffer (thisline, stdin) == 0) + if (readlinebuffer_delim (thisline, stdin, delimiter) == 0) { if (ferror (stdin)) -@@ -332,6 +536,15 @@ +@@ -342,6 +545,15 @@ check_file (const char *infile, const ch } thisfield = find_field (thisline); thislen = thisline->length - 1 - (thisfield - thisline->buffer); @@ -3967,7 +3958,7 @@ match = !different (thisfield, prevfield, thislen, prevlen); match_count += match; -@@ -364,6 +577,9 @@ +@@ -374,6 +586,9 @@ check_file (const char *infile, const ch SWAP_LINES (prevline, thisline); prevfield = thisfield; prevlen = thislen; @@ -3977,7 +3968,7 @@ if (!match) match_count = 0; } -@@ -408,6 +624,18 @@ +@@ -419,6 +634,18 @@ main (int argc, char **argv) atexit (close_stdout); diff --git a/coreutils-6.8-su.diff b/coreutils-6.8-su.diff index c96dd15..6c2a851 100644 --- a/coreutils-6.8-su.diff +++ b/coreutils-6.8-su.diff @@ -1,8 +1,31 @@ Index: src/Makefile.am -=================================================================== ---- src/Makefile.am.orig +================================================================================ +--- configure.ac ++++ configure.ac +@@ -46,6 +46,20 @@ coreutils_MACROS + + AC_FUNC_FORK + ++AC_ARG_ENABLE(pam, AS_HELP_STRING([--disable-pam], ++ [Enable PAM support in su (default=auto)]), , [enable_pam=yes]) ++if test "x$enable_pam" != xno; then ++ AC_CHECK_LIB([pam], [pam_start], [enable_pam=yes], [enable_pam=no]) ++ AC_CHECK_LIB([pam_misc], [misc_conv], [:], [enable_pam=no]) ++ if test "x$enable_pam" != xno; then ++ AC_DEFINE(USE_PAM, 1, [Define if you want to use PAM]) ++ PAM_LIBS="-lpam -lpam_misc" ++ AC_SUBST(PAM_LIBS) ++ fi ++fi ++AC_MSG_CHECKING([whether to enable PAM support in su]) ++AC_MSG_RESULT([$enable_pam]) ++ + optional_bin_progs= + AC_CHECK_FUNCS(uname, + gl_ADD_PROG([optional_bin_progs], [uname])) +--- src/Makefile.am +++ src/Makefile.am -@@ -102,7 +102,8 @@ tail_LDADD = $(nanosec_libs) +@@ -124,7 +124,8 @@ tail_LDADD = $(nanosec_libs) # If necessary, add -lm to resolve use of pow in lib/strtod.c. uptime_LDADD = $(LDADD) $(POW_LIB) $(GETLOADAVG_LIBS) @@ -10,11 +33,9 @@ Index: src/Makefile.am +su_SOURCES = su.c getdef.c +su_LDADD = $(LDADD) $(LIB_CRYPT) $(PAM_LIBS) - dir_LDADD += $(LIB_ACL) - ls_LDADD += $(LIB_ACL) -Index: src/getdef.c -=================================================================== ---- /dev/null + dir_LDADD += $(LIB_ACL_TRIVIAL) $(LIB_ACL) + ls_LDADD += $(LIB_ACL_TRIVIAL) $(LIB_ACL) +--- src/getdef.c +++ src/getdef.c @@ -0,0 +1,257 @@ +/* Copyright (C) 2003, 2004, 2005 Thorsten Kukuk @@ -274,9 +295,7 @@ Index: src/getdef.c +} + +#endif -Index: src/getdef.h -=================================================================== ---- /dev/null +--- src/getdef.h +++ src/getdef.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2003, 2005 Thorsten Kukuk @@ -308,11 +327,9 @@ Index: src/getdef.h +extern void free_getdef_data (void); + +#endif /* _GETDEF_H_ */ -Index: src/su.c -=================================================================== ---- src/su.c.orig +--- src/su.c +++ src/su.c -@@ -38,6 +38,16 @@ +@@ -37,6 +37,16 @@ restricts who can su to UID 0 accounts. RMS considers that to be fascist. @@ -329,7 +346,7 @@ Index: src/su.c Compile-time options: -DSYSLOG_SUCCESS Log successful su's (by default, to root) with syslog. -DSYSLOG_FAILURE Log failed su's (by default, to root) with syslog. -@@ -53,6 +63,13 @@ +@@ -52,6 +62,13 @@ #include #include #include @@ -343,7 +360,7 @@ Index: src/su.c /* Hide any system prototype for getusershell. This is necessary because some Cray systems have a conflicting -@@ -66,6 +83,9 @@ +@@ -65,6 +82,9 @@ #if HAVE_SYSLOG_H && HAVE_SYSLOG # include @@ -353,7 +370,7 @@ Index: src/su.c #else # undef SYSLOG_SUCCESS # undef SYSLOG_FAILURE -@@ -99,19 +119,13 @@ +@@ -98,19 +118,13 @@ # include #endif @@ -377,7 +394,7 @@ Index: src/su.c /* The shell to run if none is given in the user's passwd entry. */ #define DEFAULT_SHELL "/bin/sh" -@@ -119,13 +133,22 @@ +@@ -118,13 +132,22 @@ /* The user to become if none is specified. */ #define DEFAULT_USER "root" @@ -400,7 +417,7 @@ Index: src/su.c static void run_shell (char const *, char const *, char **, size_t) ATTRIBUTE_NORETURN; -@@ -216,7 +239,163 @@ log_su (struct passwd const *pw, bool su +@@ -215,7 +238,163 @@ log_su (struct passwd const *pw, bool su } #endif @@ -470,7 +487,7 @@ Index: src/su.c + if (retval != PAM_SUCCESS) + { + cleanup_pam(retval); -+ error (EXIT_FAIL, 0, _("cannot not open session: %s"), ++ error (EXIT_FAILURE, 0, _("cannot not open session: %s"), + pam_strerror (pamh, retval)); + } + else @@ -564,7 +581,7 @@ Index: src/su.c Return true if the user gives the correct password for entry PW, false if not. Return true without asking for a password if run by UID 0 or if PW has an empty password. */ -@@ -224,10 +403,52 @@ log_su (struct passwd const *pw, bool su +@@ -223,10 +402,52 @@ log_su (struct passwd const *pw, bool su static bool correct_password (const struct passwd *pw) { @@ -618,7 +635,7 @@ Index: src/su.c endspent (); if (sp) -@@ -248,6 +469,7 @@ correct_password (const struct passwd *p +@@ -247,6 +468,7 @@ correct_password (const struct passwd *p encrypted = crypt (unencrypted, correct); memset (unencrypted, 0, strlen (unencrypted)); return STREQ (encrypted, correct); @@ -626,7 +643,7 @@ Index: src/su.c } /* Update `environ' for the new shell based on PW, with SHELL being -@@ -272,8 +494,8 @@ modify_environment (const struct passwd +@@ -271,8 +493,8 @@ modify_environment (const struct passwd xsetenv ("USER", pw->pw_name); xsetenv ("LOGNAME", pw->pw_name); xsetenv ("PATH", (pw->pw_uid @@ -637,7 +654,7 @@ Index: src/su.c } else { -@@ -283,6 +505,12 @@ modify_environment (const struct passwd +@@ -282,6 +504,12 @@ modify_environment (const struct passwd { xsetenv ("HOME", pw->pw_dir); xsetenv ("SHELL", shell); @@ -650,13 +667,13 @@ Index: src/su.c if (pw->pw_uid) { xsetenv ("USER", pw->pw_name); -@@ -290,19 +518,41 @@ modify_environment (const struct passwd +@@ -289,19 +517,41 @@ modify_environment (const struct passwd } } } + +#ifdef USE_PAM -+ export_pamenv(); ++ export_pamenv (); +#endif } @@ -669,12 +686,12 @@ Index: src/su.c #ifdef HAVE_INITGROUPS errno = 0; if (initgroups (pw->pw_name, pw->pw_gid) == -1) -- error (EXIT_FAIL, errno, _("cannot set groups")); +- error (EXIT_FAILURE, errno, _("cannot set groups")); + { +#ifdef USE_PAM + cleanup_pam(PAM_ABORT); +#endif -+ error (EXIT_FAIL, errno, _("cannot set groups")); ++ error (EXIT_FAILURE, errno, _("cannot set groups")); + } endgrent (); #endif @@ -682,7 +699,7 @@ Index: src/su.c +#ifdef USE_PAM + retval = pam_setcred (pamh, PAM_ESTABLISH_CRED); + if (retval != PAM_SUCCESS) -+ error (EXIT_FAIL, 0, "%s", pam_strerror (pamh, retval)); ++ error (EXIT_FAILURE, 0, "%s", pam_strerror (pamh, retval)); + else + _pam_cred_established = 1; +#endif @@ -692,17 +709,17 @@ Index: src/su.c +change_identity (const struct passwd *pw) +{ if (setgid (pw->pw_gid)) - error (EXIT_FAIL, errno, _("cannot set group id")); + error (EXIT_FAILURE, errno, _("cannot set group id")); if (setuid (pw->pw_uid)) -@@ -495,6 +745,7 @@ main (int argc, char **argv) +@@ -494,6 +744,7 @@ main (int argc, char **argv) #ifdef SYSLOG_FAILURE log_su (pw, false); #endif + sleep (getdef_num ("FAIL_DELAY", 1)); - error (EXIT_FAIL, 0, _("incorrect password")); + error (EXIT_FAILURE, 0, _("incorrect password")); } #ifdef SYSLOG_SUCCESS -@@ -516,9 +767,21 @@ main (int argc, char **argv) +@@ -515,9 +766,21 @@ main (int argc, char **argv) shell = NULL; } shell = xstrdup (shell ? shell : pw->pw_shell); @@ -725,28 +742,3 @@ Index: src/su.c if (simulate_login && chdir (pw->pw_dir) != 0) error (0, errno, _("warning: cannot change directory to %s"), pw->pw_dir); -Index: configure.ac -=================================================================== ---- configure.ac.orig -+++ configure.ac -@@ -41,6 +41,20 @@ coreutils_MACROS - - AC_FUNC_FORK - -+AC_ARG_ENABLE(pam, AS_HELP_STRING([--disable-pam],dnl -+ [Enable PAM support in su (default=auto)]),,[enable_pam=yes]) -+if test "x$enable_pam" != xno; then -+ AC_CHECK_LIB([pam], [pam_start], [enable_pam=yes], [enable_pam=no]) -+ AC_CHECK_LIB([pam_misc], [misc_conv], [:], [enable_pam=no]) -+ if test "x$enable_pam" != xno; then -+ AC_DEFINE(USE_PAM, 1, [Define if you want to use PAM]) -+ PAM_LIBS="-lpam -lpam_misc" -+ AC_SUBST(PAM_LIBS) -+ fi -+fi -+AC_MSG_CHECKING([whether to enable PAM support in su]) -+AC_MSG_RESULT([$enable_pam]) -+ - AC_CHECK_FUNCS(uname, - OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS uname\$(EXEEXT)" - MAN="$MAN uname.1") diff --git a/coreutils-6.9.89.48-96961.tar.lzma b/coreutils-6.9.89.48-96961.tar.lzma new file mode 100644 index 0000000..58ba39a --- /dev/null +++ b/coreutils-6.9.89.48-96961.tar.lzma @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c48513d649a0ba64d7a4c969904812386f642d5cbf835d5099a73adf8918ee90 +size 3681669 diff --git a/coreutils-6.9.diff b/coreutils-6.9.89.48.diff similarity index 71% rename from coreutils-6.9.diff rename to coreutils-6.9.89.48.diff index 023f187..24471a7 100644 --- a/coreutils-6.9.diff +++ b/coreutils-6.9.89.48.diff @@ -2,7 +2,7 @@ Index: doc/coreutils.texi ================================================================================ --- doc/coreutils.texi +++ doc/coreutils.texi -@@ -64,8 +64,6 @@ +@@ -65,8 +65,6 @@ * fold: (coreutils)fold invocation. Wrap long input lines. * groups: (coreutils)groups invocation. Print group names a user is in. * head: (coreutils)head invocation. Output the first part of files. @@ -11,8 +11,8 @@ Index: doc/coreutils.texi * id: (coreutils)id invocation. Print user identity. * install: (coreutils)install invocation. Copy and change attributes. * join: (coreutils)join invocation. Join lines on a common field. -@@ -399,8 +397,6 @@ System context - +@@ -400,8 +398,6 @@ System context + * arch invocation:: Print machine hardware name * date invocation:: Print or set system date and time * uname invocation:: Print system information -* hostname invocation:: Print or set system name @@ -20,8 +20,8 @@ Index: doc/coreutils.texi @command{date}: Print or set system date and time -@@ -12306,8 +12302,6 @@ information. - @menu +@@ -12452,8 +12448,6 @@ information. + * arch invocation:: Print machine hardware name. * date invocation:: Print or set system date and time. * uname invocation:: Print system information. -* hostname invocation:: Print or set system name. @@ -29,7 +29,7 @@ Index: doc/coreutils.texi @end menu -@@ -13065,55 +13059,6 @@ Print the kernel version. +@@ -13234,55 +13228,6 @@ Print the kernel version. @exitstatus @@ -85,20 +85,27 @@ Index: doc/coreutils.texi @node Modified command invocation @chapter Modified command invocation ---- src/sort.c -+++ src/sort.c -@@ -3517,10 +3517,7 @@ main (int argc, char **argv) - if (! (key->sword | key->schar)) - key->sword = SIZE_MAX; - if (! s || *set_ordering (s, key, bl_start)) -- { -- free (key); -- key = NULL; -- } -+ key = NULL; - else - { - if (minus_pos_usage) +--- m4/gnulib-comp.m4 ++++ m4/gnulib-comp.m4 +@@ -235,7 +235,6 @@ AC_DEFUN([gl_INIT], + gl_POSIXVER + gl_FUNC_PRINTF_FREXP + gl_FUNC_PRINTF_FREXPL +- m4_divert_text([INIT_PREPARE], [gl_printf_safe=yes]) + gl_FUNC_PUTENV + gl_STDLIB_MODULE_INDICATOR([putenv]) + gl_QUOTE +--- man/Makefile.am ++++ man/Makefile.am +@@ -179,7 +179,7 @@ check-x-vs-1: + PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \ + t=ls-files.$$$$; \ + (cd $(srcdir) && ls -1 *.x) | sed 's/\.x$$//' | $(ASSORT) > $$t;\ +- (echo $(dist_man_MANS) $(NO_INSTALL_PROGS_DEFAULT) \ ++ (echo $(dist_man_MANS) $(NO_INSTALL_PROGS_DEFAULT) hostid \ + | tr -s ' ' '\n' | sed 's/\.1$$//') \ + | $(ASSORT) -u | diff - $$t || { rm $$t; exit 1; }; \ + rm $$t --- src/system.h +++ src/system.h @@ -168,7 +168,7 @@ enum @@ -110,20 +117,19 @@ Index: doc/coreutils.texi #endif /* Extract or fake data from a `struct stat'. ---- tests/help-version -+++ tests/help-version -@@ -197,7 +197,7 @@ lbracket_args=": ]" - - for i in $all_programs; do +--- tests/misc/help-version ++++ tests/misc/help-version +@@ -205,6 +205,7 @@ lbracket_args=": ]" + for i in $built_programs; do # Skip these. -- case $i in chroot|stty|tty|false) continue;; esac -+ case $i in chroot|stty|tty|false|df) continue;; esac + case $i in chroot|stty|tty|false|chcon|runcon) continue;; esac ++ case $i in df) continue;; esac rm -rf $tmp_in $tmp_in2 $tmp_dir $tmp_out echo > $tmp_in --- tests/other-fs-tmpdir +++ tests/other-fs-tmpdir -@@ -44,6 +44,8 @@ for d in $CANDIDATE_TMP_DIRS; do +@@ -42,6 +42,8 @@ for d in $CANDIDATE_TMP_DIRS; do fi done diff --git a/coreutils-6.9.tar.bz2 b/coreutils-6.9.tar.bz2 deleted file mode 100644 index 5c0f9c5..0000000 --- a/coreutils-6.9.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:89c2895ad157de50e53298b22d91db116ee4e1dd3fdf4019260254e2e31497b0 -size 5384378 diff --git a/coreutils-xattr.diff b/coreutils-xattr.diff index 8b6e328..3060ba1 100644 --- a/coreutils-xattr.diff +++ b/coreutils-xattr.diff @@ -1,10 +1,10 @@ Index: coreutils-6.2/configure.ac -=================================================================== ---- coreutils-6.2.orig/configure.ac -+++ coreutils-6.2/configure.ac -@@ -246,6 +246,9 @@ AC_CHECK_DECLS([strtoimax, strtoumax]) - - cu_LIB_CHECK +================================================================================ +--- coreutils-6.9.89.48-96961/configure.ac ++++ coreutils-6.9.89.48-96961/configure.ac +@@ -325,6 +325,9 @@ CONFIG_STATUS_DEPENDENCIES='$(top_srcdir + AC_SUBST([CONFIG_STATUS_DEPENDENCIES]) + ############################################################################ +# Extended attribute copying. +AC_FUNC_XATTR @@ -12,10 +12,19 @@ Index: coreutils-6.2/configure.ac AM_GNU_GETTEXT([external], [need-formatstring-macros]) AM_GNU_GETTEXT_VERSION([0.15]) -Index: coreutils-6.2/m4/xattr.m4 -=================================================================== ---- /dev/null -+++ coreutils-6.2/m4/xattr.m4 +--- coreutils-6.9.89.48-96961/doc/coreutils.texi ++++ coreutils-6.9.89.48-96961/doc/coreutils.texi +@@ -7087,6 +7087,8 @@ Preserve in the destination files + any links between corresponding source files. + @c Give examples illustrating how hard links are preserved. + @c Also, show how soft links map to hard links with -L and -H. ++@itemx xattrs ++Preserve extended attributes. (See /etc/xattr.conf.) + @itemx all + Preserve all file attributes. + Equivalent to specifying all of the above. +--- coreutils-6.9.89.48-96961/m4/xattr.m4 ++++ coreutils-6.9.89.48-96961/m4/xattr.m4 @@ -0,0 +1,38 @@ +# xattr.m4 - check for Extended Attributes (Linux) + @@ -55,13 +64,11 @@ Index: coreutils-6.2/m4/xattr.m4 + AC_CHECK_FUNCS(attr_copy_file) + LIBS=$xattr_saved_LIBS +]) -Index: coreutils-6.2/src/Makefile.am -=================================================================== ---- coreutils-6.2.orig/src/Makefile.am -+++ coreutils-6.2/src/Makefile.am -@@ -112,6 +112,10 @@ cp_LDADD += $(LIB_ACL) - mv_LDADD += $(LIB_ACL) - ginstall_LDADD += $(LIB_ACL) +--- coreutils-6.9.89.48-96961/src/Makefile.am ++++ coreutils-6.9.89.48-96961/src/Makefile.am +@@ -135,6 +135,10 @@ ginstall_LDADD += $(LIB_ACL) + + stat_LDADD = $(LDADD) $(LIB_SELINUX) +cp_LDADD += $(LIB_XATTR) +mv_LDADD += $(LIB_XATTR) @@ -69,13 +76,11 @@ Index: coreutils-6.2/src/Makefile.am + $(PROGRAMS): ../lib/libcoreutils.a - SUFFIXES = .sh -Index: coreutils-6.2/src/copy.c -=================================================================== ---- coreutils-6.2.orig/src/copy.c -+++ coreutils-6.2/src/copy.c -@@ -53,6 +53,12 @@ - #include "xreadlink.h" + # Get the release year from ../lib/version-etc.c. +--- coreutils-6.9.89.48-96961/src/copy.c ++++ coreutils-6.9.89.48-96961/src/copy.c +@@ -56,6 +56,12 @@ + #include "areadlink.h" #include "yesno.h" +#if USE_XATTR @@ -87,7 +92,7 @@ Index: coreutils-6.2/src/copy.c #ifndef HAVE_FCHOWN # define HAVE_FCHOWN false # define fchown(fd, uid, gid) (-1) -@@ -118,6 +124,98 @@ is_ancestor (const struct stat *sb, cons +@@ -113,6 +119,98 @@ is_ancestor (const struct stat *sb, cons return false; } @@ -186,7 +191,7 @@ Index: coreutils-6.2/src/copy.c /* Read the contents of the directory SRC_NAME_IN, and recursively copy the contents to DST_NAME_IN. NEW_DST is true if DST_NAME_IN is a directory that was created previously in the -@@ -509,6 +607,9 @@ copy_reg (char const *src_name, char con +@@ -640,6 +738,9 @@ copy_reg (char const *src_name, char con } } @@ -196,8 +201,8 @@ Index: coreutils-6.2/src/copy.c set_author (dst_name, dest_desc, src_sb); if (x->preserve_mode || x->move_mode) -@@ -1755,6 +1856,9 @@ copy_internal (char const *src_name, cha - return false; +@@ -1939,6 +2040,9 @@ copy_internal (char const *src_name, cha + } } + if (!copy_xattrs (src_name, -1, dst_name, -1, x)) @@ -206,11 +211,9 @@ Index: coreutils-6.2/src/copy.c set_author (dst_name, -1, &src_sb); if (x->preserve_mode || x->move_mode) -Index: coreutils-6.2/src/copy.h -=================================================================== ---- coreutils-6.2.orig/src/copy.h -+++ coreutils-6.2/src/copy.h -@@ -128,6 +128,9 @@ struct cp_options +--- coreutils-6.9.89.48-96961/src/copy.h ++++ coreutils-6.9.89.48-96961/src/copy.h +@@ -134,6 +134,9 @@ struct cp_options bool preserve_mode; bool preserve_timestamps; @@ -220,52 +223,51 @@ Index: coreutils-6.2/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 -Index: coreutils-6.2/src/cp.c -=================================================================== ---- coreutils-6.2.orig/src/cp.c -+++ coreutils-6.2/src/cp.c -@@ -191,7 +191,7 @@ Mandatory arguments to long options are +--- coreutils-6.9.89.48-96961/src/cp.c ++++ coreutils-6.9.89.48-96961/src/cp.c +@@ -197,7 +197,8 @@ Mandatory arguments to long options are -p same as --preserve=mode,ownership,timestamps\n\ --preserve[=ATTR_LIST] preserve the specified attributes (default:\n\ mode,ownership,timestamps), if possible\n\ -- additional attributes: links, all\n\ -+ additional attributes: links, xattrs, all\n\ +- additional attributes: context, links, all\n\ ++ additional attributes: context, links,\n\ ++ xattrs, all\n\ "), stdout); fputs (_("\ --no-preserve=ATTR_LIST don't preserve the specified attributes\n\ -@@ -724,6 +724,7 @@ cp_option_init (struct cp_options *x) +@@ -751,6 +752,7 @@ cp_option_init (struct cp_options *x) x->preserve_links = false; x->preserve_mode = false; x->preserve_timestamps = false; + x->preserve_xattrs = false; + x->preserve_security_context = false; + x->require_preserve_context = false; - x->require_preserve = false; - x->recursive = false; -@@ -752,18 +753,21 @@ decode_preserve_arg (char const *arg, st +@@ -788,19 +790,21 @@ decode_preserve_arg (char const *arg, st PRESERVE_TIMESTAMPS, PRESERVE_OWNERSHIP, PRESERVE_LINK, + PRESERVE_XATTRS, + PRESERVE_CONTEXT, PRESERVE_ALL }; static enum File_attribute const preserve_vals[] = { PRESERVE_MODE, PRESERVE_TIMESTAMPS, -- PRESERVE_OWNERSHIP, PRESERVE_LINK, PRESERVE_ALL -+ PRESERVE_OWNERSHIP, PRESERVE_LINK, -+ PRESERVE_XATTRS, PRESERVE_ALL +- PRESERVE_OWNERSHIP, PRESERVE_LINK, PRESERVE_CONTEXT, PRESERVE_ALL ++ PRESERVE_OWNERSHIP, PRESERVE_LINK, PRESERVE_XATTRS, PRESERVE_CONTEXT, ++ PRESERVE_ALL }; /* Valid arguments to the `--preserve' option. */ static char const* const preserve_args[] = { "mode", "timestamps", -- "ownership", "links", "all", NULL -+ "ownership", "links", -+ "xattrs", "all", NULL +- "ownership", "links", "context", "all", NULL ++ "ownership", "links", "xattrs", "context", "all", NULL }; ARGMATCH_VERIFY (preserve_args, preserve_vals); -@@ -799,11 +803,16 @@ decode_preserve_arg (char const *arg, st +@@ -836,6 +840,10 @@ decode_preserve_arg (char const *arg, st x->preserve_links = on_off; break; @@ -273,49 +275,34 @@ Index: coreutils-6.2/src/cp.c + x->preserve_xattrs = on_off; + break; + - case PRESERVE_ALL: - x->preserve_mode = on_off; + case PRESERVE_CONTEXT: + x->preserve_security_context = on_off; + x->require_preserve_context = on_off; +@@ -846,6 +854,7 @@ decode_preserve_arg (char const *arg, st x->preserve_timestamps = on_off; x->preserve_ownership = on_off; x->preserve_links = on_off; + x->preserve_xattrs = on_off; + if (selinux_enabled) + x->preserve_security_context = on_off; break; - - default: -Index: coreutils-6.2/src/install.c -=================================================================== ---- coreutils-6.2.orig/src/install.c -+++ coreutils-6.2/src/install.c -@@ -154,6 +154,7 @@ cp_option_init (struct cp_options *x) +--- coreutils-6.9.89.48-96961/src/install.c ++++ coreutils-6.9.89.48-96961/src/install.c +@@ -176,6 +176,7 @@ cp_option_init (struct cp_options *x) x->preserve_links = false; x->preserve_mode = false; x->preserve_timestamps = false; + x->preserve_xattrs = false; x->require_preserve = false; + x->require_preserve_context = false; x->recursive = false; - x->sparse_mode = SPARSE_AUTO; -Index: coreutils-6.2/src/mv.c -=================================================================== ---- coreutils-6.2.orig/src/mv.c -+++ coreutils-6.2/src/mv.c -@@ -125,6 +125,7 @@ cp_option_init (struct cp_options *x) +--- coreutils-6.9.89.48-96961/src/mv.c ++++ coreutils-6.9.89.48-96961/src/mv.c +@@ -136,6 +136,7 @@ cp_option_init (struct cp_options *x) x->preserve_links = true; x->preserve_mode = true; x->preserve_timestamps = true; + x->preserve_xattrs = true; + x->preserve_security_context = selinux_enabled; x->require_preserve = false; /* FIXME: maybe make this an option */ - x->recursive = true; - x->sparse_mode = SPARSE_AUTO; /* FIXME: maybe make this an option */ -Index: coreutils-6.2/doc/coreutils.texi -=================================================================== ---- coreutils-6.2.orig/doc/coreutils.texi -+++ coreutils-6.2/doc/coreutils.texi -@@ -6948,6 +6948,8 @@ Preserve in the destination files - any links between corresponding source files. - @c Give examples illustrating how hard links are preserved. - @c Also, show how soft links map to hard links with -L and -H. -+@itemx xattrs -+Preserve extended attributes. (See /etc/xattr.conf.) - @itemx all - Preserve all file attributes. - Equivalent to specifying all of the above. + x->require_preserve_context = false; diff --git a/coreutils.changes b/coreutils.changes index fe9a28f..55be81d 100644 --- a/coreutils.changes +++ b/coreutils.changes @@ -1,3 +1,127 @@ +------------------------------------------------------------------- +Thu Nov 29 14:28:26 CET 2007 - schwab@suse.de + +- Update to coreutils-6.9.89.48 snapshot. + ** New programs + arch: equivalent to uname -m, not installed by default + But don't install this program on Solaris systems. + mktemp: create a temporary file or directory (or names) + ** Programs no longer installed by default + hostname, su + ** Changes in behavior + cp, by default, refuses to copy through a dangling destination symlink + Set POSIXLY_CORRECT if you require the old, risk-prone behavior. + pr -F no longer suppresses the footer or the first two blank lines in + the header. This is for compatibility with BSD and POSIX. + tr now warns about an unescaped backslash at end of string. + The tr from coreutils-5.2.1 and earlier would fail for such usage, + and Solaris' tr ignores that final byte. + ** New features + Add SELinux support (FIXME: add details here) + cp -p tries to preserve the GID of a file even if preserving the UID + is not possible. + uniq accepts a new option: --zero-terminated (-z). As with the sort + option of the same name, this makes uniq consume and produce + NUL-terminated lines rather than newline-terminated lines. + wc no longer warns about character decoding errors in multibyte locales. + This means for example that "wc /bin/sh" now produces normal output + (though the word count will have no real meaning) rather than many + error messages. + ** New build options + By default, "make install" no longer attempts to install (or even build) su. + To change that, use ./configure --enable-install-program=su. + If you also want to install the new "arch" program, do this: + ./configure --enable-install-program=arch,su. + You can inhibit the compilation and installation of selected programs + at configure time. For example, to avoid installing "hostname" and + "uptime", use ./configure --enable-no-install-program=hostname,uptime + Note: currently, "make check" passes, even when arch and su are not + built (that's the new default). However, if you inhibit the building + and installation of other programs, don't be surprised if some parts + of "make check" fail. + ** Remove deprecated options + df no longer accepts the --kilobytes option. + du no longer accepts the --kilobytes or --megabytes options. + ls no longer accepts the --kilobytes option. + ptx longer accepts the --copyright option. + who no longer accepts -i or --idle. + ** Improved robustness + ln -f can no longer silently clobber a just-created hard link. + In some cases, ln could be seen as being responsible for data loss. + For example, given directories a, b, c, and files a/f and b/f, we + should be able to do this safely: ln -f a/f b/f c && rm -f a/f b/f + However, before this change, ln would succeed, and thus cause the + loss of the contents of a/f. + stty no longer silently accepts certain invalid hex values + in its 35-colon commmand-line argument + ** Bug fixes + chmod no longer ignores a dangling symlink. Now, chmod fails + with a diagnostic saying that it cannot operate on such a file. + [bug introduced in coreutils-5.1.0] + cp attempts to read a regular file, even if stat says it is empty. + Before, "cp /proc/cpuinfo c" would create an empty file when the kernel + reports stat.st_size == 0, while "cat /proc/cpuinfo > c" would "work", + and create a nonempty one. [bug introduced in coreutils-6.0] + cp no longer fails to write through a dangling symlink + [bug introduced in coreutils-6.7]. cp --parents no + longer mishandles symlinks to directories in file name + components in the source, e.g., "cp --parents symlink/a/b + d" no longer fails. Also, 'cp' no longer considers a + destination symlink to be the same as the referenced file when + copying links or making backups. For example, if SYM is a symlink + to FILE, "cp -l FILE SYM" now reports an error instead of silently + doing nothing. The behavior of 'cp' is now better documented when + the destination is a symlink. + "cp -i --update older newer" no longer prompts; same for mv + "cp -i" now detects read errors on standard input, and no longer consumes + too much seekable input; same for ln, install, mv, and rm. + cut now diagnoses a range starting with zero (e.g., -f 0-2) as invalid; + before, it would treat it as if it started with 1 (-f 1-2). + "cut -f 2-0" now fails; before, it was equivalent to "cut -f 2-" + cut now diagnoses the '-' in "cut -f -" as an invalid range, rather + than interpreting it as the unlimited range, "1-". + date -d now accepts strings of the form e.g., 'YYYYMMDD +N days', + in addition to the usual 'YYYYMMDD N days'. + du -s now includes the size of any stat'able-but-inaccessible directory + in the total size. + du (without -s) prints whatever it knows of the size of an inaccessible + directory. Before, du would print nothing for such a directory. + ls -x DIR would sometimes output the wrong string in place of the + first entry. [introduced in coreutils-6.8] + ls --color would mistakenly color a dangling symlink as if it were + a regular symlink. This would happen only when the dangling symlink + was not a command-line argument and in a directory with d_type support. + [introduced in coreutils-6.0] + ls --color, (with a custom LS_COLORS envvar value including the + ln=target attribute) would mistakenly output the string "target" + before the name of each symlink. [introduced in coreutils-6.0] + od's --skip (-j) option now works even when the kernel says that a + nonempty regular file has stat.st_size = 0. This happens at least + with files in /proc and linux-2.6.22. + "od -j L FILE" had a bug: when the number of bytes to skip, L, is exactly + the same as the length of FILE, od would skip *no* bytes. When the number + of bytes to skip is exactly the sum of the lengths of the first N files, + od would skip only the first N-1 files. [introduced in textutils-2.0.9] + ./printf %.10000000f 1 could get an internal ENOMEM error and generate + no output, yet erroneously exit with status 0. Now it diagnoses the error + and exits with nonzero status. [present in initial implementation] + seq no longer mishandles obvious cases like "seq 0 0.000001 0.000003", + so workarounds like "seq 0 0.000001 0.0000031" are no longer needed. + seq would mistakenly reject some valid format strings containing %%, + and would mistakenly accept some invalid ones. e.g., %g%% and %%g, resp. + "seq .1 .1" would mistakenly generate no output on some systems + Obsolete sort usage with an invalid ordering-option character, e.g., + "env _POSIX2_VERSION=199209 sort +1x" no longer makes sort free an + invalid pointer [introduced in coreutils-6.5] + sorting very long lines (relative to the amount of available memory) + no longer provokes unaligned memory access + split --line-bytes=N (-C N) no longer creates an empty file + [this bug is present at least as far back as textutils-1.22 (Jan, 1997)] + tr -c no longer aborts when translating with Set2 larger than the + complement of Set1. [present in the original version, in 1992] + tr no longer rejects an unmatched [:lower:] or [:upper:] in SET1. + [present in the original version] + ------------------------------------------------------------------- Mon Jul 23 15:15:11 CEST 2007 - schwab@suse.de diff --git a/coreutils.spec b/coreutils.spec index b93aa73..840a38e 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -1,5 +1,5 @@ # -# spec file for package coreutils (Version 6.9) +# spec file for package coreutils (Version 6.9.89.48) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -8,22 +8,22 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild Name: coreutils -BuildRequires: help2man libacl-devel pam-devel -URL: http://www.gnu.org/software/coreutils/ +BuildRequires: help2man libacl-devel lzma pam-devel +Url: http://www.gnu.org/software/coreutils/ License: GPL v2 or later Group: System/Base -Provides: fileutils sh-utils stat textutils -Obsoletes: fileutils sh-utils stat textutils +Provides: fileutils sh-utils stat textutils mktemp +Obsoletes: fileutils sh-utils stat textutils mktemp Obsoletes: libselinux <= 1.23.11-3 libselinux-32bit >= 9 libselinux-64bit = 9 libselinux-x86 = 9 -Autoreqprov: on +AutoReqProv: on PreReq: %{install_info_prereq} -Version: 6.9 -Release: 30 +Version: 6.9.89.48 +Release: 1 Summary: GNU Core Utilities -Source: coreutils-%{version}.tar.bz2 +%define treeish 96961 +Source: coreutils-%{version}-%treeish.tar.lzma Source1: su.pamd Source2: su.default Patch: coreutils-%{version}.diff @@ -32,15 +32,10 @@ Patch30: coreutils-changelog.diff Patch4: coreutils-5.3.0-i18n-0.1.patch Patch5: i18n-uninit.diff Patch6: i18n-infloop.diff -Patch7: fchownat.diff Patch8: coreutils-sysinfo.diff -Patch9: ls-x.diff -Patch10: futimens.diff Patch11: i18n-monthsort.diff Patch12: i18n-random.diff -Patch13: misalign.diff Patch16: invalid-ids.diff -Patch17: no-no.diff Patch20: coreutils-6.8-su.diff Patch21: coreutils-6.8.0-pie.diff Patch22: coreutils-5.3.0-sbin4su.diff @@ -50,12 +45,13 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build Basic file, shell, and text manipulation utilities. The package contains the following programs: -basename cat chgrp chmod chown chroot cksum comm cp csplit cut date dd -df dir dircolors dirname du echo env expand expr factor false fmt fold -install groups head id join kill link ln logname ls md5sum mkdir mkfifo -mknod mv nice nl nohup od paste pathchk pinky pr printenv printf ptx -pwd readlink rm rmdir seq sha1sum shred sleep sort split stat stty su -sum sync tac tail tee test touch tr true tsort tty uname unexpand uniq +[ base64 basename cat chgrp chmod chown chroot cksum comm cp csplit cut +date dd df dir dircolors dirname du echo env expand expr factor false +fmt fold groups head id install join kill link ln logname ls md5sum +mkdir mkfifo mknod mv nice nl nohup od paste pathchk pinky pr printenv +printf ptx pwd readlink rm rmdir seq sha1sum sha224sum sha256sum +sha384sum sha512sum shred shuf sleep sort split stat stty su sum sux +sync tac tail tee test touch tr true tsort tty uname unexpand uniq unlink uptime users vdir wc who whoami yes @@ -97,33 +93,29 @@ Authors: Ulrich Drepper %prep -%setup -q +%setup -q -n %name-%version-%treeish %patch1 -p1 %patch4 -p1 %patch5 %patch6 %patch -%patch7 %patch8 -p1 -%patch9 -p1 -chmod +x tests/ls/x-option -%patch10 %patch11 %patch12 -%patch13 -p1 %patch16 -p1 -%patch17 %patch20 %patch21 %patch22 -rm -f po/no.* %build AUTOPOINT=true autoreconf -fi +gl_cv_func_printf_directive_n=yes \ ./configure CFLAGS="$RPM_OPT_FLAGS -Wall" \ - DEFAULT_POSIX2_VERSION=199209 \ --prefix=%{_prefix} --mandir=%{_mandir} \ - --infodir=%{_infodir} --without-included-regex + --infodir=%{_infodir} --without-included-regex \ + --enable-install-program=arch,su \ + --enable-no-install-program=hostid \ + DEFAULT_POSIX2_VERSION=199209 make %{?jobs:-j%jobs} PAMLIBS="-lpam -ldl" if test $EUID -eq 0; then su nobody -c make check @@ -141,7 +133,7 @@ make DESTDIR="$RPM_BUILD_ROOT" install test -f $RPM_BUILD_ROOT%{_bindir}/su || \ install src/su $RPM_BUILD_ROOT%{_bindir}/su install -d $RPM_BUILD_ROOT/bin -for i in basename cat chgrp chmod chown cp date dd df echo false kill ln ls mkdir mknod mv pwd rm rmdir sleep sort stty su sync touch true uname +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 stty su sync touch true uname do mv $RPM_BUILD_ROOT%{_bindir}/$i $RPM_BUILD_ROOT/bin/$i test $i = su && echo -n '%%attr(4755,root,root) ' @@ -154,10 +146,6 @@ install -m 644 $RPM_SOURCE_DIR/su.pamd $RPM_BUILD_ROOT/etc/pam.d/su-l install -d -m 755 $RPM_BUILD_ROOT/etc/default install -m 644 $RPM_SOURCE_DIR/su.default $RPM_BUILD_ROOT/etc/default/su ln -sf /bin/su $RPM_BUILD_ROOT%{_bindir}/sux -rm -f $RPM_BUILD_ROOT%{_bindir}/hostid -rm -f $RPM_BUILD_ROOT%{_bindir}/hostname -rm -f $RPM_BUILD_ROOT%{_mandir}/man1/hostid.1 -rm -f $RPM_BUILD_ROOT%{_mandir}/man1/hostname.1 %find_lang %name cat bin.files %name.lang > extra-files @@ -182,6 +170,127 @@ rm -rf $RPM_BUILD_ROOT %dir %{_prefix}/share/locale/*/LC_TIME %changelog +* Thu Nov 29 2007 - schwab@suse.de +- Update to coreutils-6.9.89.48 snapshot. + ** New programs + arch: equivalent to uname -m, not installed by default + But don't install this program on Solaris systems. + mktemp: create a temporary file or directory (or names) + ** Programs no longer installed by default + hostname, su + ** Changes in behavior + cp, by default, refuses to copy through a dangling destination symlink + Set POSIXLY_CORRECT if you require the old, risk-prone behavior. + pr -F no longer suppresses the footer or the first two blank lines in + the header. This is for compatibility with BSD and POSIX. + tr now warns about an unescaped backslash at end of string. + The tr from coreutils-5.2.1 and earlier would fail for such usage, + and Solaris' tr ignores that final byte. + ** New features + Add SELinux support (FIXME: add details here) + cp -p tries to preserve the GID of a file even if preserving the UID + is not possible. + uniq accepts a new option: --zero-terminated (-z). As with the sort + option of the same name, this makes uniq consume and produce + NUL-terminated lines rather than newline-terminated lines. + wc no longer warns about character decoding errors in multibyte locales. + This means for example that "wc /bin/sh" now produces normal output + (though the word count will have no real meaning) rather than many + error messages. + ** New build options + By default, "make install" no longer attempts to install (or even build) su. + To change that, use ./configure --enable-install-program=su. + If you also want to install the new "arch" program, do this: + ./configure --enable-install-program=arch,su. + You can inhibit the compilation and installation of selected programs + at configure time. For example, to avoid installing "hostname" and + "uptime", use ./configure --enable-no-install-program=hostname,uptime + Note: currently, "make check" passes, even when arch and su are not + built (that's the new default). However, if you inhibit the building + and installation of other programs, don't be surprised if some parts + of "make check" fail. + ** Remove deprecated options + df no longer accepts the --kilobytes option. + du no longer accepts the --kilobytes or --megabytes options. + ls no longer accepts the --kilobytes option. + ptx longer accepts the --copyright option. + who no longer accepts -i or --idle. + ** Improved robustness + ln -f can no longer silently clobber a just-created hard link. + In some cases, ln could be seen as being responsible for data loss. + For example, given directories a, b, c, and files a/f and b/f, we + should be able to do this safely: ln -f a/f b/f c && rm -f a/f b/f + However, before this change, ln would succeed, and thus cause the + loss of the contents of a/f. + stty no longer silently accepts certain invalid hex values + in its 35-colon commmand-line argument + ** Bug fixes + chmod no longer ignores a dangling symlink. Now, chmod fails + with a diagnostic saying that it cannot operate on such a file. + [bug introduced in coreutils-5.1.0] + cp attempts to read a regular file, even if stat says it is empty. + Before, "cp /proc/cpuinfo c" would create an empty file when the kernel + reports stat.st_size == 0, while "cat /proc/cpuinfo > c" would "work", + and create a nonempty one. [bug introduced in coreutils-6.0] + cp no longer fails to write through a dangling symlink + [bug introduced in coreutils-6.7]. cp --parents no + longer mishandles symlinks to directories in file name + components in the source, e.g., "cp --parents symlink/a/b + d" no longer fails. Also, 'cp' no longer considers a + destination symlink to be the same as the referenced file when + copying links or making backups. For example, if SYM is a symlink + to FILE, "cp -l FILE SYM" now reports an error instead of silently + doing nothing. The behavior of 'cp' is now better documented when + the destination is a symlink. + "cp -i --update older newer" no longer prompts; same for mv + "cp -i" now detects read errors on standard input, and no longer consumes + too much seekable input; same for ln, install, mv, and rm. + cut now diagnoses a range starting with zero (e.g., -f 0-2) as invalid; + before, it would treat it as if it started with 1 (-f 1-2). + "cut -f 2-0" now fails; before, it was equivalent to "cut -f 2-" + cut now diagnoses the '-' in "cut -f -" as an invalid range, rather + than interpreting it as the unlimited range, "1-". + date -d now accepts strings of the form e.g., 'YYYYMMDD +N days', + in addition to the usual 'YYYYMMDD N days'. + du -s now includes the size of any stat'able-but-inaccessible directory + in the total size. + du (without -s) prints whatever it knows of the size of an inaccessible + directory. Before, du would print nothing for such a directory. + ls -x DIR would sometimes output the wrong string in place of the + first entry. [introduced in coreutils-6.8] + ls --color would mistakenly color a dangling symlink as if it were + a regular symlink. This would happen only when the dangling symlink + was not a command-line argument and in a directory with d_type support. + [introduced in coreutils-6.0] + ls --color, (with a custom LS_COLORS envvar value including the + ln=target attribute) would mistakenly output the string "target" + before the name of each symlink. [introduced in coreutils-6.0] + od's --skip (-j) option now works even when the kernel says that a + nonempty regular file has stat.st_size = 0. This happens at least + with files in /proc and linux-2.6.22. + "od -j L FILE" had a bug: when the number of bytes to skip, L, is exactly + the same as the length of FILE, od would skip *no* bytes. When the number + of bytes to skip is exactly the sum of the lengths of the first N files, + od would skip only the first N-1 files. [introduced in textutils-2.0.9] + ./printf %%.10000000f 1 could get an internal ENOMEM error and generate + no output, yet erroneously exit with status 0. Now it diagnoses the error + and exits with nonzero status. [present in initial implementation] + seq no longer mishandles obvious cases like "seq 0 0.000001 0.000003", + so workarounds like "seq 0 0.000001 0.0000031" are no longer needed. + seq would mistakenly reject some valid format strings containing %%, + and would mistakenly accept some invalid ones. e.g., %%g%% and %%g, resp. + "seq .1 .1" would mistakenly generate no output on some systems + Obsolete sort usage with an invalid ordering-option character, e.g., + "env _POSIX2_VERSION=199209 sort +1x" no longer makes sort free an + invalid pointer [introduced in coreutils-6.5] + sorting very long lines (relative to the amount of available memory) + no longer provokes unaligned memory access + split --line-bytes=N (-C N) no longer creates an empty file + [this bug is present at least as far back as textutils-1.22 (Jan, 1997)] + tr -c no longer aborts when translating with Set2 larger than the + complement of Set1. [present in the original version, in 1992] + tr no longer rejects an unmatched [:lower:] or [:upper:] in SET1. + [present in the original version] * Mon Jul 23 2007 - schwab@suse.de - Fix random sort. - Fix invalid free. diff --git a/fchownat.diff b/fchownat.diff deleted file mode 100644 index 4be1246..0000000 --- a/fchownat.diff +++ /dev/null @@ -1,32 +0,0 @@ -2007-05-20 Jim Meyering - - Fix buggy test for the fchownat-deref bug. - * m4/openat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Create the dangling - symlink required for the run-test. Without it, this test would - always declare that fchownat doesn't work, and client code would - unnecessarily use the replacement function with fixed libc. - (gl_FUNC_FCHOWNAT): Eliminate a variable that wasn't initialized. - Reported by Greg Schafer. - ---- m4/openat.m4 -+++ m4/openat.m4 -@@ -38,6 +38,7 @@ - rm -f $gl_dangle - # Arrange for deletion of the temporary file this test creates. - ac_clean_files="$ac_clean_files $gl_dangle" -+ ln -s conftest.no-such $gl_dangle - AC_RUN_IFELSE( - [AC_LANG_SOURCE( - [[ -@@ -74,10 +75,7 @@ - - AC_CHECK_FUNC([fchownat], [have_fchownat=yes], [have_fchownat=no]) - if test $have_fchownat = yes; then -- gl_FUNC_FCHOWNAT_DEREF_BUG([have_fchownat_bug=yes]) -- if test $have_fchownat_bug = no; then -- use_replacement_fchownat=no -- fi -+ gl_FUNC_FCHOWNAT_DEREF_BUG([], [use_replacement_fchownat=no]) - fi - - if test $use_replacement_fchownat = yes; then diff --git a/futimens.diff b/futimens.diff deleted file mode 100644 index cd1f883..0000000 --- a/futimens.diff +++ /dev/null @@ -1,49 +0,0 @@ ---- lib/utimens.c -+++ lib/utimens.c -@@ -75,8 +75,8 @@ - Return 0 on success, -1 (setting errno) on failure. */ - - int --futimens (int fd ATTRIBUTE_UNUSED, -- char const *file, struct timespec const timespec[2]) -+gl_futimens (int fd ATTRIBUTE_UNUSED, -+ char const *file, struct timespec const timespec[2]) - { - /* Some Linux-based NFS clients are buggy, and mishandle time stamps - of files in NFS file systems in some cases. We have no -@@ -185,5 +185,5 @@ - int - utimens (char const *file, struct timespec const timespec[2]) - { -- return futimens (-1, file, timespec); -+ return gl_futimens (-1, file, timespec); - } ---- lib/utimens.h -+++ lib/utimens.h -@@ -1,3 +1,3 @@ - #include --int futimens (int, char const *, struct timespec const [2]); -+int gl_futimens (int, char const *, struct timespec const [2]); - int utimens (char const *, struct timespec const [2]); ---- src/copy.c -+++ src/copy.c -@@ -616,7 +616,7 @@ - timespec[0] = get_stat_atime (src_sb); - timespec[1] = get_stat_mtime (src_sb); - -- if (futimens (dest_desc, dst_name, timespec) != 0) -+ if (gl_futimens (dest_desc, dst_name, timespec) != 0) - { - error (0, errno, _("preserving times for %s"), quote (dst_name)); - if (x->require_preserve) ---- src/touch.c -+++ src/touch.c -@@ -182,7 +182,7 @@ - t = timespec; - } - -- ok = (futimens (fd, (fd == STDOUT_FILENO ? NULL : file), t) == 0); -+ ok = (gl_futimens (fd, (fd == STDOUT_FILENO ? NULL : file), t) == 0); - - if (fd == STDIN_FILENO) - { diff --git a/invalid-ids.diff b/invalid-ids.diff index 66063cf..eb52d64 100644 --- a/invalid-ids.diff +++ b/invalid-ids.diff @@ -13,9 +13,9 @@ Andreas Gruenbacher Index: coreutils-5.2.1/lib/userspec.c ================================================================================ ---- coreutils-5.3.0/lib/userspec.c -+++ coreutils-5.3.0/lib/userspec.c -@@ -184,7 +184,7 @@ +--- coreutils-6.9-316-e6f4b/lib/userspec.c ++++ coreutils-6.9-316-e6f4b/lib/userspec.c +@@ -169,7 +169,7 @@ parse_with_separator (char const *spec, { unsigned long int tmp; if (xstrtoul (u, NULL, 10, &tmp, "") == LONGINT_OK @@ -24,7 +24,7 @@ Index: coreutils-5.2.1/lib/userspec.c unum = tmp; else error_msg = E_invalid_user; -@@ -214,7 +214,8 @@ +@@ -200,7 +200,8 @@ parse_with_separator (char const *spec, if (grp == NULL) { unsigned long int tmp; @@ -34,14 +34,14 @@ Index: coreutils-5.2.1/lib/userspec.c gnum = tmp; else error_msg = E_invalid_group; ---- coreutils-5.3.0/src/chgrp.c -+++ coreutils-5.3.0/src/chgrp.c -@@ -91,7 +91,7 @@ +--- coreutils-6.9-316-e6f4b/src/chgrp.c ++++ coreutils-6.9-316-e6f4b/src/chgrp.c +@@ -90,7 +90,7 @@ parse_group (const char *name) { unsigned long int tmp; if (! (xstrtoul (name, NULL, 10, &tmp, "") == LONGINT_OK - && tmp <= GID_T_MAX)) + && tmp <= GID_T_MAX && tmp != (gid_t) -1)) - error (EXIT_FAILURE, 0, _("invalid group %s"), quote (name)); + error (EXIT_FAILURE, 0, _("invalid group: %s"), quote (name)); gid = tmp; } diff --git a/ls-x.diff b/ls-x.diff deleted file mode 100644 index 2969992..0000000 --- a/ls-x.diff +++ /dev/null @@ -1,137 +0,0 @@ -From nobody Mon Apr 2 10:35:09 2007 -From: Paul Eggert -Subject: Re: regression in `ls -x` introduced between 6.7 and 6.8 -To: Mike Frysinger -Cc: bug-coreutils@gnu.org -Date: Sun, 01 Apr 2007 20:31:14 -0700 - -Mike Frysinger writes: - ->> Do you observe a similar problem with ls -m? -> -> nope - -OK, thanks, that helped me to narrow it down. Here is a patch. - -2007-04-01 Paul Eggert - - * src/ls.c (print_horizontal): Fix bug reported by Mike Frysinger: - ls -x DIR would sometimes output the wrong string in place of the - first entry. - * tests/ls/x-option: New file. - * tests/ls/Makefile.am (TESTS): Add x-option. - -diff --git a/src/ls.c b/src/ls.c -index b33146c..abb0a26 100644 ---- a/src/ls.c -+++ b/src/ls.c -@@ -4074,16 +4074,16 @@ print_horizontal (void) - size_t pos = 0; - size_t cols = calculate_columns (false); - struct column_info const *line_fmt = &column_info[cols - 1]; -- size_t name_length = length_of_file_name_and_frills (cwd_file); -+ struct fileinfo const *f = sorted_file[0]; -+ size_t name_length = length_of_file_name_and_frills (f); - size_t max_name_length = line_fmt->col_arr[0]; - - /* Print first entry. */ -- print_file_name_and_frills (cwd_file); -+ print_file_name_and_frills (f); - - /* Now the rest. */ - for (filesno = 1; filesno < cwd_n_used; ++filesno) - { -- struct fileinfo const *f; - size_t col = filesno % cols; - - if (col == 0) -diff --git a/tests/ls/Makefile.am b/tests/ls/Makefile.am -index 461ba07..2b6fb90 100644 ---- a/tests/ls/Makefile.am -+++ b/tests/ls/Makefile.am -@@ -24,7 +24,7 @@ TESTS = \ - stat-dtype \ - inode dangle file-type recursive dired infloop \ - rt-1 time-1 symlink-slash follow-slink no-arg m-option \ -- stat-vs-dirent -+ stat-vs-dirent x-option - - EXTRA_DIST = $(TESTS) - TESTS_ENVIRONMENT = \ -diff --git a/tests/ls/x-option b/tests/ls/x-option -new file mode 100755 -index 0000000..44556df ---- /dev/null -+++ b/tests/ls/x-option -@@ -0,0 +1,59 @@ -+#!/bin/sh -+# Exercise the -x option. -+ -+# Copyright (C) 2007 Free Software Foundation, Inc. -+ -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+ -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+ -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+# 02110-1301, USA. -+ -+if test "$VERBOSE" = yes; then -+ set -x -+ ls --version -+fi -+ -+. $srcdir/../envvar-check -+. $srcdir/../lang-default -+ -+pwd=`pwd` -+t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -+trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 -+trap '(exit $?); exit $?' 1 2 13 15 -+ -+framework_failure=0 -+mkdir -p $tmp || framework_failure=1 -+cd $tmp || framework_failure=1 -+mkdir subdir || framework_failure=1 -+touch subdir/b || framework_failure=1 -+touch subdir/a || framework_failure=1 -+ -+if test $framework_failure = 1; then -+ echo "$0: failure in testing framework" 1>&2 -+ (exit 1); exit 1 -+fi -+ -+fail=0 -+ -+# Coreutils 6.8 and 6.9 would output this in the wrong order. -+ls -x subdir > out || fail=1 -+ls -rx subdir >> out || fail=1 -+cat <<\EOF > exp || fail=1 -+a b -+b a -+EOF -+ -+cmp out exp || fail=1 -+test $fail = 1 && diff out exp 2> /dev/null -+ -+(exit $fail); exit $fail -M ChangeLog -M src/ls.c -M tests/ls/Makefile.am -A tests/ls/x-option -Committed as dd35c3cab3ada1120a14b1292b0ac5c60357afb3 - - -_______________________________________________ -Bug-coreutils mailing list -Bug-coreutils@gnu.org -http://lists.gnu.org/mailman/listinfo/bug-coreutils - diff --git a/misalign.diff b/misalign.diff deleted file mode 100644 index 410a8ed..0000000 --- a/misalign.diff +++ /dev/null @@ -1,18 +0,0 @@ -2007-07-23 Andreas Schwab - - * src/sort.c (fillbuf): Make sure the buffer limit is always - aligned after the buffer was grown. - -diff --git a/src/sort.c b/src/sort.c -index 824dd0d..6024be7 100644 ---- a/src/sort.c -+++ b/src/sort.c -@@ -1492,6 +1492,8 @@ fillbuf (struct buffer *buf, FILE *fp, char const *file) - /* The current input line is too long to fit in the buffer. - Double the buffer size and try again. */ - buf->buf = X2REALLOC (buf->buf, &buf->alloc); -+ /* Realign buffer limit. */ -+ buf->alloc -= buf->alloc % sizeof (struct line); - } - } - diff --git a/no-no.diff b/no-no.diff deleted file mode 100644 index 67aef34..0000000 --- a/no-no.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- po/LINGUAS -+++ po/LINGUAS -@@ -19,7 +19,6 @@ - ms - nb - nl --no - pl - pt - pt_BR diff --git a/su.default b/su.default index d9758a8..62d1702 100644 --- a/su.default +++ b/su.default @@ -4,8 +4,8 @@ ALWAYS_SET_PATH=no # Default path. -PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin +PATH=/usr/local/bin:/bin:/usr/bin # Default path for a user invoking su to root. -SUPATH=/usr/sbin:/bin:/usr/bin:/sbin:/usr/X11R6/bin +SUPATH=/usr/sbin:/bin:/usr/bin:/sbin