Re: [PATCH 2/2] perf: remove shebang from scripts/{perl,python}/*.{pl,py}

From: Jiri Slaby
Date: Wed Aug 04 2021 - 01:49:48 EST


On 03. 08. 21, 13:44, Adrian Hunter wrote:
On 26/07/21 12:14 pm, Jiri Slaby wrote:
The scripts cannot be executed on their own. The python ones were always
installed without x permissions, the perl ones fail anyway:
BEGIN failed--compilation aborted at /usr/lib/perf-core/scripts/perl/rw-by-pid.pl line 18.
so there is no point to have a shebang in them. This causes rpmlint to
complain too:
W: non-executable-script /usr/lib/perf-core/scripts/perl/rw-by-file.pl 644 /usr/bin/perl -w

Hence drop shebangs in them all and remove x permissions in the
repository. If anyone wants some of them executable, they need to fix
the install scripts first.

Signed-off-by: Jiri Slaby <jslaby@xxxxxxx>
Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
Cc: Andi Kleen <ak@xxxxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Kan Liang <kan.liang@xxxxxxxxxxxxxxx>
Cc: Leo Yan <leo.yan@xxxxxxxxxx>
Cc: Mark Rutland <mark.rutland@xxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/scripts/perl/rw-by-file.pl | 1 -
tools/perf/scripts/perl/rw-by-pid.pl | 1 -
tools/perf/scripts/perl/rwtop.pl | 1 -
tools/perf/scripts/perl/wakeup-latency.pl | 1 -
tools/perf/scripts/python/exported-sql-viewer.py | 1 -

exported-sql-viewer.py is a standalone executable

That's great, but in fact noone can run it when make-installed as I stated above:

>> If anyone wants some of them executable, they need to fix
>> the install scripts first.

See:
$(INSTALL) scripts/python/*.py -m 644 -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python';

thanks,
--
js
suse labs