summaryrefslogtreecommitdiffstats
path: root/kernel.spec
diff options
context:
space:
mode:
authorPablo Greco <pablo@fliagreco.com.ar>2019-01-15 06:44:08 -0300
committerLaura Abbott <labbott@redhat.com>2019-01-16 17:15:44 -0800
commit15c042d2f4ac4746673099a4d242c329bf010878 (patch)
treecf2f59d60ba0496be9753642455ac82741676045 /kernel.spec
parent19c00cb3137d4687cb9283c3128cbfc494c01525 (diff)
downloadkernel-15c042d2f4ac4746673099a4d242c329bf010878.tar.gz
kernel-15c042d2f4ac4746673099a4d242c329bf010878.tar.xz
kernel-15c042d2f4ac4746673099a4d242c329bf010878.zip
Only fix shebangs when building for Fedora.
If the kernel is being built for .el7, we don't have access to pathfix.py.
Diffstat (limited to 'kernel.spec')
-rw-r--r--kernel.spec4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel.spec b/kernel.spec
index 726229a86..80f6c0660 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -390,8 +390,10 @@ BuildRequires: kmod, patch, bash, tar, git-core
BuildRequires: bzip2, xz, findutils, gzip, m4, perl-interpreter, perl-Carp, perl-devel, perl-generators, make, diffutils, gawk
BuildRequires: gcc, binutils, redhat-rpm-config, hmaccalc, bison, flex
BuildRequires: net-tools, hostname, bc, elfutils-devel, gcc-plugin-devel
+%if 0%{?fedora}
# Used to mangle unversioned shebangs to be Python 3
BuildRequires: /usr/bin/pathfix.py
+%endif
%if %{with_sparse}
BuildRequires: sparse
%endif
@@ -1144,6 +1146,7 @@ find . \( -name "*.orig" -o -name "*~" \) -delete >/dev/null
# remove unnecessary SCM files
find . -name .gitignore -delete >/dev/null
+%if 0%{?fedora}
# Mangle /usr/bin/python shebangs to /usr/bin/python3
# Mangle all Python shebangs to be Python 3 explicitly
# -p preserves timestamps
@@ -1153,6 +1156,7 @@ pathfix.py -pni "%{__python3} %{py3_shbang_opts}" scripts/
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" scripts/diffconfig
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" scripts/bloat-o-meter
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" scripts/show_delta
+%endif
cd ..