Re: More than 10% of all Fedora spec files are not POSIX sh compliant

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

 



On 22/03/19 19:17 +0100, Dridi Boukelmoune wrote:
> On Fri, Mar 22, 2019 at 6:04 PM Japheth Cleaver <cleaver@xxxxxxxxxxxxxx> wrote:
>> IMO the situation that we're in now ("Assume you're running in
>> bash, but called as -/bin/sh") is a worst-of-both-worlds middle
>> ground, somewhat akin to mandating webpages be written in IE Quirks
>> Mode for all time. It's neither pedantically correct, nor flexible
>> for users and downstreams. And the resolution from all of this last
>> time remains lacking in the guarantees that an independent spec
>> should have:
> 
> The result is what we call bashisms where people put /bin/sh in their
> shebangs but don't realize they are using GNU extensions, and that
> goes for "standard" programs like awk too where people are not aware
> of the differences regarding what's on their machine and what POSIX
> mandates.

Good point, and that's something capable of making upstream
maintenance cumbersome at times (sed is a common pet peeve),
but that's an order of magnitude more demanding level when it
comes to portability, and with Fedora settled firmly just around
GNU approaches and extensions, there's hardly a pressing need for
the spec files to come anywhere close (but if so, the restrictions
should not be limited to shell interpreter alone as remarked,
since POSIX compliance is a wider topic).

> So with both a default non-POSIX-compliant shell (by default, I'm
> aware) and non-POSIX-compliant options to the basic commands it takes
> more effort to write portable shell.
> 
> To be clear, bash is my favorite shell and the one I use, but I'd
> prefer that running it as sh or /bin/sh would be enough to enter
> POSIX mode.

-- 
Jan (Poki)

Attachment: pgp_bS0spcg2F.pgp
Description: PGP signature

_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux