Re: On the road to a smaller and more POSIX-compliant base...
On Wed, Jun 16, 2004 at 06:00:51PM +0200, Przemyslaw Brojewski wrote:
> On Wed, Jun 16, 2004 at 04:50:19PM +0200, David Weinehall wrote:
> > Hoping to be able to make Debian an even better platform for embedded
> > systems, I have patched (almost) all packages in base to remove use of
> > XSI:isms, csh:isms, bash:isms, and probably a GNU:ism or two;
> > (...) I'm going to continue this work in an attempt to make
> > base able to use busybox as an replacement for various other things.
> Woohooo! This message just made my day.
> > I have only just started submitting the patches to the various
> > package-maintainers, and I don't want to rush this,
> Don't let it stall either.
As a follow-up, I've now reached the stage where I've posted some
60:ish bug-reports complete with patches. 10 of these has been
accepted, 1 more is pending upload, and at least a few others has
indicated that they intend to merge my patches.
So far, only one package-maintainer has displayed reluctance (and
flagged my bug-report resolved without any further action), but I hope
this is a temporary reaction.
Discussions are currently taking place on debian-policy concerning
POSIX-compliance in scripts, and it seems that POSIX with the extensions
echo -n (already existing deviation from POSIX) and command -v (used in
a lot of packages and quite complicated to replace) might become our
new policy. Because of this, I'm not touching command -v at the moment.
Hopefully, the discussions on debian-policy will lead to a requirement
in form of a must rather than a should, but for this to be realistic,
at least all packages in base and all packages of priority required,
important, and a fair lot of popular packages from standard need to be
If anyone here on this list maintains any such packages, please let me
know, and I'll prioritise your packages when I do checks; gaining
momentum is good to get things like this to really have an effect.
Seeing these kind of fixes going in en masse might sway undecided
I have patches pending submission for a few more packages, but the
things I'm wrestling with now are mostly upstream bugs, which naturally
will take a lot more work (things like dbs/cdbs makes it a bit too easy
to miss such bugs, since the source for these packages are tarballs that
I need to remember to untar before doing checks...)
Anyway, if you have a bit spare-time, consider installing a chroot
using dash as /bin/sh, and note where things break (and after
double-checking with my bug-reports , report them to the BTS and,
preferably, to me...). When satisfied that your favourite packages work
with dash, uninstall them completely (purge) and try the same things
again, only this time with posh as /bin/sh. posh is _very_ strict,
and bound to notice a lot more POSIX-violations, but will also cause
things to choke with invoke-rc.d, since I haven't submitted my
patch for that package yet...
For a good insight into what can be regarded as POSIX-compliant,
have a look at . Things that are marked UP, XSI, etc are NOT part
of the strict standard, and such things will break with posh, and may
also break with dash and other shells. Note that I'm also trying to
fix invocations of external commands to be POSIX-compliant, so for
instance I'm changing chown <user>.<group> to chown <user>:<group>,
tail -1 to tail -n 1 and so on.
The most common pitfalls in maintainer-scripts are currently
use of the XSI-extensions in , , , , and , with
occurences of `local' and `function' sneaking in here and there.
Regards: David Weinehall
/) David Weinehall <email@example.com> /) Northern lights wander (\
// Maintainer of the v2.0 kernel // Dance across the winter sky //
\) http://www.acc.umu.se/~tao/ (/ Full colour fire (/