Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: CPAN modules to RPMs

by SBECK (Hermit)
on May 11, 2018 at 20:12 UTC ( #1214401=note: print w/replies, xml ) Need Help??

in reply to CPAN modules to RPMs

There are really only two supported ways to make RPMs (not counting manually creating the spec file, etc.). cpanspec (see your first link) and cpantorpm. cpanspec is good, but has some problems (it hardcodes some redhat specific stuff, and it tries to parse the Makefile.PL/Build.PL files which is fine if they follow strict conventions, but I didn't like that assumption), so I wrote cpantorpm. You can read more details about why I wrote it here. Have you tried to use it? It's got a lot of options, but if you have any questions, feel free to toss them out and I'll try to respond. It'll do everything that cpanspec and cpan2rpm (an older tool which hasn't gotten much support in a long time) will do, doesn't care what rpm based distribution you're on (I use it on both OpenSuSE and Redhat), and I've built hundreds of RPMs with it.

Replies are listed 'Best First'.
Re^2: CPAN modules to RPMs
by Anonymous Monk on Oct 20, 2018 at 13:56 UTC
    Hi, SBECK, Trying CPANtoRPM on a Centos 7 (Perl version 5.16.3). I assume "rpmbuild" would be the packager so I using
    cpantorpm -n -p rpmbuild App::CPANtoRPM
    This yields:
    ************************************************************ * Initializing cpantorpm (1.08) ************************************************************ ************************************************************ * Obtaining package: App::CPANtoRPM ************************************************************ ************************************************************ * Reading package metadata (pre-build): App-CPANtoRPM-1.08 ************************************************************ ************************************************************ * Building package: App-CPANtoRPM-1.08 ************************************************************ ************************************************************ * Reading package metadata (post-build): App-CPANtoRPM-1.08 ************************************************************ WARN: Automatic detection of main POD file failed. rm -f \ blib/script/cpantorpm-depreq blib/script/cpantorpm rm -f \ *.a core \ core.[0-9] blib/arch/auto/App/CPANtoRPM/extralibs.all \ core.[0-9][0-9] CPANtoRPM.bso \ pm_to_blib.ts MYMETA.json \ core.[0-9][0-9][0-9][0-9] MYMETA.yml \ CPANtoRPM.x \ perl tmon.out \ *.o pm_to_blib \ blib/arch/auto/App/CPANtoRPM/extralibs.ld blibdirs.ts \ core.[0-9][0-9][0-9][0-9][0-9] *perl.core \ core.*perl.*.? Makefile.aperl \ CPANtoRPM.def perl \ core.[0-9][0-9][0-9] mon.out \ libCPANtoRPM.def perlmain.c \ perl.exe so_locations \ CPANtoRPM.exp rm -rf \ blib mv Makefile Makefile.old > /dev/null 2>&1 rm -f \ Makefile.old Makefile rm -rf \ App-CPANtoRPM-1.08 /usr/bin/perl "-MExtUtils::Manifest=fullcheck" -e fullcheck ************************************************************ * Writing spec file: App-CPANtoRPM ************************************************************ ************************************************************ * Creating RPM: App-CPANtoRPM ************************************************************ Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.4WaIkW + umask 022 + cd /tmp/cpantorpm + cd /tmp/cpantorpm + cd App-CPANtoRPM-1.08 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + chmod -R u+w /tmp/cpantorpm/App-CPANtoRPM-1.08 + '[' -f pm_to_blib ']' + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.g8cbDG + umask 022 + cd /tmp/cpantorpm + cd App-CPANtoRPM-1.08 + /usr/bin/perl Makefile.PL 'OPTIMIZE=-O2 -g -pipe -Wall -Wp,-D_FORTIF +Y_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-s +ize=4 -grecord-gcc-switches -m64 -mtune=generic' INSTALLDIRS=site Checking if your kit is complete... Looks good Writing Makefile for App::CPANtoRPM Writing MYMETA.yml and MYMETA.json + make -j8 cp bin/cpantorpm-depreq blib/script/cpantorpm-depreq cp bin/cpantorpm blib/script/cpantorpm /usr/bin/perl -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/cpan +torpm-depreq /usr/bin/perl -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/cpan +torpm cp lib/App/CPANtoRPM.pod blib/lib/App/CPANtoRPM.pod cp lib/App/ blib/lib/App/ Manifying blib/man1/cpantorpm.1 Manifying blib/man3/App::CPANtoRPM.3pm + '[' -z 1 ']' + exit 0 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.PQQD2r + umask 022 + cd /tmp/cpantorpm + '[' /home/fli/rpmbuild/BUILDROOT/perl-App-CPANtoRPM-1.08-1.el7.x86_6 +4 '!=' / ']' + rm -rf /home/fli/rpmbuild/BUILDROOT/perl-App-CPANtoRPM-1.08-1.el7.x8 +6_64 ++ dirname /home/fli/rpmbuild/BUILDROOT/perl-App-CPANtoRPM-1.08-1.el7. +x86_64 + mkdir -p /home/fli/rpmbuild/BUILDROOT + mkdir /home/fli/rpmbuild/BUILDROOT/perl-App-CPANtoRPM-1.08-1.el7.x86 +_64 + cd App-CPANtoRPM-1.08 + rm -rf /home/fli/rpmbuild/BUILDROOT/perl-App-CPANtoRPM-1.08-1.el7.x8 +6_64 + make pure_install PERL_INSTALL_ROOT=/home/fli/rpmbuild/BUILDROOT/per +l-App-CPANtoRPM-1.08-1.el7.x86_64 Manifying blib/man1/cpantorpm.1 Manifying blib/man3/App::CPANtoRPM.3pm Installing /home/fli/rpmbuild/BUILDROOT/perl-App-CPANtoRPM-1.08-1.el7. +x86_64/home/fli/perl5/lib/perl5/App/CPANtoRPM.pod Installing /home/fli/rpmbuild/BUILDROOT/perl-App-CPANtoRPM-1.08-1.el7. +x86_64/home/fli/perl5/lib/perl5/App/ Installing /home/fli/rpmbuild/BUILDROOT/perl-App-CPANtoRPM-1.08-1.el7. +x86_64/home/fli/perl5/man/man1/cpantorpm.1 Installing /home/fli/rpmbuild/BUILDROOT/perl-App-CPANtoRPM-1.08-1.el7. +x86_64/home/fli/perl5/man/man3/App::CPANtoRPM.3pm Installing /home/fli/rpmbuild/BUILDROOT/perl-App-CPANtoRPM-1.08-1.el7. +x86_64/home/fli/perl5/bin/cpantorpm-depreq Installing /home/fli/rpmbuild/BUILDROOT/perl-App-CPANtoRPM-1.08-1.el7. +x86_64/home/fli/perl5/bin/cpantorpm + find /home/fli/rpmbuild/BUILDROOT/perl-App-CPANtoRPM-1.08-1.el7.x86_ +64 -type f -name .packlist -exec rm -f '{}' ';' + find /home/fli/rpmbuild/BUILDROOT/perl-App-CPANtoRPM-1.08-1.el7.x86_ +64 -type f -name '*.bs' -size 0 -exec rm -f '{}' ';' + find /home/fli/rpmbuild/BUILDROOT/perl-App-CPANtoRPM-1.08-1.el7.x86_ +64 -depth -type d -exec rmdir '{}' ';' + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w /home/fli/rpmbuild/BUILDROOT/per +l-App-CPANtoRPM-1.08-1.el7.x86_64/home + /usr/lib/rpm/ --strict-build-id -m --run-dwz --dwz- +low-mem-die-limit 10000000 --dwz-max-die-limit 110000000 /tmp/cpantor +pm/App-CPANtoRPM-1.08 /usr/lib/rpm/sepdebugcrcfix: Updated 0 CRC32s, 0 CRC32s did match. + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/redhat/brp-compress + /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1 + /usr/lib/rpm/redhat/brp-python-hardlink + /usr/lib/rpm/redhat/brp-java-repack-jars Processing files: perl-App-CPANtoRPM-1.08-1.el7.noarch error: File not found by glob: /home/fli/rpmbuild/BUILDROOT/perl-App-C +PANtoRPM-1.08-1.el7.x86_64/usr/bin/* error: File not found by glob: /home/fli/rpmbuild/BUILDROOT/perl-App-C +PANtoRPM-1.08-1.el7.x86_64/usr/local/share/perl5/* error: File not found by glob: /home/fli/rpmbuild/BUILDROOT/perl-App-C +PANtoRPM-1.08-1.el7.x86_64/usr/share/man/man1/* error: File not found by glob: /home/fli/rpmbuild/BUILDROOT/perl-App-C +PANtoRPM-1.08-1.el7.x86_64/usr/share/man/man3/* RPM build errors: File not found by glob: /home/fli/rpmbuild/BUILDROOT/perl-App-CPAN +toRPM-1.08-1.el7.x86_64/usr/bin/* File not found by glob: /home/fli/rpmbuild/BUILDROOT/perl-App-CPAN +toRPM-1.08-1.el7.x86_64/usr/local/share/perl5/* File not found by glob: /home/fli/rpmbuild/BUILDROOT/perl-App-CPAN +toRPM-1.08-1.el7.x86_64/usr/share/man/man1/* File not found by glob: /home/fli/rpmbuild/BUILDROOT/perl-App-CPAN +toRPM-1.08-1.el7.x86_64/usr/share/man/man3/* ERR: Unable to execute /usr/bin/rpmbuild: No such file or directory

    Could you tell me what I'm doing wrong?

    Many thanks!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1214401]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2020-10-23 11:31 GMT
Find Nodes?
    Voting Booth?
    My favourite web site is:

    Results (238 votes). Check out past polls.