rpms/coreutils/F-9 coreutils-6.10-sort-endoffields.patch, NONE, 1.1 coreutils-5.2.1-runuser.patch, 1.18, 1.19 coreutils-selinux.patch, 1.47, 1.48 coreutils.spec, 1.220, 1.221
Ondrej Vasik
ovasik at fedoraproject.org
Fri Feb 27 10:49:42 UTC 2009
- Previous message (by thread): rpms/ipe/devel ipe.spec,1.21,1.22
- Next message (by thread): rpms/eclipse-birt/devel birt-rhino.patch, NONE, 1.1 .cvsignore, 1.2, 1.3 eclipse-birt.spec, 1.2, 1.3 sources, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: ovasik
Update of /cvs/extras/rpms/coreutils/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv7133
Modified Files:
coreutils-5.2.1-runuser.patch coreutils-selinux.patch
coreutils.spec
Added Files:
coreutils-6.10-sort-endoffields.patch
Log Message:
fix showing ACL's for ls -Z (#487374), fix automated column width computation for it as well, fix couple of bugs (including #485715) in sort with determining end of fields (upstream), do not mistakenly display -g and -G runuser option in su --help output, some sed cleanup in spec
coreutils-6.10-sort-endoffields.patch:
--- NEW FILE coreutils-6.10-sort-endoffields.patch ---
diff -urNp coreutils-6.10-orig/src/sort.c coreutils-6.10/src/sort.c
--- coreutils-6.10-orig/src/sort.c 2008-01-22 00:33:25.000000000 +0100
+++ coreutils-6.10/src/sort.c 2009-02-27 11:19:35.000000000 +0100
@@ -1390,7 +1390,6 @@ begfield_uni (const struct line *line, c
char *ptr = line->text, *lim = ptr + line->length - 1;
size_t sword = key->sword;
size_t schar = key->schar;
- size_t remaining_bytes;
/* The leading field separator itself is included in a field when -t
is absent. */
@@ -1416,12 +1415,7 @@ begfield_uni (const struct line *line, c
while (ptr < lim && blanks[to_uchar (*ptr)])
++ptr;
- /* Advance PTR by SCHAR (if possible), but no further than LIM. */
- remaining_bytes = lim - ptr;
- if (schar < remaining_bytes)
- ptr += schar;
- else
- ptr = lim;
+ ptr = MIN (lim, ptr + schar);
return ptr;
}
@@ -1493,7 +1487,9 @@ limfield_uni (const struct line *line, c
{
char *ptr = line->text, *lim = ptr + line->length - 1;
size_t eword = key->eword, echar = key->echar;
- size_t remaining_bytes;
+
+ if (echar == 0)
+ eword++; /* Skip all of end field. */
/* Move PTR past EWORD fields or to one past the last byte on LINE,
whichever comes first. If there are more than EWORD fields, leave
@@ -1566,19 +1566,13 @@ limfield_uni (const struct line *line, c
}
#endif
- /* If we're ignoring leading blanks when computing the End
- of the field, don't start counting bytes until after skipping
- past any leading blanks. */
- if (key->skipeblanks)
- while (ptr < lim && blanks[to_uchar (*ptr)])
- ++ptr;
-
- /* Advance PTR by ECHAR (if possible), but no further than LIM. */
- remaining_bytes = lim - ptr;
- if (echar < remaining_bytes)
- ptr += echar;
- else
- ptr = lim;
+ if (echar != 0) /* We need to skip over a portion of the end field. */
+ {
+ if (key->skipeblanks) /* blanks not counted in echar. */
+ while (ptr < lim && blanks[to_uchar (*ptr)])
+ ++ptr;
+ ptr = MIN (lim, ptr + echar);
+ }
return ptr;
}
@@ -3582,12 +3579,9 @@ main (int argc, char **argv)
badfieldspec (optarg, N_("field number is zero"));
}
if (*s == '.')
- s = parse_field_count (s + 1, &key->echar,
- N_("invalid number after `.'"));
- else
{
- /* `-k 2,3' is equivalent to `+1 -3'. */
- key->eword++;
+ s = parse_field_count (s + 1, &key->echar,
+ N_("invalid number after `.'"));
}
s = set_ordering (s, key, bl_end);
}
diff -urNp coreutils-6.10-orig/tests/sort/sort-tests coreutils-6.10/tests/sort/sort-tests
--- coreutils-6.10-orig/tests/sort/sort-tests 2008-01-22 00:33:25.000000000 +0100
+++ coreutils-6.10/tests/sort/sort-tests 2009-02-27 11:19:35.000000000 +0100
@@ -1008,6 +1008,24 @@ else
esac
fi
test -s 07d.E || rm -f 07d.E
+_POSIX2_VERSION=199209 $xx -k 2,3.0 $srcdir/07e.I > 07e.O 2> 07e.E
+code=$?
+if test $code != 0; then
+ $echo "Test 07e(_POSIX2_VERSION=199209) failed: $xx return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp 07e.O $srcdir/07e.X > /dev/null 2>&1
+ case $? in
+ 0) if test "$VERBOSE"; then $echo "passed 07d(_POSIX2_VERSION=199209)"; fi;;
+ 1) $echo "Test 07e(_POSIX2_VERSION=199209) failed: files 07e.O and $srcdir/07e.X differ" 1>&2
+ (diff -c 07e.O $srcdir/07e.X) 2> /dev/null
+ errors=`expr $errors + 1`;;
+ 2) $echo "Test 07e(_POSIX2_VERSION=199209) may have failed." 1>&2
+ $echo The command "cmp 07e.O $srcdir/07e.X" failed. 1>&2
+ errors=`expr $errors + 1`;;
+ esac
+fi
+test -s 07e.E || rm -f 07e.E
_POSIX2_VERSION=199209 $xx -k 2.,3 $srcdir/08a.I > 08a.O 2> 08a.E
code=$?
if test $code != 2; then
@@ -1728,6 +1746,24 @@ else
esac
fi
test -s 18e.E || rm -f 18e.E
+_POSIX2_VERSION=199209 $xx -k1,1b $srcdir/18f.I > 18f.O 2> 18f.E
+code=$?
+if test $code != 0; then
+ $echo "Test 18f(_POSIX2_VERSION=199209) failed: $xx return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp 18f.O $srcdir/18f.X > /dev/null 2>&1
+ case $? in
+ 0) if test "$VERBOSE"; then $echo "passed 18f(_POSIX2_VERSION=199209)"; fi;;
+ 1) $echo "Test 18f(_POSIX2_VERSION=199209) failed: files 18f.O and $srcdir/18f.X differ" 1>&2
+ (diff -c 18f.O $srcdir/18f.X) 2> /dev/null
+ errors=`expr $errors + 1`;;
+ 2) $echo "Test 18f(_POSIX2_VERSION=199209) may have failed." 1>&2
+ $echo The command "cmp 18f.O $srcdir/18f.X" failed. 1>&2
+ errors=`expr $errors + 1`;;
+ esac
+fi
+test -s 18f.E || rm -f 18f.E
_POSIX2_VERSION=199209 $xx +0 +1nr $srcdir/19a.I > 19a.O 2> 19a.E
code=$?
if test $code != 0; then
diff -urNp coreutils-6.10-orig/tests/sort/07e.I coreutils-6.10/tests/sort/07e.I
--- coreutils-6.10-orig/tests/sort/07e.I 1970-01-01 01:00:00.000000000 +0100
+++ coreutils-6.10/tests/sort/07e.I 2009-02-27 11:21:24.000000000 +0100
@@ -0,0 +1,2 @@
+a a b
+z a a
diff -urNp coreutils-6.10-orig/tests/sort/07e.X coreutils-6.10/tests/sort/07e.X
--- coreutils-6.10-orig/tests/sort/07e.X 1970-01-01 01:00:00.000000000 +0100
+++ coreutils-6.10/tests/sort/07e.X 2009-02-27 11:21:10.000000000 +0100
@@ -0,0 +1,2 @@
+z a a
+a a b
diff -urNp coreutils-6.10-orig/tests/sort/18f.I coreutils-6.10/tests/sort/18f.I
--- coreutils-6.10-orig/tests/sort/18f.I 1970-01-01 01:00:00.000000000 +0100
+++ coreutils-6.10/tests/sort/18f.I 2009-02-27 11:14:41.000000000 +0100
@@ -0,0 +1,2 @@
+a y
+a z
diff -urNp coreutils-6.10-orig/tests/sort/18f.X coreutils-6.10/tests/sort/18f.X
--- coreutils-6.10-orig/tests/sort/18f.X 1970-01-01 01:00:00.000000000 +0100
+++ coreutils-6.10/tests/sort/18f.X 2009-02-27 11:15:07.000000000 +0100
@@ -0,0 +1,2 @@
+a y
+a z
coreutils-5.2.1-runuser.patch:
Index: coreutils-5.2.1-runuser.patch
===================================================================
RCS file: /cvs/extras/rpms/coreutils/F-9/coreutils-5.2.1-runuser.patch,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- coreutils-5.2.1-runuser.patch 7 Apr 2008 20:16:00 -0000 1.18
+++ coreutils-5.2.1-runuser.patch 27 Feb 2009 10:49:41 -0000 1.19
@@ -158,7 +158,43 @@
pam_end(pamh, 0);
if (!same_session)
setsid ();
-@@ -657,6 +702,12 @@
+@@ -628,6 +673,27 @@ usage (int status)
+ else
+ {
+ printf (_("Usage: %s [OPTION]... [-] [USER [ARG]...]\n"), program_name);
++ printf (_("Usage: %s [OPTION]... [-] [USER [ARG]...]\n"), program_name);
++#ifdef RUNUSER
++ fputs (_("\
++Change the effective user id and group id to that of USER. No PAM hooks\n\
++are run, and there will be no password prompt. This command is useful\n\
++when run as the root user. If run as a non-root user without privilege\n\
++to set user ID, the command will fail.\n\
++\n\
++ -, -l, --login make the shell a login shell, uses runuser-l\n\
++ PAM file instead of default one\n\
++ -g --group=group specify the primary group\n\
++ -G --supp-group=group specify a supplemental group\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\
++ -s, --shell=SHELL run SHELL if /etc/shells allows it\n\
++"), stdout);
++#else
+ fputs (_("\
+ Change the effective user id and group id to that of USER.\n\
+ \n\
+@@ -640,6 +706,7 @@ Change the effective user id and group i
+ -p same as -m\n\
+ -s, --shell=SHELL run SHELL if /etc/shells allows it\n\
+ "), stdout);
++#endif
+ fputs (HELP_OPTION_DESCRIPTION, stdout);
+ fputs (VERSION_OPTION_DESCRIPTION, stdout);
+ fputs (_("\
+@@ -657,6 +724,12 @@
char *shell = NULL;
struct passwd *pw;
struct passwd pw_copy;
@@ -171,7 +207,7 @@
initialize_main (&argc, &argv);
program_name = argv[0];
-@@ -671,7 +722,11 @@
+@@ -671,7 +744,11 @@
simulate_login = false;
change_environment = true;
@@ -184,7 +220,7 @@
{
switch (optc)
{
-@@ -701,6 +756,28 @@
+@@ -701,6 +778,28 @@
shell = optarg;
break;
@@ -213,7 +249,7 @@
case_GETOPT_HELP_CHAR;
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
-@@ -739,7 +816,20 @@
+@@ -739,7 +838,20 @@
: DEFAULT_SHELL);
endpwent ();
@@ -235,7 +271,7 @@
{
#ifdef SYSLOG_FAILURE
log_su (pw, false);
-@@ -771,8 +861,16 @@
+@@ -771,8 +883,16 @@
modify_environment (pw, shell);
#ifndef USE_PAM
coreutils-selinux.patch:
Index: coreutils-selinux.patch
===================================================================
RCS file: /cvs/extras/rpms/coreutils/F-9/coreutils-selinux.patch,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- coreutils-selinux.patch 12 Oct 2008 16:20:10 -0000 1.47
+++ coreutils-selinux.patch 27 Feb 2009 10:49:41 -0000 1.48
@@ -652,7 +652,26 @@
};
ARGMATCH_VERIFY (format_args, format_types);
-@@ -1236,7 +1245,7 @@ main (int argc, char **argv)
+@@ -1151,7 +1160,8 @@ main (int argc, char **argv)
+ /* Avoid following symbolic links when possible. */
+ if (is_colored (C_ORPHAN)
+ || (is_colored (C_EXEC) && color_symlink_as_referent)
+- || (is_colored (C_MISSING) && format == long_format))
++ || (is_colored (C_MISSING) && (format == long_format
++ || format == security_format)))
+ check_symlink_color = true;
+
+ /* If the standard output is a controlling terminal, watch out
+@@ -1200,7 +1210,7 @@ main (int argc, char **argv)
+ if (dereference == DEREF_UNDEFINED)
+ dereference = ((immediate_dirs
+ || indicator_style == classify
+- || format == long_format)
++ || format == long_format || format == security_format)
+ ? DEREF_NEVER
+ : DEREF_COMMAND_LINE_SYMLINK_TO_DIR);
+
+@@ -1236,7 +1246,7 @@ main (int argc, char **argv)
format_needs_stat = sort_type == sort_time || sort_type == sort_size
|| format == long_format
@@ -661,7 +680,7 @@
|| print_block_size;
format_needs_type = (! format_needs_stat
&& (recursive
-@@ -1267,7 +1276,7 @@ main (int argc, char **argv)
+@@ -1267,7 +1277,7 @@ main (int argc, char **argv)
}
else
do
@@ -670,7 +689,7 @@
while (i < argc);
if (cwd_n_used)
-@@ -1429,7 +1438,7 @@ decode_switches (int argc, char **argv)
+@@ -1429,7 +1439,7 @@ decode_switches (int argc, char **argv)
ignore_mode = IGNORE_DEFAULT;
ignore_patterns = NULL;
hide_patterns = NULL;
@@ -679,7 +698,7 @@
/* FIXME: put this in a function. */
{
-@@ -1811,13 +1820,27 @@ decode_switches (int argc, char **argv)
+@@ -1811,13 +1821,27 @@ decode_switches (int argc, char **argv)
break;
case 'Z':
@@ -708,7 +727,7 @@
default:
usage (LS_FAILURE);
}
-@@ -2517,8 +2540,10 @@ clear_files (void)
+@@ -2517,8 +2541,10 @@ clear_files (void)
struct fileinfo *f = sorted_file[i];
free (f->name);
free (f->linkname);
@@ -721,7 +740,7 @@
}
cwd_n_used = 0;
-@@ -2560,6 +2585,7 @@ gobble_file (char const *name, enum file
+@@ -2560,6 +2586,7 @@ gobble_file (char const *name, enum file
memset (f, '\0', sizeof *f);
f->stat.st_ino = inode;
f->filetype = type;
@@ -729,7 +748,7 @@
if (command_line_arg
|| format_needs_stat
-@@ -2609,7 +2635,7 @@ gobble_file (char const *name, enum file
+@@ -2609,7 +2636,7 @@ gobble_file (char const *name, enum file
{
case DEREF_ALWAYS:
err = stat (absolute_name, &f->stat);
@@ -738,7 +757,7 @@
break;
case DEREF_COMMAND_LINE_ARGUMENTS:
-@@ -2618,7 +2644,7 @@ gobble_file (char const *name, enum file
+@@ -2618,7 +2645,7 @@ gobble_file (char const *name, enum file
{
bool need_lstat;
err = stat (absolute_name, &f->stat);
@@ -747,7 +766,7 @@
if (dereference == DEREF_COMMAND_LINE_ARGUMENTS)
break;
-@@ -2637,7 +2663,7 @@ gobble_file (char const *name, enum file
+@@ -2637,7 +2664,7 @@ gobble_file (char const *name, enum file
default: /* DEREF_NEVER */
err = lstat (absolute_name, &f->stat);
@@ -756,7 +775,7 @@
break;
}
-@@ -2659,7 +2685,7 @@ gobble_file (char const *name, enum file
+@@ -2659,7 +2686,7 @@ gobble_file (char const *name, enum file
f->stat_ok = true;
@@ -765,7 +784,7 @@
{
bool have_acl = false;
int attr_len = (do_deref
-@@ -2667,9 +2694,7 @@ gobble_file (char const *name, enum file
+@@ -2667,9 +2695,7 @@ gobble_file (char const *name, enum file
: lgetfilecon (absolute_name, &f->scontext));
err = (attr_len < 0);
@@ -776,16 +795,43 @@
{
f->scontext = UNKNOWN_SECURITY_CONTEXT;
-@@ -2681,7 +2706,7 @@ gobble_file (char const *name, enum file
+@@ -2681,7 +2707,7 @@ gobble_file (char const *name, enum file
err = 0;
}
- if (err == 0 && ! have_acl && format == long_format)
-+ if (err == 0 && format == long_format)
++ if (err == 0 && (format == long_format || format == security_format))
{
int n = file_has_acl (absolute_name, &f->stat);
err = (n < 0);
-@@ -3255,6 +3281,13 @@ print_current_files (void)
+@@ -2695,7 +2721,7 @@ gobble_file (char const *name, enum file
+ }
+
+ if (S_ISLNK (f->stat.st_mode)
+- && (format == long_format || check_symlink_color))
++ && (format == long_format || format == security_format || check_symlink_color))
+ {
+ char *linkname;
+ struct stat linkstats;
+@@ -2715,7 +2741,7 @@ gobble_file (char const *name, enum file
+ command line are automatically traced if not being
+ listed as files. */
+ if (!command_line_arg || format == long_format
+- || !S_ISDIR (linkstats.st_mode))
++ || format == security_format || !S_ISDIR (linkstats.st_mode))
+ {
+ /* Get the linked-to file's mode for the filetype indicator
+ in long listings. */
+@@ -2754,7 +2780,7 @@ gobble_file (char const *name, enum file
+ block_size_width = len;
+ }
+
+- if (format == long_format)
++ if (format == long_format || format == security_format )
+ {
+ if (print_owner)
+ {
+@@ -3255,6 +3282,13 @@ print_current_files (void)
print_long_format (sorted_file[i]);
DIRED_PUTCHAR ('\n');
}
@@ -799,7 +845,7 @@
break;
}
}
-@@ -3481,7 +3514,7 @@ print_long_format (const struct fileinfo
+@@ -3481,7 +3515,7 @@ print_long_format (const struct fileinfo
The latter is wrong when inode_number_width is zero. */
p += strlen (p);
}
@@ -808,7 +854,7 @@
if (print_block_size)
{
char hbuf[LONGEST_HUMAN_READABLE + 1];
-@@ -3510,9 +3543,15 @@ print_long_format (const struct fileinfo
+@@ -3510,9 +3544,15 @@ print_long_format (const struct fileinfo
The latter is wrong when nlink_width is zero. */
p += strlen (p);
@@ -825,7 +871,7 @@
{
DIRED_FPUTS (buf, stdout, p - buf);
-@@ -3525,9 +3564,6 @@ print_long_format (const struct fileinfo
+@@ -3525,9 +3565,6 @@ print_long_format (const struct fileinfo
if (print_author)
format_user (f->stat.st_author, author_width, f->stat_ok);
@@ -835,7 +881,7 @@
p = buf;
}
-@@ -3864,9 +3900,6 @@ print_file_name_and_frills (const struct
+@@ -3864,9 +3901,6 @@ print_file_name_and_frills (const struct
human_readable (ST_NBLOCKS (f->stat), buf, human_output_opts,
ST_NBLOCKSIZE, output_block_size));
@@ -845,7 +891,7 @@
print_name_with_quoting (f->name, FILE_OR_LINK_MODE (f), f->linkok,
f->stat_ok, f->filetype, NULL);
-@@ -4030,9 +4063,6 @@ length_of_file_name_and_frills (const st
+@@ -4030,9 +4064,6 @@ length_of_file_name_and_frills (const st
output_block_size))
: block_size_width);
@@ -855,7 +901,7 @@
quote_name (NULL, f->name, filename_quoting_options, &name_width);
len += name_width;
-@@ -4461,9 +4491,16 @@ Mandatory arguments to long options are
+@@ -4461,9 +4492,16 @@ Mandatory arguments to long options are
-w, --width=COLS assume screen width instead of current value\n\
-x list entries by lines instead of by columns\n\
-X sort alphabetically by entry extension\n\
@@ -873,7 +919,7 @@
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
fputs (_("\n\
-@@ -4487,3 +4524,67 @@ Exit status is 0 if OK, 1 if minor probl
+@@ -4487,3 +4525,67 @@ Exit status is 0 if OK, 1 if minor probl
}
exit (status);
}
Index: coreutils.spec
===================================================================
RCS file: /cvs/extras/rpms/coreutils/F-9/coreutils.spec,v
retrieving revision 1.220
retrieving revision 1.221
diff -u -r1.220 -r1.221
--- coreutils.spec 13 Oct 2008 08:44:52 -0000 1.220
+++ coreutils.spec 27 Feb 2009 10:49:41 -0000 1.221
@@ -1,7 +1,7 @@
Summary: The GNU core utilities: a set of tools commonly used in shell scripts
Name: coreutils
Version: 6.10
-Release: 33%{?dist}
+Release: 34%{?dist}
License: GPLv3+
Group: System Environment/Base
Url: http://www.gnu.org/software/coreutils/
@@ -30,6 +30,7 @@
Patch10: coreutils-6.12-seqdecimalutf8.patch
Patch11: coreutils-6.12-date_timerelsnumber.patch
Patch12: coreutils-446294-lsexitstatuses.patch
+Patch13: coreutils-6.10-sort-endoffields.patch
# Our patches
Patch100: coreutils-chgrp.patch
@@ -128,6 +129,7 @@
%patch10 -p1 -b .sequtf8
%patch11 -p1 -b .getdate
%patch12 -p1 -b .lsexit
+%patch13 -p1 -b .endfields
# Our patches
@@ -168,12 +170,10 @@
chmod a+x tests/ls/capability
#fix typos/mistakes in localized documentation(#439410, #440056)
-for pofile in $(find ./po/*.p*)
-do
- sed -i 's/-dpR/-cdpR/' "$pofile"
- sed -i 's/commmand/command/' "$pofile"
-done
-
+find ./po/ -name "*.p*" | xargs \
+ sed -i \
+ -e 's/-dpR/-cdpR/' \
+ -e 's/commmand/command/'
%build
%ifarch s390 s390x
@@ -344,6 +344,15 @@
/sbin/runuser
%changelog
+* Fri Feb 27 2009 Ondrej Vasik <ovasik at redhat.com> - 6.10-34
+- fix showing ACL's for ls -Z (#487374), fix automatic
+ column width for it as well
+- fix couple of bugs (including #485715) in sort with
+ determining end of fields(upstream)
+- do not mistakenly display -g and -G runuser option in su
+ --help output
+- some sed cleanup
+
* Mon Oct 13 2008 Ondrej Vasik <ovasik at redhat.com> - 6.10-33
- fix several date issues(e.g. countable dayshifts, ignoring
some cases of relative offset, locales conversions...)
- Previous message (by thread): rpms/ipe/devel ipe.spec,1.21,1.22
- Next message (by thread): rpms/eclipse-birt/devel birt-rhino.patch, NONE, 1.1 .cvsignore, 1.2, 1.3 eclipse-birt.spec, 1.2, 1.3 sources, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list