• dash and hidden bashisms in configure scripts

    From Andrej Shadura@21:1/5 to All on Wed Nov 3 12:00:03 2021
    Hi all,

    Yesterday I uploaded dash with LINENO feature switched on again, which has the side effect of exposing bashisms in configure scripts. Previously, they were obscured by the fact that autoconf requires LINENO, so when choosing a shell, it selected bash,
    not dash.

    After some discussion on IRC I agreed that it would probably be better to revert the change and upload it to experimental instead. I will try and do a rebuild of potentially affected packages to make sure we can fix them before I try enabling LINENO
    again.

    [1]: https://bugs.debian.org/582952
    [2]: https://bugs.debian.org/842242

    --
    Cheers,
    Andrej

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sam Hartman@21:1/5 to All on Wed Nov 10 19:20:04 2021
    "Andrej" == Andrej Shadura <andrew@shadura.me> writes:

    Andrej> Hi all, Yesterday I uploaded dash with LINENO feature
    Andrej> switched on again, which has the side effect of exposing
    Andrej> bashisms in configure scripts. Previously, they were
    Andrej> obscured by the fact that autoconf requires LINENO, so when
    Andrej> choosing a shell, it selected bash, not dash.

    Andrej> After some discussion on IRC I agreed that it would probably
    Andrej> be better to revert the change and upload it to experimental
    Andrej> instead. I will try and do a rebuild of potentially affected
    Andrej> packages to make sure we can fix them before I try enabling
    Andrej> LINENO again.

    Andrej> [1]: https://bugs.debian.org/582952 [2]:
    Andrej> https://bugs.debian.org/842242

    Andrej> -- Cheers, Andrej


    I understand that it's generally better to fix bashisms in configure
    scripts.
    Is it possible to force autoconf to prefer bash for a given configure
    script if it's difficult or undesirable to fix bashisms in a configure
    script?

    Yes, I realize that it limits portability to systems with bash.
    And yet, there are a lot of systems with bash:-)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andrej Shadura@21:1/5 to Sam Hartman on Wed Nov 10 20:00:02 2021
    Hi Sam,

    On Wed, 10 Nov 2021, at 19:18, Sam Hartman wrote:
    I understand that it's generally better to fix bashisms in configure
    scripts.
    Is it possible to force autoconf to prefer bash for a given configure
    script if it's difficult or undesirable to fix bashisms in a configure script?

    Yes, passing CONFIG_SHELL=/bin/bash to configure with do the thing.

    Yes, I realize that it limits portability to systems with bash.
    And yet, there are a lot of systems with bash:-)

    Well, we might make bash non-essential at one point. OTOH development systems are likely to have it anyway.

    --
    Cheers,
    Andrej

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Laager@21:1/5 to Andrej Shadura on Wed Nov 10 20:20:01 2021
    This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --5xreRZfCDi73hNaeh2cD8DbdFE3rbxUKl
    Content-Type: text/plain; charset=utf-8; format=flowed
    Content-Language: en-US
    Content-Transfer-Encoding: quoted-printable

    On 11/10/21 12:50 PM, Andrej Shadura wrote:
    On Wed, 10 Nov 2021, at 19:18, Sam Hartman wrote:
    I understand that it's generally better to fix bashisms in configure
    scripts.
    Is it possible to force autoconf to prefer bash for a given configure
    script if it's difficult or undesirable to fix bashisms in a configure
    script?

    Yes, passing CONFIG_SHELL=/bin/bash to configure with do the thing.

    Can we just enable LINENO in dash then, let the other packages FTBFS,
    and people who care about the packages that FTBFS can either:

    A) Fix the bashisms, or
    B) Add CONFIG_SHELL=/bin/bash to their ./configure invocation.

    bash is currently Essential, so there's no need for a Build-Depends on
    bash for option B right now.

    A might be easy, and B is definitely trivial.

    It sounds like there are real benefits to enabling LINENO in dash.
    LINENO support is apparently required by POSIX, so this fixes dash in
    that regard (582952 comment #10) and for those packages using autoconf
    without bashisms, dash will speed them up (842242 comment #5).

    Bug #582952 (the first time LINENO was enabled in dash) was from 2010. I understand reverting the change to dash if it was near a release. But
    that's not the case right now and at this point, it's been ELEVEN YEARS.
    It's time to move forward.

    --
    Richard


    --5xreRZfCDi73hNaeh2cD8DbdFE3rbxUKl--

    -----BEGIN PGP SIGNATURE-----

    iQIzBAEBCgAdFiEE1Ot9lOeOTujs4H+U+HlhmcBFhs4FAmGMGo8ACgkQ+HlhmcBF hs6coBAAh5Z8zqXaLswsQpWDgx+IATqpbJmrH59IOIr2F080F2GOZWx2q6MsKTQW 2p+lV8ztKU3YTXjFvnobq6mI+uYU36xrG9OthjkUL5usKCPK8lYZAylcV+Mmn9S6 NP7T/BJVGOcP5c593vr6fb+tEibEkcFnhIp3s1tPizn8oJAPaIBLSSMcMIsNw1i+ Q+5PgcaCBtC2oVStI61VB2qqdpPdcTM3+DQLbwMeTdZrY4XSsQCBexNpH6C5MONL eUL2VMRW44fvvT7ll4MEQjLl5lvnn9u3WA6DL0Y9MUm2U8B1ik3wQy0H3B44otgQ LEQQ1SE0x69YGwBNl22l8e68KwddSVguEfhvt+FUFxMwrzeVcfp5cFbVz8zxe53a b2CFdtoPGKNO4gOfi6aheSBHuOE3uMKIvpmvUl+ThyUEdRACLlICKs8f5ztiDnlY wZ9KNXEbTM79iviqAKU4dVWOuEsJARuC1KEcmrDFdM2xBOzqP/O96HMuPsMWRwah lab7CvBc/0SeynccEiUeA+BRaKS9tOYwsmHCNW0/DQE0l6tjMjW2mqIC9ldqUb0z L/f91dcyS6nvjnD2FugpspAgL9xdnbRsdfI0HTQO9aL4m81yxdfpIG+UmtwAmdFy aMcWIJKbfwDqER3A8L7o9zCEsgJoH3HMjDcAhITU3+SpafUHrMk=
    =vEJI
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A@21:1/5 to Andrej Shadura on Wed Nov 10 20:20:01 2021
    "Andrej Shadura" <andrew@shadura.me> writes:

    Well, we might make bash non-essential at one point. OTOH development
    systems are likely to have it anyway.

    A compromise could be to make it build-essential instead.

    - ilmari

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Johannes Schauer Marin Rodrigues@21:1/5 to All on Wed Nov 10 23:30:02 2021
    Quoting Richard Laager (2021-11-10 20:16:31)
    Can we just enable LINENO in dash then, let the other packages FTBFS, and people who care about the packages that FTBFS can either:

    in the best case, a package will FTBFS but it can also happen that the configure script will just do something different without failing. The right way to approach this if we want LINENO support in dash would be to rebuild all packages affected by this with and without dash with LINENO support and check if those that do not FTBFS still build bit-by-bit reproducibly.

    Thanks!

    cheers, josch
    --==============y76611579577884636=MIME-Version: 1.0
    Content-Transfer-Encoding: 7bit
    Content-Description: signature
    Content-Type: application/pgp-signature; name="signature.asc"; charset="us-ascii"

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEElFhU6KL81LF4wVq58sulx4+9g+EFAmGMR1UACgkQ8sulx4+9 g+GjjxAAukSdGrg+Y6akBNHHgxJWCTrHNeo8qXWBTSGdFkcSDR5vdgDVRZHQmlTK 2ZrtCUbWyBKr5BC/vph2Gd3swTqGycyvFrBFVRfs6BWc/UdkrPAv89EmLR4+ex78 ieFg5aGo2Gg+XUWwE3UjHyVm/WRVjWP9MfbMTqrO7/OaQ9fF+LELM55y0cX5Zmzd cQC0OreptzFp5HkQCoPlgLJbUBigv8aMJ2NIm5+yUDQzIOxVdoDXg8IcKA4sgIZv TCL9nb+ik5Dzv/tlzhlRpGmv/UBp6MS83JwkY/HMwF9cGsOx/t05Du9T4jVejL8P 1Rzz9pQJXPTPJxp9kA9llgm9TyYwjCrz5jfBfYkbR6+4Vd0k6rH76IEUeX4r78vQ kM/Q+k91H9qqN0YeF4xzD0U48QQeRgM8xQrRMgVvxe8jHWz0ftnqcpAXZYkU+nVu 5grzs0b4UnQAJYB2IjN4VVgZqXEKjL3DyEH4Ink7h8euJONzq5us2HX1oIvbst0c JTyCh1NuwVSVCdtJb/CGyrSDQNV9GWs348FwHA0uT7xho+HwvWR/Tzu07zk5IxYF hYXfW/sPd43OQLn+Ox5iyMr+eii2UriC/wvCRehl7TdVShiyfwdvigV8qXTITLmR w7hJg1g2vD4xatawG3LwQQcvdP68W4szFLoBrT0WVIJRd0G24sw=
    =7k30
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zack Weinberg@21:1/5 to All on Wed Nov 17 00:20:02 2021
    Speaking as the /de facto/ upstream maintainer of autoconf, is there anything we could do from our end to make it easier for dash to turn $LINENO back on? I don't have a lot of time to work on autoconf at the moment, but this particular issue is
    important to me. I'd like to see all the configure scripts that *don't* have bashisms in them run at dash's speed on Debian, and the fallback code for when $LINENO isn't available at all is a monstrosity that I would like to scrap.

    zw

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)