From e975f8daa87431fe9bbd1d725a2628d55098809cf8958bd3c46220d23b3f740f Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 23 Jul 2007 17:57:03 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/coreutils?expand=0&rev=11 --- coreutils-6.9.diff | 26 ++++++++++++++++++++------ coreutils.changes | 7 +++++++ coreutils.spec | 14 +++++++++++--- i18n-random.diff | 14 ++++++++++++++ misalign.diff | 18 ++++++++++++++++++ 5 files changed, 70 insertions(+), 9 deletions(-) create mode 100644 i18n-random.diff create mode 100644 misalign.diff diff --git a/coreutils-6.9.diff b/coreutils-6.9.diff index 977ff3d..023f187 100644 --- a/coreutils-6.9.diff +++ b/coreutils-6.9.diff @@ -11,7 +11,7 @@ Index: doc/coreutils.texi * id: (coreutils)id invocation. Print user identity. * install: (coreutils)install invocation. Copy and change attributes. * join: (coreutils)join invocation. Join lines on a common field. -@@ -399,8 +397,6 @@ +@@ -399,8 +397,6 @@ System context * date invocation:: Print or set system date and time * uname invocation:: Print system information @@ -20,7 +20,7 @@ Index: doc/coreutils.texi @command{date}: Print or set system date and time -@@ -12306,8 +12302,6 @@ +@@ -12306,8 +12302,6 @@ information. @menu * date invocation:: Print or set system date and time. * uname invocation:: Print system information. @@ -29,7 +29,7 @@ Index: doc/coreutils.texi @end menu -@@ -13065,55 +13059,6 @@ +@@ -13065,55 +13059,6 @@ Print the kernel version. @exitstatus @@ -85,9 +85,23 @@ Index: doc/coreutils.texi @node Modified command invocation @chapter Modified command invocation +--- src/sort.c ++++ src/sort.c +@@ -3517,10 +3517,7 @@ main (int argc, char **argv) + if (! (key->sword | key->schar)) + key->sword = SIZE_MAX; + if (! s || *set_ordering (s, key, bl_start)) +- { +- free (key); +- key = NULL; +- } ++ key = NULL; + else + { + if (minus_pos_usage) --- src/system.h +++ src/system.h -@@ -168,7 +168,7 @@ +@@ -168,7 +168,7 @@ enum # define DEV_BSIZE BBSIZE #endif #ifndef DEV_BSIZE @@ -98,7 +112,7 @@ Index: doc/coreutils.texi /* Extract or fake data from a `struct stat'. --- tests/help-version +++ tests/help-version -@@ -197,7 +197,7 @@ +@@ -197,7 +197,7 @@ lbracket_args=": ]" for i in $all_programs; do # Skip these. @@ -109,7 +123,7 @@ Index: doc/coreutils.texi echo > $tmp_in --- tests/other-fs-tmpdir +++ tests/other-fs-tmpdir -@@ -44,6 +44,8 @@ +@@ -44,6 +44,8 @@ for d in $CANDIDATE_TMP_DIRS; do fi done diff --git a/coreutils.changes b/coreutils.changes index 73048fd..fe9a28f 100644 --- a/coreutils.changes +++ b/coreutils.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Jul 23 15:15:11 CEST 2007 - schwab@suse.de + +- Fix random sort. +- Fix invalid free. +- Fix misalignment. + ------------------------------------------------------------------- Sun May 20 19:17:21 CEST 2007 - schwab@suse.de diff --git a/coreutils.spec b/coreutils.spec index 8568e14..b93aa73 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -13,15 +13,15 @@ Name: coreutils BuildRequires: help2man libacl-devel pam-devel URL: http://www.gnu.org/software/coreutils/ -License: GNU General Public License (GPL) +License: GPL v2 or later Group: System/Base -Provides: fileutil fileutils sh-utils sh_utils shellutl stat textutil textutils textutl txtutils +Provides: fileutils sh-utils stat textutils Obsoletes: fileutils sh-utils stat textutils Obsoletes: libselinux <= 1.23.11-3 libselinux-32bit >= 9 libselinux-64bit = 9 libselinux-x86 = 9 Autoreqprov: on PreReq: %{install_info_prereq} Version: 6.9 -Release: 16 +Release: 30 Summary: GNU Core Utilities Source: coreutils-%{version}.tar.bz2 Source1: su.pamd @@ -37,6 +37,8 @@ Patch8: coreutils-sysinfo.diff Patch9: ls-x.diff Patch10: futimens.diff Patch11: i18n-monthsort.diff +Patch12: i18n-random.diff +Patch13: misalign.diff Patch16: invalid-ids.diff Patch17: no-no.diff Patch20: coreutils-6.8-su.diff @@ -107,6 +109,8 @@ Authors: chmod +x tests/ls/x-option %patch10 %patch11 +%patch12 +%patch13 -p1 %patch16 -p1 %patch17 %patch20 @@ -178,6 +182,10 @@ rm -rf $RPM_BUILD_ROOT %dir %{_prefix}/share/locale/*/LC_TIME %changelog +* Mon Jul 23 2007 - schwab@suse.de +- Fix random sort. +- Fix invalid free. +- Fix misalignment. * Sun May 20 2007 - schwab@suse.de - Fix compiling with glibc 2.6. * Sun May 20 2007 - schwab@suse.de diff --git a/i18n-random.diff b/i18n-random.diff new file mode 100644 index 0000000..255edc2 --- /dev/null +++ b/i18n-random.diff @@ -0,0 +1,14 @@ +--- src/sort.c ++++ src/sort.c +@@ -2341,7 +2341,10 @@ keycompare_mb (const struct line *a, con + size_t lenb = limb <= textb ? 0 : limb - textb; + + /* Actually compare the fields. */ +- if (key->numeric | key->general_numeric) ++ ++ if (key->random) ++ diff = compare_random (texta, lena, textb, lenb); ++ else if (key->numeric | key->general_numeric) + { + char savea = *lima, saveb = *limb; + diff --git a/misalign.diff b/misalign.diff new file mode 100644 index 0000000..410a8ed --- /dev/null +++ b/misalign.diff @@ -0,0 +1,18 @@ +2007-07-23 Andreas Schwab + + * src/sort.c (fillbuf): Make sure the buffer limit is always + aligned after the buffer was grown. + +diff --git a/src/sort.c b/src/sort.c +index 824dd0d..6024be7 100644 +--- a/src/sort.c ++++ b/src/sort.c +@@ -1492,6 +1492,8 @@ fillbuf (struct buffer *buf, FILE *fp, char const *file) + /* The current input line is too long to fit in the buffer. + Double the buffer size and try again. */ + buf->buf = X2REALLOC (buf->buf, &buf->alloc); ++ /* Realign buffer limit. */ ++ buf->alloc -= buf->alloc % sizeof (struct line); + } + } +