Re: command -v in postinsts violating policy

2002-05-27 Thread Clint Adams
 The simplest way, of course, is to state in the release notes that
 zsh, although POSIX-compliant (is it really?) should not be used as

Is bash really POSIX-compliant?
Is ash?
Is pdksh?


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: command -v in postinsts violating policy

2002-05-26 Thread Luca - De Whiskey's - De Vitis
On Sat, May 25, 2002 at 06:33:06PM -0500, Branden Robinson wrote:
 Over six hundred packages already use it, it prevents the hard-coding of
 paths into maintainer scripts and thus renders them more robust against
 harmless changes in other packages (e.g., moving traceroute from
 /usr/sbin to /usr/bin) and is otherwise useful.  I am far from the only
 package maintainer who employs this tool.

Hi Branden,
do you mind if i start working on your packages to replace any occurrence of
the 'command -v' with any other alternative good solution?

I'm sure that policy rocks, and that task may be accomplished be any
developer, so the only way i can demonstrate it is doing.

ciao,
-- 
Luca - De Whiskey's - De Vitis  | Elegant or ugly code as well
aliases: Luca ^De [A-Z][A-Za-z\-]*[iy]'\?s$ | as fine or rude sentences have
Luca, a wannabe ``Good guy''.   | something in common: they
local LANG=[EMAIL PROTECTED] | don't depend on the 
language.


pgp0U3fGKgQg9.pgp
Description: PGP signature


Re: command -v in postinsts violating policy

2002-05-26 Thread Ian Zimmerman

Bryan Simple suggestion: all Debian install scripts require
Bryan /bin/bash. They never refer to /bin/sh. Especially as in, #!
Bryan /bin/sh

Bryan Or if you don't like bash, ash. If not ash,
Bryan csh. busybox. perl. Something. Just specify it and be done with
Bryan it. And demand that shell be installed for the install scripts
Bryan to run.

But that defeats the reason why people do change the link in the first
place : ash is faster than bash, someone might have something like
ash-686 which is even faster.  I am also biased:

kronstadt:~$ file /bin/sh
/bin/sh: symbolic link to /etc/alternatives/sh
kronstadt:~$ file /etc/alternatives/sh
/etc/alternatives/sh: symbolic link to /bin/ash
kronstadt:~$

(I installed my own local alternative for this).

-- 
Ian Zimmerman, Oakland, California, U.S.A.
GPG: 433BA087  9C0F 194F 203A 63F7 B1B8  6E5A 8CA3 27DB 433B A087
EngSoc adopts market economy: cheap is wasteful, efficient is expensive.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: command -v in postinsts violating policy

2002-05-26 Thread Branden Robinson
On Sun, May 26, 2002 at 09:31:36AM +0200, Luca - De Whiskey's - De Vitis wrote:
 Hi Branden,
 do you mind if i start working on your packages to replace any occurrence of
 the 'command -v' with any other alternative good solution?

Yes, I mind a great deal.  I am not soliciting patches to correct this
problem, and don't even think about NMUing packages.

So far, no one has proposed a standards-compliant way of solving the
problem that retains command -v's robustness.

 I'm sure that policy rocks, and that task may be accomplished be any
 developer, so the only way i can demonstrate it is doing.

Let me be perfectly clear:

KEEP YOUR HANDS OFF OF XFREE86.

-- 
G. Branden Robinson|Somewhere, there is a .sig so funny
Debian GNU/Linux   |that reading it will cause an
[EMAIL PROTECTED] |aneurysm.  This is not that .sig.
http://people.debian.org/~branden/ |


pgpjAJGIBfCy8.pgp
Description: PGP signature


Re: command -v in postinsts violating policy

2002-05-26 Thread Josip Rodin
On Sun, May 26, 2002 at 04:06:29PM -0500, Branden Robinson wrote:
 Let me be perfectly clear:
 
 KEEP YOUR HANDS OFF OF XFREE86.

You do realize this is now going to be quoted out of context and used in all
sorts of ad hominem attacks? :)

-- 
 2. That which causes joy or happiness.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: command -v in postinsts violating policy

2002-05-26 Thread Luca - De Whiskey's - De Vitis
On Sun, May 26, 2002 at 04:06:29PM -0500, Branden Robinson wrote:
 So far, no one has proposed a standards-compliant way of solving the
 problem that retains command -v's robustness.

If you want to be right in any case, you're wellcome.
I've no problem with this.

 Let me be perfectly clear:
 
 KEEP YOUR HANDS OFF OF XFREE86.

Branden, relax.
Your fame precedes you everywhere, and almost any one who is even slightly
involved in the Debian project is aware of your way of handling most issues.
It's not a case i asked you first.

I'm only sorry that the election period is over: you were quite friendly.

ciao,
-- 
Luca - De Whiskey's - De Vitis  | Elegant or ugly code as well
aliases: Luca ^De [A-Z][A-Za-z\-]*[iy]'\?s$ | as fine or rude sentences have
Luca, a wannabe ``Good guy''.   | something in common: they
local LANG=[EMAIL PROTECTED] | don't depend on the 
language.


pgp4biykbHOLs.pgp
Description: PGP signature


Re: command -v in postinsts violating policy

2002-05-26 Thread Branden Robinson
On Sun, May 26, 2002 at 11:58:49PM +0200, Luca - De Whiskey's - De Vitis wrote:
 I'm only sorry that the election period is over: you were quite friendly.

I'm still friendly to people who aren't doing things deserving of an
unfriendly response.

Offering to hijack 600 packages so their maintainer scripts can be made
less robust is quite deserving of an unfriendly response.

-- 
G. Branden Robinson|   The only way to get rid of a
Debian GNU/Linux   |   temptation is to yield to it.
[EMAIL PROTECTED] |   -- Oscar Wilde
http://people.debian.org/~branden/ |


pgpZX1fUsMn6n.pgp
Description: PGP signature


Re: command -v in postinsts violating policy

2002-05-26 Thread Branden Robinson
On Sun, May 26, 2002 at 11:46:40PM +0200, Josip Rodin wrote:
 On Sun, May 26, 2002 at 04:06:29PM -0500, Branden Robinson wrote:
  Let me be perfectly clear:
  
  KEEP YOUR HANDS OFF OF XFREE86.
 
 You do realize this is now going to be quoted out of context and used in all
 sorts of ad hominem attacks? :)

Oh, you mean like every other thing I say?  What else is new?  :-P

-- 
G. Branden Robinson|
Debian GNU/Linux   | Ab abusu ad usum non valet
[EMAIL PROTECTED] | consequentia.
http://people.debian.org/~branden/ |


pgp4QWVdHQCJF.pgp
Description: PGP signature


Re: command -v in postinsts violating policy

2002-05-25 Thread Branden Robinson
On Sat, May 25, 2002 at 03:42:40PM -0400, Clint Adams wrote:
 Below is a list of packages that may use 'command -v' in their #!/bin/sh
 postinsts.  Section 11.4 of Policy states that /bin/sh can be a symlink
 to any POSIX-compatible shell, with an exception for 'echo', and that
 package #!/bin/sh scripts must not use non-POSIX features.  Since
 there is no 'command' binary in a package marked Essential,
 the use of 'command -v' is a policy violation.
 
 Other than ignoring this problem, solutions include
[...]
 2) Amending policy with another /bin/sh exception.

That's my preference.  Of course, I am hardly unbiased as I pretty
consistently and deliberately use command -v in my maintainer scripts.

-- 
G. Branden Robinson|  Mob rule isn't any prettier just
Debian GNU/Linux   |  because you call your mob a
[EMAIL PROTECTED] |  government.
http://people.debian.org/~branden/ |


pgp8sDsu6aF53.pgp
Description: PGP signature


Re: command -v in postinsts violating policy

2002-05-25 Thread Luca - De Whiskey's - De Vitis
Package: debhelper
Version: 4.0.6
Severity: serious

Hi all,

On Sat, May 25, 2002 at 03:28:35PM -0500, Branden Robinson wrote:
 On Sat, May 25, 2002 at 03:42:40PM -0400, Clint Adams wrote:
  Below is a list of packages that may use 'command -v' in their #!/bin/sh
  postinsts.  Section 11.4 of Policy states that /bin/sh can be a symlink
  to any POSIX-compatible shell, with an exception for 'echo', and that
  package #!/bin/sh scripts must not use non-POSIX features.  Since
  there is no 'command' binary in a package marked Essential,
  the use of 'command -v' is a policy violation.
  
  Other than ignoring this problem, solutions include
 [...]
  2) Amending policy with another /bin/sh exception.
 
 That's my preference.  Of course, I am hardly unbiased as I pretty
 consistently and deliberately use command -v in my maintainer scripts.

As someone else noted before this bug is, in most cases, caused by debhelper
code added to maintainer scripts:

postinst-doc-base:if [ $1 = configure ]  command -v install-docs /dev/null 
21; then
postinst-suid: if command -v suidregister /dev/null 21  [ -e 
/etc/suid.conf ]; then
postrm-suid:   command -v suidunregister /dev/null 21; then
prerm-doc-base:   command -v install-docs /dev/null 21; then

The same goal can be achived with other commands or shell builtin.

ciao,
-- 
Luca - De Whiskey's - De Vitis  | Elegant or ugly code as well
aliases: Luca ^De [A-Z][A-Za-z\-]*[iy]'\?s$ | as fine or rude sentences have
Luca, a wannabe ``Good guy''.   | something in common: they
local LANG=[EMAIL PROTECTED] | don't depend on the 
language.


pgpnBmKW3hlIJ.pgp
Description: PGP signature


Re: command -v in postinsts violating policy

2002-05-25 Thread Luca - De Whiskey's - De Vitis
Hi Branden,

On Sat, May 25, 2002 at 03:28:35PM -0500, Branden Robinson wrote:
 On Sat, May 25, 2002 at 03:42:40PM -0400, Clint Adams wrote:
  Below is a list of packages that may use 'command -v' in their #!/bin/sh
  postinsts.  Section 11.4 of Policy states that /bin/sh can be a symlink
  to any POSIX-compatible shell, with an exception for 'echo', and that
  package #!/bin/sh scripts must not use non-POSIX features.  Since
  there is no 'command' binary in a package marked Essential,
  the use of 'command -v' is a policy violation.
  
  Other than ignoring this problem, solutions include
 [...]
  2) Amending policy with another /bin/sh exception.
 
 That's my preference.  Of course, I am hardly unbiased as I pretty
 consistently and deliberately use command -v in my maintainer scripts.

Change the rules for all the Debian distribution because you find that
'command -v' is handy, seems quite excessive to me...

ciao,
-- 
Luca - De Whiskey's - De Vitis  | Elegant or ugly code as well
aliases: Luca ^De [A-Z][A-Za-z\-]*[iy]'\?s$ | as fine or rude sentences have
Luca, a wannabe ``Good guy''.   | something in common: they
local LANG=[EMAIL PROTECTED] | don't depend on the 
language.


pgp8g28zdmIvn.pgp
Description: PGP signature


Re: Bug#148172: command -v in postinsts violating policy

2002-05-25 Thread Joey Hess
Luca - De Whiskey's - De Vitis wrote:
 The same goal can be achived with other commands or shell builtin.

Such as?

-- 
see shy jo


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Bug#148172: command -v in postinsts violating policy

2002-05-25 Thread Clint Adams
 Such as?

test -x /usr/sbin/install-docs || echo hi

?


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: command -v in postinsts violating policy

2002-05-25 Thread Sean 'Shaleh' Perry
 
 Change the rules for all the Debian distribution because you find that
 'command -v' is handy, seems quite excessive to me...
 

the problem is there is no better replacement for 'command -v'.  And we do not
really need an exception -- every shell we have supports this.  So the only way
a person can end up with a broken system is by installing a shell by hand from
somewhere else.  If you do that you kind of violate the Debian warranty.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: command -v in postinsts violating policy

2002-05-25 Thread Clint Adams
 the problem is there is no better replacement for 'command -v'.  And we do not
 really need an exception -- every shell we have supports this.  So the only 
 way

Well, that's not true.  As Luca has pointed out, /usr/bin/which is
Essential at the moment.  Also, not every shell in Debian supports
`command -v', as was pointed out.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: command -v in postinsts violating policy

2002-05-25 Thread Branden Robinson
On Sat, May 25, 2002 at 11:19:02PM +0200, Luca - De Whiskey's - De Vitis wrote:
 Change the rules for all the Debian distribution because you find that
 'command -v' is handy, seems quite excessive to me...

You need to stop hitting the hooch and start thinking more about what
Debian is trying to accomplish.

Over six hundred packages already use it, it prevents the hard-coding of
paths into maintainer scripts and thus renders them more robust against
harmless changes in other packages (e.g., moving traceroute from
/usr/sbin to /usr/bin) and is otherwise useful.  I am far from the only
package maintainer who employs this tool.

-- 
G. Branden Robinson|  I came, I saw, she conquered.
Debian GNU/Linux   |  The original Latin seems to have
[EMAIL PROTECTED] |  been garbled.
http://people.debian.org/~branden/ |  -- Robert Heinlein


pgpIRzuTDXezl.pgp
Description: PGP signature


Re: command -v in postinsts violating policy

2002-05-25 Thread Branden Robinson
On Sat, May 25, 2002 at 07:22:17PM -0400, Clint Adams wrote:
  the problem is there is no better replacement for 'command -v'.  And we do 
  not
  really need an exception -- every shell we have supports this.  So the only 
  way
 
 Well, that's not true.  As Luca has pointed out, /usr/bin/which is
 Essential at the moment.  Also, not every shell in Debian supports
 `command -v', as was pointed out.

If zsh does not attempt to provide /bin/sh, though, this is not a
problem in practice.  Meaning that we don't have to hold up the woody
release over it or anything.  We should still pick a path forward for
woody + 1.

IMO, anyone who uses zsh for /bin/sh is quite insane.  ;-)

-- 
G. Branden Robinson| Suffer before God and ye shall be
Debian GNU/Linux   | redeemed.  God loves us, so He
[EMAIL PROTECTED] | makes us suffer Christianity.
http://people.debian.org/~branden/ | -- Aaron Dunsmore


pgpFWFAP2HT4K.pgp
Description: PGP signature


Re: command -v in postinsts violating policy

2002-05-25 Thread Clint Adams
 IMO, anyone who uses zsh for /bin/sh is quite insane.  ;-)

Perhaps, but it's been done.  And policy in its current state
fraudulently claims that it will work.  Why we can't resolve this in a
simple way is beyond me.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: command -v in postinsts violating policy

2002-05-25 Thread Michael Banck
On Sat, May 25, 2002 at 07:46:07PM -0400, Clint Adams wrote:
 Why we can't resolve this in a simple way is beyond me.

+ Gimme an F, gimme an R, gimme an E, E, Z, E. What does it spell?

Michael

-- 
Aristotle gave you logic.  Apply it.
-- Branden Robinson


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: command -v in postinsts violating policy

2002-05-25 Thread Branden Robinson
On Sat, May 25, 2002 at 07:46:07PM -0400, Clint Adams wrote:
  IMO, anyone who uses zsh for /bin/sh is quite insane.  ;-)
 
 Perhaps, but it's been done.

Does Debian explicitly support such a configuration?  That's the point.
I can symlink /bin/sh to /usr/bin/tcsh or /usr/bin/X11/XFree86 if I
want, but that doesn't mean that the Debian packaging infrastructure
offers to it for me via a debconf question, update-alternatives, or some
similar mechanism.

-- 
G. Branden Robinson|  The noble soul has reverence for
Debian GNU/Linux   |  itself.
[EMAIL PROTECTED] |  -- Friedrich Nietzsche
http://people.debian.org/~branden/ |


pgptpJQDB52Yh.pgp
Description: PGP signature


Re: command -v in postinsts violating policy

2002-05-25 Thread Adam Heath
On Sat, 25 May 2002, Clint Adams wrote:

  the problem is there is no better replacement for 'command -v'.  And we do 
  not
  really need an exception -- every shell we have supports this.  So the only 
  way

 Well, that's not true.  As Luca has pointed out, /usr/bin/which is
 Essential at the moment.  Also, not every shell in Debian supports
 `command -v', as was pointed out.

Of course, which doesn't handle commands that start with -(see 148178), so
attempting to auto-check whether command -v works as it should is problematic.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: command -v in postinsts violating policy

2002-05-25 Thread Clint Adams
 Does Debian explicitly support such a configuration?  That's the point.
 I can symlink /bin/sh to /usr/bin/tcsh or /usr/bin/X11/XFree86 if I
 want, but that doesn't mean that the Debian packaging infrastructure
 offers to it for me via a debconf question, update-alternatives, or some
 similar mechanism.

This is relevant how?  Policy is not being followed.  In sid, we can
easily change policy, or we can easily change package scripts.

In woody, anyone who links /bin/sh to a shell allowed by debian-policy,
whether Debian zsh or a shell which they have compiled themselves, may
be suddenly deprived of installed documentation and other random things.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Bug#148172: command -v in postinsts violating policy

2002-05-25 Thread Clint Adams
 That's different and more fragile: it relies on a fixed path which
 command -v does not.

Is this important in the event that install-docs gets moved, or so that
someone can put a different install-docs in the PATH?


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Bug#148172: command -v in postinsts violating policy

2002-05-25 Thread Joey Hess
Clint Adams wrote:
  Such as?
 
 test -x /usr/sbin/install-docs || echo hi

Personally, the only such paths I ever hard code are /etc, #!/bin/sh,
and #!/usr/bin/perl, and I've been thinking about using the env trick
for that last. ess hardcoded paths is good for flexability, and avoid
possible future nasty transitions if the file moves.

-- 
see shy jo


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: command -v in postinsts violating policy

2002-05-25 Thread Bryan W. Headley

Adam Heath wrote:

On Sat, 25 May 2002, Clint Adams wrote:



the problem is there is no better replacement for 'command -v'.  And we do not
really need an exception -- every shell we have supports this.  So the only way


Well, that's not true.  As Luca has pointed out, /usr/bin/which is
Essential at the moment.  Also, not every shell in Debian supports
`command -v', as was pointed out.



Of course, which doesn't handle commands that start with -(see 148178), so
attempting to auto-check whether command -v works as it should is problematic.



Simple suggestion: all Debian install scripts require /bin/bash. They 
never refer to /bin/sh. Especially as in, #! /bin/sh


Or if you don't like bash, ash. If not ash, csh. busybox. perl. 
Something. Just specify it and be done with it. And demand that shell be 
installed for the install scripts to run.




--
   .:. 
Bryan W. Headley - [EMAIL PROTECTED]


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Bug#148172: command -v in postinsts violating policy

2002-05-25 Thread David Schleef
On Sat, May 25, 2002 at 09:39:28PM -0400, Joey Hess wrote:
 Clint Adams wrote:
   Such as?
  
  test -x /usr/sbin/install-docs || echo hi
 
 Personally, the only such paths I ever hard code are /etc, #!/bin/sh,
 and #!/usr/bin/perl, and I've been thinking about using the env trick
 for that last. ess hardcoded paths is good for flexability, and avoid
 possible future nasty transitions if the file moves.


It also makes it easier to do Stupid Package Tricks like post-
processing packages to install into /opt/debian/ (on a non-Debian
system, of course), where the path is /opt/debian/bin:/opt/debian/usr/bin.

Yes, I've tried this.  (I claim no sanity.)  No, this doesn't work
even remotely well right now.  But it may be interesting in the
distant future, given how well dpkg-cross works.



dave...


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: command -v in postinsts violating policy

2002-05-25 Thread Branden Robinson
[You guys sure do appear to love private CCs...]

On Sat, May 25, 2002 at 10:59:50PM -0400, Clint Adams wrote:
 I have nothing against policy-compliant scripts.
 
 But why blessing a lie in policy is the option preferred by anyone is
 a mystery to me.

No one is advocating such a position.  It is a hallucination of your
fevered mind.

-- 
G. Branden Robinson|There is no housing shortage in
Debian GNU/Linux   |Lincoln today -- just a rumor that
[EMAIL PROTECTED] |is put about by people who have
http://people.debian.org/~branden/ |nowhere to live.-- G. L. Murfin


pgpR5DZ2opxwB.pgp
Description: PGP signature


Re: command -v in postinsts violating policy

2002-05-25 Thread Clint Adams
 No one is advocating such a position.  It is a hallucination of your
 fevered mind.

My mistake.  I could have sworn that several people suggested turning a
blind eye.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]