bug#12954: Fix the 'su' bug for rhel6.3

2012-11-22 Thread ybronhei

Hey,
I would like to have a fix for that issue (as it was fixed in newer 
versions), I want to merge it to the current version of rhel6.3 
(coreutils-8.4-19.el6.x86_64)


Please update me.
Thanks.

--
Yaniv Bronhaim.
RedHat, Israel
09-7692289
054-7744187






bug#12954: Differences between 'su' version give different results

2012-11-22 Thread Ondrej Vasik
On Wed, 2012-11-21 at 10:06 -0700, Eric Blake wrote:
> tag 12954 notabug
> thanks
> 
> On 11/21/2012 09:07 AM, ybronhei wrote:
> > Differences between 'su' version give different results in the following
> > shell script:
> 
> > over fedora 17 I run - coreutils 8.15-8: if the file is not accessible
> > by user the script prints no access, and the other way around.
> > over rhel 6.3 we run - coreutils 8.4: the result of func is always
> > "access" without any dependency of the file permissions.. My first guess
> > was that it returns 0 because the 'su' command was succeeded, but with
> > strace you see that the script runs differently.
> > 
> > Is it a bug?
> 
> Thanks for the report.  Perhaps it is a bug in the older coreutils 8.4
> that was fixed for coreutils 8.15, although a quick read through NEWS
> didn't find such a mention (only that 8.9 was the point at which
> upstream quit building su by default, and therefore Fedora 17 is using a
> non-default build in order to get su from coreutils 8.15).  Or it could
> be a patch that is applied to Fedora but not to RHEL.  Either way,

No such patch, but there was a big change in PAM RHEL/Fedora patch to
sync PAM support in SuSE and RHEL/Fedora. This may be the reason for the
difference. 

> upstream coreutils no longer maintains coreutils (newer distros, such as
> Fedora 18, use 'su' from util-linux); furthermore, upstream, we only
> focus on fixing current bugs, and not on backporting fixes to older
> releases.  So your question should be redirected downstream to your
> particular distro (that is, please file a support request with Red Hat),
> as it is not something we are worried about here.

Just to clarify, Fedora 18 still uses su from coreutils (and last
version of coreutils with su), the switch to util-linux su was done only
in Fedora Rawhide.

Yaniv, feel free to email me and Karel Zak (k...@redhat.com , maintainer
of util-linux) if you want to discuss the issue as the distro-related
thing.

Greetings,
 Ondrej Vasik






bug#12891: test-suite AIX 6.1 non-root xlC compiler

2012-11-22 Thread Pádraig Brady

On 11/20/2012 08:31 PM, Michael Felt wrote:

root@x104:[/data/prj/gnu/
coreutils/coreutils-8.20]cd tests
root@x104:[/data/prj/gnu/coreutils/coreutils-8.20/tests]truss -f -o /tmp/tr
m>
cd .. && make check TESTS=tests/tail-2/F-vs-missing.sh SUBDIRS=.


All make invocations must be from the top level directory now,
where the Makefile is. Notice the cd .. above which moves you
to the top level dir


=
1 test passed
=

So, for directory ./tests it passes; from . it does not :)
=
root@x104:[/data/prj/gnu/coreutils/coreutils-8.20/tests]cd ..
root@x104:[/data/prj/gnu/coreutils/coreutils-8.20]truss -f -o /tmp/tr make
check TESTS=tail-2/F-vs-missing.sh


So this is from the same dir as above but is missing the required tests/
prefix to the TESTS path


cat: tail-2/F-vs-missing.log: No such file or directory


thanks,
Pádraig.





bug#12891: test-suite AIX 6.1 non-root xlC compiler

2012-11-22 Thread Pádraig Brady

On 11/15/2012 08:00 AM, Michael Felt wrote:

> FAIL: tests/rm/d-2.sh (exit: 1)
> ===

> + diff -u exp out
> --- exp2012-11-14 22:58:24 +0100
> +++ out2012-11-14 22:58:23 +0100
> @@ -1 +1 @@
> -rm: cannot remove 'd': Directory not empty
> +rm: cannot remove 'd': File exists

That looks like a valid test issue.
I'll apply the following in a little while.

thanks,
Pádraig.

commit 5e1187ac933fc54f738810dcfc41bbbd6eec3be7
Author: Pádraig Brady 
Date:   Thu Nov 22 10:36:31 2012 +

tests: accept EEXIST from rm -d

* tests/rm/d-2.sh: EEXIST is a valid error on some systems.
Reported by Michael Felt on AIX 6.1

diff --git a/tests/rm/d-2.sh b/tests/rm/d-2.sh
index b62c2ee..1a1a560 100755
--- a/tests/rm/d-2.sh
+++ b/tests/rm/d-2.sh
@@ -24,10 +24,14 @@ mkdir d || framework_failure_
 > d/a || framework_failure_

 rm -d d 2> out && fail=1
+
+# Accept any of these: EEXIST, ENOTEMPTY
+sed 's/: File exists/: Directory not empty/' out > out2
+
 printf "%s\n" \
 "rm: cannot remove 'd': Directory not empty" \
 > exp || framework_failure_

-compare exp out || fail=1
+compare exp out2 || fail=1

 Exit $fail





bug#12959: "seq -w -1e-3 9" misaligned

2012-11-22 Thread Marcel Böhme
Hi,

While the output of (1) "seq -w -1e-2 9" prints the width as expected, the 
output of (2) "seq -w -1e-3 9" does not:
 (1) vs. (2)
-0.01 | -0.001
00.99 | 0.999
01.99 | 1.999
02.99 | 2.999
03.99 | 3.999
04.99 | 4.999
05.99 | 5.999
06.99 | 6.999
07.99 | 7.999
08.99 | 8.999

Similarly, see "seq -w -1e2 -98" vs. "seq -w -1e3 -998".

Can you kindly confirm that the bug was introduced 4 years ago in the following 
commit: 
http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=86e4b778b148bdd82395fdc312ce8d937f303e33

Best regards,
 Marcel






bug#12959: "seq -w -1e-3 9" misaligned

2012-11-22 Thread Pádraig Brady

On 11/22/2012 10:49 AM, Marcel Böhme wrote:

Hi,

While the output of (1) "seq -w -1e-2 9" prints the width as expected, the output of (2) 
"seq -w -1e-3 9" does not:
  (1) vs. (2)
-0.01 | -0.001
00.99 | 0.999
01.99 | 1.999
02.99 | 2.999
03.99 | 3.999
04.99 | 4.999
05.99 | 5.999
06.99 | 6.999
07.99 | 7.999
08.99 | 8.999

Similarly, see "seq -w -1e2 -98" vs. "seq -w -1e3 -998".

Can you kindly confirm that the bug was introduced 4 years ago in the following 
commit: 
http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=86e4b778b148bdd82395fdc312ce8d937f303e33


Confirmed:

$ ~/git/coreutils/src/seq -w -1e-3 1
-0.001
0.999

$ ~/git/coreutils/src/seq -w -.001 1
-0.001
00.999

I'll have a look.

thanks,
Pádraig.





bug#12891: test-suite AIX 6.1 non-root xlC compiler

2012-11-22 Thread Jim Meyering
Pádraig Brady wrote:
> On 11/15/2012 08:00 AM, Michael Felt wrote:
>
>> FAIL: tests/rm/d-2.sh (exit: 1)
>> ===
>
>> + diff -u exp out
>> --- exp  2012-11-14 22:58:24 +0100
>> +++ out  2012-11-14 22:58:23 +0100
>> @@ -1 +1 @@
>> -rm: cannot remove 'd': Directory not empty
>> +rm: cannot remove 'd': File exists
>
> That looks like a valid test issue.
> I'll apply the following in a little while.
>
> thanks,
> Pádraig.
>
> commit 5e1187ac933fc54f738810dcfc41bbbd6eec3be7
> Author: Pádraig Brady 
> Date:   Thu Nov 22 10:36:31 2012 +
>
> tests: accept EEXIST from rm -d
>
> * tests/rm/d-2.sh: EEXIST is a valid error on some systems.
> Reported by Michael Felt on AIX 6.1
>
> diff --git a/tests/rm/d-2.sh b/tests/rm/d-2.sh
> index b62c2ee..1a1a560 100755
> --- a/tests/rm/d-2.sh
> +++ b/tests/rm/d-2.sh
> @@ -24,10 +24,14 @@ mkdir d || framework_failure_
>  > d/a || framework_failure_
>
>  rm -d d 2> out && fail=1
> +
> +# Accept any of these: EEXIST, ENOTEMPTY
> +sed 's/: File exists/: Directory not empty/' out > out2
> +
>  printf "%s\n" \
>  "rm: cannot remove 'd': Directory not empty" \
>  > exp || framework_failure_
>
> -compare exp out || fail=1
> +compare exp out2 || fail=1

Thanks.  Looks perfect.





bug#12961: [russ...@coker.com.au: Bug#525359: wish there was a libcoreutils]

2012-11-22 Thread Samuel Bronson

Package: coreutils
Version: 6.10
Severity: wishlist

>From :

--- Begin Message ---
Package: coreutils
Version: 6.10-6
Severity: wishlist

I wish there was a shared library providing the functionality of base64, cksum,
md5sum, sha*sum, and wc.

I know that there are other libraries implementing md5sum and the SHA
hashes, but I would prefer to use a GNU source for that code.

I am not aware of any other library that provides base64 encoding and decoding
for C programs.

Writing code equivalent to "wc" would not be THAT difficult, but I still think
it's best to have it in a library for faster development and so that everyone
can use a correct implementation (it's something that often gets done badly).

-- System Information:
Debian Release: 5.0.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/1 CPU core)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=ANSI_X3.4-1968) 
(ignored: LC_ALL set to C)
Shell: /bin/sh linked to /bin/bash

Versions of packages coreutils depends on:
ii  libacl1   2.2.47-2   Access control list shared library
ii  libc6 2.7-18 GNU C Library: Shared libraries
ii  libselinux1   2.0.65-5   SELinux shared libraries

coreutils recommends no packages.

coreutils suggests no packages.

-- no debconf information




--- End Message ---

-- 
Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread!


bug#12964: [PATCH] printenv: -n option added -- show names of variables.

2012-11-22 Thread Van de Bugger
>From 50aefa315b50b151a2192168fa46e9a311c06147 Mon Sep 17 00:00:00 2001
From: Van de Bugger 
Date: Fri, 23 Nov 2012 02:38:48 +0400
Subject: [PATCH] printenv: -n option added -- show names of variables.

* src/printenv.c: -n option added -- show names of variables.
---
 src/printenv.c | 17 +
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/src/printenv.c b/src/printenv.c
index 5c01f8d..b4583bd 100644
--- a/src/printenv.c
+++ b/src/printenv.c
@@ -49,6 +49,7 @@ static struct option const longopts[] =
   {"null", no_argument, NULL, '0'},
   {GETOPT_HELP_OPTION_DECL},
   {GETOPT_VERSION_OPTION_DECL},
+  {"names", no_argument, NULL, 'n'},
   {NULL, 0, NULL, 0}
 };
 
@@ -69,6 +70,9 @@ If no VARIABLE is specified, print name and value
pairs for them all.\n\
   fputs (_("\
   -0, --null end each output line with 0 byte rather than newline\n
\
 "), stdout);
+  fputs (_("\
+  -n, --namesprint also names of the specified environment
VARIABLE(s)\n\
+"), stdout);
   fputs (HELP_OPTION_DESCRIPTION, stdout);
   fputs (VERSION_OPTION_DESCRIPTION, stdout);
   printf (USAGE_BUILTIN_WARNING, PROGRAM_NAME);
@@ -81,11 +85,12 @@ int
 main (int argc, char **argv)
 {
   char **env;
-  char *ep, *ap;
+  char *ep, *ap, *bp;
   int i;
   bool ok;
   int optc;
   bool opt_nul_terminate_output = false;
+  bool opt_show_names = false;
 
   initialize_main (&argc, &argv);
   set_program_name (argv[0]);
@@ -96,13 +101,16 @@ main (int argc, char **argv)
   initialize_exit_failure (PRINTENV_FAILURE);
   atexit (close_stdout);
 
-  while ((optc = getopt_long (argc, argv, "+iu:0", longopts, NULL)) !=
-1)
+  while ((optc = getopt_long (argc, argv, "+iu:0n", longopts, NULL)) !=
-1)
 {
   switch (optc)
 {
 case '0':
   opt_nul_terminate_output = true;
   break;
+case 'n':
+  opt_show_names = true;
+  break;
 case_GETOPT_HELP_CHAR;
 case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
 default:
@@ -130,13 +138,14 @@ main (int argc, char **argv)
 
   for (env = environ; *env; ++env)
 {
-  ep = *env;
+  bp = ep = *env;
   ap = argv[i];
   while (*ep != '\0' && *ap != '\0' && *ep++ == *ap++)
 {
   if (*ep == '=' && *ap == '\0')
 {
-  printf ("%s%c", ep + 1,
+  printf ("%s%c",
+  opt_show_names ? bp : ep + 1,
   opt_nul_terminate_output ? '\0' : '\n');
   matched = true;
   break;
-- 
1.7.11.7








bug#12959: Aw: bug#12959: "seq -w -1e-3 9" misaligned

2012-11-22 Thread Marcel Böhme
Hi Pádraig,

The problem seems to be related to the computation of ret.width for arguments 
with exponent in method scan_arg. Apparently, the ret.precision is handled in 
the presence of an exponent while the ret.width is not.

More evidence:
$ seq -w 1e3 1e5 | head -2
1000
1001
$ seq -w 1e3 1e5 | tail -2
9
10

$ seq -w -1e-1 1
-00.1
000.9
$ seq -w -0.1 1
-0.1
00.9

Thanks!

Best regards,
 Marcel

On 11/22/2012 11:58 AM, Pádraig Brady wrote:

On 11/22/2012 10:49 AM, Marcel Böhme wrote:
> Hi,
>
> While the output of (1) "seq -w -1e-2 9" prints the width as expected, the 
> output of (2) "seq -w -1e-3 9" does not:
> (1) vs. (2)
> -0.01 | -0.001
> 00.99 | 0.999
> 01.99 | 1.999
> 02.99 | 2.999
> 03.99 | 3.999
> 04.99 | 4.999
> 05.99 | 5.999
> 06.99 | 6.999
> 07.99 | 7.999
> 08.99 | 8.999
>
> Similarly, see "seq -w -1e2 -98" vs. "seq -w -1e3 -998".
>
> Can you kindly confirm that the bug was introduced 4 years ago in the 
> following commit: 
> http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=86e4b778b148bdd82395fdc312ce8d937f303e33

Confirmed:

$ ~/git/coreutils/src/seq -w -1e-3 1
-0.001
0.999

$ ~/git/coreutils/src/seq -w -.001 1
-0.001
00.999

I'll have a look.

thanks,
Pádraig.