Bug 53051 - Perl-RPM build problems with rpm-4.0.3-0.96.src.rpm
Perl-RPM build problems with rpm-4.0.3-0.96.src.rpm
Product: Red Hat Raw Hide
Classification: Retired
Component: rpm-perl (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
Depends On:
  Show dependency treegraph
Reported: 2001-09-02 14:40 EDT by Ed Avis
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-09-07 12:03:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ed Avis 2001-09-02 14:40:49 EDT
Description of Problem:

The package  (from Rawhide) contains leftover
generated files in the Perl-RPM directory - the source tarball is
not 'clean'.  This stops it from building correctly unless you have
the exact same version of perl that was used to generate the files.

Version-Release number of selected component (if applicable):


How Reproducible:

Download the SRPM and rpm --rebuild.  But it is more convenient
to extract the source tarball from the SRPM and build that by hand.
I can reproduce the problems on my system because it has a differing
(ie, older) version of perl installed to that used by the package
builder.  If you have the same version of perl you may not notice
a problem, but it is still a bad idea to have partially-built sources.

There are several things which stop Perl-RPM from building.  The first
is a bug in Makefile.PL where it checks the installed RPM version.  I
have sent a bug report for this to the RPM mailing list (put
$rpm_version = oct($rpm_version); before the numeric comparison is made).

Secondly, there are lots of .c files lying around.  These were generated
by xsubpp from .xs files, and they are tied closely to one version of
perl.  If you have a different version they often won't build.  Since
these .c files are not actually source code, just intermediate files,
they should be removed (make distclean does this).  Perhaps these .c
files ended up in the CVS tree by mistake.  make distclean also removes
some other intermediate files like manual pages.

If you go to the sources in /usr/src/redhat/BUILD/rpm-4.0.3/Perl-RPM/,
fix the bug in Makefile.PL and do a perl Makefile.PL followed by make
distclean, you should have a clean source tree, suitable for making into
an SRPM.

But there is one more bug: the pod documentation in RPM.pm does not have
a SYNOPSIS section.  My version of pod2man insists on this, perhaps later
versions do not, but since a synopsis is a nice thing to have anyway
here's a fix:


    use RPM qw(vercmp);
    print 'OS: ', rpm_osname(), ', arch: ', rpm_archname(), "\n";
    if (vercmp('1.2', '7', '1.3', '2') > 0) {
        print "newer\n";

Put this in between the NAME and DESCRIPTION sections of RPM.pm.  Hmm,
this isn't so much a RedHat issue as something for the rpm maintainers
themselves.  I'll send another message to the rpm mailing list with this

Once you've done these three things, the source tree should work.

(In fact, it looks like some kind of distclean or maintainerclean is needed
for the source tree as a whole - there are a lot of Makefiles about which
should surely be generated by configure.)
Comment 1 Jeff Johnson 2001-09-02 14:53:34 EDT
The "partially built source" is a remnant of
how rpm "make dist" currently packages rpm-perl
(aka Perl-RPM). You should probably look for
Randy's Perl-RPM distribution rather than extracting
from rpm if you want just Perl-RPM
Comment 2 Ed Avis 2001-09-02 15:01:11 EDT
Oh, I didn't realize that the source tree came from 'make dist' (I assumed it
was straight out of CVS).  In that case, this looks like a bug in rpm itself
rather than RedHat's packaging job.  make dist should try harder to get clean
sources (and it could remove the CVS/ directories lying around, too).

I didn't really want Perl-RPM, I wanted to upgrade rpm itself (too see whether
a segfault bug had been fixed in the latest snapshot) and Perl-RPM stopped it

I do think this is a fairly important issue though: it's possible that
half-built .c files generated with one version of perl could cause
subtle bugs used with a different version.  I was lucky - all that happened
was that it failed to build :-).  (I have perl 5.005_03.)

Would you like me to chase this up on the rpm mailing list or are they already
aware of the problem?  (I don't subscribe to that list myself.)
Comment 3 Jeff Johnson 2001-09-07 12:03:13 EDT
Changing component ...
Comment 4 Jeff Johnson 2002-06-28 12:14:41 EDT
I believe that this problem has been fixed.
Howvere, the rpm-perl package has been dropped
in favor of a CPAN distribution. Try Perl-RPM
from CPAN, or RPM@, also from CPAN.

Note You need to log in before you can comment on or make changes to this bug.