Re: new snapshot [Re: coreutils 6.9.92 fail to configure on *bsd

2008-01-23 Thread Elias Pipping
On Mon, Jan 21, 2008 at 08:46:30AM +0100, Jim Meyering wrote:
> Elias Pipping <[EMAIL PROTECTED]> wrote:
> > as for the check-root tests:
> >
> >   this one now passes:
> >
> > special-bits
> >
> >   these fail:
> >
> > rm/fail-2eperm
> > cp/preserve-gid
> > touch/now-owned-by-other
> 
> It looks like they're all due to the fact that you used
> NON_ROOT_USERNAME=nobody and "nobody" lacks access to required
> files.  Can you run it again, as recommended in README
> i.e., using NON_ROOT_USERNAME=your_user_name (assuming the
> source tree belongs to "your_user_name"):

D'oh -- should've read that. So, with 6.10 and --disable-acl,
all of the non-root tests pass and a single root-only test fails:

% tar xf coreutils-6.10.tar.gz 
% cd coreutils-6.10 
% ./configure --disable-acl 
% make -j3
% sudo env VERBOSE=yes NON_ROOT_USERNAME=$USER make check -C tests/cp 
TESTS=preserve-gid
make  check-TESTS
FAIL: preserve-gid.log

===
 1 of 1 tests failed
 See tests/cp/test-suite.log
 Please report it to bug-coreutils@gnu.org
===

=
   GNU coreutils 6.10: tests/cp/test-suite.log   
=

1 of 1 tests failed.  

.. contents:: :depth: 2


FAIL: preserve-gid.log (exit: 1)


+ cp --version
cp (GNU coreutils) 6.10
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 

This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Torbjorn Granlund, David MacKenzie, and Jim Meyering.
++ perl -le 'foreach my $i (1000..16*1024-1) { getpwuid $i or (print $i), 
exit }'
+ nameless_uid=1000
++ perl -le 'foreach my $i (1000..16*1024) { getgrgid $i or (print $i), 
exit }'
+ nameless_gid1=1000
++ perl -le 'foreach my $i (1000+1..16*1024) { getgrgid $i or (print $i), 
exit }'
+ nameless_gid2=1001
+ test -z 1000
+ test -z 1000
+ test -z 1001
+ chown +1000 .
+ create a0 0 0
+ echo a0
+ chown +0:+0 a0
+ create b0 1000 1000
+ echo b0
+ chown +1000:+1000 b0
+ create b1 1000 1001
+ echo b1
+ chown +1000:+1001 b1
+ create c0 0 1000
+ echo c0
+ chown +0:+1000 c0
+ create c1 0 1001
+ echo c1
+ chown +0:+1001 c1
+ t0 a0 0 0 cp
+ f=a0
+ shift
+ u=0
+ shift
+ g=0
+ shift
+ rm -f b
+ cp a0 b
++ stat -c '%u %g' b
+ s='0 20'
+ test 'x0 20' '!=' 'x0 0'
+ echo './preserve-gid: cp a0 b: 0 0 != 0 20'
./preserve-gid: cp a0 b: 0 0 != 0 20
+ exit 1
+ exit 1
+ st=1
+ cleanup_
+ :
+ d=/Users/pipping/coreutils-6.10/tests/cp/cu-preserve-gid.Vh5JhaeTrx
+ cd /Users/pipping/coreutils-6.10/tests/cp
+ chmod -R u+rwx 
/Users/pipping/coreutils-6.10/tests/cp/cu-preserve-gid.Vh5JhaeTrx
+ rm -rf /Users/pipping/coreutils-6.10/tests/cp/cu-preserve-gid.Vh5JhaeTrx
+ exit 1
make[2]: *** [test-suite.log] Error 1
make[1]: *** [check-TESTS] Error 2
make: *** [check-am] Error 2
% 


-- Elias

PS: this is still on i386-apple-darwin9.1.0


pgpAnqhjNfpZV.pgp
Description: PGP signature
___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: [PATCH] split: --verbose output to stdout

2008-01-23 Thread Steven Schubiger
Jim Meyering <[EMAIL PROTECTED]> wrote:
> Steven Schubiger <[EMAIL PROTECTED]> wrote:
> > diff --git a/src/split.c b/src/split.c
> > index 5807a1c..2ad0baf 100644
> > --- a/src/split.c
> > +++ b/src/split.c
> > @@ -208,7 +208,7 @@ cwrite (bool new_file_flag, const char *bp, size_t 
> > bytes)
> >
> >next_file_name ();
> >if (verbose)
> > -   fprintf (stderr, _("creating file %s\n"), quote (outfile));
> > +   fprintf (stdout, _("creating file %s\n"), quote (outfile));
> >output_desc = open (outfile,
> >   O_WRONLY | O_CREAT | O_TRUNC | O_BINARY,
> >   (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP
> 
> That's probably ok. i.e., it's probably ok not to call fflush there.
> 
> You'll want to adjust the help output, too:
> 
> $ split --help|grep verb
>   --verbose   print a diagnostic to standard error just
> 
> Please check the texinfo documentation, too.
> It'd be nice if you were to include a ChangeLog entry.
> 
> No rush of course, since I won't apply such a change until
> after the upcoming stable release.  In fact, why don't you
> do both split and mkdir at the same time, and then you can
> simply remove that item from TODO as part of the patch.
> 
> Finally, please run "make check" or even "make distcheck"
> to make sure all tests pass with your changes.

Patch attached (mkdir & split).

FYI, make check passes, whereas make distcheck bails out with:

./gnulib/ChangeLog:105:Bruno Haible  <[EMAIL PROTECTED]>
./gnulib/ChangeLog:37711:Copyright (C) 1997-2008 Free Software Foundation, Inc.
./gnulib/ChangeLog:37712:Copying and distribution of this file, with or without 
modification,
./gnulib/ChangeLog:37713:are permitted provided the copyright notice and this 
notice are preserved.
Makefile.maint: found unexpected prefix in a ChangeLog
make[2]: *** [sc_changelog] Error 1
make[2]: Leaving directory `/home/sts/code/foreign/coreutils'
make[1]: *** [distcheck-hook] Error 2
make[1]: Leaving directory `/home/sts/code/foreign/coreutils'
make: *** [distcheck] Error 2

Steven Schubiger

diff --git a/ChangeLog b/ChangeLog
index 7643c87..6a892c4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2008-01-23  Steven Schubiger  <[EMAIL PROTECTED]>
+
+   * src/mkdir.c: Send --verbose output to stdout.
+   * src/split.c: Likewise.
+   Update texinfo documentation for split.
+   Adjust tests for mkdir/split.
+   * tests/mkdir/p-v: Capture verbose output which previously was
+   being emitted to stderr from stdout.
+   * tests/misc/split-a: Likewise.
+
 2008-01-18  Jim Meyering  <[EMAIL PROTECTED]>
 
Update README.
diff --git a/TODO b/TODO
index df07d4b..30b14be 100644
--- a/TODO
+++ b/TODO
@@ -46,14 +46,6 @@ And once that's done, add an exclusion so that `cp --link'
 no longer incurs the overhead of saving src. dev/ino and dest. filename
 in the hash table.
 
-See if we can be consistent about where --verbose sends its output:
-  These all send --verbose output to stdout:
-head, tail, rm, cp, mv, ln, chmod, chown, chgrp, install, ln
-  These send it to stderr:
-shred mkdir split
-  shred must write --verbose output to stderr
-  readlink is different
-
 Write an autoconf test to work around build failure in HPUX's 64-bit mode.
 See notes in README -- and remove them once there's a work-around.
 
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 5043a8f..9061479 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,8 @@
+2008-01-23  Steven Schubiger  <[EMAIL PROTECTED]>
+
+   * coreutils.texi (split invocation): Removed the mention
+   of --verbose output being printed to stderr.
+
 2007-10-05  Jim Meyering  <[EMAIL PROTECTED]>
 
* coreutils.texi (chroot invocation): List two systems on which
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 3785eae..cf8a730 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -2838,7 +2838,7 @@ Use digits in suffixes rather than lower-case letters.
 
 @itemx --verbose
 @opindex --verbose
-Write a diagnostic to standard error just before each output file is opened.
+Write a diagnostic just before each output file is opened.
 
 @end table
 
diff --git a/src/mkdir.c b/src/mkdir.c
index 0704077..39ae97a 100644
--- a/src/mkdir.c
+++ b/src/mkdir.c
@@ -1,5 +1,5 @@
 /* mkdir -- make directories
-   Copyright (C) 90, 1995-2002, 2004-2007 Free Software Foundation, Inc.
+   Copyright (C) 90, 1995-2002, 2004-2008 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
@@ -99,13 +99,26 @@ struct mkdir_options
   char const *created_directory_format;
 };
 
+/* Verbose formatted output of variable count of arguments.  */
+static void
+verbose_output (const char const *fmt, ...)
+{
+  va_list ap;
+  va_start (ap, fmt);
+  fprintf (stdout, "%s: ", program_name);
+  vfprintf (stdout, fmt, ap);
+  fprintf (stdout, "\n");

Re: new snapshot [Re: coreutils 6.9.92 fail to configure on *bsd

2008-01-23 Thread Jim Meyering
Elias Pipping <[EMAIL PROTECTED]> wrote:
...
> D'oh -- should've read that. So, with 6.10 and --disable-acl,
> all of the non-root tests pass and a single root-only test fails:
>
> % tar xf coreutils-6.10.tar.gz
> % cd coreutils-6.10
> % ./configure --disable-acl
> % make -j3
> % sudo env VERBOSE=yes NON_ROOT_USERNAME=$USER make check -C tests/cp 
> TESTS=preserve-gid
> make  check-TESTS
> FAIL: preserve-gid.log
...
> ++ stat -c '%u %g' b
> + s='0 20'
> + test 'x0 20' '!=' 'x0 0'
> + echo './preserve-gid: cp a0 b: 0 0 != 0 20'

Thanks for the report and details.
That's probably due to your running the root-only
tests in a directory with the sticky set-GID bit set.

If that's the problem, here's an untested fix:

* tests/cp/preserve-gid: Skip this test when run in a setgid directory.
Reported by Elias Pipping.

diff --git a/tests/cp/preserve-gid b/tests/cp/preserve-gid
index 5f2c050..e96a0bd 100755
--- a/tests/cp/preserve-gid
+++ b/tests/cp/preserve-gid
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Verify that cp -p preserves GID when it is possible.

-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2008 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
@@ -20,6 +20,8 @@
 PRIV_CHECK_ARG=require-root . "$srcdir/../priv-check"
 . "$srcdir/../test-lib.sh"

+. "$abs_top_srcdir/tests/setgid-check"
+
 create() {
   echo "$1" > "$1" || exit 1
   chown "+$2:+$3" "$1" || exit 1


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: coreutils-6.10 released (stable)

2008-01-23 Thread Zvi Har'El
A  minor bug: missing semicolon if "--enable-install-program=su" 
configure option is selected


Patch:


--- coreutils-6.10/src/Makefile.in.~20080122004942~2008-01-22 
02:49:42.0 +0200

+++ coreutils-6.10/src/Makefile.in2008-01-23 10:53:33.0 +0200
@@ -1274,7 +1274,7 @@
echo " chown root $(installed_su)";\
chown root $(installed_su);\
echo " chmod $(setuid_root_mode) $(installed_su)";\
-chmod $(setuid_root_mode) $(installed_su)\
+chmod $(setuid_root_mode) $(installed_su);\
  else\
:;\
  fi

On 22/01/08 23:18, Jim Meyering wrote:


Coreutils version 6.10 has been released.  This is a stable release.

Please report any build problems or test failures to the
bug-coreutils@gnu.org mailing list.

** 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.


  


--
Dr. Zvi Har'El  mailto:[EMAIL PROTECTED]Department of Mathematics
tel:+972-54-4227607  Technion - Israel Institute of Technology
fax:+972-4-8293388  http://www.math.technion.ac.il/~rl/Haifa 32000, ISRAEL
"If you can't say somethin' nice, don't say nothin' at all." -- Thumper (1942)



___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Try to port coreutils to os2

2008-01-23 Thread Elbert Pol

Hello,

I'm trying to build latest Coreutils to Os/2
I use ./configure --prefix=/Coreutils
But i get error with configu

configure: error: internal error: g'l_INCLUDE_EXCLUDE_PROG's 2nd arg, 
arch hostn

ame su,
   does not match the list of default-not-installed 
programs

) also recorded in ./src/Makefile.am

I saw this error contains also in v6.9.1
Any idea ?
--
  With the best regards,

  Elbert Pol

--
 ***  Take a look at www.romeepol.nl  
--


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Avoid misinterpreting mgetgroups failure in running root-only tests.

2008-01-23 Thread Jim Meyering
Just heard about this on IRC:

Avoid misinterpreting mgetgroups failure in running root-only tests.
* src/setuidgid.c (main): Don't misinterpret as size_t an error
return from mgetgroups.  Reported by Theodoros V. Kalamatianos.

diff --git a/src/setuidgid.c b/src/setuidgid.c
index 0f551f9..83369fd 100644
--- a/src/setuidgid.c
+++ b/src/setuidgid.c
@@ -1,5 +1,5 @@
 /* setuidgid - run a command with the UID and GID of a specified user
-   Copyright (C) 2003-2007 Free Software Foundation, Inc.
+   Copyright (C) 2003-2008 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
@@ -181,10 +181,11 @@ main (int argc, char **argv)
 #if HAVE_SETGROUPS
 if (n_gids == 0)
   {
-n_gids = mgetgroups (pwd->pw_name, pwd->pw_gid, &gids);
-if (n_gids <= 0)
+int n = mgetgroups (pwd->pw_name, pwd->pw_gid, &gids);
+if (n <= 0)
   error (1, errno, _("failed to get groups for user %s"),
  quote (pwd->pw_name));
+n_gids = n;
   }

 if (setgroups (n_gids, gids))


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: coreutils-6.10 released (stable)

2008-01-23 Thread Jim Meyering
"Zvi Har'El" <[EMAIL PROTECTED]> wrote:
> A  minor bug: missing semicolon if "--enable-install-program=su"
> configure option is selected

Thanks a lot!
Note I have to change Makefile.am, not the generated file, Makefile.in.

2008-01-23  Zvi Har'El  <[EMAIL PROTECTED]>

Add a ";", so "make install" works with --enable-install-program=su.
* src/Makefile.am (install_su): Add a semicolon.  (tiny change)


diff --git a/src/Makefile.am b/src/Makefile.am
index efcea5b..a0b1d0c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -170,7 +170,7 @@ install_su =
\
 echo " chown root $(installed_su)";\
 chown root $(installed_su);\
 echo " chmod $(setuid_root_mode) $(installed_su)"; \
-chmod $(setuid_root_mode) $(installed_su)  \
+chmod $(setuid_root_mode) $(installed_su); \
   else \
 :; \
   fi
--
1.5.4.rc4.15.g80bce


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


tail(1) --no-free-bonus- "clarity separator lines"

2008-01-23 Thread jidanni
Gentlemen, your assignment: tell me how many blank lines are at the
end of each file:
$ tail -n 3 sd?
==> sd1 <==
=_1201017022-21167-0



==> sd2 <==

=_1201077677-7431-0--


==> sd3 <==

=_1201017022-21167-0

$ tail -n 3 sd{3,2,1} #let's try again, shall we?
==> sd3 <==

=_1201017022-21167-0


==> sd2 <==

=_1201077677-7431-0--


==> sd1 <==
=_1201017022-21167-0


$ seq 3 > t #OK I am getting dizzy. Never mind, let's try something different:
$ tail t t t
==> t <==
1
2
3

==> t <==
1
2
3

==> t <==
1
2
3
$ tail --version
tail (GNU coreutils) 5.97 ...

Anyway, ha ha ha! Checkmate: there's no option to turn off tail's
"free bonus gift" of extra "clarity separator lines" at the end of all
files but the last.

Ask yourselves, would more(1) pull such cr*p?
$ more t t t|cat
::
t
::
1
2
3
::
t
::
1
2
3
::
t
::
1
2
3
$
So we see your work is cut out for you.


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: tail(1) --no-free-bonus- "clarity separator lines"

2008-01-23 Thread Eric Blake

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

According to [EMAIL PROTECTED] on 1/23/2008 6:56 AM:
| $ tail --version
| tail (GNU coreutils) 5.97 ...

Consider upgrading (we've told you this before).  The latest stable
version of coreutils is 6.10.

|
| Anyway, ha ha ha! Checkmate: there's no option to turn off tail's
| "free bonus gift" of extra "clarity separator lines" at the end of all
| files but the last.
|
| Ask yourselves, would more(1) pull such cr*p?

POSIX requires more to support multiple files, but only requires tail to
support one file.  And even with more, POSIX gives no requirements on how
multiple files are displayed (ie. what headers to use) when more's output
is to a non-terminal.  Therefore how tail(1) behaves on multiple files is
a GNU extension, with no specified precedence to borrow from more(1), so
we are free to use whatever header between files that we choose.  That
said, it is simply a matter of documenting the header:

It appears that your version of more[*] uses a three-line header, with no
blank lines, before every file:

| ::
| t
| ::

while tail uses a one-line header before the first file:

| ==> t <==

and a two-line header (including the blank line you dislike) before the
remaining files:

|
| ==> t <==

| So we see your work is cut out for you.

What are you suggesting?  Maybe something like --header-style, which takes
a printf-like argument that can be used to specify contents of an
alternate header before the first file and between other files?

[*] My version of more happens to be less-382, which refuses to redisplay
the same file multiple times (hmm, that may violate POSIX), and uses no
separator between distinct files (no violation there):

$ less t t | cat
1
2
3
$ cp t t1
$ less t t1 | cat
1
2
3
1
2
3

- --
Don't work too hard, make some time for fun as well!

Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHl04+84KuGfSFAYARAuTmAKDOEyoO0SakG0u+1cfkKrMWDNyWAgCggfCw
0k+8wTLHOPzkq6P8C53zerk=
=Cnuc
-END PGP SIGNATURE-


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: new snapshot [Re: coreutils 6.9.92 fail to configure on *bsd

2008-01-23 Thread Elias Pipping
On Wed, Jan 23, 2008 at 01:40:22PM +0100, Jim Meyering wrote:
> If that's the problem, here's an untested fix:

Unfortunately, that doesn't seem to help.

  % tar xf coreutils-6.10.tar.gz 
  % cd coreutils-6.10 
  % cat ~/foo.patch 
  diff --git a/tests/cp/preserve-gid b/tests/cp/preserve-gid
  index 5f2c050..e96a0bd 100755
  --- a/tests/cp/preserve-gid
  +++ b/tests/cp/preserve-gid
  @@ -1,7 +1,7 @@
   #!/bin/sh
   # Verify that cp -p preserves GID when it is possible.

  -# Copyright (C) 2007 Free Software Foundation, Inc.
  +# Copyright (C) 2007, 2008 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
  @@ -20,6 +20,8 @@
   PRIV_CHECK_ARG=require-root . "$srcdir/../priv-check"
   . "$srcdir/../test-lib.sh"

  +. "$abs_top_srcdir/tests/setgid-check"
  +
   create() {
 echo "$1" > "$1" || exit 1
 chown "+$2:+$3" "$1" || exit 1
  % patch -p1 < ~/foo.patch 
  patching file tests/cp/preserve-gid
  % ./configure --disable-acl 
  % make -j3
  % sudo env VERBOSE=yes NON_ROOT_USERNAME=$USER make check -C tests/cp 
TESTS=preserve-gid
  make  check-TESTS
  FAIL: preserve-gid.log

  ===
   1 of 1 tests failed
   See tests/cp/test-suite.log
   Please report it to bug-coreutils@gnu.org
  ===

  =
 GNU coreutils 6.10: tests/cp/test-suite.log   
  =

  1 of 1 tests failed.  

  .. contents:: :depth: 2


  FAIL: preserve-gid.log (exit: 1)
  

  + cp --version
  cp (GNU coreutils) 6.10
  Copyright (C) 2008 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later 
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.

  Written by Torbjorn Granlund, David MacKenzie, and Jim Meyering.
  ++ perl -le 'foreach my $i (1000..16*1024-1) { getpwuid $i or (print $i), 
exit }'
  + nameless_uid=1000
  ++ perl -le 'foreach my $i (1000..16*1024) { getgrgid $i or (print $i), exit 
}'
  + nameless_gid1=1000
  ++ perl -le 'foreach my $i (1000+1..16*1024) { getgrgid $i or (print $i), 
exit }'
  + nameless_gid2=1001
  + test -z 1000
  + test -z 1000
  + test -z 1001
  + chown +1000 .
  + create a0 0 0
  + echo a0
  + chown +0:+0 a0
  + create b0 1000 1000
  + echo b0
  + chown +1000:+1000 b0
  + create b1 1000 1001
  + echo b1
  + chown +1000:+1001 b1
  + create c0 0 1000
  + echo c0
  + chown +0:+1000 c0
  + create c1 0 1001
  + echo c1
  + chown +0:+1001 c1
  + t0 a0 0 0 cp
  + f=a0
  + shift
  + u=0
  + shift
  + g=0
  + shift
  + rm -f b
  + cp a0 b
  ++ stat -c '%u %g' b
  + s='0 20'
  + test 'x0 20' '!=' 'x0 0'
  + echo './preserve-gid: cp a0 b: 0 0 != 0 20'
  ./preserve-gid: cp a0 b: 0 0 != 0 20
  + exit 1
  + exit 1
  + st=1
  + cleanup_
  + :
  + d=/Users/pipping/coreutils-6.10/tests/cp/cu-preserve-gid.qmKidiSEBi
  + cd /Users/pipping/coreutils-6.10/tests/cp
  + chmod -R u+rwx 
/Users/pipping/coreutils-6.10/tests/cp/cu-preserve-gid.qmKidiSEBi
  + rm -rf /Users/pipping/coreutils-6.10/tests/cp/cu-preserve-gid.qmKidiSEBi
  + exit 1
  make[2]: *** [test-suite.log] Error 1
  make[1]: *** [check-TESTS] Error 2
  make: *** [check-am] Error 2
  % 


-- Elias


pgp0iKkxE1XA8.pgp
Description: PGP signature
___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


getgrouplist module is now higher priority

2008-01-23 Thread Jim Meyering
Theodoros V. Kalamatianos discovered that getgrent mistakenly
sets errno=ENOENT on EOF when /etc/nsswitch.conf specifies e.g.,

group: nisplus

This causes some new getgrent failure-detection code to report a
false positive for the bogus ENOENT.
[getgrent returns NULL both to indicate EOF and to indicate an error.
 Setting errno=0 beforehand and checking it afterwards is the only
 way to distinguish failure and EOF. ]

This came up because a program used in coreutils testing framework
would fail for root-only tests (not a big deal):

  # ./setuidgid +0 true > /dev/null
  ./setuidgid: failed to get groups for user `root': No such file or directory

But you can demonstrate the same effect with "id" from the
just release coreutils-6.10:

  $ ./id root
  uid=0(root) gid=0./id: failed to get groups for user `root': No such file or 
directory

As such, and considering the POSIX recommendation to avoid getgrent, I'll
soon finally switch to using get getgrouplist, per this TODO file entry:

  Implement Ulrich Drepper's suggestion to use getgrouplist rather than
getugroups.  This affects both `id' and `setuidgid', but makes a big
difference on systems with many users and/or groups, and makes id usable
once again on systems where access restrictions make getugroups fail.
But first we'll need a run-test (either in an autoconf macro or at
run time) to avoid the segfault bug in libc-2.3.2's getgrouplist.
In that case, we'd revert to using a new (to-be-written) getgrouplist
module that does most of what `id' already does.  Or just avoid the
buggy use of getgrouplist by never passing it a buffer of length zero.
See http://bugzilla.redhat.com/200327

Now that there are two clients, we definitely need a getgrouplist
module for gnulib.  If someone writes it in the next few days,
that'd be great.  Otherwise, I'll get to it.


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: tail(1) --no-free-bonus- "clarity separator lines"

2008-01-23 Thread jidanni
EB> Consider upgrading (we've told you this before).  The latest stable
EB> version of coreutils is 6.10.
OK, I'll tell debian to get in chime with the times, 
http://bugs.debian.org/462340

EB> What are you suggesting?
Maybe something like --omit-blank-line-at-separator. Anyway make sure
it is short and sweet, else it will become like man pr(1), overgrown
with options.


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Can't seem to build coreutils-6.9 on x86-64

2008-01-23 Thread Bruce Korb
///usr/include/sys/stat.h:515: warning: C99 inline functions are not
supported; using GNU89
///usr/include/sys/stat.h:523: warning: C99 inline functions are not
supported; using GNU89
In file included from ../../lib/utimecmp.c:33:
../../lib/utimens.h:2: error: conflicting types for 'futimens'
///usr/include/sys/stat.h:370: error: previous declaration of
'futimens' was here
make[2]: *** [utimecmp.o] Error 1
make[2]: Leaving directory
`/local/root/usr/local/src/_build/coreutils-6.9/_b/lib'
make[1]: *** [all] Error 2
make[1]: Leaving directory
`/local/root/usr/local/src/_build/coreutils-6.9/_b/lib'
make: *** [all-recursive] Error 1


$ ../build-aux/config.guess
x86_64-unknown-linux-gnu
$ cat /etc/SuSE-release
openSUSE 10.3 (X86-64)
VERSION = 10.3

=

My goal was to validate a patch that is a lot of work to build under
the GIT sources
(attached).  Thanks - Bruce
diff --git a/src/sort.c b/src/sort.c
index 1183fc5..64f44a0 100644
--- a/src/sort.c
+++ b/src/sort.c
@@ -172,6 +172,7 @@ struct keyfield
    Handle numbers in exponential notation. */
   bool month;			/* Flag for comparison by month name. */
   bool reverse;			/* Reverse the sense of comparison. */
+  bool version; /* Version number comparison. */
   struct keyfield *next;	/* Next keyfield to try. */
 };
 
@@ -1543,6 +1544,26 @@ general_numcompare (const char *sa, const char *sb)
 	  : memcmp ((char *) &a, (char *) &b, sizeof a));
 }
 
+/* Compare the keys TEXTA (of length LENA) and TEXTB (of length LENB)
+   using strverscmp.  */
+
+static int
+compare_version (char *restrict texta, size_t lena,
+		 char *restrict textb, size_t lenb)
+{
+  int diff;
+  char sv_a = texta[lena];
+  chbr sv_b = textb[lenb];
+
+  texta[lena] = textb[lenb] = '\0';
+  diff = strverscmp (texta, textb);
+
+  texta[lena] = sv_a;
+  textb[lenb] = sv_b;
+
+  return diff;
+}
+
 /* Return an integer in 1..12 of the month name MONTH with length LEN.
Return 0 if the name in S is not recognized.  */
 
@@ -1741,8 +1762,13 @@ keycompare (const struct line *a, const struct line *b)
 		  (texta, textb));
 	  *lima = savea, *limb = saveb;
 	}
+
+  else if (key->version)
+  diff = compare_version (texta, lena, textb, lenb);
+
   else if (key->month)
 	diff = getmonth (texta, lena) - getmonth (textb, lenb);
+
   /* Sorting like this may become slow, so in a simple locale the user
 	 can select a faster sort that is similar to ascii sort.  */
   else if (hard_LC_COLLATE)
@@ -2705,6 +2731,9 @@ set_ordering (const char *s, struct keyfield *key, enum blanktype blanktype)
 	case 'r':
 	  key->reverse = true;
 	  break;
+	case 'V':
+	  key->version = true;
+	  break;
 	default:
 	  return (char *) s;
 	}
@@ -2911,6 +2940,7 @@ main (int argc, char **argv)
 	case 'n':
 	case 'r':
 	case 'R':
+	case 'V':
 	  {
 	char str[2];
 	str[0] = c;
@@ -3099,6 +3129,7 @@ main (int argc, char **argv)
   key->general_numeric = gkey.general_numeric;
   key->random = gkey.random;
   key->reverse = gkey.reverse;
+  key->version = gkey.version;
 }
 
   need_random |= key->random;
___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


strange output when using "tr" utility (?)

2008-01-23 Thread Nikos Alexandris
Hi!

I get following strange output when I try to... :

$ tr "[a-z]" "A-Z"
[After typing "hi i", I get:]
IJ J

or...

$ echo nikos | tr "[a-z]" "A-Z"
OJLPT

why is that?

Is there a setting which controls "tr" behaviour?

Thank you in advance,

Nikos




___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: strange output when using "tr" utility (?)

2008-01-23 Thread Eric Blake

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

According to Nikos Alexandris on 1/23/2008 3:12 PM:
| Hi!
|
| I get following strange output when I try to... :
|
| $ tr "[a-z]" "A-Z"
| [After typing "hi i", I get:]
| IJ J

This is not a bug.  Character ranges in tr do not need surrounding
brackets, so you've just done:

tr "[abcdefghi...yz]" \
~   "ABCDEFGHIJ...Z"

converting 'h' to 'I' (and deleting 'z').

However, since upper-casing and lower-casing can be locale-dependent, a-z
is not always adequate to specify lower-case characters, and it is safer
to do:

tr "[:lower:]" "[:upper:]"

- --
Don't work too hard, make some time for fun as well!

Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHmAp384KuGfSFAYARAqwQAKCXziwn5NWLL85Hwsz8DYquJqKf1ACgn2Q1
kX8tTSD9SSLYEDBJWQLSTs8=
=nRMl
-END PGP SIGNATURE-


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: Can't seem to build coreutils-6.9 on x86-64

2008-01-23 Thread Eric Blake

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

According to Bruce Korb on 1/23/2008 10:51 AM:
| In file included from ../../lib/utimecmp.c:33:
| ../../lib/utimens.h:2: error: conflicting types for 'futimens'
| ///usr/include/sys/stat.h:370: error: previous declaration of
| 'futimens' was here

This is a known issue for 6.9 that was resolved in time for 6.10; try the
latest release instead:
http://lists.gnu.org/archive/html/bug-coreutils/2008-01/msg00159.html

- --
Don't work too hard, make some time for fun as well!

Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHmAq084KuGfSFAYARAgu6AJ9GHyo53QFY6yKLU+r3m/t2evA9cgCgxn5V
ejNYl70Z9ZCDtbVucsbtlrY=
=gvgB
-END PGP SIGNATURE-


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


[bug #22102] gcp fails to set default ACL on FreeBSD

2008-01-23 Thread anonymous

URL:
  

 Summary: gcp fails to set default ACL on FreeBSD
 Project: GNU Core Utilities
Submitted by: None
Submitted on: Четверг 24.01.2008 at 06:53 UTC
Category: None
Severity: 3 - Normal
  Item Group: None
  Status: None
 Privacy: Public
 Assigned to: None
 Open/Closed: Open
 Discussion Lock: Any

___

Details:

see http://www.freebsd.org/cgi/query-pr.cgi?pr=107229 for details.




___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/



___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils