diff options
author | Jeremy Cline <jcline@redhat.com> | 2018-09-18 15:56:33 -0400 |
---|---|---|
committer | Jeremy Cline <jcline@redhat.com> | 2018-09-18 15:56:33 -0400 |
commit | 1a08114a16e719c1339d7602099085cbe816bfc5 (patch) | |
tree | 99a5ffb6aa4c2f5387bddc70f2d8922291e42e45 | |
parent | f1461c1d71f69d64f194fe92800563f7aaf1c3c7 (diff) | |
download | kernel-1a08114a16e719c1339d7602099085cbe816bfc5.tar.gz kernel-1a08114a16e719c1339d7602099085cbe816bfc5.tar.xz kernel-1a08114a16e719c1339d7602099085cbe816bfc5.zip |
Mangle Python shebangs to Python 3 only
-rw-r--r-- | kernel.spec | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/kernel.spec b/kernel.spec index c726d1229..14ded1f54 100644 --- a/kernel.spec +++ b/kernel.spec @@ -385,6 +385,8 @@ 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 +# Used to mangle unversioned shebangs to be Python 3 +BuildRequires: /usr/bin/pathfix.py %if %{with_sparse} BuildRequires: sparse %endif @@ -1153,6 +1155,16 @@ find . \( -name "*.orig" -o -name "*~" \) -delete >/dev/null # remove unnecessary SCM files find . -name .gitignore -delete >/dev/null +# Mangle /usr/bin/python shebangs to /usr/bin/python3 +# Mangle all Python shebangs to be Python 3 explicitly +# -p preserves timestamps +# -n prevents creating ~backup files +# -i specifies the interpreter for the shebang +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 + cd .. ### |