From Fedora Project Wiki

(Created page with 'Is there any way to filter from Provides and Requires everything included in a file? I have to generate this at the end of %install.')
 
(Comment about typo)
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
Is there any way to filter from Provides and Requires everything included in a file?  I have to generate this at the end of %install.
 
Is there any way to filter from Provides and Requires everything included in a file?  I have to generate this at the end of %install.
 +
 +
The instructions provided for EPEL don't work, at least for EPEL5.  Something like this (from Marcela Maslanova) would be better:
 +
 +
<pre># Filter unwanted Requires:
 +
cat << \EOF > %{name}-req
 +
#!/bin/sh
 +
%{__perl_requires} $* |\
 +
  sed -e '/perl(the)$/d'
 +
EOF
 +
 +
%define __perl_requires %{_builddir}/perl-ldap-%{version}/%{name}-req
 +
chmod +x %{__perl_requires}</pre>
 +
--[[User:Verdurin|Verdurin]] 10:09, 18 March 2011 (UTC)
 +
 +
 +
Please note [https://fedorahosted.org/fpc/ticket/76 RPM 4.9 allows new filtering style] that takes precedence over the %filter_* style. E.g. Perl packages already use it.
 +
[[User:Ppisar|Ppisar]]
 +
 +
There are some formatting problems in:
 +
 +
$ rpm -qp foo-1.0-1.x86_64.rpm</code>
 +
<pre>libprivate.so()(64bit) 
 +
foo = 1.0-1.fc19
 +
foo(x86-64) = 1.0-1.fc19
 +
</pre>
 +
[[User:volter|volter]]
 +
 +
The rpm call should be <pre>rpm -qp --provides foo-1.0-1.x86_64.rpm</pre>
 +
--[[User:Evgeni|Evgeni]] ([[User talk:Evgeni|talk]]) 08:39, 23 December 2015 (UTC)
 +
 +
In the recommended command, %{libdir} is not correct, it should be %{_libdir} instead:
 +
<pre>
 +
%global __provides_exclude_from ^(.%{libdir}/%{name}/*\\.so|%{_datadir}/myapp/.*)$
 +
</pre>
 +
 +
--[[User:Nalimilan|Nalimilan]] ([[User talk:Nalimilan|talk]]) 14:45, 24 September 2018 (UTC)

Latest revision as of 14:46, 24 September 2018

Is there any way to filter from Provides and Requires everything included in a file? I have to generate this at the end of %install.

The instructions provided for EPEL don't work, at least for EPEL5. Something like this (from Marcela Maslanova) would be better:

# Filter unwanted Requires:
cat << \EOF > %{name}-req
#!/bin/sh
%{__perl_requires} $* |\
  sed -e '/perl(the)$/d'
EOF

%define __perl_requires %{_builddir}/perl-ldap-%{version}/%{name}-req
chmod +x %{__perl_requires}

--Verdurin 10:09, 18 March 2011 (UTC)


Please note RPM 4.9 allows new filtering style that takes precedence over the %filter_* style. E.g. Perl packages already use it. Ppisar

There are some formatting problems in:

$ rpm -qp foo-1.0-1.x86_64.rpm

libprivate.so()(64bit)  
foo = 1.0-1.fc19
foo(x86-64) = 1.0-1.fc19

volter

The rpm call should be

rpm -qp --provides foo-1.0-1.x86_64.rpm

--Evgeni (talk) 08:39, 23 December 2015 (UTC)

In the recommended command, %{libdir} is not correct, it should be %{_libdir} instead:

%global __provides_exclude_from ^(.%{libdir}/%{name}/*\\.so|%{_datadir}/myapp/.*)$

--Nalimilan (talk) 14:45, 24 September 2018 (UTC)