Re: new snapshot available: coreutils-8.20.119-54cdb0

2013-02-13 Thread Pádraig Brady

On 02/11/2013 11:55 AM, Pádraig Brady wrote:

This is another snapshot mainly to roll up translations.
We plan to release coreutils 8.21 this Thursday.

coreutils snapshot:
http://pixelbeat.org/cu/coreutils-ss.tar.xz  5.1 MB
http://pixelbeat.org/cu/coreutils-ss.tar.xz.sig
http://pixelbeat.org/cu/coreutils-8.20.119-54cdb0.tar.xz

changes since snapshot 8.20.113-1f1f4:

Benno Schulenberg (1):
   doc: standardize helptext of numfmt and slice into single options

Bernhard Voelker (1):
   maint: avoid running check-root tests in gnulib

Pádraig Brady (4):
   tests: skip numfmt grouping tests on some systems
   tests: tail-2/inotify-rotate: fix a false failure on NFS
   maint: consolidate developer debug messages
   doc: improve the numfmt man page format


After lots of `make checks` ...

All tests passed on these GNU/Linux systems:

Intel Pentium 4 (2660 MHz); GNU/Linux 3.6.8-2.fc17.i686.PAE (Fedora release 
17 (Beefy Miracle))
AMD64 Opteron 850, 8GB RAM; GNU/Linux Red Hat Enterprise Linux 5.8 (Tikanga)
AMD64 Opteron, 8GB RAM; Red Hat Enterprise Linux AS release 6.3 (Santiago)
AMD64 Opteron 2220, 24GB RAM; Ubuntu 9.10 (karmic)
Dell PowerEdge 3250: Intel Itanium-2 (1400 MHz) (2 CPUs, 4GB RAM); GNU/Linux 
2.6.18-194.el5 (Red Hat Enterprise Linux Server release 5.5 (Tikanga))
Sun Blade 1500 (1062 MHz TI UltraSparc IIIi (Jalapeno), 1GB RAM);   
GNU/Linux 3.2.1-gentoo-r2 (Gentoo 2.0.3)
DEC Alpha 4100-5/466 (4 21164 EV5 CPUs, 466 MHz, 2GB RAM);  GNU/Linux 
2.6.34-gentoo-r1 (Gentoo Base System release 2.0.3)
Apple PowerMac G5 (4 2500 MHz PPC970MP CPUs, 8GB RAM); GNU/Linux 
2.6.39-gentoo-r3 (Gentoo Base System release 2.0.3)
Apple PowerMac G4 (2 500 MHz PowerPC 7400 CPUs, 256MB RAM);GNU/Linux 
2.6.39-gentoo-r3 (Gentoo Base System version 2.0.3)


I drilled a bit deeper into these other GNU/Linux systems:

GNU/Linux on power7 (ppc64)
 coreutils
  442 passed
   96 skipped
 gnulib
  307 passed
   10 skipped

GNU/Linux on niagra (sparc64)
 coreutils
  419 passed
  119 skipped
 gnulib
  283 passed
   34 skipped

GNU/Linux on parisc
 coreutils
  420 passed
  118 skipped
 gnulib
  hung at test-lock

GNU/Linux on mips64
 coreutils
  422 passed
  116 skipped
 gnulib
  287 passed
   30 skipped


Solaris 10 is looking fairly good too:

Sun Ultra Enterprise 2900 (4 dual/core CPUs, 1050 MHz UltraSPARC-IV, 16GB); 
Solaris 10

I tried another similar system but running from /tmp
 coreutils
  398 passed
8 failed
  All due to cp -a giving errno 89 on dirs on tmpfs
   src/df --o=fstype,source,target .
  Type  Filesystem Mounted on
  tmpfs swap   /tmp
   mkdir dir
   src/cp -a dir dir2
  src/cp: preserving permissions for 'dir2': Operation not applicable
  132 skipped

However on this system I got a link failure:
 CC: Sun C++ 5.10 SunOS_sparc 128228-11 2010/10/14
  link failure
Undefined symbol dev_debug in src/chroot.o
I guess this will happen on linkers that don't ignore unused functions.
So I'll apply the *attached patch* as a workaround.


BSD isn't too bad either:

AMD64 Opteron, 8GB RAM); FreeBSD 8.1-RELEASE
  FAIL: tests/install/install-C.sh
  FAIL: tests/cp/nfs-removal-race.sh

AMD64 Opteron, 8GB RAM); OpenBSD 5.1 GENERIC#160 i386
  FAIL: tests/misc/sort-compress.sh
src/seq -w 2000 | src/tac  in
src/sort -S 1k --compress-program=gzip in # slow but ok
PATH=.:$PATH src/sort -S 1k --compress-program=gzip
  src/sort: read failed: /tmp/sortDWKaGM: Interrupted system call
  FAIL: tests/install/install-C.sh
  FAIL: tests/cp/nfs-removal-race.sh
Maybe due to nfs issues as tests done on nfs
  FAIL: tests/du/threshold.sh
The du/threshold.sh failure is new and should be
addressed by the *attached patch*.
  FAIL: tests/ls/abmon-align.sh
This due to:
  LANG=fr_FR src/wc
  src/wc:/usr/local/lib/libintl.so.6.0: undefined symbol 
'libiconv_set_relocation_prefix'
  lazy binding failed!
  Segmentation fault (core dumped)

So then on to build failures. I don't think there is anything new
at issue below, so I don't see these as release blockers...


This failure seemed intermittent, on both Fedora 17 and RHEL 5.8.
More investigation needed:
  lib/getfilecon.c, line 36: warning: undefined or missing type for: 
security_context_t

CC: Sun C++ 5.11 SunOS_i386 2010/08/13
  CC lib/backupfile.o
lib/xalloc.h, line 217: reference to static identifier xnmalloc in 
extern inline function
c99: acomp failed for lib/backupfile.c

cc (GCC) 4.4.6 20120305 (Red Hat 4.4.6-4)
  CC lib/set-mode-acl.o
  In file included from ./lib/time.h:39:0, from ./lib/sys/stat.h:44,
   from lib/acl.h:21, from lib/set-mode-acl.c:24:
  /usr/include/time.h:226:5: error: unknown type name '__locale_t'
  In file included from ./lib/time.h:367:0, from ./lib/sys/stat.h:44,
   from lib/acl.h:21, from lib/set-mode-acl.c:24:
  ./lib/sys/time.h:378:8: error: redefinition of 'struct timeval'
 

Re: new snapshot available: coreutils-8.20.119-54cdb0

2013-02-13 Thread Jim Meyering
Pádraig Brady wrote:
 On 02/11/2013 11:55 AM, Pádraig Brady wrote:
 This is another snapshot mainly to roll up translations.
 We plan to release coreutils 8.21 this Thursday.
...
 Date: Thu, 14 Feb 2013 02:32:22 +
 Subject: [PATCH] build: avoid link failure in devmsg() on older linkers

 On linkers that don't remove unused functions,
 there will be a reference to a missing dev_debug symbol
 in the devmsg() function.  So for now ...

 * src/system.h: ... move devmsg() from here ...
 * src/numfmt.c: ... to here, and document future cleanup.
 * src/factor.c: Likewise.
 ---
  src/factor.c |   18 +-
  src/numfmt.c |   21 ++---
  src/system.h |   15 ---
  3 files changed, 35 insertions(+), 19 deletions(-)
...
 Date: Thu, 14 Feb 2013 04:27:34 +
 Subject: [PATCH] tests: avoid non portable sed use of \t

 * tests/du/threshold.sh: use `cut` rather than
 sed to avoid using the non portable \t which
 fails on sed on openbsd 5 at least.
 Also remove a redundant call to `tr` and avoid
 explicit setting of LANG=C which is done globally.
 ---
  tests/du/threshold.sh |4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)

Nice, very thorough testing.
Those patch look fine.  Thanks!



Re: new snapshot available: coreutils-8.20.119-54cdb0

2013-02-12 Thread Pádraig Brady

On 02/12/2013 04:45 AM, Assaf Gordon wrote:

On Feb 11, 2013, at 20:32, Pádraig Brady p...@draigbrady.com wrote:


On 02/11/2013 08:47 PM, Assaf Gordon wrote:

-  if (errno != 0)
+  /* EINVAL can happen if 'base' is invalid (hardcoded as 10, so can't happen),
+ or if no conversion was performed (on some platforms). Ignore  continue
+ if no conversion was performed */
+  if (errno != 0  (errno != EINVAL))


It might be better to do:

if (errno == ERANGE)
  error ();

In any case thanks for the fix.
Pádraig.


I was thinking about that, my only concern was since we're already dealing with 
non-standard code, should we worry about an even weirder implementation that 
might return something that's not ERANGE and not EINVAL?


The error message is just about ERANGE, so it's probably
best to use just that value in the conditional.
Reading the docs, EINVAL is the only other possibility.

thanks,
Pádraig.



Re: new snapshot available: coreutils-8.20.119-54cdb0

2013-02-11 Thread Assaf Gordon
Follow-up:

Assaf Gordon wrote, On 02/11/2013 12:27 PM:
 Strange failure with numfmt on an eccentric system (Mac OS X 10.6.8): some 
 errors are not reported correctly.
 
 [ ... ]
 
 In the source code, it seems to be related to this part, in 
 parse_format_string(), line 972:
  970   i += strspn (fmt + i,  );
  971   errno = 0;
  972   pad = strtol (fmt + i, endptr, 10);
  973   if (errno != 0) 
  974 error (EXIT_FAILURE, 0,
  975_(invalid format %s (width overflow)), quote (fmt));
  976
 
 On this system (Mac OS X):
fmt = 'hello%'
i = 6
fmt+i = ''
 
 And 'strtol' returns errno=EINVAL (22) instead of 0 - causing the incorrect 
 error message.
 

This is likely the reason, 'man strtol' has this to say (on this computer):
===
  ERRORS
 [EINVAL]   The value of base is not supported or no conversion
could be performed (the last feature is not portable
across all platforms).
===

Would it be better to explicitly check for this case, or replace with xstrtol ?

-gordon



Re: new snapshot available: coreutils-8.20.119-54cdb0

2013-02-11 Thread Assaf Gordon
Assaf Gordon wrote, On 02/11/2013 12:35 PM:
 
 Assaf Gordon wrote, On 02/11/2013 12:27 PM:
 Strange failure with numfmt on an eccentric system (Mac OS X 10.6.8): some 
 errors are not reported correctly.

 [ ... ]


 And 'strtol' returns errno=EINVAL (22) instead of 0 - causing the incorrect 
 error message.


The attached patch fixes the problem (tested on Mac OS 10.6.8 and Debian/Linux 
3.2).

-gordon
From 68ff89d497fcaffe054f0ca619fd747db8fb4574 Mon Sep 17 00:00:00 2001
From: Assaf Gordon assafgor...@gmail.com
Date: Mon, 11 Feb 2013 15:39:42 -0500
Subject: [PATCH] numfmt: fix strtol() bug

src/numfmt.c: on some system, strtol() returns EINVAL if no conversion
was performed. Ignore and continue if so.
---
 src/numfmt.c |5 -
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/numfmt.c b/src/numfmt.c
index d87d8ef..6e7cf2f 100644
--- a/src/numfmt.c
+++ b/src/numfmt.c
@@ -970,7 +970,10 @@ parse_format_string (char const *fmt)
   i += strspn (fmt + i,  );
   errno = 0;
   pad = strtol (fmt + i, endptr, 10);
-  if (errno != 0)
+  /* EINVAL can happen if 'base' is invalid (hardcoded as 10, so can't happen),
+ or if no conversion was performed (on some platforms). Ignore  continue
+ if no conversion was performed */
+  if (errno != 0  (errno != EINVAL))
 error (EXIT_FAILURE, 0,
_(invalid format %s (width overflow)), quote (fmt));
 
-- 
1.7.7.4