CPAN spec file generator needs testing, feedback

Chip Turner cturner at redhat.com
Thu Jun 10 12:39:22 UTC 2004


Take a look at perl-RPM-Specfile package (ships with FC2),
specifically the RPM::Specfile module inside it.  It basically is a
wrapper around creating spec files and is what I use for packaging for
Fedora and RHEL.  It definitely has some flaws, though, and it looks
like the template you create addresses some of them.  Also included is
cpanflute2, which takes a tarball and (tries, usually succesfully) to
create an RPM out of it.

If at all possible, I think it would be better to consolidate this
kind of work around a single package and make it better so that we're
not all reinventing the wheel over and over ("but mine's more round!"
:)).

I would gladly accept patches or feedback to make it more usable for
making a script like yours, but I bet that enhancing cpanflute2 would
yield a better solution than two separate programs.  

Chip

Steven Pritchard <steve at silug.org> writes:

> 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
>
>
> -- 
> fedora-devel-list mailing list
> fedora-devel-list at redhat.com
> http://www.redhat.com/mailman/listinfo/fedora-devel-list
>

-- 
Chip Turner                   cturner at redhat.com
                              Red Hat, Inc.





More information about the devel mailing list