forked from pool/coreutils
This commit is contained in:
parent
e975f8daa8
commit
9228a75c9e
File diff suppressed because it is too large
Load Diff
@ -1,8 +1,31 @@
|
|||||||
Index: src/Makefile.am
|
Index: src/Makefile.am
|
||||||
===================================================================
|
================================================================================
|
||||||
--- src/Makefile.am.orig
|
--- configure.ac
|
||||||
|
+++ configure.ac
|
||||||
|
@@ -46,6 +46,20 @@ coreutils_MACROS
|
||||||
|
|
||||||
|
AC_FUNC_FORK
|
||||||
|
|
||||||
|
+AC_ARG_ENABLE(pam, AS_HELP_STRING([--disable-pam],
|
||||||
|
+ [Enable PAM support in su (default=auto)]), , [enable_pam=yes])
|
||||||
|
+if test "x$enable_pam" != xno; then
|
||||||
|
+ AC_CHECK_LIB([pam], [pam_start], [enable_pam=yes], [enable_pam=no])
|
||||||
|
+ AC_CHECK_LIB([pam_misc], [misc_conv], [:], [enable_pam=no])
|
||||||
|
+ if test "x$enable_pam" != xno; then
|
||||||
|
+ AC_DEFINE(USE_PAM, 1, [Define if you want to use PAM])
|
||||||
|
+ PAM_LIBS="-lpam -lpam_misc"
|
||||||
|
+ AC_SUBST(PAM_LIBS)
|
||||||
|
+ fi
|
||||||
|
+fi
|
||||||
|
+AC_MSG_CHECKING([whether to enable PAM support in su])
|
||||||
|
+AC_MSG_RESULT([$enable_pam])
|
||||||
|
+
|
||||||
|
optional_bin_progs=
|
||||||
|
AC_CHECK_FUNCS(uname,
|
||||||
|
gl_ADD_PROG([optional_bin_progs], [uname]))
|
||||||
|
--- src/Makefile.am
|
||||||
+++ src/Makefile.am
|
+++ src/Makefile.am
|
||||||
@@ -102,7 +102,8 @@ tail_LDADD = $(nanosec_libs)
|
@@ -124,7 +124,8 @@ tail_LDADD = $(nanosec_libs)
|
||||||
# If necessary, add -lm to resolve use of pow in lib/strtod.c.
|
# If necessary, add -lm to resolve use of pow in lib/strtod.c.
|
||||||
uptime_LDADD = $(LDADD) $(POW_LIB) $(GETLOADAVG_LIBS)
|
uptime_LDADD = $(LDADD) $(POW_LIB) $(GETLOADAVG_LIBS)
|
||||||
|
|
||||||
@ -10,11 +33,9 @@ Index: src/Makefile.am
|
|||||||
+su_SOURCES = su.c getdef.c
|
+su_SOURCES = su.c getdef.c
|
||||||
+su_LDADD = $(LDADD) $(LIB_CRYPT) $(PAM_LIBS)
|
+su_LDADD = $(LDADD) $(LIB_CRYPT) $(PAM_LIBS)
|
||||||
|
|
||||||
dir_LDADD += $(LIB_ACL)
|
dir_LDADD += $(LIB_ACL_TRIVIAL) $(LIB_ACL)
|
||||||
ls_LDADD += $(LIB_ACL)
|
ls_LDADD += $(LIB_ACL_TRIVIAL) $(LIB_ACL)
|
||||||
Index: src/getdef.c
|
--- src/getdef.c
|
||||||
===================================================================
|
|
||||||
--- /dev/null
|
|
||||||
+++ src/getdef.c
|
+++ src/getdef.c
|
||||||
@@ -0,0 +1,257 @@
|
@@ -0,0 +1,257 @@
|
||||||
+/* Copyright (C) 2003, 2004, 2005 Thorsten Kukuk
|
+/* Copyright (C) 2003, 2004, 2005 Thorsten Kukuk
|
||||||
@ -274,9 +295,7 @@ Index: src/getdef.c
|
|||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+#endif
|
+#endif
|
||||||
Index: src/getdef.h
|
--- src/getdef.h
|
||||||
===================================================================
|
|
||||||
--- /dev/null
|
|
||||||
+++ src/getdef.h
|
+++ src/getdef.h
|
||||||
@@ -0,0 +1,29 @@
|
@@ -0,0 +1,29 @@
|
||||||
+/* Copyright (C) 2003, 2005 Thorsten Kukuk
|
+/* Copyright (C) 2003, 2005 Thorsten Kukuk
|
||||||
@ -308,11 +327,9 @@ Index: src/getdef.h
|
|||||||
+extern void free_getdef_data (void);
|
+extern void free_getdef_data (void);
|
||||||
+
|
+
|
||||||
+#endif /* _GETDEF_H_ */
|
+#endif /* _GETDEF_H_ */
|
||||||
Index: src/su.c
|
--- src/su.c
|
||||||
===================================================================
|
|
||||||
--- src/su.c.orig
|
|
||||||
+++ src/su.c
|
+++ src/su.c
|
||||||
@@ -38,6 +38,16 @@
|
@@ -37,6 +37,16 @@
|
||||||
restricts who can su to UID 0 accounts. RMS considers that to
|
restricts who can su to UID 0 accounts. RMS considers that to
|
||||||
be fascist.
|
be fascist.
|
||||||
|
|
||||||
@ -329,7 +346,7 @@ Index: src/su.c
|
|||||||
Compile-time options:
|
Compile-time options:
|
||||||
-DSYSLOG_SUCCESS Log successful su's (by default, to root) with syslog.
|
-DSYSLOG_SUCCESS Log successful su's (by default, to root) with syslog.
|
||||||
-DSYSLOG_FAILURE Log failed su's (by default, to root) with syslog.
|
-DSYSLOG_FAILURE Log failed su's (by default, to root) with syslog.
|
||||||
@@ -53,6 +63,13 @@
|
@@ -52,6 +62,13 @@
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#include <grp.h>
|
#include <grp.h>
|
||||||
@ -343,7 +360,7 @@ Index: src/su.c
|
|||||||
|
|
||||||
/* Hide any system prototype for getusershell.
|
/* Hide any system prototype for getusershell.
|
||||||
This is necessary because some Cray systems have a conflicting
|
This is necessary because some Cray systems have a conflicting
|
||||||
@@ -66,6 +83,9 @@
|
@@ -65,6 +82,9 @@
|
||||||
|
|
||||||
#if HAVE_SYSLOG_H && HAVE_SYSLOG
|
#if HAVE_SYSLOG_H && HAVE_SYSLOG
|
||||||
# include <syslog.h>
|
# include <syslog.h>
|
||||||
@ -353,7 +370,7 @@ Index: src/su.c
|
|||||||
#else
|
#else
|
||||||
# undef SYSLOG_SUCCESS
|
# undef SYSLOG_SUCCESS
|
||||||
# undef SYSLOG_FAILURE
|
# undef SYSLOG_FAILURE
|
||||||
@@ -99,19 +119,13 @@
|
@@ -98,19 +118,13 @@
|
||||||
# include <paths.h>
|
# include <paths.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -377,7 +394,7 @@ Index: src/su.c
|
|||||||
|
|
||||||
/* The shell to run if none is given in the user's passwd entry. */
|
/* The shell to run if none is given in the user's passwd entry. */
|
||||||
#define DEFAULT_SHELL "/bin/sh"
|
#define DEFAULT_SHELL "/bin/sh"
|
||||||
@@ -119,13 +133,22 @@
|
@@ -118,13 +132,22 @@
|
||||||
/* The user to become if none is specified. */
|
/* The user to become if none is specified. */
|
||||||
#define DEFAULT_USER "root"
|
#define DEFAULT_USER "root"
|
||||||
|
|
||||||
@ -400,7 +417,7 @@ Index: src/su.c
|
|||||||
static void run_shell (char const *, char const *, char **, size_t)
|
static void run_shell (char const *, char const *, char **, size_t)
|
||||||
ATTRIBUTE_NORETURN;
|
ATTRIBUTE_NORETURN;
|
||||||
|
|
||||||
@@ -216,7 +239,163 @@ log_su (struct passwd const *pw, bool su
|
@@ -215,7 +238,163 @@ log_su (struct passwd const *pw, bool su
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -470,7 +487,7 @@ Index: src/su.c
|
|||||||
+ if (retval != PAM_SUCCESS)
|
+ if (retval != PAM_SUCCESS)
|
||||||
+ {
|
+ {
|
||||||
+ cleanup_pam(retval);
|
+ cleanup_pam(retval);
|
||||||
+ error (EXIT_FAIL, 0, _("cannot not open session: %s"),
|
+ error (EXIT_FAILURE, 0, _("cannot not open session: %s"),
|
||||||
+ pam_strerror (pamh, retval));
|
+ pam_strerror (pamh, retval));
|
||||||
+ }
|
+ }
|
||||||
+ else
|
+ else
|
||||||
@ -564,7 +581,7 @@ Index: src/su.c
|
|||||||
Return true if the user gives the correct password for entry PW,
|
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
|
false if not. Return true without asking for a password if run by UID 0
|
||||||
or if PW has an empty password. */
|
or if PW has an empty password. */
|
||||||
@@ -224,10 +403,52 @@ log_su (struct passwd const *pw, bool su
|
@@ -223,10 +402,52 @@ log_su (struct passwd const *pw, bool su
|
||||||
static bool
|
static bool
|
||||||
correct_password (const struct passwd *pw)
|
correct_password (const struct passwd *pw)
|
||||||
{
|
{
|
||||||
@ -618,7 +635,7 @@ Index: src/su.c
|
|||||||
|
|
||||||
endspent ();
|
endspent ();
|
||||||
if (sp)
|
if (sp)
|
||||||
@@ -248,6 +469,7 @@ correct_password (const struct passwd *p
|
@@ -247,6 +468,7 @@ correct_password (const struct passwd *p
|
||||||
encrypted = crypt (unencrypted, correct);
|
encrypted = crypt (unencrypted, correct);
|
||||||
memset (unencrypted, 0, strlen (unencrypted));
|
memset (unencrypted, 0, strlen (unencrypted));
|
||||||
return STREQ (encrypted, correct);
|
return STREQ (encrypted, correct);
|
||||||
@ -626,7 +643,7 @@ Index: src/su.c
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Update `environ' for the new shell based on PW, with SHELL being
|
/* Update `environ' for the new shell based on PW, with SHELL being
|
||||||
@@ -272,8 +494,8 @@ modify_environment (const struct passwd
|
@@ -271,8 +493,8 @@ modify_environment (const struct passwd
|
||||||
xsetenv ("USER", pw->pw_name);
|
xsetenv ("USER", pw->pw_name);
|
||||||
xsetenv ("LOGNAME", pw->pw_name);
|
xsetenv ("LOGNAME", pw->pw_name);
|
||||||
xsetenv ("PATH", (pw->pw_uid
|
xsetenv ("PATH", (pw->pw_uid
|
||||||
@ -637,7 +654,7 @@ Index: src/su.c
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -283,6 +505,12 @@ modify_environment (const struct passwd
|
@@ -282,6 +504,12 @@ modify_environment (const struct passwd
|
||||||
{
|
{
|
||||||
xsetenv ("HOME", pw->pw_dir);
|
xsetenv ("HOME", pw->pw_dir);
|
||||||
xsetenv ("SHELL", shell);
|
xsetenv ("SHELL", shell);
|
||||||
@ -650,13 +667,13 @@ Index: src/su.c
|
|||||||
if (pw->pw_uid)
|
if (pw->pw_uid)
|
||||||
{
|
{
|
||||||
xsetenv ("USER", pw->pw_name);
|
xsetenv ("USER", pw->pw_name);
|
||||||
@@ -290,19 +518,41 @@ modify_environment (const struct passwd
|
@@ -289,19 +517,41 @@ modify_environment (const struct passwd
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+#ifdef USE_PAM
|
+#ifdef USE_PAM
|
||||||
+ export_pamenv();
|
+ export_pamenv ();
|
||||||
+#endif
|
+#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -669,12 +686,12 @@ Index: src/su.c
|
|||||||
#ifdef HAVE_INITGROUPS
|
#ifdef HAVE_INITGROUPS
|
||||||
errno = 0;
|
errno = 0;
|
||||||
if (initgroups (pw->pw_name, pw->pw_gid) == -1)
|
if (initgroups (pw->pw_name, pw->pw_gid) == -1)
|
||||||
- error (EXIT_FAIL, errno, _("cannot set groups"));
|
- error (EXIT_FAILURE, errno, _("cannot set groups"));
|
||||||
+ {
|
+ {
|
||||||
+#ifdef USE_PAM
|
+#ifdef USE_PAM
|
||||||
+ cleanup_pam(PAM_ABORT);
|
+ cleanup_pam(PAM_ABORT);
|
||||||
+#endif
|
+#endif
|
||||||
+ error (EXIT_FAIL, errno, _("cannot set groups"));
|
+ error (EXIT_FAILURE, errno, _("cannot set groups"));
|
||||||
+ }
|
+ }
|
||||||
endgrent ();
|
endgrent ();
|
||||||
#endif
|
#endif
|
||||||
@ -682,7 +699,7 @@ Index: src/su.c
|
|||||||
+#ifdef USE_PAM
|
+#ifdef USE_PAM
|
||||||
+ retval = pam_setcred (pamh, PAM_ESTABLISH_CRED);
|
+ retval = pam_setcred (pamh, PAM_ESTABLISH_CRED);
|
||||||
+ if (retval != PAM_SUCCESS)
|
+ if (retval != PAM_SUCCESS)
|
||||||
+ error (EXIT_FAIL, 0, "%s", pam_strerror (pamh, retval));
|
+ error (EXIT_FAILURE, 0, "%s", pam_strerror (pamh, retval));
|
||||||
+ else
|
+ else
|
||||||
+ _pam_cred_established = 1;
|
+ _pam_cred_established = 1;
|
||||||
+#endif
|
+#endif
|
||||||
@ -692,17 +709,17 @@ Index: src/su.c
|
|||||||
+change_identity (const struct passwd *pw)
|
+change_identity (const struct passwd *pw)
|
||||||
+{
|
+{
|
||||||
if (setgid (pw->pw_gid))
|
if (setgid (pw->pw_gid))
|
||||||
error (EXIT_FAIL, errno, _("cannot set group id"));
|
error (EXIT_FAILURE, errno, _("cannot set group id"));
|
||||||
if (setuid (pw->pw_uid))
|
if (setuid (pw->pw_uid))
|
||||||
@@ -495,6 +745,7 @@ main (int argc, char **argv)
|
@@ -494,6 +744,7 @@ main (int argc, char **argv)
|
||||||
#ifdef SYSLOG_FAILURE
|
#ifdef SYSLOG_FAILURE
|
||||||
log_su (pw, false);
|
log_su (pw, false);
|
||||||
#endif
|
#endif
|
||||||
+ sleep (getdef_num ("FAIL_DELAY", 1));
|
+ sleep (getdef_num ("FAIL_DELAY", 1));
|
||||||
error (EXIT_FAIL, 0, _("incorrect password"));
|
error (EXIT_FAILURE, 0, _("incorrect password"));
|
||||||
}
|
}
|
||||||
#ifdef SYSLOG_SUCCESS
|
#ifdef SYSLOG_SUCCESS
|
||||||
@@ -516,9 +767,21 @@ main (int argc, char **argv)
|
@@ -515,9 +766,21 @@ main (int argc, char **argv)
|
||||||
shell = NULL;
|
shell = NULL;
|
||||||
}
|
}
|
||||||
shell = xstrdup (shell ? shell : pw->pw_shell);
|
shell = xstrdup (shell ? shell : pw->pw_shell);
|
||||||
@ -725,28 +742,3 @@ Index: src/su.c
|
|||||||
if (simulate_login && chdir (pw->pw_dir) != 0)
|
if (simulate_login && chdir (pw->pw_dir) != 0)
|
||||||
error (0, errno, _("warning: cannot change directory to %s"), pw->pw_dir);
|
error (0, errno, _("warning: cannot change directory to %s"), pw->pw_dir);
|
||||||
|
|
||||||
Index: configure.ac
|
|
||||||
===================================================================
|
|
||||||
--- configure.ac.orig
|
|
||||||
+++ configure.ac
|
|
||||||
@@ -41,6 +41,20 @@ coreutils_MACROS
|
|
||||||
|
|
||||||
AC_FUNC_FORK
|
|
||||||
|
|
||||||
+AC_ARG_ENABLE(pam, AS_HELP_STRING([--disable-pam],dnl
|
|
||||||
+ [Enable PAM support in su (default=auto)]),,[enable_pam=yes])
|
|
||||||
+if test "x$enable_pam" != xno; then
|
|
||||||
+ AC_CHECK_LIB([pam], [pam_start], [enable_pam=yes], [enable_pam=no])
|
|
||||||
+ AC_CHECK_LIB([pam_misc], [misc_conv], [:], [enable_pam=no])
|
|
||||||
+ if test "x$enable_pam" != xno; then
|
|
||||||
+ AC_DEFINE(USE_PAM, 1, [Define if you want to use PAM])
|
|
||||||
+ PAM_LIBS="-lpam -lpam_misc"
|
|
||||||
+ AC_SUBST(PAM_LIBS)
|
|
||||||
+ fi
|
|
||||||
+fi
|
|
||||||
+AC_MSG_CHECKING([whether to enable PAM support in su])
|
|
||||||
+AC_MSG_RESULT([$enable_pam])
|
|
||||||
+
|
|
||||||
AC_CHECK_FUNCS(uname,
|
|
||||||
OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS uname\$(EXEEXT)"
|
|
||||||
MAN="$MAN uname.1")
|
|
||||||
|
3
coreutils-6.9.89.48-96961.tar.lzma
Normal file
3
coreutils-6.9.89.48-96961.tar.lzma
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:c48513d649a0ba64d7a4c969904812386f642d5cbf835d5099a73adf8918ee90
|
||||||
|
size 3681669
|
@ -2,7 +2,7 @@ Index: doc/coreutils.texi
|
|||||||
================================================================================
|
================================================================================
|
||||||
--- doc/coreutils.texi
|
--- doc/coreutils.texi
|
||||||
+++ doc/coreutils.texi
|
+++ doc/coreutils.texi
|
||||||
@@ -64,8 +64,6 @@
|
@@ -65,8 +65,6 @@
|
||||||
* fold: (coreutils)fold invocation. Wrap long input lines.
|
* fold: (coreutils)fold invocation. Wrap long input lines.
|
||||||
* groups: (coreutils)groups invocation. Print group names a user is in.
|
* groups: (coreutils)groups invocation. Print group names a user is in.
|
||||||
* head: (coreutils)head invocation. Output the first part of files.
|
* head: (coreutils)head invocation. Output the first part of files.
|
||||||
@ -11,8 +11,8 @@ Index: doc/coreutils.texi
|
|||||||
* id: (coreutils)id invocation. Print user identity.
|
* id: (coreutils)id invocation. Print user identity.
|
||||||
* install: (coreutils)install invocation. Copy and change attributes.
|
* install: (coreutils)install invocation. Copy and change attributes.
|
||||||
* join: (coreutils)join invocation. Join lines on a common field.
|
* join: (coreutils)join invocation. Join lines on a common field.
|
||||||
@@ -399,8 +397,6 @@ System context
|
@@ -400,8 +398,6 @@ System context
|
||||||
|
* arch invocation:: Print machine hardware name
|
||||||
* date invocation:: Print or set system date and time
|
* date invocation:: Print or set system date and time
|
||||||
* uname invocation:: Print system information
|
* uname invocation:: Print system information
|
||||||
-* hostname invocation:: Print or set system name
|
-* hostname invocation:: Print or set system name
|
||||||
@ -20,8 +20,8 @@ Index: doc/coreutils.texi
|
|||||||
|
|
||||||
@command{date}: Print or set system date and time
|
@command{date}: Print or set system date and time
|
||||||
|
|
||||||
@@ -12306,8 +12302,6 @@ information.
|
@@ -12452,8 +12448,6 @@ information.
|
||||||
@menu
|
* arch invocation:: Print machine hardware name.
|
||||||
* date invocation:: Print or set system date and time.
|
* date invocation:: Print or set system date and time.
|
||||||
* uname invocation:: Print system information.
|
* uname invocation:: Print system information.
|
||||||
-* hostname invocation:: Print or set system name.
|
-* hostname invocation:: Print or set system name.
|
||||||
@ -29,7 +29,7 @@ Index: doc/coreutils.texi
|
|||||||
@end menu
|
@end menu
|
||||||
|
|
||||||
|
|
||||||
@@ -13065,55 +13059,6 @@ Print the kernel version.
|
@@ -13234,55 +13228,6 @@ Print the kernel version.
|
||||||
@exitstatus
|
@exitstatus
|
||||||
|
|
||||||
|
|
||||||
@ -85,20 +85,27 @@ Index: doc/coreutils.texi
|
|||||||
@node Modified command invocation
|
@node Modified command invocation
|
||||||
@chapter Modified command invocation
|
@chapter Modified command invocation
|
||||||
|
|
||||||
--- src/sort.c
|
--- m4/gnulib-comp.m4
|
||||||
+++ src/sort.c
|
+++ m4/gnulib-comp.m4
|
||||||
@@ -3517,10 +3517,7 @@ main (int argc, char **argv)
|
@@ -235,7 +235,6 @@ AC_DEFUN([gl_INIT],
|
||||||
if (! (key->sword | key->schar))
|
gl_POSIXVER
|
||||||
key->sword = SIZE_MAX;
|
gl_FUNC_PRINTF_FREXP
|
||||||
if (! s || *set_ordering (s, key, bl_start))
|
gl_FUNC_PRINTF_FREXPL
|
||||||
- {
|
- m4_divert_text([INIT_PREPARE], [gl_printf_safe=yes])
|
||||||
- free (key);
|
gl_FUNC_PUTENV
|
||||||
- key = NULL;
|
gl_STDLIB_MODULE_INDICATOR([putenv])
|
||||||
- }
|
gl_QUOTE
|
||||||
+ key = NULL;
|
--- man/Makefile.am
|
||||||
else
|
+++ man/Makefile.am
|
||||||
{
|
@@ -179,7 +179,7 @@ check-x-vs-1:
|
||||||
if (minus_pos_usage)
|
PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \
|
||||||
|
t=ls-files.$$$$; \
|
||||||
|
(cd $(srcdir) && ls -1 *.x) | sed 's/\.x$$//' | $(ASSORT) > $$t;\
|
||||||
|
- (echo $(dist_man_MANS) $(NO_INSTALL_PROGS_DEFAULT) \
|
||||||
|
+ (echo $(dist_man_MANS) $(NO_INSTALL_PROGS_DEFAULT) hostid \
|
||||||
|
| tr -s ' ' '\n' | sed 's/\.1$$//') \
|
||||||
|
| $(ASSORT) -u | diff - $$t || { rm $$t; exit 1; }; \
|
||||||
|
rm $$t
|
||||||
--- src/system.h
|
--- src/system.h
|
||||||
+++ src/system.h
|
+++ src/system.h
|
||||||
@@ -168,7 +168,7 @@ enum
|
@@ -168,7 +168,7 @@ enum
|
||||||
@ -110,20 +117,19 @@ Index: doc/coreutils.texi
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Extract or fake data from a `struct stat'.
|
/* Extract or fake data from a `struct stat'.
|
||||||
--- tests/help-version
|
--- tests/misc/help-version
|
||||||
+++ tests/help-version
|
+++ tests/misc/help-version
|
||||||
@@ -197,7 +197,7 @@ lbracket_args=": ]"
|
@@ -205,6 +205,7 @@ lbracket_args=": ]"
|
||||||
|
for i in $built_programs; do
|
||||||
for i in $all_programs; do
|
|
||||||
# Skip these.
|
# Skip these.
|
||||||
- case $i in chroot|stty|tty|false) continue;; esac
|
case $i in chroot|stty|tty|false|chcon|runcon) continue;; esac
|
||||||
+ case $i in chroot|stty|tty|false|df) continue;; esac
|
+ case $i in df) continue;; esac
|
||||||
|
|
||||||
rm -rf $tmp_in $tmp_in2 $tmp_dir $tmp_out
|
rm -rf $tmp_in $tmp_in2 $tmp_dir $tmp_out
|
||||||
echo > $tmp_in
|
echo > $tmp_in
|
||||||
--- tests/other-fs-tmpdir
|
--- tests/other-fs-tmpdir
|
||||||
+++ tests/other-fs-tmpdir
|
+++ tests/other-fs-tmpdir
|
||||||
@@ -44,6 +44,8 @@ for d in $CANDIDATE_TMP_DIRS; do
|
@@ -42,6 +42,8 @@ for d in $CANDIDATE_TMP_DIRS; do
|
||||||
fi
|
fi
|
||||||
|
|
||||||
done
|
done
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:89c2895ad157de50e53298b22d91db116ee4e1dd3fdf4019260254e2e31497b0
|
|
||||||
size 5384378
|
|
@ -1,10 +1,10 @@
|
|||||||
Index: coreutils-6.2/configure.ac
|
Index: coreutils-6.2/configure.ac
|
||||||
===================================================================
|
================================================================================
|
||||||
--- coreutils-6.2.orig/configure.ac
|
--- coreutils-6.9.89.48-96961/configure.ac
|
||||||
+++ coreutils-6.2/configure.ac
|
+++ coreutils-6.9.89.48-96961/configure.ac
|
||||||
@@ -246,6 +246,9 @@ AC_CHECK_DECLS([strtoimax, strtoumax])
|
@@ -325,6 +325,9 @@ CONFIG_STATUS_DEPENDENCIES='$(top_srcdir
|
||||||
|
AC_SUBST([CONFIG_STATUS_DEPENDENCIES])
|
||||||
cu_LIB_CHECK
|
############################################################################
|
||||||
|
|
||||||
+# Extended attribute copying.
|
+# Extended attribute copying.
|
||||||
+AC_FUNC_XATTR
|
+AC_FUNC_XATTR
|
||||||
@ -12,10 +12,19 @@ Index: coreutils-6.2/configure.ac
|
|||||||
AM_GNU_GETTEXT([external], [need-formatstring-macros])
|
AM_GNU_GETTEXT([external], [need-formatstring-macros])
|
||||||
AM_GNU_GETTEXT_VERSION([0.15])
|
AM_GNU_GETTEXT_VERSION([0.15])
|
||||||
|
|
||||||
Index: coreutils-6.2/m4/xattr.m4
|
--- coreutils-6.9.89.48-96961/doc/coreutils.texi
|
||||||
===================================================================
|
+++ coreutils-6.9.89.48-96961/doc/coreutils.texi
|
||||||
--- /dev/null
|
@@ -7087,6 +7087,8 @@ Preserve in the destination files
|
||||||
+++ coreutils-6.2/m4/xattr.m4
|
any links between corresponding source files.
|
||||||
|
@c Give examples illustrating how hard links are preserved.
|
||||||
|
@c Also, show how soft links map to hard links with -L and -H.
|
||||||
|
+@itemx xattrs
|
||||||
|
+Preserve extended attributes. (See /etc/xattr.conf.)
|
||||||
|
@itemx all
|
||||||
|
Preserve all file attributes.
|
||||||
|
Equivalent to specifying all of the above.
|
||||||
|
--- coreutils-6.9.89.48-96961/m4/xattr.m4
|
||||||
|
+++ coreutils-6.9.89.48-96961/m4/xattr.m4
|
||||||
@@ -0,0 +1,38 @@
|
@@ -0,0 +1,38 @@
|
||||||
+# xattr.m4 - check for Extended Attributes (Linux)
|
+# xattr.m4 - check for Extended Attributes (Linux)
|
||||||
+
|
+
|
||||||
@ -55,13 +64,11 @@ Index: coreutils-6.2/m4/xattr.m4
|
|||||||
+ AC_CHECK_FUNCS(attr_copy_file)
|
+ AC_CHECK_FUNCS(attr_copy_file)
|
||||||
+ LIBS=$xattr_saved_LIBS
|
+ LIBS=$xattr_saved_LIBS
|
||||||
+])
|
+])
|
||||||
Index: coreutils-6.2/src/Makefile.am
|
--- coreutils-6.9.89.48-96961/src/Makefile.am
|
||||||
===================================================================
|
+++ coreutils-6.9.89.48-96961/src/Makefile.am
|
||||||
--- coreutils-6.2.orig/src/Makefile.am
|
@@ -135,6 +135,10 @@ ginstall_LDADD += $(LIB_ACL)
|
||||||
+++ coreutils-6.2/src/Makefile.am
|
|
||||||
@@ -112,6 +112,10 @@ cp_LDADD += $(LIB_ACL)
|
stat_LDADD = $(LDADD) $(LIB_SELINUX)
|
||||||
mv_LDADD += $(LIB_ACL)
|
|
||||||
ginstall_LDADD += $(LIB_ACL)
|
|
||||||
|
|
||||||
+cp_LDADD += $(LIB_XATTR)
|
+cp_LDADD += $(LIB_XATTR)
|
||||||
+mv_LDADD += $(LIB_XATTR)
|
+mv_LDADD += $(LIB_XATTR)
|
||||||
@ -69,13 +76,11 @@ Index: coreutils-6.2/src/Makefile.am
|
|||||||
+
|
+
|
||||||
$(PROGRAMS): ../lib/libcoreutils.a
|
$(PROGRAMS): ../lib/libcoreutils.a
|
||||||
|
|
||||||
SUFFIXES = .sh
|
# Get the release year from ../lib/version-etc.c.
|
||||||
Index: coreutils-6.2/src/copy.c
|
--- coreutils-6.9.89.48-96961/src/copy.c
|
||||||
===================================================================
|
+++ coreutils-6.9.89.48-96961/src/copy.c
|
||||||
--- coreutils-6.2.orig/src/copy.c
|
@@ -56,6 +56,12 @@
|
||||||
+++ coreutils-6.2/src/copy.c
|
#include "areadlink.h"
|
||||||
@@ -53,6 +53,12 @@
|
|
||||||
#include "xreadlink.h"
|
|
||||||
#include "yesno.h"
|
#include "yesno.h"
|
||||||
|
|
||||||
+#if USE_XATTR
|
+#if USE_XATTR
|
||||||
@ -87,7 +92,7 @@ Index: coreutils-6.2/src/copy.c
|
|||||||
#ifndef HAVE_FCHOWN
|
#ifndef HAVE_FCHOWN
|
||||||
# define HAVE_FCHOWN false
|
# define HAVE_FCHOWN false
|
||||||
# define fchown(fd, uid, gid) (-1)
|
# define fchown(fd, uid, gid) (-1)
|
||||||
@@ -118,6 +124,98 @@ is_ancestor (const struct stat *sb, cons
|
@@ -113,6 +119,98 @@ is_ancestor (const struct stat *sb, cons
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -186,7 +191,7 @@ Index: coreutils-6.2/src/copy.c
|
|||||||
/* Read the contents of the directory SRC_NAME_IN, and recursively
|
/* Read the contents of the directory SRC_NAME_IN, and recursively
|
||||||
copy the contents to DST_NAME_IN. NEW_DST is true if
|
copy the contents to DST_NAME_IN. NEW_DST is true if
|
||||||
DST_NAME_IN is a directory that was created previously in the
|
DST_NAME_IN is a directory that was created previously in the
|
||||||
@@ -509,6 +607,9 @@ copy_reg (char const *src_name, char con
|
@@ -640,6 +738,9 @@ copy_reg (char const *src_name, char con
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -196,8 +201,8 @@ Index: coreutils-6.2/src/copy.c
|
|||||||
set_author (dst_name, dest_desc, src_sb);
|
set_author (dst_name, dest_desc, src_sb);
|
||||||
|
|
||||||
if (x->preserve_mode || x->move_mode)
|
if (x->preserve_mode || x->move_mode)
|
||||||
@@ -1755,6 +1856,9 @@ copy_internal (char const *src_name, cha
|
@@ -1939,6 +2040,9 @@ copy_internal (char const *src_name, cha
|
||||||
return false;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
+ if (!copy_xattrs (src_name, -1, dst_name, -1, x))
|
+ if (!copy_xattrs (src_name, -1, dst_name, -1, x))
|
||||||
@ -206,11 +211,9 @@ Index: coreutils-6.2/src/copy.c
|
|||||||
set_author (dst_name, -1, &src_sb);
|
set_author (dst_name, -1, &src_sb);
|
||||||
|
|
||||||
if (x->preserve_mode || x->move_mode)
|
if (x->preserve_mode || x->move_mode)
|
||||||
Index: coreutils-6.2/src/copy.h
|
--- coreutils-6.9.89.48-96961/src/copy.h
|
||||||
===================================================================
|
+++ coreutils-6.9.89.48-96961/src/copy.h
|
||||||
--- coreutils-6.2.orig/src/copy.h
|
@@ -134,6 +134,9 @@ struct cp_options
|
||||||
+++ coreutils-6.2/src/copy.h
|
|
||||||
@@ -128,6 +128,9 @@ struct cp_options
|
|
||||||
bool preserve_mode;
|
bool preserve_mode;
|
||||||
bool preserve_timestamps;
|
bool preserve_timestamps;
|
||||||
|
|
||||||
@ -220,52 +223,51 @@ Index: coreutils-6.2/src/copy.h
|
|||||||
/* Enabled for mv, and for cp by the --preserve=links option.
|
/* Enabled for mv, and for cp by the --preserve=links option.
|
||||||
If true, attempt to preserve in the destination files any
|
If true, attempt to preserve in the destination files any
|
||||||
logical hard links between the source files. If used with cp's
|
logical hard links between the source files. If used with cp's
|
||||||
Index: coreutils-6.2/src/cp.c
|
--- coreutils-6.9.89.48-96961/src/cp.c
|
||||||
===================================================================
|
+++ coreutils-6.9.89.48-96961/src/cp.c
|
||||||
--- coreutils-6.2.orig/src/cp.c
|
@@ -197,7 +197,8 @@ Mandatory arguments to long options are
|
||||||
+++ coreutils-6.2/src/cp.c
|
|
||||||
@@ -191,7 +191,7 @@ Mandatory arguments to long options are
|
|
||||||
-p same as --preserve=mode,ownership,timestamps\n\
|
-p same as --preserve=mode,ownership,timestamps\n\
|
||||||
--preserve[=ATTR_LIST] preserve the specified attributes (default:\n\
|
--preserve[=ATTR_LIST] preserve the specified attributes (default:\n\
|
||||||
mode,ownership,timestamps), if possible\n\
|
mode,ownership,timestamps), if possible\n\
|
||||||
- additional attributes: links, all\n\
|
- additional attributes: context, links, all\n\
|
||||||
+ additional attributes: links, xattrs, all\n\
|
+ additional attributes: context, links,\n\
|
||||||
|
+ xattrs, all\n\
|
||||||
"), stdout);
|
"), stdout);
|
||||||
fputs (_("\
|
fputs (_("\
|
||||||
--no-preserve=ATTR_LIST don't preserve the specified attributes\n\
|
--no-preserve=ATTR_LIST don't preserve the specified attributes\n\
|
||||||
@@ -724,6 +724,7 @@ cp_option_init (struct cp_options *x)
|
@@ -751,6 +752,7 @@ cp_option_init (struct cp_options *x)
|
||||||
x->preserve_links = false;
|
x->preserve_links = false;
|
||||||
x->preserve_mode = false;
|
x->preserve_mode = false;
|
||||||
x->preserve_timestamps = false;
|
x->preserve_timestamps = false;
|
||||||
+ x->preserve_xattrs = false;
|
+ x->preserve_xattrs = false;
|
||||||
|
x->preserve_security_context = false;
|
||||||
|
x->require_preserve_context = false;
|
||||||
|
|
||||||
x->require_preserve = false;
|
@@ -788,19 +790,21 @@ decode_preserve_arg (char const *arg, st
|
||||||
x->recursive = false;
|
|
||||||
@@ -752,18 +753,21 @@ decode_preserve_arg (char const *arg, st
|
|
||||||
PRESERVE_TIMESTAMPS,
|
PRESERVE_TIMESTAMPS,
|
||||||
PRESERVE_OWNERSHIP,
|
PRESERVE_OWNERSHIP,
|
||||||
PRESERVE_LINK,
|
PRESERVE_LINK,
|
||||||
+ PRESERVE_XATTRS,
|
+ PRESERVE_XATTRS,
|
||||||
|
PRESERVE_CONTEXT,
|
||||||
PRESERVE_ALL
|
PRESERVE_ALL
|
||||||
};
|
};
|
||||||
static enum File_attribute const preserve_vals[] =
|
static enum File_attribute const preserve_vals[] =
|
||||||
{
|
{
|
||||||
PRESERVE_MODE, PRESERVE_TIMESTAMPS,
|
PRESERVE_MODE, PRESERVE_TIMESTAMPS,
|
||||||
- PRESERVE_OWNERSHIP, PRESERVE_LINK, PRESERVE_ALL
|
- PRESERVE_OWNERSHIP, PRESERVE_LINK, PRESERVE_CONTEXT, PRESERVE_ALL
|
||||||
+ PRESERVE_OWNERSHIP, PRESERVE_LINK,
|
+ PRESERVE_OWNERSHIP, PRESERVE_LINK, PRESERVE_XATTRS, PRESERVE_CONTEXT,
|
||||||
+ PRESERVE_XATTRS, PRESERVE_ALL
|
+ PRESERVE_ALL
|
||||||
};
|
};
|
||||||
/* Valid arguments to the `--preserve' option. */
|
/* Valid arguments to the `--preserve' option. */
|
||||||
static char const* const preserve_args[] =
|
static char const* const preserve_args[] =
|
||||||
{
|
{
|
||||||
"mode", "timestamps",
|
"mode", "timestamps",
|
||||||
- "ownership", "links", "all", NULL
|
- "ownership", "links", "context", "all", NULL
|
||||||
+ "ownership", "links",
|
+ "ownership", "links", "xattrs", "context", "all", NULL
|
||||||
+ "xattrs", "all", NULL
|
|
||||||
};
|
};
|
||||||
ARGMATCH_VERIFY (preserve_args, preserve_vals);
|
ARGMATCH_VERIFY (preserve_args, preserve_vals);
|
||||||
|
|
||||||
@@ -799,11 +803,16 @@ decode_preserve_arg (char const *arg, st
|
@@ -836,6 +840,10 @@ decode_preserve_arg (char const *arg, st
|
||||||
x->preserve_links = on_off;
|
x->preserve_links = on_off;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -273,49 +275,34 @@ Index: coreutils-6.2/src/cp.c
|
|||||||
+ x->preserve_xattrs = on_off;
|
+ x->preserve_xattrs = on_off;
|
||||||
+ break;
|
+ break;
|
||||||
+
|
+
|
||||||
case PRESERVE_ALL:
|
case PRESERVE_CONTEXT:
|
||||||
x->preserve_mode = on_off;
|
x->preserve_security_context = on_off;
|
||||||
|
x->require_preserve_context = on_off;
|
||||||
|
@@ -846,6 +854,7 @@ decode_preserve_arg (char const *arg, st
|
||||||
x->preserve_timestamps = on_off;
|
x->preserve_timestamps = on_off;
|
||||||
x->preserve_ownership = on_off;
|
x->preserve_ownership = on_off;
|
||||||
x->preserve_links = on_off;
|
x->preserve_links = on_off;
|
||||||
+ x->preserve_xattrs = on_off;
|
+ x->preserve_xattrs = on_off;
|
||||||
|
if (selinux_enabled)
|
||||||
|
x->preserve_security_context = on_off;
|
||||||
break;
|
break;
|
||||||
|
--- coreutils-6.9.89.48-96961/src/install.c
|
||||||
default:
|
+++ coreutils-6.9.89.48-96961/src/install.c
|
||||||
Index: coreutils-6.2/src/install.c
|
@@ -176,6 +176,7 @@ cp_option_init (struct cp_options *x)
|
||||||
===================================================================
|
|
||||||
--- coreutils-6.2.orig/src/install.c
|
|
||||||
+++ coreutils-6.2/src/install.c
|
|
||||||
@@ -154,6 +154,7 @@ cp_option_init (struct cp_options *x)
|
|
||||||
x->preserve_links = false;
|
x->preserve_links = false;
|
||||||
x->preserve_mode = false;
|
x->preserve_mode = false;
|
||||||
x->preserve_timestamps = false;
|
x->preserve_timestamps = false;
|
||||||
+ x->preserve_xattrs = false;
|
+ x->preserve_xattrs = false;
|
||||||
x->require_preserve = false;
|
x->require_preserve = false;
|
||||||
|
x->require_preserve_context = false;
|
||||||
x->recursive = false;
|
x->recursive = false;
|
||||||
x->sparse_mode = SPARSE_AUTO;
|
--- coreutils-6.9.89.48-96961/src/mv.c
|
||||||
Index: coreutils-6.2/src/mv.c
|
+++ coreutils-6.9.89.48-96961/src/mv.c
|
||||||
===================================================================
|
@@ -136,6 +136,7 @@ cp_option_init (struct cp_options *x)
|
||||||
--- coreutils-6.2.orig/src/mv.c
|
|
||||||
+++ coreutils-6.2/src/mv.c
|
|
||||||
@@ -125,6 +125,7 @@ cp_option_init (struct cp_options *x)
|
|
||||||
x->preserve_links = true;
|
x->preserve_links = true;
|
||||||
x->preserve_mode = true;
|
x->preserve_mode = true;
|
||||||
x->preserve_timestamps = true;
|
x->preserve_timestamps = true;
|
||||||
+ x->preserve_xattrs = true;
|
+ x->preserve_xattrs = true;
|
||||||
|
x->preserve_security_context = selinux_enabled;
|
||||||
x->require_preserve = false; /* FIXME: maybe make this an option */
|
x->require_preserve = false; /* FIXME: maybe make this an option */
|
||||||
x->recursive = true;
|
x->require_preserve_context = false;
|
||||||
x->sparse_mode = SPARSE_AUTO; /* FIXME: maybe make this an option */
|
|
||||||
Index: coreutils-6.2/doc/coreutils.texi
|
|
||||||
===================================================================
|
|
||||||
--- coreutils-6.2.orig/doc/coreutils.texi
|
|
||||||
+++ coreutils-6.2/doc/coreutils.texi
|
|
||||||
@@ -6948,6 +6948,8 @@ Preserve in the destination files
|
|
||||||
any links between corresponding source files.
|
|
||||||
@c Give examples illustrating how hard links are preserved.
|
|
||||||
@c Also, show how soft links map to hard links with -L and -H.
|
|
||||||
+@itemx xattrs
|
|
||||||
+Preserve extended attributes. (See /etc/xattr.conf.)
|
|
||||||
@itemx all
|
|
||||||
Preserve all file attributes.
|
|
||||||
Equivalent to specifying all of the above.
|
|
||||||
|
@ -1,3 +1,127 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Nov 29 14:28:26 CET 2007 - schwab@suse.de
|
||||||
|
|
||||||
|
- Update to coreutils-6.9.89.48 snapshot.
|
||||||
|
** New programs
|
||||||
|
arch: equivalent to uname -m, not installed by default
|
||||||
|
But don't install this program on Solaris systems.
|
||||||
|
mktemp: create a temporary file or directory (or names)
|
||||||
|
** Programs no longer installed by default
|
||||||
|
hostname, su
|
||||||
|
** Changes in behavior
|
||||||
|
cp, by default, refuses to copy through a dangling destination symlink
|
||||||
|
Set POSIXLY_CORRECT if you require the old, risk-prone behavior.
|
||||||
|
pr -F no longer suppresses the footer or the first two blank lines in
|
||||||
|
the header. This is for compatibility with BSD and POSIX.
|
||||||
|
tr now warns about an unescaped backslash at end of string.
|
||||||
|
The tr from coreutils-5.2.1 and earlier would fail for such usage,
|
||||||
|
and Solaris' tr ignores that final byte.
|
||||||
|
** New features
|
||||||
|
Add SELinux support (FIXME: add details here)
|
||||||
|
cp -p tries to preserve the GID of a file even if preserving the UID
|
||||||
|
is not possible.
|
||||||
|
uniq accepts a new option: --zero-terminated (-z). As with the sort
|
||||||
|
option of the same name, this makes uniq consume and produce
|
||||||
|
NUL-terminated lines rather than newline-terminated lines.
|
||||||
|
wc no longer warns about character decoding errors in multibyte locales.
|
||||||
|
This means for example that "wc /bin/sh" now produces normal output
|
||||||
|
(though the word count will have no real meaning) rather than many
|
||||||
|
error messages.
|
||||||
|
** New build options
|
||||||
|
By default, "make install" no longer attempts to install (or even build) su.
|
||||||
|
To change that, use ./configure --enable-install-program=su.
|
||||||
|
If you also want to install the new "arch" program, do this:
|
||||||
|
./configure --enable-install-program=arch,su.
|
||||||
|
You can inhibit the compilation and installation of selected programs
|
||||||
|
at configure time. For example, to avoid installing "hostname" and
|
||||||
|
"uptime", use ./configure --enable-no-install-program=hostname,uptime
|
||||||
|
Note: currently, "make check" passes, even when arch and su are not
|
||||||
|
built (that's the new default). However, if you inhibit the building
|
||||||
|
and installation of other programs, don't be surprised if some parts
|
||||||
|
of "make check" fail.
|
||||||
|
** Remove deprecated options
|
||||||
|
df no longer accepts the --kilobytes option.
|
||||||
|
du no longer accepts the --kilobytes or --megabytes options.
|
||||||
|
ls no longer accepts the --kilobytes option.
|
||||||
|
ptx longer accepts the --copyright option.
|
||||||
|
who no longer accepts -i or --idle.
|
||||||
|
** Improved robustness
|
||||||
|
ln -f can no longer silently clobber a just-created hard link.
|
||||||
|
In some cases, ln could be seen as being responsible for data loss.
|
||||||
|
For example, given directories a, b, c, and files a/f and b/f, we
|
||||||
|
should be able to do this safely: ln -f a/f b/f c && rm -f a/f b/f
|
||||||
|
However, before this change, ln would succeed, and thus cause the
|
||||||
|
loss of the contents of a/f.
|
||||||
|
stty no longer silently accepts certain invalid hex values
|
||||||
|
in its 35-colon commmand-line argument
|
||||||
|
** Bug fixes
|
||||||
|
chmod no longer ignores a dangling symlink. Now, chmod fails
|
||||||
|
with a diagnostic saying that it cannot operate on such a file.
|
||||||
|
[bug introduced in coreutils-5.1.0]
|
||||||
|
cp attempts to read a regular file, even if stat says it is empty.
|
||||||
|
Before, "cp /proc/cpuinfo c" would create an empty file when the kernel
|
||||||
|
reports stat.st_size == 0, while "cat /proc/cpuinfo > c" would "work",
|
||||||
|
and create a nonempty one. [bug introduced in coreutils-6.0]
|
||||||
|
cp no longer fails to write through a dangling symlink
|
||||||
|
[bug introduced in coreutils-6.7]. cp --parents no
|
||||||
|
longer mishandles symlinks to directories in file name
|
||||||
|
components in the source, e.g., "cp --parents symlink/a/b
|
||||||
|
d" no longer fails. Also, 'cp' no longer considers a
|
||||||
|
destination symlink to be the same as the referenced file when
|
||||||
|
copying links or making backups. For example, if SYM is a symlink
|
||||||
|
to FILE, "cp -l FILE SYM" now reports an error instead of silently
|
||||||
|
doing nothing. The behavior of 'cp' is now better documented when
|
||||||
|
the destination is a symlink.
|
||||||
|
"cp -i --update older newer" no longer prompts; same for mv
|
||||||
|
"cp -i" now detects read errors on standard input, and no longer consumes
|
||||||
|
too much seekable input; same for ln, install, mv, and rm.
|
||||||
|
cut now diagnoses a range starting with zero (e.g., -f 0-2) as invalid;
|
||||||
|
before, it would treat it as if it started with 1 (-f 1-2).
|
||||||
|
"cut -f 2-0" now fails; before, it was equivalent to "cut -f 2-"
|
||||||
|
cut now diagnoses the '-' in "cut -f -" as an invalid range, rather
|
||||||
|
than interpreting it as the unlimited range, "1-".
|
||||||
|
date -d now accepts strings of the form e.g., 'YYYYMMDD +N days',
|
||||||
|
in addition to the usual 'YYYYMMDD N days'.
|
||||||
|
du -s now includes the size of any stat'able-but-inaccessible directory
|
||||||
|
in the total size.
|
||||||
|
du (without -s) prints whatever it knows of the size of an inaccessible
|
||||||
|
directory. Before, du would print nothing for such a directory.
|
||||||
|
ls -x DIR would sometimes output the wrong string in place of the
|
||||||
|
first entry. [introduced in coreutils-6.8]
|
||||||
|
ls --color would mistakenly color a dangling symlink as if it were
|
||||||
|
a regular symlink. This would happen only when the dangling symlink
|
||||||
|
was not a command-line argument and in a directory with d_type support.
|
||||||
|
[introduced in coreutils-6.0]
|
||||||
|
ls --color, (with a custom LS_COLORS envvar value including the
|
||||||
|
ln=target attribute) would mistakenly output the string "target"
|
||||||
|
before the name of each symlink. [introduced in coreutils-6.0]
|
||||||
|
od's --skip (-j) option now works even when the kernel says that a
|
||||||
|
nonempty regular file has stat.st_size = 0. This happens at least
|
||||||
|
with files in /proc and linux-2.6.22.
|
||||||
|
"od -j L FILE" had a bug: when the number of bytes to skip, L, is exactly
|
||||||
|
the same as the length of FILE, od would skip *no* bytes. When the number
|
||||||
|
of bytes to skip is exactly the sum of the lengths of the first N files,
|
||||||
|
od would skip only the first N-1 files. [introduced in textutils-2.0.9]
|
||||||
|
./printf %.10000000f 1 could get an internal ENOMEM error and generate
|
||||||
|
no output, yet erroneously exit with status 0. Now it diagnoses the error
|
||||||
|
and exits with nonzero status. [present in initial implementation]
|
||||||
|
seq no longer mishandles obvious cases like "seq 0 0.000001 0.000003",
|
||||||
|
so workarounds like "seq 0 0.000001 0.0000031" are no longer needed.
|
||||||
|
seq would mistakenly reject some valid format strings containing %%,
|
||||||
|
and would mistakenly accept some invalid ones. e.g., %g%% and %%g, resp.
|
||||||
|
"seq .1 .1" would mistakenly generate no output on some systems
|
||||||
|
Obsolete sort usage with an invalid ordering-option character, e.g.,
|
||||||
|
"env _POSIX2_VERSION=199209 sort +1x" no longer makes sort free an
|
||||||
|
invalid pointer [introduced in coreutils-6.5]
|
||||||
|
sorting very long lines (relative to the amount of available memory)
|
||||||
|
no longer provokes unaligned memory access
|
||||||
|
split --line-bytes=N (-C N) no longer creates an empty file
|
||||||
|
[this bug is present at least as far back as textutils-1.22 (Jan, 1997)]
|
||||||
|
tr -c no longer aborts when translating with Set2 larger than the
|
||||||
|
complement of Set1. [present in the original version, in 1992]
|
||||||
|
tr no longer rejects an unmatched [:lower:] or [:upper:] in SET1.
|
||||||
|
[present in the original version]
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jul 23 15:15:11 CEST 2007 - schwab@suse.de
|
Mon Jul 23 15:15:11 CEST 2007 - schwab@suse.de
|
||||||
|
|
||||||
|
181
coreutils.spec
181
coreutils.spec
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file for package coreutils (Version 6.9)
|
# spec file for package coreutils (Version 6.9.89.48)
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
# This file and all modifications and additions to the pristine
|
# This file and all modifications and additions to the pristine
|
||||||
@ -8,22 +8,22 @@
|
|||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
# norootforbuild
|
|
||||||
|
|
||||||
Name: coreutils
|
Name: coreutils
|
||||||
BuildRequires: help2man libacl-devel pam-devel
|
BuildRequires: help2man libacl-devel lzma pam-devel
|
||||||
URL: http://www.gnu.org/software/coreutils/
|
Url: http://www.gnu.org/software/coreutils/
|
||||||
License: GPL v2 or later
|
License: GPL v2 or later
|
||||||
Group: System/Base
|
Group: System/Base
|
||||||
Provides: fileutils sh-utils stat textutils
|
Provides: fileutils sh-utils stat textutils mktemp
|
||||||
Obsoletes: fileutils sh-utils stat textutils
|
Obsoletes: fileutils sh-utils stat textutils mktemp
|
||||||
Obsoletes: libselinux <= 1.23.11-3 libselinux-32bit >= 9 libselinux-64bit = 9 libselinux-x86 = 9
|
Obsoletes: libselinux <= 1.23.11-3 libselinux-32bit >= 9 libselinux-64bit = 9 libselinux-x86 = 9
|
||||||
Autoreqprov: on
|
AutoReqProv: on
|
||||||
PreReq: %{install_info_prereq}
|
PreReq: %{install_info_prereq}
|
||||||
Version: 6.9
|
Version: 6.9.89.48
|
||||||
Release: 30
|
Release: 1
|
||||||
Summary: GNU Core Utilities
|
Summary: GNU Core Utilities
|
||||||
Source: coreutils-%{version}.tar.bz2
|
%define treeish 96961
|
||||||
|
Source: coreutils-%{version}-%treeish.tar.lzma
|
||||||
Source1: su.pamd
|
Source1: su.pamd
|
||||||
Source2: su.default
|
Source2: su.default
|
||||||
Patch: coreutils-%{version}.diff
|
Patch: coreutils-%{version}.diff
|
||||||
@ -32,15 +32,10 @@ Patch30: coreutils-changelog.diff
|
|||||||
Patch4: coreutils-5.3.0-i18n-0.1.patch
|
Patch4: coreutils-5.3.0-i18n-0.1.patch
|
||||||
Patch5: i18n-uninit.diff
|
Patch5: i18n-uninit.diff
|
||||||
Patch6: i18n-infloop.diff
|
Patch6: i18n-infloop.diff
|
||||||
Patch7: fchownat.diff
|
|
||||||
Patch8: coreutils-sysinfo.diff
|
Patch8: coreutils-sysinfo.diff
|
||||||
Patch9: ls-x.diff
|
|
||||||
Patch10: futimens.diff
|
|
||||||
Patch11: i18n-monthsort.diff
|
Patch11: i18n-monthsort.diff
|
||||||
Patch12: i18n-random.diff
|
Patch12: i18n-random.diff
|
||||||
Patch13: misalign.diff
|
|
||||||
Patch16: invalid-ids.diff
|
Patch16: invalid-ids.diff
|
||||||
Patch17: no-no.diff
|
|
||||||
Patch20: coreutils-6.8-su.diff
|
Patch20: coreutils-6.8-su.diff
|
||||||
Patch21: coreutils-6.8.0-pie.diff
|
Patch21: coreutils-6.8.0-pie.diff
|
||||||
Patch22: coreutils-5.3.0-sbin4su.diff
|
Patch22: coreutils-5.3.0-sbin4su.diff
|
||||||
@ -50,12 +45,13 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|||||||
Basic file, shell, and text manipulation utilities. The package
|
Basic file, shell, and text manipulation utilities. The package
|
||||||
contains the following programs:
|
contains the following programs:
|
||||||
|
|
||||||
basename cat chgrp chmod chown chroot cksum comm cp csplit cut date dd
|
[ base64 basename cat chgrp chmod chown chroot cksum comm cp csplit cut
|
||||||
df dir dircolors dirname du echo env expand expr factor false fmt fold
|
date dd df dir dircolors dirname du echo env expand expr factor false
|
||||||
install groups head id join kill link ln logname ls md5sum mkdir mkfifo
|
fmt fold groups head id install join kill link ln logname ls md5sum
|
||||||
mknod mv nice nl nohup od paste pathchk pinky pr printenv printf ptx
|
mkdir mkfifo mknod mv nice nl nohup od paste pathchk pinky pr printenv
|
||||||
pwd readlink rm rmdir seq sha1sum shred sleep sort split stat stty su
|
printf ptx pwd readlink rm rmdir seq sha1sum sha224sum sha256sum
|
||||||
sum sync tac tail tee test touch tr true tsort tty uname unexpand uniq
|
sha384sum sha512sum shred shuf sleep sort split stat stty su sum sux
|
||||||
|
sync tac tail tee test touch tr true tsort tty uname unexpand uniq
|
||||||
unlink uptime users vdir wc who whoami yes
|
unlink uptime users vdir wc who whoami yes
|
||||||
|
|
||||||
|
|
||||||
@ -97,33 +93,29 @@ Authors:
|
|||||||
Ulrich Drepper <drepper@redhat.com>
|
Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q -n %name-%version-%treeish
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch4 -p1
|
%patch4 -p1
|
||||||
%patch5
|
%patch5
|
||||||
%patch6
|
%patch6
|
||||||
%patch
|
%patch
|
||||||
%patch7
|
|
||||||
%patch8 -p1
|
%patch8 -p1
|
||||||
%patch9 -p1
|
|
||||||
chmod +x tests/ls/x-option
|
|
||||||
%patch10
|
|
||||||
%patch11
|
%patch11
|
||||||
%patch12
|
%patch12
|
||||||
%patch13 -p1
|
|
||||||
%patch16 -p1
|
%patch16 -p1
|
||||||
%patch17
|
|
||||||
%patch20
|
%patch20
|
||||||
%patch21
|
%patch21
|
||||||
%patch22
|
%patch22
|
||||||
rm -f po/no.*
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
AUTOPOINT=true autoreconf -fi
|
AUTOPOINT=true autoreconf -fi
|
||||||
|
gl_cv_func_printf_directive_n=yes \
|
||||||
./configure CFLAGS="$RPM_OPT_FLAGS -Wall" \
|
./configure CFLAGS="$RPM_OPT_FLAGS -Wall" \
|
||||||
DEFAULT_POSIX2_VERSION=199209 \
|
|
||||||
--prefix=%{_prefix} --mandir=%{_mandir} \
|
--prefix=%{_prefix} --mandir=%{_mandir} \
|
||||||
--infodir=%{_infodir} --without-included-regex
|
--infodir=%{_infodir} --without-included-regex \
|
||||||
|
--enable-install-program=arch,su \
|
||||||
|
--enable-no-install-program=hostid \
|
||||||
|
DEFAULT_POSIX2_VERSION=199209
|
||||||
make %{?jobs:-j%jobs} PAMLIBS="-lpam -ldl"
|
make %{?jobs:-j%jobs} PAMLIBS="-lpam -ldl"
|
||||||
if test $EUID -eq 0; then
|
if test $EUID -eq 0; then
|
||||||
su nobody -c make check
|
su nobody -c make check
|
||||||
@ -141,7 +133,7 @@ make DESTDIR="$RPM_BUILD_ROOT" install
|
|||||||
test -f $RPM_BUILD_ROOT%{_bindir}/su || \
|
test -f $RPM_BUILD_ROOT%{_bindir}/su || \
|
||||||
install src/su $RPM_BUILD_ROOT%{_bindir}/su
|
install src/su $RPM_BUILD_ROOT%{_bindir}/su
|
||||||
install -d $RPM_BUILD_ROOT/bin
|
install -d $RPM_BUILD_ROOT/bin
|
||||||
for i in basename cat chgrp chmod chown cp date dd df echo false kill ln ls mkdir mknod mv pwd rm rmdir sleep sort stty su sync touch true uname
|
for i in arch basename cat chgrp chmod chown cp date dd df echo false kill ln ls mkdir mknod mktemp mv pwd rm rmdir sleep sort stty su sync touch true uname
|
||||||
do
|
do
|
||||||
mv $RPM_BUILD_ROOT%{_bindir}/$i $RPM_BUILD_ROOT/bin/$i
|
mv $RPM_BUILD_ROOT%{_bindir}/$i $RPM_BUILD_ROOT/bin/$i
|
||||||
test $i = su && echo -n '%%attr(4755,root,root) '
|
test $i = su && echo -n '%%attr(4755,root,root) '
|
||||||
@ -154,10 +146,6 @@ install -m 644 $RPM_SOURCE_DIR/su.pamd $RPM_BUILD_ROOT/etc/pam.d/su-l
|
|||||||
install -d -m 755 $RPM_BUILD_ROOT/etc/default
|
install -d -m 755 $RPM_BUILD_ROOT/etc/default
|
||||||
install -m 644 $RPM_SOURCE_DIR/su.default $RPM_BUILD_ROOT/etc/default/su
|
install -m 644 $RPM_SOURCE_DIR/su.default $RPM_BUILD_ROOT/etc/default/su
|
||||||
ln -sf /bin/su $RPM_BUILD_ROOT%{_bindir}/sux
|
ln -sf /bin/su $RPM_BUILD_ROOT%{_bindir}/sux
|
||||||
rm -f $RPM_BUILD_ROOT%{_bindir}/hostid
|
|
||||||
rm -f $RPM_BUILD_ROOT%{_bindir}/hostname
|
|
||||||
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/hostid.1
|
|
||||||
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/hostname.1
|
|
||||||
%find_lang %name
|
%find_lang %name
|
||||||
cat bin.files %name.lang > extra-files
|
cat bin.files %name.lang > extra-files
|
||||||
|
|
||||||
@ -182,6 +170,127 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%dir %{_prefix}/share/locale/*/LC_TIME
|
%dir %{_prefix}/share/locale/*/LC_TIME
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Nov 29 2007 - schwab@suse.de
|
||||||
|
- Update to coreutils-6.9.89.48 snapshot.
|
||||||
|
** New programs
|
||||||
|
arch: equivalent to uname -m, not installed by default
|
||||||
|
But don't install this program on Solaris systems.
|
||||||
|
mktemp: create a temporary file or directory (or names)
|
||||||
|
** Programs no longer installed by default
|
||||||
|
hostname, su
|
||||||
|
** Changes in behavior
|
||||||
|
cp, by default, refuses to copy through a dangling destination symlink
|
||||||
|
Set POSIXLY_CORRECT if you require the old, risk-prone behavior.
|
||||||
|
pr -F no longer suppresses the footer or the first two blank lines in
|
||||||
|
the header. This is for compatibility with BSD and POSIX.
|
||||||
|
tr now warns about an unescaped backslash at end of string.
|
||||||
|
The tr from coreutils-5.2.1 and earlier would fail for such usage,
|
||||||
|
and Solaris' tr ignores that final byte.
|
||||||
|
** New features
|
||||||
|
Add SELinux support (FIXME: add details here)
|
||||||
|
cp -p tries to preserve the GID of a file even if preserving the UID
|
||||||
|
is not possible.
|
||||||
|
uniq accepts a new option: --zero-terminated (-z). As with the sort
|
||||||
|
option of the same name, this makes uniq consume and produce
|
||||||
|
NUL-terminated lines rather than newline-terminated lines.
|
||||||
|
wc no longer warns about character decoding errors in multibyte locales.
|
||||||
|
This means for example that "wc /bin/sh" now produces normal output
|
||||||
|
(though the word count will have no real meaning) rather than many
|
||||||
|
error messages.
|
||||||
|
** New build options
|
||||||
|
By default, "make install" no longer attempts to install (or even build) su.
|
||||||
|
To change that, use ./configure --enable-install-program=su.
|
||||||
|
If you also want to install the new "arch" program, do this:
|
||||||
|
./configure --enable-install-program=arch,su.
|
||||||
|
You can inhibit the compilation and installation of selected programs
|
||||||
|
at configure time. For example, to avoid installing "hostname" and
|
||||||
|
"uptime", use ./configure --enable-no-install-program=hostname,uptime
|
||||||
|
Note: currently, "make check" passes, even when arch and su are not
|
||||||
|
built (that's the new default). However, if you inhibit the building
|
||||||
|
and installation of other programs, don't be surprised if some parts
|
||||||
|
of "make check" fail.
|
||||||
|
** Remove deprecated options
|
||||||
|
df no longer accepts the --kilobytes option.
|
||||||
|
du no longer accepts the --kilobytes or --megabytes options.
|
||||||
|
ls no longer accepts the --kilobytes option.
|
||||||
|
ptx longer accepts the --copyright option.
|
||||||
|
who no longer accepts -i or --idle.
|
||||||
|
** Improved robustness
|
||||||
|
ln -f can no longer silently clobber a just-created hard link.
|
||||||
|
In some cases, ln could be seen as being responsible for data loss.
|
||||||
|
For example, given directories a, b, c, and files a/f and b/f, we
|
||||||
|
should be able to do this safely: ln -f a/f b/f c && rm -f a/f b/f
|
||||||
|
However, before this change, ln would succeed, and thus cause the
|
||||||
|
loss of the contents of a/f.
|
||||||
|
stty no longer silently accepts certain invalid hex values
|
||||||
|
in its 35-colon commmand-line argument
|
||||||
|
** Bug fixes
|
||||||
|
chmod no longer ignores a dangling symlink. Now, chmod fails
|
||||||
|
with a diagnostic saying that it cannot operate on such a file.
|
||||||
|
[bug introduced in coreutils-5.1.0]
|
||||||
|
cp attempts to read a regular file, even if stat says it is empty.
|
||||||
|
Before, "cp /proc/cpuinfo c" would create an empty file when the kernel
|
||||||
|
reports stat.st_size == 0, while "cat /proc/cpuinfo > c" would "work",
|
||||||
|
and create a nonempty one. [bug introduced in coreutils-6.0]
|
||||||
|
cp no longer fails to write through a dangling symlink
|
||||||
|
[bug introduced in coreutils-6.7]. cp --parents no
|
||||||
|
longer mishandles symlinks to directories in file name
|
||||||
|
components in the source, e.g., "cp --parents symlink/a/b
|
||||||
|
d" no longer fails. Also, 'cp' no longer considers a
|
||||||
|
destination symlink to be the same as the referenced file when
|
||||||
|
copying links or making backups. For example, if SYM is a symlink
|
||||||
|
to FILE, "cp -l FILE SYM" now reports an error instead of silently
|
||||||
|
doing nothing. The behavior of 'cp' is now better documented when
|
||||||
|
the destination is a symlink.
|
||||||
|
"cp -i --update older newer" no longer prompts; same for mv
|
||||||
|
"cp -i" now detects read errors on standard input, and no longer consumes
|
||||||
|
too much seekable input; same for ln, install, mv, and rm.
|
||||||
|
cut now diagnoses a range starting with zero (e.g., -f 0-2) as invalid;
|
||||||
|
before, it would treat it as if it started with 1 (-f 1-2).
|
||||||
|
"cut -f 2-0" now fails; before, it was equivalent to "cut -f 2-"
|
||||||
|
cut now diagnoses the '-' in "cut -f -" as an invalid range, rather
|
||||||
|
than interpreting it as the unlimited range, "1-".
|
||||||
|
date -d now accepts strings of the form e.g., 'YYYYMMDD +N days',
|
||||||
|
in addition to the usual 'YYYYMMDD N days'.
|
||||||
|
du -s now includes the size of any stat'able-but-inaccessible directory
|
||||||
|
in the total size.
|
||||||
|
du (without -s) prints whatever it knows of the size of an inaccessible
|
||||||
|
directory. Before, du would print nothing for such a directory.
|
||||||
|
ls -x DIR would sometimes output the wrong string in place of the
|
||||||
|
first entry. [introduced in coreutils-6.8]
|
||||||
|
ls --color would mistakenly color a dangling symlink as if it were
|
||||||
|
a regular symlink. This would happen only when the dangling symlink
|
||||||
|
was not a command-line argument and in a directory with d_type support.
|
||||||
|
[introduced in coreutils-6.0]
|
||||||
|
ls --color, (with a custom LS_COLORS envvar value including the
|
||||||
|
ln=target attribute) would mistakenly output the string "target"
|
||||||
|
before the name of each symlink. [introduced in coreutils-6.0]
|
||||||
|
od's --skip (-j) option now works even when the kernel says that a
|
||||||
|
nonempty regular file has stat.st_size = 0. This happens at least
|
||||||
|
with files in /proc and linux-2.6.22.
|
||||||
|
"od -j L FILE" had a bug: when the number of bytes to skip, L, is exactly
|
||||||
|
the same as the length of FILE, od would skip *no* bytes. When the number
|
||||||
|
of bytes to skip is exactly the sum of the lengths of the first N files,
|
||||||
|
od would skip only the first N-1 files. [introduced in textutils-2.0.9]
|
||||||
|
./printf %%.10000000f 1 could get an internal ENOMEM error and generate
|
||||||
|
no output, yet erroneously exit with status 0. Now it diagnoses the error
|
||||||
|
and exits with nonzero status. [present in initial implementation]
|
||||||
|
seq no longer mishandles obvious cases like "seq 0 0.000001 0.000003",
|
||||||
|
so workarounds like "seq 0 0.000001 0.0000031" are no longer needed.
|
||||||
|
seq would mistakenly reject some valid format strings containing %%,
|
||||||
|
and would mistakenly accept some invalid ones. e.g., %%g%% and %%g, resp.
|
||||||
|
"seq .1 .1" would mistakenly generate no output on some systems
|
||||||
|
Obsolete sort usage with an invalid ordering-option character, e.g.,
|
||||||
|
"env _POSIX2_VERSION=199209 sort +1x" no longer makes sort free an
|
||||||
|
invalid pointer [introduced in coreutils-6.5]
|
||||||
|
sorting very long lines (relative to the amount of available memory)
|
||||||
|
no longer provokes unaligned memory access
|
||||||
|
split --line-bytes=N (-C N) no longer creates an empty file
|
||||||
|
[this bug is present at least as far back as textutils-1.22 (Jan, 1997)]
|
||||||
|
tr -c no longer aborts when translating with Set2 larger than the
|
||||||
|
complement of Set1. [present in the original version, in 1992]
|
||||||
|
tr no longer rejects an unmatched [:lower:] or [:upper:] in SET1.
|
||||||
|
[present in the original version]
|
||||||
* Mon Jul 23 2007 - schwab@suse.de
|
* Mon Jul 23 2007 - schwab@suse.de
|
||||||
- Fix random sort.
|
- Fix random sort.
|
||||||
- Fix invalid free.
|
- Fix invalid free.
|
||||||
|
@ -1,32 +0,0 @@
|
|||||||
2007-05-20 Jim Meyering <jim@meyering.net>
|
|
||||||
|
|
||||||
Fix buggy test for the fchownat-deref bug.
|
|
||||||
* m4/openat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Create the dangling
|
|
||||||
symlink required for the run-test. Without it, this test would
|
|
||||||
always declare that fchownat doesn't work, and client code would
|
|
||||||
unnecessarily use the replacement function with fixed libc.
|
|
||||||
(gl_FUNC_FCHOWNAT): Eliminate a variable that wasn't initialized.
|
|
||||||
Reported by Greg Schafer.
|
|
||||||
|
|
||||||
--- m4/openat.m4
|
|
||||||
+++ m4/openat.m4
|
|
||||||
@@ -38,6 +38,7 @@
|
|
||||||
rm -f $gl_dangle
|
|
||||||
# Arrange for deletion of the temporary file this test creates.
|
|
||||||
ac_clean_files="$ac_clean_files $gl_dangle"
|
|
||||||
+ ln -s conftest.no-such $gl_dangle
|
|
||||||
AC_RUN_IFELSE(
|
|
||||||
[AC_LANG_SOURCE(
|
|
||||||
[[
|
|
||||||
@@ -74,10 +75,7 @@
|
|
||||||
|
|
||||||
AC_CHECK_FUNC([fchownat], [have_fchownat=yes], [have_fchownat=no])
|
|
||||||
if test $have_fchownat = yes; then
|
|
||||||
- gl_FUNC_FCHOWNAT_DEREF_BUG([have_fchownat_bug=yes])
|
|
||||||
- if test $have_fchownat_bug = no; then
|
|
||||||
- use_replacement_fchownat=no
|
|
||||||
- fi
|
|
||||||
+ gl_FUNC_FCHOWNAT_DEREF_BUG([], [use_replacement_fchownat=no])
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test $use_replacement_fchownat = yes; then
|
|
@ -1,49 +0,0 @@
|
|||||||
--- lib/utimens.c
|
|
||||||
+++ lib/utimens.c
|
|
||||||
@@ -75,8 +75,8 @@
|
|
||||||
Return 0 on success, -1 (setting errno) on failure. */
|
|
||||||
|
|
||||||
int
|
|
||||||
-futimens (int fd ATTRIBUTE_UNUSED,
|
|
||||||
- char const *file, struct timespec const timespec[2])
|
|
||||||
+gl_futimens (int fd ATTRIBUTE_UNUSED,
|
|
||||||
+ char const *file, struct timespec const timespec[2])
|
|
||||||
{
|
|
||||||
/* Some Linux-based NFS clients are buggy, and mishandle time stamps
|
|
||||||
of files in NFS file systems in some cases. We have no
|
|
||||||
@@ -185,5 +185,5 @@
|
|
||||||
int
|
|
||||||
utimens (char const *file, struct timespec const timespec[2])
|
|
||||||
{
|
|
||||||
- return futimens (-1, file, timespec);
|
|
||||||
+ return gl_futimens (-1, file, timespec);
|
|
||||||
}
|
|
||||||
--- lib/utimens.h
|
|
||||||
+++ lib/utimens.h
|
|
||||||
@@ -1,3 +1,3 @@
|
|
||||||
#include <time.h>
|
|
||||||
-int futimens (int, char const *, struct timespec const [2]);
|
|
||||||
+int gl_futimens (int, char const *, struct timespec const [2]);
|
|
||||||
int utimens (char const *, struct timespec const [2]);
|
|
||||||
--- src/copy.c
|
|
||||||
+++ src/copy.c
|
|
||||||
@@ -616,7 +616,7 @@
|
|
||||||
timespec[0] = get_stat_atime (src_sb);
|
|
||||||
timespec[1] = get_stat_mtime (src_sb);
|
|
||||||
|
|
||||||
- if (futimens (dest_desc, dst_name, timespec) != 0)
|
|
||||||
+ if (gl_futimens (dest_desc, dst_name, timespec) != 0)
|
|
||||||
{
|
|
||||||
error (0, errno, _("preserving times for %s"), quote (dst_name));
|
|
||||||
if (x->require_preserve)
|
|
||||||
--- src/touch.c
|
|
||||||
+++ src/touch.c
|
|
||||||
@@ -182,7 +182,7 @@
|
|
||||||
t = timespec;
|
|
||||||
}
|
|
||||||
|
|
||||||
- ok = (futimens (fd, (fd == STDOUT_FILENO ? NULL : file), t) == 0);
|
|
||||||
+ ok = (gl_futimens (fd, (fd == STDOUT_FILENO ? NULL : file), t) == 0);
|
|
||||||
|
|
||||||
if (fd == STDIN_FILENO)
|
|
||||||
{
|
|
@ -13,9 +13,9 @@ Andreas Gruenbacher <agruen@suse.de>
|
|||||||
|
|
||||||
Index: coreutils-5.2.1/lib/userspec.c
|
Index: coreutils-5.2.1/lib/userspec.c
|
||||||
================================================================================
|
================================================================================
|
||||||
--- coreutils-5.3.0/lib/userspec.c
|
--- coreutils-6.9-316-e6f4b/lib/userspec.c
|
||||||
+++ coreutils-5.3.0/lib/userspec.c
|
+++ coreutils-6.9-316-e6f4b/lib/userspec.c
|
||||||
@@ -184,7 +184,7 @@
|
@@ -169,7 +169,7 @@ parse_with_separator (char const *spec,
|
||||||
{
|
{
|
||||||
unsigned long int tmp;
|
unsigned long int tmp;
|
||||||
if (xstrtoul (u, NULL, 10, &tmp, "") == LONGINT_OK
|
if (xstrtoul (u, NULL, 10, &tmp, "") == LONGINT_OK
|
||||||
@ -24,7 +24,7 @@ Index: coreutils-5.2.1/lib/userspec.c
|
|||||||
unum = tmp;
|
unum = tmp;
|
||||||
else
|
else
|
||||||
error_msg = E_invalid_user;
|
error_msg = E_invalid_user;
|
||||||
@@ -214,7 +214,8 @@
|
@@ -200,7 +200,8 @@ parse_with_separator (char const *spec,
|
||||||
if (grp == NULL)
|
if (grp == NULL)
|
||||||
{
|
{
|
||||||
unsigned long int tmp;
|
unsigned long int tmp;
|
||||||
@ -34,14 +34,14 @@ Index: coreutils-5.2.1/lib/userspec.c
|
|||||||
gnum = tmp;
|
gnum = tmp;
|
||||||
else
|
else
|
||||||
error_msg = E_invalid_group;
|
error_msg = E_invalid_group;
|
||||||
--- coreutils-5.3.0/src/chgrp.c
|
--- coreutils-6.9-316-e6f4b/src/chgrp.c
|
||||||
+++ coreutils-5.3.0/src/chgrp.c
|
+++ coreutils-6.9-316-e6f4b/src/chgrp.c
|
||||||
@@ -91,7 +91,7 @@
|
@@ -90,7 +90,7 @@ parse_group (const char *name)
|
||||||
{
|
{
|
||||||
unsigned long int tmp;
|
unsigned long int tmp;
|
||||||
if (! (xstrtoul (name, NULL, 10, &tmp, "") == LONGINT_OK
|
if (! (xstrtoul (name, NULL, 10, &tmp, "") == LONGINT_OK
|
||||||
- && tmp <= GID_T_MAX))
|
- && tmp <= GID_T_MAX))
|
||||||
+ && tmp <= GID_T_MAX && tmp != (gid_t) -1))
|
+ && tmp <= GID_T_MAX && tmp != (gid_t) -1))
|
||||||
error (EXIT_FAILURE, 0, _("invalid group %s"), quote (name));
|
error (EXIT_FAILURE, 0, _("invalid group: %s"), quote (name));
|
||||||
gid = tmp;
|
gid = tmp;
|
||||||
}
|
}
|
||||||
|
137
ls-x.diff
137
ls-x.diff
@ -1,137 +0,0 @@
|
|||||||
From nobody Mon Apr 2 10:35:09 2007
|
|
||||||
From: Paul Eggert <eggert@CS.UCLA.EDU>
|
|
||||||
Subject: Re: regression in `ls -x` introduced between 6.7 and 6.8
|
|
||||||
To: Mike Frysinger <vapier@gentoo.org>
|
|
||||||
Cc: bug-coreutils@gnu.org
|
|
||||||
Date: Sun, 01 Apr 2007 20:31:14 -0700
|
|
||||||
|
|
||||||
Mike Frysinger <vapier@gentoo.org> writes:
|
|
||||||
|
|
||||||
>> Do you observe a similar problem with ls -m?
|
|
||||||
>
|
|
||||||
> nope
|
|
||||||
|
|
||||||
OK, thanks, that helped me to narrow it down. Here is a patch.
|
|
||||||
|
|
||||||
2007-04-01 Paul Eggert <eggert@cs.ucla.edu>
|
|
||||||
|
|
||||||
* src/ls.c (print_horizontal): Fix bug reported by Mike Frysinger:
|
|
||||||
ls -x DIR would sometimes output the wrong string in place of the
|
|
||||||
first entry.
|
|
||||||
* tests/ls/x-option: New file.
|
|
||||||
* tests/ls/Makefile.am (TESTS): Add x-option.
|
|
||||||
|
|
||||||
diff --git a/src/ls.c b/src/ls.c
|
|
||||||
index b33146c..abb0a26 100644
|
|
||||||
--- a/src/ls.c
|
|
||||||
+++ b/src/ls.c
|
|
||||||
@@ -4074,16 +4074,16 @@ print_horizontal (void)
|
|
||||||
size_t pos = 0;
|
|
||||||
size_t cols = calculate_columns (false);
|
|
||||||
struct column_info const *line_fmt = &column_info[cols - 1];
|
|
||||||
- size_t name_length = length_of_file_name_and_frills (cwd_file);
|
|
||||||
+ struct fileinfo const *f = sorted_file[0];
|
|
||||||
+ size_t name_length = length_of_file_name_and_frills (f);
|
|
||||||
size_t max_name_length = line_fmt->col_arr[0];
|
|
||||||
|
|
||||||
/* Print first entry. */
|
|
||||||
- print_file_name_and_frills (cwd_file);
|
|
||||||
+ print_file_name_and_frills (f);
|
|
||||||
|
|
||||||
/* Now the rest. */
|
|
||||||
for (filesno = 1; filesno < cwd_n_used; ++filesno)
|
|
||||||
{
|
|
||||||
- struct fileinfo const *f;
|
|
||||||
size_t col = filesno % cols;
|
|
||||||
|
|
||||||
if (col == 0)
|
|
||||||
diff --git a/tests/ls/Makefile.am b/tests/ls/Makefile.am
|
|
||||||
index 461ba07..2b6fb90 100644
|
|
||||||
--- a/tests/ls/Makefile.am
|
|
||||||
+++ b/tests/ls/Makefile.am
|
|
||||||
@@ -24,7 +24,7 @@ TESTS = \
|
|
||||||
stat-dtype \
|
|
||||||
inode dangle file-type recursive dired infloop \
|
|
||||||
rt-1 time-1 symlink-slash follow-slink no-arg m-option \
|
|
||||||
- stat-vs-dirent
|
|
||||||
+ stat-vs-dirent x-option
|
|
||||||
|
|
||||||
EXTRA_DIST = $(TESTS)
|
|
||||||
TESTS_ENVIRONMENT = \
|
|
||||||
diff --git a/tests/ls/x-option b/tests/ls/x-option
|
|
||||||
new file mode 100755
|
|
||||||
index 0000000..44556df
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/tests/ls/x-option
|
|
||||||
@@ -0,0 +1,59 @@
|
|
||||||
+#!/bin/sh
|
|
||||||
+# Exercise the -x option.
|
|
||||||
+
|
|
||||||
+# Copyright (C) 2007 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
|
|
||||||
+# the Free Software Foundation; either version 2 of the License, or
|
|
||||||
+# (at your option) any later version.
|
|
||||||
+
|
|
||||||
+# This program is distributed in the hope that it will be useful,
|
|
||||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+# GNU General Public License for more details.
|
|
||||||
+
|
|
||||||
+# You should have received a copy of the GNU General Public License
|
|
||||||
+# along with this program; if not, write to the Free Software
|
|
||||||
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
||||||
+# 02110-1301, USA.
|
|
||||||
+
|
|
||||||
+if test "$VERBOSE" = yes; then
|
|
||||||
+ set -x
|
|
||||||
+ ls --version
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
+. $srcdir/../envvar-check
|
|
||||||
+. $srcdir/../lang-default
|
|
||||||
+
|
|
||||||
+pwd=`pwd`
|
|
||||||
+t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
|
|
||||||
+trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0
|
|
||||||
+trap '(exit $?); exit $?' 1 2 13 15
|
|
||||||
+
|
|
||||||
+framework_failure=0
|
|
||||||
+mkdir -p $tmp || framework_failure=1
|
|
||||||
+cd $tmp || framework_failure=1
|
|
||||||
+mkdir subdir || framework_failure=1
|
|
||||||
+touch subdir/b || framework_failure=1
|
|
||||||
+touch subdir/a || framework_failure=1
|
|
||||||
+
|
|
||||||
+if test $framework_failure = 1; then
|
|
||||||
+ echo "$0: failure in testing framework" 1>&2
|
|
||||||
+ (exit 1); exit 1
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
+fail=0
|
|
||||||
+
|
|
||||||
+# Coreutils 6.8 and 6.9 would output this in the wrong order.
|
|
||||||
+ls -x subdir > out || fail=1
|
|
||||||
+ls -rx subdir >> out || fail=1
|
|
||||||
+cat <<\EOF > exp || fail=1
|
|
||||||
+a b
|
|
||||||
+b a
|
|
||||||
+EOF
|
|
||||||
+
|
|
||||||
+cmp out exp || fail=1
|
|
||||||
+test $fail = 1 && diff out exp 2> /dev/null
|
|
||||||
+
|
|
||||||
+(exit $fail); exit $fail
|
|
||||||
M ChangeLog
|
|
||||||
M src/ls.c
|
|
||||||
M tests/ls/Makefile.am
|
|
||||||
A tests/ls/x-option
|
|
||||||
Committed as dd35c3cab3ada1120a14b1292b0ac5c60357afb3
|
|
||||||
|
|
||||||
|
|
||||||
_______________________________________________
|
|
||||||
Bug-coreutils mailing list
|
|
||||||
Bug-coreutils@gnu.org
|
|
||||||
http://lists.gnu.org/mailman/listinfo/bug-coreutils
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
|||||||
2007-07-23 Andreas Schwab <schwab@suse.de>
|
|
||||||
|
|
||||||
* src/sort.c (fillbuf): Make sure the buffer limit is always
|
|
||||||
aligned after the buffer was grown.
|
|
||||||
|
|
||||||
diff --git a/src/sort.c b/src/sort.c
|
|
||||||
index 824dd0d..6024be7 100644
|
|
||||||
--- a/src/sort.c
|
|
||||||
+++ b/src/sort.c
|
|
||||||
@@ -1492,6 +1492,8 @@ fillbuf (struct buffer *buf, FILE *fp, char const *file)
|
|
||||||
/* The current input line is too long to fit in the buffer.
|
|
||||||
Double the buffer size and try again. */
|
|
||||||
buf->buf = X2REALLOC (buf->buf, &buf->alloc);
|
|
||||||
+ /* Realign buffer limit. */
|
|
||||||
+ buf->alloc -= buf->alloc % sizeof (struct line);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
10
no-no.diff
10
no-no.diff
@ -1,10 +0,0 @@
|
|||||||
--- po/LINGUAS
|
|
||||||
+++ po/LINGUAS
|
|
||||||
@@ -19,7 +19,6 @@
|
|
||||||
ms
|
|
||||||
nb
|
|
||||||
nl
|
|
||||||
-no
|
|
||||||
pl
|
|
||||||
pt
|
|
||||||
pt_BR
|
|
@ -4,8 +4,8 @@
|
|||||||
ALWAYS_SET_PATH=no
|
ALWAYS_SET_PATH=no
|
||||||
|
|
||||||
# Default path.
|
# Default path.
|
||||||
PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin
|
PATH=/usr/local/bin:/bin:/usr/bin
|
||||||
|
|
||||||
# Default path for a user invoking su to root.
|
# Default path for a user invoking su to root.
|
||||||
SUPATH=/usr/sbin:/bin:/usr/bin:/sbin:/usr/X11R6/bin
|
SUPATH=/usr/sbin:/bin:/usr/bin:/sbin
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user