Disable shebang mangling on input files

The DKMS module installs the entire source tree, including the .in files
that will later be substituted when building. This makes
brp_mangle_shebangs complain about shebang lines in the .in files.

Exclude everything under /usr/src from shebang mangling in the DKMS
package.

The KMOD package doesn't contain any of the files it excludes from
mangling, so just drop the exclusion.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: João Carlos Mendes Luís <jonny@jonny.eng.br>
Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Closes #10581 
Closes #10582
This commit is contained in:
Arvind Sankar 2020-07-19 13:19:08 -04:00 committed by GitHub
parent 0421f257b2
commit 5ad61b5b01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 8 deletions

View File

@ -4,8 +4,8 @@
%define not_rpm 1
%endif
# See comment in zfs.spec.in.
%global __brp_mangle_shebangs_exclude_from arc_summary.py|arcstat.py|dbufstat.py|test-runner.py|zts-report.py
# Exclude input files from mangling
%global __brp_mangle_shebangs_exclude_from ^/usr/src/.*$
%define module @PACKAGE@
%define mkconf scripts/dkms.mkconf

View File

@ -1,8 +1,5 @@
%define module @PACKAGE@
# See comment in zfs.spec.in.
%global __brp_mangle_shebangs_exclude_from arc_summary.py|arcstat.py|dbufstat.py|test-runner.py|zts-report.py
%if !%{defined ksrc}
%if 0%{?rhel}%{?fedora}
%define ksrc ${kernel_version##*___}

View File

@ -1,9 +1,6 @@
%bcond_with debug
%bcond_with debuginfo
# See comment in zfs.spec.in.
%global __brp_mangle_shebangs_exclude_from arc_summary.py|arcstat.py|dbufstat.py|test-runner.py|zts-report.py
Name: @PACKAGE@-kmod
Version: @VERSION@
Release: @RELEASE@%{?dist}