Browse Source

Replace PYTHONSHEBANG with valid shebang

Replace the @PYTHONSHEBANG@ substitution with a valid #!/usr/bin/python3
shebang. This turns Python .in files into valid Python files. The files
can now be checked with pylint and IDEs recognize the files as Python
files.

The shebang is still replaced with "#!$(PYTHON) -E" to support
platform-python.

Related: https://pagure.io/freeipa/issue/7984
Signed-off-by: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Francois Cami <fcami@redhat.com>
master
Christian Heimes 1 year ago
parent
commit
6d02eddd3e
54 changed files with 54 additions and 54 deletions
  1. +1
    -1
      Makefile.pythonscripts.am
  2. +1
    -1
      client/ipa-certupdate.in
  3. +1
    -1
      client/ipa-client-automount.in
  4. +1
    -1
      client/ipa-client-install.in
  5. +1
    -1
      daemons/dnssec/ipa-dnskeysync-replica.in
  6. +1
    -1
      daemons/dnssec/ipa-dnskeysyncd.in
  7. +1
    -1
      daemons/dnssec/ipa-ods-exporter.in
  8. +1
    -1
      install/certmonger/dogtag-ipa-ca-renew-agent-submit.in
  9. +1
    -1
      install/certmonger/ipa-server-guard.in
  10. +1
    -1
      install/custodia/ipa-custodia-dmldap.in
  11. +1
    -1
      install/custodia/ipa-custodia-pki-tomcat-wrapped.in
  12. +1
    -1
      install/custodia/ipa-custodia-pki-tomcat.in
  13. +1
    -1
      install/custodia/ipa-custodia-ra-agent.in
  14. +1
    -1
      install/oddjob/com.redhat.idm.trust-fetch-domains.in
  15. +1
    -1
      install/restart_scripts/renew_ca_cert.in
  16. +1
    -1
      install/restart_scripts/renew_kdc_cert.in
  17. +1
    -1
      install/restart_scripts/renew_ra_cert.in
  18. +1
    -1
      install/restart_scripts/renew_ra_cert_pre.in
  19. +1
    -1
      install/restart_scripts/restart_dirsrv.in
  20. +1
    -1
      install/restart_scripts/restart_httpd.in
  21. +1
    -1
      install/restart_scripts/stop_pkicad.in
  22. +1
    -1
      install/tools/ipa-adtrust-install.in
  23. +1
    -1
      install/tools/ipa-advise.in
  24. +1
    -1
      install/tools/ipa-backup.in
  25. +1
    -1
      install/tools/ipa-ca-install.in
  26. +1
    -1
      install/tools/ipa-cacert-manage.in
  27. +1
    -1
      install/tools/ipa-cert-fix.in
  28. +1
    -1
      install/tools/ipa-compat-manage.in
  29. +1
    -1
      install/tools/ipa-crlgen-manage.in
  30. +1
    -1
      install/tools/ipa-csreplica-manage.in
  31. +1
    -1
      install/tools/ipa-custodia-check.in
  32. +1
    -1
      install/tools/ipa-custodia.in
  33. +1
    -1
      install/tools/ipa-dns-install.in
  34. +1
    -1
      install/tools/ipa-httpd-kdcproxy.in
  35. +1
    -1
      install/tools/ipa-kra-install.in
  36. +1
    -1
      install/tools/ipa-ldap-updater.in
  37. +1
    -1
      install/tools/ipa-managed-entries.in
  38. +1
    -1
      install/tools/ipa-nis-manage.in
  39. +1
    -1
      install/tools/ipa-otptoken-import.in
  40. +1
    -1
      install/tools/ipa-pki-retrieve-key.in
  41. +1
    -1
      install/tools/ipa-pki-wait-running.in
  42. +1
    -1
      install/tools/ipa-pkinit-manage.in
  43. +1
    -1
      install/tools/ipa-replica-conncheck.in
  44. +1
    -1
      install/tools/ipa-replica-install.in
  45. +1
    -1
      install/tools/ipa-replica-manage.in
  46. +1
    -1
      install/tools/ipa-restore.in
  47. +1
    -1
      install/tools/ipa-server-certinstall.in
  48. +1
    -1
      install/tools/ipa-server-install.in
  49. +1
    -1
      install/tools/ipa-server-upgrade.in
  50. +1
    -1
      install/tools/ipa-winsync-migrate.in
  51. +1
    -1
      install/tools/ipactl.in
  52. +1
    -1
      ipa.in
  53. +1
    -1
      makeaci.in
  54. +1
    -1
      makeapi.in

+ 1
- 1
Makefile.pythonscripts.am View File

@@ -1,6 +1,6 @@
# special handling of Python scripts with auto-generated shebang line
$(PYTHON_SHEBANG):%: %.in Makefile
$(AM_V_GEN)sed -e 's|@PYTHONSHEBANG[@]|#!$(PYTHON) -E|g' $< > $@
$(AM_V_GEN)sed -e 's|^#!/usr/bin/python3.*|#!$(PYTHON) -E|g' $< > $@
$(AM_V_GEN)chmod +x $@

.PHONY: python_scripts_sub


+ 1
- 1
client/ipa-certupdate.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
# Authors: Jan Cholasta <jcholast@redhat.com>
#
# Copyright (C) 2014 Red Hat


+ 1
- 1
client/ipa-client-automount.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
#
# Authors:
# Rob Crittenden <rcritten@redhat.com>


+ 1
- 1
client/ipa-client-install.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
# Authors: Simo Sorce <ssorce@redhat.com>
# Karl MacMillan <kmacmillan@mentalrootkit.com>
#


+ 1
- 1
daemons/dnssec/ipa-dnskeysync-replica.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
#
# Copyright (C) 2014 FreeIPA Contributors see COPYING for license
#


+ 1
- 1
daemons/dnssec/ipa-dnskeysyncd.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
#
# Copyright (C) 2014 FreeIPA Contributors see COPYING for license
#


+ 1
- 1
daemons/dnssec/ipa-ods-exporter.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
#
# Copyright (C) 2014 FreeIPA Contributors see COPYING for license
#


+ 1
- 1
install/certmonger/dogtag-ipa-ca-renew-agent-submit.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
#
# Authors:
# Jan Cholasta <jcholast@redhat.com>


+ 1
- 1
install/certmonger/ipa-server-guard.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
#
# Authors:
# Jan Cholasta <jcholast@redhat.com>


+ 1
- 1
install/custodia/ipa-custodia-dmldap.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
#
# Copyright (C) 2019 IPA Project Contributors, see COPYING for license
#


+ 1
- 1
install/custodia/ipa-custodia-pki-tomcat-wrapped.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
#
# Copyright (C) 2019 IPA Project Contributors, see COPYING for license
#


+ 1
- 1
install/custodia/ipa-custodia-pki-tomcat.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
#
# Copyright (C) 2019 IPA Project Contributors, see COPYING for license
#


+ 1
- 1
install/custodia/ipa-custodia-ra-agent.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
#
# Copyright (C) 2019 IPA Project Contributors, see COPYING for license
#


+ 1
- 1
install/oddjob/com.redhat.idm.trust-fetch-domains.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3

from ipaserver import dcerpc
from ipaserver.install.installutils import is_ipa_configured, ScriptError


+ 1
- 1
install/restart_scripts/renew_ca_cert.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
#
# Authors:
# Rob Crittenden <rcritten@redhat.com>


+ 1
- 1
install/restart_scripts/renew_kdc_cert.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
#
# Copyright (C) 2017 FreeIPA Contributors see COPYING for license
#


+ 1
- 1
install/restart_scripts/renew_ra_cert.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
#
# Authors:
# Rob Crittenden <rcritten@redhat.com>


+ 1
- 1
install/restart_scripts/renew_ra_cert_pre.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
#
# Copyright (C) 2015 FreeIPA Contributors see COPYING for license
#


+ 1
- 1
install/restart_scripts/restart_dirsrv.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
#
# Authors:
# Rob Crittenden <rcritten@redhat.com>


+ 1
- 1
install/restart_scripts/restart_httpd.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
#
# Authors:
# Rob Crittenden <rcritten@redhat.com>


+ 1
- 1
install/restart_scripts/stop_pkicad.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
#
# Authors:
# Rob Crittenden <rcritten@redhat.com>


+ 1
- 1
install/tools/ipa-adtrust-install.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
#
# Authors: Sumit Bose <sbose@redhat.com>
# Based on ipa-server-install by Karl MacMillan <kmacmillan@mentalrootkit.com>


+ 1
- 1
install/tools/ipa-advise.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
# Authors: Tomas Babej <tbabej@redhat.com>
#
# Copyright (C) 2013 Red Hat


+ 1
- 1
install/tools/ipa-backup.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
# Authors: Rob Crittenden <rcritten@redhat.com>
#
# Copyright (C) 2013 Red Hat


+ 1
- 1
install/tools/ipa-ca-install.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
# Authors: Rob Crittenden <rcritten@redhat.com>
#
# Copyright (C) 2011 Red Hat


+ 1
- 1
install/tools/ipa-cacert-manage.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
# Authors: Jan Cholasta <jcholast@redhat.com>
#
# Copyright (C) 2014 Red Hat


+ 1
- 1
install/tools/ipa-cert-fix.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
#
# Copyright (C) 2019 FreeIPA Contributors see COPYING for license
#


+ 1
- 1
install/tools/ipa-compat-manage.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
# Authors: Rob Crittenden <rcritten@redhat.com>
# Authors: Simo Sorce <ssorce@redhat.com>
#


+ 1
- 1
install/tools/ipa-crlgen-manage.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
#
# Copyright (C) 2019 FreeIPA Contributors see COPYING for license
#


+ 1
- 1
install/tools/ipa-csreplica-manage.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
# Authors: Rob Crittenden <rcritten@redhat.com>
#
# Based on ipa-replica-manage by Karl MacMillan <kmacmillan@mentalrootkit.com>


+ 1
- 1
install/tools/ipa-custodia-check.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
"""Test client for ipa-custodia

The test script is expected to be executed on an IPA server with existing


+ 1
- 1
install/tools/ipa-custodia.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
# Copyright (C) 2017 IPA Project Contributors, see COPYING for license
from ipaserver.secrets.service import main



+ 1
- 1
install/tools/ipa-dns-install.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
# Authors: Martin Nagy <mnagy@redhat.com>
# Based on ipa-server-install by Karl MacMillan <kmacmillan@mentalrootkit.com>
#


+ 1
- 1
install/tools/ipa-httpd-kdcproxy.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
# Authors:
# Christian Heimes <cheimes@redhat.com>
#


+ 1
- 1
install/tools/ipa-kra-install.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
# Authors: Ade Lee <alee@redhat.com>
#
# Copyright (C) 2014 Red Hat


+ 1
- 1
install/tools/ipa-ldap-updater.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
# Authors: Rob Crittenden <rcritten@redhat.com>
#
# Copyright (C) 2008 Red Hat


+ 1
- 1
install/tools/ipa-managed-entries.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
# Authors: Jr Aquino <jr.aquino@citrix.com>
#
# Copyright (C) 2011 Red Hat


+ 1
- 1
install/tools/ipa-nis-manage.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
# Authors: Rob Crittenden <rcritten@redhat.com>
# Authors: Simo Sorce <ssorce@redhat.com>
#


+ 1
- 1
install/tools/ipa-otptoken-import.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
# Authors: Nathaniel McCallum <npmccallum@redhat.com>
#
# Copyright (C) 2014 Red Hat


+ 1
- 1
install/tools/ipa-pki-retrieve-key.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3

from __future__ import print_function



+ 1
- 1
install/tools/ipa-pki-wait-running.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
"""Wait until pki-tomcatd is up

The script polls on Dogtag's HTTP port and wait until the admin interface


+ 1
- 1
install/tools/ipa-pkinit-manage.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
#
# Copyright (C) 2017 FreeIPA Contributors see COPYING for license
#


+ 1
- 1
install/tools/ipa-replica-conncheck.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
# Authors: Martin Kosek <mkosek@redhat.com>
#
# Copyright (C) 2011 Red Hat


+ 1
- 1
install/tools/ipa-replica-install.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
# Authors: Karl MacMillan <kmacmillan@mentalrootkit.com>
#
# Copyright (C) 2007 Red Hat


+ 1
- 1
install/tools/ipa-replica-manage.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
# Authors: Karl MacMillan <kmacmillan@mentalrootkit.com>
#
# Copyright (C) 2007 Red Hat


+ 1
- 1
install/tools/ipa-restore.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
# Authors: Rob Crittenden <rcritten@redhat.com>
#
# Copyright (C) 2013 Red Hat


+ 1
- 1
install/tools/ipa-server-certinstall.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
# Authors: Jan Cholasta <jcholast@redhat.com>
#
# Copyright (C) 2013 Red Hat


+ 1
- 1
install/tools/ipa-server-install.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
# Authors: Karl MacMillan <kmacmillan@mentalrootkit.com>
# Simo Sorce <ssorce@redhat.com>
# Rob Crittenden <rcritten@redhat.com>


+ 1
- 1
install/tools/ipa-server-upgrade.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
#
# Copyright (C) 2015 FreeIPA Contributors see COPYING for license
#


+ 1
- 1
install/tools/ipa-winsync-migrate.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
# Authors: Tomas Babej <tbabej@redhat.com>
#
# Copyright (C) 2015 Red Hat


+ 1
- 1
install/tools/ipactl.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
# Authors: Simo Sorce <ssorce@redhat.com>
#
# Copyright (C) 2008-2010 Red Hat


+ 1
- 1
ipa.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3

# Authors:
# Jason Gerard DeRose <jderose@redhat.com>


+ 1
- 1
makeaci.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
# Authors:
# Petr Viktorin <pviktori@redhat.com>
# John Dennis <jdennis@redhat.com>


+ 1
- 1
makeapi.in View File

@@ -1,4 +1,4 @@
@PYTHONSHEBANG@
#!/usr/bin/python3
# Authors:
# Rob Crittenden <rcritten@redhat.com>
# John Dennis <jdennis@redhat.com>


Loading…
Cancel
Save