Debian Bug report logs - #539158
maintainer scripts which assume that printf is a builtin

Package: tech-ctte; Maintainer for tech-ctte is Technical Committee <debian-ctte@lists.debian.org>;

Reported by: Thorsten Glaser <tg@mirbsd.de>

Date: Wed, 29 Jul 2009 13:57:01 UTC

Severity: normal

Done: Andreas Barth <aba@not.so.argh.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Technical Committee <debian-ctte@lists.debian.org>:
Bug#539158; Package tech-ctte. (Wed, 29 Jul 2009 13:57:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thorsten Glaser <tg@mirbsd.de>:
New Bug report received and forwarded. Copy sent to Technical Committee <debian-ctte@lists.debian.org>. (Wed, 29 Jul 2009 13:57:03 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Thorsten Glaser <tg@mirbsd.de>
To: submit@bugs.debian.org
Subject: maintainer scripts which assume that printf is a builtin
Date: Wed, 29 Jul 2009 13:56:14 +0000 (UTC)
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-----




Information forwarded to debian-bugs-dist@lists.debian.org, Technical Committee <debian-ctte@lists.debian.org>:
Bug#539158; Package tech-ctte. (Wed, 29 Jul 2009 14:54:12 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thorsten Glaser <tg@mirbsd.de>:
Extra info received and forwarded to list. Copy sent to Technical Committee <debian-ctte@lists.debian.org>. (Wed, 29 Jul 2009 14:54:12 GMT) Full text and rfc822 format available.

Message #10 received at 539158@bugs.debian.org (full text, mbox):

From: Thorsten Glaser <tg@mirbsd.de>
To: Steve Langasek <vorlon@debian.org>
Cc: 539158@bugs.debian.org, 490605@bugs.debian.org
Subject: Re: […] assumes printf is a builtin
Date: Wed, 29 Jul 2009 14:47:19 +0000 (UTC)
Steve Langasek dixit:

>You're aware that [ (test) is also not listed as a mandatory shell built-in,
>according to the POSIX reference you've cited?

Interesting.

>So from that perspective, there are lots of POSIX failures.  Do you think we
>should treat [ specially, but not printf, because mksh happens to implement
>the one as a built-in but not the other?

I see that this weakens my argumentation, but I could still mention
that [ lies in /bin/ on BSD (and possibly a lot more OSes), and that
(almost?) all POSIX compatible shells available on Debian implement
it, whereas having printf as builtin is a feature in GNU bash, a mere
speed hack in dash, and not available in many other shells.

>No, portability beyond Debian is not relevant to Policy 10.4.  We've never
>been able to usefully rely on /bin/sh complying with POSIX on arbitrary
>other Unices.

I didn’t mean that; it was more in the sense of writing somewhat portable
POSIX (not Bourne) shell scripts.

>Does the mksh package somehow support switching /bin/sh automatically on
>installation?

Yes.

>who want to use mksh instead of dash/bash that /usr must be on the same
>partition as /.

udev EXPLICITLY sets $PATH to /bin:/sbin in its init script, so that is
not an option, unfortunately.

>>From a Policy perspective, it would be ideal to document the set of
>built-ins that we expect from a shell as /bin/sh, that scripts may rely on
>prior to the mounting of /usr.

Indeed. (Note that the printf in NetBSD® ash speed hack is rather recent.)

>Have you looked at this set yet, by chance,
>to see if there are others besides printf that mksh doesn't share with dash
>and bash?

Not yet, but I will and report.

I also have looked at adding a printf builtin to mksh, but I don’t quite
like it because it pulls in a *lot* of external symbols, including strtod,
and introduces floating point into the binary. This is undesirable (also
seeing that I have a project of an mksh linked against klibc, which I’d
like to offer for initramfs, replacing the one from klibc-utils *and*
busybox (if replacing both, at an actual size gain), for very little (in
terms of disc space) cost but some benefit).

bye,
//mirabilos
-- 
“It is inappropriate to require that a time represented as
 seconds since the Epoch precisely represent the number of
 seconds between the referenced time and the Epoch.”
	-- IEEE Std 1003.1b-1993 (POSIX) Section B.2.2.2




Information forwarded to debian-bugs-dist@lists.debian.org, Technical Committee <debian-ctte@lists.debian.org>:
Bug#539158; Package tech-ctte. (Wed, 29 Jul 2009 17:12:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Barth <aba@not.so.argh.org>:
Extra info received and forwarded to list. Copy sent to Technical Committee <debian-ctte@lists.debian.org>. (Wed, 29 Jul 2009 17:12:03 GMT) Full text and rfc822 format available.

Message #15 received at 539158@bugs.debian.org (full text, mbox):

From: Andreas Barth <aba@not.so.argh.org>
To: 539158@bugs.debian.org
Subject: Re: Bug#539158: […] assumes printf is a builtin
Date: Wed, 29 Jul 2009 19:03:38 +0200
* Thorsten Glaser (tg@mirbsd.de) [090729 16:46]:
> >So from that perspective, there are lots of POSIX failures.  Do you think we
> >should treat [ specially, but not printf, because mksh happens to implement
> >the one as a built-in but not the other?
> 
> I see that this weakens my argumentation, but I could still mention
> that [ lies in /bin/ on BSD (and possibly a lot more OSes), and that
> (almost?) all POSIX compatible shells available on Debian implement
> it, whereas having printf as builtin is a feature in GNU bash, a mere
> speed hack in dash, and not available in many other shells.


The case where we need to decide here is whether we want to overrule
the udev maintainer.

As it is, posix deprecated echo in favour of printf. I don't think it
would be right to require the udev maintainer to get rid of printf.

Also, both shells widely deployed in Debian provide printf as an
builtin, so I have to be convinced of the usecase of
yet-another-default-shell (and why is mksh better than dash as default
/bin/sh?).


As this is, I tend to the following resolution

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 as default option)


If one of the members of the tech ctte considers that we should either
overwrite the udev-maintainer or move printf to /bin, we should draft
another resolution text for that.



Cheers,
Andi




Information forwarded to debian-bugs-dist@lists.debian.org, Technical Committee <debian-ctte@lists.debian.org>:
Bug#539158; Package tech-ctte. (Wed, 29 Jul 2009 18:00:11 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thorsten Glaser <tg@mirbsd.de>:
Extra info received and forwarded to list. Copy sent to Technical Committee <debian-ctte@lists.debian.org>. (Wed, 29 Jul 2009 18:00:11 GMT) Full text and rfc822 format available.

Message #20 received at 539158@bugs.debian.org (full text, mbox):

From: Thorsten Glaser <tg@mirbsd.de>
To: Steve Langasek <vorlon@debian.org>
Cc: 539158@bugs.debian.org, 490605@bugs.debian.org
Subject: Re: [...] assumes printf is a builtin
Date: Wed, 29 Jul 2009 17:58:38 +0000 (UTC)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

Steve Langasek dixit:

>Have you looked at this set yet, by chance,
>to see if there are others besides printf that mksh doesn't share with dash

Here they are:

Builtins in mksh (-current from CVS), but not in dash (source from sid):
* bind (interactive)
* builtin
* fc (interactive)
* let (fancy for (( ... )) )
* mknod (another speed hack, OpenBSD's responsible for this one)
* print (Korn shell command)
* realpath (same as "readlink -f" from base)
* rename (similar to mv but doesn't copy; sometimes a life-saver)
* typeset (Korn shell command)
* whence (Korn shell command; whence -p approximately equals which)

Builtins in dash, but not in mksh:

* chdir (use cd instead)
* printf

dash builtins implemented as built-in macros in mksh:

* hash (alias -t)
* local (typeset)
* type (whence -v, but it's the same as command -V in dash+mksh)

The macro versions do not pose a threat because the macros are
"always" defined. (We had versions that didn't define them, ex-
cept local, for a /bin/sh, but these are long gone.)

So, the only mismatches are chdir (which could arguably be added
as a Debian-local patch, unless shows me the benefit of having it
upstream as well - if desired at all, that is; what does bash do?)
and printf (the topic of this discussion).

>and bash?

Having looked at dash, I think I don't need to, since the team
which converted /bin/sh to dash should already have done so ;-)

bye,
//mirabilos
- -- 
“It is inappropriate to require that a time represented as
 seconds since the Epoch precisely represent the number of
 seconds between the referenced time and the Epoch.”
	-- IEEE Std 1003.1b-1993 (POSIX) Section B.2.2.2
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MirBSD)

iQIVAwUBSnCN1Xa1NLLpkAfgAQOEPg//Wuj9yQbbDkiooDAObflE6hJzG/bpGvQF
ZNdCUX6p9wlvmpyIzXzOPf3+Q2XGyq8PaQ4O4ByX8J/oMrYG77M5NxzMh3L4DR/t
+a9DB90KS4YRRt1heQviJgHR+lxeYZLf9X/wlRSVaQ2x3cKeuO7KBCk3Hjkwir2e
Girza5gvtn+Za7ffvjGSHRYWQEcT28g1E/iyi9kwMLgw3A4REIRFouwF8ME1+wdT
jpF2nSqye1Y6G/5pZBrUjGsUNuOIfvoBK04s22K3y6vjwP8X2oM+OOte7H5/z3h9
xvvEJZx/BsCS9BmnOJd6OM2tK4eaA+2+NXdg45aMDNLuGZ5sq/XVoK36DgjF0PlM
0+Q81rZD7ulV6Gg72/Flty5bsv1ZrG+JpsUTv7dcOKmeyO7oJM0wFwkePqNkBNka
DmSgV4tIjscHxzZMUzldbkEDCUQBIH91ePf0q/SiWPLcPGnX83K1O5sarfIy5c52
UIckccUgIq2nYbVkxMTHV2YwNj8/oFTadoDTB8Z3E3/sLHFindBjcQuDOv+/YlNt
VISDa622whq6VQhs2CPU2K0+JLFjbpXd/16gTgBYTPCAPKXQA9vOFlPuVDF6Zmj7
aSzmTa0RwCOCsPXzOiVmZRNllJIri5tDvq1hqtvOPlH8acMQfgi3a49GVdAvx1ek
V1XmcXcQZ6k=
=2s5t
-----END PGP SIGNATURE-----




Added indication that bug 539158 blocks532343 Request was from Thorsten Glaser <tg@mirbsd.de> to control@bugs.debian.org. (Wed, 29 Jul 2009 18:00:19 GMT) Full text and rfc822 format available.

Information stored :
Bug#539158; Package tech-ctte. (Wed, 29 Jul 2009 18:09:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thorsten Glaser <tg@mirbsd.de>:
Extra info received and filed, but not forwarded. (Wed, 29 Jul 2009 18:09:02 GMT) Full text and rfc822 format available.

Message #27 received at 539158-quiet@bugs.debian.org (full text, mbox):

From: Thorsten Glaser <tg@mirbsd.de>
To: 539158-quiet@bugs.debian.org
Subject: Fwd: Bug#539158: [...] assumes printf is a builtin
Date: Wed, 29 Jul 2009 18:06:54 +0000 (UTC)
FYI,

I signed the eMail using OpenPGP, as per the documentation on
the website, but they still seem to bounce.

---------- Forwarded message ----------
From: debian-ctte-request@lists.debian.org
Message-ID: <20090729180236.5049D13A664D@liszt.debian.org>
Date: Wed, 29 Jul 2009 18:02:36 +0000 (UTC)
Subject: Re: Bug#539158: [...] assumes printf is a builtin

You are not subscribed to this list, so your submission was rejected.
Please subscribe to the list first and then repost your message.

A copy of your submission is included below.

---------------------------------------------------------------------------
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
[...]
 seconds between the referenced time and the Epoch.=E2=80=9D
=09-- IEEE Std 1003.1b-1993 (POSIX) Section B.2.2.2
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MirBSD)

iQIVAwUBSnCN1Xa1NLLpkAfgAQOEPg//Wuj9yQbbDkiooDAObflE6hJzG/bpGvQF
[...]




Information forwarded to debian-bugs-dist@lists.debian.org, Technical Committee <debian-ctte@lists.debian.org>:
Bug#539158; Package tech-ctte. (Wed, 29 Jul 2009 18:27:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Stone <mstone@debian.org>:
Extra info received and forwarded to list. Copy sent to Technical Committee <debian-ctte@lists.debian.org>. (Wed, 29 Jul 2009 18:27:04 GMT) Full text and rfc822 format available.

Message #32 received at 539158@bugs.debian.org (full text, mbox):

From: Michael Stone <mstone@debian.org>
To: 539158@bugs.debian.org
Subject: Re: POSIX utilities
Date: Wed, 29 Jul 2009 14:23:15 -0400
My suggestion would be that this is only an issue for scripts which run 
prior to /usr being mounted. That sort of script is expected to be 
somewhat oddball (as, e.g., required packages may not be available), and 
it may well be that it makes more sense for it to use a specific shell 
rather than /bin/sh. 

Mike Stone




Information forwarded to debian-bugs-dist@lists.debian.org, Technical Committee <debian-ctte@lists.debian.org>:
Bug#539158; Package tech-ctte. (Wed, 29 Jul 2009 18:48:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Stone <mstone@debian.org>:
Extra info received and forwarded to list. Copy sent to Technical Committee <debian-ctte@lists.debian.org>. (Wed, 29 Jul 2009 18:48:05 GMT) Full text and rfc822 format available.

Message #37 received at 539158@bugs.debian.org (full text, mbox):

From: Michael Stone <mstone@debian.org>
To: 539158@bugs.debian.org
Subject: [debian-ctte-request@lists.debian.org: Re: Bug#539158: POSIX utilities]
Date: Wed, 29 Jul 2009 14:37:56 -0400
It seems silly to have ctte get copies of bugs and then bounce them.

----- Forwarded message from debian-ctte-request@lists.debian.org -----

To: mstone@debian.org
Subject: Re: Bug#539158: POSIX utilities
From: debian-ctte-request@lists.debian.org

You are not subscribed to this list, so your submission was rejected.
Please subscribe to the list first and then repost your message.

A copy of your submission is included below.

---------------------------------------------------------------------------
My suggestion would be that this is only an issue for scripts which run 
prior to /usr being mounted. That sort of script is expected to be 
somewhat oddball (as, e.g., required packages may not be available), and 
it may well be that it makes more sense for it to use a specific shell 
rather than /bin/sh. 

Mike Stone



----- End forwarded message -----




Information forwarded to debian-bugs-dist@lists.debian.org, Technical Committee <debian-ctte@lists.debian.org>:
Bug#539158; Package tech-ctte. (Wed, 29 Jul 2009 19:30:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Russ Allbery <rra@debian.org>:
Extra info received and forwarded to list. Copy sent to Technical Committee <debian-ctte@lists.debian.org>. (Wed, 29 Jul 2009 19:30:03 GMT) Full text and rfc822 format available.

Message #42 received at 539158@bugs.debian.org (full text, mbox):

From: Russ Allbery <rra@debian.org>
To: 539158@bugs.debian.org
Subject: Re: Bug#539158: […] assumes printf is a builtin
Date: Wed, 29 Jul 2009 12:27:03 -0700
Andreas Barth <aba@not.so.argh.org> writes:

> As this is, I tend to the following resolution
>
> 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 as default option)

Yup, that sounds right to me as well.  There is a long-standing Policy bug
about the handling of built-ins in general (and a huge lack of time on my
part at the moment), so this is a known buggy area, but Policy feels like
the right place to handle it.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>




Information forwarded to debian-bugs-dist@lists.debian.org, Technical Committee <debian-ctte@lists.debian.org>:
Bug#539158; Package tech-ctte. (Thu, 30 Jul 2009 07:57:27 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thorsten Glaser <t.glaser@tarent.de>:
Extra info received and forwarded to list. Copy sent to Technical Committee <debian-ctte@lists.debian.org>. (Thu, 30 Jul 2009 07:57:27 GMT) Full text and rfc822 format available.

Message #47 received at 539158@bugs.debian.org (full text, mbox):

From: Thorsten Glaser <t.glaser@tarent.de>
To: aba@not.so.argh.org, 539158@bugs.debian.org
Subject: Bug#539158: [#] assumes printf is a builtin
Date: Thu, 30 Jul 2009 09:38:59 +0200 (CEST)
Hi again,

fact is that the udev maintainer uses an idiom which is broken,
so I think your resolution 1 is flawed.

I propose that it be changed to have udev use #!/bin/dash (in
sid) and #!/bin/bash (in lenny) instead of #!/bin/sh as shebang
line, since otherwise, no action at all would be taken.

Of course, I’m still in favour of getting the problem really
fixed and documented in policy, but if that (change of the
shebang line for scripts not having /usr/bin in their path)
is all I get, I’ll be okay with it.

Current behaviour, and the result of your unchanged resolution
suggestion, would be in extreme unfavour towards mksh, since it
*is* a Policy compliant /bin/sh-capable shell, where the udev
maintainer actively breaks EVERY OTHER aspect of the system (by
making it unbootable with mksh as /bin/sh), whereas changing his
shebang line would not affect the rest of the system.

//mirabilos
-- 
Sometimes they [people] care too much: pretty printers [and syntax highligh-
ting, d.A.] mechanically produce pretty output that accentuates irrelevant
detail in the program, which is as sensible as putting all the prepositions
in English text in bold font.	-- Rob Pike in "Notes on Programming in C"




Information forwarded to debian-bugs-dist@lists.debian.org, Technical Committee <debian-ctte@lists.debian.org>:
Bug#539158; Package tech-ctte. (Thu, 30 Jul 2009 08:15:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Barth <aba@not.so.argh.org>:
Extra info received and forwarded to list. Copy sent to Technical Committee <debian-ctte@lists.debian.org>. (Thu, 30 Jul 2009 08:15:03 GMT) Full text and rfc822 format available.

Message #52 received at 539158@bugs.debian.org (full text, mbox):

From: Andreas Barth <aba@not.so.argh.org>
To: 539158@bugs.debian.org
Subject: Re: Bug#539158: […] assumes printf is a builtin
Date: Thu, 30 Jul 2009 10:09:02 +0200
* Russ Allbery (rra@debian.org) [090729 21:33]:
> Andreas Barth <aba@not.so.argh.org> writes:
> 
> > As this is, I tend to the following resolution
> >
> > 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 as default option)
> 
> Yup, that sounds right to me as well.  There is a long-standing Policy bug
> about the handling of built-ins in general (and a huge lack of time on my
> part at the moment), so this is a known buggy area, but Policy feels like
> the right place to handle it.

As in-person discussions with Don, Ian and Steve pointed in the same
direction, I intend to call on votes on that text later today unless
somebody disagrees.



Cheers,
Andi




Information forwarded to debian-bugs-dist@lists.debian.org, Technical Committee <debian-ctte@lists.debian.org>:
Bug#539158; Package tech-ctte. (Thu, 30 Jul 2009 10:27:18 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bdale Garbee <bdale@gag.com>:
Extra info received and forwarded to list. Copy sent to Technical Committee <debian-ctte@lists.debian.org>. (Thu, 30 Jul 2009 10:27:18 GMT) Full text and rfc822 format available.

Message #57 received at 539158@bugs.debian.org (full text, mbox):

From: Bdale Garbee <bdale@gag.com>
To: Andreas Barth <aba@not.so.argh.org>, 539158@bugs.debian.org
Subject: Re: Bug#539158: […] assumes printf is a builtin
Date: Thu, 30 Jul 2009 12:03:34 +0200
On Thu, 2009-07-30 at 10:09 +0200, Andreas Barth wrote:
> * Russ Allbery (rra@debian.org) [090729 21:33]:
> > Andreas Barth <aba@not.so.argh.org> writes:
> > 
> > > As this is, I tend to the following resolution
> > >
> > > 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 as default option)
> > 
> > Yup, that sounds right to me as well.  There is a long-standing Policy bug
> > about the handling of built-ins in general (and a huge lack of time on my
> > part at the moment), so this is a known buggy area, but Policy feels like
> > the right place to handle it.
> 
> As in-person discussions with Don, Ian and Steve pointed in the same
> direction, I intend to call on votes on that text later today unless
> somebody disagrees.

I agree.

Bdale






Information forwarded to debian-bugs-dist@lists.debian.org, Technical Committee <debian-ctte@lists.debian.org>:
Bug#539158; Package tech-ctte. (Thu, 30 Jul 2009 10:33:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Barth <aba@not.so.argh.org>:
Extra info received and forwarded to list. Copy sent to Technical Committee <debian-ctte@lists.debian.org>. (Thu, 30 Jul 2009 10:33:04 GMT) Full text and rfc822 format available.

Message #62 received at 539158@bugs.debian.org (full text, mbox):

From: Andreas Barth <aba@not.so.argh.org>
To: 539158@bugs.debian.org
Subject: Call for Votes on Bug#539158: […] assumes printf is a builtin
Date: Thu, 30 Jul 2009 12:15:28 +0200
Hi,

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

(As there is already a bug on the policy on the issue of builtins, I'd
like to leave it to the policy team in case of 1 whether they want to
clone this bug report or not.)


Cheers,
Andi




Information forwarded to debian-bugs-dist@lists.debian.org, Technical Committee <debian-ctte@lists.debian.org>:
Bug#539158; Package tech-ctte. (Thu, 30 Jul 2009 10:33:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Barth <aba@not.so.argh.org>:
Extra info received and forwarded to list. Copy sent to Technical Committee <debian-ctte@lists.debian.org>. (Thu, 30 Jul 2009 10:33:05 GMT) Full text and rfc822 format available.

Message #67 received at 539158@bugs.debian.org (full text, mbox):

From: Andreas Barth <aba@not.so.argh.org>
To: 539158@bugs.debian.org
Subject: Re: Call for Votes on Bug#539158: […] assumes printf is a builtin
Date: Thu, 30 Jul 2009 12:15:50 +0200
* Andreas Barth (aba@not.so.argh.org) [090730 12:15]:
> | 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 12.


Cheers,
Andi




Bug No longer marked as found in versions 1. Request was from Don Armstrong <don@debian.org> to control@bugs.debian.org. (Thu, 30 Jul 2009 14:33:03 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Technical Committee <debian-ctte@lists.debian.org>:
Bug#539158; Package tech-ctte. (Thu, 30 Jul 2009 14:36:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Don Armstrong <don@debian.org>:
Extra info received and forwarded to list. Copy sent to Technical Committee <debian-ctte@lists.debian.org>. (Thu, 30 Jul 2009 14:36:05 GMT) Full text and rfc822 format available.

Message #74 received at 539158@bugs.debian.org (full text, mbox):

From: Don Armstrong <don@debian.org>
To: 539158@bugs.debian.org
Subject: Re: Bug#539158: Call for Votes on Bug#539158: […] assumes printf is a builtin
Date: Thu, 30 Jul 2009 07:34:06 -0700
[Message part 1 (text/plain, inline)]
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.


Don Armstrong

-- 
An elephant: A mouse built to government specifications.
 -- Robert Heinlein _Time Enough For Love_ p244

http://www.donarmstrong.com              http://rzlab.ucr.edu
[signature.asc (application/pgp-signature, inline)]

Reply sent to Andreas Barth <aba@not.so.argh.org>:
You have taken responsibility. (Thu, 30 Jul 2009 16:51:08 GMT) Full text and rfc822 format available.

Notification sent to Thorsten Glaser <tg@mirbsd.de>:
Bug acknowledged by developer. (Thu, 30 Jul 2009 16:51:08 GMT) Full text and rfc822 format available.

Message #79 received at 539158-done@bugs.debian.org (full text, mbox):

From: Andreas Barth <aba@not.so.argh.org>
To: 539158-done@bugs.debian.org
Cc: debian-policy@lists.debian.org
Subject: Re: Bug#539158: Call for Votes on Bug#539158: […] assumes printf is a builtin
Date: Thu, 30 Jul 2009 18:49:44 +0200
* 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




Information forwarded to debian-bugs-dist@lists.debian.org, Technical Committee <debian-ctte@lists.debian.org>:
Bug#539158; Package tech-ctte. (Thu, 30 Jul 2009 18:15:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Steve Langasek <vorlon@debian.org>:
Extra info received and forwarded to list. Copy sent to Technical Committee <debian-ctte@lists.debian.org>. (Thu, 30 Jul 2009 18:15:07 GMT) Full text and rfc822 format available.

Message #84 received at 539158@bugs.debian.org (full text, mbox):

From: Steve Langasek <vorlon@debian.org>
To: 539158@bugs.debian.org
Cc: 490605@bugs.debian.org
Subject: Re: Bug#490605: Bug#532324: udev init script bash+dashism: assumes printf is a builtin
Date: Thu, 30 Jul 2009 20:12:38 +0200
On Wed, Jul 29, 2009 at 01:25:48PM +0000, Thorsten Glaser wrote:
> ① 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.

For my part, I reject both of these; we had a discussion yesterday among
four members of the TC present at DebConf, and there is a clear consensus
that "echo" should be considered deprecated in favor of printf (at least in
certain cases), so we should not override the maintainer for using it.

> ③ 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.

This has the consequence of increasing the footprint of the root partition
for all users, not just those who opt to install mksh.  I don't think this
is the appropriate tradeoff.

> ④ 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.

This is definitely the wrong answer.

> ⑤ 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 don't think we would ever want to phrase this in terms of "bash+dash", but
certainly if there are built-ins common to these implementations, that we
have a specific reason for wanting to let scripts rely on (e.g.: printf
obsoletes echo in some cases, and echo is a required built-in), then that
should be documented in Policy.

Cheers,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek@ubuntu.com                                     vorlon@debian.org




Information forwarded to debian-bugs-dist@lists.debian.org, Technical Committee <debian-ctte@lists.debian.org>:
Bug#539158; Package tech-ctte. (Mon, 03 Aug 2009 21:36:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bdale Garbee <bdale@gag.com>:
Extra info received and forwarded to list. Copy sent to Technical Committee <debian-ctte@lists.debian.org>. (Mon, 03 Aug 2009 21:36:07 GMT) Full text and rfc822 format available.

Message #89 received at 539158@bugs.debian.org (full text, mbox):

From: Bdale Garbee <bdale@gag.com>
To: Andreas Barth <aba@not.so.argh.org>, 539158@bugs.debian.org
Subject: Re: Bug#539158: Call for Votes on Bug#539158: […] assumes printf is a builtin
Date: Mon, 03 Aug 2009 12:14:15 -0500
[Message part 1 (text/plain, inline)]
On Thu, 2009-07-30 at 12:15 +0200, Andreas Barth wrote:
> Hi,
> 
> 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
> 
> (As there is already a bug on the policy on the issue of builtins, I'd
> like to leave it to the policy team in case of 1 whether they want to
> clone this bug report or not.)

I vote 1 2.

Bdale

[signature.asc (application/pgp-signature, inline)]

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 01 Sep 2009 07:36:48 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 23 21:50:50 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.