Bug#979119: debhelper: dh_auto_configure does not fail on perl Makefile.PL "exit 0"

2021-01-03 Thread gregor herrmann
On Sun, 03 Jan 2021 16:49:12 +0100, Niels Thykier wrote:

> > TTBOMK, that's considered "best practice" in the CPAN universe, in
> > order to let the process continue (where "process"is installing
> > multiple distributions or especially CPAN smoke testers).

> That was an "interesting" practice.  I cannot say I am happy with it,

Right, from a packaging point of view it's not helpful.

> but if it is "best practise" then I am willing to reconsider the
> "wontfix" if you (as in: "anyone") can provide a reliable method for
> detecting this "false success" that is specific to Makefile.PL (or the
> perl related build systems).

I don't have any idea how to do this.

Maybe (and that might be what you hinted at in the earlier mail)
debhelper could detect later that the package is basically empty and
bail out there.
 
Cheers,
gregor

-- 
 .''`.  https://info.comodo.priv.at -- Debian Developer https://www.debian.org
 : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D  85FA BB3A 6801 8649 AA06
 `. `'  Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe
   `-   NP: Peter Ratzenbeck: An schönen Traum


signature.asc
Description: Digital Signature


Bug#979119: debhelper: dh_auto_configure does not fail on perl Makefile.PL "exit 0"

2021-01-03 Thread Niels Thykier
gregor herrmann:
> On Sun, 03 Jan 2021 11:53:22 +0100, Niels Thykier wrote:
> 
>> AFAICT, upstream ought to have exit'ed with a non-zero exit code here
>> because the configure job have in fact failed (albeit deliberate) to
>> prepare the next stage of the build.
> […] 
>> From my PoV, I see this as bug in the upstream package and unactionable
>> feature request in debhelper.
> 
> TTBOMK, that's considered "best practice" in the CPAN universe, in
> order to let the process continue (where "process"is installing
> multiple distributions or especially CPAN smoke testers).
> 
> Random examples from my SSD:
> 
> libnet-ssleay-perl/Makefile.PL:exit 0; # according 
> http://wiki.cpantesters.org/wiki/CPANAuthorNotes this is best-practice when 
> "missing library"
> 
> libterm-readline-gnu-perl/Makefile.PL:# exit 0 before creating the Makefile 
> to be CPAN Testers friendly
> 
> libtext-qrcode-perl/Makefile.PL:exit 0; # tell cpan testers that this 
> is not a failure
> 
> libxml-libxml-perl/Makefile.PL:exit 0; # 0 recommended by 
> http://cpantest.grango.org (Notes for CPAN Authors)
> 
> 
> Cheers,
> gregor
> 

Hi gregor,

That was an "interesting" practice.  I cannot say I am happy with it,
but if it is "best practise" then I am willing to reconsider the
"wontfix" if you (as in: "anyone") can provide a reliable method for
detecting this "false success" that is specific to Makefile.PL (or the
perl related build systems).

That said, such a solution will be "globally" enabled (possibly in a new
compat level) and accordingly it most be a general solution.

~Niels



Bug#979119: debhelper: dh_auto_configure does not fail on perl Makefile.PL "exit 0"

2021-01-03 Thread gregor herrmann
On Sun, 03 Jan 2021 11:53:22 +0100, Niels Thykier wrote:

> AFAICT, upstream ought to have exit'ed with a non-zero exit code here
> because the configure job have in fact failed (albeit deliberate) to
> prepare the next stage of the build.
[…] 
> From my PoV, I see this as bug in the upstream package and unactionable
> feature request in debhelper.

TTBOMK, that's considered "best practice" in the CPAN universe, in
order to let the process continue (where "process"is installing
multiple distributions or especially CPAN smoke testers).

Random examples from my SSD:

libnet-ssleay-perl/Makefile.PL:exit 0; # according 
http://wiki.cpantesters.org/wiki/CPANAuthorNotes this is best-practice when 
"missing library"

libterm-readline-gnu-perl/Makefile.PL:# exit 0 before creating the Makefile to 
be CPAN Testers friendly

libtext-qrcode-perl/Makefile.PL:exit 0; # tell cpan testers that this 
is not a failure

libxml-libxml-perl/Makefile.PL:exit 0; # 0 recommended by 
http://cpantest.grango.org (Notes for CPAN Authors)


Cheers,
gregor

-- 
 .''`.  https://info.comodo.priv.at -- Debian Developer https://www.debian.org
 : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D  85FA BB3A 6801 8649 AA06
 `. `'  Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe
   `-   NP: Nick Drake: Hanging on a Star


signature.asc
Description: Digital Signature


Bug#979119: debhelper: dh_auto_configure does not fail on perl Makefile.PL "exit 0"

2021-01-03 Thread Niels Thykier
Control: tags -1 wontfix

Jonas Smedegaard:
> Package: debhelper
> Version: 13.3.1
> Severity: important
>
> Hi,
> 
> Newly released package liblmdb-file-perl has an odd build script which
> refuses to build on i386 platform: it checks and then calls "exit 0" -
> its Makefile.PL contains this:
> 
> if($Config{archname} =~ /686/) {
> warn "liblmdb isn't supported in your platform, sorry.\n";
> exit 0;
> }
> 
> 
> To my surprise, debhelper does not fail, but silently continues to build
> an empty package:
> https://buildd.debian.org/status/fetch.php?pkg=liblmdb-file-perl=i386=0.12-3=1609092696=0
> 
> Seems to me this is a bug in debhelper - possibly even more severe than
> "important".
> 
> 
>  - Jonas
> 
>


Hi Jonas,

Thanks for the report.

AFAICT, upstream ought to have exit'ed with a non-zero exit code here
because the configure job have in fact failed (albeit deliberate) to
prepare the next stage of the build.

I do not see a reliable way for debhelper to second-guess the exit code
from upstream's build system (a lot of build systems emit warnings to
standard error without any issues in the built artefact).

>From my PoV, I see this as bug in the upstream package and unactionable
feature request in debhelper.

If anything, it might have been noticed if dh_auto_install always
installed to d/tmp and you were required to always have something in
your d/.install (because then dh_install would have noticed that
something was wrong).  I have been considering this as a new default in
a future compat level for other reasons.

~Niels



Bug#979119: debhelper: dh_auto_configure does not fail on perl Makefile.PL "exit 0"

2021-01-02 Thread Jonas Smedegaard
Package: debhelper
Version: 13.3.1
Severity: important

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Hi,

Newly released package liblmdb-file-perl has an odd build script which
refuses to build on i386 platform: it checks and then calls "exit 0" -
its Makefile.PL contains this:

if($Config{archname} =~ /686/) {
warn "liblmdb isn't supported in your platform, sorry.\n";
exit 0;
}


To my surprise, debhelper does not fail, but silently continues to build
an empty package:
https://buildd.debian.org/status/fetch.php?pkg=liblmdb-file-perl=i386=0.12-3=1609092696=0

Seems to me this is a bug in debhelper - possibly even more severe than
"important".


 - Jonas

-BEGIN PGP SIGNATURE-

iQIzBAEBCgAdFiEEn+Ppw2aRpp/1PMaELHwxRsGgASEFAl/xC/AACgkQLHwxRsGg
ASE2UQ/+MUMHYSKcLstT3pOdq54XkQ7WAx/eM1QFHHEp3+KA8pGWulaPtrw1n53s
ZN3XfzQ5wl7xQqVxq+/M6rhXQ4EqB5oUtlgKiI5iSsIG0l4y0OwOc7hZNXJL4DtC
CtCrjf+Pgtfui99POXk5ePHRZNO3ty7rf/HVkioNK4+CXzmiCQlA0J3w3KGkxqjE
nHklADvyzPDIaKubiV2C7KHpvjmpX2a3Yv+anbXHifyUb3nRiLMu6nT59ojBjcOH
Ap1KFU0Yq4FYO/hG4D6hqFeR6edDbp+Bc+NDYLkiG/LfBeg0xi7qtkoK5zVls2Fi
FnZF0/V/neyP5io86DB9UvJoPSoJV8sVuiNbictDgzcih+4P8mC7Hfon9ZQYrxTf
OWfuDOZkL7swvLgtmH3EEoX2oTuPTTilaPbPKm6BB/lH5RRnjroYmWIPg6bh/9H9
D02eIyUOM8fCffUVYDKuYTOpfSIa9Wv9yBKTOCMMfdn62vyV8iBU6APLfTCpKNtI
g13LaZlJWQuoJIeuR9mKqG/h1dINaUvHtiVKgVboO2EkbHzYl+pUtWu49pn3dlZ2
4rhzlbRQNXCmt3UWXefArRavqZoEhfIX+TBVSTWZSSaKUck2+ltRKeVuQbsnIyh0
lUDCHZM87JKx0yV7CCQhFkwNRck4U1vA/CvVqtpjxIl+ErrRu5s=
=TYXH
-END PGP SIGNATURE-