Rename Python scripts and add dynamic shebang

All Python scripts are now generated from a template with a dynamic
shebang.

ipatests/i18n.py is no longer an executable script with shebang. The
module is not executed as script directly, but rather as

    $(PYTHON) ipatests/i18n.py

Fixes: https://pagure.io/freeipa/issue/7680
All Python scripts are now template files with a dynamic shebang line.

Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Christian Heimes 2018-08-22 15:55:17 +02:00
parent e4a3942e89
commit a347c11650
49 changed files with 100 additions and 48 deletions

53
.gitignore vendored
View File

@ -119,3 +119,56 @@ freeipa2-dev-doc
/ipapython/.DEFAULT_PLUGINS
/ipatests/.cache/
# Python scripts with auto-generated shebang
ipa
makeaci
makeapi
client/ipa-certupdate
client/ipa-client-automount
client/ipa-client-install
daemons/dnssec/ipa-dnskeysyncd
daemons/dnssec/ipa-dnskeysync-replica
daemons/dnssec/ipa-ods-exporter
install/certmonger/dogtag-ipa-ca-renew-agent-submit
install/certmonger/ipa-server-guard
install/oddjob/com.redhat.idm.trust-fetch-domains
install/restart_scripts/renew_ca_cert
install/restart_scripts/renew_kdc_cert
install/restart_scripts/renew_ra_cert
install/restart_scripts/renew_ra_cert_pre
install/restart_scripts/restart_dirsrv
install/restart_scripts/restart_httpd
install/restart_scripts/stop_pkicad
install/tools/ipa-adtrust-install
install/tools/ipa-advise
install/tools/ipa-backup
install/tools/ipa-cacert-manage
install/tools/ipa-ca-install
install/tools/ipa-compat-manage
install/tools/ipa-csreplica-manage
install/tools/ipactl
install/tools/ipa-custodia
install/tools/ipa-custodia-check
install/tools/ipa-dns-install
install/tools/ipa-httpd-kdcproxy
install/tools/ipa-kra-install
install/tools/ipa-ldap-updater
install/tools/ipa-managed-entries
install/tools/ipa-nis-manage
install/tools/ipa-otptoken-import
install/tools/ipa-pkinit-manage
install/tools/ipa-pki-retrieve-key
install/tools/ipa-replica-conncheck
install/tools/ipa-replica-install
install/tools/ipa-replica-manage
install/tools/ipa-replica-prepare
install/tools/ipa-restore
install/tools/ipa-server-certinstall
install/tools/ipa-server-install
install/tools/ipa-server-upgrade
install/tools/ipa-winsync-migrate
ipatests/i18n.py
ipatests/ipa-run-tests
ipatests/ipa-test-config
ipatests/ipa-test-task

2
client/ipa-certupdate → client/ipa-certupdate.in Executable file → Normal file
View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,4 +1,4 @@
#!/usr/bin/python3
@PYTHONSHEBANG@
from ipaserver import dcerpc
from ipaserver.install.installutils import is_ipa_configured, ScriptError

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,4 +1,4 @@
#!/usr/bin/python3
@PYTHONSHEBANG@
"""Test client for ipa-custodia
The test script is expected to be executed on an IPA server with existing

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,4 +1,4 @@
#!/usr/bin/python3
@PYTHONSHEBANG@
from __future__ import print_function

View File

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

View File

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

View File

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

View File

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

View File

@ -1,4 +1,4 @@
#!/usr/bin/python3 -E
@PYTHONSHEBANG@
# Authors: Petr Viktorin <pviktori@redhat.com>
#
# Copyright (C) 2012 Red Hat

View File

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

View File

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

View File

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

View File

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

View File

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

2
install/tools/ipactl → install/tools/ipactl.in Executable file → Normal file
View File

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

2
ipa → ipa.in Executable file → Normal file
View File

@ -1,4 +1,4 @@
#!/usr/bin/python3
@PYTHONSHEBANG@
# Authors:
# Jason Gerard DeRose <jderose@redhat.com>

1
ipatests/i18n.py Executable file → Normal file
View File

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

2
makeaci → makeaci.in Executable file → Normal file
View File

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

2
makeapi → makeapi.in Executable file → Normal file
View File

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