Control: tag -1 + patch On Thu, 26 Jun 2014 20:47:58 +0300, Niko Tyni wrote:
> 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:
>
> #================================================================
> # Thanks for using QDBM for Perl.
> #================================================================
> make[1]: Leaving directory '/«PKGBUILDDIR»/perl'
> chmod +w /«PKGBUILDDIR»/debian/libqdbm-perl/usr/lib/perl*/*/*/*/*.so
> chmod: cannot access
> '/«PKGBUILDDIR»/debian/libqdbm-perl/usr/lib/perl*/*/*/*/*.so': No such file
> or directory
> make: *** [install-stamp] Error 1
Attached is a patch tested with 5.18 and 5.20:
+ * Fix "hardcodes /usr/lib/perl5":
+ - add patch that passes INSTALLDIRS=vendor to perl Makefile.PL calls
+ - remove usr/lib/perl5 from debian/libqdbm-perl.dirs, files are in the
+ right directories now
+ - remove some now unneeded (re)moving in debian/rules and adjust paths
+ - use $Config{vendorarch} in debian/rules to get the perl library path at
+ build time
+ (Closes: #752806)
Cheers,
gregor
--
.''`. Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
: :' : Debian GNU/Linux user, admin, and developer - http://www.debian.org/
`. `' Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
`- NP: Rolling Stones
diff -Nru qdbm-1.8.78/debian/changelog qdbm-1.8.78/debian/changelog
--- qdbm-1.8.78/debian/changelog 2014-06-19 16:50:57.000000000 +0200
+++ qdbm-1.8.78/debian/changelog 2014-07-06 18:42:35.000000000 +0200
@@ -1,3 +1,17 @@
+qdbm (1.8.78-4.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix "hardcodes /usr/lib/perl5":
+ - add patch that passes INSTALLDIRS=vendor to perl Makefile.PL calls
+ - remove usr/lib/perl5 from debian/libqdbm-perl.dirs, files are in the
+ right directories now
+ - remove some now unneeded (re)moving in debian/rules and adjust paths
+ - use $Config{vendorarch} in debian/rules to get the perl library path at
+ build time
+ (Closes: #752806)
+
+ -- gregor herrmann <[email protected]> Sun, 06 Jul 2014 18:03:45 +0200
+
qdbm (1.8.78-4) unstable; urgency=medium
* New Standards-Version: 3.9.5.
diff -Nru qdbm-1.8.78/debian/libqdbm-perl.dirs qdbm-1.8.78/debian/libqdbm-perl.dirs
--- qdbm-1.8.78/debian/libqdbm-perl.dirs 2014-06-19 16:09:33.000000000 +0200
+++ qdbm-1.8.78/debian/libqdbm-perl.dirs 2014-07-06 18:41:19.000000000 +0200
@@ -1,4 +1,3 @@
-usr/lib/perl5
usr/share/doc/libqdbm-perl/examples
diff -Nru qdbm-1.8.78/debian/patches/qdbm-perl-vendor qdbm-1.8.78/debian/patches/qdbm-perl-vendor
--- qdbm-1.8.78/debian/patches/qdbm-perl-vendor 1970-01-01 01:00:00.000000000 +0100
+++ qdbm-1.8.78/debian/patches/qdbm-perl-vendor 2014-07-06 18:19:10.000000000 +0200
@@ -0,0 +1,26 @@
+Description: set INSTALLDIRS=vendor for perl Makefile.PL
+Origin: vendor
+Author: gregor herrmann <[email protected]>
+Last-Update: 2014-07-06
+
+--- a/perl/Makefile.in
++++ b/perl/Makefile.in
+@@ -42,15 +42,15 @@
+ all :
+ cd depot && [ -f Makefile ] || \
+ $(RUNENV) perl Makefile.PL CC="$(CC)" INC="$(INC)" OPTIMIZE="$(OPTIMIZE)" \
+- LD="$(LD)" LIBS="$(LIBS)" PREFIX="$(prefix)" ; \
++ LD="$(LD)" LIBS="$(LIBS)" PREFIX="$(prefix)" INSTALLDIRS=vendor ; \
+ $(RUNENV) make
+ cd curia && [ -f Makefile ] || \
+ $(RUNENV) perl Makefile.PL CC="$(CC)" INC="$(INC)" OPTIMIZE="$(OPTIMIZE)" \
+- LD="$(LD)" LIBS="$(LIBS)" PREFIX="$(prefix)" ; \
++ LD="$(LD)" LIBS="$(LIBS)" PREFIX="$(prefix)" INSTALLDIRS=vendor ; \
+ $(RUNENV) make
+ cd villa && [ -f Makefile ] || \
+ $(RUNENV) perl Makefile.PL CC="$(CC)" INC="$(INC)" OPTIMIZE="$(OPTIMIZE)" \
+- LD="$(LD)" LIBS="$(LIBS)" PREFIX="$(prefix)" ; \
++ LD="$(LD)" LIBS="$(LIBS)" PREFIX="$(prefix)" INSTALLDIRS=vendor ; \
+ $(RUNENV) make
+ @printf '\n'
+ @printf '#================================================================\n'
diff -Nru qdbm-1.8.78/debian/patches/series qdbm-1.8.78/debian/patches/series
--- qdbm-1.8.78/debian/patches/series 2014-06-19 16:09:33.000000000 +0200
+++ qdbm-1.8.78/debian/patches/series 2014-07-06 18:41:23.000000000 +0200
@@ -4,4 +4,5 @@
qdbm-man
qdbm-split-gdbm-wrapper
qdbm-hurd-compat
+qdbm-perl-vendor
diff -Nru qdbm-1.8.78/debian/rules qdbm-1.8.78/debian/rules
--- qdbm-1.8.78/debian/rules 2014-06-19 16:09:33.000000000 +0200
+++ qdbm-1.8.78/debian/rules 2014-07-06 18:41:52.000000000 +0200
@@ -56,6 +56,8 @@
CONFIGURE_VARS += JAVA_HOME="$(JAVA_HOME)"
endif
+PERL_ARCHLIB := $(shell perl -MConfig -e 'print substr($$Config{vendorarch}, 1)')
+
build: build-arch build-indep
build-arch: build-stamp
build-indep: build-arch build-java-stamp
@@ -134,17 +136,14 @@
mv $(CURDIR)/debian/libxqdbm$(xmajor)c2/usr/lib/libxqdbm.so $(CURDIR)/debian/libxqdbm-dev/usr/lib/
# perl
cd perl && $(MAKE) install DESTDIR=$(CURDIR)/debian/libqdbm-perl
- chmod +w $(CURDIR)/debian/libqdbm-perl/usr/lib/perl*/*/*/*/*.so
- mv $(CURDIR)/debian/libqdbm-perl/usr/lib/perl/*/* $(CURDIR)/debian/libqdbm-perl/usr/lib/perl5/
- rm -rf $(CURDIR)/debian/libqdbm-perl/usr/lib/perl $(CURDIR)/debian/libqdbm-perl/usr/lib/perl5/perllocal.pod
+ chmod +w $(CURDIR)/debian/libqdbm-perl/$(PERL_ARCHLIB)/auto/*/*.so
mv $(CURDIR)/debian/libqdbm-perl/usr/bin/* $(CURDIR)/debian/libqdbm-perl/usr/share/doc/libqdbm-perl/examples
- find $(CURDIR)/debian -type f -name .packlist | xargs rm -f
# fix rpath issue
chrpath -d $(CURDIR)/debian/tmp/usr/bin/*
chrpath -d $(CURDIR)/debian/tmp/usr/lib/*.so
#chrpath -d $(CURDIR)/with-gdbm/*.so
chrpath -d $(CURDIR)/debian/qdbm-cgi/usr/lib/cgi-bin/*.cgi
- chrpath -d $(CURDIR)/debian/libqdbm-perl/usr/lib//perl5/*/*/*.so
+ chrpath -d $(CURDIR)/debian/libqdbm-perl/$(PERL_ARCHLIB)/auto/*/*.so
dh_install --sourcedir=$(CURDIR)/debian/tmp
#mkdir -p $(CURDIR)/debian/libqdbm14-gdbm/usr/lib
#cp -Rf $(CURDIR)/with-gdbm/libqdbm.so.* $(CURDIR)/debian/libqdbm14-gdbm/usr/lib/
signature.asc
Description: Digital Signature

