[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#539158: marked as done (maintainer scripts which assume that printf is a builtin)



Your message dated Thu, 30 Jul 2009 18:49:44 +0200
with message-id <20090730164944.GJ19768@mails.so.argh.org>
and subject line Re: Bug#539158: Call for Votes on Bug#539158: […] assumes printf is a builtin
has caused the Debian Bug report #539158,
regarding maintainer scripts which assume that printf is a builtin
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
539158: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=539158
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: tech-ctte
Version: 1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

Debian Bug Tracking System dixit:

>Processing commands for control@bugs.debian.org:
>
>> clone 532324 -1
>Bug number 532324 not found. (Is it archived?)

Okay, let’s try this again… this time a fresh report.

For your convenience:

• The original problem:
  http://bugs.debian.org/532324

• A related PR which waldi referred me to:
  http://bugs.debian.org/490605

────────────────────────────────────────────────────────────────────────

Debian Policy 10.4 states that shell scripts using a /bin/sh shebang
line must conform to POSIX Shell, with a few (listed) exceptions.

http://www.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html
specifies, under “Command Search and Execution” 1.c, a list of required
shell builtins. I cannot find printf(1) there, or in any other place of
current SUSv3 (online edition), for that matter, except as stand-alone
utility.

udev uses /bin:/sbin as $PATH whereas printf(1) lies in /usr/bin.

udev uses printf nevertheless, assuming it right because GNU bash sup-
ports it and dash, unlike posh (I think) and other Debian Policy 10.4
compliant /bin/sh-capable shells, implements it as a speed hack (lower
boot times combined with portable use of printf, since echo isn’t).

I call for the CTTE to decide that no maintainer is above Policy 10.4
and that udev shall be fixed to not use printf as builtin, or require
a different shebang.


My proposals:


① udev in sid will be changed to use "#!/bin/dash" as shebang;
  udev in lenny will be changed to use "#!/bin/bash" as shebang.
  The change in lenny is necessary, as it is affected as well.


② udev in both sid and lenny will be changed to not use printf
  any more.


Both ① and ② need to override the maintainer’s decision.
I would be most pleased if one of the above were to be decided upon.


③ coreutils will be changed to move /usr/bin/printf to /bin/printf
  and have a /usr/bin/printf@ → ../../bin/printf symbolic link.

  I do not like this. It is non-standard, an evil workaround, and
  will(!) lead to the creation of more unportable scripts.


④ dash will be changed to have the printf builtin removed, so that
  maintainers will be forced to change their scripts.

  I do not like this. Debian uses dash to provide a rather minimal
  /bin/sh for quick system startup. While the presence of a printf
  builtin is a speed hack, it serves this purpose well. Other shells,
  including bash, ksh93, mksh and posh, but not pdksh, can be used
  to validate scripts instead.


⑤ Debian changes policy to allow the use of bash+dash as /bin/sh.

  I do not like this, for similar reasons as in ③, as well as for
  the fact that I fought to have mksh an allowed /bin/sh in Debian,
  which has led to improvements upstream. These may be personal,
  but I expect this proposal to be rejected due to the unportabi-
  lity argument.


I think using printf is okay *as long* as it it possible for the
script to pick it up in /usr/bin/ and *not* rely on an unportable
builtin. The whole point of Policy 10.4 is portability, and maybe
even portability beyond Debian. It _is_ well-known, after all,
that shell and utility "echo" are both unportable. (This serves
as comment to #490605.)

The motion to have maintainer scripts, whether in udev or other
places, fixed so that /bin/sh can be a shell other than GNU bash
or dash, is supported (as in, they don't like the current situa-
tion) by the DDs Alexander Wirt, Gerfried Fuchs, and possibly
others.

Thank you very much for your consideration.

//mirabilos – mksh Debian Maintainer – Project Leader, The MirOS Project
- -- 
I believe no one can invent an algorithm. One just happens to hit upon it
when God enlightens him. Or only God invents algorithms, we merely copy them.
If you don't believe in God, just consider God as Nature if you won't deny
existence.		-- Coywolf Qi Hunt
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MirBSD)

iQIVAwUBSnBUkHa1NLLpkAfgAQM5/Q//T4XbcJd/i2yajMeh+9TfZ9Jjd9iqnBhM
K7x42RTtR0glFW6D/q+MorLBJBRgNcipH9pWq6ufanGB9b0h0zlxKEPfms/dDs+w
Ziu0mEQxrY6xqXoscJJMGeFRzz6m4jwPE3NpaytnoYPXmKdRUXf65wy8ClZM4kZP
qsUe5ctXfr6Tc+oOHaHM6V4N7szJeGpyaotqlsqVn7WK4Xfw/OIWRU6Fv1iuwSug
Evg+NYXzrMM86VCycevgQyu6AHmKDeOdh7XjpZ0Uj4NiRGbNE0F1uoXv1B67WBxg
ZREau22YVM5UbStFxrd2FBsMIYsCFxYgVCAsB77uv3NhD94nDLDjHjw7naw+pcmd
LaY2wjjFVA5w+MaEqNjVm8bKAtw9ltIIct3K0H+czDBnf4ccqNs/C4nXpfSMbQs1
Xn0mv4cGeTzPwolOZH74xRV06ZZSxr56EejIE0VT/VAw5UqAhLdaLQS35j/G1du4
tOcMlh4pGZPKrWzfDrSDHqIYJTbeM+FqT1ibIN1A52hzZh82o5SNZtuZBEFqvDxg
Bh0b6DRr7fmRqIuR47IN6yDG3oPB5DDIZNZ0DfslRijRbjyjgbnZmsjgLeaPEUm3
2C/P9g7vHI4DSD0RbA58mZkb1rfMqTr0cvsSmZDCkv6Qiv+jdKXIH3ZPsVgk05sg
MOOIbzaeLgU=
=hQYF
-----END PGP SIGNATURE-----



--- End Message ---
--- Begin Message ---
* Don Armstrong (don@debian.org) [090730 16:37]:
> On Thu, 30 Jul 2009, Andreas Barth wrote:
> > I'm calling on votes on the following options:
> > 
> > | 1. The Technical Committee refuses to overrule the udev maintainer, as
> > | requested by Bug 539158. The committee suggests that the policy
> > | maintainers document in the policy what the current best practices on
> > | providing printf (and similar functions used in the initrd like [ and
> > | test) by shells.
> >  
> > | 2. Further discussion
> 
> Voting 1 2.

As we require a 3:1-majority and we have 7 people, so with two people
voting against the overruling, we can have at maximum 5 peoples voting
for overruling the developer, which means we already failed the
supermajority requirements.

This means the outcome is no longer unsure, and the bug can be closed.

Russ, Manoj, in case you would like another bug report at the policy
team, please feel free to reopen, clone and close this bug (or just
file a new one).


Cheers,
Andi


--- End Message ---

Reply to: