Bug#865563: libcatmandu-sru-perl FTBFS: test failures

2017-06-26 Thread Jonas Smedegaard
Quoting Niko Tyni (2017-06-26 21:50:33)
> On Mon, Jun 26, 2017 at 08:36:41PM +0200, gregor herrmann wrote:
> 
> > Hm. Is there a difference between:
> > perl -I. Build.PL # debhelper
> > perl Build.PL -I. # cdbs
> 
> Yes, there seems to be.
> 
> The essential part of the diff of the generated Build files
> from debhelper style to cdbs style is:
> 
> @@ -31,7 +31,7 @@ BEGIN {
>}
>unshift @INC,
>  (
> - '.'
> +
>  );
>  
>  }

Oh.

Indeed all my fault.  Thanks also to Dominic and Gregor for elaborating.

I am convinced now that adjusting cdbs is not merely a workaround but 
the actual fix to this bug.

 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private


signature.asc
Description: signature


Bug#865563: libcatmandu-sru-perl FTBFS: test failures

2017-06-26 Thread Dominic Hargreaves
Control: clone -1 -2
Control: reassign -2 cdbs
Control: retitle -2 cdbs: perl Build.PL -I. doesn't have the intended effect

On Tue, Jun 27, 2017 at 01:31:15AM +0200, Jonas Smedegaard wrote:
> Hmm - I guess the special code in Module::Build checks for . only at the 
> _end_ (or beginning?) of the INC list, and the difference of how 
> debhelper and cdbs applies the option affects the order.
> 
> I will adjust the code in CDBS, but I believe that to be only a 
> workaround and it should be fixed in Module::Build (as a patch in 
> Debian, if upstream chooses to dismiss it).

This aspect has nothing to do with Module::Build; it's just that 
you're passing options to perl in an order which causes them to be ignored.

perl foo.pl -I.

does nothing diferent to

perl foo.pl

This was just never seen before in sid because we necessarily fixed this
all in a belt-and-braces fashion to minimise breakage at the point of security
disclosure.

So I agree that the fix is to swap the ordering in cdbs so that it
is consistent with cdbs in jessie. That in itself is a long-term
workaround, until the whole perl ecosystem has got away from the
assumption that '.' will be in @INC.

Given that there are only 12 packages it is plausible to just remove
the (not working) workaround and fix those packages instead (the same
issue in debhelper will take a bit more work; see #836110 which I
really ought to get back to).

Note that I make no remark on Module::Build being buggy or not after
the removal of the Debian-specific stuff; I think the consensus upstream
was that the workarounds should be done in the higher level tolls like
the cpan client and packaging helpers rather than in the modules, but
it still seems like they're attempting to keep '.' on @INC and failing...
we'll see what they say in the github issue there.

Cheers,
Dominic.



Bug#865563: libcatmandu-sru-perl FTBFS: test failures

2017-06-26 Thread Jonas Smedegaard
Quoting gregor herrmann (2017-06-26 20:36:41)
> On Mon, 26 Jun 2017 21:02:01 +0300, Niko Tyni wrote:
> 
> > > FWIW, I've scheduled a test rebuild of all the 679 libmodule-build-perl
> > > reverse build dependencies on perl.debian.net to get a feeling of
> > > how widespread this issue actually is.
> > Not that widespread. We have 12 clearly affected packages, and a couple
> > that I'm not sure of. See below. Logs can be found at
> >  http://perl.debian.net/rebuild-logs/experimental/report.html
> > (it's really a sid chroot, don't mind the "experimental" part.)
> 
> Thanks. That makes for an interesting reading.
>  
> > > If it's bad enough, we should probably patch around it temporarily
> > > in any case and drop it later in a more controlled fashion.
> > Given the low number of broken packages, it does look feasible to fix
> > those instead. I have no strong opinion atm. Others?
> > 
> > Affected packages:
> > 
> >  libtest-name-fromline-perl_0.13-1
> 
> Uses CDBS [0]
> 
> >  libregexp-log-perl_0.06-3
> 
> Uses CDBS.
> 
> >  libperl-critic-perl_1.126-1
> 
> Looks like something unreleated?
> 
> >  libparser-mgc-perl_0.15-1
> 
> Uses CDBS.
> 
> >  libnet-proxy-perl_0.12-6
> 
> Old-style: "/usr/bin/perl Build test"
> 
> >  libmoox-options-perl_4.023-1
> 
> Uses CDBS.
> 
> >  libjson-webtoken-perl_0.10-2
> 
> Uses CDBS.
> 
> >  libfurl-perl_3.08-2
> 
> Uses CDBS.
> 
> >  libdevel-callparser-perl_0.002-3
> 
> Uses CDBS.
> 
> >  libdevel-callchecker-perl_0.007-1
> 
> Uses CDBS.
> 
> >  libcatmandu-sru-perl_0.039-1
> 
> Uses CDBS.
> 
> >  libcatmandu-perl_1.0304-2
> 
> Uses CDBS.
>  
> > Uncertain, could be caused by something else:
> >  libconfig-model-itself-perl_2.006-1
> 
> Yeah, probably unrelated.
> 
> >  bioperl-run_1.7.1-3
> 
> Same here.
> 
> 
> Summary: Running "{/usr/bin/perl ,./}Build test", manually or from
> CDBS, seems to break with the new Module::Build.
> 
> So if CDBS could be changed, than all but one of those bugs would be
> gone.
> 
> I just don't immediatly see how: debhelper has since
> https://anonscm.debian.org/git/debhelper/debhelper.git/commit/?id=f7d8a068eb3394e76409535c8ebb7ab04758ef35
> CDBS according to #833783 does the same - both seem to only add -I.
> for the configure step.
> 
> Hm. Is there a difference between:
> perl -I. Build.PL # debhelper
> perl Build.PL -I. # cdbs
> ?

Hmm - I guess the special code in Module::Build checks for . only at the 
_end_ (or beginning?) of the INC list, and the difference of how 
debhelper and cdbs applies the option affects the order.

I will adjust the code in CDBS, but I believe that to be only a 
workaround and it should be fixed in Module::Build (as a patch in 
Debian, if upstream chooses to dismiss it).

 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private


signature.asc
Description: signature


Bug#865563: libcatmandu-sru-perl FTBFS: test failures

2017-06-26 Thread gregor herrmann
On Tue, 27 Jun 2017 00:29:16 +0200, Jonas Smedegaard wrote:

> > Affected packages:
> > 
> >  libtest-name-fromline-perl_0.13-1
> >  libregexp-log-perl_0.06-3
> >  libperl-critic-perl_1.126-1
> >  libparser-mgc-perl_0.15-1
> >  libnet-proxy-perl_0.12-6
> >  libmoox-options-perl_4.023-1
> >  libjson-webtoken-perl_0.10-2
> >  libfurl-perl_3.08-2
> >  libdevel-callparser-perl_0.002-3
> >  libdevel-callchecker-perl_0.007-1
> >  libcatmandu-sru-perl_0.039-1
> >  libcatmandu-perl_1.0304-2
> 
> Hmm - 10 out of above 12 packages use CDBS.  Might be totally unrelated, 
> but suspicious...

Probably no coincidence, see Niko's and my later messages in this bug
report.
 
> For starters (admittedly without really understanding the issue here), 
> let my simply go through and modernize those packages.

If Niko's and my suspicions are correct (I haven't tested it), then
shifting a few bytes in CDBS might solve the problem for all of them.


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 of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Scorpions & Berlin phil: Still loving you(live)


signature.asc
Description: Digital Signature


Bug#865563: libcatmandu-sru-perl FTBFS: test failures

2017-06-26 Thread Jonas Smedegaard
[posting only to bugreport - seems all others are subscribed]

Quoting Niko Tyni (2017-06-26 20:02:01)
> On Sun, Jun 25, 2017 at 09:57:14PM +0300, Niko Tyni wrote:
>> On Fri, Jun 23, 2017 at 09:19:43PM +0100, Dominic Hargreaves wrote:
> 
>>> I feel like we should try and not diverge further from upstream; 
>>> that seems almost guaranteed to end up with similar issues later.
>> 
>> FWIW, I've scheduled a test rebuild of all the 679 
>> libmodule-build-perl reverse build dependencies on perl.debian.net to 
>> get a feeling of how widespread this issue actually is.
>
> Not that widespread. We have 12 clearly affected packages, and a 
> couple that I'm not sure of. See below. Logs can be found at
> 
>  http://perl.debian.net/rebuild-logs/experimental/report.html
> 
> (it's really a sid chroot, don't mind the "experimental" part.)
> 
>> If it's bad enough, we should probably patch around it temporarily in 
>> any case and drop it later in a more controlled fashion.
> 
> Given the low number of broken packages, it does look feasible to fix 
> those instead. I have no strong opinion atm. Others?
> 
> Affected packages:
> 
>  libtest-name-fromline-perl_0.13-1
>  libregexp-log-perl_0.06-3
>  libperl-critic-perl_1.126-1
>  libparser-mgc-perl_0.15-1
>  libnet-proxy-perl_0.12-6
>  libmoox-options-perl_4.023-1
>  libjson-webtoken-perl_0.10-2
>  libfurl-perl_3.08-2
>  libdevel-callparser-perl_0.002-3
>  libdevel-callchecker-perl_0.007-1
>  libcatmandu-sru-perl_0.039-1
>  libcatmandu-perl_1.0304-2

Hmm - 10 out of above 12 packages use CDBS.  Might be totally unrelated, 
but suspicious...

Also, only few of the CDBS-based packages were touched since 2015.

For starters (admittedly without really understanding the issue here), 
let my simply go through and modernize those packages.


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private


signature.asc
Description: signature


Bug#865563: libcatmandu-sru-perl FTBFS: test failures

2017-06-26 Thread Niko Tyni
On Mon, Jun 26, 2017 at 10:50:33PM +0300, Niko Tyni wrote:
> On Mon, Jun 26, 2017 at 08:36:41PM +0200, gregor herrmann wrote:
> 
> > Hm. Is there a difference between:
> > perl -I. Build.PL # debhelper
> > perl Build.PL -I. # cdbs
> 
> Yes, there seems to be.

I note that Dominic's patch in #833783 proposed the first style, but
what got applied in cdbs.git [0] was the second one.

[0] 
https://anonscm.debian.org/cgit/build-common/cdbs.git/commit/?id=30673973dce32433e62f03e7dba7cef59d73

So this seems to be mostly a cdbs bug?
-- 
Niko Tyni   nt...@debian.org



Bug#865563: libcatmandu-sru-perl FTBFS: test failures

2017-06-26 Thread Niko Tyni
On Mon, Jun 26, 2017 at 08:36:41PM +0200, gregor herrmann wrote:

> Hm. Is there a difference between:
> perl -I. Build.PL # debhelper
> perl Build.PL -I. # cdbs

Yes, there seems to be.

The essential part of the diff of the generated Build files
from debhelper style to cdbs style is:

@@ -31,7 +31,7 @@ BEGIN {
   }
   unshift @INC,
 (
- '.'
+
 );
 
 }

-- 
Niko Tyni   nt...@debian.org



Bug#865563: libcatmandu-sru-perl FTBFS: test failures

2017-06-26 Thread gregor herrmann
On Mon, 26 Jun 2017 21:02:01 +0300, Niko Tyni wrote:

> > FWIW, I've scheduled a test rebuild of all the 679 libmodule-build-perl
> > reverse build dependencies on perl.debian.net to get a feeling of
> > how widespread this issue actually is.
> Not that widespread. We have 12 clearly affected packages, and a couple
> that I'm not sure of. See below. Logs can be found at
>  http://perl.debian.net/rebuild-logs/experimental/report.html
> (it's really a sid chroot, don't mind the "experimental" part.)

Thanks. That makes for an interesting reading.
 
> > If it's bad enough, we should probably patch around it temporarily
> > in any case and drop it later in a more controlled fashion.
> Given the low number of broken packages, it does look feasible to fix
> those instead. I have no strong opinion atm. Others?
> 
> Affected packages:
> 
>  libtest-name-fromline-perl_0.13-1

Uses CDBS [0]

>  libregexp-log-perl_0.06-3

Uses CDBS.

>  libperl-critic-perl_1.126-1

Looks like something unreleated?

>  libparser-mgc-perl_0.15-1

Uses CDBS.

>  libnet-proxy-perl_0.12-6

Old-style: "/usr/bin/perl Build test"

>  libmoox-options-perl_4.023-1

Uses CDBS.

>  libjson-webtoken-perl_0.10-2

Uses CDBS.

>  libfurl-perl_3.08-2

Uses CDBS.

>  libdevel-callparser-perl_0.002-3

Uses CDBS.

>  libdevel-callchecker-perl_0.007-1

Uses CDBS.

>  libcatmandu-sru-perl_0.039-1

Uses CDBS.

>  libcatmandu-perl_1.0304-2

Uses CDBS.
 
> Uncertain, could be caused by something else:
>  libconfig-model-itself-perl_2.006-1

Yeah, probably unrelated.

>  bioperl-run_1.7.1-3

Same here.


Summary: Running "{/usr/bin/perl ,./}Build test", manually or from
CDBS, seems to break with the new Module::Build.

So if CDBS could be changed, than all but one of those bugs would be
gone.

I just don't immediatly see how: debhelper has since
https://anonscm.debian.org/git/debhelper/debhelper.git/commit/?id=f7d8a068eb3394e76409535c8ebb7ab04758ef35
CDBS according to #833783 does the same - both seem to only add -I.
for the configure step.

Hm. Is there a difference between:
perl -I. Build.PL # debhelper
perl Build.PL -I. # cdbs
?

Cheers,
gregor


[0]
which runs
cd  . && ./Build test  --verbose 1 

-- 
 .''`.  https://info.comodo.priv.at/ - Debian Developer https://www.debian.org
 : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D  85FA BB3A 6801 8649 AA06
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Supertramp: Just Another Nervous Wreck


signature.asc
Description: Digital Signature


Bug#865563: libcatmandu-sru-perl FTBFS: test failures

2017-06-26 Thread Niko Tyni
On Sun, Jun 25, 2017 at 09:57:14PM +0300, Niko Tyni wrote:
> On Fri, Jun 23, 2017 at 09:19:43PM +0100, Dominic Hargreaves wrote:

> > I feel like we should try and not diverge further from upstream; that
> > seems almost guaranteed to end up with similar issues later.
> 
> FWIW, I've scheduled a test rebuild of all the 679 libmodule-build-perl
> reverse build dependencies on perl.debian.net to get a feeling of
> how widespread this issue actually is.

Not that widespread. We have 12 clearly affected packages, and a couple
that I'm not sure of. See below. Logs can be found at

 http://perl.debian.net/rebuild-logs/experimental/report.html

(it's really a sid chroot, don't mind the "experimental" part.)

> If it's bad enough, we should probably patch around it temporarily
> in any case and drop it later in a more controlled fashion.

Given the low number of broken packages, it does look feasible to fix
those instead. I have no strong opinion atm. Others?

Affected packages:

 libtest-name-fromline-perl_0.13-1
 libregexp-log-perl_0.06-3
 libperl-critic-perl_1.126-1
 libparser-mgc-perl_0.15-1
 libnet-proxy-perl_0.12-6
 libmoox-options-perl_4.023-1
 libjson-webtoken-perl_0.10-2
 libfurl-perl_3.08-2
 libdevel-callparser-perl_0.002-3
 libdevel-callchecker-perl_0.007-1
 libcatmandu-sru-perl_0.039-1
 libcatmandu-perl_1.0304-2

Uncertain, could be caused by something else:

 libconfig-model-itself-perl_2.006-1
 bioperl-run_1.7.1-3

-- 
Niko Tyni   nt...@debian.org



Bug#865563: libcatmandu-sru-perl FTBFS: test failures

2017-06-25 Thread Niko Tyni
On Fri, Jun 23, 2017 at 09:19:43PM +0100, Dominic Hargreaves wrote:
> On Fri, Jun 23, 2017 at 07:43:52PM +0200, gregor herrmann wrote:

> > So it looks like we really need PERL_USE_UNSAFE_INC, and we might
> > want to insert it unconditionally manually where we did prior to the
> > accidental removal in the last upload.

> It does rather look like a mistaken attempt to solve this problem, and
> I agree that the logic is a bit odd, but this seems like the patch
> likely to get accepted upstream; can you send this patch to the module
> author?
> 
> I feel like we should try and not diverge further from upstream; that
> seems almost guaranteed to end up with similar issues later.

FWIW, I've scheduled a test rebuild of all the 679 libmodule-build-perl
reverse build dependencies on perl.debian.net to get a feeling of
how widespread this issue actually is.

If it's bad enough, we should probably patch around it temporarily
in any case and drop it later in a more controlled fashion.

I'll follow up with an update once we have results.
-- 
Niko



Bug#865563: libcatmandu-sru-perl FTBFS: test failures

2017-06-23 Thread gregor herrmann
Control: reassign -1 libmodule-build-perl 0.422400-1
Control: forwarded -1 
https://github.com/Perl-Toolchain-Gang/Module-Build/issues/77
Control: affects src:libcatmandu-sru-perl

On Fri, 23 Jun 2017 21:19:43 +0100, Dominic Hargreaves wrote:

> On Fri, Jun 23, 2017 at 07:43:52PM +0200, gregor herrmann wrote:

> > I didn't have any success when playing with the new $dot_in_inc_code
> > string, seems like the condition is never met. (And to be honest, I
> > don't understand the logic ...) [0]
[..]

> > [0]
> > my $dot_in_inc_code = $INC[-1] eq '.' ? <<'END' : '';
> > if ($INC[-1] ne '.') {
> > push @INC, '.';
> > }
> > END
> > 
> > What also works is reverting the logic:
> > 
> > --- /usr/share/perl5/Module/Build/Base.pm~  2017-06-19 17:25:18.0 
> > +
> > +++ /usr/share/perl5/Module/Build/Base.pm   2017-06-23 17:42:01.820466942 
> > +
> > @@ -1824,7 +1824,7 @@
> >my $shebang = $self->_startperl;
> >my $magic_number = $self->magic_number;
> >  
> > -my $dot_in_inc_code = $INC[-1] eq '.' ? <<'END' : '';
> > +my $dot_in_inc_code = $INC[-1] ne '.' ? <<'END' : '';
> >  if ($INC[-1] ne '.') {
> >  push @INC, '.';
> >  }
> > 
> > 
> > Then PERL_USE_UNSAFE_INC is not needed. But testing $INC[-1] ne '.'
> > two times make as little sense to me as first testing eq '.' and then ne '.'
> > ...
> 
> It does rather look like a mistaken attempt to solve this problem, and
> I agree that the logic is a bit odd, but this seems like the patch
> likely to get accepted upstream; can you send this patch to the module
> author?

Done. Cf. the GH issue URL at the top.
 
> I feel like we should try and not diverge further from upstream; that
> seems almost guaranteed to end up with similar issues later.

Ack.

Thanks for looking into this!


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 of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Neal Casal: Raining Straight Down


signature.asc
Description: Digital Signature


Bug#865563: libcatmandu-sru-perl FTBFS: test failures

2017-06-23 Thread Dominic Hargreaves
On Fri, Jun 23, 2017 at 07:43:52PM +0200, gregor herrmann wrote:
> On Fri, 23 Jun 2017 17:22:52 +0200, gregor herrmann wrote:
> 
> > > So what is not there anymore is PERL_USE_UNSAFE_INC=1.
> > 
> > Dom, I think you're our expert on dot-in-inc; do you think my hunch
> > is correct that we need to add PERL_USE_UNSAFE_INC back?
> > (And if yes, where would be the best place - in the $dot_in_inc_code,
> > and if yes within the if(); or after $dot_in_inc_code is output in
> > the second hunk of the above diff?
> 
> So this seems to work (as in: libcatmandu-sru-perl builds again, if I
> change /usr/share/perl5/Module/Build/Base.pm in the chroot):
> 
> --- a/lib/Module/Build/Base.pm
> +++ b/lib/Module/Build/Base.pm
> @@ -1866,6 +1866,7 @@ BEGIN {
>  $quoted_INC
>  );
>  $dot_in_inc_code
> +\$ENV{"PERL_USE_UNSAFE_INC"} = 1;
>  }
> 
>  close(*DATA) unless eof(*DATA); # ensure no open handles to this script
> 
> 
> I didn't have any success when playing with the new $dot_in_inc_code
> string, seems like the condition is never met. (And to be honest, I
> don't understand the logic ...) [0]
> 
> So it looks like we really need PERL_USE_UNSAFE_INC, and we might
> want to insert it unconditionally manually where we did prior to the
> accidental removal in the last upload.
> 
> 
> Cheers,
> gregor
> 
> [0]
> my $dot_in_inc_code = $INC[-1] eq '.' ? <<'END' : '';
> if ($INC[-1] ne '.') {
> push @INC, '.';
> }
> END
> 
> What also works is reverting the logic:
> 
> --- /usr/share/perl5/Module/Build/Base.pm~2017-06-19 17:25:18.0 
> +
> +++ /usr/share/perl5/Module/Build/Base.pm 2017-06-23 17:42:01.820466942 
> +
> @@ -1824,7 +1824,7 @@
>my $shebang = $self->_startperl;
>my $magic_number = $self->magic_number;
>  
> -my $dot_in_inc_code = $INC[-1] eq '.' ? <<'END' : '';
> +my $dot_in_inc_code = $INC[-1] ne '.' ? <<'END' : '';
>  if ($INC[-1] ne '.') {
>  push @INC, '.';
>  }
> 
> 
> Then PERL_USE_UNSAFE_INC is not needed. But testing $INC[-1] ne '.'
> two times make as little sense to me as first testing eq '.' and then ne '.'
> ...

It does rather look like a mistaken attempt to solve this problem, and
I agree that the logic is a bit odd, but this seems like the patch
likely to get accepted upstream; can you send this patch to the module
author?

I feel like we should try and not diverge further from upstream; that
seems almost guaranteed to end up with similar issues later.

Cheers,
Dominic.



Bug#865563: libcatmandu-sru-perl FTBFS: test failures

2017-06-23 Thread gregor herrmann
On Fri, 23 Jun 2017 17:22:52 +0200, gregor herrmann wrote:

> > So what is not there anymore is PERL_USE_UNSAFE_INC=1.
> 
> Dom, I think you're our expert on dot-in-inc; do you think my hunch
> is correct that we need to add PERL_USE_UNSAFE_INC back?
> (And if yes, where would be the best place - in the $dot_in_inc_code,
> and if yes within the if(); or after $dot_in_inc_code is output in
> the second hunk of the above diff?

So this seems to work (as in: libcatmandu-sru-perl builds again, if I
change /usr/share/perl5/Module/Build/Base.pm in the chroot):

--- a/lib/Module/Build/Base.pm
+++ b/lib/Module/Build/Base.pm
@@ -1866,6 +1866,7 @@ BEGIN {
 $quoted_INC
 );
 $dot_in_inc_code
+\$ENV{"PERL_USE_UNSAFE_INC"} = 1;
 }

 close(*DATA) unless eof(*DATA); # ensure no open handles to this script


I didn't have any success when playing with the new $dot_in_inc_code
string, seems like the condition is never met. (And to be honest, I
don't understand the logic ...) [0]

So it looks like we really need PERL_USE_UNSAFE_INC, and we might
want to insert it unconditionally manually where we did prior to the
accidental removal in the last upload.


Cheers,
gregor

[0]
my $dot_in_inc_code = $INC[-1] eq '.' ? <<'END' : '';
if ($INC[-1] ne '.') {
push @INC, '.';
}
END

What also works is reverting the logic:

--- /usr/share/perl5/Module/Build/Base.pm~  2017-06-19 17:25:18.0 
+
+++ /usr/share/perl5/Module/Build/Base.pm   2017-06-23 17:42:01.820466942 
+
@@ -1824,7 +1824,7 @@
   my $shebang = $self->_startperl;
   my $magic_number = $self->magic_number;
 
-my $dot_in_inc_code = $INC[-1] eq '.' ? <<'END' : '';
+my $dot_in_inc_code = $INC[-1] ne '.' ? <<'END' : '';
 if ($INC[-1] ne '.') {
 push @INC, '.';
 }


Then PERL_USE_UNSAFE_INC is not needed. But testing $INC[-1] ne '.'
two times make as little sense to me as first testing eq '.' and then ne '.'
...

-- 
 .''`.  https://info.comodo.priv.at/ - Debian Developer https://www.debian.org
 : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D  85FA BB3A 6801 8649 AA06
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Diana Krall: Love Me Like A Man


signature.asc
Description: Digital Signature


Bug#865563: libcatmandu-sru-perl FTBFS: test failures

2017-06-23 Thread gregor herrmann
On Thu, 22 Jun 2017 21:33:27 +0200, gregor herrmann wrote:

> Basically the diff between 0.422000-1 (with our changes) and 0.422400-1
> (with a different fix and without our patch) is:
> 
> 
> @@ -1824,6 +1824,11 @@ sub print_build_script {
>my $shebang = $self->_startperl;
>my $magic_number = $self->magic_number;
> 
> +my $dot_in_inc_code = $INC[-1] eq '.' ? <<'END' : '';
> +if ($INC[-1] ne '.') {
> +push @INC, '.';
> +}
> +END
>print $fh <  $shebang
> 
> @@ -1860,8 +1865,7 @@ BEGIN {
>  (
>  $quoted_INC
>  );
> -  push \@INC, "." unless grep { \$_ eq "." } \@INC; # Force my process to 
> include . in \@INC.
> -  \$ENV{"PERL_USE_UNSAFE_INC"} = 1; # Force all child processes to include . 
> in \@INC.
> +$dot_in_inc_code
>  }
> 
>  close(*DATA) unless eof(*DATA); # ensure no open handles to this script
> 
> 
> So what is not there anymore is PERL_USE_UNSAFE_INC=1.

Dom, I think you're our expert on dot-in-inc; do you think my hunch
is correct that we need to add PERL_USE_UNSAFE_INC back?
(And if yes, where would be the best place - in the $dot_in_inc_code,
and if yes within the if(); or after $dot_in_inc_code is output in
the second hunk of the above diff?
 

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 of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Joan Baez: Gracias a la vida


signature.asc
Description: Digital Signature


Bug#865563: libcatmandu-sru-perl FTBFS: test failures

2017-06-22 Thread gregor herrmann
On Thu, 22 Jun 2017 22:01:26 +0300, Niko Tyni wrote:

> > Some recent change in unstable makes this package FTBFS:
>
> Probably libmodule-build-perl_0.422400-1 though I don't really know why,
> given the changelog says
>  - Remove 0003-Make-Module-Build-set-PERL_UNSAFE_INC.patch (fixed 
> upstream)

It's entirely possible that I did something wrong here when solving a
merge conflict (this is one of the git-debcherry packages).

Or, looking at the diff again, it might be that upstream not only
solved this differently but also left out a part we had in our patch
(and I ignored this difference):

Basically the diff between 0.422000-1 (with our changes) and 0.422400-1
(with a different fix and without our patch) is:


@@ -1824,6 +1824,11 @@ sub print_build_script {
   my $shebang = $self->_startperl;
   my $magic_number = $self->magic_number;

+my $dot_in_inc_code = $INC[-1] eq '.' ? <<'END' : '';
+if ($INC[-1] ne '.') {
+push @INC, '.';
+}
+END
   print $fh <

Bug#865563: libcatmandu-sru-perl FTBFS: test failures

2017-06-22 Thread Niko Tyni
On Thu, Jun 22, 2017 at 08:49:19PM +0300, Adrian Bunk wrote:
> Source: libcatmandu-sru-perl
> Version: 0.039-1
> Severity: serious
> 
> Some recent change in unstable makes this package FTBFS:
> 
> https://tests.reproducible-builds.org/debian/history/libcatmandu-sru-perl.html
> https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/libcatmandu-sru-perl.html
> 
> ...
> cd  . && ./Build test  --verbose 1

Probably libmodule-build-perl_0.422400-1 though I don't really know why,
given the changelog says

 - Remove 0003-Make-Module-Build-set-PERL_UNSAFE_INC.patch (fixed upstream)

-- 
Niko Tyni   nt...@debian.org



Bug#865563: libcatmandu-sru-perl FTBFS: test failures

2017-06-22 Thread Adrian Bunk
Source: libcatmandu-sru-perl
Version: 0.039-1
Severity: serious

Some recent change in unstable makes this package FTBFS:

https://tests.reproducible-builds.org/debian/history/libcatmandu-sru-perl.html
https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/libcatmandu-sru-perl.html

...
cd  . && ./Build test  --verbose 1
t/00-load.t . 
ok 1 - use Catmandu::Importer::SRU;
ok 2 - require Catmandu::Importer::SRU;
1..2
ok
Can't locate t/lib/MockFurl.pm in @INC (you may need to install the 
t::lib::MockFurl module) (@INC contains: 
/build/1st/libcatmandu-sru-perl-0.039/blib/lib 
/build/1st/libcatmandu-sru-perl-0.039/blib/arch /etc/perl 
/usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 
/usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 
/usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 
/usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at t/importer.t 
line 7.
t/importer.t  
Dubious, test returned 2 (wstat 512, 0x200)
No subtests run 
Can't locate t/lib/MockFurl.pm in @INC (you may need to install the 
t::lib::MockFurl module) (@INC contains: 
/build/1st/libcatmandu-sru-perl-0.039/blib/lib 
/build/1st/libcatmandu-sru-perl-0.039/blib/arch /etc/perl 
/usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 
/usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 
/usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 
/usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at t/namespace.t 
line 7.
t/namespace.t ... 
Dubious, test returned 2 (wstat 512, 0x200)
No subtests run 
t/release-pod-syntax.t .. skipped: these tests are for release candidate testing
Can't locate t/lib/MockFurl.pm in @INC (you may need to install the 
t::lib::MockFurl module) (@INC contains: 
/build/1st/libcatmandu-sru-perl-0.039/blib/lib 
/build/1st/libcatmandu-sru-perl-0.039/blib/arch /etc/perl 
/usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 
/usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 
/usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 
/usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at t/simple.t 
line 5.
t/simple.t .. 
Dubious, test returned 2 (wstat 512, 0x200)
No subtests run 
Can't locate t/lib/MockFurl.pm in @INC (you may need to install the 
t::lib::MockFurl module) (@INC contains: 
/build/1st/libcatmandu-sru-perl-0.039/blib/lib 
/build/1st/libcatmandu-sru-perl-0.039/blib/arch /etc/perl 
/usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 
/usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 
/usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 
/usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at t/struct.t 
line 5.
t/struct.t .. 
Dubious, test returned 2 (wstat 512, 0x200)
No subtests run 

Test Summary Report
---
t/importer.t  (Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2
  Parse errors: No plan found in TAP output
t/namespace.t (Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2
  Parse errors: No plan found in TAP output
t/simple.t(Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2
  Parse errors: No plan found in TAP output
t/struct.t(Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2
  Parse errors: No plan found in TAP output
Files=6, Tests=2,  3 wallclock secs ( 0.04 usr  0.02 sys +  2.37 cusr  0.25 
csys =  2.68 CPU)
Result: FAIL
Failed 4/6 test programs. 0/2 subtests failed.
/usr/share/cdbs/1/class/perl-build.mk:84: recipe for target 
'debian/stamp-perl-check' failed
make: *** [debian/stamp-perl-check] Error 2