Re: Filtering requires/provides

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2006-03-08 at 14:10 -0600, Jason L Tibbitts III wrote:
> >>>>> "SP" == Steven Pritchard <steve@xxxxxxxxx> writes:
> 
> SP> Yes, this changes filter-requires.sh, so any source rpm built from
> SP> this will have @@PERL_REQ@@ pre-substituted, but is that really a
> SP> major problem?
> 
> I think any modification to the source directory is going to be
> problematic.  There's no guarantee that the RPM builder is going to
> have write access to that directory.  (It won't work one of my setups,
> where that directory is readable but not writable by the user I build
> RPMs as.)

Why not modify the script so that instead of having to substitute
@@PERL_REQ@@, the necessary value is passed as a parameter to it?

So the spec looks like this:

...
Source1:        filter-requires.sh
...
%prep
%setup -q -n Kwiki-Raw-%{version}
%global real_perl_requires %{__perl_requires}
%define __perl_requires %{SOURCE1} %{real_perl_requires}

There's no need to delete anything extra in %clean

The filter-requires.sh looks like this:

#!/bin/sh
PERL_REQ="$1"; shift
"${PERL_REQ}" "$@" | /bin/grep -Fvx '
perl(mixin)
'

Where multiple dependencies need to be filtered, add them one per line
where perl(mixin) is.

The only "unusual" requirement here is that the filter-requires.sh needs
to be executable in the SRPM, thus avoiding the need to chmod it.

Paul.


[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Legacy Announce]     [Fedora PHP Devel]     [Kernel Devel]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Big List of Linux Books]     [Gimp]     [Yosemite Information]
  Powered by Linux