CPAN spec file generator needs testing, feedback

Steven Pritchard steve at silug.org
Thu Jun 10 04:34:13 UTC 2004


I've mentioned here before that I've written a script to build
"correct" (in other words, "will pass QA") spec files for perl
modules.  Thanks to José Pedro Oliveira, the output of the script is
now *very* close to the "official" fedora.us spec template.

The script seems useful enough that I'd really like some more feedback
on it.  It can be found here:

  http://www.silug.org/~steve/software/scripts/perl/cpanspec

Besides trying to be correct, the script *tries* to automatically
determine BuildRequires, BuildArch, package description, and which
files are documentation.  The generated spec files *will* have to be
edited, but hopefully only slightly.

Some notes:

  * Since there doesn't seem to be a way to guess the license, the
    script now uses the string "CHECK(GPL or Artistic)" so that
    rpmlint will complain and remind the packager/reviewer to actually
    verify the license.

  * The template includes

      BuildRequires: perl >= 1:5.6.1

    I've left that out because I see any reason to clutter up
    fedora.us packages with cruft for unsupported releases.  If anyone
    feels strongly that I'm wrong here, please let me know why.

  * The template includes

      chmod -R u+w $RPM_BUILD_ROOT/*

    I've gone a step further and made that "u+rwX,go+rX,go-w".  IMHO,
    if we're going to touch each file, we may as well *really* touch
    each file.  ;-)  Again, if anyone thinks I'm wrong, please tell me
    why...

  * The description is reformatted using Text::Autoformat.  If you
    want to test the script, perhaps this would be a good excuse to QA
    my perl-Text-Autoformat package.  :-)

      https://bugzilla.fedora.us/show_bug.cgi?id=1354

    Otherwise, you can comment out a couple of lines (the "use" line
    and the one that calls autoformat()).

Steve
-- 
Steven Pritchard - K&S Pritchard Enterprises, Inc.
Email: steve at kspei.com             http://www.kspei.com/
Phone: (618)398-7360               Mobile: (618)567-7320





More information about the fedora-devel-list mailing list