bug#12020: ls should show when extended system attributes are set

2012-07-23 Thread Kamil Dudka
On Sunday, July 22, 2012 18:16:39 Jim Meyering wrote:
> Kamil Dudka wrote:
> > On Sunday, July 22, 2012 14:40:46 Jim Meyering wrote:
> >> When already using --color, we do get each test result for free
> > 
> > Not really.  The check for file capabilities is optional even with
> > --color.
> > The 'ca' indicator in $LS_COLORS needs to be set to a color to enable
> > this.
> 
> Hi Kamil,
> 
> While true that you can disable it,
> with the default color settings, that indicator is set,
> 
>$ dircolors --pr |grep CAP
>CAPABILITY 30;41 # file with capability
> 
> so with --color, the check is performed unless you arrange
> to turn it off.

Yes, there is a default color set for file capabilities.  I just wanted to 
highlight that --color does not imply we check for capabilities on its own. 
The way to skip the check even with --color is there intentionally because
of the following bug:

https://bugzilla.redhat.com/467508

There is also a request similar to this one in Red Hat Bugzilla:

https://bugzilla.redhat.com/647786

Kamil





bug#12023: � closed (Re: bug#12023: bug of hostid cmd ?)

2012-07-23 Thread P��draig Brady
On 07/23/2012 03:00 PM, ? wrote:
> HI, guy,
> 
> Thanks for your reply, I add the file /etc/hostid, and get a fixed hostid 
> value.
> 
> But, can you please tell me why my hostid will change when there is not 
> /etc/hostid.
> 
> Thx.
> 
> 
> 
> On 07/22/2012 04:44 AM,   wrote:
>> HI, guy,
>>
>> Can you tell me how the "hostid" command work? or how can I control my 
>> "hostid"?
>>
>> Why my output from "hostid " switch around "0a799228", "0a799a28", 
>> "0a799328" randomly?
>>
>> Here are lists of my "hostid" information, if any other information needed, 
>> please just mail me directly.
>>
>> Hope to get you reply soon, thanks.
>>
>> [lin@centos ~]$ hostid
>> 0a799228
>> [lin@centos ~]$ hostid
>> 0a799a28
>> [lin@centos ~]$ hostid
>> 0a799328
>> [lin@centos ~]$ rpm -q coreutils
>> coreutils-8.4-19.el6.i686
>> [lin@centos ~]$ rpm -q centos-release
>> centos-release-6-3.el6.centos.9.i686
>> [lin@centos ~]$ which hostid
>> /usr/bin/hostid
>> [lin@centos ~]$ ldd /usr/bin/hostid 
>> linux-gate.so.1 =>  (0x00dc)
>> libc.so.6 => /lib/libc.so.6 (0x00902000)
>> /lib/ld-linux.so.2 (0x008dc000)
>> [lin@centos ~]$
> 
> 
> --  --
> ??: "GNU bug Tracking System";
> : 2012??7??22??(??) 8:12
> ??: " e nQQ  "<55079...@qq.com>; 
> 
> : bug#12023: closed (Re: bug#12023: bug of hostid cmd ?)
> 
> 
> 
> Your bug report
> 
> #12023: bug of hostid cmd ?
> 
> which was filed against the coreutils package, has been closed.
> 
> The explanation is attached below, along with your original report.
> If you require more details, please reply to 12...@debbugs.gnu.org.

glibc is operating like this shell script.
You can run it to check your system:

echo "
from socket import gethostname as hostname
from socket import gethostbyname as ip
for i in range(10):
print ''.join('%02x' % int(x) for x in ip(hostname()).split('.'))
" | python | uniq -c

cheers,
P??draig.





bug#12023: RE��bug#12023: closed (Re: bug#12023: bug of hostid cmd ?)

2012-07-23 Thread �e�nQQ��
HI, guy,

Thanks for your reply, I add the file /etc/hostid, and get a fixed hostid value.

But, can you please tell me why my hostid will change when there is not 
/etc/hostid.

Thx.



On 07/22/2012 04:44 AM,   wrote:
> HI, guy,
> 
> Can you tell me how the "hostid" command work? or how can I control my 
> "hostid"?
> 
> Why my output from "hostid " switch around "0a799228", "0a799a28", "0a799328" 
> randomly?
> 
> Here are lists of my "hostid" information, if any other information needed, 
> please just mail me directly.
> 
> Hope to get you reply soon, thanks.
> 
> [lin@centos ~]$ hostid
> 0a799228
> [lin@centos ~]$ hostid
> 0a799a28
> [lin@centos ~]$ hostid
> 0a799328
> [lin@centos ~]$ rpm -q coreutils
> coreutils-8.4-19.el6.i686
> [lin@centos ~]$ rpm -q centos-release
> centos-release-6-3.el6.centos.9.i686
> [lin@centos ~]$ which hostid
> /usr/bin/hostid
> [lin@centos ~]$ ldd /usr/bin/hostid 
> linux-gate.so.1 =>  (0x00dc)
> libc.so.6 => /lib/libc.so.6 (0x00902000)
> /lib/ld-linux.so.2 (0x008dc000)
> [lin@centos ~]$


--  --
??: "GNU bug Tracking System";
: 2012??7??22??(??) 8:12
??: " e nQQ  "<55079...@qq.com>; 

: bug#12023: closed (Re: bug#12023: bug of hostid cmd ?)



Your bug report

#12023: bug of hostid cmd ?

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 12...@debbugs.gnu.org.

-- 
12023: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12023
GNU Bug Tracking System
Contact help-debb...@gnu.org with problems

bug#12019: join command - wrong column moved to start of line with

2012-07-23 Thread Jim Meyering
Pádraig Brady wrote:
...
> Thanks for looking into that Alan, and thanks for reporting this Jean-Pierre.
> I've installed the attached to document the fix and add a test.
...
> Subject: [PATCH] tests: add a test for a previously fixed output format bug
>  in join
>
> Add a test and NEWS entry for a bug inadvertently fixed in
> a refactoring in commit v8.9-32-gd4db0cb
>
> * tests/misc/join (v2-format): Add a new test.
> * THANKS.in: Add the reporter.
> * NEWS: Mention the old bug.
> * cfg.mk (old_NEWS_hash): Update.
>
> Reported-by: Jean-Pierre Tosoni
> ---
>  NEWS|4 
>  THANKS.in   |1 +
>  cfg.mk  |2 +-
>  tests/misc/join |4 

Nice work.
Thanks.





bug#12019: join command - wrong column moved to start of line with

2012-07-23 Thread Pádraig Brady
On 07/22/2012 12:22 AM, Alan Curry wrote:
> Eric Blake writes:
>>
>> On 07/21/2012 12:20 PM, Jean-Pierre Tosoni wrote:
>>> Hello Maintainer,
>>> =20
>>> I am using join v8.5 from debian squeeze.
>>> =20
>>
>>> now, the command:
>>>join   -v 2   -1 2   -2 3   a   b
>>> produces
>>> =3D=3D=3D=3D wrong output =3D=3D=3D=3D
>>> zzz222 zzz111 keyZ zzz333
>>
>> I tried reproducing this with coreutils 8.17:
>>
>> $ cat a b
>> axx111 keyX axx222
>> ayy111 keyY ayy222
>> xxx111 xxx222 keyX xxx333
>> zzz111 zzz222 keyZ zzz333
>> $ join -v2 -1 2 -2 3 a b
>> keyZ zzz111 zzz222 zzz333
>>
>> but I get the expected order.  I don't see a specific mention of a fix
>> for this in NEWS, so I have to wonder if this might be a bug in a
>> debian-specific patch.  Can you do some more investigating, such as
>> compiling upstream coreutils to see if the problem still persists for you=
>> ?
> 
> It's not a Debian-specific problem. I can reproduce the bug with unaltered
> coreutils 8.9. It was apparently fixed by accident as a side effect of some
> other work on the join program.
> 
> commit d4db0cb1827730ed5536c12c0ebd024283b3a4db
> Author: Pádraig Brady 
> Date:   Wed Jan 5 11:52:54 2011 +
> 
> join: add -o 'auto' to output a constant number of fields per line
> 
> d4db0cb1827730ed5536c12c0ebd024283b3a4db can be cherry-picked and applied to
> older coreutils to fix the bug. I tested this with upstream 8.9 and Debian's
> 8.5, both applied with fuzz but worked correctly.
> 

Thanks for looking into that Alan, and thanks for reporting this Jean-Pierre.
I've installed the attached to document the fix and add a test.

cheers,
Pádraig.


>From d75e93cb76c504e766e317ea0891285e4510ae67 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= 
Date: Mon, 23 Jul 2012 09:29:57 +0100
Subject: [PATCH] tests: add a test for a previously fixed output format bug
 in join

Add a test and NEWS entry for a bug inadvertently fixed in
a refactoring in commit v8.9-32-gd4db0cb

* tests/misc/join (v2-format): Add a new test.
* THANKS.in: Add the reporter.
* NEWS: Mention the old bug.
* cfg.mk (old_NEWS_hash): Update.

Reported-by: Jean-Pierre Tosoni
---
 NEWS|4 
 THANKS.in   |1 +
 cfg.mk  |2 +-
 tests/misc/join |4 
 4 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/NEWS b/NEWS
index 113b30a..f1255ea 100644
--- a/NEWS
+++ b/NEWS
@@ -477,6 +477,10 @@ GNU coreutils NEWS-*- 
outline -*-
   join --header now skips the ordering check for the first line
   even if the other file is empty.  [bug introduced in coreutils-8.5]
 
+  join -v2 now ensures the default output format prints the match field
+  at the start of the line when it is different to the match field for
+  the first file. [bug present in "the beginning".]
+
   rm -f no longer fails for EINVAL or EILSEQ on file systems that
   reject file names invalid for that file system.
 
diff --git a/THANKS.in b/THANKS.in
index dc0b9dd..5db443b 100644
--- a/THANKS.in
+++ b/THANKS.in
@@ -275,6 +275,7 @@ Jari Aalto  jari.aa...@cante.net
 Jarkko Hietaniemi   j...@epsilon.hut.fi
 Jarod Wilsonjwil...@redhat.com
 Jean Charles Delepine   delep...@u-picardie.fr
+Jean-Pierre Tosoni  jpt.7...@gmail.com
 Jeff Moore  j...@mordor.com
 Jeff Sheinberg  j...@bsrd.net
 Jens Elkner elk...@imsgroup.de
diff --git a/cfg.mk b/cfg.mk
index f780511..261efa5 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -45,7 +45,7 @@ export VERBOSE = yes
 # 4914152 9e
 export XZ_OPT = -8e
 
-old_NEWS_hash = 4f70c9ef883feff18d9d5f66a941f3a8
+old_NEWS_hash = 38cad4d11c6ce866fc52213e3a4dc437
 
 # Add an exemption for sc_makefile_at_at_check.
 _makefile_at_at_check_exceptions = ' && !/^cu_install_program =/'
diff --git a/tests/misc/join b/tests/misc/join
index a3fd1a8..62074b7 100755
--- a/tests/misc/join
+++ b/tests/misc/join
@@ -147,6 +147,10 @@ my @tv = (
  ["a,1,,2\nb,1,2\n", "a,3,4\nb,3,4\n"],
  "a,1,,2,3,4\nb,1,2,,3,4\n"],
 
+# For -v2, print the match field correctly with the default output format,
+# when that match field is different between file 1 and file 2.  Fixed in 8.10
+['v2-order', '-v2 -2 2', ["", "2 1\n"], "1 2\n", 0],
+
 # From Tim Smithers: fixed in 1.22l
 ['trailing-sp', '-t: -1 1 -2 1', ["a:x \n", "a:y \n"], "a:x :y \n", 0],
 
-- 
1.7.6.4