[ovs-dev] [PATCH v2] rpm: Don't mangle shebangs when building DKMS RPM package

Timothy Redaelli tredaelli at redhat.com
Wed May 5 10:20:25 UTC 2021


On Wed, 5 May 2021 05:37:41 +0000
Guzowski Adrian via dev <ovs-dev at openvswitch.org> wrote:

> While building the package, some .in files are being subject to shebang
> substitution, but the process fails, because given scripts have
> placeholders in place of shebangs. In order to fix the issue, don't mangle
> shebangs in this specific package.
> 
> Signed-off-by: Guzowski Adrian <adrian.guzowski at exatel.pl>
> ---
>  rhel/openvswitch-dkms.spec.in | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/rhel/openvswitch-dkms.spec.in b/rhel/openvswitch-dkms.spec.in
> index a47c038fd..d9955f361 100644
> --- a/rhel/openvswitch-dkms.spec.in
> +++ b/rhel/openvswitch-dkms.spec.in
> @@ -27,6 +27,8 @@ BuildRoot:        %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
>  # conflicts with the openvswitch-debuginfo package for OVS userspace).
>  %undefine _enable_debug_packages
> 
> +# Exclude input files from mangling
> +%global __brp_mangle_shebangs_exclude_from ^/usr/src/.*$
> 
>  %description
>  Open vSwitch Linux kernel module.
> --
> 2.30.2

Hi,
since almost any file is under /usr/src, you could just disable the
mangling feature entirely [1] instead of specify a regexp:

%undefine __brp_mangle_shebangs

[1]
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_shebang_lines



More information about the dev mailing list