Coder Social home page Coder Social logo

cpan2rpm's People

Contributors

ekkis avatar gcoxmoz avatar hookbot avatar mrseccubus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cpan2rpm's Issues

How to handle "Config command failed waiting on input"

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'

Can't pass in multiple arguments to MakeFile.pl

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         };

Can't pass in --buildarch

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     #    }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.