From 51f1c667482c3852a61087df24fbc72a4ae45ed6 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Feb 08 2018 09:38:45 +0000 Subject: brp-mangle-shebangs: Simplify/Fix check for shebang starting with "/" Reported-by: Jun Aruga Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1541057 Signed-off-by: Igor Gnatenko --- diff --git a/brp-mangle-shebangs b/brp-mangle-shebangs index ca20c94..9869003 100755 --- a/brp-mangle-shebangs +++ b/brp-mangle-shebangs @@ -23,7 +23,7 @@ for f in $(find -executable -type f | xargs --no-run-if-empty file -N --mime-typ chmod -x "$f" touch -d "$ts" "$f" continue - elif [ "${shebang%${shebang#?}}" != "/" ]; then + elif [ -n "${shebang##/*}" ]; then echo >&2 "*** ERROR: $f has shebang which doesn't start with '/' ($shebang)" fail=1 continue diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index d1a0c05..0f4a4e0 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -6,7 +6,7 @@ Summary: Red Hat specific rpm configuration files Name: redhat-rpm-config -Version: 95 +Version: 96 Release: 1%{?dist} # No version specified. License: GPL+ @@ -183,6 +183,9 @@ install -p -m 755 -t %{buildroot}%{_rpmconfigdir} kmod.prov %{_rpmconfigdir}/macros.d/macros.kmp %changelog +* Thu Feb 08 2018 Igor Gnatenko - 96-1 +- Simplify/Fix check for shebang starting with "/" + * Wed Feb 07 2018 Igor Gnatenko - 95-1 - Fix mangling env shebangs with absolute paths