Re: Asking for tester (small patch to chown(8)/chgrp(1))

2002-11-21 Thread David Schultz
Thus spake Tim Robbins [EMAIL PROTECTED]:
 On Wed, Nov 20, 2002 at 01:27:43PM +0100, Alexander Leidinger wrote:
 
  On Tue, 19 Nov 2002 10:27:00 -0800
  David Schultz [EMAIL PROTECTED] wrote:
  
 I'm concerned about the used character: -r is similiar to -R

Yes, `-r' would be a very poor choice for the reason you state.
   
   Agreed, but the precedent has already been set by touch(1) and
   truncate(1).  If we're going to get it wrong some of the time, we
   might as well be consistent about it.
  
  When we don't look at the fact that neither touch nor truncate operate
  recursivly... what about changing touch and truncate to allow the
  proposed -c (or -i) too and mark -r as deprecated (if it isn't covered
  by a standard)?
 
 I'd really rather that we didn't change this at all, even if it seems
 inconsistent. Changing it would just lead to more confusion.
 
 I am also against adding new options to chown to copy ownership from
 existing files.
 
 Copy ownership:   chown `stat -f%Su file1` file2
 Copy group:   chgrp `stat -f%Sg file1` file2
 Copy both:chown `stat -f%Su:%Sg file1` file2
 
 These could easily be made into shell functions or whatever...

Admittedly it *is* creeping featurism, but there's already
creeping featurism all over the place if you're going to be that
strict about it.  You might as well reimplement ls(1) as a shell
script and remove 30 of its 33 documented options.  I think -r is
a specific case that happens to be useful and convenient for
chown.  Most of this discussion has been bogged down in the choice
of option name, which is really silly.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Asking for tester (small patch to chown(8)/chgrp(1))

2002-11-20 Thread Alexander Leidinger
On Tue, 19 Nov 2002 10:27:00 -0800
David Schultz [EMAIL PROTECTED] wrote:

   I'm concerned about the used character: -r is similiar to -R
  
  Yes, `-r' would be a very poor choice for the reason you state.
 
 Agreed, but the precedent has already been set by touch(1) and
 truncate(1).  If we're going to get it wrong some of the time, we
 might as well be consistent about it.

When we don't look at the fact that neither touch nor truncate operate
recursivly... what about changing touch and truncate to allow the
proposed -c (or -i) too and mark -r as deprecated (if it isn't covered
by a standard)?

Bye,
Alexander.

-- 
   Speak softly and carry a cellular phone.

http://www.Leidinger.net   Alexander @ Leidinger.net
  GPG fingerprint = C518 BC70 E67F 143F BE91  3365 79E2 9C60 B006 3FE7

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Asking for tester (small patch to chown(8)/chgrp(1))

2002-11-20 Thread David Schultz
Thus spake Alexander Leidinger [EMAIL PROTECTED]:
I'm concerned about the used character: -r is similiar to -R
   
   Yes, `-r' would be a very poor choice for the reason you state.
  
  Agreed, but the precedent has already been set by touch(1) and
  truncate(1).  If we're going to get it wrong some of the time, we
  might as well be consistent about it.
 
 When we don't look at the fact that neither touch nor truncate operate
 recursivly... what about changing touch and truncate to allow the
 proposed -c (or -i) too and mark -r as deprecated (if it isn't covered
 by a standard)?

Adding a uniform replacement to all three sounds good to me, as
long as there isn't any standard involved.  I'm a little bit
suspicious given that Solaris touch(1) uses -r to mean the same
thing we do.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Asking for tester (small patch to chown(8)/chgrp(1))

2002-11-20 Thread Tim Robbins
On Wed, Nov 20, 2002 at 01:27:43PM +0100, Alexander Leidinger wrote:

 On Tue, 19 Nov 2002 10:27:00 -0800
 David Schultz [EMAIL PROTECTED] wrote:
 
I'm concerned about the used character: -r is similiar to -R
   
   Yes, `-r' would be a very poor choice for the reason you state.
  
  Agreed, but the precedent has already been set by touch(1) and
  truncate(1).  If we're going to get it wrong some of the time, we
  might as well be consistent about it.
 
 When we don't look at the fact that neither touch nor truncate operate
 recursivly... what about changing touch and truncate to allow the
 proposed -c (or -i) too and mark -r as deprecated (if it isn't covered
 by a standard)?

I'd really rather that we didn't change this at all, even if it seems
inconsistent. Changing it would just lead to more confusion.

I am also against adding new options to chown to copy ownership from
existing files.

Copy ownership: chown `stat -f%Su file1` file2
Copy group: chgrp `stat -f%Sg file1` file2
Copy both:  chown `stat -f%Su:%Sg file1` file2

These could easily be made into shell functions or whatever...


Tim

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Asking for tester (small patch to chown(8)/chgrp(1))

2002-11-19 Thread Alexander Leidinger
On Sun, 17 Nov 2002 21:01:33 +0100 (CET)
Oliver Fromme [EMAIL PROTECTED] wrote:

 Alexander Leidinger [EMAIL PROTECTED] wrote:
   Oliver Fromme [EMAIL PROTECTED] wrote:
The patch adds an option -r to chown(8) and chgrp(1), which
does pretty much the same as the -r option of touch(1) and
truncate(1).  Basically, it let's you copy ownerships and
group memberships from one file to another, which is useful
in scripts.
   
   I'm concerned about the used character: -r is similiar to -R
 
 Why exactly is that cause for concern?

Because cp uses -r in the same way chown uses -R.

 What character would you suggest instead?  touch(1) and
 truncate(1) also use -r.

But they don't work recursivly.

What about -c (_c_opy)?

Bye,
Alexander.

-- 
   There's no place like ~

http://www.Leidinger.net   Alexander @ Leidinger.net
  GPG fingerprint = C518 BC70 E67F 143F BE91  3365 79E2 9C60 B006 3FE7

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Asking for tester (small patch to chown(8)/chgrp(1))

2002-11-19 Thread John Baldwin

On 19-Nov-2002 Alexander Leidinger wrote:
 On Sun, 17 Nov 2002 21:01:33 +0100 (CET)
 Oliver Fromme [EMAIL PROTECTED] wrote:
 
 Alexander Leidinger [EMAIL PROTECTED] wrote:
   Oliver Fromme [EMAIL PROTECTED] wrote:
The patch adds an option -r to chown(8) and chgrp(1), which
does pretty much the same as the -r option of touch(1) and
truncate(1).  Basically, it let's you copy ownerships and
group memberships from one file to another, which is useful
in scripts.
   
   I'm concerned about the used character: -r is similiar to -R
 
 Why exactly is that cause for concern?
 
 Because cp uses -r in the same way chown uses -R.
 
 What character would you suggest instead?  touch(1) and
 truncate(1) also use -r.
 
 But they don't work recursivly.
 
 What about -c (_c_opy)?

or -i for inherit

but I did always like green..

-- 

John Baldwin [EMAIL PROTECTED]http://www.FreeBSD.org/~jhb/
Power Users Use the Power to Serve!  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Asking for tester (small patch to chown(8)/chgrp(1))

2002-11-19 Thread David Schultz
Thus spake Garrett Wollman [EMAIL PROTECTED]:
  I'm concerned about the used character: -r is similiar to -R
 
 Yes, `-r' would be a very poor choice for the reason you state.

Agreed, but the precedent has already been set by touch(1) and
truncate(1).  If we're going to get it wrong some of the time, we
might as well be consistent about it.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Asking for tester (small patch to chown(8)/chgrp(1))

2002-11-18 Thread Garrett Wollman
On Sun, 17 Nov 2002 15:51:59 +0100, Alexander Leidinger [EMAIL PROTECTED] 
said:

 I'm concerned about the used character: -r is similiar to -R

Yes, `-r' would be a very poor choice for the reason you state.

-GAWollman


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Asking for tester (small patch to chown(8)/chgrp(1))

2002-11-17 Thread Alexander Leidinger
On Sat, 16 Nov 2002 12:29:20 +0100 (CET)
Oliver Fromme [EMAIL PROTECTED] wrote:

 The patch adds an option -r to chown(8) and chgrp(1), which
 does pretty much the same as the -r option of touch(1) and
 truncate(1).  Basically, it let's you copy ownerships and
 group memberships from one file to another, which is useful
 in scripts.

I'm concerned about the used character: -r is similiar to -R

Bye,
Alexander.

-- 
   One world, one web, one program  -- Microsoft promotional ad
 Ein Volk, ein Reich, ein Fuehrer  -- Adolf Hitler

http://www.Leidinger.net   Alexander @ Leidinger.net
  GPG fingerprint = C518 BC70 E67F 143F BE91  3365 79E2 9C60 B006 3FE7

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Asking for tester (small patch to chown(8)/chgrp(1))

2002-11-17 Thread Oliver Fromme
Alexander Leidinger [EMAIL PROTECTED] wrote:
  Oliver Fromme [EMAIL PROTECTED] wrote:
   The patch adds an option -r to chown(8) and chgrp(1), which
   does pretty much the same as the -r option of touch(1) and
   truncate(1).  Basically, it let's you copy ownerships and
   group memberships from one file to another, which is useful
   in scripts.
  
  I'm concerned about the used character: -r is similiar to -R

Why exactly is that cause for concern?

What character would you suggest instead?  touch(1) and
truncate(1) also use -r.

Regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH  Co KG, Oettingenstr. 2, 80538 München
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

All that we see or seem is just a dream within a dream (E. A. Poe)

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Asking for tester (small patch to chown(8)/chgrp(1))

2002-11-16 Thread David Wolfskill
On Sat, Nov 16, 2002 at 12:29:20PM +0100, Oliver Fromme wrote:
 I've submitted a small patch (bin/45333) for both -stable
 and -current, but I haven't been able to test it under
 -current (due to lack of a spare machine).  Would someone
 please give it a try and let me know if it compiles and
 works?

Seems to for me (today's -CURRENT).

I did take the liberty of removing the extraneous space on (the new) line
151 (so its if lines up with those on lines 153  155), and of
replacing the 'usage:' on (the new) line 305 (chgrp's usage() message,
showing the second alternative invocation) with whitespace (to match the
pattern for chown).  (If someone wants my diff, please let me know.
It's not sufficiently different from what Oliver put in his PR to
warrant spamming -current, as far as I'm concerned.)

 The patch adds an option -r to chown(8) and chgrp(1), which
 does pretty much the same as the -r option of touch(1) and
 truncate(1).  Basically, it let's you copy ownerships and
 group memberships from one file to another, which is useful
 in scripts.

Makes sense.  Only reservation I'd have -- and this may well be
unfounded -- is to be sure we're not introducing gratutitous
differences with respect to other implementations or to applicable
standards.  I have no problem with functional differences that don't
break standards conformance (to the extent we claim it, anyway).

 Thanks!

Hope this is useful.

Cheers,
david   (links to my resume at http://www.catwhisker.org/~david)
-- 
David H. Wolfskill  [EMAIL PROTECTED]
I have no confidence in results obtained through the use of Microsoft products.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Asking for tester (small patch to chown(8)/chgrp(1))

2002-11-16 Thread Oliver Fromme
David Wolfskill [EMAIL PROTECTED] wrote:
  On Sat, Nov 16, 2002 at 12:29:20PM +0100, Oliver Fromme wrote:
   I've submitted a small patch (bin/45333) for both -stable
   and -current, but I haven't been able to test it under
   -current (due to lack of a spare machine).  Would someone
   please give it a try and let me know if it compiles and
   works?
  
  Seems to for me (today's -CURRENT).

Thanks!

  I did take the liberty of removing the extraneous space on (the new) line
  151 (so its if lines up with those on lines 153  155),

Oops, you're right, somehow there are spaces instead of
tabs in that line (probably left over from copypaste).

  and of
  replacing the 'usage:' on (the new) line 305 (chgrp's usage() message,
  showing the second alternative invocation) with whitespace (to match the
  pattern for chown).

Right again, I missed that.

  (If someone wants my diff, please let me know.
  It's not sufficiently different from what Oliver put in his PR to
  warrant spamming -current, as far as I'm concerned.)

I've sent a small follow-up to the PR.

   The patch adds an option -r to chown(8) and chgrp(1), which
   does pretty much the same as the -r option of touch(1) and
   truncate(1).  Basically, it let's you copy ownerships and
   group memberships from one file to another, which is useful
   in scripts.
  
  Makes sense.  Only reservation I'd have -- and this may well be
  unfounded -- is to be sure we're not introducing gratutitous
  differences with respect to other implementations or to applicable
  standards.  I have no problem with functional differences that don't
  break standards conformance (to the extent we claim it, anyway).

I have checked a number of other operating systems including
our brother and sister BSDs (Net- and Open-), Solaris and
Tru64.  There are no collisions nor similar functionality
with different syntax.  I also checked SUSv3 / POSIX, same
result.

On the other hand, GNU chown/chgrp (used under Linux) does
have such functionality (what a surprise), _but_ only with
a GNU-style long option:  --reference=rfile.  There is no
short single-letter option for it.  Clearly, I decided not
to introduce GNU-style long option into our chown/chgrp.
;-)

  Hope this is useful.

It is indeed, thanks!

Regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH  Co KG, Oettingenstr. 2, 80538 München
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

All that we see or seem is just a dream within a dream (E. A. Poe)

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message