bug#43541: minor bug in GNU coreutils 8.30: pwd --version doesn't work

2020-09-20 Thread Chris Elvidge

On 20/09/2020 09:49 pm, Nikolay wrote:

GNU coreutils 8.30

$ pwd --version
bash: pwd: --: invalid option
pwd: usage: pwd [-LP]


$ man pwd

...

--version
   output version information and exit




Try: /bin/pwd --version
And: help pwd

Is there a difference?

--

Chris Elvidge






bug#43162: chgrp clears setgid even when group is not changed

2020-09-20 Thread Bob Proulx
Paul Eggert wrote:
> Karl Berry wrote:
> > I was on centos7.
> > 
> >  (I don't observe your problem on my Fedora 31 box, for example).
> > 
> > Maybe there is hope for a future centos, then.

Just another few data points...

I was able to recreate this issue on a CentOS 7 system running in a
tmpfs filesystem.  So that's pretty much pointing directly at the
Linux kernel behavior independent of file system type.

Meanwhile...  I can also recreate this on a Debian system with a Linux
4.9 kernel in 9 Stretch.  But not on 10 Buster Linux 4.19.  But once
again not on an earlier Linux 3.2 kernel.  3.2 good, 4.9 bad, 4.19 good.

Therefore this seems to be a Linux behavior that was the desired way,
then flipped to the annoying behavior way, then has flipped back again
later.  Apparently.  Anyway just a few data points.

Bob






bug#43541: minor bug in GNU coreutils 8.30: pwd --version doesn't work

2020-09-20 Thread Bob Proulx
tag 43541 + notabug
close 43541
thanks

Nikolay wrote:
> GNU coreutils 8.30

Coreutils version 8.30.  Gotcha.

> $ pwd --version
> bash: pwd: --: invalid option
> pwd: usage: pwd [-LP]

But that is not the GNU Coreutils pwd program.  That is the shell
builtin pwd.  In this case it is bash.  And bash does not document
either a --version or --help option.

$ type pwd
pwd is a shell builtin

$ help pwd
pwd: pwd [-LP]
Print the name of the current working directory.

Options:
  -Lprint the value of $PWD if it names the current working
directory
  -Pprint the physical directory, without any symbolic links

By default, `pwd' behaves as if `-L' were specified.

Exit Status:
Returns 0 unless an invalid option is given or the current directory
cannot be read.

Since this isn't a coreutils program I am going to attend to the
housekeeping and close the bug ticket.  But please let's continue
discussion here for additional questions or comments.

This is actually an FAQ.


https://www.gnu.org/software/coreutils/faq/coreutils-faq.html#I-am-having-a-problem-with-kill-nice-pwd-sleep-or-test_002e


> $ man pwd
> 
> ...
> 
> --version
>   output version information and exit

That is the man page for Coreutils pwd.  And if you want to use the
external command then you must avoid the builtin.

$ type -a pwd
pwd is a shell builtin
pwd is /bin/pwd

$ env pwd --version
pwd (GNU coreutils) 8.32

Use of 'env' in this way forces searching PATH for the named program
regardless of shell and avoids builtins.

Hope this helps! :-)

Bob





bug#43541: minor bug in GNU coreutils 8.30: pwd --version doesn't work

2020-09-20 Thread Nikolay

GNU coreutils 8.30

$ pwd --version
bash: pwd: --: invalid option
pwd: usage: pwd [-LP]


$ man pwd

...

--version
  output version information and exit