Accepting request 60526 from Base:System

Accepted submit request 60526 from user psmt

OBS-URL: https://build.opensuse.org/request/show/60526
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/coreutils?expand=0&rev=53
This commit is contained in:
Ruediger Oertel 2011-02-18 12:40:57 +00:00 committed by Git OBS Bridge
parent 29475acb95
commit fcee02ed36
9 changed files with 415 additions and 132 deletions

View File

@ -2,12 +2,12 @@
<service name="download_url">
<param name="protocol">http</param>
<param name="host">ftp.gnu.org</param>
<param name="path">/gnu/coreutils/coreutils-8.9.tar.xz</param>
<param name="path">/gnu/coreutils/coreutils-8.10.tar.xz</param>
</service>
<service name="verify_file">
<param name="file">_service:download_url:coreutils-8.9.tar.xz</param>
<param name="file">_service:download_url:coreutils-8.10.tar.xz</param>
<param name="verifier">sha256</param>
<param name="checksum">ca22d06effd0c8bc506a7c57932d0ed08d7dbc75629a92264d67d34982f2b5b7</param>
<param name="checksum">8258785cbab6580f2e0376769a7b98ab3e1ddfca2d6f48e5490a51688d0bee83</param>
</service>
<service name="set_version">
</service>

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8258785cbab6580f2e0376769a7b98ab3e1ddfca2d6f48e5490a51688d0bee83
size 4753304

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ca22d06effd0c8bc506a7c57932d0ed08d7dbc75629a92264d67d34982f2b5b7
size 4726864

View File

@ -23,8 +23,8 @@ BuildRequires: help2man libacl-devel libcap-devel libselinux-devel pam-devel xz
Url: http://www.gnu.org/software/coreutils/
License: GFDLv1.2 ; GPLv2+ ; GPLv3+
Group: System/Base
Version: 8.9
Release: 2
Version: 8.10
Release: 0
Provides: fileutils = %{version}, sh-utils = %{version}, stat = %version}, textutils = %{version}, mktemp = %{version}
Obsoletes: fileutils < %{version}, sh-utils < %{version}, stat < %version}, textutils < %{version}, mktemp < %{version}
Obsoletes: libselinux <= 1.23.11-3 libselinux-32bit = 9 libselinux-64bit = 9 libselinux-x86 = 9
@ -36,7 +36,6 @@ Source: coreutils-%{version}.tar.xz
Source1: su.pamd
Source2: su.default
Source3: baselibs.conf
Source4: coreutils-8.9.de.po
Patch0: coreutils-misc.patch
Patch1: coreutils-no_hostname_and_hostid.patch
Patch2: coreutils-gl_printf_safe.patch
@ -56,6 +55,10 @@ Patch30: coreutils-8.6-compile-su-with-fpie.diff
Patch31: coreutils-getaddrinfo.patch
Patch32: coreutils-ptr_int_casts.patch
Patch33: coreutils-8.9-singlethreaded-sort.patch
#Next two patches added after 8.10 release so should be obsolete with next release
Patch34: coreutils-compute_range_endpoint.patch
Patch35: coreutils-fix_sparse_fiemap_test.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# this will create a cycle, broken up randomly - coreutils is just too core to have other
# prerequires
@ -96,7 +99,8 @@ uname unexpand uniq unlink uptime users vdir wc who whoami yes
%patch31
%patch32
%patch33
cp %{S:4} po/de.po
%patch34 -p1
%patch35 -p1
%build
AUTOPOINT=true autoreconf -fi
@ -111,28 +115,28 @@ make %{?_smp_mflags} V=1
%install
%makeinstall
test -f $RPM_BUILD_ROOT%{_bindir}/su || \
install src/su $RPM_BUILD_ROOT%{_bindir}/su
install -d $RPM_BUILD_ROOT/bin
test -f %{buildroot}%{_bindir}/su || \
install src/su %{buildroot}%{_bindir}/su
install -d %{buildroot}/bin
for i in arch basename cat chgrp chmod chown cp date dd df echo false kill ln ls mkdir mknod mktemp mv pwd rm rmdir sleep sort stat stty su sync touch true uname readlink md5sum
do
mv $RPM_BUILD_ROOT%{_bindir}/$i $RPM_BUILD_ROOT/bin/$i
mv %{buildroot}%{_bindir}/$i %{buildroot}/bin/$i
test $i = su && echo -n '%%attr(4755,root,root) '
echo /bin/$i
done > bin.files
ln -sf ../../bin/{basename,sort,stat,touch,readlink,md5sum} $RPM_BUILD_ROOT%{_bindir}
install -d -m 755 $RPM_BUILD_ROOT/etc/pam.d
install -m 644 $RPM_SOURCE_DIR/su.pamd $RPM_BUILD_ROOT/etc/pam.d/su
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/{basename,sort,stat,touch,readlink,md5sum} %{buildroot}%{_bindir}
install -d -m 755 %{buildroot}/etc/pam.d
install -m 644 %{S:1} %{buildroot}/etc/pam.d/su
install -m 644 %{S:1} %{buildroot}/etc/pam.d/su-l
install -d -m 755 %{buildroot}/etc/default
install -m 644 %{S:2} %{buildroot}/etc/default/su
echo '.so man1/test.1' > %{buildroot}/%{_mandir}/man1/\[.1
%find_lang %name
%post
%install_info --info-dir=%{_infodir} %{_infodir}/coreutils.info.gz
# may fail if permissions is not there, but there is no way around that
%run_permissions
%set_permissions %{_bindir}/su
%postun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/coreutils.info.gz
@ -141,14 +145,14 @@ echo '.so man1/test.1' > %{buildroot}/%{_mandir}/man1/\[.1
%verify_permissions -e /bin/su
%clean
rm -rf $RPM_BUILD_ROOT
rm -rf %{buildroot}
%files -f bin.files
%defattr(-,root,root)
%doc README NEWS
%config /etc/pam.d/su
%config /etc/pam.d/su-l
%config(noreplace) /etc/default/su
%config %{_sysconfdir}/pam.d/su
%config %{_sysconfdir}/pam.d/su-l
%config(noreplace) %{_sysconfdir}/default/su
%{_bindir}/*
%{_libdir}/%{name}
%doc %{_infodir}/coreutils.info*.gz

View File

@ -19,8 +19,8 @@
Index: lib/linebuffer.h
===================================================================
--- lib/linebuffer.h.orig 2011-01-01 22:19:27.000000000 +0100
+++ lib/linebuffer.h 2011-01-05 14:05:49.026494005 +0100
--- lib/linebuffer.h.orig 2011-01-06 09:47:56.000000000 +0100
+++ lib/linebuffer.h 2011-02-10 15:59:59.159604973 +0100
@@ -21,6 +21,11 @@
# include <stdio.h>
@ -45,8 +45,8 @@ Index: lib/linebuffer.h
/* Initialize linebuffer LINEBUFFER for use. */
Index: src/cut.c
===================================================================
--- src/cut.c.orig 2011-01-01 22:19:23.000000000 +0100
+++ src/cut.c 2011-01-05 14:05:49.027494034 +0100
--- src/cut.c.orig 2011-01-31 13:40:38.000000000 +0100
+++ src/cut.c 2011-02-10 16:00:21.825167755 +0100
@@ -28,6 +28,11 @@
#include <assert.h>
#include <getopt.h>
@ -639,8 +639,8 @@ Index: src/cut.c
if (optind == argc)
Index: src/expand.c
===================================================================
--- src/expand.c.orig 2011-01-01 22:19:23.000000000 +0100
+++ src/expand.c 2011-01-05 14:05:49.091495874 +0100
--- src/expand.c.orig 2011-01-31 13:40:38.000000000 +0100
+++ src/expand.c 2011-02-10 15:59:59.229600533 +0100
@@ -38,12 +38,29 @@
#include <stdio.h>
#include <getopt.h>
@ -830,8 +830,8 @@ Index: src/expand.c
error (EXIT_FAILURE, errno, "-");
Index: src/fold.c
===================================================================
--- src/fold.c.orig 2011-01-01 22:19:23.000000000 +0100
+++ src/fold.c 2011-01-05 14:05:49.116496593 +0100
--- src/fold.c.orig 2011-01-31 13:40:38.000000000 +0100
+++ src/fold.c 2011-02-10 15:59:59.271597870 +0100
@@ -22,12 +22,34 @@
#include <getopt.h>
#include <sys/types.h>
@ -1232,8 +1232,8 @@ Index: src/fold.c
case 's': /* Break at word boundaries. */
Index: src/join.c
===================================================================
--- src/join.c.orig 2011-01-01 22:19:23.000000000 +0100
+++ src/join.c 2011-01-05 14:05:49.157497772 +0100
--- src/join.c.orig 2011-01-31 13:40:38.000000000 +0100
+++ src/join.c 2011-02-10 16:03:29.484268348 +0100
@@ -22,18 +22,32 @@
#include <sys/types.h>
#include <getopt.h>
@ -1268,7 +1268,7 @@ Index: src/join.c
/* The official name of this program (e.g., no `g' prefix). */
#define PROGRAM_NAME "join"
@@ -122,10 +136,12 @@ static struct outlist outlist_head;
@@ -129,10 +143,12 @@ static struct outlist outlist_head;
/* Last element in `outlist', where a new element can be added. */
static struct outlist *outlist_end = &outlist_head;
@ -1285,7 +1285,7 @@ Index: src/join.c
/* If nonzero, check that the input is correctly ordered. */
static enum
@@ -249,13 +265,14 @@ xfields (struct line *line)
@@ -257,13 +273,14 @@ xfields (struct line *line)
if (ptr == lim)
return;
@ -1303,7 +1303,7 @@ Index: src/join.c
{
/* Skip leading blanks before the first field. */
while (isblank (to_uchar (*ptr)))
@@ -279,6 +296,148 @@ xfields (struct line *line)
@@ -287,6 +304,148 @@ xfields (struct line *line)
extract_field (line, ptr, lim - ptr);
}
@ -1452,7 +1452,7 @@ Index: src/join.c
static void
freeline (struct line *line)
{
@@ -300,56 +459,115 @@ keycmp (struct line const *line1, struct
@@ -308,56 +467,115 @@ keycmp (struct line const *line1, struct
size_t jf_1, size_t jf_2)
{
/* Start of field to compare in each file. */
@ -1591,7 +1591,7 @@ Index: src/join.c
}
/* Check that successive input lines PREV and CURRENT from input file
@@ -430,6 +648,11 @@ get_line (FILE *fp, struct line **linep,
@@ -438,6 +656,11 @@ get_line (FILE *fp, struct line **linep,
return false;
}
@ -1603,27 +1603,48 @@ Index: src/join.c
xfields (line);
if (prevline[which - 1])
@@ -529,11 +752,18 @@ prfield (size_t n, struct line const *li
/* Print the join of LINE1 and LINE2. */
@@ -536,22 +759,29 @@ prfield (size_t n, struct line const *li
}
/* Output all the fields in line, other than the join field. */
+#define PUT_TAB_CHAR \
+ do \
+ { \
+ (tab != NULL) ? \
+ fwrite(tab, sizeof(char), tablen, stdout) : putchar (' '); \
+ fwrite(tab, sizeof(char), tablen, stdout) : putchar (' '); \
+ } \
+ while (0)
+
static void
prfields (struct line const *line, size_t join_field, size_t autocount)
{
size_t i;
size_t nfields = autoformat ? autocount : line->nfields;
- char output_separator = tab < 0 ? ' ' : tab;
for (i = 0; i < join_field && i < nfields; ++i)
{
- putchar (output_separator);
+ PUT_TAB_CHAR;
prfield (i, line);
}
for (i = join_field + 1; i < nfields; ++i)
{
- putchar (output_separator);
+ PUT_TAB_CHAR;
prfield (i, line);
}
}
@@ -562,7 +792,6 @@ static void
prjoin (struct line const *line1, struct line const *line2)
{
const struct outlist *outlist;
- char output_separator = tab < 0 ? ' ' : tab;
size_t field;
struct line const *line;
outlist = outlist_head.next;
if (outlist)
@@ -568,7 +798,7 @@ prjoin (struct line const *line1, struct
@@ -596,7 +825,7 @@ prjoin (struct line const *line1, struct
o = o->next;
if (o == NULL)
break;
@ -1632,35 +1653,7 @@ Index: src/join.c
}
putchar ('\n');
}
@@ -586,23 +816,23 @@ prjoin (struct line const *line1, struct
prfield (join_field_1, line1);
for (i = 0; i < join_field_1 && i < line1->nfields; ++i)
{
- putchar (output_separator);
+ PUT_TAB_CHAR;
prfield (i, line1);
}
for (i = join_field_1 + 1; i < line1->nfields; ++i)
{
- putchar (output_separator);
+ PUT_TAB_CHAR;
prfield (i, line1);
}
for (i = 0; i < join_field_2 && i < line2->nfields; ++i)
{
- putchar (output_separator);
+ PUT_TAB_CHAR;
prfield (i, line2);
}
for (i = join_field_2 + 1; i < line2->nfields; ++i)
{
- putchar (output_separator);
+ PUT_TAB_CHAR;
prfield (i, line2);
}
putchar ('\n');
@@ -1043,21 +1273,46 @@ main (int argc, char **argv)
@@ -1075,21 +1304,46 @@ main (int argc, char **argv)
case 't':
{
@ -1718,8 +1711,8 @@ Index: src/join.c
case NOCHECK_ORDER_OPTION:
Index: src/pr.c
===================================================================
--- src/pr.c.orig 2011-01-01 22:19:23.000000000 +0100
+++ src/pr.c 2011-01-05 14:05:49.170498145 +0100
--- src/pr.c.orig 2011-01-31 13:40:38.000000000 +0100
+++ src/pr.c 2011-02-10 15:59:59.310595397 +0100
@@ -312,6 +312,32 @@
#include <getopt.h>
@ -2444,8 +2437,8 @@ Index: src/pr.c
Index: src/sort.c
===================================================================
--- src/sort.c.orig 2011-01-01 22:19:23.000000000 +0100
+++ src/sort.c 2011-01-05 14:05:49.184498547 +0100
--- src/sort.c.orig 2011-02-03 11:24:35.000000000 +0100
+++ src/sort.c 2011-02-10 16:00:21.720174413 +0100
@@ -22,11 +22,20 @@
#include <config.h>
@ -2999,7 +2992,7 @@ Index: src/sort.c
{
size_t lo = 0;
size_t hi = MONTHS_PER_YEAR;
@@ -2209,13 +2572,12 @@ debug_key (struct line const *line, stru
@@ -2209,15 +2572,14 @@ debug_key (struct line const *line, stru
char saved = *lim;
*lim = '\0';
@ -3009,13 +3002,15 @@ Index: src/sort.c
char *tighter_lim = beg;
if (key->month)
if (lim < beg)
tighter_lim = lim;
else if (key->month)
- getmonth (beg, &tighter_lim);
+ getmonth (beg, lim-beg, &tighter_lim);
else if (key->general_numeric)
ignore_value (strtold (beg, &tighter_lim));
else if (key->numeric || key->human_numeric)
@@ -2359,7 +2721,7 @@ key_warnings (struct keyfield const *gke
@@ -2361,7 +2723,7 @@ key_warnings (struct keyfield const *gke
bool maybe_space_aligned = !hard_LC_COLLATE && default_key_compare (key)
&& !(key->schar || key->echar);
bool line_offset = key->eword == 0 && key->echar != 0; /* -k1.x,1.y */
@ -3024,7 +3019,7 @@ Index: src/sort.c
&& ((!key->skipsblanks && !(implicit_skip || maybe_space_aligned))
|| (!key->skipsblanks && key->schar)
|| (!key->skipeblanks && key->echar)))
@@ -2417,11 +2779,83 @@ key_warnings (struct keyfield const *gke
@@ -2419,11 +2781,83 @@ key_warnings (struct keyfield const *gke
error (0, 0, _("option `-r' only applies to last-resort comparison"));
}
@ -3109,7 +3104,7 @@ Index: src/sort.c
{
struct keyfield *key = keylist;
@@ -2506,7 +2940,7 @@ keycompare (struct line const *a, struct
@@ -2508,7 +2942,7 @@ keycompare (struct line const *a, struct
else if (key->human_numeric)
diff = human_numcompare (ta, tb);
else if (key->month)
@ -3118,7 +3113,7 @@ Index: src/sort.c
else if (key->random)
diff = compare_random (ta, tlena, tb, tlenb);
else if (key->version)
@@ -2622,6 +3056,179 @@ keycompare (struct line const *a, struct
@@ -2624,6 +3058,179 @@ keycompare (struct line const *a, struct
return key->reverse ? -diff : diff;
}
@ -3298,7 +3293,7 @@ Index: src/sort.c
/* Compare two lines A and B, returning negative, zero, or positive
depending on whether A compares less than, equal to, or greater than B. */
@@ -4084,7 +4691,7 @@ main (int argc, char **argv)
@@ -4087,7 +4694,7 @@ main (int argc, char **argv)
initialize_exit_failure (SORT_FAILURE);
hard_LC_COLLATE = hard_locale (LC_COLLATE);
@ -3307,7 +3302,7 @@ Index: src/sort.c
hard_LC_TIME = hard_locale (LC_TIME);
#endif
@@ -4105,6 +4712,29 @@ main (int argc, char **argv)
@@ -4108,6 +4715,29 @@ main (int argc, char **argv)
thousands_sep = -1;
}
@ -3337,7 +3332,7 @@ Index: src/sort.c
have_read_stdin = false;
inittables ();
@@ -4375,13 +5005,34 @@ main (int argc, char **argv)
@@ -4378,13 +5008,34 @@ main (int argc, char **argv)
case 't':
{
@ -3376,7 +3371,7 @@ Index: src/sort.c
else
{
/* Provoke with `sort -txx'. Complain about
@@ -4392,9 +5043,12 @@ main (int argc, char **argv)
@@ -4395,9 +5046,12 @@ main (int argc, char **argv)
quote (optarg));
}
}
@ -3393,8 +3388,8 @@ Index: src/sort.c
Index: src/unexpand.c
===================================================================
--- src/unexpand.c.orig 2011-01-01 22:19:23.000000000 +0100
+++ src/unexpand.c 2011-01-05 14:05:49.249500416 +0100
--- src/unexpand.c.orig 2011-01-31 13:40:38.000000000 +0100
+++ src/unexpand.c 2011-02-10 15:59:59.390590326 +0100
@@ -39,12 +39,29 @@
#include <stdio.h>
#include <getopt.h>
@ -3650,8 +3645,8 @@ Index: src/unexpand.c
error (EXIT_FAILURE, errno, "-");
Index: src/uniq.c
===================================================================
--- src/uniq.c.orig 2011-01-01 22:19:23.000000000 +0100
+++ src/uniq.c 2011-01-05 14:05:49.291501624 +0100
--- src/uniq.c.orig 2011-01-31 13:40:38.000000000 +0100
+++ src/uniq.c 2011-02-10 15:59:59.440587155 +0100
@@ -21,6 +21,16 @@
#include <getopt.h>
#include <sys/types.h>
@ -3710,7 +3705,7 @@ Index: src/uniq.c
{
size_t count;
char const *lp = line->buffer;
@@ -228,6 +254,83 @@ find_field (struct linebuffer const *lin
@@ -227,6 +253,83 @@ find_field (struct linebuffer const *lin
return line->buffer + i;
}
@ -3794,7 +3789,7 @@ Index: src/uniq.c
/* Return false if two strings OLD and NEW match, true if not.
OLD and NEW point not to the beginnings of the lines
but rather to the beginnings of the fields to compare.
@@ -236,6 +339,8 @@ find_field (struct linebuffer const *lin
@@ -235,6 +338,8 @@ find_field (struct linebuffer const *lin
static bool
different (char *old, char *new, size_t oldlen, size_t newlen)
{
@ -3803,7 +3798,7 @@ Index: src/uniq.c
if (check_chars < oldlen)
oldlen = check_chars;
if (check_chars < newlen)
@@ -243,15 +348,93 @@ different (char *old, char *new, size_t
@@ -242,15 +347,93 @@ different (char *old, char *new, size_t
if (ignore_case)
{
@ -3902,7 +3897,7 @@ Index: src/uniq.c
/* 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.
@@ -306,15 +489,43 @@ check_file (const char *infile, const ch
@@ -305,15 +488,43 @@ check_file (const char *infile, const ch
{
char *prevfield IF_LINT ( = NULL);
size_t prevlen IF_LINT ( = 0);
@ -3946,7 +3941,7 @@ Index: src/uniq.c
if (prevline->length == 0
|| different (thisfield, prevfield, thislen, prevlen))
{
@@ -333,17 +544,26 @@ check_file (const char *infile, const ch
@@ -332,17 +543,26 @@ check_file (const char *infile, const ch
size_t prevlen;
uintmax_t match_count = 0;
bool first_delimiter = true;
@ -3973,7 +3968,7 @@ Index: src/uniq.c
if (readlinebuffer_delim (thisline, stdin, delimiter) == 0)
{
if (ferror (stdin))
@@ -352,6 +572,15 @@ check_file (const char *infile, const ch
@@ -351,6 +571,15 @@ check_file (const char *infile, const ch
}
thisfield = find_field (thisline);
thislen = thisline->length - 1 - (thisfield - thisline->buffer);
@ -3989,7 +3984,7 @@ Index: src/uniq.c
match = !different (thisfield, prevfield, thislen, prevlen);
match_count += match;
@@ -384,6 +613,9 @@ check_file (const char *infile, const ch
@@ -383,6 +612,9 @@ check_file (const char *infile, const ch
SWAP_LINES (prevline, thisline);
prevfield = thisfield;
prevlen = thislen;
@ -3999,7 +3994,7 @@ Index: src/uniq.c
if (!match)
match_count = 0;
}
@@ -429,6 +661,19 @@ main (int argc, char **argv)
@@ -428,6 +660,19 @@ main (int argc, char **argv)
atexit (close_stdout);
@ -4021,9 +4016,9 @@ Index: src/uniq.c
check_chars = SIZE_MAX;
Index: tests/Makefile.am
===================================================================
--- tests/Makefile.am.orig 2010-12-17 07:35:51.000000000 +0100
+++ tests/Makefile.am 2011-01-05 14:05:49.316502343 +0100
@@ -234,6 +234,7 @@ TESTS = \
--- tests/Makefile.am.orig 2011-01-31 18:26:06.000000000 +0100
+++ tests/Makefile.am 2011-02-10 16:00:18.705365581 +0100
@@ -236,6 +236,7 @@ TESTS = \
misc/sort-debug-keys \
misc/sort-debug-warn \
misc/sort-files0-from \
@ -4031,7 +4026,7 @@ Index: tests/Makefile.am
misc/sort-float \
misc/sort-merge \
misc/sort-merge-fdlimit \
@@ -498,6 +499,10 @@ TESTS = \
@@ -505,6 +506,10 @@ TESTS = \
$(root_tests)
pr_data = \
@ -4044,8 +4039,8 @@ Index: tests/Makefile.am
pr/0FFnt \
Index: tests/misc/cut
===================================================================
--- tests/misc/cut.orig 2011-01-01 22:19:23.000000000 +0100
+++ tests/misc/cut 2011-01-05 14:06:41.365998730 +0100
--- tests/misc/cut.orig 2011-01-31 13:40:38.000000000 +0100
+++ tests/misc/cut 2011-02-10 16:00:18.981348087 +0100
@@ -26,7 +26,7 @@ use strict;
my $prog = 'cut';
my $try = "Try \`$prog --help' for more information.\n";
@ -4067,7 +4062,7 @@ Index: tests/misc/cut
Index: tests/misc/mb1.I
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ tests/misc/mb1.I 2011-01-05 14:05:49.384504297 +0100
+++ tests/misc/mb1.I 2011-02-10 15:59:59.632574982 +0100
@@ -0,0 +1,4 @@
+Apple10
+Banana5
@ -4076,7 +4071,7 @@ Index: tests/misc/mb1.I
Index: tests/misc/mb1.X
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ tests/misc/mb1.X 2011-01-05 14:05:49.425505477 +0100
+++ tests/misc/mb1.X 2011-02-10 15:59:59.673572383 +0100
@@ -0,0 +1,4 @@
+Banana5
+Apple10
@ -4085,7 +4080,7 @@ Index: tests/misc/mb1.X
Index: tests/misc/mb2.I
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ tests/misc/mb2.I 2011-01-05 14:05:49.451506224 +0100
+++ tests/misc/mb2.I 2011-02-10 15:59:59.698570797 +0100
@@ -0,0 +1,4 @@
+Apple1020
+Banana530
@ -4094,7 +4089,7 @@ Index: tests/misc/mb2.I
Index: tests/misc/mb2.X
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ tests/misc/mb2.X 2011-01-05 14:05:49.476506942 +0100
+++ tests/misc/mb2.X 2011-02-10 15:59:59.732568640 +0100
@@ -0,0 +1,4 @@
+Citrus205
+Cherry3010
@ -4103,7 +4098,7 @@ Index: tests/misc/mb2.X
Index: tests/misc/sort-mb-tests
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ tests/misc/sort-mb-tests 2011-01-05 14:05:49.518508150 +0100
+++ tests/misc/sort-mb-tests 2011-02-10 15:59:59.757567054 +0100
@@ -0,0 +1,58 @@
+#! /bin/sh
+case $# in

View File

@ -0,0 +1,50 @@
>From 43be5f4911f252ac298ac19865487f543c12db02 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Mon, 7 Feb 2011 08:29:33 +0100
Subject: [PATCH] cut: don't segfault for large unbounded range
* src/cut.c (set_fields): When computing the maximum range endpoint,
take into consideration the start of any unbounded range, like "999-".
* NEWS (Bug fixes): Mention it.
* tests/misc/cut (big-unbounded-b,c,f): Add tests.
Reported by Paul Marinescu in http://debbugs.gnu.org/7993
The bug was introduced on 2004-12-04 via commit 7380cf79.
---
NEWS | 6 ++++++
src/cut.c | 2 ++
tests/misc/cut | 4 ++++
3 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/src/cut.c b/src/cut.c
index 3f8e3e6..e2fe851 100644
--- a/src/cut.c
+++ b/src/cut.c
@@ -496,6 +496,8 @@ set_fields (const char *fieldstr)
if (rp[i].hi > max_range_endpoint)
max_range_endpoint = rp[i].hi;
}
+ if (max_range_endpoint < eol_range_start)
+ max_range_endpoint = eol_range_start;
/* Allocate an array large enough so that it may be indexed by
the field numbers corresponding to all finite ranges
diff --git a/tests/misc/cut b/tests/misc/cut
index 4353994..c905ba9 100755
--- a/tests/misc/cut
+++ b/tests/misc/cut
@@ -150,6 +150,10 @@ my @Tests =
{ERR=>$no_endpoint}],
['inval5', '-f', '1-,-', {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR=>$no_endpoint}],
['inval6', '-f', '-1,-', {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR=>$no_endpoint}],
+ # This would evoke a segfault from 5.3.0..6.10
+ ['big-unbounded-b', '--output-d=:', '-b1234567890-', {IN=>''}, {OUT=>''}],
+ ['big-unbounded-c', '--output-d=:', '-c1234567890-', {IN=>''}, {OUT=>''}],
+ ['big-unbounded-f', '--output-d=:', '-f1234567890-', {IN=>''}, {OUT=>''}],
);
@Tests = triple_test \@Tests;
--
1.7.4.2.g597a6

View File

@ -0,0 +1,182 @@
From: Pádraig Brady <P <at> draigBrady.com>
Subject: Re: coreutils-8.10 released [stable]
Newsgroups: gmane.comp.gnu.coreutils.general
Date: 2011-02-07 12:39:27 GMT (2 days, 22 hours and 55 minutes ago)
On 05/02/11 13:59, Jim Meyering wrote:
> Pádraig Brady wrote:
>> Yep, just did that, and got a couple of failures for sparse-fiemap
>> on and ext3 and loopback ext4 file systems.
>> On a very quick glance, I think cp is OK and that the filefrag
>> matching is a bit brittle.
>> Attached are filefrag outputs.
>
> I saw similar differences, but I think they were due to the fact that
> the kernel had not yet forced cp's metadata update to disk when filefrag
> does its FIEMAP ioctl
>
> Uncommenting the "sync" just after the "cp" in the sparse-fiemap test
> solved the problem (for me it arose only on rawhide's btrfs) but made
> the test take a lot more time, as mentioned in the comment.
It seems that the sync is needed for ext4 loopback also, on my system.
However for ext3, the extents between src and dst still don't match up.
My systems uses a 4K block size and is 2.6.35.10-72.fc14.i686
For now, I've disabled (indirectly) using ext3 for fiemap-perf and
sparse-fiemap in the attached.
> Instead of that sync, using filefrag's -s option may
> have the same result without the unwanted overhead.
That doesn't work actually which baffles me.
I got the e2fsprogs source rpm to verify that
FIEMAP_FLAG_SYNC was set, so I guess this is a kernel issue
(on ext4 loop back at least).
Though I was able to get a a working sync restricted to the file
by using dd in the attached patch.
Even with that, the test only takes about 10s on my old laptop, so
I didn't bother tagging the test as EXPENSIVE.
cheers,
Pádraig.
From 1da62d67ce4d4c78b98bc947c9367a10f1bdba9d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P <at> draigBrady.com>
Date: Fri, 4 Feb 2011 22:05:20 +0000
Subject: [PATCH] test: improve the fiemap_capable_ check
* tests/cp/fiemap-2: Enable the fiemap check for files, which
will enable the test on ext3.
* tests/cp/fiemap-perf: Comment why we're not enabling for ext3.
* tests/cp/sparse-fiemap: Ditto.
* tests/fiemap-capable: A new python script to determine
if a specified path supports fiemap.
* tests/init.cfg (fiemap_capable_): Use the new python script.
* tests/Makefile.am (EXTRA_DIST): Include the new python script.
---
tests/Makefile.am | 1 +
tests/cp/fiemap-2 | 3 ++-
tests/cp/fiemap-perf | 2 ++
tests/cp/sparse-fiemap | 12 ++++++++----
tests/fiemap-capable | 16 ++++++++++++++++
tests/init.cfg | 9 ++++-----
6 files changed, 33 insertions(+), 10 deletions(-)
create mode 100644 tests/fiemap-capable
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 751b327..8aa56cd 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -11,6 +11,7 @@ EXTRA_DIST = \
check.mk \
envvar-check \
filefrag-extent-compare \
+ fiemap-capable \
init.cfg \
init.sh \
lang-default \
diff --git a/tests/cp/fiemap-2 b/tests/cp/fiemap-2
index a17076c..691ead2 100755
--- a/tests/cp/fiemap-2
+++ b/tests/cp/fiemap-2
@@ -20,7 +20,8 @@
print_ver_ cp
# Require a fiemap-enabled FS.
-fiemap_capable_ . \
+touch fiemap_chk # check a file rather than current dir for best coverage
+fiemap_capable_ fiemap_chk \
|| skip_ "this file system lacks FIEMAP support"
# Exercise the code that handles a file ending in a hole.
diff --git a/tests/cp/fiemap-perf b/tests/cp/fiemap-perf
index 7369a7d..dbb2a81 100755
--- a/tests/cp/fiemap-perf
+++ b/tests/cp/fiemap-perf
@@ -20,6 +20,8 @@
print_ver_ cp
# Require a fiemap-enabled FS.
+# Note we don't check a file here as that could enable
+# the test on ext3 where emulated extent scanning can be slow.
fiemap_capable_ . \
|| skip_ "this file system lacks FIEMAP support"
diff --git a/tests/cp/sparse-fiemap b/tests/cp/sparse-fiemap
index f224b5b..fc27869 100755
--- a/tests/cp/sparse-fiemap
+++ b/tests/cp/sparse-fiemap
@@ -19,6 +19,8 @@
. "${srcdir=.}/init.sh"; path_prepend_ ../src
print_ver_ cp
+# Note we don't check a file here as that could enable
+# the test on ext3 where this test is seen to fail.
if fiemap_capable_ . ; then
: # Current dir is on a partition with working extents. Good!
else
@@ -66,11 +68,13 @@ for i in $(seq 1 2 21); do
$PERL -e 'BEGIN { $n = '$i' * 1024; *F = *STDOUT }' \
-e 'for (1..'$j') { sysseek (*F, $n, 1)' \
-e '&& syswrite (*F, chr($_)x$n) or die "$!"}' > j1 || fail=1
- # sync
+
+ # Note the explicit fdatasync is used here as
+ # it was seen that `filefrag -s` (FIEMAP_FLAG_SYNC) was
+ # ineffective on ext4 loopback on Linux 2.6.35.10-72.fc14.i686
+ dd if=/dev/null of=j1 conv=notrunc,fdatasync
cp --sparse=always j1 j2 || fail=1
- # sync
- # Technically we may need the 'sync' uses above, but
- # uncommenting them makes this test take much longer.
+ dd if=/dev/null of=j2 conv=notrunc,fdatasync
cmp j1 j2 || fail=1
filefrag -v j1 | grep extent \
diff --git a/tests/fiemap-capable b/tests/fiemap-capable
new file mode 100644
index 0000000..05c6926
--- /dev/null
+++ b/tests/fiemap-capable
@@ -0,0 +1,16 @@
+import struct, fcntl, sys, os
+
+def sizeof(t): return struct.calcsize(t)
+IOCPARM_MASK = 0x7f
+IOC_OUT = 0x40000000
+IOC_IN = 0x80000000
+IOC_INOUT = (IOC_IN|IOC_OUT)
+def _IOWR(x,y,t): return (IOC_INOUT|((sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|y)
+
+try:
+ fd = os.open (len (sys.argv) == 2 and sys.argv[1] or '.', os.O_RDONLY)
+ struct_fiemap = '=qqllll'
+ FS_IOC_FIEMAP = _IOWR (ord ('f'), 11, struct_fiemap)
+ fcntl.ioctl (fd, FS_IOC_FIEMAP, struct.pack(struct_fiemap, 0,~0,0,0,0,0))
+except:
+ sys.exit (1)
diff --git a/tests/init.cfg b/tests/init.cfg
index b2d1bab..f49c5cf 100644
--- a/tests/init.cfg
+++ b/tests/init.cfg
@@ -295,13 +295,12 @@ require_proc_pid_status_()
kill $pid
}
-# Return nonzero if the specified directory is on a file system for
-# which FIEMAP support exists, and the file system type is new enough
-# (unlike ext2 and ext3) that it is hard to find an instance *without*
-# FIEMAP support.
+# Return nonzero if the specified path is on a file system for
+# which FIEMAP support exists. Note some file systems (like ext3)
+# only support FIEMAP for files, not directories.
fiemap_capable_()
{
- df -T -t btrfs -t xfs -t ext4 -t ocfs2 -t gfs2 "$@"
+ python $abs_srcdir/fiemap-capable "$@"
}
# Does the current (working-dir) file system support sparse files?
--
1.7.3.4

View File

@ -1,3 +1,51 @@
-------------------------------------------------------------------
Thu Feb 10 14:35:49 CET 2011 - pth@suse.de
- Update to 8.10:
* Bug fixes
- du would abort with a failed assertion when two conditions are
met: part of the hierarchy being traversed is moved to a higher
level in the directory tree, and there is at least one more
command line directory argument following the one containing
the moved sub-tree. [bug introduced in coreutils-5.1.0]
- join --header now skips the ordering check for the first line
even if the other file is empty. [bug introduced in
coreutils-8.5]
- rm -f no longer fails for EINVAL or EILSEQ on file systems that
reject file names invalid for that file system.
- uniq -f NUM no longer tries to process fields after end of
line. [bug introduced in coreutils-7.0]
* New features
- cp now copies sparse files efficiently on file systems with
FIEMAP support (ext4, btrfs, xfs, ocfs2). Before, it had to
read 2^20 bytes when copying a 1MiB sparse file. Now, it
copies bytes only for the non-sparse sections of a file.
Similarly, to induce a hole in the output file, it had to
detect a long sequence of zero bytes. Now, it knows precisely
where each hole in an input file is, and can reproduce them
efficiently in the output file. mv also benefits when it
resorts to copying, e.g., between file systems.
- join now supports -o 'auto' which will automatically infer the
output format from the first line in each file, to ensure the
same number of fields are output for each line.
* Changes in behavior
- join no longer reports disorder when one of the files is empty.
This allows one to use join as a field extractor like:
join -a1 -o 1.3,1.1 - /dev/null
- Add upstream patch that fixes a segfault in cut.
- Add upstream patch to fix sparse fiemap tests.
- Fix i18n patch for join.
-------------------------------------------------------------------
Fri Jan 14 14:13:28 CET 2011 - uli@suse.de

View File

@ -23,8 +23,8 @@ BuildRequires: help2man libacl-devel libcap-devel libselinux-devel pam-devel xz
Url: http://www.gnu.org/software/coreutils/
License: GFDLv1.2 ; GPLv2+ ; GPLv3+
Group: System/Base
Version: 8.9
Release: 2
Version: 8.10
Release: 0
Provides: fileutils = %{version}, sh-utils = %{version}, stat = %version}, textutils = %{version}, mktemp = %{version}
Obsoletes: fileutils < %{version}, sh-utils < %{version}, stat < %version}, textutils < %{version}, mktemp < %{version}
Obsoletes: libselinux <= 1.23.11-3 libselinux-32bit = 9 libselinux-64bit = 9 libselinux-x86 = 9
@ -36,7 +36,6 @@ Source: coreutils-%{version}.tar.xz
Source1: su.pamd
Source2: su.default
Source3: baselibs.conf
Source4: coreutils-8.9.de.po
Patch0: coreutils-misc.patch
Patch1: coreutils-no_hostname_and_hostid.patch
Patch2: coreutils-gl_printf_safe.patch
@ -56,6 +55,10 @@ Patch30: coreutils-8.6-compile-su-with-fpie.diff
Patch31: coreutils-getaddrinfo.patch
Patch32: coreutils-ptr_int_casts.patch
Patch33: coreutils-8.9-singlethreaded-sort.patch
#Next two patches added after 8.10 release so should be obsolete with next release
Patch34: coreutils-compute_range_endpoint.patch
Patch35: coreutils-fix_sparse_fiemap_test.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# this will create a cycle, broken up randomly - coreutils is just too core to have other
# prerequires
@ -96,7 +99,8 @@ uname unexpand uniq unlink uptime users vdir wc who whoami yes
%patch31
%patch32
%patch33
cp %{S:4} po/de.po
%patch34 -p1
%patch35 -p1
%build
AUTOPOINT=true autoreconf -fi
@ -111,28 +115,28 @@ make %{?_smp_mflags} V=1
%install
%makeinstall
test -f $RPM_BUILD_ROOT%{_bindir}/su || \
install src/su $RPM_BUILD_ROOT%{_bindir}/su
install -d $RPM_BUILD_ROOT/bin
test -f %{buildroot}%{_bindir}/su || \
install src/su %{buildroot}%{_bindir}/su
install -d %{buildroot}/bin
for i in arch basename cat chgrp chmod chown cp date dd df echo false kill ln ls mkdir mknod mktemp mv pwd rm rmdir sleep sort stat stty su sync touch true uname readlink md5sum
do
mv $RPM_BUILD_ROOT%{_bindir}/$i $RPM_BUILD_ROOT/bin/$i
mv %{buildroot}%{_bindir}/$i %{buildroot}/bin/$i
test $i = su && echo -n '%%attr(4755,root,root) '
echo /bin/$i
done > bin.files
ln -sf ../../bin/{basename,sort,stat,touch,readlink,md5sum} $RPM_BUILD_ROOT%{_bindir}
install -d -m 755 $RPM_BUILD_ROOT/etc/pam.d
install -m 644 $RPM_SOURCE_DIR/su.pamd $RPM_BUILD_ROOT/etc/pam.d/su
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/{basename,sort,stat,touch,readlink,md5sum} %{buildroot}%{_bindir}
install -d -m 755 %{buildroot}/etc/pam.d
install -m 644 %{S:1} %{buildroot}/etc/pam.d/su
install -m 644 %{S:1} %{buildroot}/etc/pam.d/su-l
install -d -m 755 %{buildroot}/etc/default
install -m 644 %{S:2} %{buildroot}/etc/default/su
echo '.so man1/test.1' > %{buildroot}/%{_mandir}/man1/\[.1
%find_lang %name
%post
%install_info --info-dir=%{_infodir} %{_infodir}/coreutils.info.gz
# may fail if permissions is not there, but there is no way around that
%run_permissions
%set_permissions %{_bindir}/su
%postun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/coreutils.info.gz
@ -141,14 +145,14 @@ echo '.so man1/test.1' > %{buildroot}/%{_mandir}/man1/\[.1
%verify_permissions -e /bin/su
%clean
rm -rf $RPM_BUILD_ROOT
rm -rf %{buildroot}
%files -f bin.files
%defattr(-,root,root)
%doc README NEWS
%config /etc/pam.d/su
%config /etc/pam.d/su-l
%config(noreplace) /etc/default/su
%config %{_sysconfdir}/pam.d/su
%config %{_sysconfdir}/pam.d/su-l
%config(noreplace) %{_sysconfdir}/default/su
%{_bindir}/*
%{_libdir}/%{name}
%doc %{_infodir}/coreutils.info*.gz