DESTDIR support #39
Comments
sub alien_refresh_packlist also needs some support (one for $dir and one for ExtUtils::Installed) |
Given it's on github... fork, modify, add a test, then pull request? |
If I have complete solution then I'll do that. In mean time I'll document here what the problems are. New problem, destdir paths end up in ConfigData.pm (while they shouldn't):
|
Please at least fork, make a test that reliably fails for this issue, then PR that. |
Here is a concrete example: key part of the log is here:
It is important that we address this issue, because packaging systems like rpm and .dep rely on them for creating packages. That said, most Debian or RedHat maintainers are going to prefer to use the system libraries rather than install in |
This does some of what we want: but I get this weird MB error:
after an otherwise correct install |
@arekm I am not seeing the destdir paths in the ConfigData.pm file. This is what I get: 'working_directory' => '/home/ollisg/dev/Alien-Base-Extras/Acme-Alien-DontPanic/_alien/dontpanic-1.0',
'name' => 'dontpanic',
'pkgconfig' => {
'_manual' => bless( {
'vars' => {
'pcfiledir' => '/home/ollisg/.perlbrew/libs/perl-5.18.2c34@test1/lib/perl5/auto/share/dist/Acme-Alien-DontPanic'
},
'keywords' => {
'Version' => '',
'Libs' => '',
'Cflags' => ''
},
'package' => 'dontpanic'
}, 'Alien::Base::PkgConfig' ),
'dontpanic' => bless( {
'package' => 'dontpanic',
'keywords' => {
'Description' => 'An example library',
'Libs.private' => '',
'Cflags' => '-I${includedir}',
'Name' => 'dontpanic',
'Version' => '1.0',
'Libs' => '-L${libdir} -ldontpanic'
},
'vars' => {
'libdir' => '${exec_prefix}/lib',
'exec_prefix' => '${prefix}',
'prefix' => '/home/ollisg/.perlbrew/libs/perl-5.18.2c34@dev/lib/perl5/auto/share/dist/Acme-Alien-DontPanic',
'pcfiledir' => '/home/ollisg/dev/Alien-Base-Extras/Acme-Alien-DontPanic/_alien/dontpanic-1.0/src',
'includedir' => '${prefix}/include'
}
}, 'Alien::Base::PkgConfig' )
},
|
Tested on 0.004_02 and DESTDR patch 07e8ab7 - seems to be working, no DESTDIR in ConfigData.pm. Unfortunately the same problem as 2 comments ago: |
We should probably add tests for DESTDIR support in AB. cf the tests for DESTDIR support in https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/blob/master/t/basic.t |
@arekm if you want to try my destdir branch I think I've resolved all the DESTDIR issues. |
Could you try building Alien-LibGumbo with it? http://search.cpan.org/dist/Alien-LibGumbo/ Builds fine now (no more " is not installed" problem) but generated Alien/LibGumbo/ConfigData.pm contains DESTDIR in paths. There is also
but didn't verify (yet) if it is DESTDIR related issue. |
@arekm I am not seeing any DESTDIR inside ConfigData.pm, here is the sequence of commands that I used:
|
Also created an rpm for
|
Was doing: $ perl Build.PL destdir=$RPM_BUILD_ROOT but using your way works. Thanks! |
DESTDIR is feature that allows to use "fake root" directory where everything gets installed
relative to this. DESTDIR is used by distributions for packaging software (using rpm, deb)
Regular Build.PL support destdir well. Unfortunately Alien/Base/ModuleBuild.pm doesn't support it.
built fine but now install part:
it did install few files correctly bug then failed :-/
Failed to change directory to '/usr/local/share/perl5/auto/share/dist/Alien-LibGumbo': No such file or directory at /usr/share/perl5/vendor_perl/Alien/Base/ModuleBuild.pm line 312.
So please implement destdir support in Alien Base.
One solution could be this patch:
http://git.pld-linux.org/gitweb.cgi?p=packages/perl-Alien-Base.git;a=blob_plain;f=perl-Alien-Base-DESTDIR.patch;hb=HEAD
The text was updated successfully, but these errors were encountered: