From 0f9cd3e7de8e3bb7f519e564756db2731964d0aef8944f2335fe5f6c89c0c241 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Sat, 21 Jun 2008 23:50:00 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/coreutils?expand=0&rev=26 --- coreutils-5.3.0-i18n-0.1.patch | 219 +++++++++++---------- coreutils-6.11.tar.gz | 3 - coreutils-6.11.diff => coreutils-6.12.diff | 18 +- coreutils-6.12.tar.gz | 3 + coreutils.changes | 24 +++ coreutils.spec | 27 ++- utimens.diff | 112 +++++++++++ 7 files changed, 288 insertions(+), 118 deletions(-) delete mode 100644 coreutils-6.11.tar.gz rename coreutils-6.11.diff => coreutils-6.12.diff (90%) create mode 100644 coreutils-6.12.tar.gz create mode 100644 utimens.diff diff --git a/coreutils-5.3.0-i18n-0.1.patch b/coreutils-5.3.0-i18n-0.1.patch index 73c0682..98a98c3 100644 --- a/coreutils-5.3.0-i18n-0.1.patch +++ b/coreutils-5.3.0-i18n-0.1.patch @@ -1,5 +1,5 @@ ---- coreutils-6.11/lib/linebuffer.h -+++ coreutils-6.11/lib/linebuffer.h +--- coreutils-6.12/lib/linebuffer.h ++++ coreutils-6.12/lib/linebuffer.h @@ -21,6 +21,11 @@ # include @@ -22,8 +22,8 @@ }; /* Initialize linebuffer LINEBUFFER for use. */ ---- coreutils-6.11/src/cut.c -+++ coreutils-6.11/src/cut.c +--- coreutils-6.12/src/cut.c ++++ coreutils-6.12/src/cut.c @@ -28,6 +28,12 @@ #include #include @@ -51,7 +51,7 @@ /* The official name of this program (e.g., no `g' prefix). */ #define PROGRAM_NAME "cut" -@@ -74,6 +87,54 @@ struct range_pair +@@ -77,6 +90,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 -@@ -86,7 +147,7 @@ static char *field_1_buffer; +@@ -89,7 +150,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. */ -@@ -98,10 +159,11 @@ static size_t eol_range_start; +@@ -101,10 +162,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; -@@ -110,9 +172,12 @@ enum operating_mode +@@ -113,9 +175,12 @@ enum operating_mode { undefined_mode, @@ -143,7 +143,7 @@ /* Output the given delimeter-separated fields. */ field_mode }; -@@ -122,6 +187,13 @@ char *program_name; +@@ -125,6 +190,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. */ -@@ -133,6 +205,9 @@ static bool complement; +@@ -136,6 +208,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; -@@ -206,7 +281,7 @@ Mandatory arguments to long options are +@@ -209,7 +284,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\ -@@ -365,7 +440,7 @@ set_fields (const char *fieldstr) +@@ -368,7 +443,7 @@ set_fields (const char *fieldstr) in_digits = false; /* Starting a range. */ if (dash_found) @@ -185,7 +185,7 @@ dash_found = true; fieldstr++; -@@ -388,7 +463,9 @@ set_fields (const char *fieldstr) +@@ -392,7 +467,9 @@ set_fields (const char *fieldstr) if (!rhs_specified) { /* `n-'. From `initial' to end of line. */ @@ -196,7 +196,7 @@ field_found = true; } else -@@ -485,7 +562,7 @@ set_fields (const char *fieldstr) +@@ -489,7 +566,7 @@ set_fields (const char *fieldstr) fieldstr++; } else @@ -205,7 +205,7 @@ } max_range_endpoint = 0; -@@ -578,6 +655,81 @@ cut_bytes (FILE *stream) +@@ -582,6 +659,81 @@ cut_bytes (FILE *stream) } } @@ -287,7 +287,7 @@ /* Read from stream STREAM, printing to standard output any selected fields. */ static void -@@ -700,13 +852,190 @@ cut_fields (FILE *stream) +@@ -704,13 +856,190 @@ cut_fields (FILE *stream) } } @@ -481,7 +481,7 @@ } /* Process file FILE to standard output. -@@ -756,6 +1085,8 @@ main (int argc, char **argv) +@@ -760,6 +1089,8 @@ main (int argc, char **argv) bool ok; bool delim_specified = false; char *spec_list_string IF_LINT(= NULL); @@ -490,7 +490,7 @@ initialize_main (&argc, &argv); program_name = argv[0]; -@@ -778,7 +1109,6 @@ main (int argc, char **argv) +@@ -782,7 +1113,6 @@ main (int argc, char **argv) switch (optc) { case 'b': @@ -498,7 +498,7 @@ /* Build the byte list. */ if (operating_mode != undefined_mode) FATAL_ERROR (_("only one type of list may be specified")); -@@ -786,6 +1116,14 @@ main (int argc, char **argv) +@@ -790,6 +1120,14 @@ main (int argc, char **argv) spec_list_string = optarg; break; @@ -513,7 +513,7 @@ case 'f': /* Build the field list. */ if (operating_mode != undefined_mode) -@@ -797,9 +1135,32 @@ main (int argc, char **argv) +@@ -801,9 +1139,32 @@ main (int argc, char **argv) case 'd': /* New delimiter. */ /* Interpret -d '' to mean `use the NUL byte as the delimiter.' */ @@ -549,7 +549,7 @@ delim_specified = true; break; -@@ -813,6 +1174,7 @@ main (int argc, char **argv) +@@ -817,6 +1178,7 @@ main (int argc, char **argv) break; case 'n': @@ -557,7 +557,7 @@ break; case 's': -@@ -835,7 +1197,7 @@ main (int argc, char **argv) +@@ -839,7 +1201,7 @@ main (int argc, char **argv) if (operating_mode == undefined_mode) FATAL_ERROR (_("you must specify a list of bytes, characters, or fields")); @@ -566,7 +566,7 @@ FATAL_ERROR (_("an input delimiter may be specified only\ when operating on fields")); -@@ -862,15 +1224,34 @@ main (int argc, char **argv) +@@ -866,15 +1228,34 @@ main (int argc, char **argv) } if (!delim_specified) @@ -607,8 +607,8 @@ } if (optind == argc) ---- coreutils-6.11/src/expand.c -+++ coreutils-6.11/src/expand.c +--- coreutils-6.12/src/expand.c ++++ coreutils-6.12/src/expand.c @@ -37,11 +37,31 @@ #include #include @@ -837,8 +837,8 @@ if (have_read_stdin && fclose (stdin) != 0) error (EXIT_FAILURE, errno, "-"); ---- coreutils-6.11/src/fold.c -+++ coreutils-6.11/src/fold.c +--- coreutils-6.12/src/fold.c ++++ coreutils-6.12/src/fold.c @@ -22,6 +22,19 @@ #include #include @@ -886,7 +886,7 @@ /* The official name of this program (e.g., no `g' prefix). */ #define PROGRAM_NAME "fold" - #define AUTHORS "David MacKenzie" + #define AUTHORS proper_name ("David MacKenzie") +#define FATAL_ERROR(Message) \ + do \ @@ -1254,8 +1254,8 @@ break; case 's': /* Break at word boundaries. */ ---- coreutils-6.11/src/join.c -+++ coreutils-6.11/src/join.c +--- coreutils-6.12/src/join.c ++++ coreutils-6.12/src/join.c @@ -22,6 +22,16 @@ #include #include @@ -1694,8 +1694,8 @@ } break; ---- coreutils-6.11/src/pr.c -+++ coreutils-6.11/src/pr.c +--- coreutils-6.12/src/pr.c ++++ coreutils-6.12/src/pr.c @@ -312,6 +312,32 @@ #include @@ -1748,7 +1748,7 @@ /* The official name of this program (e.g., no `g' prefix). */ #define PROGRAM_NAME "pr" -@@ -413,8 +451,21 @@ struct COLUMN +@@ -415,8 +453,21 @@ struct COLUMN typedef struct COLUMN COLUMN; #define NULLCOL (COLUMN *)0 @@ -1771,7 +1771,7 @@ static bool read_line (COLUMN *p); static bool print_page (void); static bool print_stored (COLUMN *p); -@@ -424,6 +475,7 @@ static void print_header (void); +@@ -426,6 +477,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, @@ -1779,7 +1779,7 @@ int *number); void usage (int status); static void print_files (int number_of_files, char **av); -@@ -438,7 +490,6 @@ static void store_char (char c); +@@ -440,7 +492,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); @@ -1787,7 +1787,7 @@ static void cleanup (void); static void print_sep_string (void); static void separator_string (const char *optarg_S); -@@ -453,7 +504,7 @@ static COLUMN *column_vector; +@@ -455,7 +506,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]. */ @@ -1796,7 +1796,7 @@ /* Index of the position in buff where the next character will be stored. */ -@@ -557,7 +608,7 @@ static int chars_per_column; +@@ -559,7 +610,7 @@ static int chars_per_column; static bool untabify_input = false; /* (-e) The input tab character. */ @@ -1805,7 +1805,7 @@ /* (-e) Tabstops are at chars_per_tab, 2*chars_per_tab, 3*chars_per_tab, ... where the leftmost column is 1. */ -@@ -567,7 +618,10 @@ static int chars_per_input_tab = 8; +@@ -569,7 +620,10 @@ static int chars_per_input_tab = 8; static bool tabify_output = false; /* (-i) The output tab character. */ @@ -1817,7 +1817,7 @@ /* (-i) The width of the output tab. */ static int chars_per_output_tab = 8; -@@ -641,7 +695,13 @@ static int power_10; +@@ -643,7 +697,13 @@ static int power_10; static bool numbered_lines = false; /* (-n) Character which follows each line number. */ @@ -1832,7 +1832,7 @@ /* (-n) line counting starts with 1st line of input file (not with 1st line of 1st page printed). */ -@@ -694,6 +754,7 @@ static bool use_col_separator = false; +@@ -696,6 +756,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; @@ -1840,7 +1840,7 @@ static char *column_separator = " "; static char *line_separator = "\t"; -@@ -850,6 +911,13 @@ separator_string (const char *optarg_S) +@@ -852,6 +913,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); @@ -1854,7 +1854,7 @@ } int -@@ -874,6 +942,21 @@ main (int argc, char **argv) +@@ -876,6 +944,21 @@ main (int argc, char **argv) atexit (close_stdout); @@ -1876,7 +1876,7 @@ n_files = 0; file_names = (argc > 1 ? xmalloc ((argc - 1) * sizeof (char *)) -@@ -950,8 +1033,12 @@ main (int argc, char **argv) +@@ -952,8 +1035,12 @@ main (int argc, char **argv) break; case 'e': if (optarg) @@ -1891,7 +1891,7 @@ /* Could check tab width > 0. */ untabify_input = true; break; -@@ -964,8 +1051,12 @@ main (int argc, char **argv) +@@ -966,8 +1053,12 @@ main (int argc, char **argv) break; case 'i': if (optarg) @@ -1906,7 +1906,7 @@ /* Could check tab width > 0. */ tabify_output = true; break; -@@ -992,8 +1083,8 @@ main (int argc, char **argv) +@@ -994,8 +1085,8 @@ main (int argc, char **argv) case 'n': numbered_lines = true; if (optarg) @@ -1917,7 +1917,7 @@ break; case 'N': skip_count = false; -@@ -1032,7 +1123,7 @@ main (int argc, char **argv) +@@ -1034,7 +1125,7 @@ main (int argc, char **argv) old_s = false; /* Reset an additional input of -s, -S dominates -s */ col_sep_string = ""; @@ -1926,7 +1926,7 @@ use_col_separator = true; if (optarg) separator_string (optarg); -@@ -1189,10 +1280,45 @@ main (int argc, char **argv) +@@ -1191,10 +1282,45 @@ main (int argc, char **argv) a number. */ static void @@ -1974,7 +1974,7 @@ if (*arg) { long int tmp_long; -@@ -1251,7 +1377,7 @@ init_parameters (int number_of_files) +@@ -1253,7 +1379,7 @@ init_parameters (int number_of_files) else col_sep_string = column_separator; @@ -1983,7 +1983,7 @@ use_col_separator = true; } /* It's rather pointless to define a TAB separator with column -@@ -1282,11 +1408,11 @@ init_parameters (int number_of_files) +@@ -1284,11 +1410,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. */ @@ -1997,7 +1997,7 @@ /* The number is part of the column width unless we are printing files in parallel. */ -@@ -1301,7 +1427,7 @@ init_parameters (int number_of_files) +@@ -1303,7 +1429,7 @@ init_parameters (int number_of_files) } chars_per_column = (chars_per_line - chars_used_by_number - @@ -2006,7 +2006,7 @@ if (chars_per_column < 1) error (EXIT_FAILURE, 0, _("page width too narrow")); -@@ -1426,7 +1552,7 @@ init_funcs (void) +@@ -1428,7 +1554,7 @@ init_funcs (void) /* Enlarge p->start_position of first column to use the same form of padding_not_printed with all columns. */ @@ -2015,7 +2015,7 @@ /* This loop takes care of all but the rightmost column. */ -@@ -1460,7 +1586,7 @@ init_funcs (void) +@@ -1462,7 +1588,7 @@ init_funcs (void) } else { @@ -2024,7 +2024,7 @@ h_next = h + chars_per_column; } } -@@ -1750,9 +1876,9 @@ static void +@@ -1752,9 +1878,9 @@ static void align_column (COLUMN *p) { padding_not_printed = p->start_position; @@ -2036,7 +2036,7 @@ padding_not_printed = ANYWHERE; } -@@ -2023,13 +2149,13 @@ store_char (char c) +@@ -2025,13 +2151,13 @@ store_char (char c) /* May be too generous. */ buff = X2REALLOC (buff, &buff_allocated); } @@ -2052,7 +2052,7 @@ char *s; int left_cut; -@@ -2052,22 +2178,24 @@ add_line_number (COLUMN *p) +@@ -2054,22 +2180,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. */ @@ -2081,7 +2081,7 @@ output_position = POS_AFTER_TAB (chars_per_output_tab, output_position); } -@@ -2228,7 +2356,7 @@ print_white_space (void) +@@ -2230,7 +2358,7 @@ print_white_space (void) while (goal - h_old > 1 && (h_new = POS_AFTER_TAB (chars_per_output_tab, h_old)) <= goal) { @@ -2090,7 +2090,7 @@ h_old = h_new; } while (++h_old <= goal) -@@ -2248,6 +2376,7 @@ print_sep_string (void) +@@ -2250,6 +2378,7 @@ print_sep_string (void) { char *s; int l = col_sep_length; @@ -2098,7 +2098,7 @@ s = col_sep_string; -@@ -2261,6 +2390,7 @@ print_sep_string (void) +@@ -2263,6 +2392,7 @@ print_sep_string (void) { for (; separators_not_printed > 0; --separators_not_printed) { @@ -2106,7 +2106,7 @@ while (l-- > 0) { /* 3 types of sep_strings: spaces only, spaces and chars, -@@ -2274,12 +2404,15 @@ print_sep_string (void) +@@ -2276,12 +2406,15 @@ print_sep_string (void) } else { @@ -2123,7 +2123,7 @@ /* sep_string ends with some spaces */ if (spaces_not_printed > 0) print_white_space (); -@@ -2306,8 +2439,9 @@ print_clump (COLUMN *p, int n, char *clu +@@ -2308,8 +2441,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. */ @@ -2134,7 +2134,7 @@ { if (tabify_output) { -@@ -2331,6 +2465,75 @@ print_char (char c) +@@ -2333,6 +2467,75 @@ print_char (char c) putchar (c); } @@ -2210,7 +2210,7 @@ /* Skip to page PAGE before printing. PAGE may be larger than total number of pages. */ -@@ -2508,9 +2711,9 @@ read_line (COLUMN *p) +@@ -2510,9 +2713,9 @@ read_line (COLUMN *p) align_empty_cols = false; } @@ -2222,7 +2222,7 @@ padding_not_printed = ANYWHERE; } -@@ -2611,9 +2814,9 @@ print_stored (COLUMN *p) +@@ -2613,9 +2816,9 @@ print_stored (COLUMN *p) } } @@ -2234,7 +2234,7 @@ padding_not_printed = ANYWHERE; } -@@ -2626,8 +2829,8 @@ print_stored (COLUMN *p) +@@ -2628,8 +2831,8 @@ print_stored (COLUMN *p) if (spaces_not_printed == 0) { output_position = p->start_position + end_vector[line]; @@ -2245,7 +2245,7 @@ } return true; -@@ -2645,8 +2848,9 @@ print_stored (COLUMN *p) +@@ -2647,8 +2850,9 @@ print_stored (COLUMN *p) characters in clump_buff. (e.g, the width of '\b' is -1, while the number of characters is 1.) */ @@ -2256,7 +2256,7 @@ { unsigned char uc = c; char *s = clump_buff; -@@ -2656,10 +2860,10 @@ char_to_clump (char c) +@@ -2658,10 +2862,10 @@ char_to_clump (char c) int chars; int chars_per_c = 8; @@ -2269,7 +2269,7 @@ { width = TAB_WIDTH (chars_per_c, input_position); -@@ -2740,6 +2944,155 @@ char_to_clump (char c) +@@ -2742,6 +2946,155 @@ char_to_clump (char c) return chars; } @@ -2425,8 +2425,8 @@ /* 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.11/src/sort.c -+++ coreutils-6.11/src/sort.c +--- coreutils-6.12/src/sort.c ++++ coreutils-6.12/src/sort.c @@ -26,6 +26,19 @@ #include #include @@ -2465,7 +2465,7 @@ /* The official name of this program (e.g., no `g' prefix). */ #define PROGRAM_NAME "sort" -@@ -115,14 +139,38 @@ static int decimal_point; +@@ -117,14 +141,38 @@ static int decimal_point; /* Thousands separator; if -1, then there isn't one. */ static int thousands_sep; @@ -2505,7 +2505,7 @@ /* The kind of blanks for '-b' to skip in various options. */ enum blanktype { bl_start, bl_end, bl_both }; -@@ -260,13 +308,11 @@ static bool reverse; +@@ -262,13 +310,11 @@ static bool reverse; they were read if all keys compare equal. */ static bool stable; @@ -2523,7 +2523,7 @@ /* Flag to remove consecutive duplicate lines from the output. Only the last of a sequence of equal lines will be output. */ -@@ -653,6 +699,43 @@ reap_some (void) +@@ -655,6 +701,43 @@ reap_some (void) update_proc (pid); } @@ -2567,7 +2567,7 @@ /* Clean up any remaining temporary files. */ static void -@@ -992,7 +1075,7 @@ zaptemp (const char *name) +@@ -994,7 +1077,7 @@ zaptemp (const char *name) free (node); } @@ -2576,7 +2576,7 @@ static int struct_month_cmp (const void *m1, const void *m2) -@@ -1019,7 +1102,7 @@ inittables (void) +@@ -1021,7 +1104,7 @@ inittables (void) fold_toupper[i] = toupper (i); } @@ -2585,7 +2585,7 @@ /* If we're not in the "C" locale, read different names for months. */ if (hard_LC_TIME) { -@@ -1045,6 +1128,71 @@ inittables (void) +@@ -1047,6 +1130,71 @@ inittables (void) #endif } @@ -2657,7 +2657,7 @@ /* Specify the amount of main memory to use when sorting. */ static void specify_sort_size (int oi, char c, char const *s) -@@ -1255,7 +1403,7 @@ buffer_linelim (struct buffer const *buf +@@ -1257,7 +1405,7 @@ buffer_linelim (struct buffer const *buf by KEY in LINE. */ static char * @@ -2666,7 +2666,7 @@ { char *ptr = line->text, *lim = ptr + line->length - 1; size_t sword = key->sword; -@@ -1265,10 +1413,10 @@ begfield (const struct line *line, const +@@ -1267,10 +1415,10 @@ begfield (const struct line *line, const /* The leading field separator itself is included in a field when -t is absent. */ @@ -2679,7 +2679,7 @@ ++ptr; if (ptr < lim) ++ptr; -@@ -1296,11 +1444,70 @@ begfield (const struct line *line, const +@@ -1298,11 +1446,70 @@ begfield (const struct line *line, const return ptr; } @@ -2751,7 +2751,7 @@ { char *ptr = line->text, *lim = ptr + line->length - 1; size_t eword = key->eword, echar = key->echar; -@@ -1313,10 +1520,10 @@ limfield (const struct line *line, const +@@ -1315,10 +1522,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. */ @@ -2764,7 +2764,7 @@ ++ptr; if (ptr < lim && (eword | echar)) ++ptr; -@@ -1362,7 +1569,7 @@ limfield (const struct line *line, const +@@ -1364,7 +1571,7 @@ limfield (const struct line *line, const */ /* Make LIM point to the end of (one byte past) the current field. */ @@ -2773,7 +2773,7 @@ { char *newlim; newlim = memchr (ptr, tab, lim - ptr); -@@ -1398,6 +1605,107 @@ limfield (const struct line *line, const +@@ -1400,6 +1607,107 @@ limfield (const struct line *line, const return ptr; } @@ -2881,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 -@@ -1480,8 +1788,22 @@ fillbuf (struct buffer *buf, FILE *fp, c +@@ -1482,8 +1790,22 @@ fillbuf (struct buffer *buf, FILE *fp, c else { if (key->skipsblanks) @@ -2906,7 +2906,7 @@ line->keybeg = line_start; } } -@@ -1536,15 +1858,59 @@ general_numcompare (const char *sa, cons +@@ -1538,15 +1860,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. */ @@ -2973,7 +2973,7 @@ return 1; /* Sort numbers in the usual way, where -0 == +0. Put NaNs after -@@ -1562,7 +1928,7 @@ general_numcompare (const char *sa, cons +@@ -1564,7 +1930,7 @@ general_numcompare (const char *sa, cons Return 0 if the name in S is not recognized. */ static int @@ -2982,7 +2982,7 @@ { size_t lo = 0; size_t hi = MONTHS_PER_YEAR; -@@ -1717,11 +2083,79 @@ compare_random (char *restrict texta, si +@@ -1719,11 +2085,79 @@ compare_random (char *restrict texta, si return diff; } @@ -3063,7 +3063,7 @@ { struct keyfield const *key = keylist; -@@ -1888,12 +2322,189 @@ keycompare (const struct line *a, const +@@ -1890,12 +2324,189 @@ keycompare (const struct line *a, const return 0; @@ -3255,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. */ -@@ -2710,6 +3321,11 @@ set_ordering (const char *s, struct keyf +@@ -2712,6 +3323,11 @@ set_ordering (const char *s, struct keyf break; case 'M': key->month = true; @@ -3267,7 +3267,7 @@ break; case 'n': key->numeric = true; -@@ -2763,7 +3379,7 @@ main (int argc, char **argv) +@@ -2765,7 +3381,7 @@ main (int argc, char **argv) initialize_exit_failure (SORT_FAILURE); hard_LC_COLLATE = hard_locale (LC_COLLATE); @@ -3276,7 +3276,7 @@ hard_LC_TIME = hard_locale (LC_TIME); #endif -@@ -2776,14 +3392,40 @@ main (int argc, char **argv) +@@ -2778,14 +3394,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]) @@ -3319,7 +3319,7 @@ have_read_stdin = false; inittables (); -@@ -3035,13 +3677,32 @@ main (int argc, char **argv) +@@ -3037,13 +3679,32 @@ main (int argc, char **argv) case 't': { @@ -3356,7 +3356,7 @@ else { /* Provoke with `sort -txx'. Complain about -@@ -3052,9 +3713,12 @@ main (int argc, char **argv) +@@ -3054,9 +3715,12 @@ main (int argc, char **argv) quote (optarg)); } } @@ -3370,8 +3370,8 @@ } break; ---- coreutils-6.11/src/unexpand.c -+++ coreutils-6.11/src/unexpand.c +--- coreutils-6.12/src/unexpand.c ++++ coreutils-6.12/src/unexpand.c @@ -38,11 +38,34 @@ #include #include @@ -3659,8 +3659,8 @@ if (have_read_stdin && fclose (stdin) != 0) error (EXIT_FAILURE, errno, "-"); ---- coreutils-6.11/src/uniq.c -+++ coreutils-6.11/src/uniq.c +--- coreutils-6.12/src/uniq.c ++++ coreutils-6.12/src/uniq.c @@ -22,6 +22,16 @@ #include #include @@ -3692,7 +3692,7 @@ /* The official name of this program (e.g., no `g' prefix). */ #define PROGRAM_NAME "uniq" -@@ -108,6 +125,12 @@ static enum delimit_method const delimit +@@ -110,6 +127,12 @@ static enum delimit_method const delimit /* Select whether/how to delimit groups of duplicate lines. */ static enum delimit_method delimit_groups; @@ -3705,7 +3705,7 @@ static struct option const longopts[] = { {"count", no_argument, NULL, 'c'}, -@@ -204,7 +227,7 @@ size_opt (char const *opt, char const *m +@@ -206,7 +229,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 * @@ -3714,7 +3714,7 @@ { size_t count; char *lp = line->buffer; -@@ -225,6 +248,83 @@ find_field (const struct linebuffer *lin +@@ -227,6 +250,83 @@ find_field (const struct linebuffer *lin return lp + i; } @@ -3798,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. -@@ -249,6 +349,73 @@ different (char *old, char *new, size_t +@@ -251,6 +351,73 @@ different (char *old, char *new, size_t return oldlen != newlen || memcmp (old, new, oldlen); } @@ -3872,7 +3872,7 @@ /* 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. -@@ -301,15 +468,42 @@ check_file (const char *infile, const ch +@@ -303,15 +470,42 @@ check_file (const char *infile, const ch { char *prevfield IF_LINT (= NULL); size_t prevlen IF_LINT (= 0); @@ -3915,7 +3915,7 @@ if (prevline->length == 0 || different (thisfield, prevfield, thislen, prevlen)) { -@@ -328,17 +522,26 @@ check_file (const char *infile, const ch +@@ -330,17 +524,26 @@ check_file (const char *infile, const ch size_t prevlen; uintmax_t match_count = 0; bool first_delimiter = true; @@ -3942,7 +3942,7 @@ if (readlinebuffer_delim (thisline, stdin, delimiter) == 0) { if (ferror (stdin)) -@@ -347,6 +550,15 @@ check_file (const char *infile, const ch +@@ -349,6 +552,15 @@ check_file (const char *infile, const ch } thisfield = find_field (thisline); thislen = thisline->length - 1 - (thisfield - thisline->buffer); @@ -3958,7 +3958,7 @@ match = !different (thisfield, prevfield, thislen, prevlen); match_count += match; -@@ -379,6 +591,9 @@ check_file (const char *infile, const ch +@@ -381,6 +593,9 @@ check_file (const char *infile, const ch SWAP_LINES (prevline, thisline); prevfield = thisfield; prevlen = thislen; @@ -3968,7 +3968,7 @@ if (!match) match_count = 0; } -@@ -424,6 +639,18 @@ main (int argc, char **argv) +@@ -426,6 +641,18 @@ main (int argc, char **argv) atexit (close_stdout); @@ -3987,3 +3987,14 @@ skip_chars = 0; skip_fields = 0; check_chars = SIZE_MAX; +--- coreutils-6.12/tests/misc/cut ++++ coreutils-6.12/tests/misc/cut +@@ -26,7 +26,7 @@ use strict; + 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 = diff --git a/coreutils-6.11.tar.gz b/coreutils-6.11.tar.gz deleted file mode 100644 index 721b1a3..0000000 --- a/coreutils-6.11.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:eb9976291aad92dd586c9ac41669024de065772cc2f2608200d50643ea3a8bce -size 9095150 diff --git a/coreutils-6.11.diff b/coreutils-6.12.diff similarity index 90% rename from coreutils-6.11.diff rename to coreutils-6.12.diff index e5ee583..90fa14e 100644 --- a/coreutils-6.11.diff +++ b/coreutils-6.12.diff @@ -1,6 +1,6 @@ --- doc/coreutils.texi +++ doc/coreutils.texi -@@ -65,8 +65,6 @@ +@@ -67,8 +67,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. @@ -9,7 +9,7 @@ * 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. -@@ -400,8 +398,6 @@ System context +@@ -402,8 +400,6 @@ System context * arch invocation:: Print machine hardware name * date invocation:: Print or set system date and time * uname invocation:: Print system information @@ -18,7 +18,7 @@ @command{date}: Print or set system date and time -@@ -12515,8 +12511,6 @@ information. +@@ -12523,8 +12519,6 @@ information. * arch invocation:: Print machine hardware name. * date invocation:: Print or set system date and time. * uname invocation:: Print system information. @@ -27,7 +27,7 @@ @end menu -@@ -13296,55 +13290,6 @@ Print the kernel version. +@@ -13304,55 +13298,6 @@ Print the kernel version. @exitstatus @@ -112,14 +112,14 @@ } --- m4/gnulib-comp.m4 +++ m4/gnulib-comp.m4 -@@ -248,7 +248,6 @@ AC_DEFUN([gl_INIT], +@@ -260,7 +260,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 + m4_ifdef([AM_XGETTEXT_OPTION], + [AM_XGETTEXT_OPTION([--keyword='proper_name:1,\"This is a proper name. See the gettext manual, section Names.\"']) + AM_XGETTEXT_OPTION([--keyword='proper_name_utf8:1,\"This is a proper name. See the gettext manual, section Names.\"'])]) --- man/Makefile.am +++ man/Makefile.am @@ -179,7 +179,7 @@ check-x-vs-1: @@ -144,7 +144,7 @@ /* Extract or fake data from a `struct stat'. --- tests/misc/help-version +++ tests/misc/help-version -@@ -180,6 +180,7 @@ lbracket_args=": ]" +@@ -178,6 +178,7 @@ lbracket_args=": ]" for i in $built_programs; do # Skip these. case $i in chroot|stty|tty|false|chcon|runcon) continue;; esac diff --git a/coreutils-6.12.tar.gz b/coreutils-6.12.tar.gz new file mode 100644 index 0000000..93727cc --- /dev/null +++ b/coreutils-6.12.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:49d2f703e2310e6328cb6f9d9bae3612c42b3ee5175f449692c5b95e453cf18a +size 9001890 diff --git a/coreutils.changes b/coreutils.changes index f237997..9a4153a 100644 --- a/coreutils.changes +++ b/coreutils.changes @@ -1,3 +1,27 @@ +------------------------------------------------------------------- +Wed Jun 4 14:10:05 CEST 2008 - schwab@suse.de + +- Update to coreutils 6.12. + ** Bug fixes + chcon, runcon: --help output now includes the bug-reporting address + cp -p copies permissions more portably. For example, on MacOS X 10.5, + "cp -p some-fifo some-file" no longer fails while trying to copy the + permissions from the some-fifo argument. + id with no options now prints the SELinux context only when invoked + with no USERNAME argument. + id and groups once again print the AFS-specific nameless group-ID (PAG). + Printing of such large-numbered, kernel-only (not in /etc/group) group-IDs + was suppressed in 6.11 due to ignorance that they are useful. + uniq: avoid subtle field-skipping malfunction due to isblank misuse. + In some locales on some systems, isblank(240) (aka  ) is nonzero. + On such systems, uniq --skip-fields=N would fail to skip the proper + number of fields for some inputs. + tac: avoid segfault with --regex (-r) and multiple files, e.g., + "echo > x; tac -r x x". [bug present at least in textutils-1.8b, from 1992] + ** Changes in behavior + install once again sets SELinux context, when possible + [it was deliberately disabled in 6.9.90] + ------------------------------------------------------------------- Sun Apr 20 00:19:07 CEST 2008 - schwab@suse.de diff --git a/coreutils.spec b/coreutils.spec index db9da99..ecaa0a9 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -1,5 +1,5 @@ # -# spec file for package coreutils (Version 6.11) +# spec file for package coreutils (Version 6.12) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -16,7 +16,7 @@ BuildRequires: help2man libacl-devel pam-devel Url: http://www.gnu.org/software/coreutils/ License: GNU Free Documentation License, Version 1.2 (GFDL 1.2); GPL v2 or later; GPL v3 or later Group: System/Base -Version: 6.11 +Version: 6.12 Release: 1 Provides: fileutils sh-utils stat textutils mktemp Obsoletes: fileutils sh-utils stat textutils mktemp @@ -41,6 +41,7 @@ Patch20: coreutils-6.8-su.diff Patch21: coreutils-6.8.0-pie.diff Patch22: coreutils-5.3.0-sbin4su.diff Patch23: coreutils-getaddrinfo.diff +Patch24: utimens.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -110,6 +111,7 @@ Authors: %patch21 %patch22 %patch23 -p1 +%patch24 -p1 %build AUTOPOINT=true autoreconf -fi @@ -178,6 +180,27 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root) %changelog +* Wed Jun 04 2008 schwab@suse.de +- Update to coreutils 6.12. + ** Bug fixes + chcon, runcon: --help output now includes the bug-reporting address + cp -p copies permissions more portably. For example, on MacOS X 10.5, + "cp -p some-fifo some-file" no longer fails while trying to copy the + permissions from the some-fifo argument. + id with no options now prints the SELinux context only when invoked + with no USERNAME argument. + id and groups once again print the AFS-specific nameless group-ID (PAG). + Printing of such large-numbered, kernel-only (not in /etc/group) group-IDs + was suppressed in 6.11 due to ignorance that they are useful. + uniq: avoid subtle field-skipping malfunction due to isblank misuse. + In some locales on some systems, isblank(240) (aka  ) is nonzero. + On such systems, uniq --skip-fields=N would fail to skip the proper + number of fields for some inputs. + tac: avoid segfault with --regex (-r) and multiple files, e.g., + "echo > x; tac -r x x". [bug present at least in textutils-1.8b, from 1992] + ** Changes in behavior + install once again sets SELinux context, when possible + [it was deliberately disabled in 6.9.90] * Sun Apr 20 2008 schwab@suse.de - Update to coreutils 6.11. ** Bug fixes diff --git a/utimens.diff b/utimens.diff new file mode 100644 index 0000000..6067662 --- /dev/null +++ b/utimens.diff @@ -0,0 +1,112 @@ +2008-06-02 Eric Blake + + Provide fallback for older kernels. + * lib/utimens.c (gl_futimens) [HAVE_UTIMENSAT, HAVE_FUTIMENS]: + Provide runtime fallback if kernel lacks support. + Reported by Mike Frysinger. + +diff --git a/lib/utimens.c b/lib/utimens.c +index 25bc965..134310b 100644 +--- a/lib/utimens.c ++++ b/lib/utimens.c +@@ -96,20 +96,30 @@ gl_futimens (int fd ATTRIBUTE_UNUSED, + #endif + + /* POSIX 200x added two interfaces to set file timestamps with +- nanosecond resolution. */ ++ nanosecond resolution. We provide a fallback for ENOSYS (for ++ example, compiling against Linux 2.6.25 kernel headers and glibc ++ 2.7, but running on Linux 2.6.18 kernel). */ + #if HAVE_UTIMENSAT + if (fd < 0) +- return utimensat (AT_FDCWD, file, timespec, 0); ++ { ++ int result = utimensat (AT_FDCWD, file, timespec, 0); ++ if (result == 0 || errno != ENOSYS) ++ return result; ++ } + #endif + #if HAVE_FUTIMENS +- return futimens (fd, timespec); +-#else ++ { ++ int result = futimens (fd, timespec); ++ if (result == 0 || errno != ENOSYS) ++ return result; ++ } ++#endif + + /* The platform lacks an interface to set file timestamps with + nanosecond resolution, so do the best we can, discarding any + fractional part of the timestamp. */ + { +-# if HAVE_FUTIMESAT || HAVE_WORKING_UTIMES ++#if HAVE_FUTIMESAT || HAVE_WORKING_UTIMES + struct timeval timeval[2]; + struct timeval const *t; + if (timespec) +@@ -125,9 +135,9 @@ gl_futimens (int fd ATTRIBUTE_UNUSED, + + if (fd < 0) + { +-# if HAVE_FUTIMESAT ++# if HAVE_FUTIMESAT + return futimesat (AT_FDCWD, file, t); +-# endif ++# endif + } + else + { +@@ -141,21 +151,21 @@ gl_futimens (int fd ATTRIBUTE_UNUSED, + worth optimizing, and who knows what other messed-up systems + are out there? So play it safe and fall back on the code + below. */ +-# if HAVE_FUTIMESAT ++# if HAVE_FUTIMESAT + if (futimesat (fd, NULL, t) == 0) + return 0; +-# elif HAVE_FUTIMES ++# elif HAVE_FUTIMES + if (futimes (fd, t) == 0) + return 0; +-# endif ++# endif + } +-# endif /* HAVE_FUTIMESAT || HAVE_WORKING_UTIMES */ ++#endif /* HAVE_FUTIMESAT || HAVE_WORKING_UTIMES */ + + if (!file) + { +-# if ! (HAVE_FUTIMESAT || (HAVE_WORKING_UTIMES && HAVE_FUTIMES)) ++#if ! (HAVE_FUTIMESAT || (HAVE_WORKING_UTIMES && HAVE_FUTIMES)) + errno = ENOSYS; +-# endif ++#endif + + /* Prefer EBADF to ENOSYS if both error numbers apply. */ + if (errno == ENOSYS) +@@ -170,9 +180,9 @@ gl_futimens (int fd ATTRIBUTE_UNUSED, + return -1; + } + +-# if HAVE_WORKING_UTIMES ++#if HAVE_WORKING_UTIMES + return utimes (file, t); +-# else ++#else + { + struct utimbuf utimbuf; + struct utimbuf const *ut; +@@ -187,9 +197,8 @@ gl_futimens (int fd ATTRIBUTE_UNUSED, + + return utime (file, ut); + } +-# endif /* !HAVE_WORKING_UTIMES */ ++#endif /* !HAVE_WORKING_UTIMES */ + } +-#endif /* !HAVE_FUTIMENS */ + } + + /* Set the access and modification time stamps of FILE to be +-- +1.5.5.1