new upstream release 8.5

This commit is contained in:
Ondrej Vasik 2010-04-26 13:15:37 +00:00
parent a5bbdc735f
commit 12996d09a1
7 changed files with 121 additions and 237 deletions

View File

@ -1 +1 @@
coreutils-8.4.tar.xz
coreutils-8.5.tar.xz

View File

@ -380,11 +380,11 @@ diff -urNp coreutils-8.1-orig/tests/misc/help-version coreutils-8.1/tests/misc/h
expected_failure_status_tty=3
expected_failure_status_sort=2
@@ -153,6 +154,7 @@ seq_args=10
sleep_args=0
su_args=--version
stdbuf_args="-oL true"
+runuser_args=--version
timeout_args=--version
sleep_setup () { args=0; }
su_setup () { args=--version; }
stdbuf_setup () { args="-oL true"; }
+runuser_setup () { args=--version; }
timeout_setup () { args=--version; }
# I'd rather not run sync, since it spins up disks that I've
diff -urNp coreutils-8.1-orig/tests/misc/invalid-opt coreutils-8.1/tests/misc/invalid-opt

View File

@ -83,33 +83,11 @@ diff -urNp coreutils-8.4-orig/tests/touch/no-dereference coreutils-8.4/tests/tou
--- coreutils-8.4-orig/tests/touch/no-dereference 2010-01-12 15:36:17.000000000 +0100
+++ coreutils-8.4/tests/touch/no-dereference 2010-01-14 10:28:17.000000000 +0100
@@ -46,6 +46,8 @@ test -f nowhere && fail=1
grep '^#define HAVE_UTIMENSAT' "$CONFIG_HEADER" > /dev/null ||
grep '^#define HAVE_LUTIMES' "$CONFIG_HEADER" > /dev/null ||
grep '^#define HAVE_UTIMENSAT 1' "$CONFIG_HEADER" > /dev/null ||
grep '^#define HAVE_LUTIMES 1' "$CONFIG_HEADER" > /dev/null ||
skip_test_ 'this system lacks the utimensat function'
+grep '^#define HAVE_WORKINGKOJI' "$CONFIG_HEADER" > /dev/null ||
+grep '^#define HAVE_WORKINGKOJI 1' "$CONFIG_HEADER" > /dev/null ||
+ skip_test_ 'rest of the test disabled due to koji lack of utimensat function'
# Changing time of dangling symlink is okay.
# Skip the test if this fails, but the error text corresponds to
diff -urNp coreutils-8.4-orig/tests/cp/cp-a-selinux coreutils-8.4/tests/cp/cp-a-selinux
--- coreutils-8.4-orig/tests/cp/cp-a-selinux 2010-01-03 18:06:20.000000000 +0100
+++ coreutils-8.4/tests/cp/cp-a-selinux 2010-01-29 09:39:43.000000000 +0100
@@ -48,12 +48,15 @@ ls -Z f | grep $ctx || fail=1
# Create a file system, then mount it with the context=... option.
dd if=/dev/zero of=blob bs=8192 count=200 > /dev/null 2>&1 \
- || framework_failure
-mkdir mnt || framework_failure
+ || skip=1
+mkdir mnt || skip=1
mkfs -t ext2 -F blob ||
skip_test_ "failed to create an ext2 file system"
-mount -oloop,context=$ctx blob mnt || framework_failure
+mount -oloop,context=$ctx blob mnt || skip=1
+test $skip = 1 \
+ && skip_test_ "insufficient mount/ext2 support"
+
cd mnt || framework_failure
echo > f || framework_failure

View File

@ -1,98 +0,0 @@
From aad0bde0b5aa6ccf2714f43676d4941f820c6283 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Fri, 22 Jan 2010 15:17:19 +0100
Subject: [PATCH] who --mesg (-T) can use a more accurate test for TTY writability
Enabled when coreutils is configured with --with-tty-group.
Based on a patch written by Piotr Gackiewicz. Details at
http://bugzilla.redhat.com/454261
* src/who.c (is_tty_writable): A new function returning true if a TTY
device is writable by the group. Additionally it checks the group to be
the same as TTY_GROUP_NAME when compiled with --with-tty-group.
* m4/jm-macros.m4: Introduce a new configure option --with-tty-group.
---
m4/jm-macros.m4 | 19 +++++++++++++++++++
src/who.c | 22 +++++++++++++++++++++-
2 files changed, 40 insertions(+), 1 deletions(-)
diff --git a/m4/jm-macros.m4 b/m4/jm-macros.m4
index 2713827..0ddbf2f 100644
--- a/m4/jm-macros.m4
+++ b/m4/jm-macros.m4
@@ -144,6 +144,25 @@ AC_DEFUN([coreutils_MACROS],
])
AC_REQUIRE([AM_LANGINFO_CODESET])
+
+ # Accept configure options: --with-tty-group[=GROUP], --without-tty-group
+ # You can determine the group of a TTY via 'stat --format %G /dev/tty'
+ # Omitting this option is equivalent to using --without-tty-group.
+ AC_ARG_WITH([tty-group],
+ AS_HELP_STRING([--with-tty-group[[[=NAME]]]],
+ [group used by system for TTYs, "tty" when not specified]
+ [ (default: do not rely on any group used for TTYs)]),
+ [tty_group_name=$withval],
+ [tty_group_name=no])
+
+ if test "x$tty_group_name" != xno; then
+ if test "x$tty_group_name" = xyes; then
+ tty_group_name=tty
+ fi
+ AC_MSG_NOTICE([TTY group used by system set to "$tty_group_name"])
+ AC_DEFINE_UNQUOTED([TTY_GROUP_NAME], ["$tty_group_name"],
+ [group used by system for TTYs])
+ fi
])
AC_DEFUN([gl_CHECK_ALL_HEADERS],
diff --git a/src/who.c b/src/who.c
index f71db3b..4859694 100644
--- a/src/who.c
+++ b/src/who.c
@@ -37,6 +37,10 @@
#include "hard-locale.h"
#include "quote.h"
+#ifdef TTY_GROUP_NAME
+# include <grp.h>
+#endif
+
/* The official name of this program (e.g., no `g' prefix). */
#define PROGRAM_NAME "who"
@@ -308,6 +312,22 @@ print_line (int userlen, const char *user, const char state,
free (x_exitstr);
}
+/* Return true if a terminal device given as PSTAT allows other users
+ to send messages to; false otherwise */
+static bool
+is_tty_writable (struct stat const *pstat)
+{
+#ifdef TTY_GROUP_NAME
+ /* Ensure the group of the TTY device matches TTY_GROUP_NAME, more info at
+ https://bugzilla.redhat.com/454261 */
+ struct group *ttygr = getgrnam (TTY_GROUP_NAME);
+ if (!ttygr || (pstat->st_gid != ttygr->gr_gid))
+ return false;
+#endif
+
+ return pstat->st_mode & S_IWGRP;
+}
+
/* Send properly parsed USER_PROCESS info to print_line. The most
recent boot time is BOOTTIME. */
static void
@@ -346,7 +366,7 @@ print_user (const STRUCT_UTMP *utmp_ent, time_t boottime)
if (stat (line, &stats) == 0)
{
- mesg = (stats.st_mode & S_IWGRP) ? '+' : '-';
+ mesg = is_tty_writable (&stats) ? '+' : '-';
last_change = stats.st_atime;
}
else
--
1.6.5

View File

@ -1,6 +1,6 @@
diff -urNp coreutils-8.0-orig/lib/linebuffer.h coreutils-8.0/lib/linebuffer.h
--- coreutils-8.0-orig/lib/linebuffer.h 2009-10-06 10:59:48.000000000 +0200
+++ coreutils-8.0/lib/linebuffer.h 2009-10-07 10:07:16.000000000 +0200
diff -urNp coreutils-8.5-orig/lib/linebuffer.h coreutils-8.5/lib/linebuffer.h
--- coreutils-8.5-orig/lib/linebuffer.h 2010-04-23 15:44:00.000000000 +0200
+++ coreutils-8.5/lib/linebuffer.h 2010-04-26 14:24:33.000000000 +0200
@@ -21,6 +21,11 @@
# include <stdio.h>
@ -23,9 +23,9 @@ diff -urNp coreutils-8.0-orig/lib/linebuffer.h coreutils-8.0/lib/linebuffer.h
};
/* Initialize linebuffer LINEBUFFER for use. */
diff -urNp coreutils-8.0-orig/src/cut.c coreutils-8.0/src/cut.c
--- coreutils-8.0-orig/src/cut.c 2009-09-23 10:25:44.000000000 +0200
+++ coreutils-8.0/src/cut.c 2009-10-07 10:07:16.000000000 +0200
diff -urNp coreutils-8.5-orig/src/cut.c coreutils-8.5/src/cut.c
--- coreutils-8.5-orig/src/cut.c 2010-04-20 21:52:04.000000000 +0200
+++ coreutils-8.5/src/cut.c 2010-04-26 14:24:33.000000000 +0200
@@ -28,6 +28,11 @@
#include <assert.h>
#include <getopt.h>
@ -489,7 +489,7 @@ diff -urNp coreutils-8.0-orig/src/cut.c coreutils-8.0/src/cut.c
@@ -757,6 +1075,8 @@ main (int argc, char **argv)
bool ok;
bool delim_specified = false;
char *spec_list_string IF_LINT(= NULL);
char *spec_list_string IF_LINT (= NULL);
+ char mbdelim[MB_LEN_MAX + 1];
+ size_t delimlen = 0;
@ -616,10 +616,10 @@ diff -urNp coreutils-8.0-orig/src/cut.c coreutils-8.0/src/cut.c
}
if (optind == argc)
diff -urNp coreutils-8.0-orig/src/expand.c coreutils-8.0/src/expand.c
--- coreutils-8.0-orig/src/expand.c 2009-09-29 15:27:54.000000000 +0200
+++ coreutils-8.0/src/expand.c 2009-10-07 10:07:16.000000000 +0200
@@ -37,11 +37,28 @@
diff -urNp coreutils-8.5-orig/src/expand.c coreutils-8.5/src/expand.c
--- coreutils-8.5-orig/src/expand.c 2010-01-01 14:06:47.000000000 +0100
+++ coreutils-8.5/src/expand.c 2010-04-26 14:24:33.000000000 +0200
@@ -38,11 +38,28 @@
#include <stdio.h>
#include <getopt.h>
#include <sys/types.h>
@ -648,7 +648,7 @@ diff -urNp coreutils-8.0-orig/src/expand.c coreutils-8.0/src/expand.c
/* The official name of this program (e.g., no `g' prefix). */
#define PROGRAM_NAME "expand"
@@ -357,6 +374,142 @@ expand (void)
@@ -358,6 +375,142 @@ expand (void)
}
}
@ -791,7 +791,7 @@ diff -urNp coreutils-8.0-orig/src/expand.c coreutils-8.0/src/expand.c
int
main (int argc, char **argv)
{
@@ -421,7 +574,12 @@ main (int argc, char **argv)
@@ -422,7 +575,12 @@ main (int argc, char **argv)
file_list = (optind < argc ? &argv[optind] : stdin_argv);
@ -805,9 +805,9 @@ diff -urNp coreutils-8.0-orig/src/expand.c coreutils-8.0/src/expand.c
if (have_read_stdin && fclose (stdin) != 0)
error (EXIT_FAILURE, errno, "-");
diff -urNp coreutils-8.0-orig/src/fold.c coreutils-8.0/src/fold.c
--- coreutils-8.0-orig/src/fold.c 2009-09-23 10:25:44.000000000 +0200
+++ coreutils-8.0/src/fold.c 2009-10-07 10:07:16.000000000 +0200
diff -urNp coreutils-8.5-orig/src/fold.c coreutils-8.5/src/fold.c
--- coreutils-8.5-orig/src/fold.c 2010-01-01 14:06:47.000000000 +0100
+++ coreutils-8.5/src/fold.c 2010-04-26 14:24:33.000000000 +0200
@@ -22,11 +22,33 @@
#include <getopt.h>
#include <sys/types.h>
@ -1205,9 +1205,9 @@ diff -urNp coreutils-8.0-orig/src/fold.c coreutils-8.0/src/fold.c
break;
case 's': /* Break at word boundaries. */
diff -urNp coreutils-8.0-orig/src/join.c coreutils-8.0/src/join.c
--- coreutils-8.0-orig/src/join.c 2009-09-23 10:25:44.000000000 +0200
+++ coreutils-8.0/src/join.c 2009-10-07 10:07:16.000000000 +0200
diff -urNp coreutils-8.5-orig/src/join.c coreutils-8.5/src/join.c
--- coreutils-8.5-orig/src/join.c 2010-04-20 21:52:04.000000000 +0200
+++ coreutils-8.5/src/join.c 2010-04-26 14:24:33.000000000 +0200
@@ -22,17 +22,31 @@
#include <sys/types.h>
#include <getopt.h>
@ -1258,7 +1258,7 @@ diff -urNp coreutils-8.0-orig/src/join.c coreutils-8.0/src/join.c
/* If nonzero, check that the input is correctly ordered. */
static enum
@@ -239,10 +255,11 @@ xfields (struct line *line)
@@ -248,10 +264,11 @@ xfields (struct line *line)
if (ptr == lim)
return;
@ -1272,7 +1272,7 @@ diff -urNp coreutils-8.0-orig/src/join.c coreutils-8.0/src/join.c
extract_field (line, ptr, sep - ptr);
}
else
@@ -269,6 +286,148 @@ xfields (struct line *line)
@@ -278,6 +295,148 @@ xfields (struct line *line)
extract_field (line, ptr, lim - ptr);
}
@ -1421,7 +1421,7 @@ diff -urNp coreutils-8.0-orig/src/join.c coreutils-8.0/src/join.c
static void
freeline (struct line *line)
{
@@ -287,56 +446,115 @@ keycmp (struct line const *line1, struct
@@ -299,56 +458,115 @@ keycmp (struct line const *line1, struct
size_t jf_1, size_t jf_2)
{
/* Start of field to compare in each file. */
@ -1560,7 +1560,7 @@ diff -urNp coreutils-8.0-orig/src/join.c coreutils-8.0/src/join.c
}
/* Check that successive input lines PREV and CURRENT from input file
@@ -417,6 +635,11 @@ get_line (FILE *fp, struct line **linep,
@@ -429,6 +647,11 @@ get_line (FILE *fp, struct line **linep,
return false;
}
@ -1572,7 +1572,7 @@ diff -urNp coreutils-8.0-orig/src/join.c coreutils-8.0/src/join.c
xfields (line);
if (prevline[which - 1])
@@ -518,11 +741,18 @@ prfield (size_t n, struct line const *li
@@ -528,11 +751,18 @@ prfield (size_t n, struct line const *li
/* Print the join of LINE1 and LINE2. */
@ -1592,7 +1592,7 @@ diff -urNp coreutils-8.0-orig/src/join.c coreutils-8.0/src/join.c
outlist = outlist_head.next;
if (outlist)
@@ -557,7 +787,7 @@ prjoin (struct line const *line1, struct
@@ -567,7 +797,7 @@ prjoin (struct line const *line1, struct
o = o->next;
if (o == NULL)
break;
@ -1601,7 +1601,7 @@ diff -urNp coreutils-8.0-orig/src/join.c coreutils-8.0/src/join.c
}
putchar ('\n');
}
@@ -575,23 +805,23 @@ prjoin (struct line const *line1, struct
@@ -585,23 +815,23 @@ prjoin (struct line const *line1, struct
prfield (join_field_1, line1);
for (i = 0; i < join_field_1 && i < line1->nfields; ++i)
{
@ -1629,17 +1629,13 @@ diff -urNp coreutils-8.0-orig/src/join.c coreutils-8.0/src/join.c
prfield (i, line2);
}
putchar ('\n');
@@ -1022,20 +1252,41 @@ main (int argc, char **argv)
@@ -1039,21 +1269,46 @@ main (int argc, char **argv)
case 't':
{
- unsigned char newtab = optarg[0];
- if (! newtab)
+ char *newtab;
+ size_t newtablen;
+ if (! optarg[0])
error (EXIT_FAILURE, 0, _("empty tab"));
- if (optarg[1])
+ newtab = xstrdup (optarg);
+#if HAVE_MBRTOWC
+ if (MB_CUR_MAX > 1)
@ -1658,32 +1654,40 @@ diff -urNp coreutils-8.0-orig/src/join.c coreutils-8.0/src/join.c
+ else
+#endif
+ newtablen = 1;
+
+ if (newtablen == 1 && newtab[1])
+ {
+ if (STREQ (newtab, "\\0"))
+ newtab[0] = '\0';
+ }
+ if (tab != NULL && strcmp (tab, newtab))
if (! newtab)
+ {
newtab = '\n'; /* '' => process the whole line. */
+ }
else if (optarg[1])
{
- if (STREQ (optarg, "\\0"))
- newtab = '\0';
- else
- error (EXIT_FAILURE, 0, _("multi-character tab %s"),
- quote (optarg));
+ if (newtablen == 1 && newtab[1])
+ {
+ if (STREQ (newtab, "\\0"))
+ newtab[0] = '\0';
+ }
+ }
+ if (tab != NULL && strcmp (tab, newtab))
+ {
+ free (newtab);
+ error (EXIT_FAILURE, 0, _("incompatible tabs"));
}
- if (0 <= tab && tab != newtab)
- error (EXIT_FAILURE, 0, _("incompatible tabs"));
tab = newtab;
- }
+ tablen = newtablen;
}
+ }
break;
diff -urNp coreutils-8.0-orig/src/pr.c coreutils-8.0/src/pr.c
--- coreutils-8.0-orig/src/pr.c 2009-09-29 15:27:54.000000000 +0200
+++ coreutils-8.0/src/pr.c 2009-10-07 10:07:16.000000000 +0200
case NOCHECK_ORDER_OPTION:
diff -urNp coreutils-8.5-orig/src/pr.c coreutils-8.5/src/pr.c
--- coreutils-8.5-orig/src/pr.c 2010-03-13 16:14:09.000000000 +0100
+++ coreutils-8.5/src/pr.c 2010-04-26 14:24:33.000000000 +0200
@@ -312,6 +312,32 @@
#include <getopt.h>
@ -2406,9 +2410,9 @@ diff -urNp coreutils-8.0-orig/src/pr.c coreutils-8.0/src/pr.c
/* We've just printed some files and need to clean up things before
looking for more options and printing the next batch of files.
diff -urNp coreutils-8.0-orig/src/sort.c coreutils-8.0/src/sort.c
--- coreutils-8.0-orig/src/sort.c 2009-09-29 15:27:54.000000000 +0200
+++ coreutils-8.0/src/sort.c 2009-10-07 10:07:16.000000000 +0200
diff -urNp coreutils-8.5-orig/src/sort.c coreutils-8.5/src/sort.c
--- coreutils-8.5-orig/src/sort.c 2010-04-21 09:06:17.000000000 +0200
+++ coreutils-8.5/src/sort.c 2010-04-26 14:24:33.000000000 +0200
@@ -22,10 +22,19 @@
#include <config.h>
@ -2429,7 +2433,7 @@ diff -urNp coreutils-8.0-orig/src/sort.c coreutils-8.0/src/sort.c
#include "system.h"
#include "argmatch.h"
#include "error.h"
@@ -122,14 +131,38 @@ static int decimal_point;
@@ -124,14 +133,38 @@ static int decimal_point;
/* Thousands separator; if -1, then there isn't one. */
static int thousands_sep;
@ -2469,7 +2473,7 @@ diff -urNp coreutils-8.0-orig/src/sort.c coreutils-8.0/src/sort.c
/* The kind of blanks for '-b' to skip in various options. */
enum blanktype { bl_start, bl_end, bl_both };
@@ -268,13 +301,11 @@ static bool reverse;
@@ -270,13 +303,11 @@ static bool reverse;
they were read if all keys compare equal. */
static bool stable;
@ -2486,7 +2490,7 @@ diff -urNp coreutils-8.0-orig/src/sort.c coreutils-8.0/src/sort.c
/* Flag to remove consecutive duplicate lines from the output.
Only the last of a sequence of equal lines will be output. */
@@ -712,6 +743,44 @@ reap_some (void)
@@ -714,6 +745,44 @@ reap_some (void)
update_proc (pid);
}
@ -2531,7 +2535,7 @@ diff -urNp coreutils-8.0-orig/src/sort.c coreutils-8.0/src/sort.c
/* Clean up any remaining temporary files. */
static void
@@ -1093,7 +1162,7 @@ zaptemp (const char *name)
@@ -1158,7 +1227,7 @@ zaptemp (const char *name)
free (node);
}
@ -2540,7 +2544,7 @@ diff -urNp coreutils-8.0-orig/src/sort.c coreutils-8.0/src/sort.c
static int
struct_month_cmp (const void *m1, const void *m2)
@@ -1108,7 +1177,7 @@ struct_month_cmp (const void *m1, const
@@ -1173,7 +1242,7 @@ struct_month_cmp (const void *m1, const
/* Initialize the character class tables. */
static void
@ -2549,7 +2553,7 @@ diff -urNp coreutils-8.0-orig/src/sort.c coreutils-8.0/src/sort.c
{
size_t i;
@@ -1120,7 +1189,7 @@ inittables (void)
@@ -1185,7 +1254,7 @@ inittables (void)
fold_toupper[i] = toupper (i);
}
@ -2558,7 +2562,7 @@ diff -urNp coreutils-8.0-orig/src/sort.c coreutils-8.0/src/sort.c
/* If we're not in the "C" locale, read different names for months. */
if (hard_LC_TIME)
{
@@ -1202,6 +1271,64 @@ specify_nmerge (int oi, char c, char con
@@ -1268,6 +1337,64 @@ specify_nmerge (int oi, char c, char con
xstrtol_fatal (e, oi, c, long_options, s);
}
@ -2623,7 +2627,7 @@ diff -urNp coreutils-8.0-orig/src/sort.c coreutils-8.0/src/sort.c
/* Specify the amount of main memory to use when sorting. */
static void
specify_sort_size (int oi, char c, char const *s)
@@ -1412,7 +1539,7 @@ buffer_linelim (struct buffer const *buf
@@ -1478,7 +1605,7 @@ buffer_linelim (struct buffer const *buf
by KEY in LINE. */
static char *
@ -2632,7 +2636,7 @@ diff -urNp coreutils-8.0-orig/src/sort.c coreutils-8.0/src/sort.c
{
char *ptr = line->text, *lim = ptr + line->length - 1;
size_t sword = key->sword;
@@ -1421,10 +1548,10 @@ begfield (const struct line *line, const
@@ -1487,10 +1614,10 @@ begfield (const struct line *line, const
/* The leading field separator itself is included in a field when -t
is absent. */
@ -2645,7 +2649,7 @@ diff -urNp coreutils-8.0-orig/src/sort.c coreutils-8.0/src/sort.c
++ptr;
if (ptr < lim)
++ptr;
@@ -1450,11 +1577,70 @@ begfield (const struct line *line, const
@@ -1516,11 +1643,70 @@ begfield (const struct line *line, const
return ptr;
}
@ -2717,7 +2721,7 @@ diff -urNp coreutils-8.0-orig/src/sort.c coreutils-8.0/src/sort.c
{
char *ptr = line->text, *lim = ptr + line->length - 1;
size_t eword = key->eword, echar = key->echar;
@@ -1469,10 +1655,10 @@ limfield (const struct line *line, const
@@ -1535,10 +1721,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. */
@ -2730,7 +2734,7 @@ diff -urNp coreutils-8.0-orig/src/sort.c coreutils-8.0/src/sort.c
++ptr;
if (ptr < lim && (eword || echar))
++ptr;
@@ -1518,10 +1704,10 @@ limfield (const struct line *line, const
@@ -1584,10 +1770,10 @@ limfield (const struct line *line, const
*/
/* Make LIM point to the end of (one byte past) the current field. */
@ -2743,7 +2747,7 @@ diff -urNp coreutils-8.0-orig/src/sort.c coreutils-8.0/src/sort.c
if (newlim)
lim = newlim;
}
@@ -1552,6 +1738,113 @@ limfield (const struct line *line, const
@@ -1618,6 +1804,113 @@ limfield (const struct line *line, const
return ptr;
}
@ -2857,7 +2861,7 @@ diff -urNp coreutils-8.0-orig/src/sort.c coreutils-8.0/src/sort.c
/* Fill BUF reading from FP, moving buf->left bytes from the end
of buf->buf to the beginning first. If EOF is reached and the
file wasn't terminated by a newline, supply one. Set up BUF's line
@@ -1634,8 +1927,24 @@ fillbuf (struct buffer *buf, FILE *fp, c
@@ -1700,8 +1993,24 @@ fillbuf (struct buffer *buf, FILE *fp, c
else
{
if (key->skipsblanks)
@ -2884,7 +2888,7 @@ diff -urNp coreutils-8.0-orig/src/sort.c coreutils-8.0/src/sort.c
line->keybeg = line_start;
}
}
@@ -1673,7 +1982,7 @@ fillbuf (struct buffer *buf, FILE *fp, c
@@ -1739,7 +2048,7 @@ fillbuf (struct buffer *buf, FILE *fp, c
hideously fast. */
static int
@ -2893,7 +2897,7 @@ diff -urNp coreutils-8.0-orig/src/sort.c coreutils-8.0/src/sort.c
{
while (blanks[to_uchar (*a)])
a++;
@@ -1782,6 +2091,25 @@ human_numcompare (const char *a, const c
@@ -1848,6 +2157,25 @@ human_numcompare (const char *a, const c
: strnumcmp (a, b, decimal_point, thousands_sep));
}
@ -2919,7 +2923,7 @@ diff -urNp coreutils-8.0-orig/src/sort.c coreutils-8.0/src/sort.c
static int
general_numcompare (const char *sa, const char *sb)
{
@@ -1815,7 +2143,7 @@ general_numcompare (const char *sa, cons
@@ -1881,7 +2209,7 @@ general_numcompare (const char *sa, cons
Return 0 if the name in S is not recognized. */
static int
@ -2928,7 +2932,7 @@ diff -urNp coreutils-8.0-orig/src/sort.c coreutils-8.0/src/sort.c
{
size_t lo = 0;
size_t hi = MONTHS_PER_YEAR;
@@ -1996,11 +2324,79 @@ compare_version (char *restrict texta, s
@@ -2062,11 +2390,79 @@ compare_version (char *restrict texta, s
return diff;
}
@ -3009,7 +3013,7 @@ diff -urNp coreutils-8.0-orig/src/sort.c coreutils-8.0/src/sort.c
{
struct keyfield *key = keylist;
@@ -2180,6 +2576,179 @@ keycompare (const struct line *a, const
@@ -2246,6 +2642,179 @@ keycompare (const struct line *a, const
return key->reverse ? -diff : diff;
}
@ -3189,7 +3193,7 @@ diff -urNp coreutils-8.0-orig/src/sort.c coreutils-8.0/src/sort.c
/* Compare two lines A and B, returning negative, zero, or positive
depending on whether A compares less than, equal to, or greater than B. */
@@ -3178,7 +3747,7 @@ main (int argc, char **argv)
@@ -3244,7 +3813,7 @@ main (int argc, char **argv)
initialize_exit_failure (SORT_FAILURE);
hard_LC_COLLATE = hard_locale (LC_COLLATE);
@ -3198,7 +3202,7 @@ diff -urNp coreutils-8.0-orig/src/sort.c coreutils-8.0/src/sort.c
hard_LC_TIME = hard_locale (LC_TIME);
#endif
@@ -3199,6 +3768,27 @@ main (int argc, char **argv)
@@ -3265,6 +3834,27 @@ main (int argc, char **argv)
thousands_sep = -1;
}
@ -3226,7 +3230,7 @@ diff -urNp coreutils-8.0-orig/src/sort.c coreutils-8.0/src/sort.c
have_read_stdin = false;
inittables ();
@@ -3459,13 +4049,35 @@ main (int argc, char **argv)
@@ -3536,13 +4126,35 @@ main (int argc, char **argv)
case 't':
{
@ -3266,7 +3270,7 @@ diff -urNp coreutils-8.0-orig/src/sort.c coreutils-8.0/src/sort.c
else
{
/* Provoke with `sort -txx'. Complain about
@@ -3476,9 +4088,12 @@ main (int argc, char **argv)
@@ -3553,9 +4165,12 @@ main (int argc, char **argv)
quote (optarg));
}
}
@ -3281,10 +3285,10 @@ diff -urNp coreutils-8.0-orig/src/sort.c coreutils-8.0/src/sort.c
}
break;
diff -urNp coreutils-8.0-orig/src/unexpand.c coreutils-8.0/src/unexpand.c
--- coreutils-8.0-orig/src/unexpand.c 2009-09-29 15:27:54.000000000 +0200
+++ coreutils-8.0/src/unexpand.c 2009-10-07 10:07:16.000000000 +0200
@@ -38,11 +38,28 @@
diff -urNp coreutils-8.5-orig/src/unexpand.c coreutils-8.5/src/unexpand.c
--- coreutils-8.5-orig/src/unexpand.c 2010-01-01 14:06:47.000000000 +0100
+++ coreutils-8.5/src/unexpand.c 2010-04-26 14:24:33.000000000 +0200
@@ -39,11 +39,28 @@
#include <stdio.h>
#include <getopt.h>
#include <sys/types.h>
@ -3313,7 +3317,7 @@ diff -urNp coreutils-8.0-orig/src/unexpand.c coreutils-8.0/src/unexpand.c
/* The official name of this program (e.g., no `g' prefix). */
#define PROGRAM_NAME "unexpand"
@@ -102,6 +119,208 @@ static struct option const longopts[] =
@@ -103,6 +120,208 @@ static struct option const longopts[] =
{NULL, 0, NULL, 0}
};
@ -3522,7 +3526,7 @@ diff -urNp coreutils-8.0-orig/src/unexpand.c coreutils-8.0/src/unexpand.c
void
usage (int status)
{
@@ -523,7 +742,12 @@ main (int argc, char **argv)
@@ -524,7 +743,12 @@ main (int argc, char **argv)
file_list = (optind < argc ? &argv[optind] : stdin_argv);
@ -3536,10 +3540,10 @@ diff -urNp coreutils-8.0-orig/src/unexpand.c coreutils-8.0/src/unexpand.c
if (have_read_stdin && fclose (stdin) != 0)
error (EXIT_FAILURE, errno, "-");
diff -urNp coreutils-8.0-orig/src/uniq.c coreutils-8.0/src/uniq.c
--- coreutils-8.0-orig/src/uniq.c 2009-09-23 10:25:44.000000000 +0200
+++ coreutils-8.0/src/uniq.c 2009-10-07 10:07:16.000000000 +0200
@@ -22,6 +22,16 @@
diff -urNp coreutils-8.5-orig/src/uniq.c coreutils-8.5/src/uniq.c
--- coreutils-8.5-orig/src/uniq.c 2010-03-13 16:14:09.000000000 +0100
+++ coreutils-8.5/src/uniq.c 2010-04-26 14:24:33.000000000 +0200
@@ -21,6 +21,16 @@
#include <getopt.h>
#include <sys/types.h>
@ -3905,18 +3909,18 @@ diff -urNp coreutils-8.0-orig/src/uniq.c coreutils-8.0/src/uniq.c
skip_chars = 0;
skip_fields = 0;
check_chars = SIZE_MAX;
diff -urNp coreutils-8.0-orig/tests/Makefile.am coreutils-8.0/tests/Makefile.am
--- coreutils-8.0-orig/tests/Makefile.am 2009-09-29 16:25:44.000000000 +0200
+++ coreutils-8.0/tests/Makefile.am 2009-10-07 10:07:16.000000000 +0200
@@ -208,6 +208,7 @@ TESTS = \
diff -urNp coreutils-8.5-orig/tests/Makefile.am coreutils-8.5/tests/Makefile.am
--- coreutils-8.5-orig/tests/Makefile.am 2010-04-26 14:24:10.000000000 +0200
+++ coreutils-8.5/tests/Makefile.am 2010-04-26 14:24:33.000000000 +0200
@@ -224,6 +224,7 @@ TESTS = \
misc/sort-compress \
misc/sort-continue \
misc/sort-files0-from \
+ misc/sort-mb-tests \
misc/sort-merge \
misc/sort-merge-fdlimit \
misc/sort-rand \
@@ -452,6 +453,10 @@ TESTS = \
misc/sort-month \
@@ -475,6 +476,10 @@ TESTS = \
$(root_tests)
pr_data = \
@ -3927,9 +3931,9 @@ diff -urNp coreutils-8.0-orig/tests/Makefile.am coreutils-8.0/tests/Makefile.am
pr/0F \
pr/0FF \
pr/0FFnt \
diff -urNp coreutils-8.0-orig/tests/misc/cut coreutils-8.0/tests/misc/cut
--- coreutils-8.0-orig/tests/misc/cut 2009-09-21 14:29:33.000000000 +0200
+++ coreutils-8.0/tests/misc/cut 2009-10-07 10:07:16.000000000 +0200
diff -urNp coreutils-8.5-orig/tests/misc/cut coreutils-8.5/tests/misc/cut
--- coreutils-8.5-orig/tests/misc/cut 2010-01-01 14:06:47.000000000 +0100
+++ coreutils-8.5/tests/misc/cut 2010-04-26 14:24:33.000000000 +0200
@@ -26,7 +26,7 @@ use strict;
my $prog = 'cut';
my $try = "Try \`$prog --help' for more information.\n";
@ -3948,41 +3952,41 @@ diff -urNp coreutils-8.0-orig/tests/misc/cut coreutils-8.0/tests/misc/cut
['inval2', qw(-f -), {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR=>$no_endpoint}],
['inval3', '-f', '4,-', {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR=>$no_endpoint}],
['inval4', '-f', '1-2,-', {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR=>$no_endpoint}],
diff -urNp coreutils-8.0-orig/tests/misc/mb1.I coreutils-8.0/tests/misc/mb1.I
--- coreutils-8.0-orig/tests/misc/mb1.I 1970-01-01 01:00:00.000000000 +0100
+++ coreutils-8.0/tests/misc/mb1.I 2009-10-07 10:07:16.000000000 +0200
diff -urNp coreutils-8.5-orig/tests/misc/mb1.I coreutils-8.5/tests/misc/mb1.I
--- coreutils-8.5-orig/tests/misc/mb1.I 1970-01-01 01:00:00.000000000 +0100
+++ coreutils-8.5/tests/misc/mb1.I 2010-04-26 14:24:33.000000000 +0200
@@ -0,0 +1,4 @@
+Apple10
+Banana5
+Citrus20
+Cherry30
diff -urNp coreutils-8.0-orig/tests/misc/mb1.X coreutils-8.0/tests/misc/mb1.X
--- coreutils-8.0-orig/tests/misc/mb1.X 1970-01-01 01:00:00.000000000 +0100
+++ coreutils-8.0/tests/misc/mb1.X 2009-10-07 10:07:16.000000000 +0200
diff -urNp coreutils-8.5-orig/tests/misc/mb1.X coreutils-8.5/tests/misc/mb1.X
--- coreutils-8.5-orig/tests/misc/mb1.X 1970-01-01 01:00:00.000000000 +0100
+++ coreutils-8.5/tests/misc/mb1.X 2010-04-26 14:24:33.000000000 +0200
@@ -0,0 +1,4 @@
+Banana5
+Apple10
+Citrus20
+Cherry30
diff -urNp coreutils-8.0-orig/tests/misc/mb2.I coreutils-8.0/tests/misc/mb2.I
--- coreutils-8.0-orig/tests/misc/mb2.I 1970-01-01 01:00:00.000000000 +0100
+++ coreutils-8.0/tests/misc/mb2.I 2009-10-07 10:07:16.000000000 +0200
diff -urNp coreutils-8.5-orig/tests/misc/mb2.I coreutils-8.5/tests/misc/mb2.I
--- coreutils-8.5-orig/tests/misc/mb2.I 1970-01-01 01:00:00.000000000 +0100
+++ coreutils-8.5/tests/misc/mb2.I 2010-04-26 14:24:33.000000000 +0200
@@ -0,0 +1,4 @@
+Apple1020
+Banana530
+Citrus205
+Cherry3010
diff -urNp coreutils-8.0-orig/tests/misc/mb2.X coreutils-8.0/tests/misc/mb2.X
--- coreutils-8.0-orig/tests/misc/mb2.X 1970-01-01 01:00:00.000000000 +0100
+++ coreutils-8.0/tests/misc/mb2.X 2009-10-07 10:07:16.000000000 +0200
diff -urNp coreutils-8.5-orig/tests/misc/mb2.X coreutils-8.5/tests/misc/mb2.X
--- coreutils-8.5-orig/tests/misc/mb2.X 1970-01-01 01:00:00.000000000 +0100
+++ coreutils-8.5/tests/misc/mb2.X 2010-04-26 14:24:33.000000000 +0200
@@ -0,0 +1,4 @@
+Citrus205
+Cherry3010
+Apple1020
+Banana530
diff -urNp coreutils-8.0-orig/tests/misc/sort-mb-tests coreutils-8.0/tests/misc/sort-mb-tests
--- coreutils-8.0-orig/tests/misc/sort-mb-tests 1970-01-01 01:00:00.000000000 +0100
+++ coreutils-8.0/tests/misc/sort-mb-tests 2009-10-07 10:07:16.000000000 +0200
diff -urNp coreutils-8.5-orig/tests/misc/sort-mb-tests coreutils-8.5/tests/misc/sort-mb-tests
--- coreutils-8.5-orig/tests/misc/sort-mb-tests 1970-01-01 01:00:00.000000000 +0100
+++ coreutils-8.5/tests/misc/sort-mb-tests 2010-04-26 14:24:33.000000000 +0200
@@ -0,0 +1,58 @@
+#! /bin/sh
+case $# in

View File

@ -1,7 +1,7 @@
Summary: A set of basic GNU tools commonly used in shell scripts
Name: coreutils
Version: 8.4
Release: 8%{?dist}
Version: 8.5
Release: 1%{?dist}
License: GPLv3+
Group: System Environment/Base
Url: http://www.gnu.org/software/coreutils/
@ -18,8 +18,6 @@ Source202: coreutils-su-l.pamd
Source203: coreutils-runuser-l.pamd
# From upstream
#"who" doesn't determine user's message status correctly - #454261
Patch1: coreutils-8.4-who-msgstatus.patch
# Our patches
#general patch to workaround koji build system issues
@ -119,7 +117,6 @@ Libraries for coreutils package.
%setup -q
# From upstream
%patch1 -p1 -b .whomsg
# Our patches
%patch100 -p1 -b .configure
@ -341,6 +338,9 @@ fi
%{_libdir}/coreutils
%changelog
* Mon Apr 26 2010 Ondrej Vasik <ovasik@redhat.com> - 8.5-1
- new upstream release 8.5
* Thu Apr 15 2010 Ondrej Vasik <ovasik@redhat.com> - 8.4-8
- move readlink from /usr/bin to bin, keep symlink in
/usr/bin(#580682)

View File

@ -1 +1 @@
1fde97f144b4699b18f36c2ec18b1f18 coreutils-8.4.tar.xz
55170ed640e300f5b81640c6f4641513 coreutils-8.5.tar.xz