Bug#820395: dh-make-perl: Don't use local::lib $HOME/perl5 location for --build of .deb
Jacob L Anawalt
janawalt at geckosoftware.com
Thu Apr 7 20:27:23 UTC 2016
Package: dh-make-perl
Version: 0.84-2
Severity: wishlist
Dear Maintainer,
I used dh-build-perl --requiredeps --build --cpan to build some modules
not currently available in Debian 8 (jessie) and was surprised to find
that installing the .deb package put files into $HOME/perl5.
If I instead ran dh-build-perl --requiredeps --cpan <module> and then
changed into the directory and ran debuild the generated .deb installed
into ./usr and not into ./home/jacob/perl5
After getting some help to sort this out in #debian-perl from gregoa and
mst I saw that it wasn't anything in .cpan, but some local::lib
environment variables added to my .bashrc file that was causing this. It
was suggested by mst that dh-build-perl --build might be picking up
local::lib settings and debuild controls the environment variables more
strictly.
Before getting help on #debian-perl I had tried blowing away .cpan
several times and re-downloaded and re-built the modules without any
change. I then started trying without different options to find that it
was the --build option that put the ~/perl5 path into the package.
After getting help and commenting out the .bashrc Perl environment
variables and attempting again in a new terminal --build created
packages that were rooted in ./usr just like debuild.
Since the point of --build is to create the binary .deb package and it
is expected that a .deb installs to ./usr, please change the --build
code to sanitize the environment or whatever so that it doesn't build a
.deb with local::lib paths. It was confusing and time consuming to
figure out why the .deb packages were putting files into ./home.
These are the lines that appeared in my .bashrc the same day I first
tried building on this system. I suspect I answered a CPAN config
question the wrong way to have these added. I commented them out to fix
the problem.
PATH="/home/jacob/perl5/bin${PATH+:}${PATH}"; export PATH;
PERL5LIB="/home/jacob/perl5/lib/perl5${PERL5LIB+:}${PERL5LIB}"; export
PERL5LIB;
PERL_LOCAL_LIB_ROOT="/home/jacob/perl5${PERL_LOCAL_LIB_ROOT+:}${PERL_LOCAL_LIB_ROOT}";
export PERL_LOCAL_LIB_ROOT;
PERL_MB_OPT="--install_base \"/home/jacob/perl5\""; export PERL_MB_OPT;
PERL_MM_OPT="INSTALL_BASE=/home/jacob/perl5"; export PERL_MM_OPT;
-- System Information:
Debian Release: 8.4
APT prefers stable
APT policy: (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 3.16.0-4-686-pae (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages dh-make-perl depends on:
ii debhelper 9.20150101
ii dpkg-dev 1.17.26
ii fakeroot 1.20.2-1
ii libapt-pkg-perl 0.1.29+b2
ii libarray-unique-perl 0.08-1
ii libclass-accessor-perl 0.34-1
ii libcpan-meta-perl 2.142690-1
ii libdpkg-perl 1.17.26
ii libemail-address-perl 1.905-2
ii libemail-date-format-perl 1.005-1
ii libfile-which-perl 1.09-1
ii liblist-moreutils-perl 0.33-2+b1
ii libmodule-depends-perl 0.16-1
ii libparse-debcontrol-perl 2.005-4
ii libparse-debianchangelog-perl 1.2.0-1.1
ii libsoftware-license-perl 0.103010-3
ii libtie-ixhash-perl 1.23-1
ii libwww-mechanize-perl 1.73-2
ii libyaml-libyaml-perl 0.41-6
ii libyaml-perl 1.13-1
ii make 4.0-8.1
ii perl 5.20.2-3+deb8u4
ii perl-modules [libcpan-meta-perl] 5.20.2-3+deb8u4
Versions of packages dh-make-perl recommends:
ii apt-file 2.5.4
ii git 1:2.1.4-2.1+deb8u2
ii pristine-tar 1.33
dh-make-perl suggests no packages.
-- no debconf information
More information about the pkg-perl-maintainers
mailing list