Control: tag -1 patch
-=| Niko Tyni, 26.06.2014 21:39:04 +0300 |=-
> Source: rrdtool
> Version: 1.4.8-1
> Severity: important
> User: [email protected]
> Usertags: perl-5.20-transition
>
> Starting with version 5.20.0 (currently in experimental), the Debian
> perl package is changing the "vendorarch" library paths (currently
> /usr/lib/perl5) to include the multiarch triplet and the perl version. See
> #748380 for details.
>
> For this to work, packages containing binary perl modules need to migrate
> from using the hardcoded /usr/lib/perl5 directory to the value of the
> $Config{vendorarch} variable, as defined in the 'Config' module.
>
> This package fails to build with perl_5.20.0-1 from experimental:
>
> dh_install --sourcedir=/«PKGBUILDDIR»/debian/tmp -X.la --fail-missing
> cp: cannot stat '/«PKGBUILDDIR»/debian/tmp/usr/lib/perl5/auto/RRDs': No
> such file or directory
> dh_install: cp -a /«PKGBUILDDIR»/debian/tmp/usr/lib/perl5/auto/RRDs
> debian/librrds-perl//usr/lib/perl5/auto/ returned exit code 1
> make: *** [install-common-stamp] Error 2
>
> One solution for this might be an executable debhelper install file
> (available with debhelper compat level 9) expanding $Config{vendorarch}.
> See #751924 for an example of this.
>
> Please ask on the debian-perl list if you want help with this, and see
>
> https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=perl-5.20-transition;[email protected]
> for a list of similar bugs and patches.
Attached is a patch that addresses the problem. It does so by
converting librrds-perl.install to an executable Perl script which
emits the usual file contents on STDOUT, dynamically, using the
vendorarch value from the Config module. For this to work, the
debhelper compat level (and build-dependency version) is bumped to 9.
Cheers,
dam
diff --git a/debian/changelog b/debian/changelog
index 726b716..a64c297 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
+rrdtool (1.4.8-1.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix failure to build with perl 5.20 from experimental
+ Closes: #752813
+ + convert librrds-perl.install to executable script using
+ $Config{vendorarch} instead of hardcoding /usr/lib/perl5
+ + bump debhelper build-dependency and compat level to 9, needed for having
+ an executable .install
+
+ -- Damyan Ivanov <[email protected]> Wed, 02 Jul 2014 20:40:54 +0300
+
rrdtool (1.4.8-1) unstable; urgency=medium
[ Sebastian Harl ]
diff --git a/debian/compat b/debian/compat
index 7ed6ff8..ec63514 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-5
+9
diff --git a/debian/control b/debian/control
index 81610a2..7ef3bf4 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@ Priority: optional
Maintainer: Debian RRDtool Team <[email protected]>
Uploaders: Sebastian Harl <[email protected]>, Alexander Wirt <[email protected]>, Bernd Zeimetz <[email protected]>
Standards-Version: 3.9.5
-Build-Depends: debhelper (>= 5.0.38), groff, autotools-dev, dh-autoreconf, gettext, quilt,
+Build-Depends: debhelper (>= 9), groff, autotools-dev, dh-autoreconf, gettext, quilt,
zlib1g-dev, libpng12-dev, libcairo2-dev, libpango1.0-dev, libfreetype6-dev,
libdbi0-dev,
libxml2-dev,
diff --git a/debian/librrds-perl.install b/debian/librrds-perl.install
old mode 100644
new mode 100755
index ee9db42..a0f5ef3
--- a/debian/librrds-perl.install
+++ b/debian/librrds-perl.install
@@ -1,3 +1,8 @@
-usr/lib/perl5/auto/RRDs
-usr/lib/perl5/RRDs.pm
-usr/share/man/man3/RRDs.3pm
+#!/usr/bin/perl
+use Config;
+# omit the leading '/'
+my $vendorarch = substr( $Config{vendorarch}, 1 );
+
+print "$vendorarch/auto/RRDs\n";
+print "$vendorarch/RRDs.pm\n";
+print "usr/share/man/man3/RRDs.3pm\n";
diff --git a/debian/rules b/debian/rules
index 8ddd002..80475b9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -154,6 +154,7 @@ install-common-stamp: build-arch-stamp
make install DESTDIR=$(CURDIR)/debian/tmp
# we don't want .txt and .pod documentation in the package
rm -rf debian/tmp/usr/share/doc/rrdtool/txt
+ chmod a+x debian/librrds-perl.install
dh_install --sourcedir=$(CURDIR)/debian/tmp -X.la --fail-missing
# remove duplicates
rm debian/rrdtool/usr/bin/rrdcached