From Fedora Project Wiki

Line 63: Line 63:


-- Try fedora-perl-devel-list@redhat.com (in the pkg db as perl-sig).  [[User:Cweyl|Chris Weyl]] 19:28, 8 November 2009 (UTC)
-- Try fedora-perl-devel-list@redhat.com (in the pkg db as perl-sig).  [[User:Cweyl|Chris Weyl]] 19:28, 8 November 2009 (UTC)
== The requires section throws an error ==
I'm trying to package python-zope-html. Since it requires a lot of non-standard perl dependencies which rpmbuild generates, I used the external method of using filter-provides and filter-requires file.
In my spec file, the changes go like this:
<pre>Source98: filter-provides.sh
Source99: filter-requires.sh
%global __perl_provides %{SOURCE98}
%global __perl_requires %{SOURCE99}</pre>
as suggested by this guide and the contents of the filter-provides file is:
<pre>#!/bin/sh
/usr/lib/rpm/perl.prov $* | sed -e '/perl(CGI)/d'
/usr/lib/rpm/perl.prov $* | sed -e '/perl(File::Temp)/d'
/usr/lib/rpm/perl.prov $* | sed -e '/perl(basexml.pl)/d'
/usr/lib/rpm/perl.prov $* | sed -e '/perl(commands.pl)/d'
/usr/lib/rpm/perl.prov $* | sed -e '/perl(config.pl)/d'
/usr/lib/rpm/perl.prov $* | sed -e '/perl(io.pl)/d'
/usr/lib/rpm/perl.prov $* | sed -e '/perl(upload_fck.pl)/d'
/usr/lib/rpm/perl.prov $* | sed -e '/perl(util.pl)/d'</pre>
and that for filter-requires file:
<pre>#!/bin/sh
/usr/lib/rpm/perl.req $* | sed -e '/perl(CGI)/d'
/usr/lib/rpm/perl.req $* | sed -e '/perl(File::Temp)/d'
/usr/lib/rpm/perl.req $* | sed -e '/perl(basexml.pl)/d'
/usr/lib/rpm/perl.req $* | sed -e '/perl(commands.pl)/d'
/usr/lib/rpm/perl.req $* | sed -e '/perl(config.pl)/d'
/usr/lib/rpm/perl.req $* | sed -e '/perl(io.pl)/d'
/usr/lib/rpm/perl.req $* | sed -e '/perl(upload_fck.pl)/d'
/usr/lib/rpm/perl.req $* | sed -e '/perl(util.pl)/d'</pre>
But when I build the spec file (rpmbuild -ba python-zope-html.spec), I get following error:
<pre>error: Couldn't exec /home/aks/rpmbuild/SOURCES/filter-requires.sh: Permission denied
getOutputFrom(): Broken pipe</pre>
After I do chmod +x ~/rpmbuild/SOURCES/filter-*.sh, rpmbuild succeeds but unable to remove those perl dependencies. The difference between building the same spec file in F13 and F9 is that on F13, though creating a warning, it builds the package and removes those dependencies, but on F9 it just throws an error and quits. Any Solution for this?
----

Revision as of 09:40, 13 August 2010

The following metadata was found in MoinMoin that could not be converted to a useful value in MediaWiki:

  • : hostname inside mock.

Filter requires and provides in %setup section instead of %prep?

For me the suggested method of filtering requires and provides didn't work until I put the code into the %setup section of the SPEC file, not %prep. Shouldn't this be changed?

Protected page needs a minor edit

Section 9 as it's currently labeled has "inital-cc" instead of "initial-cc", right in the header. Hopefully, it'll be fixed before anyone uses the anchor link, which will change when corrected. -- J. Randall Owens 12:50, 2 July 2008 (UTC)

%{_docdir} specific req/prov filtering

Note it's possible to just get rpm to ignore everything under %{_docdir} by using filtering constructs in %prep such as:

# make sure doc/tests don't generate provides
# note we first filter out the bits in _docdir...
cat << \EOF > %{name}-prov
#!/bin/sh
%{__perl_provides} `perl -p -e 's|\S+%{_docdir}/%{name}-%{version}\S+||'`
EOF

%define __perl_provides %{_builddir}/Catalyst-Plugin-Authentication-%{version}/%{name}-prov
chmod +x %{__perl_provides}

cat << \EOF > %{name}-req
#!/bin/sh
%{__perl_requires} `perl -p -e 's|\S+%{_docdir}/%{name}-%{version}\S+||'`
EOF

%define __perl_requires %{_builddir}/Catalyst-Plugin-Authentication-%{version}/%{name}-req
chmod +x %{__perl_requires}

Cweyl 18:23, 3 August 2008 (UTC)

need to fix the line to use in the spec - moin translation error ?

https://fedoraproject.org/wiki/Packaging/Perl#Core_modules_as_buildrequires

The < code > bits probably were ' single quotes:

Requires: perl(:MODULE_COMPAT_%(eval "%{__perl} -V:version"; echo $version))

Add to category Perl?

Can we include a

[[Category:Perl]]

on the page somewhere, to flag it as being part of the Perl category?

Chris Weyl 21:39, 2 February 2009 (UTC)

-- I agree, that would be very useful. --Alexlan 23:33, 2 February 2009 (UTC)

perl-sig as CC ?

Hi,

Trying to add a CC of perl-sig or perl-sig@fedoraproject.org then this is never recognized by bugzilla as bugzilla account?


-- Try fedora-perl-devel-list@redhat.com (in the pkg db as perl-sig). Chris Weyl 19:28, 8 November 2009 (UTC)

The requires section throws an error

I'm trying to package python-zope-html. Since it requires a lot of non-standard perl dependencies which rpmbuild generates, I used the external method of using filter-provides and filter-requires file. In my spec file, the changes go like this:

Source98: filter-provides.sh
Source99: filter-requires.sh
%global __perl_provides %{SOURCE98}
%global __perl_requires %{SOURCE99}

as suggested by this guide and the contents of the filter-provides file is:

#!/bin/sh
/usr/lib/rpm/perl.prov $* | sed -e '/perl(CGI)/d'
/usr/lib/rpm/perl.prov $* | sed -e '/perl(File::Temp)/d'
/usr/lib/rpm/perl.prov $* | sed -e '/perl(basexml.pl)/d'
/usr/lib/rpm/perl.prov $* | sed -e '/perl(commands.pl)/d'
/usr/lib/rpm/perl.prov $* | sed -e '/perl(config.pl)/d'
/usr/lib/rpm/perl.prov $* | sed -e '/perl(io.pl)/d'
/usr/lib/rpm/perl.prov $* | sed -e '/perl(upload_fck.pl)/d'
/usr/lib/rpm/perl.prov $* | sed -e '/perl(util.pl)/d'

and that for filter-requires file:

#!/bin/sh
/usr/lib/rpm/perl.req $* | sed -e '/perl(CGI)/d'
/usr/lib/rpm/perl.req $* | sed -e '/perl(File::Temp)/d'
/usr/lib/rpm/perl.req $* | sed -e '/perl(basexml.pl)/d'
/usr/lib/rpm/perl.req $* | sed -e '/perl(commands.pl)/d'
/usr/lib/rpm/perl.req $* | sed -e '/perl(config.pl)/d'
/usr/lib/rpm/perl.req $* | sed -e '/perl(io.pl)/d'
/usr/lib/rpm/perl.req $* | sed -e '/perl(upload_fck.pl)/d'
/usr/lib/rpm/perl.req $* | sed -e '/perl(util.pl)/d'

But when I build the spec file (rpmbuild -ba python-zope-html.spec), I get following error:

error: Couldn't exec /home/aks/rpmbuild/SOURCES/filter-requires.sh: Permission denied
getOutputFrom(): Broken pipe

After I do chmod +x ~/rpmbuild/SOURCES/filter-*.sh, rpmbuild succeeds but unable to remove those perl dependencies. The difference between building the same spec file in F13 and F9 is that on F13, though creating a warning, it builds the package and removes those dependencies, but on F9 it just throws an error and quits. Any Solution for this?