Skip Menu |

This queue is for tickets about the Text-BibTeX CPAN distribution.

Report information
The Basics
Id: 58204
Status: resolved
Priority: 0/
Queue: Text-BibTeX

People
Owner: ambs [...] cpan.org
Requestors: Firmicus [...] gmx.net
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.44
Fixed in: (no value)



Subject: Problem with ldconfig in inc/MyBuilder.pm when not installing as root
in inc/MyBuilder.pm, the sub ACTION_install assumes that "Build install" is run as superuser, which is not always true (e.g. when installing with parameter 'install_base' or 'destdir'). To circumvent this, apply this simple patch: --- inc/MyBuilder.pm.orig +++ inc/MyBuilder.pm @@ -19,7 +19,7 @@ sub ACTION_install { my $self = shift; $self->SUPER::ACTION_install; - if ($^O =~ /linux/) { + if ($^O =~ /linux/ && $ENV{USER} eq 'root') { my $linux = Config::AutoConf->check_prog("ldconfig"); system $linux if (-x $linux); }
Applied on SVN. Will hit the new release as soon as I have some more changes :) Thank you Alberto
Subject: Re: [rt.cpan.org #58204] Problem with ldconfig in inc/MyBuilder.pm when not installing as root
Date: Tue, 08 Jun 2010 10:51:51 +0200
To: bug-Text-BibTeX [...] rt.cpan.org
From: Firmicus <Firmicus [...] gmx.net>
On 07/06/2010 19:48, Alberto Simões via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=58204> > > Applied on SVN. Will hit the new release as soon as I have some more > changes :) > > Thank you > Alberto > >
Hi Alberto, Thanks a lot! BTW I am the other guy behind Biber :) In the meantime I have hit another problem: when running ./Build install install_base="/some/weird/location" as normal user, I get this error: Text-BibTeX-0.44]$ ./Build install install_base=~/dev/biblatex-biber/dist/ctan-build/ Building Text-BibTeX Creating new 'btparse/src/bt_config.h' from 'btparse/src/bt_config.h.in'. ** Creating Manpages ** Compiling C files ** Creating libbtparse.so ** Creating binaries (dumpnames, biblex, bibparse) ** Creating test binaries ** Preparing XS code Files found in blib/arch: installing files in blib/lib into architecture dependent library tree !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ERROR: Can't create '/usr/lib' Do not have write permissions on '/usr/lib' !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! at /usr/share/perl5/vendor_perl/Module/Build/Base.pm line 3334 Calling "./Build fakeinstall install_base=..." instead shows where the problem is: [francois@samarqand Text-BibTeX-0.44]$ ./Build fakeinstall install_base=~/dev/biblatex-biber/dist/ctan-build/ Building Text-BibTeX Creating new 'btparse/src/bt_config.h' from 'btparse/src/bt_config.h.in'. ** Creating Manpages ** Compiling C files ** Creating libbtparse.so ** Creating binaries (dumpnames, biblex, bibparse) ** Creating test binaries ** Preparing XS code Files found in blib/arch: installing files in blib/lib into architecture dependent library tree !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARNING: Can't create '/usr/lib' Do not have write permissions on '/usr/lib' !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Installing /home/francois/dev/biblatex-biber/dist/ctan-build/lib/perl5/x86_64-linux-thread-multi/auto/Text/BibTeX/BibTeX.so Installing /home/francois/dev/biblatex-biber/dist/ctan-build/lib/perl5/x86_64-linux-thread-multi/auto/Text/BibTeX/BibTeX.bs Installing /home/francois/dev/biblatex-biber/dist/ctan-build/bin/dumpnames Installing /home/francois/dev/biblatex-biber/dist/ctan-build/bin/biblex Installing /home/francois/dev/biblatex-biber/dist/ctan-build/bin/bibparse Installing /home/francois/dev/biblatex-biber/dist/ctan-build/man/man1/bt_traversal.1 <snip> Installing /home/francois/dev/biblatex-biber/dist/ctan-build/man/man3/Text::BibTeX::Entry.3pm Installing /usr/lib/libbtparse.so !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARNING: WARNING: Failed chmod(0555, /usr/lib/libbtparse.so): Operation not permitted !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Writing /home/francois/dev/biblatex-biber/dist/ctan-build/lib/perl5/x86_64-linux-thread-multi/auto/Text/BibTeX/.packlist Thus the installation path of libbtparse.so is absolute and does not take install_base into account, which is clear on line 55 in your Build.PL: $builder->install_path( 'usrlib' => $libdir ); where $libdir = '/usr/lib/' on Unix-like systems. Do you think it might be possible to fix this in some way? That is, to make the install path of 'usrlib' aware of the parameter install_base? Probably it can be done in inc/MyBuilder.pm in ACTION_install just before calling $self->SUPER::ACTION_install. Update: I have just tried this: if (defined $self->{properties}->{install_base}) { $self->install_path( 'usrlib' => catdir($self->{properties}->{install_base}, 'lib') ) } and it appears to work: patch attached! I also found this can actually be done on the command line as ./Build install install_base=$targetdir --install_path usrlib=$targetdir/lib Of course with such an installation location, Text::BibTeX will not be able to find libbtparse.so, but this can be fixed manually by the user/administrator at a later stage. A warning about this situation would be nice, so at least installation would not just fail. The reason I come with this is that I am currently trying to integrate biber into the TeX Live build process (http://tug.org/texlive/build.html), and for that I need a reliable way to automatize its installation and that of all its non-core dependencies to a temporary directory, on multiple architectures. I want to use App::cpanminus for that (with option -L), but the latter fails on installing Text-BibTeX because of the above issue. Regards, François Charette PS: Ah, and another thing: Could you please include the modules Capture::Tiny and Config::AutoConf in the inc/ directory of the Text-BibTeX distribution? That would save a lot of pain to Biber users who are not familiar with Perl and CTAN. Just copy the appropriate files to inc/Capture/Tiny.pm inc/Config/AutoConf.pm inc/Config/AutoConf/Linker.pm and remove those two packages from build_requires :)

Message body is not shown because sender requested not to inline it.

Hello Thanks for the patch. You got it right. Because you specify install path during the install action it is just ignored in the rest of the code. If you had specified it during the perl Build.PL it should work fine. Unfortunately TIMTOWTDI :) Applied, again :) Regarding adding Capture::Tiny and ExtUtils::AutoConf to inc, I am not really happy with it. How is the install process of Biber? Can't it use CPAN::Shell and install the dependencies silently? Cheers Alberto
Subject: Re: [rt.cpan.org #58204] Problem with ldconfig in inc/MyBuilder.pm when not installing as root
Date: Tue, 08 Jun 2010 16:19:59 +0200
To: bug-Text-BibTeX [...] rt.cpan.org
From: Firmicus <Firmicus [...] gmx.net>
On 08/06/2010 11:07, Alberto Simões via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=58204> > > Hello > > Thanks for the patch. You got it right. Because you specify install path > during the install action it is just ignored in the rest of the code. If > you had specified it during the perl Build.PL it should work fine. > Unfortunately TIMTOWTDI :) >
Indeed! Show quoted text
> Applied, again :) >
Thanks. Show quoted text
> Regarding adding Capture::Tiny and ExtUtils::AutoConf to inc, I am not > really happy with it. How is the install process of Biber? Can't it use > CPAN::Shell and install the dependencies silently? >
Well, this is entirely up to you. My motivation is asking this comes from the fact that not a few users had a problem similar to this one: http://sourceforge.net/tracker/?func=detail&aid=2997821&group_id=228270&atid=1073792 because "./Build installdeps" does not take into account the builddeps of deps. This may actually be an issue with Module::Build itself. Of course, it would be possible to circumvent this in Biber's own Build.PL, but bundling those two small build dependencies in Text-BibTeX would make it all much easier :) Cheers, François
Show quoted text
> Well, this is entirely up to you. My motivation is asking this comes > from the fact that not a few users had a problem similar to this one: >
http://sourceforge.net/tracker/?func=detail&aid=2997821&group_id=228270&atid=1073792 Show quoted text
> because "./Build installdeps" does not take into account the builddeps > of deps. This may actually be an issue with Module::Build itself. Of > course, it would be possible to circumvent this in Biber's own > Build.PL, > but bundling those two small build dependencies in Text-BibTeX would > make it all much easier :)
Accordingly with Module::Build developers: -> All "installdeps" does is fire up a CPAN client with a list of missing dependencies. Normally, that should resolve dependencies of dependencies. (Note that they may not have CPAN configured to install build dependencies.) If someone can provide a log of the output then maybe we can diagnose the "problem" better. Not sure if this helps :) Cheers PS: 0.45 with your last two patches should be appearing on a CPAN mirror near you.
Subject: Re: [rt.cpan.org #58204] Problem with ldconfig in inc/MyBuilder.pm when not installing as root
Date: Tue, 08 Jun 2010 18:45:01 +0200
To: bug-Text-BibTeX [...] rt.cpan.org
From: Firmicus <Firmicus [...] gmx.net>
On 08/06/2010 18:06, Alberto Simões via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=58204> > >
>> Well, this is entirely up to you. My motivation is asking this comes >> from the fact that not a few users had a problem similar to this one: >> >>
> http://sourceforge.net/tracker/?func=detail&aid=2997821&group_id=228270&atid=1073792 >
>> because "./Build installdeps" does not take into account the builddeps >> of deps. This may actually be an issue with Module::Build itself. Of >> course, it would be possible to circumvent this in Biber's own >> Build.PL, >> but bundling those two small build dependencies in Text-BibTeX would >> make it all much easier :) >>
> Accordingly with Module::Build developers: > > -> All "installdeps" does is fire up a CPAN client with a list of > missing dependencies. Normally, that should resolve dependencies of > dependencies. (Note that they may not have CPAN configured to install > build dependencies.) If someone can provide a log of the output then > maybe we can diagnose the "problem" better. > > Not sure if this helps :) >
It does, somehow ... :) Show quoted text
> PS: 0.45 with your last two patches should be appearing on a CPAN mirror > near you. > >
Excellent! Thanks again for your quick responses. FC
I think this is solved a long time ago :) Cheers ambs