Package: tech-ctte Version: 1 -----BEGIN PGP SIGNED MESSAGE----- Hash: RIPEMD160
Debian Bug Tracking System dixit: >Processing commands for cont...@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----- -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org