summaryrefslogtreecommitdiffstats
path: root/abs/core-testing
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core-testing')
-rw-r--r--abs/core-testing/coreutils/PKGBUILD71
-rw-r--r--abs/core-testing/coreutils/coreutils-6.10-configuration.patch98
-rw-r--r--abs/core-testing/coreutils/coreutils-7.1-cp-recursiveinfloop.patch154
-rw-r--r--abs/core-testing/coreutils/coreutils-7.1-sort-endoffields.patch102
-rw-r--r--abs/core-testing/coreutils/coreutils-i18n.patch152
-rw-r--r--abs/core-testing/coreutils/coreutils-pam.patch26
-rw-r--r--abs/core-testing/coreutils/coreutils.install21
7 files changed, 484 insertions, 140 deletions
diff --git a/abs/core-testing/coreutils/PKGBUILD b/abs/core-testing/coreutils/PKGBUILD
index bb35755..b8418e9 100644
--- a/abs/core-testing/coreutils/PKGBUILD
+++ b/abs/core-testing/coreutils/PKGBUILD
@@ -1,62 +1,73 @@
-# $Id: PKGBUILD 2936 2008-06-16 06:21:37Z andyrtr $
-# Maintainer: judd <jvinet@zeroflux.org>
+# $Id: PKGBUILD 29340 2009-03-08 00:18:55Z andyrtr $
+# Maintainer: Andreas Radke <andyrtr@archlinux.org>
+# Contributor: judd <jvinet@zeroflux.org>
+
pkgname=coreutils
-pkgver=6.12
-pkgrel=10
+pkgver=7.1
+pkgrel=5
pkgdesc="The basic file, shell and text manipulation utilities of the GNU operating system"
arch=(i686 x86_64)
license=('GPL3')
url="http://www.gnu.org/software/coreutils"
groups=('base')
-depends=('glibc>=2.7-9' 'shadow>=4.0.18.2-2' 'pam>=1.0.1-1' 'acl>=2.2.47-1')
+depends=('glibc>=2.9-4' 'shadow>=4.1.2.1-2' 'pam>=1.0.3' 'acl>=2.2.47-1' 'gmp>=4.2.4')
provides=('mktemp')
conflicts=('mktemp')
replaces=('sh-utils' 'fileutils' 'textutils' 'mktemp')
backup=('etc/pam.d/su')
-options=('!emptydirs')
+install=${pkgname}.install
+options=('!emptydirs' '!makeflags')
source=(ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.gz
coreutils-i18n.patch
coreutils-uname.patch
coreutils-pam.patch
coreutils-6.10-configuration.patch
+ coreutils-7.1-sort-endoffields.patch
+ coreutils-7.1-cp-recursiveinfloop.patch
su)
-md5sums=('2ca9ac69823dbd567b905a9e9f53c4f6'
- '64991a860ddb98a9b7a2a5a0221a399a'
- '18d3ba178e2691242287b59bd81aedb9'
- '8810a22cdc05d502a69b59511e9abf79'
- 'e0f3edab474a4c96591c4f94a7962c9b'
- 'fa85e5cce5d723275b14365ba71a8aad')
build() {
- cd $startdir/src/$pkgname-$pkgver
-
- # only needed if new autoconf 2.62 is used
- autoreconf
+ cd ${srcdir}/${pkgname}-${pkgver}
# added pam patch and i18n patch from fedora cvs
- patch -Np1 -i ../coreutils-pam.patch || return 1
+# patch -Np1 -i ../coreutils-pam.patch || return 1
patch -Np1 -i ../coreutils-i18n.patch || return 1
patch -Np1 -i ../coreutils-6.10-configuration.patch || return 1
+
# from gentoo portage
patch -Np1 -i ../coreutils-uname.patch || return 1
- # make head and tail recognize the old syntax (eg, tail -10)
- export DEFAULT_POSIX2_VERSION=199209
- autoconf
- ./configure --prefix=/usr ac_cv_func_openat=no --enable-install-program=su --enable-pam
+ # bugfix patches from fedora
+ patch -Np1 -i ../coreutils-7.1-sort-endoffields.patch || return 1
+ patch -Np1 -i ../coreutils-7.1-cp-recursiveinfloop.patch || return 1
+
+ # only needed if new autoconf 2.62 is used
+ sed -i 's/1.10a/1.10.2/' configure.ac || return 1 # aclocal fix
+ sed -i 's/dist-xz/dist-lzma/' configure.ac || return 1
+ autoreconf -v
+
+ ./configure --prefix=/usr \
+ --enable-install-program=su \
+ --enable-pam ac_cv_func_openat=no || return 1
make || return 1
- make DESTDIR=$startdir/pkg install
- rm -f $startdir/pkg/usr/bin/hostname $startdir/pkg/usr/share/man/man1/hostname.1 || return 1
- rm -f $startdir/pkg/usr/bin/uptime $startdir/pkg/usr/share/man/man1/uptime.1 || return 1
- rm -f $startdir/pkg/usr/bin/groups $startdir/pkg/usr/share/man/man1/groups.1 || return 1
- rm -f $startdir/pkg/usr/bin/kill $startdir/pkg/usr/share/man/man1/kill.1|| return 1
- cd $startdir/pkg/usr/bin
- mkdir -p $startdir/pkg/bin $startdir/pkg/sbin $startdir/pkg/usr/sbin
+ make DESTDIR=${pkgdir} install || return 1
+
+ rm -f ${pkgdir}/usr/bin/hostname ${pkgdir}/usr/share/man/man1/hostname.1 || return 1
+ rm -f ${pkgdir}/usr/bin/uptime ${pkgdir}/usr/share/man/man1/uptime.1 || return 1
+ rm -f ${pkgdir}/usr/bin/groups ${pkgdir}/usr/share/man/man1/groups.1 || return 1
+ rm -f ${pkgdir}/usr/bin/kill ${pkgdir}/usr/share/man/man1/kill.1|| return 1
+ cd ${pkgdir}/usr/bin
+ mkdir -p ${pkgdir}/bin ${pkgdir}/sbin ${pkgdir}/usr/sbin
mv su date echo false pwd stty true uname cat tr cut readlink ../../bin
mv dd cp df du ln ls mv rm dir sync vdir chgrp chmod chown ../../bin
mv mkdir mknod rmdir shred touch mkfifo dircolors install sleep ../../bin
mv chroot ../sbin
ln -sf test [
- ln -sf /bin/sleep $startdir/pkg/usr/bin/sleep
- install -D -m644 $startdir/src/su $startdir/pkg/etc/pam.d/su
+ ln -sf /bin/sleep ${pkgdir}/usr/bin/sleep
+ install -D -m644 $startdir/src/su ${pkgdir}/etc/pam.d/su
+
+ ls -lha ${pkgdir}/bin/su
+ chmod -v 4555 ${pkgdir}/bin/su
+
+ rm -f ${pkgdir}/usr/share/info/dir
}
diff --git a/abs/core-testing/coreutils/coreutils-6.10-configuration.patch b/abs/core-testing/coreutils/coreutils-6.10-configuration.patch
index f80ab84..b9bddda 100644
--- a/abs/core-testing/coreutils/coreutils-6.10-configuration.patch
+++ b/abs/core-testing/coreutils/coreutils-6.10-configuration.patch
@@ -1,32 +1,9 @@
-diff -urN coreutils-6.12-orig/tests/misc/cut coreutils-6.12/tests/misc/cut
---- coreutils-6.12-orig/tests/misc/cut 2008-05-17 08:41:11.000000000 +0200
-+++ coreutils-6.12/tests/misc/cut 2008-06-02 11:13:08.000000000 +0200
-@@ -26,7 +26,7 @@
- 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 =
-@@ -140,8 +140,8 @@
- ['od-overlap5', '-b1-3,1-4', '--output-d=:', {IN=>"abcde\n"}, {OUT=>"abcd\n"}],
-
- # None of the following invalid ranges provoked an error up to coreutils-6.9.
-- ['inval1', qw(-f 2-0), {IN=>''}, {OUT=>''}, {EXIT=>1},
-- {ERR=>"$prog: invalid decreasing range\n$try"}],
-+ ['inval1', qw(-f 2-0), {IN=>''}, {OUT=>''}, {EXIT=>1},
-+ {ERR=>"$prog: invalid byte, character or field list\n$try"}],
- ['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 -urN coreutils-6.11-orig/tests/mkdir/selinux coreutils-6.11/tests/mkdir/selinux
--- coreutils-6.11-orig/tests/mkdir/selinux 2008-04-19 23:34:23.000000000 +0200
+++ coreutils-6.11/tests/mkdir/selinux 2008-04-22 13:23:50.000000000 +0200
@@ -38,6 +28,7 @@
# successfully, in spite of the invalid context string.
-
+
. $srcdir/test-lib.sh
+require_selinux_
@@ -46,17 +23,66 @@ diff -urNp coreutils-6.11-orig/tests/test-lib.sh coreutils-6.11/tests/test-lib.s
skip_test_ "this system (or maybe just" \
"the current file system) lacks SELinux support"
;;
-diff -urp coreutils-6.11-orig/gnulib-tests/test-getaddrinfo.c coreutils-6.11/gnulib-tests/test-getaddrinfo.c
---- coreutils-6.11-orig/gnulib-tests/test-getaddrinfo.c
-+++ coreutils-6.11/gnulib-tests/test-getaddrinfo.c
-@@ -70,6 +70,10 @@ int simple (char *host, char *service)
- if (res == EAI_NODATA)
- return 0;
-
-+ /* Do not fail this test for temporary name resolution errors. */
-+ if (res == EAI_AGAIN)
-+ return 0;
+diff -urNp coreutils-7.1-orig/gnulib-tests/test-getaddrinfo.c coreutils-7.1/gnulib-tests/test-getaddrinfo.c
+--- coreutils-7.1-orig/gnulib-tests/test-getaddrinfo.c 2009-01-27 21:33:19.000000000 +0100
++++ coreutils-7.1/gnulib-tests/test-getaddrinfo.c 2009-02-25 13:52:59.000000000 +0100
+@@ -36,6 +36,8 @@
+ # define dbgprintf if (0) printf
+ #endif
+
++static int skip = 0;
++
+ /* BeOS does not have AF_UNSPEC. */
+ #ifndef AF_UNSPEC
+ # define AF_UNSPEC 0
+@@ -52,6 +54,9 @@ int simple (char *host, char *service)
+ struct addrinfo *ai0, *ai;
+ int res;
+
++ if (skip)
++ return 0;
+
- return 1;
- }
+ dbgprintf ("Finding %s service %s...\n", host, service);
+ /* This initializes "hints" but does not use it. Is there a reason
+@@ -72,8 +77,12 @@ int simple (char *host, char *service)
+ in-law's farm. */
+ if (res == EAI_AGAIN)
+ {
+- fprintf (stderr, "skipping getaddrinfo test: no network?\n");
+- return 77;
++ if (!skip)
++ {
++ skip++;
++ fprintf (stderr, "skipping getaddrinfo test: no network?\n");
++ return 77;
++ }
+ }
+ /* IRIX reports EAI_NONAME for "https". Don't fail the test
+ merely because of this. */
+diff -urNp coreutils-7.1-orig/src/ls.c coreutils-7.1/src/ls.c
+--- coreutils-7.1-orig/src/ls.c 2009-02-25 13:23:59.000000000 +0100
++++ coreutils-7.1/src/ls.c 2009-02-25 13:25:20.000000000 +0100
+@@ -38,10 +38,6 @@
+ #include <config.h>
+ #include <sys/types.h>
+
+-#ifdef HAVE_CAP
+-# include <sys/capability.h>
+-#endif
+-
+ #if HAVE_TERMIOS_H
+ # include <termios.h>
+ #endif
+@@ -84,6 +80,10 @@
+ #include "system.h"
+ #include <fnmatch.h>
+
++#ifdef HAVE_CAP
++# include <sys/capability.h>
++#endif
++
+ #include "acl.h"
+ #include "argmatch.h"
+ #include "dev-ino.h"
+
diff --git a/abs/core-testing/coreutils/coreutils-7.1-cp-recursiveinfloop.patch b/abs/core-testing/coreutils/coreutils-7.1-cp-recursiveinfloop.patch
new file mode 100644
index 0000000..963af0b
--- /dev/null
+++ b/abs/core-testing/coreutils/coreutils-7.1-cp-recursiveinfloop.patch
@@ -0,0 +1,154 @@
+diff -urNp coreutils-7.1-orig/src/copy.c coreutils-7.1/src/copy.c
+--- coreutils-7.1-orig/src/copy.c 2009-02-27 12:07:29.000000000 +0100
++++ coreutils-7.1/src/copy.c 2009-02-27 12:14:29.000000000 +0100
+@@ -104,6 +104,7 @@ static bool copy_internal (char const *s
+ struct dir_list *ancestors,
+ const struct cp_options *x,
+ bool command_line_arg,
++ bool *first_dir_created_per_command_line_arg,
+ bool *copy_into_self,
+ bool *rename_succeeded);
+ static bool owner_failure_ok (struct cp_options const *x);
+@@ -201,13 +202,16 @@ copy_attr_by_name (char const *src_path,
+ DST_NAME_IN is a directory that was created previously in the
+ recursion. SRC_SB and ANCESTORS describe SRC_NAME_IN.
+ Set *COPY_INTO_SELF if SRC_NAME_IN is a parent of
++ FIRST_DIR_CREATED_PER_COMMAND_LINE_ARG FIXME
+ (or the same as) DST_NAME_IN; otherwise, clear it.
+ Return true if successful. */
+
+ static bool
+ copy_dir (char const *src_name_in, char const *dst_name_in, bool new_dst,
+ const struct stat *src_sb, struct dir_list *ancestors,
+- const struct cp_options *x, bool *copy_into_self)
++ const struct cp_options *x,
++ bool *first_dir_created_per_command_line_arg,
++ bool *copy_into_self)
+ {
+ char *name_space;
+ char *namep;
+@@ -237,12 +241,20 @@ copy_dir (char const *src_name_in, char
+
+ ok &= copy_internal (src_name, dst_name, new_dst, src_sb->st_dev,
+ ancestors, &non_command_line_options, false,
++ first_dir_created_per_command_line_arg,
+ &local_copy_into_self, NULL);
+ *copy_into_self |= local_copy_into_self;
+
+ free (dst_name);
+ free (src_name);
+
++ /* If we're copying into self, there's no point in continuing,
++ and in fact, that would even infloop, now that we record only
++ the first created directory per command line argument. */
++ if (local_copy_into_self)
++ break;
++
++
+ namep += strlen (namep) + 1;
+ }
+ free (name_space);
+@@ -1125,6 +1137,7 @@ restore_default_fscreatecon_or_die (void
+ not known. ANCESTORS points to a linked, null terminated list of
+ devices and inodes of parent directories of SRC_NAME. COMMAND_LINE_ARG
+ is true iff SRC_NAME was specified on the command line.
++ FIRST_DIR_CREATED_PER_COMMAND_LINE_ARG is both input and output.
+ Set *COPY_INTO_SELF if SRC_NAME is a parent of (or the
+ same as) DST_NAME; otherwise, clear it.
+ Return true if successful. */
+@@ -1135,6 +1148,7 @@ copy_internal (char const *src_name, cha
+ struct dir_list *ancestors,
+ const struct cp_options *x,
+ bool command_line_arg,
++ bool *first_dir_created_per_command_line_arg,
+ bool *copy_into_self,
+ bool *rename_succeeded)
+ {
+@@ -1815,11 +1829,15 @@ copy_internal (char const *src_name, cha
+ }
+ }
+
+- /* Insert the created directory's inode and device
+- numbers into the search structure, so that we can
+- avoid copying it again. */
+- if (!x->hard_link)
+- remember_copied (dst_name, dst_sb.st_ino, dst_sb.st_dev);
++ /* Record the created directory's inode and device numbers into
++ the search structure, so that we can avoid copying it again.
++ Do this only for the first directory that is created for each
++ source command line argument. */
++ if (!*first_dir_created_per_command_line_arg)
++ {
++ remember_copied (dst_name, dst_sb.st_ino, dst_sb.st_dev);
++ *first_dir_created_per_command_line_arg = true;
++ }
+
+ if (x->verbose)
+ emit_verbose (src_name, dst_name, NULL);
+@@ -1840,6 +1858,7 @@ copy_internal (char const *src_name, cha
+ in a source directory would cause the containing destination
+ directory not to have owner/perms set properly. */
+ delayed_ok = copy_dir (src_name, dst_name, new_dst, &src_sb, dir, x,
++ first_dir_created_per_command_line_arg,
+ copy_into_self);
+ }
+ }
+@@ -2187,8 +2206,11 @@ copy (char const *src_name, char const *
+ top_level_src_name = src_name;
+ top_level_dst_name = dst_name;
+
++ bool first_dir_created_per_command_line_arg = false;
+ return copy_internal (src_name, dst_name, nonexistent_dst, 0, NULL,
+- options, true, copy_into_self, rename_succeeded);
++ options, true,
++ &first_dir_created_per_command_line_arg,
++ copy_into_self, rename_succeeded);
+ }
+
+ /* Set *X to the default options for a value of type struct cp_options. */
+diff -urNp coreutils-7.1-orig/tests/cp/into-self coreutils-7.1/tests/cp/into-self
+--- coreutils-7.1-orig/tests/cp/into-self 2008-09-18 09:06:57.000000000 +0200
++++ coreutils-7.1/tests/cp/into-self 2009-02-27 12:16:21.000000000 +0100
+@@ -1,7 +1,7 @@
+ #!/bin/sh
+ # Confirm that copying a directory into itself gets a proper diagnostic.
+
+-# Copyright (C) 2001, 2002, 2004, 2006-2008 Free Software Foundation, Inc.
++# Copyright (C) 2001, 2002, 2004, 2006-2009 Free Software Foundation, Inc.
+
+ # This program is free software: you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+@@ -28,15 +28,32 @@ fi
+
+ . $srcdir/test-lib.sh
+
+-mkdir dir || framework_failure
++mkdir a dir || framework_failure
+
+ fail=0
+
+ # This command should exit nonzero.
+ cp -R dir dir 2> out && fail=1
++echo 1 >> out
++
++# This should, too. However, with coreutils-7.1 it would infloop.
++cp -rl dir dir 2>> out && fail=1
++echo 2 >> out
++
++cp -rl a dir dir 2>> out && fail=1
++echo 3 >> out
++cp -rl a dir dir 2>> out && fail=1
++echo 4 >> out
+
+ cat > exp <<\EOF
+ cp: cannot copy a directory, `dir', into itself, `dir/dir'
++1
++cp: cannot copy a directory, `dir', into itself, `dir/dir'
++2
++cp: cannot copy a directory, `dir', into itself, `dir/dir'
++3
++cp: cannot copy a directory, `dir', into itself, `dir/dir'
++4
+ EOF
+ #'
+
diff --git a/abs/core-testing/coreutils/coreutils-7.1-sort-endoffields.patch b/abs/core-testing/coreutils/coreutils-7.1-sort-endoffields.patch
new file mode 100644
index 0000000..45d1e28
--- /dev/null
+++ b/abs/core-testing/coreutils/coreutils-7.1-sort-endoffields.patch
@@ -0,0 +1,102 @@
+diff -urNp coreutils-7.1-orig/src/sort.c coreutils-7.1/src/sort.c
+--- coreutils-7.1-orig/src/sort.c 2009-02-25 16:15:52.000000000 +0100
++++ coreutils-7.1/src/sort.c 2009-02-25 16:20:35.000000000 +0100
+@@ -1598,6 +1598,9 @@ limfield_uni (const struct line *line, c
+ size_t eword = key->eword, echar = key->echar;
+ size_t remaining_bytes;
+
++ if (echar == 0)
++ eword++; /* skip all of end field. */
++
+ /* Move PTR past EWORD fields or to one past the last byte on LINE,
+ whichever comes first. If there are more than EWORD fields, leave
+ PTR pointing at the beginning of the field having zero-based index,
+@@ -1673,19 +1676,22 @@ limfield_uni (const struct line *line, c
+ }
+ #endif
+
+- /* If we're ignoring leading blanks when computing the End
+- of the field, don't start counting bytes until after skipping
+- past any leading blanks. */
+- if (key->skipeblanks)
+- while (ptr < lim && blanks[to_uchar (*ptr)])
+- ++ptr;
+
+- /* Advance PTR by ECHAR (if possible), but no further than LIM. */
+- remaining_bytes = lim - ptr;
+- if (echar < remaining_bytes)
+- ptr += echar;
+- else
+- ptr = lim;
++ if (echar != 0) /* We need to skip over a portion of the end field. */
++ {
++ if (key->skipeblanks) /* blanks not counted in echar. */
++ {
++ while (ptr < lim && blanks[to_uchar (*ptr)])
++ ++ptr;
++ }
++
++ /* Advance PTR by ECHAR (if possible), but no further than LIM. */
++ remaining_bytes = lim - ptr;
++ if (echar < remaining_bytes)
++ ptr += echar;
++ else
++ ptr = lim;
++ }
+
+ return ptr;
+ }
+@@ -3736,12 +3742,9 @@ main (int argc, char **argv)
+ badfieldspec (optarg, N_("field number is zero"));
+ }
+ if (*s == '.')
+- s = parse_field_count (s + 1, &key->echar,
+- N_("invalid number after `.'"));
+- else
+ {
+- /* `-k 2,3' is equivalent to `+1 -3'. */
+- key->eword++;
++ s = parse_field_count (s + 1, &key->echar,
++ N_("invalid number after `.'"));
+ }
+ s = set_ordering (s, key, bl_end);
+ }
+diff -urNp coreutils-7.1-orig/tests/misc/sort coreutils-7.1/tests/misc/sort
+--- coreutils-7.1-orig/tests/misc/sort 2009-01-27 22:11:25.000000000 +0100
++++ coreutils-7.1/tests/misc/sort 2009-02-25 16:21:48.000000000 +0100
+@@ -24,6 +24,10 @@ my $prog = 'sort';
+ # Turn off localization of executable's output.
+ @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
+
++my $mb_locale = $ENV{LOCALE_FR_UTF8};
++! defined $mb_locale || $mb_locale eq 'none'
++ and $mb_locale = 'C';
++
+ # Since each test is run with a file name and with redirected stdin,
+ # the name in the diagnostic is either the file name or "-".
+ # Normalize each diagnostic to use '-'.
+@@ -110,6 +114,8 @@ my @Tests =
+ ["07b", '-k 2,3', {IN=>"a a b\nz a a\n"}, {OUT=>"z a a\na a b\n"}],
+ ["07c", '-k 2,3', {IN=>"y k b\nz k a\n"}, {OUT=>"z k a\ny k b\n"}],
+ ["07d", '+1 -3', {IN=>"y k b\nz k a\n"}, {OUT=>"z k a\ny k b\n"}],
++["07e", '-k 2,3.0', {IN=>"a a b\nz a a\n"}, {OUT=>"z a a\na a b\n"}],
++
+ #
+ # report an error for `.' without following char spec
+ ["08a", '-k 2.,3', {EXIT=>2},
+@@ -210,6 +216,15 @@ my @Tests =
+ # key start and key end.
+ ["18e", '-nb -k1.1,1.2', {IN=>" 901\n100\n"}, {OUT=>"100\n 901\n"}],
+
++# When ignoring leading blanks for end position, ensure blanks from
++# next field are not included in the sort. I.E. order should not change here.
++["18f", '-k1,1b', {IN=>"a y\na z\n"}, {OUT=>"a y\na z\n"}],
++
++# When ignoring leading blanks for start position, ensure blanks from
++# next field are not included in the sort. I.E. order should not change here.
++# This was noticed as an issue on fedora 8 (only in multibyte locales).
++["18g", '-k1b,1', {IN=>"a y\na z\n"}, {OUT=>"a y\na z\n"},
++ {ENV => "LC_ALL=$mb_locale"}],
+ # This looks odd, but works properly -- 2nd keyspec is never
+ # used because all lines are different.
+ ["19a", '+0 +1nr', {IN=>"b 2\nb 1\nb 3\n"}, {OUT=>"b 1\nb 2\nb 3\n"}],
diff --git a/abs/core-testing/coreutils/coreutils-i18n.patch b/abs/core-testing/coreutils/coreutils-i18n.patch
index 1230c23..626bac0 100644
--- a/abs/core-testing/coreutils/coreutils-i18n.patch
+++ b/abs/core-testing/coreutils/coreutils-i18n.patch
@@ -1,3 +1,26 @@
+diff -urN coreutils-6.12-orig/tests/misc/cut coreutils-6.12/tests/misc/cut
+--- coreutils-6.12-orig/tests/misc/cut 2008-05-17 08:41:11.000000000 +0200
++++ coreutils-6.12/tests/misc/cut 2008-06-02 11:13:08.000000000 +0200
+@@ -26,7 +26,7 @@
+ 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 =
+@@ -140,8 +140,8 @@
+ ['od-overlap5', '-b1-3,1-4', '--output-d=:', {IN=>"abcde\n"}, {OUT=>"abcd\n"}],
+
+ # None of the following invalid ranges provoked an error up to coreutils-6.9.
+- ['inval1', qw(-f 2-0), {IN=>''}, {OUT=>''}, {EXIT=>1},
+- {ERR=>"$prog: invalid decreasing range\n$try"}],
++ ['inval1', qw(-f 2-0), {IN=>''}, {OUT=>''}, {EXIT=>1},
++ {ERR=>"$prog: invalid byte, character or field list\n$try"}],
+ ['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}],
--- /dev/null 2007-03-01 09:16:39.219409909 +0000
+++ coreutils-6.8+/tests/misc/sort-mb-tests 2007-03-01 15:08:24.000000000 +0000
@@ -0,0 +1,58 @@
@@ -90,14 +113,14 @@
diff -urN coreutils-6.12-orig/tests/Makefile.am coreutils-6.12/tests/Makefile.am
--- coreutils-6.12-orig/tests/Makefile.am 2008-05-27 13:47:53.000000000 +0200
+++ coreutils-6.12/tests/Makefile.am 2008-06-02 10:06:03.000000000 +0200
-@@ -191,6 +191,7 @@
- misc/shuf \
+@@ -192,6 +192,7 @@
misc/sort \
misc/sort-compress \
+ misc/sort-files0-from \
+ misc/sort-mb-tests \
misc/sort-merge \
misc/sort-rand \
- misc/split-a \
+ misc/sort-version \
@@ -391,6 +392,10 @@
$(root_tests)
@@ -331,7 +354,7 @@ diff -urN coreutils-6.12-orig/tests/Makefile.am coreutils-6.12/tests/Makefile.am
error (EXIT_FAILURE, errno, "-");
--- coreutils-6.8+/src/join.c.i18n 2007-01-14 15:41:28.000000000 +0000
+++ coreutils-6.8+/src/join.c 2007-03-01 15:08:24.000000000 +0000
-@@ -23,17 +23,31 @@
+@@ -23,16 +23,30 @@
#include <sys/types.h>
#include <getopt.h>
@@ -347,7 +370,6 @@ diff -urN coreutils-6.12-orig/tests/Makefile.am coreutils-6.12/tests/Makefile.am
+
#include "system.h"
#include "error.h"
- #include "hard-locale.h"
#include "linebuffer.h"
-#include "memcasecmp.h"
#include "quote.h"
@@ -379,17 +401,8 @@ diff -urN coreutils-6.12-orig/tests/Makefile.am coreutils-6.12/tests/Makefile.am
+/* The number of bytes used for tab. */
+static size_t tablen = 0;
- static struct option const longopts[] =
- {
-@@ -190,6 +206,8 @@
-
- /* Fill in the `fields' structure in LINE. */
-
-+/* Fill in the `fields' structure in LINE. */
-+
- static void
- xfields (struct line *line)
- {
+ /* If nonzero, check that the input is correctly ordered. */
+ static enum
@@ -199,10 +217,11 @@
if (ptr == lim)
return;
@@ -549,22 +562,10 @@ diff -urN coreutils-6.12-orig/tests/Makefile.am coreutils-6.12/tests/Makefile.am
+ extract_field (line, ptr, lim - ptr);
+}
+#endif
-+
- /* Read a line from FP into LINE and split it into fields.
- Return true if successful. */
-
-@@ -249,6 +410,11 @@
- line->nfields_allocated = 0;
- line->nfields = 0;
- line->fields = NULL;
-+#if HAVE_MBRTOWC
-+ if (MB_CUR_MAX > 1)
-+ xfields_multibyte (line);
-+ else
-+#endif
- xfields (line);
- return true;
- }
++
+ static void
+ freeline (struct line *line)
+ {
@@ -377,11 +601,18 @@
/* Print the join of LINE1 and LINE2. */
@@ -703,7 +704,7 @@ diff -urNp coreutils-6.11-orig/src/join.c coreutils-6.11/src/join.c
- size_t len2; /* Length of fields to compare. */
+ char *beg[2];
+ char *copy[2];
-+ size_t len[2]; /* Length of fields to compare. */
++ size_t len[2]; /* Length of fields to compare. */
int diff;
+ int i, j;
@@ -830,7 +831,7 @@ diff -urNp coreutils-6.11-orig/src/join.c coreutils-6.11/src/join.c
+ return len[0] - len[1];
}
- /* Check that successive input lines PREV and CURRENT from input file
+ /* Check that successive input lines PREV and CURRENT from input file
--- coreutils-6.8+/src/uniq.c.i18n 2007-01-14 15:41:28.000000000 +0000
+++ coreutils-6.8+/src/uniq.c 2007-03-01 15:08:24.000000000 +0000
@@ -23,6 +23,16 @@
@@ -886,13 +887,13 @@ diff -urNp coreutils-6.11-orig/src/join.c coreutils-6.11/src/join.c
return a pointer to the beginning of the line's field to be compared. */
static char *
--find_field (const struct linebuffer *line)
+-find_field (struct linebuffer const *line)
+find_field_uni (struct linebuffer *line)
{
size_t count;
- char *lp = line->buffer;
+ char const *lp = line->buffer;
@@ -219,6 +245,83 @@
- return lp + i;
+ return line->buffer + i;
}
+#if HAVE_MBRTOWC
@@ -1235,9 +1236,9 @@ diff -urNp coreutils-6.11-orig/src/join.c coreutils-6.11/src/join.c
#define TAB_WIDTH 8
/* The official name of this program (e.g., no `g' prefix). */
-@@ -35,23 +57,44 @@
+@@ -35,20 +57,41 @@
- #define AUTHORS "David MacKenzie"
+ #define AUTHORS proper_name ("David MacKenzie")
+#define FATAL_ERROR(Message) \
+ do \
@@ -1259,9 +1260,6 @@ diff -urNp coreutils-6.11-orig/src/join.c coreutils-6.11/src/join.c
+ character_mode,
+};
+
- /* The name this program was run with. */
- char *program_name;
-
+/* The argument shows current mode. (Default: column_mode) */
+static enum operating_mode operating_mode;
+
@@ -1756,7 +1754,7 @@ diff -urNp coreutils-6.11-orig/src/join.c coreutils-6.11/src/join.c
if (hard_LC_TIME)
{
@@ -1031,6 +1100,64 @@
- #endif
+ xstrtol_fatal (e, oi, c, long_options, s);
}
+#if HAVE_MBRTOWC
@@ -1819,7 +1817,7 @@ diff -urNp coreutils-6.11-orig/src/join.c coreutils-6.11/src/join.c
+
/* Specify the amount of main memory to use when sorting. */
static void
- specify_sort_size (char const *s)
+ specify_sort_size (int oi, char c, char const *s)
@@ -1241,7 +1368,7 @@
by KEY in LINE. */
@@ -1940,7 +1938,7 @@ diff -urNp coreutils-6.11-orig/src/join.c coreutils-6.11/src/join.c
if (newlim)
lim = newlim;
}
-@@ -1384,6 +1570,107 @@
+@@ -1384,6 +1570,113 @@
return ptr;
}
@@ -1954,6 +1952,9 @@ diff -urNp coreutils-6.11-orig/src/join.c coreutils-6.11/src/join.c
+ size_t mblength;
+ mbstate_t state;
+
++ if (echar == 0)
++ eword++; /* skip all of end field. */
++
+ memset (&state, '\0', sizeof(mbstate_t));
+
+ if (tab_length)
@@ -2022,24 +2023,27 @@ diff -urNp coreutils-6.11-orig/src/join.c coreutils-6.11/src/join.c
+ }
+# endif
+
-+ /* If we're skipping leading blanks, don't start counting characters
-+ * until after skipping past any leading blanks. */
-+ if (key->skipsblanks)
-+ while (ptr < lim && ismbblank (ptr, lim - ptr, &mblength))
-+ ptr += mblength;
++ if (echar != 0)
++ {
++ /* If we're skipping leading blanks, don't start counting characters
++ * until after skipping past any leading blanks. */
++ if (key->skipsblanks)
++ while (ptr < lim && ismbblank (ptr, lim - ptr, &mblength))
++ ptr += mblength;
+
-+ memset (&state, '\0', sizeof(mbstate_t));
++ memset (&state, '\0', sizeof(mbstate_t));
+
-+ /* Advance PTR by ECHAR (if possible), but no further than LIM. */
-+ for (i = 0; i < echar; i++)
-+ {
-+ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state);
++ /* Advance PTR by ECHAR (if possible), but no further than LIM. */
++ for (i = 0; i < echar; i++)
++ {
++ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state);
+
-+ if (ptr + mblength > lim)
-+ break;
-+ else
-+ ptr += mblength;
-+ }
++ if (ptr + mblength > lim)
++ break;
++ else
++ ptr += mblength;
++ }
++ }
+
+ return ptr;
+}
@@ -2760,7 +2764,7 @@ diff -urNp coreutils-6.11-orig/src/join.c coreutils-6.11/src/join.c
+
#include "system.h"
#include "error.h"
- #include "hard-locale.h"
+ #include "mbswidth.h"
@@ -324,6 +350,18 @@
#include "strftime.h"
#include "xstrtol.h"
@@ -2865,11 +2869,11 @@ diff -urNp coreutils-6.11-orig/src/join.c coreutils-6.11/src/join.c
line of 1st page printed). */
@@ -696,6 +756,7 @@
-a|COLUMN|-m is a `space' and with the -J option a `tab'. */
- static char *col_sep_string = "";
+ static char *col_sep_string = (char *) "";
static int col_sep_length = 0;
+static int col_sep_width = 0;
- static char *column_separator = " ";
- static char *line_separator = "\t";
+ static char *column_separator = (char *) " ";
+ static char *line_separator = (char *) "\t";
@@ -852,6 +913,13 @@
col_sep_length = (int) strlen (optarg_S);
@@ -2951,7 +2955,7 @@ diff -urNp coreutils-6.11-orig/src/join.c coreutils-6.11/src/join.c
@@ -1031,7 +1122,7 @@
old_s = false;
/* Reset an additional input of -s, -S dominates -s */
- col_sep_string = "";
+ col_sep_string = bad_cast ("");
- col_sep_length = 0;
+ col_sep_length = col_sep_width = 0;
use_col_separator = true;
@@ -3921,7 +3925,7 @@ diff -urNp coreutils-6.11-orig/src/join.c coreutils-6.11/src/join.c
+ size_t delimlen = 0;
initialize_main (&argc, &argv);
- program_name = argv[0];
+ set_program_name (argv[0]);
@@ -770,7 +1090,6 @@
switch (optc)
{
@@ -4043,3 +4047,19 @@ diff -urNp coreutils-6.11-orig/src/join.c coreutils-6.11/src/join.c
}
if (optind == argc)
+diff -urNp coreutils-6.12/src/join.c coreutils-6.12-orig/src/join.c
+--- coreutils-6.12/src/join.c 2008-07-16 14:08:01.000000000 +0200
++++ coreutils-6.12-orig/src/join.c 2008-07-16 14:07:02.000000000 +0200
+@@ -634,6 +634,11 @@ get_line (FILE *fp, struct line *line, i
+ return false;
+ }
+
++#if HAVE_MBRTOWC
++ if (MB_CUR_MAX > 1)
++ xfields_multibyte (line);
++ else
++#endif
+ xfields (line);
+
+ if (prevline[which - 1])
+
diff --git a/abs/core-testing/coreutils/coreutils-pam.patch b/abs/core-testing/coreutils/coreutils-pam.patch
index 8593ecc..7171522 100644
--- a/abs/core-testing/coreutils/coreutils-pam.patch
+++ b/abs/core-testing/coreutils/coreutils-pam.patch
@@ -49,11 +49,11 @@
#define DEFAULT_USER "root"
+#ifndef USE_PAM
- char *crypt ();
+ char *crypt (char const *key, char const *salt);
+#endif
- char *getusershell ();
- void endusershell ();
- void setusershell ();
+ char *getusershell (void);
+ void endusershell (void);
+ void setusershell (void);
extern char **environ;
@@ -66,8 +66,8 @@
ATTRIBUTE_NORETURN;
+#endif
- /* The name this program was run with. */
- char *program_name;
+ /* If true, pass the `-f' option to the subshell. */
+ static bool fast_startup;
@@ -225,7 +251,26 @@
}
#endif
@@ -361,6 +361,15 @@
The program accepts the following options. Also see @ref{Common options}.
+@@ -12815,6 +12815,8 @@
+ @env{PATH} to a compiled-in default value. Change to @var{user}'s home
+ directory. Prepend @samp{-} to the shell's name, intended to make it
+ read its login startup file(s).
++Additionaly @env{DISPLAY} and @env{XAUTHORITY} environment variables
++are preserved as well for PAM functionality.
+
+ @item -m
+ @itemx -p
@@ -13477,33 +13480,6 @@
the exit status of the subshell otherwise
@end display
@@ -392,8 +401,8 @@
-might find this idea strange at first.
-
-
- @node Process control
- @chapter Process control
+ @node timeout invocation
+ @section @command{timeout}: Run a command with a time limit
--- coreutils-6.7/configure.ac.pam 2006-12-07 21:30:24.000000000 +0000
+++ coreutils-6.7/configure.ac 2007-01-09 17:18:04.000000000 +0000
@@ -411,3 +420,4 @@
AC_FUNC_FORK
optional_bin_progs=
+
diff --git a/abs/core-testing/coreutils/coreutils.install b/abs/core-testing/coreutils/coreutils.install
new file mode 100644
index 0000000..37ebe29
--- /dev/null
+++ b/abs/core-testing/coreutils/coreutils.install
@@ -0,0 +1,21 @@
+infodir=/usr/share/info
+filelist=(coreutils.info)
+
+post_install() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ usr/bin/install-info $infodir/$file $infodir/dir 2> /dev/null
+ done
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ usr/bin/install-info --delete $infodir/$file $infodir/dir 2> /dev/null
+ done
+}
+