Bug#539158: […] assumes printf is a builtin

View: New views
11 Messages — Rating Filter:   Alert me  

Parent Message unknown Bug#539158: […] assumes printf is a builtin

by Thorsten Glaser-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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



--
To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@...
with a subject of "unsubscribe". Trouble? Contact listmaster@...


Bug#539158: […] assumes printf is a builtin

by Andreas Barth :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

* Thorsten Glaser (tg@...) [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



--
To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@...
with a subject of "unsubscribe". Trouble? Contact listmaster@...


Bug#539158: […] assumes printf is a builtin

by Russ Allbery-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Andreas Barth <aba@...> 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@...)               <http://www.eyrie.org/~eagle/>



--
To UNSUBSCRIBE, email to debian-ctte-REQUEST@...
with a subject of "unsubscribe". Trouble? Contact listmaster@...


Bug#539158: […] assumes printf is a builtin

by Andreas Barth :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

* Russ Allbery (rra@...) [090729 21:33]:

> Andreas Barth <aba@...> 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



--
To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@...
with a subject of "unsubscribe". Trouble? Contact listmaster@...


Bug#539158: […] assumes printf is a builtin

by Bdale Garbee :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, 2009-07-30 at 10:09 +0200, Andreas Barth wrote:

> * Russ Allbery (rra@...) [090729 21:33]:
> > Andreas Barth <aba@...> 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





--
To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@...
with a subject of "unsubscribe". Trouble? Contact listmaster@...


Bug#539158: Call for Votes on Bug#539158: […] assumes printf is a builtin

by Andreas Barth :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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



--
To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@...
with a subject of "unsubscribe". Trouble? Contact listmaster@...


Bug#539158: Call for Votes on Bug#539158: […] assumes printf is a builtin

by Andreas Barth :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

* Andreas Barth (aba@...) [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



--
To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@...
with a subject of "unsubscribe". Trouble? Contact listmaster@...


Bug#539158: Call for Votes on Bug#539158: […] assumes printf is a builtin

by Don Armstrong :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 (196 bytes) Download Attachment

Re: Bug#539158: Call for Votes on Bug#539158: […] assumes printf is a builtin

by Russ Allbery-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Andreas Barth <aba@...> writes:

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

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


attachment0 (202 bytes) Download Attachment

Bug#539158: Call for Votes on Bug#539158: […] assumes printf is a builtin

by Bdale Garbee :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 (196 bytes) Download Attachment

Re: Bug#539158: Call for Votes on Bug#539158: […] assumes printf is a builtin

by Manoj Srivastava :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

        manoj
--
If it glistens, gobble it! Zippy the Pinhead
Manoj Srivastava <srivasta@...> <http://www.debian.org/~srivasta/>  
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C


attachment0 (202 bytes) Download Attachment