How to disable AutoReqProv on shebangs for a specific script file ?
Panu Matilainen
pmatilai at redhat.com
Mon Jun 20 08:54:56 UTC 2022
On 6/19/22 19:06, Jason Vas Dias wrote:
> Good day -
>
> I am trying to develop a .spec file for an RPM that ships
> a template script that references a non-existent
> dependency in its she-bang line:
>
> '#!<some file that does not exist (yet)>'
>
> How to disable autoreqprov from including that
> non-existent file in %requires ?
>
> ie. the resultant RPM ends up with
> 'Requires: <some file that does not exist (yet)>',
> simply because an executable script, not
> meant to be run by any code on the host,
> references it in its shebang line.
> I think changing the script to be
> not executable is not the correct
> answer here - now all scripts that
> depend on it being executable have
> to be modified to do a 'chmod +x'
> on it. This is not an acceptable
> workaround for RPM needlessly
> injecting an unwanted 'Requires'
> that I can't get rid of.
You can chmod -x the script in the spec to disable dependency generation
on it, but still make it executable in the package with %attr(0755,-,-)
(or such) in the %files section.
- Panu -
More information about the Rpm-list
mailing list