File lirc-0.11.0dev-shebang_fix.patch of Package lirc
From: Alexey Svistunov <svalx@svalx.net>
Date: 2021-08-26 17:14:48 +0300
Subject: fix shebang in python and bash scripts
References:
Upstream: to be done
According OBS rpmlint scripts should not use 'env' in shebang as an interpreter.
For the rpm runtime dependency detection to work, the shebang #!/usr/bin/env python
needs to be patched into #!/usr/bin/python otherwise the package dependency generator
merely adds a dependency on /usr/bin/env rather than the actual interpreter /usr/bin/python.
The same applies to #!/usr/bin/env bash.
Index: git/tools/irdb-get
===================================================================
--- git.orig/tools/irdb-get
+++ git/tools/irdb-get
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
#
# pylint: disable=invalid-name
Index: git/tools/irtext2udp
===================================================================
--- git.orig/tools/irtext2udp
+++ git/tools/irtext2udp
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
"""
Filter converting printable input of pulse/space such as generated by
Index: git/tools/lirc-config-tool
===================================================================
--- git.orig/tools/lirc-config-tool
+++ git/tools/lirc-config-tool
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
# vim: set expandtab ts=4 sw=4:
#
# Generate lircrc files for various applications
Index: git/tools/lirc-init-db
===================================================================
--- git.orig/tools/lirc-init-db
+++ git/tools/lirc-init-db
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
#
# Create configs/driver.yaml using lirc-lsplugins and
# configs/confs_by_driver using irdb-get. Runs as part of the
Index: git/tools/lirc-make-devinput
===================================================================
--- git.orig/tools/lirc-make-devinput
+++ git/tools/lirc-make-devinput
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
function help()
{
Index: git/tools/lirc-postinstall
===================================================================
--- git.orig/tools/lirc-postinstall
+++ git/tools/lirc-postinstall
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
#
# Perform post-install updates after lirc or externak driver install:
# - Create the drivers.yaml list from the configs directory
Index: git/tools/lirc-setup/lirc-setup
===================================================================
--- git.orig/tools/lirc-setup/lirc-setup
+++ git/tools/lirc-setup/lirc-setup
@@ -1,5 +1,4 @@
-#!/usr/bin/env python3
-
+#!python3
# pylint: disable=invalid-name, wrong-import-position
''' Wrapper for the lirc_setup thing, meant to be a symlink. '''
Index: git/tools/lircd-setup
===================================================================
--- git.orig/tools/lircd-setup
+++ git/tools/lircd-setup
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
''' Parse the [modinit] section in lirc_options.conf and run it. '''
Index: git/tools/pronto2lirc
===================================================================
--- git.orig/tools/pronto2lirc
+++ git/tools/pronto2lirc
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
#
# A tool for converting Pronto format hex codes to lircd.conf format. Version 1.11
#
Index: git/doc/examples/ircat.py
===================================================================
--- git.orig/doc/examples/ircat.py
+++ git/doc/examples/ircat.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
'''
Reference python implementation of ircat(1)
Index: git/doc/lirc-data2table
===================================================================
--- git.orig/doc/lirc-data2table
+++ git/doc/lirc-data2table
@@ -1,3 +1,4 @@
+#!/usr/bin/python3
''' Create the lirc Supported Devices Table using data in hardware.yaml '''
import glob