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

[alex@box FC8]$ cpan2rpm http://search.cpan.org/CPAN/authors/id/D/DC/D +CLINTON/Cache-Cache-1.05.tar.gz -- cpan2rpm - Ver: 2.028 -- Upgrade check Fetch: HTTP -- module: http://search.cpan.org/CPAN/authors/id/D/DC/DCLINTON/Cache- +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 http://search.cpan.org/CPAN/authors +/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


In reply to cpan2rpm / Pass phrase check failed by talexb

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.