Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

cpan2rpm / Pass phrase check failed

by talexb (Canon)
on Jan 11, 2008 at 21:19 UTC ( #661992=perlmeditation: print w/ replies, xml ) Need Help??

This afternoon I was trying to use cpan2rpm to build some RPMs from CPAN. Except that the process was failing.

[alex@box FC8]$ cpan2rpm +CLINTON/Cache-Cache-1.05.tar.gz -- cpan2rpm - Ver: 2.028 -- Upgrade check Fetch: HTTP -- module: +Cache-1.05.tar.gz -- Metadata retrieval Tarball extraction: [/home/rand/alex/RPMS/SOURCES/Cache-Cache-1.05.tar +.gz] Generating spec file SPEC: /home/box/alex/RPMS/SPECS/Cache-Cache.spec Generating package Signing package (pass phrase required) error: You must set "%_gpg_name" in your macro file Pass phrase check failed RPM build failed [1] at /usr/bin/cpan2rpm line 1049. -- Done --

A pass phrase is required? Hunh?

Google didn't help -- IRC was amusing, but also not helpful. Time to pull out the debugger.

OK, cpan2rpm is running the command

/usr/bin/rpmbuild -ba --clean --sign ../RPMS/SPECS/Cache-Cache.spec

I bet I just need to counteract that 'sign' argument. Let's check the rpmbuild man page .. hmm, refers us to rpm, OK, check that man page .. bingo!

So let's try it with the no-sign argument instead ..

[alex@box FC8]$ cpan2rpm --no-sign +/id/D/DC/DCLINTON/Cache-Cache-1.05.tar.gz -- cpan2rpm - Ver: 2.028 -- Upgrade check Fetch: HTTP [...] + rm -rf Cache-Cache-1.05 + exit 0 RPM: /home/box/alex/RPMS/RPMS/noarch/perl-Cache-Cache-1.05-1.noarch.rp +m SRPM: /home/box/alex/RPMS/SRPMS/perl-Cache-Cache-1.05-1.src.rpm -- Done --

Nice -- without access to the cpan2rpm source, I'd have to poke and prod to try to guess what was going on. Instead, I can dig, find the problem, figure out a solution and keep moving. Another reason I love open source.

Alex / talexb / Toronto

"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

Comment on cpan2rpm / Pass phrase check failed
Select or Download Code
Replies are listed 'Best First'.
Re: cpan2rpm / Pass phrase check failed
by phenom (Chaplain) on Jan 12, 2008 at 12:47 UTC
    ++! Thanks, that is helpful! I build most of the modules I use with cpan2rpm, but haven't had time to figure out how to do away with having to sign it every time...

    There is also cpanflute2, which is nice, but this is a two step job: it builds a source rpm, and then you rebuild it like so:

    rpmbuild --rebuild perl-foo-bar-0.01.src.rpm
    Dave M
Re: cpan2rpm / Pass phrase check failed
by Anonymous Monk on Dec 15, 2009 at 18:48 UTC
    Thank you for posting this! I would have poked and prodded my way to the "--no-sign" solution too (yay open source) but you saved me a lot of time.
Re: cpan2rpm / Pass phrase check failed
by Anonymous Monk on Nov 23, 2010 at 21:57 UTC
    good idea to put an alias for cpan2rpm to cpan2rpm --no-sign in bashrc.local

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://661992]
Approved by Corion
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2016-05-03 20:00 GMT
Find Nodes?
    Voting Booth?