AW: AW: AW: AW: AW: AW: new snapshot available: coreutils-7.4.125-eca6

2009-08-19 Thread Voelker, Bernhard
Jim Meyering wrote:

> Long-term, best for you would be to install GNU diffutils.

done:


===
   GNU coreutils 7.4.127-d2510: tests/test-suite.log   
===

1 of 1 test failed.  

.. contents:: :depth: 2


FAIL: install/install-C (exit: 1)
=

+ ginstall --version
install (GNU coreutils) 7.4.127-d2510
Copyright (C) 2009 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 David MacKenzie.
+ . ./test-lib.sh
++ unset function_test
++ eval 'function_test() { return 11; }; function_test'
+++ function_test
+++ return 11
++ test 11 '!=' 11
+++ pwd
++ test_dir_=/vol1/home1/ecs2/depot/coreutils-7.4.127-d2510/tests
+++ this_test_
+++ echo ././install/install-C
+++ sed 's,.*/,,'
++ this_test=install-C
+++ /vol1/home1/ecs2/depot/coreutils-7.4.127-d2510/src/mktemp -d
--tmp=/vol1/home1/ecs2/depot/coreutils-7.4.127-d2510/tests
cu-install-C.XX
++
t_=/vol1/home1/ecs2/depot/coreutils-7.4.127-d2510/tests/cu-install-C.zJ5
O9yijiw
++ trap remove_tmp_ 0
++ trap 'Exit $?' 1 2 13 15
++ cd
/vol1/home1/ecs2/depot/coreutils-7.4.127-d2510/tests/cu-install-C.zJ5O9y
ijiw
++ diff --version
++ grep GNU
+ skip_if_setgid_
+ setgid_tmpdir=setgid-3612
+ umask 77
+ mkdir setgid-3612
++ stat --printf %A setgid-3612
+ perms=drwx--
+ rmdir setgid-3612
+ case $perms in
+ mode1=0644
+ mode2=0755
+ mode3=2755
+ fail=0
+ echo test
+ echo '`a'\'' -> `b'\'''
+ echo 'removed `b'\''
`a'\'' -> `b'\'''
+ ginstall -Cv -m0644 a b
+ compare out out_installed_first
+ diff -u out out_installed_first
+ ginstall -Cv -m0644 a b
+ compare out out_empty
+ diff -u out out_empty
+ ginstall -v --compare -m0644 a b
+ compare out out_empty
+ diff -u out out_empty
+ ginstall -v -m0644 a b
+ compare out out_installed_second
+ diff -u out out_installed_second
+ ginstall -Cv -m2755 a b
+ compare out out_installed_second
+ diff -u out out_installed_second
+ ginstall -Cv -m2755 a b
+ compare out out_installed_second
+ diff -u out out_installed_second
--- out 2009-08-19 12:43:25.668663000 +0200
+++ out_installed_second2009-08-19 12:43:25.61945 +0200
@@ -0,0 +1,2 @@
+removed `b'
+`a' -> `b'
+ fail=1
+ ln -s a c
+ ln -s b d
+ ginstall -Cv -m0644 c d
+ echo 'removed `d'\''
`c'\'' -> `d'\'''
+ compare out out_installed_second_cd
+ diff -u out out_installed_second_cd
+ echo test1
+ ginstall -Cv -m0644 a b
+ compare out out_installed_second
+ diff -u out out_installed_second
+ ginstall -Cv -m0644 a b
+ compare out out_empty
+ diff -u out out_empty
+ echo test2
+ ginstall -Cv -m0644 a b
+ compare out out_installed_second
+ diff -u out out_installed_second
+ ginstall -Cv -m0644 a b
+ compare out out_empty
+ diff -u out out_empty
+ ginstall -Cv -m0755 a b
+ compare out out_installed_second
+ diff -u out out_installed_second
+ ginstall -Cv -m0755 a b
+ compare out out_empty
+ diff -u out out_empty
+ ginstall -C --preserve-timestamps a b
ginstall: options --compare (-C) and --preserve-timestamps are mutually
exclusive
Try `ginstall --help' for more information.
+ ginstall -C --strip --strip-program=echo a b
ginstall: options --compare (-C) and --strip are mutually exclusive
Try `ginstall --help' for more information.
+ Exit 1
+ set +e
+ exit 1
+ exit 1
+ remove_tmp_
+ __st=1
+ cleanup_
+ :
+ cd /vol1/home1/ecs2/depot/coreutils-7.4.127-d2510/tests
+ chmod -R u+rwx
/vol1/home1/ecs2/depot/coreutils-7.4.127-d2510/tests/cu-install-C.zJ5O9y
ijiw
+ rm -rf
/vol1/home1/ecs2/depot/coreutils-7.4.127-d2510/tests/cu-install-C.zJ5O9y
ijiw
+ exit 1




AW: AW: AW: AW: AW: AW: new snapshot available: coreutils-7.4.125-eca6

2009-08-19 Thread Voelker, Bernhard
Jim Meyering wrote:

> The *second* time that command is run, it appears to print nothing.
> 
> Do this in src/:
> 
> ./touch a b; mode3=2755
> ./ginstall -Cv -m$mode3 a b
> ./ginstall -Cv -m$mode3 a b

Bingo!

> If the second invocation of ginstall doesn't print anything,
> that indicates a problem and is why the test is failing.
> In that case, if you can step through it in gdb, that'd be nice.

no gdb here, sorry ;-(

> Otherwise, run it under truss:
>
> truss -o log ./ginstall -Cv -m$mode3 a b
> 
> and send the resulting "log" file.

here u are - hope that helps on this long search
(thanx for your patience BTW):

execve("ginstall", 0xFFBFFB84, 0xFFBFFB9C)  argc = 5
resolvepath("/usr/lib/ld.so.1", "/lib/ld.so.1", 1023) = 12
getcwd("/vol1/home1/ecs2/depot/coreutils-7.4.127-d2510/src", 1014) = 0
resolvepath("/vol1/home1/ecs2/depot/coreutils-7.4.127-d2510/src/ginstall
", "/vol1/home1/ecs2/depot/coreutils-7.4.127-d2510/src/ginstall", 1023)
= 59
stat("/vol1/home1/ecs2/depot/coreutils-7.4.127-d2510/src/ginstall",
0xFFBFF960) = 0
open("/var/ld/ld.config", O_RDONLY) Err#2 ENOENT
stat("/lib/libgen.so.1", 0xFFBFF418)= 0
resolvepath("/lib/libgen.so.1", "/lib/libgen.so.1", 1023) = 16
open("/lib/libgen.so.1", O_RDONLY)  = 3
mmap(0x0001, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_ALIGN, 3,
0) = 0xFF3A
mmap(0x0001, 98304, PROT_NONE,
MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFF38
mmap(0xFF38, 22089, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 3, 0) = 0xFF38
mmap(0xFF396000, 2303, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 3, 24576) = 0xFF396000
munmap(0xFF386000, 65536)   = 0
memcntl(0xFF38, 5656, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3)= 0
stat("/lib/libsec.so.1", 0xFFBFF418)= 0
resolvepath("/lib/libsec.so.1", "/lib/libsec.so.1", 1023) = 16
open("/lib/libsec.so.1", O_RDONLY)  = 3
mmap(0xFF3A, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3,
0) = 0xFF3A
mmap(0x0001, 147456, PROT_NONE,
MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFF35
mmap(0xFF35, 56009, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 3, 0) = 0xFF35
mmap(0xFF36E000, 13477, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 3, 57344) = 0xFF36E000
mmap(0xFF372000, 5744, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_ANON, -1, 0) = 0xFF372000
munmap(0xFF35E000, 65536)   = 0
memcntl(0xFF35, 14220, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3)= 0
stat("/lib/libc.so.1", 0xFFBFF418)  = 0
resolvepath("/lib/libc.so.1", "/lib/libc.so.1", 1023) = 14
open("/lib/libc.so.1", O_RDONLY)= 3
mmap(0xFF3A, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3,
0) = 0xFF3A
mmap(0x0001, 1015808, PROT_NONE,
MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFF20
mmap(0xFF20, 905381, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 3, 0) = 0xFF20
mmap(0xFF2EE000, 32401, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 3, 909312) = 0xFF2EE000
mmap(0xFF2F6000, 6368, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_ANON, -1, 0) = 0xFF2F6000
munmap(0xFF2DE000, 65536)   = 0
mmap(0x, 8192, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFF34
memcntl(0xFF20, 144020, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3)= 0
stat("/lib/libavl.so.1", 0xFFBFF418)= 0
resolvepath("/lib/libavl.so.1", "/lib/libavl.so.1", 1023) = 16
open("/lib/libavl.so.1", O_RDONLY)  = 3
mmap(0xFF3A, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3,
0) = 0xFF3A
mmap(0x0001, 81920, PROT_NONE,
MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFF32
mmap(0xFF32, 3260, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 3, 0) = 0xFF32
mmap(0xFF332000, 296, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 3, 8192) = 0xFF332000
munmap(0xFF322000, 65536)   = 0
memcntl(0xFF32, 1096, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3)= 0
mmap(0x0001, 24576, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFF31
munmap(0xFF3A, 32768)   = 0
getcontext(0xFFBFF650)
getrlimit(RLIMIT_STACK, 0xFFBFF630) = 0
getpid()= 26801 [26800]
setustack(0xFF312A88)
brk(0x000655B0) = 0
brk(0x000675B0) = 0
stat("/platform/SUNW,SPARC-Enterprise/lib/libc_psr.so.1", 0xFFBFEF78) =
0
resolvepath("/platform/SUNW,SPARC-Enterprise/lib/libc_psr.so.1",
"/platform/sun4u-opl/lib/libc_psr.so.1", 1023) = 37
open("/platform/SUNW,SPARC

Re: AW: AW: AW: AW: AW: AW: new snapshot available: coreutils-7.4.125-eca6

2009-08-19 Thread Jim Meyering
Voelker, Bernhard wrote:

> Jim Meyering wrote:
>
>> The *second* time that command is run, it appears to print nothing.
>>
>> Do this in src/:
>>
>> ./touch a b; mode3=2755
>> ./ginstall -Cv -m$mode3 a b
>> ./ginstall -Cv -m$mode3 a b
>
> Bingo!
>
>> If the second invocation of ginstall doesn't print anything,
>> that indicates a problem and is why the test is failing.
>> In that case, if you can step through it in gdb, that'd be nice.
>
> no gdb here, sorry ;-(
>
>> Otherwise, run it under truss:
>>
>> truss -o log ./ginstall -Cv -m$mode3 a b
>>
>> and send the resulting "log" file.
>
> here u are - hope that helps on this long search
> (thanx for your patience BTW):
>
...
> getppriv(PRIV_EFFECTIVE, {000400038800}) = 0
> umask(0)= 027
> stat64("b", 0xFFBFF8F8) = 0
> lstat64("a", 0xFFBFF7A0)= 0
> lstat64("b", 0xFFBFF708)= 0
> getuid()= 26425 [26425]
> getgid()= 17307 [17307]
> open64("a", O_RDONLY)   = 3
> open64("b", O_RDONLY)   = 4
> read(3, 0x00063088, 4096)   = 0
> close(3)= 0
> close(4)= 0
> chmod("b", 02755)   = 0
> llseek(0, 0, SEEK_CUR)  = 7984
> close(0)= 0
> close(1)= 0
> close(2)= 0
> _exit(0)

I'm beginning to think there's a fundamental problem with your system.
Here's the comparable part of truss output on a working Solaris 10 system:

getppriv(PRIV_EFFECTIVE, {000400038800}) = 0
umask(0)= 022
stat64("b", 0xFFBFFB08) = 0
brk(0x0003AE60) = 0
brk(0x0003CE60) = 0
fcntl(1, F_GETFL)   = 8194
fstat64(2, 0xFFBFEB38)  = 0
write(2, " . / g i n s t a l l", 10)= 10
write(2, " :  ", 2) = 2
write(2, " t h e   - - c o m p a r".., 85)  = 85
write(2, "\n", 1)   = 1
stat64("a", 0xFFBFF720) = 0
lstat64("b", 0xFFBFF688)= 0
unlink("b") = 0
ioctl(1, TCGETA, 0xFFBFE614)= 0
fstat64(1, 0xFFBFE530)  = 0
write(1, " r e m o v e d   ` b '\n", 12)= 12
write(1, " ` a '   - >   ` b '\n", 11)  = 11
open64("a", O_RDONLY)   = 3
fstat64(3, 0xFFBFF550)  = 0
open64("b", O_WRONLY|O_CREAT|O_EXCL, 0644)  = 4
fstat64(4, 0xFFBFF5E8)  = 0
sysconfig(_CONFIG_PAGESIZE) = 8192
brk(0x0003CE60) = 0
brk(0x00046E60) = 0
read(3, 0x0003E000, 32768)  = 0
brk(0x00046E60) = 0
brk(0x00048E60) = 0
fstat64(4, 0xFFBFF200)  = 0
fpathconf(4, 20)= 0
facl(4, SETACL, 4, 0x00046F28)  Err#89 ENOSYS
fchmod(4, 0600) = 0
close(4)= 0
close(3)= 0
chmod("b", 02755)   = 0
llseek(0, 0, SEEK_CUR)  = 365471
close(0)= 0
close(1)= 0
close(2)= 0
_exit(0)

The simple fact that your run somehow fails to output the
diagnostic from install.c:

./ginstall: the --compare (-C) option is ignored when you specify a mode 
with non-permission bits

says something is very wrong.

Remember, you did not compile with gcc.

Unless someone can suggest an alternative explanation,
I'll have to assume this is not a problem with coreutils.




AW: AW: AW: AW: AW: AW: AW: new snapshot available: coreutils-7.4.125-eca6

2009-08-19 Thread Voelker, Bernhard
Jim Meyering wrote
> I'm beginning to think there's a fundamental problem with your system.
> Here's the comparable part of truss output on a working Solaris 10
system:
...
> Remember, you did not compile with gcc.
> 
> Unless someone can suggest an alternative explanation,
> I'll have to assume this is not a problem with coreutils.

I got one last input for this case:

  CC ginstall-install.o
"install.c", line 191: warning: initializer does not fit or is out of
range: -61952

Code:

 187 /* Return true for mode with non-permission bits. */
 188 static bool
 189 extra_mode (mode_t input)
 190 {
 191   const mode_t mask = ~S_IRWXUGO & ~S_IFMT;
 192   return input & mask;
 193 }

This line is expanded to this code by the preprocessor:

  const mode_t mask = ~ ( 00700 | 00070 | 7 ) & ~ 0xF000 ;

mode_t is unsigned long on my system.

I added this test print:

  fprintf(stderr, "extra_mode(%ld) -> %ld\n", input, input & mask);

which leads to

  $ ./ginstall -Cv -m$mode3 a b
  extra_mode(1517) -> 1024
  extra_mode(1517) -> 1024
  extra_mode(33184) -> 0
  extra_mode(34285) -> 1024

Can this be the reason?

Have a nice day,
Berny




Re: AW: AW: AW: AW: AW: AW: AW: new snapshot available: coreutils-7.4.125-eca6

2009-08-20 Thread Jim Meyering
Voelker, Bernhard wrote:
> Jim Meyering wrote
>> I'm beginning to think there's a fundamental problem with your system.
>> Here's the comparable part of truss output on a working Solaris 10
> system:
> ...
>> Remember, you did not compile with gcc.
>>
>> Unless someone can suggest an alternative explanation,
>> I'll have to assume this is not a problem with coreutils.
>
> I got one last input for this case:
>
>   CC ginstall-install.o
> "install.c", line 191: warning: initializer does not fit or is out of
> range: -61952
>
> Code:
>
>  187 /* Return true for mode with non-permission bits. */
>  188 static bool
>  189 extra_mode (mode_t input)
>  190 {
>  191   const mode_t mask = ~S_IRWXUGO & ~S_IFMT;
>  192   return input & mask;
>  193 }
>
> This line is expanded to this code by the preprocessor:
>
>   const mode_t mask = ~ ( 00700 | 00070 | 7 ) & ~ 0xF000 ;
>
> mode_t is unsigned long on my system.
>
> I added this test print:
>
>   fprintf(stderr, "extra_mode(%ld) -> %ld\n", input, input & mask);
>
> which leads to
>
>   $ ./ginstall -Cv -m$mode3 a b
>   extra_mode(1517) -> 1024
>   extra_mode(1517) -> 1024
>   extra_mode(33184) -> 0
>   extra_mode(34285) -> 1024
>
> Can this be the reason?

Thanks.
Those details have helped me see the light.
I suspect this patch works around your compiler's
inadequate "bool" support:

diff --git a/src/install.c b/src/install.c
index 73b3981..19efb1d 100644
--- a/src/install.c
+++ b/src/install.c
@@ -189,7 +189,7 @@ static bool
 extra_mode (mode_t input)
 {
   const mode_t mask = ~S_IRWXUGO & ~S_IFMT;
-  return input & mask;
+  return !! (input & mask);
 }

 /* Return true if copy of file SRC_NAME to file DEST_NAME is necessary. */




AW: AW: AW: AW: AW: AW: AW: AW: new snapshot available: coreutils-7.4.125-eca6

2009-08-20 Thread Voelker, Bernhard
Jim Meyering wrote:
> I suspect this patch works around your compiler's
> inadequate "bool" support:
> 
> diff --git a/src/install.c b/src/install.c
> index 73b3981..19efb1d 100644
> --- a/src/install.c
> +++ b/src/install.c
> @@ -189,7 +189,7 @@ static bool
>  extra_mode (mode_t input)
>  {
>const mode_t mask = ~S_IRWXUGO & ~S_IFMT;
> -  return input & mask;
> +  return !! (input & mask);
>  }
> 
>  /* Return true if copy of file SRC_NAME to file DEST_NAME is
necessary. */

perfect (output still incl. my fprintf):

  $ ./ginstall -Cv -m$mode3 a b
  extra_mode(1517) -> 1024
  ./ginstall: the --compare (-C) option is ignored when you specify a
mode with non-permission bits
  extra_mode(1517) -> 1024
  removed `b'
  `a' -> `b'

and `make TESTS='install/install-C' check`:

  PASS: install/install-C
  =
  1 test passed
  =

Thank you.