forked from pool/coreutils
Accepting request 114847 from Base:System
Update to 8.16 + Security fix already released for SLES OBS-URL: https://build.opensuse.org/request/show/114847 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/coreutils?expand=0&rev=75
This commit is contained in:
parent
69e0b79197
commit
9c9a8d0166
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8fbae6e7639e09eb367ba2c0238b407ea571d44f832a98b0b4112812cc502186
|
||||
size 98088
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:837eb377414eae463fee17d0f77e6d76bed79b87bc97ef0c23887710107fd49c
|
||||
size 4943172
|
3
coreutils-8.16.de.po.xz
Normal file
3
coreutils-8.16.de.po.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1bc7a83591e12aea216f73f8b0667779886c35518737240b26d6d7d3d7b6a87e
|
||||
size 98512
|
3
coreutils-8.16.tar.xz
Normal file
3
coreutils-8.16.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2a458fead15d9336f46bb4304cc3eaa6ed9407b9130e7ee2ec533909881d2067
|
||||
size 5042844
|
@ -8,11 +8,11 @@ Subject: [PATCH 7/7] compile su with -fpie
|
||||
src/Makefile.am | 5 +++++
|
||||
2 files changed, 6 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/lib/Makefile.am b/lib/Makefile.am
|
||||
index b4a591b..059928e 100644
|
||||
--- a/lib/Makefile.am
|
||||
+++ b/lib/Makefile.am
|
||||
@@ -17,7 +17,7 @@
|
||||
Index: lib/Makefile.am
|
||||
===================================================================
|
||||
--- lib/Makefile.am.orig 2012-04-16 13:18:02.444819167 +0200
|
||||
+++ lib/Makefile.am 2012-04-16 13:18:07.729692419 +0200
|
||||
@@ -28,7 +28,7 @@ noinst_LIBRARIES =
|
||||
|
||||
include gnulib.mk
|
||||
|
||||
@ -21,11 +21,11 @@ index b4a591b..059928e 100644
|
||||
|
||||
libcoreutils_a_SOURCES += \
|
||||
buffer-lcm.c buffer-lcm.h
|
||||
diff --git a/src/Makefile.am b/src/Makefile.am
|
||||
index 484f6c2..17600af 100644
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -355,6 +355,11 @@ uptime_LDADD += $(GETLOADAVG_LIBS)
|
||||
Index: src/Makefile.am
|
||||
===================================================================
|
||||
--- src/Makefile.am.orig 2012-04-16 13:18:07.714692779 +0200
|
||||
+++ src/Makefile.am 2012-04-16 13:18:07.730692395 +0200
|
||||
@@ -361,6 +361,11 @@ uptime_LDADD += $(GETLOADAVG_LIBS)
|
||||
su_SOURCES = su.c getdef.c
|
||||
su_LDADD += $(LIB_CRYPT) $(PAM_LIBS)
|
||||
|
||||
@ -37,6 +37,3 @@ index 484f6c2..17600af 100644
|
||||
# for various ACL functions
|
||||
copy_LDADD += $(LIB_ACL)
|
||||
ls_LDADD += $(LIB_ACL)
|
||||
--
|
||||
1.7.1
|
||||
|
||||
|
@ -12,11 +12,11 @@ Subject: [PATCH 5/7] honor settings in /etc/default/su resp /etc/login.defs
|
||||
create mode 100644 src/getdef.c
|
||||
create mode 100644 src/getdef.h
|
||||
|
||||
diff --git a/src/Makefile.am b/src/Makefile.am
|
||||
index bc27274..484f6c2 100644
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -352,6 +352,7 @@ factor_LDADD += $(LIB_GMP)
|
||||
Index: src/Makefile.am
|
||||
===================================================================
|
||||
--- src/Makefile.am.orig 2012-04-16 13:18:07.682693547 +0200
|
||||
+++ src/Makefile.am 2012-04-16 13:18:34.609047413 +0200
|
||||
@@ -358,6 +358,7 @@ factor_LDADD += $(LIB_GMP)
|
||||
uptime_LDADD += $(GETLOADAVG_LIBS)
|
||||
|
||||
# for crypt and pam
|
||||
@ -24,11 +24,10 @@ index bc27274..484f6c2 100644
|
||||
su_LDADD += $(LIB_CRYPT) $(PAM_LIBS)
|
||||
|
||||
# for various ACL functions
|
||||
diff --git a/src/getdef.c b/src/getdef.c
|
||||
new file mode 100644
|
||||
index 0000000..e1872cf
|
||||
--- /dev/null
|
||||
+++ b/src/getdef.c
|
||||
Index: src/getdef.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ src/getdef.c 2012-04-16 13:18:07.714692779 +0200
|
||||
@@ -0,0 +1,259 @@
|
||||
+/* Copyright (C) 2003, 2004, 2005 Thorsten Kukuk
|
||||
+ Author: Thorsten Kukuk <kukuk@suse.de>
|
||||
@ -289,11 +288,10 @@ index 0000000..e1872cf
|
||||
+}
|
||||
+
|
||||
+#endif
|
||||
diff --git a/src/getdef.h b/src/getdef.h
|
||||
new file mode 100644
|
||||
index 0000000..2e86cf9
|
||||
--- /dev/null
|
||||
+++ b/src/getdef.h
|
||||
Index: src/getdef.h
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ src/getdef.h 2012-04-16 13:18:07.714692779 +0200
|
||||
@@ -0,0 +1,29 @@
|
||||
+/* Copyright (C) 2003, 2005 Thorsten Kukuk
|
||||
+ Author: Thorsten Kukuk <kukuk@suse.de>
|
||||
@ -324,10 +322,10 @@ index 0000000..2e86cf9
|
||||
+extern void free_getdef_data (void);
|
||||
+
|
||||
+#endif /* _GETDEF_H_ */
|
||||
diff --git a/src/su.c b/src/su.c
|
||||
index 0071622..eaef195 100644
|
||||
--- a/src/su.c
|
||||
+++ b/src/su.c
|
||||
Index: src/su.c
|
||||
===================================================================
|
||||
--- src/su.c.orig 2012-04-16 13:18:07.706692971 +0200
|
||||
+++ src/su.c 2012-04-16 13:18:34.630046909 +0200
|
||||
@@ -111,6 +111,8 @@
|
||||
# include <paths.h>
|
||||
#endif
|
||||
@ -337,7 +335,7 @@ index 0071622..eaef195 100644
|
||||
/* The default PATH for simulated logins to non-superuser accounts. */
|
||||
#define DEFAULT_LOGIN_PATH "/usr/local/bin:/bin:/usr/bin"
|
||||
|
||||
@@ -475,8 +477,8 @@ modify_environment (const struct passwd *pw, const char *shell)
|
||||
@@ -478,8 +480,8 @@ modify_environment (const struct passwd
|
||||
xsetenv ("USER", pw->pw_name);
|
||||
xsetenv ("LOGNAME", pw->pw_name);
|
||||
xsetenv ("PATH", (pw->pw_uid
|
||||
@ -348,7 +346,7 @@ index 0071622..eaef195 100644
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -486,6 +488,12 @@ modify_environment (const struct passwd *pw, const char *shell)
|
||||
@@ -489,6 +491,12 @@ modify_environment (const struct passwd
|
||||
{
|
||||
xsetenv ("HOME", pw->pw_dir);
|
||||
xsetenv ("SHELL", shell);
|
||||
@ -361,7 +359,7 @@ index 0071622..eaef195 100644
|
||||
if (pw->pw_uid)
|
||||
{
|
||||
xsetenv ("USER", pw->pw_name);
|
||||
@@ -720,6 +728,7 @@ main (int argc, char **argv)
|
||||
@@ -722,6 +730,7 @@ main (int argc, char **argv)
|
||||
#ifdef SYSLOG_FAILURE
|
||||
log_su (pw, false);
|
||||
#endif
|
||||
@ -369,6 +367,3 @@ index 0071622..eaef195 100644
|
||||
error (EXIT_CANCELED, 0, _("incorrect password"));
|
||||
}
|
||||
#ifdef SYSLOG_SUCCESS
|
||||
--
|
||||
1.7.1
|
||||
|
||||
|
@ -7,11 +7,11 @@ Subject: [PATCH 6/7] make sure /sbin resp /usr/sbin are in PATH
|
||||
src/su.c | 127 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 files changed, 127 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/src/su.c b/src/su.c
|
||||
index eaef195..d78f968 100644
|
||||
--- a/src/su.c
|
||||
+++ b/src/su.c
|
||||
@@ -455,6 +455,117 @@ correct_password (const struct passwd *pw)
|
||||
Index: src/su.c
|
||||
===================================================================
|
||||
--- src/su.c.orig 2012-04-16 13:00:25.489424170 +0200
|
||||
+++ src/su.c 2012-04-16 13:01:12.161193827 +0200
|
||||
@@ -458,6 +458,117 @@ correct_password (const struct passwd *p
|
||||
#endif /* !USE_PAM */
|
||||
}
|
||||
|
||||
@ -126,10 +126,10 @@ index eaef195..d78f968 100644
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
/* Update `environ' for the new shell based on PW, with SHELL being
|
||||
/* Update 'environ' for the new shell based on PW, with SHELL being
|
||||
the value for the SHELL environment variable. */
|
||||
|
||||
@@ -494,6 +605,22 @@ modify_environment (const struct passwd *pw, const char *shell)
|
||||
@@ -497,6 +608,22 @@ modify_environment (const struct passwd
|
||||
DEFAULT_LOGIN_PATH)
|
||||
: getdef_str ("SUPATH",
|
||||
DEFAULT_ROOT_LOGIN_PATH)));
|
||||
@ -152,6 +152,3 @@ index eaef195..d78f968 100644
|
||||
if (pw->pw_uid)
|
||||
{
|
||||
xsetenv ("USER", pw->pw_name);
|
||||
--
|
||||
1.7.1
|
||||
|
||||
|
@ -11,9 +11,9 @@ Subject: [PATCH 1/7] pam support for su
|
||||
|
||||
Index: configure.ac
|
||||
===================================================================
|
||||
--- configure.ac.orig 2011-01-03 13:27:37.268088087 +0100
|
||||
+++ configure.ac 2011-01-03 13:28:05.256895209 +0100
|
||||
@@ -134,6 +134,20 @@ fi
|
||||
--- configure.ac.orig 2012-03-24 19:22:13.000000000 +0100
|
||||
+++ configure.ac 2012-04-16 12:59:28.737919405 +0200
|
||||
@@ -185,6 +185,20 @@ fi
|
||||
|
||||
AC_FUNC_FORK
|
||||
|
||||
@ -36,9 +36,9 @@ Index: configure.ac
|
||||
gl_ADD_PROG([optional_bin_progs], [chroot]))
|
||||
Index: src/Makefile.am
|
||||
===================================================================
|
||||
--- src/Makefile.am.orig 2011-01-03 13:27:37.268088087 +0100
|
||||
+++ src/Makefile.am 2011-01-03 13:28:16.038206110 +0100
|
||||
@@ -351,8 +351,8 @@ factor_LDADD += $(LIB_GMP)
|
||||
--- src/Makefile.am.orig 2012-03-24 19:22:13.000000000 +0100
|
||||
+++ src/Makefile.am 2012-04-16 12:59:28.737919405 +0200
|
||||
@@ -357,8 +357,8 @@ factor_LDADD += $(LIB_GMP)
|
||||
# for getloadavg
|
||||
uptime_LDADD += $(GETLOADAVG_LIBS)
|
||||
|
||||
@ -51,8 +51,8 @@ Index: src/Makefile.am
|
||||
copy_LDADD += $(LIB_ACL)
|
||||
Index: src/su.c
|
||||
===================================================================
|
||||
--- src/su.c.orig 2011-01-03 13:27:37.268088087 +0100
|
||||
+++ src/su.c 2011-01-03 13:28:16.177210120 +0100
|
||||
--- src/su.c.orig 2012-03-24 19:22:13.000000000 +0100
|
||||
+++ src/su.c 2012-04-16 13:00:06.496924665 +0200
|
||||
@@ -37,6 +37,16 @@
|
||||
restricts who can su to UID 0 accounts. RMS considers that to
|
||||
be fascist.
|
||||
@ -106,7 +106,7 @@ Index: src/su.c
|
||||
static struct option const longopts[] =
|
||||
{
|
||||
{"command", required_argument, NULL, 'c'},
|
||||
@@ -200,7 +224,164 @@ log_su (struct passwd const *pw, bool su
|
||||
@@ -203,7 +227,164 @@ log_su (struct passwd const *pw, bool su
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -271,7 +271,7 @@ Index: src/su.c
|
||||
Return true if the user gives the correct password for entry PW,
|
||||
false if not. Return true without asking for a password if run by UID 0
|
||||
or if PW has an empty password. */
|
||||
@@ -208,10 +389,52 @@ log_su (struct passwd const *pw, bool su
|
||||
@@ -211,10 +392,52 @@ log_su (struct passwd const *pw, bool su
|
||||
static bool
|
||||
correct_password (const struct passwd *pw)
|
||||
{
|
||||
@ -325,15 +325,15 @@ Index: src/su.c
|
||||
|
||||
endspent ();
|
||||
if (sp)
|
||||
@@ -232,6 +455,7 @@ correct_password (const struct passwd *p
|
||||
@@ -235,6 +458,7 @@ correct_password (const struct passwd *p
|
||||
encrypted = crypt (unencrypted, correct);
|
||||
memset (unencrypted, 0, strlen (unencrypted));
|
||||
return STREQ (encrypted, correct);
|
||||
+#endif /* !USE_PAM */
|
||||
}
|
||||
|
||||
/* Update `environ' for the new shell based on PW, with SHELL being
|
||||
@@ -274,19 +498,41 @@ modify_environment (const struct passwd
|
||||
/* Update 'environ' for the new shell based on PW, with SHELL being
|
||||
@@ -277,19 +501,41 @@ modify_environment (const struct passwd
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -377,7 +377,7 @@ Index: src/su.c
|
||||
if (setgid (pw->pw_gid))
|
||||
error (EXIT_CANCELED, errno, _("cannot set group id"));
|
||||
if (setuid (pw->pw_uid))
|
||||
@@ -500,9 +746,21 @@ main (int argc, char **argv)
|
||||
@@ -502,9 +748,21 @@ main (int argc, char **argv)
|
||||
shell = NULL;
|
||||
}
|
||||
shell = xstrdup (shell ? shell : pw->pw_shell);
|
||||
|
@ -9,9 +9,9 @@ Subject: [PATCH 2/7] update man page for pam
|
||||
|
||||
Index: doc/coreutils.texi
|
||||
===================================================================
|
||||
--- doc/coreutils.texi.orig 2011-01-05 14:27:40.715232991 +0100
|
||||
+++ doc/coreutils.texi 2011-01-05 14:27:41.929267939 +0100
|
||||
@@ -15290,8 +15290,11 @@ to certain shells, etc.).
|
||||
--- doc/coreutils.texi.orig 2012-04-16 13:18:07.651694291 +0200
|
||||
+++ doc/coreutils.texi 2012-04-16 13:18:14.825522204 +0200
|
||||
@@ -15796,8 +15796,11 @@ to certain shells, etc.).
|
||||
@findex syslog
|
||||
@command{su} can optionally be compiled to use @code{syslog} to report
|
||||
failed, and optionally successful, @command{su} attempts. (If the system
|
||||
@ -25,7 +25,7 @@ Index: doc/coreutils.texi
|
||||
|
||||
The program accepts the following options. Also see @ref{Common options}.
|
||||
|
||||
@@ -15372,33 +15375,6 @@ Exit status:
|
||||
@@ -15878,33 +15881,6 @@ Exit status:
|
||||
the exit status of the subshell otherwise
|
||||
@end display
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: src/sort.c
|
||||
===================================================================
|
||||
--- src/sort.c.orig
|
||||
+++ src/sort.c
|
||||
@@ -5263,8 +5263,8 @@ main (int argc, char **argv)
|
||||
--- src/sort.c.orig 2012-04-16 13:17:12.342019601 +0200
|
||||
+++ src/sort.c 2012-04-16 13:17:12.463016705 +0200
|
||||
@@ -5288,8 +5288,8 @@ main (int argc, char **argv)
|
||||
{
|
||||
if (!nthreads)
|
||||
{
|
||||
|
@ -12,9 +12,9 @@ Date: Fri Jul 22 14:48:42 2011 +0200
|
||||
|
||||
Index: lib/acl-internal.h
|
||||
===================================================================
|
||||
--- lib/acl-internal.h.orig 2011-10-05 17:31:39.000000000 +0200
|
||||
+++ lib/acl-internal.h 2011-10-13 16:02:40.895813897 +0200
|
||||
@@ -133,6 +133,12 @@ rpl_acl_set_fd (int fd, acl_t acl)
|
||||
--- lib/acl-internal.h.orig 2012-03-09 08:31:00.000000000 +0100
|
||||
+++ lib/acl-internal.h 2012-04-16 13:17:12.470016537 +0200
|
||||
@@ -142,6 +142,12 @@ rpl_acl_set_fd (int fd, acl_t acl)
|
||||
# endif
|
||||
|
||||
/* Linux-specific */
|
||||
@ -29,9 +29,9 @@ Index: lib/acl-internal.h
|
||||
# define acl_from_mode(mode) (NULL)
|
||||
Index: lib/file-has-acl.c
|
||||
===================================================================
|
||||
--- lib/file-has-acl.c.orig 2011-10-05 17:31:39.000000000 +0200
|
||||
+++ lib/file-has-acl.c 2011-10-13 16:02:40.895813897 +0200
|
||||
@@ -454,12 +454,20 @@ file_has_acl (char const *name, struct s
|
||||
--- lib/file-has-acl.c.orig 2012-03-09 08:31:00.000000000 +0100
|
||||
+++ lib/file-has-acl.c 2012-04-16 13:17:12.471016513 +0200
|
||||
@@ -492,12 +492,20 @@ file_has_acl (char const *name, struct s
|
||||
/* Linux, FreeBSD, MacOS X, IRIX, Tru64 */
|
||||
int ret;
|
||||
|
||||
@ -55,8 +55,8 @@ Index: lib/file-has-acl.c
|
||||
{
|
||||
Index: m4/acl.m4
|
||||
===================================================================
|
||||
--- m4/acl.m4.orig 2011-10-05 17:31:39.000000000 +0200
|
||||
+++ m4/acl.m4 2011-10-13 16:02:40.895813897 +0200
|
||||
--- m4/acl.m4.orig 2012-01-06 10:14:31.000000000 +0100
|
||||
+++ m4/acl.m4 2012-04-16 13:17:12.471016513 +0200
|
||||
@@ -33,7 +33,7 @@ AC_DEFUN([gl_FUNC_ACL],
|
||||
AC_CHECK_FUNCS(
|
||||
[acl_get_file acl_get_fd acl_set_file acl_set_fd \
|
||||
@ -68,9 +68,9 @@ Index: m4/acl.m4
|
||||
acl_to_short_text acl_free_text])
|
||||
Index: ChangeLog
|
||||
===================================================================
|
||||
--- ChangeLog.orig 2011-10-12 11:56:55.000000000 +0200
|
||||
+++ ChangeLog 2011-10-13 16:04:55.772001787 +0200
|
||||
@@ -751,6 +751,14 @@
|
||||
--- ChangeLog.orig 2012-03-26 14:15:03.000000000 +0200
|
||||
+++ ChangeLog 2012-04-16 13:17:12.474016441 +0200
|
||||
@@ -2815,6 +2815,14 @@
|
||||
MacOS X 10.7 has an fdatasync that is not declared, and is rumored to
|
||||
be ineffective. (Bug#9141)
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: doc/coreutils.texi
|
||||
===================================================================
|
||||
--- doc/coreutils.texi.orig 2012-03-09 17:39:52.000000000 +0100
|
||||
+++ doc/coreutils.texi 2012-03-09 17:54:51.848754123 +0100
|
||||
@@ -12370,6 +12370,16 @@ This section describes commands that man
|
||||
--- doc/coreutils.texi.orig 2012-04-16 13:12:04.624344318 +0200
|
||||
+++ doc/coreutils.texi 2012-04-16 13:13:08.231837183 +0200
|
||||
@@ -12447,6 +12447,16 @@ This section describes commands that man
|
||||
@command{basename} removes any leading directory components from
|
||||
@var{name}. Synopsis:
|
||||
|
||||
@ -18,4 +18,4 @@ Index: doc/coreutils.texi
|
||||
+
|
||||
@example
|
||||
basename @var{name} [@var{suffix}]
|
||||
@end example
|
||||
basename @var{option}... @var{name}...
|
||||
|
137
coreutils-bnc#697897-setsid.patch
Normal file
137
coreutils-bnc#697897-setsid.patch
Normal file
@ -0,0 +1,137 @@
|
||||
Index: doc/coreutils.info
|
||||
===================================================================
|
||||
--- doc/coreutils.info.orig 2012-03-26 14:08:30.000000000 +0200
|
||||
+++ doc/coreutils.info 2012-04-18 11:17:09.917545246 +0200
|
||||
@@ -12788,6 +12788,10 @@ and optionally successful, `su' attempts
|
||||
`syslog'.) However, GNU `su' does not check if the user is a member of
|
||||
the `wheel' group; see below.
|
||||
|
||||
+ If the environment variable SU_COMMAND_SAME_SESSION is set, su will
|
||||
+not open a new session for running a command thus making -c behaves just
|
||||
+like -C.
|
||||
+
|
||||
The program accepts the following options. Also see *note Common
|
||||
options::.
|
||||
|
||||
@@ -12796,6 +12800,12 @@ options::.
|
||||
Pass COMMAND, a single command line to run, to the shell with a
|
||||
`-c' option instead of starting an interactive shell.
|
||||
|
||||
+`-C COMMAND'
|
||||
+`--session-command=COMMAND'
|
||||
+ Pass COMMAND, a single command line to run, to the shell with a
|
||||
+ `-c' option instead of starting an interactive and do not create
|
||||
+ a new session for it.
|
||||
+
|
||||
`-f'
|
||||
`--fast'
|
||||
Pass the `-f' option to the shell. This probably only makes sense
|
||||
Index: src/su.c
|
||||
===================================================================
|
||||
--- src/su.c.orig 2012-04-18 11:17:09.856546407 +0200
|
||||
+++ src/su.c 2012-04-18 11:17:09.917545246 +0200
|
||||
@@ -141,6 +141,9 @@ static bool simulate_login;
|
||||
/* If true, change some environment vars to indicate the user su'd to. */
|
||||
static bool change_environment;
|
||||
|
||||
+/* If true, then don't call setsid() with a command. */
|
||||
+int same_session = 0;
|
||||
+
|
||||
#ifdef USE_PAM
|
||||
static bool _pam_session_opened;
|
||||
static bool _pam_cred_established;
|
||||
@@ -149,6 +152,7 @@ static bool _pam_cred_established;
|
||||
static struct option const longopts[] =
|
||||
{
|
||||
{"command", required_argument, NULL, 'c'},
|
||||
+ {"session-command", required_argument, NULL, 'C'},
|
||||
{"fast", no_argument, NULL, 'f'},
|
||||
{"login", no_argument, NULL, 'l'},
|
||||
{"preserve-environment", no_argument, NULL, 'p'},
|
||||
@@ -326,14 +330,29 @@ create_watching_parent (void)
|
||||
sigemptyset (&action.sa_mask);
|
||||
action.sa_flags = 0;
|
||||
sigemptyset (&ourset);
|
||||
- if (sigaddset (&ourset, SIGTERM)
|
||||
- || sigaddset (&ourset, SIGALRM)
|
||||
- || sigaction (SIGTERM, &action, NULL)
|
||||
- || sigprocmask (SIG_UNBLOCK, &ourset, NULL))
|
||||
- {
|
||||
+
|
||||
+ if (!same_session)
|
||||
+ {
|
||||
+ if (sigaddset(&ourset, SIGINT) || sigaddset(&ourset, SIGQUIT))
|
||||
+ {
|
||||
+ error (0, errno, _("cannot set signal handler"));
|
||||
+ caught_signal = true;
|
||||
+ }
|
||||
+ }
|
||||
+ if (!caught_signal && (sigaddset(&ourset, SIGTERM)
|
||||
+ || sigaddset(&ourset, SIGALRM)
|
||||
+ || sigaction(SIGTERM, &action, NULL)
|
||||
+ || sigprocmask(SIG_UNBLOCK, &ourset, NULL)))
|
||||
+ {
|
||||
error (0, errno, _("cannot set signal handler"));
|
||||
caught_signal = true;
|
||||
}
|
||||
+ if (!caught_signal && !same_session && (sigaction(SIGINT, &action, NULL)
|
||||
+ || sigaction(SIGQUIT, &action, NULL)))
|
||||
+ {
|
||||
+ error (0, errno, _("cannot set signal handler"));
|
||||
+ caught_signal = true;
|
||||
+ }
|
||||
}
|
||||
if (!caught_signal)
|
||||
{
|
||||
@@ -750,6 +769,8 @@ Change the effective user id and group i
|
||||
\n\
|
||||
-, -l, --login make the shell a login shell\n\
|
||||
-c, --command=COMMAND pass a single COMMAND to the shell with -c\n\
|
||||
+ --session-command=COMMAND pass a single COMMAND to the shell with -c\n\
|
||||
+ and do not create a new session\n\
|
||||
-f, --fast pass -f to the shell (for csh or tcsh)\n\
|
||||
-m, --preserve-environment do not reset environment variables\n\
|
||||
-p same as -m\n\
|
||||
@@ -772,6 +793,7 @@ main (int argc, char **argv)
|
||||
int optc;
|
||||
const char *new_user = DEFAULT_USER;
|
||||
char *command = NULL;
|
||||
+ int request_same_session = 0;
|
||||
char *shell = NULL;
|
||||
struct passwd *pw;
|
||||
struct passwd pw_copy;
|
||||
@@ -795,6 +817,14 @@ main (int argc, char **argv)
|
||||
{
|
||||
case 'c':
|
||||
command = optarg;
|
||||
+ if (NULL != getenv ("SU_COMMAND_SAME_SESSION") ||
|
||||
+ NULL != getenv ("SU_COMMAND_OPENS_SESSION"))
|
||||
+ request_same_session = 1;
|
||||
+ break;
|
||||
+
|
||||
+ case 'C':
|
||||
+ command = optarg;
|
||||
+ request_same_session = 1;
|
||||
break;
|
||||
|
||||
case 'f':
|
||||
@@ -867,6 +897,9 @@ main (int argc, char **argv)
|
||||
}
|
||||
#endif
|
||||
|
||||
+ if (request_same_session || !command || !pw->pw_uid)
|
||||
+ same_session = 1;
|
||||
+
|
||||
if (!shell && !change_environment)
|
||||
shell = getenv ("SHELL");
|
||||
if (shell && getuid () != 0 && restricted_shell (pw->pw_shell))
|
||||
@@ -889,6 +922,9 @@ main (int argc, char **argv)
|
||||
|
||||
change_identity (pw);
|
||||
|
||||
+ if (!same_session)
|
||||
+ setsid ();
|
||||
+
|
||||
/* Set environment after pam_open_session, which may put KRB5CCNAME
|
||||
into the pam_env, etc. */
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: gnulib-tests/test-getaddrinfo.c
|
||||
===================================================================
|
||||
--- gnulib-tests/test-getaddrinfo.c.orig 2010-03-13 16:21:08.000000000 +0100
|
||||
+++ gnulib-tests/test-getaddrinfo.c 2010-05-05 14:51:40.343025353 +0200
|
||||
@@ -88,11 +88,7 @@ simple (char const *host, char const *se
|
||||
--- gnulib-tests/test-getaddrinfo.c.orig 2012-04-16 13:18:02.424819645 +0200
|
||||
+++ gnulib-tests/test-getaddrinfo.c 2012-04-16 13:18:07.737692228 +0200
|
||||
@@ -86,11 +86,7 @@ simple (char const *host, char const *se
|
||||
the test merely because someone is down the country on their
|
||||
in-law's farm. */
|
||||
if (res == EAI_AGAIN)
|
||||
|
@ -1,20 +1,8 @@
|
||||
Index: configure
|
||||
===================================================================
|
||||
--- configure.orig 2011-10-12 11:45:49.000000000 +0200
|
||||
+++ configure 2011-10-13 16:01:35.584691275 +0200
|
||||
@@ -3641,7 +3641,6 @@ as_fn_append ac_func_list " alarm"
|
||||
as_fn_append ac_header_list " sys/statvfs.h"
|
||||
as_fn_append ac_header_list " sys/select.h"
|
||||
as_fn_append ac_func_list " nl_langinfo"
|
||||
-gl_printf_safe=yes
|
||||
as_fn_append ac_header_list " priv.h"
|
||||
as_fn_append ac_header_list " pthread.h"
|
||||
as_fn_append ac_header_list " utmp.h"
|
||||
Index: m4/gnulib-comp.m4
|
||||
===================================================================
|
||||
--- m4/gnulib-comp.m4.orig 2011-10-09 19:02:39.000000000 +0200
|
||||
+++ m4/gnulib-comp.m4 2011-10-13 16:02:07.582261432 +0200
|
||||
@@ -1417,7 +1417,6 @@ gl_POSIXTM
|
||||
--- m4/gnulib-comp.m4.orig 2012-03-20 23:34:39.000000000 +0100
|
||||
+++ m4/gnulib-comp.m4 2012-04-16 12:57:23.373219154 +0200
|
||||
@@ -1584,7 +1584,6 @@ gl_POSIXTM
|
||||
gl_POSIXVER
|
||||
gl_FUNC_PRINTF_FREXP
|
||||
gl_FUNC_PRINTF_FREXPL
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: src/sort.c
|
||||
===================================================================
|
||||
--- src/sort.c.orig 2011-01-05 14:27:40.227218942 +0100
|
||||
+++ src/sort.c 2011-01-05 14:27:40.574228931 +0100
|
||||
@@ -3134,7 +3134,8 @@ keycompare_mb (const struct line *a, con
|
||||
--- src/sort.c.orig 2012-04-16 13:23:11.726363043 +0200
|
||||
+++ src/sort.c 2012-04-16 13:23:20.474151036 +0200
|
||||
@@ -3161,7 +3161,8 @@ keycompare_mb (const struct line *a, con
|
||||
if (MBLENGTH == (size_t)-2 || MBLENGTH == (size_t)-1) \
|
||||
STATE = state_bak; \
|
||||
if (!ignore) \
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: src/cut.c
|
||||
===================================================================
|
||||
--- src/cut.c.orig 2010-11-11 16:28:46.581137538 +0100
|
||||
+++ src/cut.c 2010-11-11 16:30:04.886974551 +0100
|
||||
@@ -868,7 +868,10 @@ cut_fields_mb (FILE *stream)
|
||||
--- src/cut.c.orig 2012-04-16 13:17:12.321020103 +0200
|
||||
+++ src/cut.c 2012-04-16 13:17:12.333019817 +0200
|
||||
@@ -869,7 +869,10 @@ cut_fields_mb (FILE *stream)
|
||||
c = getc (stream);
|
||||
empty_input = (c == EOF);
|
||||
if (c != EOF)
|
||||
|
@ -20,15 +20,15 @@
|
||||
Index: lib/linebuffer.h
|
||||
===================================================================
|
||||
--- lib/linebuffer.h.orig 2012-01-06 10:14:31.000000000 +0100
|
||||
+++ lib/linebuffer.h 2012-03-09 15:44:39.634217509 +0100
|
||||
+++ lib/linebuffer.h 2012-04-16 17:00:03.953114761 +0200
|
||||
@@ -21,6 +21,11 @@
|
||||
|
||||
# include <stdio.h>
|
||||
|
||||
+/* Get mbstate_t. */
|
||||
+#if HAVE_WCHAR_H
|
||||
+# include <wchar.h>
|
||||
+#endif
|
||||
+# if HAVE_WCHAR_H
|
||||
+# include <wchar.h>
|
||||
+# endif
|
||||
+
|
||||
/* A 'struct linebuffer' holds a line of text. */
|
||||
|
||||
@ -45,8 +45,8 @@ Index: lib/linebuffer.h
|
||||
/* Initialize linebuffer LINEBUFFER for use. */
|
||||
Index: src/cut.c
|
||||
===================================================================
|
||||
--- src/cut.c.orig 2012-01-01 10:04:06.000000000 +0100
|
||||
+++ src/cut.c 2012-03-09 15:43:28.583977615 +0100
|
||||
--- src/cut.c.orig 2012-03-24 21:26:51.000000000 +0100
|
||||
+++ src/cut.c 2012-04-16 17:00:03.954114734 +0200
|
||||
@@ -28,6 +28,11 @@
|
||||
#include <assert.h>
|
||||
#include <getopt.h>
|
||||
@ -75,7 +75,7 @@ Index: src/cut.c
|
||||
+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
|
||||
+#endif
|
||||
+
|
||||
/* The official name of this program (e.g., no `g' prefix). */
|
||||
/* The official name of this program (e.g., no 'g' prefix). */
|
||||
#define PROGRAM_NAME "cut"
|
||||
|
||||
@@ -72,6 +89,52 @@
|
||||
@ -136,10 +136,10 @@ Index: src/cut.c
|
||||
static size_t field_1_bufsize;
|
||||
|
||||
-/* The largest field or byte index used as an endpoint of a closed
|
||||
+/* The largest byte, character or field index used as an endpoint of a closed
|
||||
+/* The largest field, character or byte index used as an endpoint of a closed
|
||||
or degenerate range specification; this doesn't include the starting
|
||||
index of right-open-ended ranges. For example, with either range spec
|
||||
`2-5,9-', `2-3,5,9-' this variable would be set to 5. */
|
||||
'2-5,9-', '2-3,5,9-' this variable would be set to 5. */
|
||||
@@ -102,10 +165,11 @@ static size_t eol_range_start;
|
||||
|
||||
/* This is a bit vector.
|
||||
@ -191,7 +191,7 @@ Index: src/cut.c
|
||||
|
||||
/* True if the --output-delimiter=STRING option was specified. */
|
||||
static bool output_delimiter_specified;
|
||||
@@ -207,7 +284,7 @@ Mandatory arguments to long options are
|
||||
@@ -206,7 +283,7 @@ Mandatory arguments to long options are
|
||||
-f, --fields=LIST select only these fields; also print any line\n\
|
||||
that contains no delimiter character, unless\n\
|
||||
the -s option is specified\n\
|
||||
@ -200,7 +200,7 @@ Index: src/cut.c
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
--complement complement the set of selected bytes, characters\n\
|
||||
@@ -366,7 +443,7 @@ set_fields (const char *fieldstr)
|
||||
@@ -365,7 +442,7 @@ set_fields (const char *fieldstr)
|
||||
in_digits = false;
|
||||
/* Starting a range. */
|
||||
if (dash_found)
|
||||
@ -209,10 +209,10 @@ Index: src/cut.c
|
||||
dash_found = true;
|
||||
fieldstr++;
|
||||
|
||||
@@ -390,14 +467,16 @@ set_fields (const char *fieldstr)
|
||||
@@ -389,14 +466,16 @@ set_fields (const char *fieldstr)
|
||||
if (!rhs_specified)
|
||||
{
|
||||
/* `n-'. From `initial' to end of line. */
|
||||
/* 'n-'. From 'initial' to end of line. */
|
||||
- eol_range_start = initial;
|
||||
+ if (eol_range_start == 0 ||
|
||||
+ (eol_range_start != 0 && eol_range_start > initial))
|
||||
@ -221,14 +221,14 @@ Index: src/cut.c
|
||||
}
|
||||
else
|
||||
{
|
||||
/* `m-n' or `-n' (1-n). */
|
||||
/* 'm-n' or '-n' (1-n). */
|
||||
if (value < initial)
|
||||
- FATAL_ERROR (_("invalid decreasing range"));
|
||||
+ FATAL_ERROR (_("invalid byte, character or field list"));
|
||||
|
||||
/* Is there already a range going to end of line? */
|
||||
if (eol_range_start != 0)
|
||||
@@ -477,6 +556,9 @@ set_fields (const char *fieldstr)
|
||||
@@ -476,6 +555,9 @@ set_fields (const char *fieldstr)
|
||||
if (operating_mode == byte_mode)
|
||||
error (0, 0,
|
||||
_("byte offset %s is too large"), quote (bad_num));
|
||||
@ -238,7 +238,7 @@ Index: src/cut.c
|
||||
else
|
||||
error (0, 0,
|
||||
_("field number %s is too large"), quote (bad_num));
|
||||
@@ -487,7 +569,7 @@ set_fields (const char *fieldstr)
|
||||
@@ -486,7 +568,7 @@ set_fields (const char *fieldstr)
|
||||
fieldstr++;
|
||||
}
|
||||
else
|
||||
@ -247,7 +247,7 @@ Index: src/cut.c
|
||||
}
|
||||
|
||||
max_range_endpoint = 0;
|
||||
@@ -582,6 +664,63 @@ cut_bytes (FILE *stream)
|
||||
@@ -581,6 +663,63 @@ cut_bytes (FILE *stream)
|
||||
}
|
||||
}
|
||||
|
||||
@ -311,7 +311,7 @@ Index: src/cut.c
|
||||
/* Read from stream STREAM, printing to standard output any selected fields. */
|
||||
|
||||
static void
|
||||
@@ -704,13 +843,192 @@ cut_fields (FILE *stream)
|
||||
@@ -703,13 +842,192 @@ cut_fields (FILE *stream)
|
||||
}
|
||||
}
|
||||
|
||||
@ -507,7 +507,7 @@ Index: src/cut.c
|
||||
}
|
||||
|
||||
/* Process file FILE to standard output.
|
||||
@@ -762,6 +1080,8 @@ main (int argc, char **argv)
|
||||
@@ -761,6 +1079,8 @@ main (int argc, char **argv)
|
||||
bool ok;
|
||||
bool delim_specified = false;
|
||||
char *spec_list_string IF_LINT ( = NULL);
|
||||
@ -516,7 +516,7 @@ Index: src/cut.c
|
||||
|
||||
initialize_main (&argc, &argv);
|
||||
set_program_name (argv[0]);
|
||||
@@ -784,7 +1104,6 @@ main (int argc, char **argv)
|
||||
@@ -783,7 +1103,6 @@ main (int argc, char **argv)
|
||||
switch (optc)
|
||||
{
|
||||
case 'b':
|
||||
@ -524,7 +524,7 @@ Index: src/cut.c
|
||||
/* Build the byte list. */
|
||||
if (operating_mode != undefined_mode)
|
||||
FATAL_ERROR (_("only one type of list may be specified"));
|
||||
@@ -792,6 +1111,14 @@ main (int argc, char **argv)
|
||||
@@ -791,6 +1110,14 @@ main (int argc, char **argv)
|
||||
spec_list_string = optarg;
|
||||
break;
|
||||
|
||||
@ -539,10 +539,10 @@ Index: src/cut.c
|
||||
case 'f':
|
||||
/* Build the field list. */
|
||||
if (operating_mode != undefined_mode)
|
||||
@@ -803,10 +1130,35 @@ main (int argc, char **argv)
|
||||
@@ -802,10 +1129,35 @@ main (int argc, char **argv)
|
||||
case 'd':
|
||||
/* New delimiter. */
|
||||
/* Interpret -d '' to mean `use the NUL byte as the delimiter.' */
|
||||
/* Interpret -d '' to mean 'use the NUL byte as the delimiter.' */
|
||||
- if (optarg[0] != '\0' && optarg[1] != '\0')
|
||||
- FATAL_ERROR (_("the delimiter must be a single character"));
|
||||
- delim = optarg[0];
|
||||
@ -579,7 +579,7 @@ Index: src/cut.c
|
||||
break;
|
||||
|
||||
case OUTPUT_DELIMITER_OPTION:
|
||||
@@ -819,6 +1171,7 @@ main (int argc, char **argv)
|
||||
@@ -818,6 +1170,7 @@ main (int argc, char **argv)
|
||||
break;
|
||||
|
||||
case 'n':
|
||||
@ -587,7 +587,7 @@ Index: src/cut.c
|
||||
break;
|
||||
|
||||
case 's':
|
||||
@@ -841,7 +1194,7 @@ main (int argc, char **argv)
|
||||
@@ -840,7 +1193,7 @@ main (int argc, char **argv)
|
||||
if (operating_mode == undefined_mode)
|
||||
FATAL_ERROR (_("you must specify a list of bytes, characters, or fields"));
|
||||
|
||||
@ -596,7 +596,7 @@ Index: src/cut.c
|
||||
FATAL_ERROR (_("an input delimiter may be specified only\
|
||||
when operating on fields"));
|
||||
|
||||
@@ -868,15 +1221,34 @@ main (int argc, char **argv)
|
||||
@@ -867,15 +1220,34 @@ main (int argc, char **argv)
|
||||
}
|
||||
|
||||
if (!delim_specified)
|
||||
@ -639,9 +639,9 @@ Index: src/cut.c
|
||||
if (optind == argc)
|
||||
Index: src/expand.c
|
||||
===================================================================
|
||||
--- src/expand.c.orig 2012-01-01 10:04:06.000000000 +0100
|
||||
+++ src/expand.c 2012-03-09 15:43:28.584977591 +0100
|
||||
@@ -38,12 +38,29 @@
|
||||
--- src/expand.c.orig 2012-03-24 21:26:51.000000000 +0100
|
||||
+++ src/expand.c 2012-04-16 17:00:03.954114734 +0200
|
||||
@@ -37,12 +37,29 @@
|
||||
#include <stdio.h>
|
||||
#include <getopt.h>
|
||||
#include <sys/types.h>
|
||||
@ -668,10 +668,10 @@ Index: src/expand.c
|
||||
+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
|
||||
+#endif
|
||||
+
|
||||
/* The official name of this program (e.g., no `g' prefix). */
|
||||
/* The official name of this program (e.g., no 'g' prefix). */
|
||||
#define PROGRAM_NAME "expand"
|
||||
|
||||
@@ -360,6 +377,142 @@ expand (void)
|
||||
@@ -358,6 +375,142 @@ expand (void)
|
||||
}
|
||||
}
|
||||
|
||||
@ -814,7 +814,7 @@ Index: src/expand.c
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
@@ -424,7 +577,12 @@ main (int argc, char **argv)
|
||||
@@ -422,7 +575,12 @@ main (int argc, char **argv)
|
||||
|
||||
file_list = (optind < argc ? &argv[optind] : stdin_argv);
|
||||
|
||||
@ -830,8 +830,8 @@ Index: src/expand.c
|
||||
error (EXIT_FAILURE, errno, "-");
|
||||
Index: src/fold.c
|
||||
===================================================================
|
||||
--- src/fold.c.orig 2012-01-01 10:04:06.000000000 +0100
|
||||
+++ src/fold.c 2012-03-09 15:43:28.584977591 +0100
|
||||
--- src/fold.c.orig 2012-03-24 19:22:13.000000000 +0100
|
||||
+++ src/fold.c 2012-04-16 17:00:03.954114734 +0200
|
||||
@@ -22,12 +22,34 @@
|
||||
#include <getopt.h>
|
||||
#include <sys/types.h>
|
||||
@ -866,7 +866,7 @@ Index: src/fold.c
|
||||
+
|
||||
#define TAB_WIDTH 8
|
||||
|
||||
/* The official name of this program (e.g., no `g' prefix). */
|
||||
/* The official name of this program (e.g., no 'g' prefix). */
|
||||
@@ -35,20 +57,41 @@
|
||||
|
||||
#define AUTHORS proper_name ("David MacKenzie")
|
||||
@ -913,7 +913,7 @@ Index: src/fold.c
|
||||
{"spaces", no_argument, NULL, 's'},
|
||||
{"width", required_argument, NULL, 'w'},
|
||||
{GETOPT_HELP_OPTION_DECL},
|
||||
@@ -78,6 +121,7 @@ Mandatory arguments to long options are
|
||||
@@ -77,6 +120,7 @@ Mandatory arguments to long options are
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
-b, --bytes count bytes rather than columns\n\
|
||||
@ -921,7 +921,7 @@ Index: src/fold.c
|
||||
-s, --spaces break at spaces\n\
|
||||
-w, --width=WIDTH use WIDTH columns instead of 80\n\
|
||||
"), stdout);
|
||||
@@ -95,7 +139,7 @@ Mandatory arguments to long options are
|
||||
@@ -94,7 +138,7 @@ Mandatory arguments to long options are
|
||||
static size_t
|
||||
adjust_column (size_t column, char c)
|
||||
{
|
||||
@ -930,7 +930,7 @@ Index: src/fold.c
|
||||
{
|
||||
if (c == '\b')
|
||||
{
|
||||
@@ -118,30 +162,14 @@ adjust_column (size_t column, char c)
|
||||
@@ -117,30 +161,14 @@ adjust_column (size_t column, char c)
|
||||
to stdout, with maximum line length WIDTH.
|
||||
Return true if successful. */
|
||||
|
||||
@ -942,7 +942,7 @@ Index: src/fold.c
|
||||
- FILE *istream;
|
||||
int c;
|
||||
size_t column = 0; /* Screen column where next char will go. */
|
||||
size_t offset_out = 0; /* Index in `line_out' for next char. */
|
||||
size_t offset_out = 0; /* Index in 'line_out' for next char. */
|
||||
static char *line_out = NULL;
|
||||
static size_t allocated_out = 0;
|
||||
- int saved_errno;
|
||||
@ -963,7 +963,7 @@ Index: src/fold.c
|
||||
|
||||
fadvise (istream, FADVISE_SEQUENTIAL);
|
||||
|
||||
@@ -171,6 +199,15 @@ fold_file (char const *filename, size_t
|
||||
@@ -170,6 +198,15 @@ fold_file (char const *filename, size_t
|
||||
bool found_blank = false;
|
||||
size_t logical_end = offset_out;
|
||||
|
||||
@ -979,7 +979,7 @@ Index: src/fold.c
|
||||
/* Look for the last blank. */
|
||||
while (logical_end)
|
||||
{
|
||||
@@ -217,11 +254,222 @@ fold_file (char const *filename, size_t
|
||||
@@ -216,11 +253,222 @@ fold_file (char const *filename, size_t
|
||||
line_out[offset_out++] = c;
|
||||
}
|
||||
|
||||
@ -1203,7 +1203,7 @@ Index: src/fold.c
|
||||
if (ferror (istream))
|
||||
{
|
||||
error (0, saved_errno, "%s", filename);
|
||||
@@ -254,7 +502,8 @@ main (int argc, char **argv)
|
||||
@@ -253,7 +501,8 @@ main (int argc, char **argv)
|
||||
|
||||
atexit (close_stdout);
|
||||
|
||||
@ -1213,7 +1213,7 @@ Index: src/fold.c
|
||||
|
||||
while ((optc = getopt_long (argc, argv, shortopts, longopts, NULL)) != -1)
|
||||
{
|
||||
@@ -263,7 +512,15 @@ main (int argc, char **argv)
|
||||
@@ -262,7 +511,15 @@ main (int argc, char **argv)
|
||||
switch (optc)
|
||||
{
|
||||
case 'b': /* Count bytes rather than columns. */
|
||||
@ -1232,8 +1232,8 @@ Index: src/fold.c
|
||||
case 's': /* Break at word boundaries. */
|
||||
Index: src/join.c
|
||||
===================================================================
|
||||
--- src/join.c.orig 2012-01-01 10:04:06.000000000 +0100
|
||||
+++ src/join.c 2012-03-09 15:43:28.585977566 +0100
|
||||
--- src/join.c.orig 2012-03-24 21:26:51.000000000 +0100
|
||||
+++ src/join.c 2012-04-16 17:00:03.955114707 +0200
|
||||
@@ -22,18 +22,32 @@
|
||||
#include <sys/types.h>
|
||||
#include <getopt.h>
|
||||
@ -1265,11 +1265,11 @@ Index: src/join.c
|
||||
+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
|
||||
+#endif
|
||||
+
|
||||
/* The official name of this program (e.g., no `g' prefix). */
|
||||
/* The official name of this program (e.g., no 'g' prefix). */
|
||||
#define PROGRAM_NAME "join"
|
||||
|
||||
@@ -135,10 +149,12 @@ static struct outlist outlist_head;
|
||||
/* Last element in `outlist', where a new element can be added. */
|
||||
/* Last element in 'outlist', where a new element can be added. */
|
||||
static struct outlist *outlist_end = &outlist_head;
|
||||
|
||||
-/* Tab character separating fields. If negative, fields are separated
|
||||
@ -1285,7 +1285,7 @@ Index: src/join.c
|
||||
|
||||
/* If nonzero, check that the input is correctly ordered. */
|
||||
static enum
|
||||
@@ -263,13 +279,14 @@ xfields (struct line *line)
|
||||
@@ -262,13 +278,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)))
|
||||
@@ -293,6 +310,148 @@ xfields (struct line *line)
|
||||
@@ -292,6 +309,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)
|
||||
{
|
||||
@@ -314,56 +473,115 @@ keycmp (struct line const *line1, struct
|
||||
@@ -313,56 +472,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
|
||||
@@ -455,6 +673,12 @@ get_line (FILE *fp, struct line **linep,
|
||||
@@ -454,6 +672,12 @@ get_line (FILE *fp, struct line **linep,
|
||||
}
|
||||
++line_no[which - 1];
|
||||
|
||||
@ -1604,7 +1604,7 @@ Index: src/join.c
|
||||
xfields (line);
|
||||
|
||||
if (prevline[which - 1])
|
||||
@@ -553,22 +777,29 @@ prfield (size_t n, struct line const *li
|
||||
@@ -552,22 +776,29 @@ prfield (size_t n, struct line const *li
|
||||
}
|
||||
|
||||
/* Output all the fields in line, other than the join field. */
|
||||
@ -1637,7 +1637,7 @@ Index: src/join.c
|
||||
prfield (i, line);
|
||||
}
|
||||
}
|
||||
@@ -579,7 +810,6 @@ static void
|
||||
@@ -578,7 +809,6 @@ static void
|
||||
prjoin (struct line const *line1, struct line const *line2)
|
||||
{
|
||||
const struct outlist *outlist;
|
||||
@ -1645,7 +1645,7 @@ Index: src/join.c
|
||||
size_t field;
|
||||
struct line const *line;
|
||||
|
||||
@@ -613,7 +843,7 @@ prjoin (struct line const *line1, struct
|
||||
@@ -612,7 +842,7 @@ prjoin (struct line const *line1, struct
|
||||
o = o->next;
|
||||
if (o == NULL)
|
||||
break;
|
||||
@ -1654,7 +1654,7 @@ Index: src/join.c
|
||||
}
|
||||
putchar ('\n');
|
||||
}
|
||||
@@ -1091,21 +1321,46 @@ main (int argc, char **argv)
|
||||
@@ -1090,21 +1320,46 @@ main (int argc, char **argv)
|
||||
|
||||
case 't':
|
||||
{
|
||||
@ -1712,8 +1712,8 @@ Index: src/join.c
|
||||
case NOCHECK_ORDER_OPTION:
|
||||
Index: src/pr.c
|
||||
===================================================================
|
||||
--- src/pr.c.orig 2012-01-01 10:04:06.000000000 +0100
|
||||
+++ src/pr.c 2012-03-09 15:47:03.432654173 +0100
|
||||
--- src/pr.c.orig 2012-03-24 21:26:51.000000000 +0100
|
||||
+++ src/pr.c 2012-04-16 17:00:03.955114707 +0200
|
||||
@@ -312,6 +312,32 @@
|
||||
|
||||
#include <getopt.h>
|
||||
@ -1763,7 +1763,7 @@ Index: src/pr.c
|
||||
+extern int wcwidth ();
|
||||
+#endif
|
||||
+
|
||||
/* The official name of this program (e.g., no `g' prefix). */
|
||||
/* The official name of this program (e.g., no 'g' prefix). */
|
||||
#define PROGRAM_NAME "pr"
|
||||
|
||||
@@ -415,7 +453,20 @@ struct COLUMN
|
||||
@ -1850,7 +1850,7 @@ Index: src/pr.c
|
||||
/* (-n) line counting starts with 1st line of input file (not with 1st
|
||||
line of 1st page printed). */
|
||||
@@ -691,6 +751,7 @@ static bool use_col_separator = false;
|
||||
-a|COLUMN|-m is a `space' and with the -J option a `tab'. */
|
||||
-a|COLUMN|-m is a 'space' and with the -J option a 'tab'. */
|
||||
static char *col_sep_string = (char *) "";
|
||||
static int col_sep_length = 0;
|
||||
+static int col_sep_width = 0;
|
||||
@ -2071,7 +2071,7 @@ Index: src/pr.c
|
||||
|
||||
@@ -2050,22 +2176,24 @@ add_line_number (COLUMN *p)
|
||||
/* Tabification is assumed for multiple columns, also for n-separators,
|
||||
but `default n-separator = TAB' hasn't been given priority over
|
||||
but 'default n-separator = TAB' hasn't been given priority over
|
||||
equal column_width also specified by POSIX. */
|
||||
- if (number_separator == '\t')
|
||||
+ if (number_separator[0] == '\t')
|
||||
@ -2438,8 +2438,8 @@ Index: src/pr.c
|
||||
|
||||
Index: src/sort.c
|
||||
===================================================================
|
||||
--- src/sort.c.orig 2012-01-01 10:04:06.000000000 +0100
|
||||
+++ src/sort.c 2012-03-09 15:43:28.588977491 +0100
|
||||
--- src/sort.c.orig 2012-03-24 21:26:51.000000000 +0100
|
||||
+++ src/sort.c 2012-04-16 17:03:09.060189025 +0200
|
||||
@@ -22,11 +22,20 @@
|
||||
|
||||
#include <config.h>
|
||||
@ -2514,7 +2514,7 @@ Index: src/sort.c
|
||||
|
||||
/* Flag to remove consecutive duplicate lines from the output.
|
||||
Only the last of a sequence of equal lines will be output. */
|
||||
@@ -783,6 +812,46 @@ reap_all (void)
|
||||
@@ -782,6 +811,46 @@ reap_all (void)
|
||||
reap (-1);
|
||||
}
|
||||
|
||||
@ -2561,7 +2561,7 @@ Index: src/sort.c
|
||||
/* Clean up any remaining temporary files. */
|
||||
|
||||
static void
|
||||
@@ -1215,7 +1284,7 @@ zaptemp (char const *name)
|
||||
@@ -1214,7 +1283,7 @@ zaptemp (char const *name)
|
||||
free (node);
|
||||
}
|
||||
|
||||
@ -2570,7 +2570,7 @@ Index: src/sort.c
|
||||
|
||||
static int
|
||||
struct_month_cmp (void const *m1, void const *m2)
|
||||
@@ -1230,7 +1299,7 @@ struct_month_cmp (void const *m1, void c
|
||||
@@ -1229,7 +1298,7 @@ struct_month_cmp (void const *m1, void c
|
||||
/* Initialize the character class tables. */
|
||||
|
||||
static void
|
||||
@ -2579,7 +2579,7 @@ Index: src/sort.c
|
||||
{
|
||||
size_t i;
|
||||
|
||||
@@ -1242,7 +1311,7 @@ inittables (void)
|
||||
@@ -1241,7 +1310,7 @@ inittables (void)
|
||||
fold_toupper[i] = toupper (i);
|
||||
}
|
||||
|
||||
@ -2588,7 +2588,7 @@ Index: src/sort.c
|
||||
/* If we're not in the "C" locale, read different names for months. */
|
||||
if (hard_LC_TIME)
|
||||
{
|
||||
@@ -1324,6 +1393,84 @@ specify_nmerge (int oi, char c, char con
|
||||
@@ -1323,6 +1392,84 @@ specify_nmerge (int oi, char c, char con
|
||||
xstrtol_fatal (e, oi, c, long_options, s);
|
||||
}
|
||||
|
||||
@ -2673,7 +2673,7 @@ Index: 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)
|
||||
@@ -1552,7 +1699,7 @@ buffer_linelim (struct buffer const *buf
|
||||
@@ -1551,7 +1698,7 @@ buffer_linelim (struct buffer const *buf
|
||||
by KEY in LINE. */
|
||||
|
||||
static char *
|
||||
@ -2682,7 +2682,7 @@ Index: src/sort.c
|
||||
{
|
||||
char *ptr = line->text, *lim = ptr + line->length - 1;
|
||||
size_t sword = key->sword;
|
||||
@@ -1561,10 +1708,10 @@ begfield (struct line const *line, struc
|
||||
@@ -1560,10 +1707,10 @@ begfield (struct line const *line, struc
|
||||
/* The leading field separator itself is included in a field when -t
|
||||
is absent. */
|
||||
|
||||
@ -2695,7 +2695,7 @@ Index: src/sort.c
|
||||
++ptr;
|
||||
if (ptr < lim)
|
||||
++ptr;
|
||||
@@ -1590,11 +1737,70 @@ begfield (struct line const *line, struc
|
||||
@@ -1589,11 +1736,70 @@ begfield (struct line const *line, struc
|
||||
return ptr;
|
||||
}
|
||||
|
||||
@ -2767,9 +2767,9 @@ Index: src/sort.c
|
||||
{
|
||||
char *ptr = line->text, *lim = ptr + line->length - 1;
|
||||
size_t eword = key->eword, echar = key->echar;
|
||||
@@ -1609,10 +1815,10 @@ limfield (struct line const *line, struc
|
||||
`beginning' is the first character following the delimiting TAB.
|
||||
Otherwise, leave PTR pointing at the first `blank' character after
|
||||
@@ -1608,10 +1814,10 @@ limfield (struct line const *line, struc
|
||||
'beginning' is the first character following the delimiting TAB.
|
||||
Otherwise, leave PTR pointing at the first 'blank' character after
|
||||
the preceding field. */
|
||||
- if (tab != TAB_DEFAULT)
|
||||
+ if (tab_length)
|
||||
@ -2780,7 +2780,7 @@ Index: src/sort.c
|
||||
++ptr;
|
||||
if (ptr < lim && (eword || echar))
|
||||
++ptr;
|
||||
@@ -1658,10 +1864,10 @@ limfield (struct line const *line, struc
|
||||
@@ -1657,10 +1863,10 @@ limfield (struct line const *line, struc
|
||||
*/
|
||||
|
||||
/* Make LIM point to the end of (one byte past) the current field. */
|
||||
@ -2793,7 +2793,7 @@ Index: src/sort.c
|
||||
if (newlim)
|
||||
lim = newlim;
|
||||
}
|
||||
@@ -1692,6 +1898,130 @@ limfield (struct line const *line, struc
|
||||
@@ -1691,6 +1897,130 @@ limfield (struct line const *line, struc
|
||||
return ptr;
|
||||
}
|
||||
|
||||
@ -2924,7 +2924,7 @@ Index: 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
|
||||
@@ -1778,8 +2108,22 @@ fillbuf (struct buffer *buf, FILE *fp, c
|
||||
@@ -1777,8 +2107,22 @@ fillbuf (struct buffer *buf, FILE *fp, c
|
||||
else
|
||||
{
|
||||
if (key->skipsblanks)
|
||||
@ -2949,7 +2949,7 @@ Index: src/sort.c
|
||||
line->keybeg = line_start;
|
||||
}
|
||||
}
|
||||
@@ -1900,7 +2244,7 @@ human_numcompare (char const *a, char co
|
||||
@@ -1899,7 +2243,7 @@ human_numcompare (char const *a, char co
|
||||
hideously fast. */
|
||||
|
||||
static int
|
||||
@ -2958,7 +2958,7 @@ Index: src/sort.c
|
||||
{
|
||||
while (blanks[to_uchar (*a)])
|
||||
a++;
|
||||
@@ -1928,6 +2272,25 @@ nan_compare (char const *sa, char const
|
||||
@@ -1927,6 +2271,25 @@ nan_compare (char const *sa, char const
|
||||
return memcmp (&a, &b, sizeof a);
|
||||
}
|
||||
|
||||
@ -2984,7 +2984,7 @@ Index: src/sort.c
|
||||
static int
|
||||
general_numcompare (char const *sa, char const *sb)
|
||||
{
|
||||
@@ -1960,7 +2323,7 @@ general_numcompare (char const *sa, char
|
||||
@@ -1959,7 +2322,7 @@ general_numcompare (char const *sa, char
|
||||
Return 0 if the name in S is not recognized. */
|
||||
|
||||
static int
|
||||
@ -2993,7 +2993,7 @@ Index: src/sort.c
|
||||
{
|
||||
size_t lo = 0;
|
||||
size_t hi = MONTHS_PER_YEAR;
|
||||
@@ -2235,15 +2598,14 @@ debug_key (struct line const *line, stru
|
||||
@@ -2234,15 +2597,14 @@ debug_key (struct line const *line, stru
|
||||
char saved = *lim;
|
||||
*lim = '\0';
|
||||
|
||||
@ -3011,7 +3011,7 @@ Index: src/sort.c
|
||||
else if (key->general_numeric)
|
||||
ignore_value (strtold (beg, &tighter_lim));
|
||||
else if (key->numeric || key->human_numeric)
|
||||
@@ -2387,7 +2749,7 @@ key_warnings (struct keyfield const *gke
|
||||
@@ -2386,7 +2748,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 */
|
||||
@ -3020,8 +3020,8 @@ Index: src/sort.c
|
||||
&& ((!key->skipsblanks && !(implicit_skip || maybe_space_aligned))
|
||||
|| (!key->skipsblanks && key->schar)
|
||||
|| (!key->skipeblanks && key->echar)))
|
||||
@@ -2445,11 +2807,83 @@ key_warnings (struct keyfield const *gke
|
||||
error (0, 0, _("option `-r' only applies to last-resort comparison"));
|
||||
@@ -2444,11 +2806,83 @@ key_warnings (struct keyfield const *gke
|
||||
error (0, 0, _("option '-r' only applies to last-resort comparison"));
|
||||
}
|
||||
|
||||
+#if HAVE_MBRTOWC
|
||||
@ -3101,11 +3101,11 @@ Index: src/sort.c
|
||||
|
||||
static int
|
||||
-keycompare (struct line const *a, struct line const *b)
|
||||
+keycompare_uni (const struct line *a, const struct line *b)
|
||||
+keycompare_uni (struct line const *a, struct line const *b)
|
||||
{
|
||||
struct keyfield *key = keylist;
|
||||
|
||||
@@ -2534,7 +2968,7 @@ keycompare (struct line const *a, struct
|
||||
@@ -2533,7 +2967,7 @@ keycompare (struct line const *a, struct
|
||||
else if (key->human_numeric)
|
||||
diff = human_numcompare (ta, tb);
|
||||
else if (key->month)
|
||||
@ -3114,7 +3114,7 @@ Index: src/sort.c
|
||||
else if (key->random)
|
||||
diff = compare_random (ta, tlena, tb, tlenb);
|
||||
else if (key->version)
|
||||
@@ -2650,6 +3084,179 @@ keycompare (struct line const *a, struct
|
||||
@@ -2649,6 +3083,179 @@ keycompare (struct line const *a, struct
|
||||
return key->reverse ? -diff : diff;
|
||||
}
|
||||
|
||||
@ -3294,7 +3294,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. */
|
||||
|
||||
@@ -4110,7 +4717,7 @@ main (int argc, char **argv)
|
||||
@@ -4109,7 +4716,7 @@ main (int argc, char **argv)
|
||||
initialize_exit_failure (SORT_FAILURE);
|
||||
|
||||
hard_LC_COLLATE = hard_locale (LC_COLLATE);
|
||||
@ -3303,7 +3303,7 @@ Index: src/sort.c
|
||||
hard_LC_TIME = hard_locale (LC_TIME);
|
||||
#endif
|
||||
|
||||
@@ -4131,6 +4738,29 @@ main (int argc, char **argv)
|
||||
@@ -4130,6 +4737,29 @@ main (int argc, char **argv)
|
||||
thousands_sep = -1;
|
||||
}
|
||||
|
||||
@ -3333,7 +3333,7 @@ Index: src/sort.c
|
||||
have_read_stdin = false;
|
||||
inittables ();
|
||||
|
||||
@@ -4401,13 +5031,34 @@ main (int argc, char **argv)
|
||||
@@ -4400,13 +5030,34 @@ main (int argc, char **argv)
|
||||
|
||||
case 't':
|
||||
{
|
||||
@ -3371,8 +3371,8 @@ Index: src/sort.c
|
||||
+ newtab[0] = '\0';
|
||||
else
|
||||
{
|
||||
/* Provoke with `sort -txx'. Complain about
|
||||
@@ -4418,9 +5069,12 @@ main (int argc, char **argv)
|
||||
/* Provoke with 'sort -txx'. Complain about
|
||||
@@ -4417,9 +5068,12 @@ main (int argc, char **argv)
|
||||
quote (optarg));
|
||||
}
|
||||
}
|
||||
@ -3389,9 +3389,9 @@ Index: src/sort.c
|
||||
|
||||
Index: src/unexpand.c
|
||||
===================================================================
|
||||
--- src/unexpand.c.orig 2012-01-01 10:04:06.000000000 +0100
|
||||
+++ src/unexpand.c 2012-03-09 15:43:28.588977491 +0100
|
||||
@@ -39,12 +39,29 @@
|
||||
--- src/unexpand.c.orig 2012-03-24 21:26:51.000000000 +0100
|
||||
+++ src/unexpand.c 2012-04-16 17:00:03.957114654 +0200
|
||||
@@ -38,12 +38,29 @@
|
||||
#include <stdio.h>
|
||||
#include <getopt.h>
|
||||
#include <sys/types.h>
|
||||
@ -3418,10 +3418,10 @@ Index: src/unexpand.c
|
||||
+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
|
||||
+#endif
|
||||
+
|
||||
/* The official name of this program (e.g., no `g' prefix). */
|
||||
/* The official name of this program (e.g., no 'g' prefix). */
|
||||
#define PROGRAM_NAME "unexpand"
|
||||
|
||||
@@ -104,6 +121,208 @@ static struct option const longopts[] =
|
||||
@@ -103,6 +120,208 @@ static struct option const longopts[] =
|
||||
{NULL, 0, NULL, 0}
|
||||
};
|
||||
|
||||
@ -3630,7 +3630,7 @@ Index: src/unexpand.c
|
||||
void
|
||||
usage (int status)
|
||||
{
|
||||
@@ -526,7 +745,12 @@ main (int argc, char **argv)
|
||||
@@ -524,7 +743,12 @@ main (int argc, char **argv)
|
||||
|
||||
file_list = (optind < argc ? &argv[optind] : stdin_argv);
|
||||
|
||||
@ -3646,8 +3646,8 @@ Index: src/unexpand.c
|
||||
error (EXIT_FAILURE, errno, "-");
|
||||
Index: src/uniq.c
|
||||
===================================================================
|
||||
--- src/uniq.c.orig 2012-01-01 10:04:06.000000000 +0100
|
||||
+++ src/uniq.c 2012-03-09 15:43:28.589977466 +0100
|
||||
--- src/uniq.c.orig 2012-03-24 21:26:51.000000000 +0100
|
||||
+++ src/uniq.c 2012-04-16 17:00:03.957114654 +0200
|
||||
@@ -21,6 +21,16 @@
|
||||
#include <getopt.h>
|
||||
#include <sys/types.h>
|
||||
@ -3684,7 +3684,7 @@ Index: src/uniq.c
|
||||
+#endif
|
||||
+
|
||||
|
||||
/* The official name of this program (e.g., no `g' prefix). */
|
||||
/* The official name of this program (e.g., no 'g' prefix). */
|
||||
#define PROGRAM_NAME "uniq"
|
||||
@@ -108,6 +130,10 @@ static enum delimit_method const delimit
|
||||
/* Select whether/how to delimit groups of duplicate lines. */
|
||||
@ -3697,7 +3697,7 @@ Index: src/uniq.c
|
||||
static struct option const longopts[] =
|
||||
{
|
||||
{"count", no_argument, NULL, 'c'},
|
||||
@@ -207,7 +233,7 @@ size_opt (char const *opt, char const *m
|
||||
@@ -206,7 +232,7 @@ size_opt (char const *opt, char const *m
|
||||
return a pointer to the beginning of the line's field to be compared. */
|
||||
|
||||
static char * _GL_ATTRIBUTE_PURE
|
||||
@ -3706,7 +3706,7 @@ Index: src/uniq.c
|
||||
{
|
||||
size_t count;
|
||||
char const *lp = line->buffer;
|
||||
@@ -227,6 +253,83 @@ find_field (struct linebuffer const *lin
|
||||
@@ -226,6 +252,83 @@ find_field (struct linebuffer const *lin
|
||||
return line->buffer + i;
|
||||
}
|
||||
|
||||
@ -3790,7 +3790,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.
|
||||
@@ -235,6 +338,8 @@ find_field (struct linebuffer const *lin
|
||||
@@ -234,6 +337,8 @@ find_field (struct linebuffer const *lin
|
||||
static bool
|
||||
different (char *old, char *new, size_t oldlen, size_t newlen)
|
||||
{
|
||||
@ -3799,7 +3799,7 @@ Index: src/uniq.c
|
||||
if (check_chars < oldlen)
|
||||
oldlen = check_chars;
|
||||
if (check_chars < newlen)
|
||||
@@ -242,14 +347,92 @@ different (char *old, char *new, size_t
|
||||
@@ -241,14 +346,92 @@ different (char *old, char *new, size_t
|
||||
|
||||
if (ignore_case)
|
||||
{
|
||||
@ -3897,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.
|
||||
@@ -305,15 +488,43 @@ check_file (const char *infile, const ch
|
||||
@@ -304,15 +487,43 @@ check_file (const char *infile, const ch
|
||||
{
|
||||
char *prevfield IF_LINT ( = NULL);
|
||||
size_t prevlen IF_LINT ( = 0);
|
||||
@ -3941,7 +3941,7 @@ Index: src/uniq.c
|
||||
if (prevline->length == 0
|
||||
|| different (thisfield, prevfield, thislen, prevlen))
|
||||
{
|
||||
@@ -332,17 +543,26 @@ check_file (const char *infile, const ch
|
||||
@@ -331,17 +542,26 @@ check_file (const char *infile, const ch
|
||||
size_t prevlen;
|
||||
uintmax_t match_count = 0;
|
||||
bool first_delimiter = true;
|
||||
@ -3968,7 +3968,7 @@ Index: src/uniq.c
|
||||
if (readlinebuffer_delim (thisline, stdin, delimiter) == 0)
|
||||
{
|
||||
if (ferror (stdin))
|
||||
@@ -351,6 +571,15 @@ check_file (const char *infile, const ch
|
||||
@@ -350,6 +570,15 @@ check_file (const char *infile, const ch
|
||||
}
|
||||
thisfield = find_field (thisline);
|
||||
thislen = thisline->length - 1 - (thisfield - thisline->buffer);
|
||||
@ -3984,7 +3984,7 @@ Index: src/uniq.c
|
||||
match = !different (thisfield, prevfield, thislen, prevlen);
|
||||
match_count += match;
|
||||
|
||||
@@ -383,6 +612,9 @@ check_file (const char *infile, const ch
|
||||
@@ -382,6 +611,9 @@ check_file (const char *infile, const ch
|
||||
SWAP_LINES (prevline, thisline);
|
||||
prevfield = thisfield;
|
||||
prevlen = thislen;
|
||||
@ -3994,7 +3994,7 @@ Index: src/uniq.c
|
||||
if (!match)
|
||||
match_count = 0;
|
||||
}
|
||||
@@ -428,6 +660,19 @@ main (int argc, char **argv)
|
||||
@@ -427,6 +659,19 @@ main (int argc, char **argv)
|
||||
|
||||
atexit (close_stdout);
|
||||
|
||||
@ -4016,17 +4016,17 @@ Index: src/uniq.c
|
||||
check_chars = SIZE_MAX;
|
||||
Index: tests/Makefile.am
|
||||
===================================================================
|
||||
--- tests/Makefile.am.orig 2012-01-03 16:48:48.000000000 +0100
|
||||
+++ tests/Makefile.am 2012-03-09 15:43:28.589977466 +0100
|
||||
@@ -241,6 +241,7 @@ TESTS = \
|
||||
misc/sort-debug-keys \
|
||||
--- tests/Makefile.am.orig 2012-03-24 19:22:13.000000000 +0100
|
||||
+++ tests/Makefile.am 2012-04-16 17:00:03.957114654 +0200
|
||||
@@ -243,6 +243,7 @@ TESTS = \
|
||||
misc/sort-debug-warn \
|
||||
misc/sort-discrim \
|
||||
misc/sort-files0-from \
|
||||
+ misc/sort-mb-tests \
|
||||
misc/sort-float \
|
||||
misc/sort-merge \
|
||||
misc/sort-merge-fdlimit \
|
||||
@@ -526,6 +527,10 @@ TESTS = \
|
||||
@@ -537,6 +538,10 @@ TESTS = \
|
||||
$(root_tests)
|
||||
|
||||
pr_data = \
|
||||
@ -4039,11 +4039,11 @@ Index: tests/Makefile.am
|
||||
pr/0FFnt \
|
||||
Index: tests/misc/cut
|
||||
===================================================================
|
||||
--- tests/misc/cut.orig 2012-01-01 10:04:06.000000000 +0100
|
||||
+++ tests/misc/cut 2012-03-09 15:43:28.589977466 +0100
|
||||
--- tests/misc/cut.orig 2012-02-03 10:22:06.000000000 +0100
|
||||
+++ tests/misc/cut 2012-04-16 17:00:03.957114654 +0200
|
||||
@@ -30,7 +30,7 @@ my $mb_locale = $ENV{LOCALE_FR_UTF8};
|
||||
my $prog = 'cut';
|
||||
my $try = "Try \`$prog --help' for more information.\n";
|
||||
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";
|
||||
@ -4062,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 2012-03-09 15:43:28.589977466 +0100
|
||||
+++ tests/misc/mb1.I 2012-04-16 17:00:03.958114628 +0200
|
||||
@@ -0,0 +1,4 @@
|
||||
+Apple@10
|
||||
+Banana@5
|
||||
@ -4071,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 2012-03-09 15:43:28.589977466 +0100
|
||||
+++ tests/misc/mb1.X 2012-04-16 17:00:03.958114628 +0200
|
||||
@@ -0,0 +1,4 @@
|
||||
+Banana@5
|
||||
+Apple@10
|
||||
@ -4080,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 2012-03-09 15:43:28.589977466 +0100
|
||||
+++ tests/misc/mb2.I 2012-04-16 17:00:03.958114628 +0200
|
||||
@@ -0,0 +1,4 @@
|
||||
+Apple@AA10@@20
|
||||
+Banana@AA5@@30
|
||||
@ -4089,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 2012-03-09 15:43:28.589977466 +0100
|
||||
+++ tests/misc/mb2.X 2012-04-16 17:00:03.958114628 +0200
|
||||
@@ -0,0 +1,4 @@
|
||||
+Citrus@AA20@@5
|
||||
+Cherry@AA30@@10
|
||||
@ -4098,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 2012-03-09 15:43:28.589977466 +0100
|
||||
+++ tests/misc/sort-mb-tests 2012-04-16 17:00:03.958114628 +0200
|
||||
@@ -0,0 +1,58 @@
|
||||
+#! /bin/sh
|
||||
+case $# in
|
@ -13,9 +13,9 @@ Andreas Gruenbacher <agruen@suse.de>
|
||||
|
||||
Index: src/chgrp.c
|
||||
===================================================================
|
||||
--- src/chgrp.c.orig 2010-01-01 14:06:47.000000000 +0100
|
||||
+++ src/chgrp.c 2010-05-05 14:03:28.279359192 +0200
|
||||
@@ -89,7 +89,7 @@ parse_group (const char *name)
|
||||
--- src/chgrp.c.orig 2012-03-24 19:22:13.000000000 +0100
|
||||
+++ src/chgrp.c 2012-04-16 13:22:03.004026462 +0200
|
||||
@@ -88,7 +88,7 @@ parse_group (const char *name)
|
||||
{
|
||||
unsigned long int tmp;
|
||||
if (! (xstrtoul (name, NULL, 10, &tmp, "") == LONGINT_OK
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: gnulib-tests/test-isnanl.h
|
||||
===================================================================
|
||||
--- gnulib-tests/test-isnanl.h.orig 2011-10-09 19:02:27.000000000 +0200
|
||||
+++ gnulib-tests/test-isnanl.h 2011-10-13 15:58:39.627054718 +0200
|
||||
@@ -49,7 +49,7 @@ main ()
|
||||
--- gnulib-tests/test-isnanl.h.orig 2012-01-06 08:20:50.000000000 +0100
|
||||
+++ gnulib-tests/test-isnanl.h 2012-04-16 13:22:02.969027310 +0200
|
||||
@@ -47,7 +47,7 @@ main ()
|
||||
/* Quiet NaN. */
|
||||
ASSERT (isnanl (NaNl ()));
|
||||
|
||||
@ -11,7 +11,7 @@ Index: gnulib-tests/test-isnanl.h
|
||||
/* A bit pattern that is different from a Quiet NaN. With a bit of luck,
|
||||
it's a Signalling NaN. */
|
||||
{
|
||||
@@ -91,6 +91,7 @@ main ()
|
||||
@@ -89,6 +89,7 @@ main ()
|
||||
{ LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
|
||||
ASSERT (isnanl (x.value));
|
||||
}
|
||||
@ -19,7 +19,7 @@ Index: gnulib-tests/test-isnanl.h
|
||||
/* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
|
||||
Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
|
||||
Intel IA-64 Architecture Software Developer's Manual, Volume 1:
|
||||
@@ -124,6 +125,7 @@ main ()
|
||||
@@ -122,6 +123,7 @@ main ()
|
||||
ASSERT (isnanl (x.value));
|
||||
}
|
||||
#endif
|
||||
@ -29,9 +29,9 @@ Index: gnulib-tests/test-isnanl.h
|
||||
}
|
||||
Index: tests/misc/help-version
|
||||
===================================================================
|
||||
--- tests/misc/help-version.orig 2011-07-28 12:38:27.000000000 +0200
|
||||
+++ tests/misc/help-version 2011-10-13 15:58:39.628054705 +0200
|
||||
@@ -250,6 +250,7 @@ parted_setup () { args="-s $tmp_in mklab
|
||||
--- tests/misc/help-version.orig 2012-03-24 19:22:13.000000000 +0100
|
||||
+++ tests/misc/help-version 2012-04-16 13:22:02.970027285 +0200
|
||||
@@ -251,6 +251,7 @@ parted_setup () { args="-s $tmp_in mklab
|
||||
for i in $built_programs; do
|
||||
# Skip these.
|
||||
case $i in chroot|stty|tty|false|chcon|runcon) continue;; esac
|
||||
@ -41,9 +41,9 @@ Index: tests/misc/help-version
|
||||
echo z |gzip > $zin
|
||||
Index: tests/other-fs-tmpdir
|
||||
===================================================================
|
||||
--- tests/other-fs-tmpdir.orig 2011-07-28 12:38:27.000000000 +0200
|
||||
+++ tests/other-fs-tmpdir 2011-10-13 16:01:02.181139986 +0200
|
||||
@@ -44,6 +44,9 @@ for d in $CANDIDATE_TMP_DIRS; do
|
||||
--- tests/other-fs-tmpdir.orig 2012-03-24 19:22:13.000000000 +0100
|
||||
+++ tests/other-fs-tmpdir 2012-04-16 13:22:02.970027285 +0200
|
||||
@@ -43,6 +43,9 @@ for d in $CANDIDATE_TMP_DIRS; do
|
||||
|
||||
done
|
||||
|
||||
|
@ -1,98 +0,0 @@
|
||||
From b51e77776fbc4c8fa6727388b735427596595477 Mon Sep 17 00:00:00 2001
|
||||
From: Jim Meyering <meyering@redhat.com>
|
||||
Date: Thu, 8 Mar 2012 10:33:50 +0100
|
||||
Subject: [PATCH] du: --one-file-system (-x) ignores non-directory arguments
|
||||
|
||||
Surprise! "du -x non-DIR" would print nothing.
|
||||
Note that the problem arises only when processing a non-directory
|
||||
specified on the command line. Not surprisingly, "du -x" still
|
||||
works as expected for any directory argument.
|
||||
|
||||
When performing its same-file-system check, du may skip an entry
|
||||
only if it is at fts_level 1 or greater. Command-line arguments
|
||||
are at fts_level == 0 (FTS_ROOTLEVEL).
|
||||
|
||||
* src/du.c (process_file): Don't use the top-level FTS->fts_dev
|
||||
when testing for --one-file-system (-x). It happens to be valid
|
||||
for directories, but it is always 0 for a non-directory.
|
||||
* tests/du/one-file-system: Add tests for this.
|
||||
* NEWS (Bug fixes): Mention it.
|
||||
Reported by Daniel Stavrovski in http://bugs.gnu.org/10967.
|
||||
Introduced by commit v8.14-95-gcfe1040.
|
||||
---
|
||||
NEWS | 4 ++++
|
||||
THANKS.in | 1 +
|
||||
src/du.c | 9 ++++++++-
|
||||
tests/du/one-file-system | 10 +++++++++-
|
||||
4 files changed, 22 insertions(+), 2 deletions(-)
|
||||
|
||||
Signed-off-by: Philipp Thomas <pth@suse.de>
|
||||
|
||||
Index: NEWS
|
||||
===================================================================
|
||||
--- NEWS.orig 2012-01-06 18:05:54.000000000 +0100
|
||||
+++ NEWS 2012-03-09 16:02:59.869039812 +0100
|
||||
@@ -8,6 +8,10 @@ GNU coreutils NEWS
|
||||
|
||||
** Bug fixes
|
||||
|
||||
+ du --one-file-system (-x) would ignore any non-directory specified on
|
||||
+ the command line. For example, "touch f; du -x f" would print nothing.
|
||||
+ [bug introduced in coreutils-8.14]
|
||||
+
|
||||
du -x no longer counts root directories of other file systems.
|
||||
[bug introduced in coreutils-5.1.0]
|
||||
|
||||
Index: THANKS.in
|
||||
===================================================================
|
||||
--- THANKS.in.orig 2012-01-06 10:14:19.000000000 +0100
|
||||
+++ THANKS.in 2012-03-09 16:05:13.299787739 +0100
|
||||
@@ -133,6 +133,7 @@ Dan Hagerty hag@
|
||||
Dan Pascu dan@services.iiruc.ro
|
||||
Daniel Bergstrom noa@melody.se
|
||||
Daniel P. Berrangé berrange@redhat.com
|
||||
+Daniel Stavrovski d@stavrovski.net
|
||||
Dániel Varga danielv@axelero.hu
|
||||
Danny Levinson danny.levinson@overture.com
|
||||
Darrel Francis d.francis@cheerful.com
|
||||
Index: src/du.c
|
||||
===================================================================
|
||||
--- src/du.c.orig 2012-01-01 10:04:06.000000000 +0100
|
||||
+++ src/du.c 2012-03-09 16:02:22.412951567 +0100
|
||||
@@ -444,7 +444,14 @@ process_file (FTS *fts, FTSENT *ent)
|
||||
return false;
|
||||
}
|
||||
|
||||
- if (fts->fts_options & FTS_XDEV && fts->fts_dev != sb->st_dev)
|
||||
+ /* The --one-file-system (-x) option cannot exclude anything
|
||||
+ specified on the command-line. By definition, it can exclude
|
||||
+ a file or directory only when its device number is different
|
||||
+ from that of its just-processed parent directory, and du does
|
||||
+ not process the parent of a command-line argument. */
|
||||
+ if (fts->fts_options & FTS_XDEV
|
||||
+ && FTS_ROOTLEVEL < ent->fts_level
|
||||
+ && fts->fts_dev != sb->st_dev)
|
||||
excluded = true;
|
||||
}
|
||||
|
||||
Index: tests/du/one-file-system
|
||||
===================================================================
|
||||
--- tests/du/one-file-system.orig 2012-01-01 10:04:06.000000000 +0100
|
||||
+++ tests/du/one-file-system 2012-03-09 16:02:22.412951567 +0100
|
||||
@@ -43,7 +43,15 @@ compare exp out || fail=1
|
||||
du -xL d > u || fail=1
|
||||
sed 's/^[0-9][0-9]* //' u > out1
|
||||
echo d > exp1 || fail=1
|
||||
-
|
||||
compare exp1 out1 || fail=1
|
||||
|
||||
+# With coreutils-8.15, "du -xs FILE" would print no output.
|
||||
+touch f
|
||||
+for opt in -x -xs; do
|
||||
+ du $opt f > u || fail=1
|
||||
+ sed 's/^[0-9][0-9]* //' u > out2
|
||||
+ echo f > exp2 || fail=1
|
||||
+ compare exp2 out2 || fail=1
|
||||
+done
|
||||
+
|
||||
Exit $fail
|
@ -1,8 +1,8 @@
|
||||
Index: src/join.c
|
||||
===================================================================
|
||||
--- src/join.c.orig 2010-11-11 16:29:37.000000000 +0100
|
||||
+++ src/join.c 2010-11-11 17:04:33.776501344 +0100
|
||||
@@ -1273,7 +1273,7 @@ main (int argc, char **argv)
|
||||
--- src/join.c.orig 2012-04-16 16:54:22.032279169 +0200
|
||||
+++ src/join.c 2012-04-16 16:54:22.163275636 +0200
|
||||
@@ -1320,7 +1320,7 @@ main (int argc, char **argv)
|
||||
|
||||
case 't':
|
||||
{
|
||||
@ -11,7 +11,7 @@ Index: src/join.c
|
||||
size_t newtablen;
|
||||
newtab = xstrdup (optarg);
|
||||
#if HAVE_MBRTOWC
|
||||
@@ -1295,7 +1295,7 @@ main (int argc, char **argv)
|
||||
@@ -1342,7 +1342,7 @@ main (int argc, char **argv)
|
||||
newtablen = 1;
|
||||
if (! newtab)
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: doc/coreutils.texi
|
||||
===================================================================
|
||||
--- doc/coreutils.texi.orig 2012-01-03 16:48:48.000000000 +0100
|
||||
+++ doc/coreutils.texi 2012-03-09 15:48:33.736415777 +0100
|
||||
--- doc/coreutils.texi.orig 2012-03-26 07:38:37.000000000 +0200
|
||||
+++ doc/coreutils.texi 2012-04-16 13:22:12.487797130 +0200
|
||||
@@ -66,7 +66,6 @@
|
||||
* groups: (coreutils)groups invocation. Print group names a user is in.
|
||||
* head: (coreutils)head invocation. Output the first part of files.
|
||||
@ -27,7 +27,7 @@ Index: doc/coreutils.texi
|
||||
* hostid invocation:: Print numeric host identifier
|
||||
* uptime invocation:: Print system uptime and load
|
||||
|
||||
@@ -14010,7 +14008,6 @@ information.
|
||||
@@ -14135,7 +14133,6 @@ information.
|
||||
* arch invocation:: Print machine hardware name.
|
||||
* nproc invocation:: Print the number of processors.
|
||||
* uname invocation:: Print system information.
|
||||
@ -35,7 +35,7 @@ Index: doc/coreutils.texi
|
||||
* hostid invocation:: Print numeric host identifier.
|
||||
* uptime invocation:: Print system uptime and load.
|
||||
@end menu
|
||||
@@ -14797,15 +14794,6 @@ easily available, as is the case with Li
|
||||
@@ -14922,15 +14919,6 @@ easily available, as is the case with Li
|
||||
Print the machine hardware name (sometimes called the hardware class
|
||||
or hardware type).
|
||||
|
||||
@ -51,7 +51,7 @@ Index: doc/coreutils.texi
|
||||
@item -p
|
||||
@itemx --processor
|
||||
@opindex -p
|
||||
@@ -14859,30 +14847,6 @@ Print the kernel version.
|
||||
@@ -14984,30 +14972,6 @@ Print the kernel version.
|
||||
|
||||
@exitstatus
|
||||
|
||||
@ -84,8 +84,8 @@ Index: doc/coreutils.texi
|
||||
@section @command{hostid}: Print numeric host identifier
|
||||
Index: man/Makefile.am
|
||||
===================================================================
|
||||
--- man/Makefile.am.orig 2012-01-03 16:48:48.000000000 +0100
|
||||
+++ man/Makefile.am 2012-03-09 15:47:39.651756452 +0100
|
||||
--- man/Makefile.am.orig 2012-03-26 11:50:41.000000000 +0200
|
||||
+++ man/Makefile.am 2012-04-16 13:22:02.980027043 +0200
|
||||
@@ -199,7 +199,7 @@ check-x-vs-1:
|
||||
@PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \
|
||||
t=$@-t; \
|
||||
@ -97,9 +97,9 @@ Index: man/Makefile.am
|
||||
rm $$t
|
||||
Index: man/Makefile.in
|
||||
===================================================================
|
||||
--- man/Makefile.in.orig 2012-01-06 16:49:22.000000000 +0100
|
||||
+++ man/Makefile.in 2012-03-09 15:47:39.652756427 +0100
|
||||
@@ -1874,7 +1874,7 @@ check-x-vs-1:
|
||||
--- man/Makefile.in.orig 2012-03-26 11:50:44.000000000 +0200
|
||||
+++ man/Makefile.in 2012-04-16 13:22:02.980027043 +0200
|
||||
@@ -2030,7 +2030,7 @@ check-x-vs-1:
|
||||
@PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \
|
||||
t=$@-t; \
|
||||
(cd $(srcdir) && ls -1 *.x) | sed 's/\.x$$//' | $(ASSORT) > $$t;\
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: src/uname.c
|
||||
===================================================================
|
||||
--- src/uname.c.orig 2010-01-01 14:06:47.000000000 +0100
|
||||
+++ src/uname.c 2010-05-05 13:58:03.471359120 +0200
|
||||
@@ -339,6 +339,36 @@ main (int argc, char **argv)
|
||||
--- src/uname.c.orig 2012-03-24 21:26:51.000000000 +0100
|
||||
+++ src/uname.c 2012-04-16 13:22:02.996026656 +0200
|
||||
@@ -337,6 +337,36 @@ main (int argc, char **argv)
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
@ -39,7 +39,7 @@ Index: src/uname.c
|
||||
if (! (toprint == UINT_MAX && element == unknown))
|
||||
print_element (element);
|
||||
}
|
||||
@@ -364,6 +394,18 @@ main (int argc, char **argv)
|
||||
@@ -362,6 +392,18 @@ main (int argc, char **argv)
|
||||
element = hardware_platform;
|
||||
}
|
||||
#endif
|
||||
|
@ -1,3 +1,65 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 16 13:23:56 CEST 2012 - pth@suse.de
|
||||
|
||||
- Update to 8.16:
|
||||
|
||||
- Improvements:
|
||||
* As a GNU extension, 'chmod', 'mkdir', and 'install' now accept
|
||||
operators '-', '+', '=' followed by octal modes;
|
||||
* Also, ordinary numeric modes with five or more digits no longer
|
||||
preserve setuid and setgid bits, so that 'chmod 00755 FOO' now
|
||||
clears FOO's setuid and setgid bits.
|
||||
* dd now accepts the count_bytes, skip_bytes iflags and the
|
||||
seek_bytes oflag, to more easily allow processing portions of a
|
||||
file.
|
||||
* dd now accepts the conv=sparse flag to attempt to create sparse
|
||||
output, by seeking rather than writing to the output file.
|
||||
* ln now accepts the --relative option, to generate a relative
|
||||
symbolic link to a target, irrespective of how the target is
|
||||
specified.
|
||||
* split now accepts an optional "from" argument to
|
||||
--numeric-suffixes, which changes the start number from the
|
||||
default of 0.
|
||||
* split now accepts the --additional-suffix option, to append an
|
||||
additional static suffix to output file names.
|
||||
* basename now supports the -a and -s options, which allow
|
||||
processing of more than one argument at a time. Also the
|
||||
complementary -z option was added to delimit output items with
|
||||
the NUL character.
|
||||
* dirname now supports more than one argument. Also the complementary
|
||||
z option was added to delimit output items with the NUL character.
|
||||
|
||||
- Bug fixes
|
||||
* du --one-file-system (-x) would ignore any non-directory
|
||||
specified on the command line. For example, "touch f; du -x f"
|
||||
would print nothing. [bug introduced in coreutils-8.15]
|
||||
* mv now lets you move a symlink onto a same-inode destination
|
||||
file that has two or more hard links.
|
||||
* "mv A B" could succeed, yet A would remain.
|
||||
* realpath no longer mishandles a root directory.
|
||||
|
||||
- Improvements
|
||||
* ls can be much more efficient, especially with large directories
|
||||
on file systems for which getfilecon-, ACL-check- and XATTR-
|
||||
check-induced syscalls fail with ENOTSUP or similar.
|
||||
* 'realpath --relative-base=dir' in isolation now implies
|
||||
'--relative-to=dir' instead of causing a usage failure.
|
||||
* split now supports an unlimited number of split files as default
|
||||
behavior.
|
||||
|
||||
For a detaild list se NEWS in the documentation.
|
||||
|
||||
- Add up-to-date german translation.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 16 12:00:34 CEST 2012 - pth@suse.de
|
||||
|
||||
- Add two upstream patches that speed up ls (bnc#752943):
|
||||
* Cache (l)getfilecon calls to avoid the vast majority of the failing
|
||||
underlying getxattr syscalls.
|
||||
* Avoids always-failing queries for whether a file has a nontrivial
|
||||
ACL and for whether a file has certain "capabilities".
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 9 17:30:19 CET 2012 - pth@suse.de
|
||||
|
||||
|
@ -28,11 +28,22 @@ BuildRequires: libselinux-devel
|
||||
BuildRequires: pam-devel
|
||||
BuildRequires: xz
|
||||
Url: http://www.gnu.org/software/coreutils/
|
||||
Version: 8.15
|
||||
Version: 8.16
|
||||
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
|
||||
Provides: fileutils = %{version}
|
||||
Provides: mktemp = %{version}
|
||||
Provides: sh-utils = %{version}
|
||||
Provides: stat = %version}
|
||||
Provides: textutils = %{version}
|
||||
Obsoletes: fileutils < %{version}
|
||||
Obsoletes: libselinux <= 1.23.11-3
|
||||
Obsoletes: libselinux-32bit = 9
|
||||
Obsoletes: libselinux-64bit = 9
|
||||
Obsoletes: libselinux-x86 = 9
|
||||
Obsoletes: mktemp < %{version}
|
||||
Obsoletes: sh-utils < %{version}
|
||||
Obsoletes: stat < %version}
|
||||
Obsoletes: textutils < %{version}
|
||||
PreReq: %{install_info_prereq}
|
||||
Recommends: %{name}-lang = %version
|
||||
Requires: pam >= 1.1.1.90
|
||||
@ -44,7 +55,8 @@ Source4: coreutils-%{version}.de.po.xz
|
||||
Patch0: coreutils-misc.patch
|
||||
Patch1: coreutils-remove_hostname_documentation.patch
|
||||
Patch2: coreutils-gl_printf_safe.patch
|
||||
Patch4: coreutils-8.6-i18n.patch
|
||||
#Remove the bogus coreutils version from the i18n patch name
|
||||
Patch4: coreutils-i18n.patch
|
||||
Patch5: coreutils-i18n-uninit.patch
|
||||
Patch6: coreutils-i18n-infloop.patch
|
||||
Patch8: coreutils-sysinfo.patch
|
||||
@ -61,8 +73,8 @@ Patch31: coreutils-getaddrinfo.patch
|
||||
Patch32: coreutils-ptr_int_casts.patch
|
||||
Patch33: coreutils-8.9-singlethreaded-sort.patch
|
||||
Patch34: coreutils-acl-nofollow.patch
|
||||
Patch35: coreutils-one-file-system_ignores_non-directory_arguments.patch
|
||||
Patch36: coreutils-basename_documentation.patch
|
||||
Patch37: coreutils-bnc#697897-setsid.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
# this will create a cycle, broken up randomly - coreutils is just too core to have other
|
||||
# prerequires
|
||||
@ -96,18 +108,18 @@ uname unexpand uniq unlink uptime users vdir wc who whoami yes
|
||||
%patch21
|
||||
%patch22 -p1
|
||||
%patch23 -p1
|
||||
%patch24 -p1
|
||||
%patch25 -p1
|
||||
%patch24
|
||||
%patch25
|
||||
#
|
||||
%patch30 -p1
|
||||
%patch30
|
||||
%patch31
|
||||
%patch32
|
||||
%patch33
|
||||
%patch34
|
||||
%patch35
|
||||
%patch36
|
||||
%patch37
|
||||
|
||||
#xz -dc %{S:4} >po/de.po
|
||||
xz -dc %{S:4} >po/de.po
|
||||
|
||||
%build
|
||||
AUTOPOINT=true autoreconf -fi
|
||||
|
Loading…
Reference in New Issue
Block a user