ekkis / cpan2rpm Goto Github PK
View Code? Open in Web Editor NEWA utility to produce RPM packages from CPAN modules
License: GNU General Public License v2.0
A utility to produce RPM packages from CPAN modules
License: GNU General Public License v2.0
I tried to build a good number of perl packages to RPM using cpan2rpm and it works totally fine.
I noticed an error "Config command failed waiting on input." common while building some packages like
Net::SSH::Perl, Spreadsheet::Read and Chart::Graph. Expected input is different for different packages, I couldn't find a documented approach to fix this. Is this something that I can fix using "--config" option ?
here is a simple reproducer:
cpantorpm --debug -T vendor --clean-macros 'Net::SSH::Perl'
Example cpan2rpm:
cpan2rpm --no-prfx --no-depchk --no-sign --version 1 --make-maker '--prefix=/etc/nginx-perl --sbin-path=/usr/bin/nginx-perl --conf-path=/etc/nginx-perl/conf/nginx-perl.conf' Nginx::Perl
from the ./configure output:
nginx path prefix: "/etc/nginx-perl --sbin-path=/usr/bin/nginx-perl --conf-path=/etc/nginx-perl/conf/nginx-perl.conf"
It appears that cpan2rpm treats multiple arguments as a single argument.
I was able to make a quick fix by splitting the string on ' ' to push the resulting array back to @argv here:
495 local @ARGV = ();
496 local $0 = $t;
497 # kennzors: split args to pass multiple ones in
498 my @listargs = split(' ', $info->{"make-maker"});
499 #push @ARGV, $info->{"make-maker"} if $info->{"make-maker"};
500 push @ARGV, @listargs if @listargs;
501 # execute the makefile
502 my $ok = 0;
503 eval {
504 do $t; $ok++;
505 };
Example cpan2rpm:
cpan2rpm --no-sign --no-depchk --buildarch=x86_64 Nginx::HTTP
from the output:
RPM: /root/rpmbuild/RPMS/noarch/perl-Nginx-HTTP-0.03-1.noarch.rpm
SRPM: /root/rpmbuild/SRPMS/perl-Nginx-HTTP-0.03-1.src.rpm
It appears that cpan2rpm disregards the buildarch argument.
I was able to make a quick fix by omitting the code where it checks to see if the eval directory has any .xs or .c files. $info->{'buildarch'} already has "noarch" if the tarball doesn't contain any .xs or .c files, or if no argument is specified in buildarch:
429 # kennzors: buildarch is already set to noarch or specified by --buildarch
430 #else {
431 # my $xs = 0;
432 # find(sub { $xs = 1 if /\.(xs|c)$/i }, $info->{evaldir});
433 # $info->{buildarch} = "noarch" if $xs == 0;
434 # }
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.