From 5ad61b5b0153094ddc5f524800907973a8583d55 Mon Sep 17 00:00:00 2001 From: Arvind Sankar Date: Sun, 19 Jul 2020 13:19:08 -0400 Subject: [PATCH] Disable shebang mangling on input files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: João Carlos Mendes Luís Signed-off-by: Arvind Sankar Closes #10581 Closes #10582 --- rpm/generic/zfs-dkms.spec.in | 4 ++-- rpm/generic/zfs-kmod.spec.in | 3 --- rpm/redhat/zfs-kmod.spec.in | 3 --- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/rpm/generic/zfs-dkms.spec.in b/rpm/generic/zfs-dkms.spec.in index 29e8fd7dde..5b05e1c332 100644 --- a/rpm/generic/zfs-dkms.spec.in +++ b/rpm/generic/zfs-dkms.spec.in @@ -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 diff --git a/rpm/generic/zfs-kmod.spec.in b/rpm/generic/zfs-kmod.spec.in index 80b35a05fd..bc033733af 100644 --- a/rpm/generic/zfs-kmod.spec.in +++ b/rpm/generic/zfs-kmod.spec.in @@ -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##*___} diff --git a/rpm/redhat/zfs-kmod.spec.in b/rpm/redhat/zfs-kmod.spec.in index 3b566c7c5c..6d928ec74c 100644 --- a/rpm/redhat/zfs-kmod.spec.in +++ b/rpm/redhat/zfs-kmod.spec.in @@ -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}