Re: [PATCH] ls: Use pretty UTF-8 arrow when showing where symlinks point to

2009-08-12 Thread Jim Meyering
Lennart Poettering wrote:
 [Second version of the patch, makes this feature optional with --fancy-chars]

 Diego Pettenò complained that ls -l doesn't use the UTF-8 arrow
 character to show where symlinks point to. This tiny patch fixes that.
 With this applied the character is used when the CODESET is UTF-8
 otherwise we fall back to the traditional - arrow.

 This is only enabled if --fancy-chars is passed as argument.

 Ah, ls -l is so much prettier now!

 For verification:

 http://pastie.org/573270

Thanks for the patch.
However, I'm inclined not to add the functionality even
via a separate option, because:

  - The bar for adding a new option to ls is very high;  you'd need
  more justification than someone complained or it's prettier, now.

  - It's easy to get nearly the same effect with a simple filter,
  as Pádraig suggested.  (of course, a naive filter fails if
  a file name contains  - , but the end result is solely for
  human consumption, not for mechanical parsing, so that's ok)

Just by the way, I compared your arrow and the one Pádraig
used in his example:

$ printf 'a - b\n'
a - b
$ printf 'a \xe2\x86\x92 b\n'
a → b
$ printf 'a \u25aa\u25b6 b\n'
a ▪▶ b

I found the 1-column-wide arrow to be disconcertingly similar to
a hyphen, when viewed via a 7-point (admittedly small) font in
a gnome-terminal.  Compare to underscore and hyphen:

$ printf 'a _\xe2\x86\x92- b\n'
a _→- b

As usual, if you come up with more justification, or many people
clamor for this option, we will revisit the decision.




Re: [PATCH] ls: Use pretty UTF-8 arrow when showing where symlinks point to

2009-08-12 Thread Pádraig Brady
Lennart Poettering wrote:
 On Tue, 11.08.09 22:27, Pádraig Brady (p...@draigbrady.com) wrote:
 
 this is equivalent I think:

static const char *arrow =  - ;
 #ifdef HAVE_NL_LANGINFO
if (fancy_chars  STREQ (nl_langinfo (CODESET), UTF-8))
  arrow =  \xe2\x86\x92 ;
 #endif
DIRED_FPUTS_LITERAL (arrow, stdout);
 
 You evaluate the whole expression on every iteration. The whole point
 of making this variable static is to make sure this isn't necessary.

Oh right, so something like:

static const char *arrow;
if (!arrow)
  {
if (fancy_chars  STREQ (locale_charset(), UTF-8))
  arrow =  \xe2\x86\x92 ;
else
  arrow =  - ;
  }
DIRED_FPUTS_LITERAL (arrow, stdout);

Note the use of locale_charset() from gnulib for portability.

cheers,
Pádraig.




Re: [PATCH] ls: Use pretty UTF-8 arrow when showing where symlinks point to

2009-08-12 Thread Pádraig Brady
Jim Meyering wrote:
 
   - It's easy to get nearly the same effect with a simple filter,
   as Pádraig suggested.  (of course, a naive filter fails if
   a file name contains  - , but the end result is solely for
   human consumption, not for mechanical parsing, so that's ok)
 
 Just by the way, I compared your arrow and the one Pádraig
 used in his example:
 
 $ printf 'a - b\n'
 a - b
 $ printf 'a \xe2\x86\x92 b\n'
 a → b
 $ printf 'a \u25aa\u25b6 b\n'
 a ▪▶ b

Just to address my OCD, the example alias I posted would not work
as somewhere along the line in pasting over a vnc session the
unicode characters were mangled. Also the previous alias didn't
precompute as much as it could, so:

alias lsf=ls -l --color | sed 's/ - / $(tput bold)▪▶$(tput sgr0) /'

cheers,
Pádraig.




no feedback on snapshot? coreutils-7.5 coming soon

2009-08-12 Thread Jim Meyering
AFAIK, I am the only one who has built the latest snapshot:

http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/17604

Though it's been only two days.

Unless I hear of new bug reports or portability problems soon,
expect coreutils-7.5 to be released in the next few days.




Re: [PATCH] ls: Use pretty UTF-8 arrow when showing where symlinks point to

2009-08-12 Thread Pádraig Brady
Pádraig Brady wrote:
 
 Oh right, so something like:
 
 static const char *arrow;
 if (!arrow)
   {
 if (fancy_chars  STREQ (locale_charset(), UTF-8))
   arrow =  \xe2\x86\x92 ;
 else
   arrow =  - ;
   }
 DIRED_FPUTS_LITERAL (arrow, stdout);
 
 Note the use of locale_charset() from gnulib for portability.

BTW I still don't think this patch should be applied,
as the benefit from the new option is not big enough,
and much the same affect can be achieved with a
little post processing as demonstrated.

cheers,
Pádraig.




Re: no feedback on snapshot? coreutils-7.5 coming soon

2009-08-12 Thread Erik Auerswald
Hi Jim,

On Wed, Aug 12, 2009 at 12:42:59PM +0200, Jim Meyering wrote:
 AFAIK, I am the only one who has built the latest snapshot:
 
 http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/17604
 
 Though it's been only two days.
 
 Unless I hear of new bug reports or portability problems soon,
 expect coreutils-7.5 to be released in the next few days.

FWIW I built it and ran the basic tests (make check) without any errors
on Debian GNU/Linux unstable. I don't have access to any other systems
or hardware architectures for more interesting testing.

Erik
-- 
To do the Unix philosophy right, you have to be loyal to excellence.
-- Eric S. Raymond




Re: no feedback on snapshot? coreutils-7.5 coming soon

2009-08-12 Thread Jim Meyering
Erik Auerswald wrote:
 Hi Jim,
 On Wed, Aug 12, 2009 at 12:42:59PM +0200, Jim Meyering wrote:
 AFAIK, I am the only one who has built the latest snapshot:

 http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/17604

 Though it's been only two days.

 Unless I hear of new bug reports or portability problems soon,
 expect coreutils-7.5 to be released in the next few days.

 FWIW I built it and ran the basic tests (make check) without any errors
 on Debian GNU/Linux unstable. I don't have access to any other systems
 or hardware architectures for more interesting testing.

Thanks.  Good feedback helps.




Re: no feedback on snapshot? coreutils-7.5 coming soon

2009-08-12 Thread Philip Rowlands

On Wed, 12 Aug 2009, Jim Meyering wrote:


AFAIK, I am the only one who has built the latest snapshot:

   http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/17604

Though it's been only two days.

Unless I hear of new bug reports or portability problems soon,
expect coreutils-7.5 to be released in the next few days.


./configure  make check

works for me, non-root, Ubuntu 8.04.
===
All 341 tests passed
(40 tests were not run)
===

and for completeness, the gnulib test results were
===
All 124 tests passed
(11 tests were not run)
===


Cheers,
Phil




Re: no feedback on snapshot? coreutils-7.5 coming soon

2009-08-12 Thread Pádraig Brady
Jim Meyering wrote:
 AFAIK, I am the only one who has built the latest snapshot:
 
 http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/17604
 
 Though it's been only two days.
 
 Unless I hear of new bug reports or portability problems soon,
 expect coreutils-7.5 to be released in the next few days.

checks pass on Fedora 11 and Ubuntu 7.10
2 failures on Fedora Core 5 due to copy::utimensat_if_possible() failing with:

$ (cd tests  make check TESTS=cp/abuse VERBOSE=yes)
cp: preserving times for `c/1': No such file or directory

$ (cd tests  make check TESTS=mv/part-symlink VERBOSE=yes)
mv: preserving times for `loc_reg': Too many levels of symbolic links





Re: new module: update-copyright [Re: copyright years: mass-update every January 1

2009-08-12 Thread Akim Demaille


Le 31 juil. 09 à 15:52, Joel E. Denny a écrit :

Hi Joel,


+# Format within margin.
+my $new_wrapped;
+my $text_margin = $margin - length($prefix);
+while (length($new))
+  {
+if (($new =~ s/^(.{1,$text_margin})(?: |$)//)
+|| ($new =~ s/^([\S]+)(?: |$)//))
+  {
+my $line = $1;
+$new_wrapped .= $new_wrapped ? \n : $leading;
+$new_wrapped .= $prefix$line;
+  }
+else
+  {
+# Should be unreachable, but we don't want an  
infinite

+# loop if it can be reached.
+die;
+  }
+  }


You might want to have a look at Text::Wrap.



Enhacement request - 'date' util

2009-08-12 Thread Alejandro Redondo
Good morning from Spain,first of all, thanks for your effort and for this rich
featured tools... awesome work!Secondly, to the quot;datequot; command
developers, it would be possible to develop the quot;-aquot; feature, like
other UNIXes distros do?Man from solaris 10:-a [-]sss.fffnbsp;nbsp; Slowly
adjust the timenbsp; bynbsp; sss.fffnbsp; seconds (fff represents fractions
of a second). This adjustment can be positive or negative.nbsp; The
system'snbsp; clocknbsp; isnbsp; spednbsp; up or slowed down untilnbsp;
itnbsp; has drifftednbsp; bynbsp; thenbsp; numbernbsp; of secondsnbsp;
specified.Man from hpux 11.23:-a [-]sss[.fff] Slowly adjust the time by
sss.fff seconds (fff represents fractions of a second).nbsp; This adjustment
can be positive or negative.nbsp; The system's clock will be sped up or
slowed down until it has drifted by the number of seconds specified.Really
useful feature to avoid crashes and dumps in apps like SAP or Oracle when
changing time is needed.Thanks for your time,sincerelyAlejandro Redondo.
_
This mail sent using V-webmail - http://www.v-webmail.org


Re: no feedback on snapshot? coreutils-7.5 coming soon

2009-08-12 Thread Jim Meyering
Pádraig Brady wrote:
 Jim Meyering wrote:
 AFAIK, I am the only one who has built the latest snapshot:

 http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/17604

 Though it's been only two days.

 Unless I hear of new bug reports or portability problems soon,
 expect coreutils-7.5 to be released in the next few days.

 checks pass on Fedora 11 and Ubuntu 7.10
 2 failures on Fedora Core 5 due to copy::utimensat_if_possible() failing with:

 $ (cd tests  make check TESTS=cp/abuse VERBOSE=yes)
 cp: preserving times for `c/1': No such file or directory

 $ (cd tests  make check TESTS=mv/part-symlink VERBOSE=yes)
 mv: preserving times for `loc_reg': Too many levels of symbolic links

Thanks for the testing and report!
Are these new failures?  If they are, it might be worth fixing.
Otherwise, FC5 is so old that I won't worry.




Re: no feedback on snapshot? coreutils-7.5 coming soon

2009-08-12 Thread Pádraig Brady
Jim Meyering wrote:
 
 Thanks for the testing and report!
 Are these new failures?  If they are, it might be worth fixing.
 Otherwise, FC5 is so old that I won't worry.
 

Reverting the symlink timestamp patch make the tests pass

$ wget -q -O- 'http://git.savannah.gnu.org/gitweb/'\
'?p=coreutils.git;a=patch;h=eae535e;hp=1762092' | patch -p1 -R
$ make
$ (cd tests  make check TESTS=cp/abuse VERBOSE=yes)
PASS: cp/abuse
$ (cd tests  make check TESTS=mv/part-symlink VERBOSE=yes)
PASS: mv/part-symlink

I've to run to a meeting now.

sorry,
Pádraig.




dd killed with USR1 right after ftruncate()

2009-08-12 Thread Voelker, Bernhard
Hi *,
 
short question:
is there a particular reason why the signal handlers are installed after 
ftruncate() in dd?
 
Long story:
I ran dd for a new backup of my 150GB partition to an external USB drive while 
I started
while kill -USR1 pid ; do sleep 30 ; done
in a separate terminal. The target file already existed and reflected a 
previous backup.
After a while, dd ended with the standard USR1 signal handler.
The only work done so far was to truncate the old output file.
So my guess was that installing the signal handler for SIGUSR1 is done after
the truncation. So I looked into the latest sources (coreutils-7.4) and found 
out
that my guess was right:
 
   if (ftruncate (STDOUT_FILENO, size) != 0)
 {
snipped /
 }
 }
#endif
  }
  install_signal_handlers ();
 
So why does ftruncate() before install_signal_handlers()?
 
Thank you  have a nice day,
Berny




Re: no feedback on snapshot? coreutils-7.5 coming soon

2009-08-12 Thread C de-Avillez
On Wed, 2009-08-12 at 14:54 +0200, Jim Meyering wrote:

 Are these new failures?  If they are, it might be worth fixing.
 Otherwise, FC5 is so old that I won't worry.


Sorry for the delay, got busy. I just built  make check, and got two
errors.

First one is here, I will re-run the second error by itself in a few.

Running on Ubuntu 9.10 (kernel 2.6.31.5 with Ubuntu mods, libc6
2.10.1-0ubuntu6).

Did not have time to dig in it. Sorry again.

hg...@xango2:/usr/src/buildd/coreutils-snapshot/coreutils-7.4.115-c9c92/tests $ 
make check TESTS=tail-2/pid VERBOSE=yes
make  check-TESTS
make[1]: Entering directory
`/usr/src/buildd/coreutils-snapshot/coreutils-7.4.115-c9c92/tests'
make[2]: Entering directory
`/usr/src/buildd/coreutils-snapshot/coreutils-7.4.115-c9c92/tests'
FAIL: tail-2/pid
===
   GNU coreutils 7.4.115-c9c92: tests/test-suite.log   
===

1 of 1 test failed.  

.. contents:: :depth: 2


FAIL: tail-2/pid (exit: 1)
==

+ tail --version
tail (GNU coreutils) 7.4.115-c9c92
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
http://gnu.org/licenses/gpl.html.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Paul Rubin, David MacKenzie, Ian Lance Taylor,
and Jim Meyering.
+ . ./test-lib.sh
++ unset function_test
++ eval 'function_test() { return 11; }; function_test'
+++ function_test
+++ return 11
++ test 11 '!=' 11
+++ pwd
++
test_dir_=/usr/src/buildd/coreutils-snapshot/coreutils-7.4.115-c9c92/tests
+++ this_test_
+++ echo ././tail-2/pid
+++ sed 's,.*/,,'
++ this_test=pid
+++ /usr/src/buildd/coreutils-snapshot/coreutils-7.4.115-c9c92/src/mktemp -d 
--tmp=/usr/src/buildd/coreutils-snapshot/coreutils-7.4.115-c9c92/tests 
cu-pid.XX
++
t_=/usr/src/buildd/coreutils-snapshot/coreutils-7.4.115-c9c92/tests/cu-pid.7WOIlLer56
++ trap remove_tmp_ 0
++ trap 'Exit $?' 1 2 13 15
++
cd 
/usr/src/buildd/coreutils-snapshot/coreutils-7.4.115-c9c92/tests/cu-pid.7WOIlLer56
++ diff --version
++ grep GNU
+ require_proc_pid_status_
+ sleep 2
+ local pid=6535
+ sleep .5
+ grep '^State:[ ]*[S]' /proc/6535/status
+ kill 6535
+ touch here
+ fail=0
+ tail -f here
+ bg_pid=6539
+ tail -s0.1 -f here --pid=6539
+ pid=6540
+ sleep 0.5
++ get_process_status_ 6540
++ sed -n '/^State:[ ]*\([[:alpha:]]\).*/s//\1/p' /proc/6540/status
sed: can't read /proc/6540/status: No such file or directory
+ state=
+ test -n ''
+ kill 6539
./tail-2/pid: line 54: kill: (6539) - No such process
+ sleep 0.5
++ get_process_status_ 6540
++ sed -n '/^State:[ ]*\([[:alpha:]]\).*/s//\1/p' /proc/6540/status
sed: can't read /proc/6540/status: No such file or directory
+ state=
+ test -n ''
+ getlimits_
++ getlimits
+ eval CHAR_MAX=127 CHAR_OFLOW=128 CHAR_MIN=-128 CHAR_UFLOW=-129
SCHAR_MAX=127 SCHAR_OFLOW=128 SCHAR_MIN=-128 SCHAR_UFLOW=-129
UCHAR_MAX=255 UCHAR_OFLOW=256 SHRT_MAX=32767 SHRT_OFLOW=32768
SHRT_MIN=-32768 SHRT_UFLOW=-32769 INT_MAX=2147483647
INT_OFLOW=2147483648 INT_MIN=-2147483648 INT_UFLOW=-2147483649
UINT_MAX=4294967295 UINT_OFLOW=4294967296 LONG_MAX=9223372036854775807
LONG_OFLOW=9223372036854775808 LONG_MIN=-9223372036854775808
LONG_UFLOW=-9223372036854775809 ULONG_MAX=18446744073709551615
ULONG_OFLOW=18446744073709551616 SIZE_MAX=18446744073709551615
SIZE_OFLOW=18446744073709551616 SSIZE_MAX=9223372036854775807
SSIZE_OFLOW=9223372036854775808 SSIZE_MIN=-9223372036854775808
SSIZE_UFLOW=-9223372036854775809 TIME_T_MAX=9223372036854775807
TIME_T_OFLOW=9223372036854775808 TIME_T_MIN=-9223372036854775808
TIME_T_UFLOW=-9223372036854775809 UID_T_MAX=4294967295
UID_T_OFLOW=4294967296 GID_T_MAX=4294967295 GID_T_OFLOW=4294967296
PID_T_MAX=2147483647 PID_T_OFLOW=2147483648 PID_T_MIN=-2147483648
PID_T_UFLOW=-2147483649 OFF_T_MAX=9223372036854775807
OFF_T_OFLOW=9223372036854775808 OFF_T_MIN=-9223372036854775808
OFF_T_UFLOW=-9223372036854775809 INTMAX_MAX=9223372036854775807
INTMAX_OFLOW=9223372036854775808 INTMAX_MIN=-9223372036854775808
INTMAX_UFLOW=-9223372036854775809 UINTMAX_MAX=18446744073709551615
UINTMAX_OFLOW=18446744073709551616
++ CHAR_MAX=127
++ CHAR_OFLOW=128
++ CHAR_MIN=-128
++ CHAR_UFLOW=-129
++ SCHAR_MAX=127
++ SCHAR_OFLOW=128
++ SCHAR_MIN=-128
++ SCHAR_UFLOW=-129
++ UCHAR_MAX=255
++ UCHAR_OFLOW=256
++ SHRT_MAX=32767
++ SHRT_OFLOW=32768
++ SHRT_MIN=-32768
++ SHRT_UFLOW=-32769
++ INT_MAX=2147483647
++ INT_OFLOW=2147483648
++ INT_MIN=-2147483648
++ INT_UFLOW=-2147483649
++ UINT_MAX=4294967295
++ UINT_OFLOW=4294967296
++ LONG_MAX=9223372036854775807
++ LONG_OFLOW=9223372036854775808
++ LONG_MIN=-9223372036854775808
++ LONG_UFLOW=-9223372036854775809
++ ULONG_MAX=18446744073709551615
++ ULONG_OFLOW=18446744073709551616
++ SIZE_MAX=18446744073709551615
++ SIZE_OFLOW=18446744073709551616
++ SSIZE_MAX=9223372036854775807
++ SSIZE_OFLOW=9223372036854775808
++ 

Re: Enhacement request - 'date' util

2009-08-12 Thread Matthew Woehlke
Please use newlines and don't use HTML entities in text mail (or don't 
send HTML, if that was the problem).


Your original mail looked like this:

Good morning from Spain,first of all, thanks for your effort and for this rich
featured tools... awesome work!Secondly, to the quot;datequot; command
developers, it would be possible to develop the quot;-aquot; feature, like


It is extremely difficult to read this block of text that has no 
newlines except where line wrapping occurred, is missing spaces between 
paragraphs, and is strewn with HTML entities.


I have reformatted the relevant parts so that it is legible.

Alejandro Redondo wrote:

Secondly, to the date command developers, it would be possible to
develop the -a feature, like other UNIXes distros do?

Man from solaris 10:
-a [-]sss.fff   Slowly adjust the time by sss.fff seconds (fff
represents fractions of a second). This adjustment can be positive or
negative.  The system's clock is sped up or slowed down until it has
drifted by the number of seconds specified.

Man from hpux 11.23:
[snipped; same as above]

Really useful feature to avoid crashes and dumps in apps like SAP or
Oracle when changing time is needed.


While that does indeed sound like an interesting option, and there is 
precedent of other OS's having it, I am curious why you don't just use ntpd?


--
Matthew
Please do not quote my e-mail address unobfuscated in message bodies.
--
ESIG: .sig file not available




Re: no feedback on snapshot? coreutils-7.5 coming soon

2009-08-12 Thread Pádraig Brady
C de-Avillez wrote:
 
 Sorry for the delay, got busy. I just built  make check, and got two
 errors.
 
 First one is here, I will re-run the second error by itself in a few.
 
 Running on Ubuntu 9.10 (kernel 2.6.31.5 with Ubuntu mods, libc6
 2.10.1-0ubuntu6).
 
 FAIL: tail-2/pid

 + tail --pid=2147483647 -f /dev/null
 + fail=1

 + timeout 1 tail -s.1 -f /dev/null --pid=2147483647
 + test 1 = 124

So tail silently returns with 1 immediately.
The only way I can see this happening is in tail_forever_inotify() at:

  if (follow_mode == Follow_descriptor  !found_watchable)
return;

We should probably issue an error() at that point in any case.

I'd better try and pay attention in this meeting ;)

cheers,
Pádraig.





Re: no feedback on snapshot? coreutils-7.5 coming soon

2009-08-12 Thread C de-Avillez
On Wed, 2009-08-12 at 17:15 +0100, Pádraig Brady wrote:

 I'd better try and pay attention in this meeting ;)

Heh. Please let me help you get distracted ;-)

Second error, also on tail:


FAIL: tail-2/pid (exit: 1)
==

+ tail --version
tail (GNU coreutils) 7.4.115-c9c92
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
http://gnu.org/licenses/gpl.html.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Paul Rubin, David MacKenzie, Ian Lance Taylor,
and Jim Meyering.
+ . ./test-lib.sh
++ unset function_test
++ eval 'function_test() { return 11; }; function_test'
+++ function_test
+++ return 11
++ test 11 '!=' 11
+++ pwd
++
test_dir_=/usr/src/buildd/coreutils-snapshot/coreutils-7.4.115-c9c92/tests
+++ this_test_
+++ echo ././tail-2/pid
+++ sed 's,.*/,,'
++ this_test=pid
+++ /usr/src/buildd/coreutils-snapshot/coreutils-7.4.115-c9c92/src/mktemp -d 
--tmp=/usr/src/buildd/coreutils-snapshot/coreutils-7.4.115-c9c92/tests 
cu-pid.XX
++
t_=/usr/src/buildd/coreutils-snapshot/coreutils-7.4.115-c9c92/tests/cu-pid.By9pH2douA
++ trap remove_tmp_ 0
++ trap 'Exit $?' 1 2 13 15
++
cd 
/usr/src/buildd/coreutils-snapshot/coreutils-7.4.115-c9c92/tests/cu-pid.By9pH2douA
++ diff --version
++ grep GNU
+ require_proc_pid_status_
+ sleep 2
+ local pid=22028
+ sleep .5
+ grep '^State:[ ]*[S]' /proc/22028/status
+ kill 22028
+ touch here
+ fail=0
+ bg_pid=22032
+ tail -f here
+ tail -s0.1 -f here --pid=22032
+ pid=22033
+ sleep 0.5
++ get_process_status_ 22033
++ sed -n '/^State:[ ]*\([[:alpha:]]\).*/s//\1/p' /proc/22033/status
sed: can't read /proc/22033/status: No such file or directory
+ state=
+ test -n ''
+ kill 22032
./tail-2/pid: line 54: kill: (22032) - No such process
+ sleep 0.5
++ get_process_status_ 22033
++ sed -n '/^State:[ ]*\([[:alpha:]]\).*/s//\1/p' /proc/22033/status
sed: can't read /proc/22033/status: No such file or directory
+ state=
+ test -n ''
+ getlimits_
++ getlimits
+ eval CHAR_MAX=127 CHAR_OFLOW=128 CHAR_MIN=-128 CHAR_UFLOW=-129
SCHAR_MAX=127 SCHAR_OFLOW=128 SCHAR_MIN=-128 SCHAR_UFLOW=-129
UCHAR_MAX=255 UCHAR_OFLOW=256 SHRT_MAX=32767 SHRT_OFLOW=32768
SHRT_MIN=-32768 SHRT_UFLOW=-32769 INT_MAX=2147483647
INT_OFLOW=2147483648 INT_MIN=-2147483648 INT_UFLOW=-2147483649
UINT_MAX=4294967295 UINT_OFLOW=4294967296 LONG_MAX=9223372036854775807
LONG_OFLOW=9223372036854775808 LONG_MIN=-9223372036854775808
LONG_UFLOW=-9223372036854775809 ULONG_MAX=18446744073709551615
ULONG_OFLOW=18446744073709551616 SIZE_MAX=18446744073709551615
SIZE_OFLOW=18446744073709551616 SSIZE_MAX=9223372036854775807
SSIZE_OFLOW=9223372036854775808 SSIZE_MIN=-9223372036854775808
SSIZE_UFLOW=-9223372036854775809 TIME_T_MAX=9223372036854775807
TIME_T_OFLOW=9223372036854775808 TIME_T_MIN=-9223372036854775808
TIME_T_UFLOW=-9223372036854775809 UID_T_MAX=4294967295
UID_T_OFLOW=4294967296 GID_T_MAX=4294967295 GID_T_OFLOW=4294967296
PID_T_MAX=2147483647 PID_T_OFLOW=2147483648 PID_T_MIN=-2147483648
PID_T_UFLOW=-2147483649 OFF_T_MAX=9223372036854775807
OFF_T_OFLOW=9223372036854775808 OFF_T_MIN=-9223372036854775808
OFF_T_UFLOW=-9223372036854775809 INTMAX_MAX=9223372036854775807
INTMAX_OFLOW=9223372036854775808 INTMAX_MIN=-9223372036854775808
INTMAX_UFLOW=-9223372036854775809 UINTMAX_MAX=18446744073709551615
UINTMAX_OFLOW=18446744073709551616
++ CHAR_MAX=127
++ CHAR_OFLOW=128
++ CHAR_MIN=-128
++ CHAR_UFLOW=-129
++ SCHAR_MAX=127
++ SCHAR_OFLOW=128
++ SCHAR_MIN=-128
++ SCHAR_UFLOW=-129
++ UCHAR_MAX=255
++ UCHAR_OFLOW=256
++ SHRT_MAX=32767
++ SHRT_OFLOW=32768
++ SHRT_MIN=-32768
++ SHRT_UFLOW=-32769
++ INT_MAX=2147483647
++ INT_OFLOW=2147483648
++ INT_MIN=-2147483648
++ INT_UFLOW=-2147483649
++ UINT_MAX=4294967295
++ UINT_OFLOW=4294967296
++ LONG_MAX=9223372036854775807
++ LONG_OFLOW=9223372036854775808
++ LONG_MIN=-9223372036854775808
++ LONG_UFLOW=-9223372036854775809
++ ULONG_MAX=18446744073709551615
++ ULONG_OFLOW=18446744073709551616
++ SIZE_MAX=18446744073709551615
++ SIZE_OFLOW=18446744073709551616
++ SSIZE_MAX=9223372036854775807
++ SSIZE_OFLOW=9223372036854775808
++ SSIZE_MIN=-9223372036854775808
++ SSIZE_UFLOW=-9223372036854775809
++ TIME_T_MAX=9223372036854775807
++ TIME_T_OFLOW=9223372036854775808
++ TIME_T_MIN=-9223372036854775808
++ TIME_T_UFLOW=-9223372036854775809
++ UID_T_MAX=4294967295
++ UID_T_OFLOW=4294967296
++ GID_T_MAX=4294967295
++ GID_T_OFLOW=4294967296
++ PID_T_MAX=2147483647
++ PID_T_OFLOW=2147483648
++ PID_T_MIN=-2147483648
++ PID_T_UFLOW=-2147483649
++ OFF_T_MAX=9223372036854775807
++ OFF_T_OFLOW=9223372036854775808
++ OFF_T_MIN=-9223372036854775808
++ OFF_T_UFLOW=-9223372036854775809
++ INTMAX_MAX=9223372036854775807
++ INTMAX_OFLOW=9223372036854775808
++ INTMAX_MIN=-9223372036854775808
++ INTMAX_UFLOW=-9223372036854775809
++ UINTMAX_MAX=18446744073709551615
++ UINTMAX_OFLOW=18446744073709551616
+ test 2147483647
+ tail --pid=2147483647 -f /dev/null
+ fail=1

Re: no feedback on snapshot? coreutils-7.5 coming soon

2009-08-12 Thread C de-Avillez
Yet another one, on check-root. I am starting to wonder if this may be a
problem with my setup, since nobody has reported errors on tail.

FAIL: tail-2/append-only (exit: 1)
==

+ tail --version
tail (GNU coreutils) 7.4.115-c9c92
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
http://gnu.org/licenses/gpl.html.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Paul Rubin, David MacKenzie, Ian Lance Taylor,
and Jim Meyering.
+ . ./test-lib.sh
++ unset function_test
++ eval 'function_test() { return 11; }; function_test'
+++ function_test
+++ return 11
++ test 11 '!=' 11
+++ pwd
++
test_dir_=/usr/src/buildd/coreutils-snapshot/coreutils-7.4.115-c9c92/tests
+++ this_test_
+++ echo ././tail-2/append-only
+++ sed 's,.*/,,'
++ this_test=append-only
+++ /usr/src/buildd/coreutils-snapshot/coreutils-7.4.115-c9c92/src/mktemp -d 
--tmp=/usr/src/buildd/coreutils-snapshot/coreutils-7.4.115-c9c92/tests 
cu-append-only.XX
++
t_=/usr/src/buildd/coreutils-snapshot/coreutils-7.4.115-c9c92/tests/cu-append-only.dkK309eD5m
++ trap remove_tmp_ 0
++ trap 'Exit $?' 1 2 13 15
++
cd 
/usr/src/buildd/coreutils-snapshot/coreutils-7.4.115-c9c92/tests/cu-append-only.dkK309eD5m
++ diff --version
++ grep GNU
+ require_root_
+ uid_is_privileged_
++ id -u
+ my_uid=0
+ case $my_uid in
+ NON_ROOT_USERNAME=nobody
++ id -g nobody
+ NON_ROOT_GROUP=65534
+ chattr_a_works=1
+ touch f
+ chattr +a f
+ echo x
+ test 1 = 0
+ fail=0
+ pid=22129
+ sleep 1
+ fail=1
+ chattr -a f
+ Exit 1
+ set +e
+ exit 1
+ exit 1
+ remove_tmp_
+ __st=1
+ cleanup_
+ :
+ cd /usr/src/buildd/coreutils-snapshot/coreutils-7.4.115-c9c92/tests
+ chmod -R u
+rwx 
/usr/src/buildd/coreutils-snapshot/coreutils-7.4.115-c9c92/tests/cu-append-only.dkK309eD5m
+ rm
-rf 
/usr/src/buildd/coreutils-snapshot/coreutils-7.4.115-c9c92/tests/cu-append-only.dkK309eD5m
+ exit 1



signature.asc
Description: This is a digitally signed message part


Re: no feedback on snapshot? coreutils-7.5 coming soon

2009-08-12 Thread Pádraig Brady
Pádraig Brady wrote:
 C de-Avillez wrote:
 Sorry for the delay, got busy. I just built  make check, and got two
 errors.

 First one is here, I will re-run the second error by itself in a few.

 Running on Ubuntu 9.10 (kernel 2.6.31.5 with Ubuntu mods, libc6
 2.10.1-0ubuntu6).

 FAIL: tail-2/pid
 
 + tail --pid=2147483647 -f /dev/null
 + fail=1
 
 + timeout 1 tail -s.1 -f /dev/null --pid=2147483647
 + test 1 = 124
 
 So tail silently returns with 1 immediately.
 The only way I can see this happening is in tail_forever_inotify() at:
 
   if (follow_mode == Follow_descriptor  !found_watchable)
 return;
 
 I'd better try and pay attention in this meeting ;)

Meeting over :)
Following from the above analysis, does the attached help?

cheers,
Pádraig.
From af996b0e868752c633477a90802d2dcb382725b8 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?P=C3=A1draig=20Brady?= p...@draigbrady.com
Date: Wed, 12 Aug 2009 19:01:56 +0100
Subject: [PATCH] tail: fix tail -f failure when inotify used

* src/tail.c (tail_inotify_forever): Use the correct bounds
in the error check of the return from inotify_add_watch().
Reported by C de-Avillez.
---
 src/tail.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/tail.c b/src/tail.c
index 3c8f425..7d84bec 100644
--- a/src/tail.c
+++ b/src/tail.c
@@ -1231,7 +1231,7 @@ tail_forever_inotify (int wd, struct File_spec *f, size_t n_files,
   if (hash_insert (wd_table, (f[i])) == NULL)
 xalloc_die ();
 
-  if (follow_mode == Follow_name || f[i].wd)
+  if (follow_mode == Follow_name || 0 = f[i].wd)
 found_watchable = true;
 }
 }
-- 
1.6.2.5



Re: no feedback on snapshot? coreutils-7.5 coming soon

2009-08-12 Thread C de-Avillez
On Wed, 2009-08-12 at 20:22 +0100, Pádraig Brady wrote:
 While I'm at it here's a patch to
 improve that test.

Thanks, Pádraig. Building  testing right now both of them on the
snapshot; then on git.


signature.asc
Description: This is a digitally signed message part


Re: no feedback on snapshot? coreutils-7.5 coming soon

2009-08-12 Thread C de-Avillez
On Wed, 2009-08-12 at 20:22 +0100, Pádraig Brady wrote:
 While I'm at it here's a patch to
 improve that test.
 
 cheers,
 Pádraig.

OK. Both tests now succeed on the snapshot. I will apply them to git now
(where I also had the same error).

Cheers,

..C..



signature.asc
Description: This is a digitally signed message part


Re: no feedback on snapshot? coreutils-7.5 coming soon

2009-08-12 Thread Jim Meyering
C de-Avillez wrote:
 Yet another one, on check-root. I am starting to wonder if this may be a
 problem with my setup, since nobody has reported errors on tail.

 FAIL: tail-2/append-only (exit: 1)
 ==

Thanks for the reports.
How did you run those tests?
When I do it like this (per README), they all pass.

  sudo env PATH=$PATH NON_ROOT_USERNAME=$USER make -k check-root




Re: no feedback on snapshot? coreutils-7.5 coming soon

2009-08-12 Thread C de-Avillez
On Wed, 2009-08-12 at 23:06 +0200, Jim Meyering wrote:
 C de-Avillez wrote:
  Yet another one, on check-root. I am starting to wonder if this may be a
  problem with my setup, since nobody has reported errors on tail.
 
  FAIL: tail-2/append-only (exit: 1)
  ==
 
 Thanks for the reports.
 How did you run those tests?
 When I do it like this (per README), they all pass.
 
   sudo env PATH=$PATH NON_ROOT_USERNAME=$USER make -k check-root

Yes, I did run them this way. I have just re-run them under git master
(so that I would have the current status, without Pádraig's fixes).

It failed the same. The following is the command line I used:

hg...@xango2:/usr/src/buildd/coreutils $ sudo env PATH=$PATH
NON_ROOT_USERNAME=$USER make  check-root

And here's the log:

FAIL: tail-2/append-only (exit: 1)
==

+ tail --version
tail (GNU coreutils) 7.4.114-e3232
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
http://gnu.org/licenses/gpl.html.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Paul Rubin, David MacKenzie, Ian Lance Taylor,
and Jim Meyering.
+ . ./test-lib.sh
++ unset function_test
++ eval 'function_test() { return 11; }; function_test'
+++ function_test
+++ return 11
++ test 11 '!=' 11
+++ pwd
++ test_dir_=/usr/src/buildd/coreutils/tests
+++ this_test_
+++ echo ././tail-2/append-only
+++ sed 's,.*/,,'
++ this_test=append-only
+++ /usr/src/buildd/coreutils/src/mktemp -d
--tmp=/usr/src/buildd/coreutils/tests cu-append-only.XX
++ t_=/usr/src/buildd/coreutils/tests/cu-append-only.qJhExA8KWr
++ trap remove_tmp_ 0
++ trap 'Exit $?' 1 2 13 15
++ cd /usr/src/buildd/coreutils/tests/cu-append-only.qJhExA8KWr
++ diff --version
++ grep GNU
+ require_root_
+ uid_is_privileged_
++ id -u
+ my_uid=0
+ case $my_uid in
+ NON_ROOT_USERNAME=hggdh
++ id -g hggdh
+ NON_ROOT_GROUP=1000
+ chattr_a_works=1
+ touch f
+ chattr +a f
+ echo x
+ test 1 = 0
+ fail=0
+ sleep 1
+ pid=29813
+ tail --pid=29813 -f f
+ fail=1
+ chattr -a f
+ Exit 1
+ set +e
+ exit 1
+ exit 1
+ remove_tmp_
+ __st=1
+ cleanup_
+ :
+ cd /usr/src/buildd/coreutils/tests
+ chmod -R u
+rwx /usr/src/buildd/coreutils/tests/cu-append-only.qJhExA8KWr
+ rm -rf /usr/src/buildd/coreutils/tests/cu-append-only.qJhExA8KWr
+ exit 1



signature.asc
Description: This is a digitally signed message part


sir compiz not working in my system having ubuntu 9.04

2009-08-12 Thread sunny vashistha
compiz not working in my system first it showed error message no
whitelisted driver found
and when i installed some nvidia driver then it showed that versions of
nvidia are different in my systrm .actually i have windows also
installed in my systemowed error message regarding and have nvidia ge
goforce 7400 in my system ..


problems with working of compiz in my system in ubuntu 9.04

2009-08-12 Thread sunny vashistha
this is the message displayed on
(terminal)..


su...@sunny-laptop:~$ compiz
Checking for Xgl: not present.
xset q doesn't reveal the location of the log file. Using fallback
/var/log/Xorg.0.log
Detected PCI ID for VGA:
Checking for texture_from_pixmap: present.
Checking for non power of two support: present.
Checking for Composite extension: present.
Checking screen 1Comparing resolution (1280x800) to maximum 3D texture size
(4096): Passed.
Checking for Software Rasterizer: Not present.
Checking for nVidia: present.
Checking for FBConfig: present.
running under gnome seesion, checking for gnomecompat
Checking for Xgl: not present.
/usr/bin/compiz.real (video) - Warn: No 8 bit GLX pixmap format, disabling
YV12 image format


please help me out in solving my problem.


Re: Enhacement request - 'date' util

2009-08-12 Thread Alejandro Redondo

Matthew Woehlke escribió:
Please use newlines and don't use HTML entities in text mail (or don't 
send HTML, if that was the problem).


Your original mail looked like this:
Good morning from Spain,first of all, thanks for your effort and for 
this rich

featured tools... awesome work!Secondly, to the quot;datequot; command
developers, it would be possible to develop the quot;-aquot; 
feature, like


It is extremely difficult to read this block of text that has no 
newlines except where line wrapping occurred, is missing spaces 
between paragraphs, and is strewn with HTML entities.


I have reformatted the relevant parts so that it is legible.

Alejandro Redondo wrote:

Secondly, to the date command developers, it would be possible to
develop the -a feature, like other UNIXes distros do?

Man from solaris 10:
-a [-]sss.fff   Slowly adjust the time by sss.fff seconds (fff
represents fractions of a second). This adjustment can be positive or
negative.  The system's clock is sped up or slowed down until it has
drifted by the number of seconds specified.

Man from hpux 11.23:
[snipped; same as above]

Really useful feature to avoid crashes and dumps in apps like SAP or
Oracle when changing time is needed.


While that does indeed sound like an interesting option, and there is 
precedent of other OS's having it, I am curious why you don't just use 
ntpd?



Hi again,
sorry about those HTML characters... I sent the first email from a 
webmail client.

And sorry about my bad English too, it's not my natal language.

Well, the first clock set, when ntpd starts, is made in just one step.
This can be a problem when the client host is several seconds different 
than the ntp server.


In the example I suffered, I had to sync different flavors clients with 
the ntpd servers.
Unluckily some of them had the ntpd daemon stopped for a lot of time and 
they had differences, to have an example, about 100secs (ntpdate -d 
ntp_serve used to know it).
It was not a problem on solaris/hpux boxes to use the date -a 100.00 
and then restart the ntpd daemon with the right config avoiding a 
100secs jump in time.
This was not the same for the Linux ones as I did not find a solution to 
slowly (but without notorious jumps) adjust the system clock and then 
restart the ntpd.


Best regards,