Bug 58517 - Execute bit missing on /usr/lib/rpm/perl.req
Summary: Execute bit missing on /usr/lib/rpm/perl.req
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm-build
Version: 7.2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-01-18 16:19 UTC by dharris
Modified: 2008-05-01 15:38 UTC (History)
0 users

(edit)
Clone Of:
(edit)
Last Closed: 2002-01-18 16:19:51 UTC


Attachments (Terms of Use)
Combined patch for bugs 58519,58536,58537 as mentioned in previous comment. (4.65 KB, patch)
2002-01-23 00:27 UTC, dharris
no flags Details | Diff

Description dharris 2002-01-18 16:19:47 UTC
Description of Problem:

The execute bit is not set on the 
/usr/lib/rpm/perl.req script, which causes the proper perl requirements of an 
RPM package to not be found and included when an RPM is built.

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

rpm-build-4.0.3-1.03

SHELL SCRIPT WITH COMMENTARY TO SHOW BUG:
----------------------------------------------------------------

This shows that the /usr/lib/rpm/perl.req script was packaged without the 
execute bit set and is currently that way on my system.

# dir /usr/lib/rpm/*perl*
-rwxr-xr-x    1 rpm      rpm           267 Sep  6 11:26 /usr/lib/rpm/find-
provides.perl
-rwxr-xr-x    1 rpm      rpm           925 Sep  6 11:26 /usr/lib/rpm/find-
requires.perl
-rwxr-xr-x    1 rpm      rpm          4858 Sep  6 11:26 /usr/lib/rpm/perl.prov
-rw-r--r--    1 rpm      rpm          5480 Sep  6 11:26 /usr/lib/rpm/perl.req

# rpm -qf /usr/lib/rpm/perl.req
rpm-build-4.0.3-1.03

# rpm -V rpm-build

Here I build an RPM (which was produced by cpanflute). I know because I wrote 
this perl extension that it should require the Authen::PAM module. You can see 
that this is not listed in the requirements of the built RPM package.

Note that the SPEC file created by cpanflute contains the following lines:

# Provide perl-specific find-{provides,requires}.
%define __find_provides /usr/lib/rpm/find-provides.perl
%define __find_requires /usr/lib/rpm/find-requires.perl

So we know that the author intends for perl requirements to be found.

# ./rpm -ba SPECS/drhperllib.spec
[[snip]]

# rpm -qp RPMS/i386/perl-drhperllib-1.15-7.i386.rpm --requires
perl >= 0:5.00503
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(VersionedDependencies) <= 3.0.3-1

Now, I build the same RPM after giving execute permissions to 
the /usr/lib/rpm/perl.req script. You can see that the perl requirements 
(including Authen::PAM) now show up in the --requires output.

# chmod a+x /usr/lib/rpm/perl.req

# ./rpm -ba SPECS/drhperllib.spec
[[snip]]

# rpm -qp RPMS/i386/perl-drhperllib-1.15-7.i386.rpm --requires
perl >= 0:5.00503
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(VersionedDependencies) <= 3.0.3-1
perl(Authen::PAM)  
perl(Carp)  
perl(Cwd)  
perl(Exporter)  
perl(strict)  
perl(syscall.ph)  
perl(vars)  

Therefore, the execute bit not being set on the 
/usr/lib/rpm/perl.req script cause the proper perl requirements of an RPM 
package to not be set.

Comment 1 Jeff Johnson 2002-01-22 23:07:33 UTC
Yup. The rpm spec file contains

# XXX remove executable bit to disable autogenerated perl requires for now.
#%rpmattr       %{__prefix}/lib/rpm/perl.req
%attr(0644, rpm, rpm) %{__prefix}/lib/rpm/perl.req

until we get a chance to determine the effect of auto-generating
perl dependencies on the entire distro.

I'm gonna mark WONTFIX, but we're actually gonna try to
vet the auto-generated perl requires in the next couple of weeks.
Stay tuned.

Comment 2 dharris 2002-01-23 00:25:33 UTC
I should have read the spec file. After enabling perl.req I ended up vetting 
the perl requirements mechanism for you. :-)

See:
bug 58519
bug 58536
bug 58537

After applying all of these bugfixes, I used cpanflute to create spec files and 
then compiled these packages, with all the dependencies working correctly:

perl-Authen-PAM-0.12-1.0drh
perl-ConvertDER-1.01-1.0drh
perl-Crypt-PasswdMD5-1.2-1.0drh
perl-DateManip-5.39-1.0drh
perl-Digest-MD5-2.13-1.0drh
perl-drhperllib-1.15-1.0drh
perl-File-Flock-101.060501-1.0drh
perl-HTML-Parser-3.25-1.0drh
perl-HTML-Tagset-3.03-1.0drh
perl-libnet-1.0703-1.1drh
perl-libwww-perl-5.53-1.1drh
perl-libxml-enno-1.02-1.1drh
perl-libxml-perl-0.07-1.0drh
perl-MD5-2.02-1.0drh
perl-MIME-Base64-2.12-1.0drh
perl-Parse-Yapp-1.04-1.0drh
perl-SGMLSpm-1.03ii-1.1drh
perl-Storable-0.6.11-1.0drh
perl-Sys-Signal-0.02-1.0drh
perl-Text-Template-1.42-1.0drh
perl-URI-1.12-1.0drh
perl-XML-Dumper-0.4-1.0drh
perl-XML-Encoding-1.01-1.0drh
perl-XML-Grove-0.46alpha-1.0drh
perl-XML-Parser-2.30-1.0drh
perl-XML-Twig-2.02-1.0drh

Except there were two requirements that had to be manually removed:

perl-libwww-perl: Manually remove perl(HTTP::GHTTP) requirement. It is used by 
an optional module, it appears.

perl-libxml-enno: Manually remove perl(XML::Handler::DOM) requirement. It 
appears to be a valid requirement, but I can't find the module anywhere on 
search.cpan.org to actually get and build.

Requirements were removed manually like this:

# Provide perl-specific find-{provides,requires}.
%define custom_find_requires %{_tmppath}/%{name}-%{version}-%{release}-find-
requires
%define __find_provides /usr/lib/rpm/find-provides.perl
%define __find_requires %{custom_find_requires}

in %install:
cat <<'EOT' > %{custom_find_requires}
#!/bin/sh
/usr/lib/rpm/find-requires.perl | grep -v 'perl(XML::Handler::DOM)'
EOT
chmod 755 %{custom_find_requires}

in %clean:
rm -f %{custom_find_requires}

I'm adding a patch that comprises all of my modifications to date from the 
listed bug reports that you see.

(Anyway, I just now see that you just accepted the my three patches into 
RAWHIDE. Good stuff. I figure I should send this post anyway since it has 
information about my experience using the patches.)


Comment 3 dharris 2002-01-23 00:27:30 UTC
Created attachment 43234 [details]
Combined patch for bugs 58519,58536,58537 as mentioned in previous comment.


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