diff options
54 files changed, 60 insertions, 61 deletions
@@ -50,7 +50,7 @@ ifneq ($(DEVELOPER_MODE),0) LINT_OPTIONS=--no-fail endif -PYTHON ?= $(shell rpm -E %__python || echo /usr/bin/python) +PYTHON ?= $(shell rpm -E %__python || echo /usr/bin/python2) CFLAGS := -g -O2 -Werror -Wall -Wextra -Wformat-security -Wno-unused-parameter -Wno-sign-compare -Wno-missing-field-initializers $(CFLAGS) export CFLAGS diff --git a/checks/check-ra.py b/checks/check-ra.py index 13a41263..a1df50ba 100755 --- a/checks/check-ra.py +++ b/checks/check-ra.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # Authors: # Jason Gerard DeRose <jderose@redhat.com> # John Dennis <jdennis@redhat.com> diff --git a/daemons/ipa-otpd/test.py b/daemons/ipa-otpd/test.py index d748c825..824f8a29 100644 --- a/daemons/ipa-otpd/test.py +++ b/daemons/ipa-otpd/test.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # # FreeIPA 2FA companion daemon # diff --git a/doc/examples/python-api.py b/doc/examples/python-api.py index 129c56d9..805925f2 100755 --- a/doc/examples/python-api.py +++ b/doc/examples/python-api.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # Authors: # Jason Gerard DeRose <jderose@redhat.com> # diff --git a/freeipa.spec.in b/freeipa.spec.in index df68be0a..0e320ed3 100644 --- a/freeipa.spec.in +++ b/freeipa.spec.in @@ -496,7 +496,7 @@ fi # Restart IPA processes. This must be also run in postrans so that plugins # and software is in consistent state -python -c "import sys; from ipaserver.install import installutils; sys.exit(0 if installutils.is_ipa_configured() else 1);" > /dev/null 2>&1 +python2 -c "import sys; from ipaserver.install import installutils; sys.exit(0 if installutils.is_ipa_configured() else 1);" > /dev/null 2>&1 # NOTE: systemd specific section if [ $? -eq 0 ]; then /bin/systemctl try-restart ipa.service >/dev/null 2>&1 || : @@ -532,7 +532,7 @@ fi winbind_krb5_locator.so /dev/null 90 %posttrans server-trust-ad -python -c "import sys; from ipaserver.install import installutils; sys.exit(0 if installutils.is_ipa_configured() else 1);" > /dev/null 2>&1 +python2 -c "import sys; from ipaserver.install import installutils; sys.exit(0 if installutils.is_ipa_configured() else 1);" > /dev/null 2>&1 if [ $? -eq 0 ]; then # NOTE: systemd specific section /bin/systemctl try-restart httpd.service >/dev/null 2>&1 || : diff --git a/install/certmonger/dogtag-ipa-retrieve-agent-submit b/install/certmonger/dogtag-ipa-retrieve-agent-submit index 70cbd82d..973af267 100644 --- a/install/certmonger/dogtag-ipa-retrieve-agent-submit +++ b/install/certmonger/dogtag-ipa-retrieve-agent-submit @@ -1,4 +1,4 @@ -#!/usr/bin/python -E +#!/usr/bin/python2 -E # # Authors: # Rob Crittenden <rcritten@redhat.com> diff --git a/install/po/pygettext.py b/install/po/pygettext.py index 5293ebf2..4e4212eb 100755 --- a/install/po/pygettext.py +++ b/install/po/pygettext.py @@ -1,4 +1,4 @@ -#! /usr/bin/python +#! /usr/bin/python2 # -*- coding: iso-8859-1 -*- # Originally written by Barry Warsaw <barry@zope.com> # diff --git a/install/restart_scripts/renew_ca_cert b/install/restart_scripts/renew_ca_cert index ab394b97..714a79d7 100644 --- a/install/restart_scripts/renew_ca_cert +++ b/install/restart_scripts/renew_ca_cert @@ -1,4 +1,4 @@ -#!/usr/bin/python -E +#!/usr/bin/python2 -E # # Authors: # Rob Crittenden <rcritten@redhat.com> diff --git a/install/restart_scripts/renew_ra_cert b/install/restart_scripts/renew_ra_cert index e541e4ba..919f8fc4 100644 --- a/install/restart_scripts/renew_ra_cert +++ b/install/restart_scripts/renew_ra_cert @@ -1,4 +1,4 @@ -#!/usr/bin/python -E +#!/usr/bin/python2 -E # # Authors: # Rob Crittenden <rcritten@redhat.com> diff --git a/install/restart_scripts/restart_dirsrv b/install/restart_scripts/restart_dirsrv index a9bb897b..9b22d08c 100644 --- a/install/restart_scripts/restart_dirsrv +++ b/install/restart_scripts/restart_dirsrv @@ -1,4 +1,4 @@ -#!/usr/bin/python -E +#!/usr/bin/python2 -E # # Authors: # Rob Crittenden <rcritten@redhat.com> diff --git a/install/restart_scripts/restart_httpd b/install/restart_scripts/restart_httpd index 96f80bd8..16a41ee5 100644 --- a/install/restart_scripts/restart_httpd +++ b/install/restart_scripts/restart_httpd @@ -1,4 +1,4 @@ -#!/usr/bin/python -E +#!/usr/bin/python2 -E # # Authors: # Rob Crittenden <rcritten@redhat.com> diff --git a/install/restart_scripts/restart_pkicad b/install/restart_scripts/restart_pkicad index a58c3f31..3fe09e7a 100644 --- a/install/restart_scripts/restart_pkicad +++ b/install/restart_scripts/restart_pkicad @@ -1,4 +1,4 @@ -#!/usr/bin/python -E +#!/usr/bin/python2 -E # # Authors: # Rob Crittenden <rcritten@redhat.com> diff --git a/install/restart_scripts/stop_pkicad b/install/restart_scripts/stop_pkicad index c8589b28..9c24a99e 100644 --- a/install/restart_scripts/stop_pkicad +++ b/install/restart_scripts/stop_pkicad @@ -1,4 +1,4 @@ -#!/usr/bin/python -E +#!/usr/bin/python2 -E # # Authors: # Rob Crittenden <rcritten@redhat.com> diff --git a/install/share/copy-schema-to-ca.py b/install/share/copy-schema-to-ca.py index 1888f125..a5646cd6 100755 --- a/install/share/copy-schema-to-ca.py +++ b/install/share/copy-schema-to-ca.py @@ -1,4 +1,4 @@ -#! /usr/bin/python +#! /usr/bin/python2 """Copy the IPA schema to the CA directory server instance diff --git a/install/tools/ipa-adtrust-install b/install/tools/ipa-adtrust-install index fe86a946..e81d0ec8 100755 --- a/install/tools/ipa-adtrust-install +++ b/install/tools/ipa-adtrust-install @@ -1,4 +1,4 @@ -#! /usr/bin/python +#! /usr/bin/python2 # # Authors: Sumit Bose <sbose@redhat.com> # Based on ipa-server-install by Karl MacMillan <kmacmillan@mentalrootkit.com> diff --git a/install/tools/ipa-advise b/install/tools/ipa-advise index 4ec3c48c..6d0d9b95 100755 --- a/install/tools/ipa-advise +++ b/install/tools/ipa-advise @@ -1,4 +1,4 @@ -#! /usr/bin/python -E +#! /usr/bin/python2 -E # Authors: Tomas Babej <tbabej@redhat.com> # # Copyright (C) 2013 Red Hat diff --git a/install/tools/ipa-backup b/install/tools/ipa-backup index 5bcaa1d8..bcdcb306 100755 --- a/install/tools/ipa-backup +++ b/install/tools/ipa-backup @@ -1,4 +1,4 @@ -#! /usr/bin/python -E +#! /usr/bin/python2 -E # Authors: Rob Crittenden <rcritten@redhat.com> # # Copyright (C) 2013 Red Hat diff --git a/install/tools/ipa-ca-install b/install/tools/ipa-ca-install index 4edd26d3..864337c5 100755 --- a/install/tools/ipa-ca-install +++ b/install/tools/ipa-ca-install @@ -1,4 +1,4 @@ -#! /usr/bin/python -E +#! /usr/bin/python2 -E # Authors: Rob Crittenden <rcritten@redhat.com> # # Copyright (C) 2011 Red Hat diff --git a/install/tools/ipa-compat-manage b/install/tools/ipa-compat-manage index 7061a3e5..bdfb7182 100755 --- a/install/tools/ipa-compat-manage +++ b/install/tools/ipa-compat-manage @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # Authors: Rob Crittenden <rcritten@redhat.com> # Authors: Simo Sorce <ssorce@redhat.com> # diff --git a/install/tools/ipa-csreplica-manage b/install/tools/ipa-csreplica-manage index 438a1b3a..276eec96 100755 --- a/install/tools/ipa-csreplica-manage +++ b/install/tools/ipa-csreplica-manage @@ -1,4 +1,4 @@ -#! /usr/bin/python -E +#! /usr/bin/python2 -E # Authors: Rob Crittenden <rcritten@redhat.com> # # Based on ipa-replica-manage by Karl MacMillan <kmacmillan@mentalrootkit.com> diff --git a/install/tools/ipa-dns-install b/install/tools/ipa-dns-install index 37a07f8e..d87007d2 100755 --- a/install/tools/ipa-dns-install +++ b/install/tools/ipa-dns-install @@ -1,4 +1,4 @@ -#! /usr/bin/python -E +#! /usr/bin/python2 -E # Authors: Martin Nagy <mnagy@redhat.com> # Based on ipa-server-install by Karl MacMillan <kmacmillan@mentalrootkit.com> # diff --git a/install/tools/ipa-ldap-updater b/install/tools/ipa-ldap-updater index 0fc5a5bc..98081d79 100755 --- a/install/tools/ipa-ldap-updater +++ b/install/tools/ipa-ldap-updater @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # Authors: Rob Crittenden <rcritten@redhat.com> # # Copyright (C) 2008 Red Hat diff --git a/install/tools/ipa-managed-entries b/install/tools/ipa-managed-entries index f13497e1..458339e9 100755 --- a/install/tools/ipa-managed-entries +++ b/install/tools/ipa-managed-entries @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # Authors: Jr Aquino <jr.aquino@citrix.com> # # Copyright (C) 2011 Red Hat diff --git a/install/tools/ipa-nis-manage b/install/tools/ipa-nis-manage index 71c0761c..3320be74 100755 --- a/install/tools/ipa-nis-manage +++ b/install/tools/ipa-nis-manage @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # Authors: Rob Crittenden <rcritten@redhat.com> # Authors: Simo Sorce <ssorce@redhat.com> # diff --git a/install/tools/ipa-replica-conncheck b/install/tools/ipa-replica-conncheck index c861e30c..2c92eb92 100755 --- a/install/tools/ipa-replica-conncheck +++ b/install/tools/ipa-replica-conncheck @@ -1,4 +1,4 @@ -#! /usr/bin/python -E +#! /usr/bin/python2 -E # Authors: Martin Kosek <mkosek@redhat.com> # # Copyright (C) 2011 Red Hat diff --git a/install/tools/ipa-replica-install b/install/tools/ipa-replica-install index 0e7aefef..d29131bd 100755 --- a/install/tools/ipa-replica-install +++ b/install/tools/ipa-replica-install @@ -1,4 +1,4 @@ -#! /usr/bin/python -E +#! /usr/bin/python2 -E # Authors: Karl MacMillan <kmacmillan@mentalrootkit.com> # # Copyright (C) 2007 Red Hat diff --git a/install/tools/ipa-replica-manage b/install/tools/ipa-replica-manage index 989a4cca..68400059 100755 --- a/install/tools/ipa-replica-manage +++ b/install/tools/ipa-replica-manage @@ -1,4 +1,4 @@ -#! /usr/bin/python -E +#! /usr/bin/python2 -E # Authors: Karl MacMillan <kmacmillan@mentalrootkit.com> # # Copyright (C) 2007 Red Hat diff --git a/install/tools/ipa-replica-prepare b/install/tools/ipa-replica-prepare index 21df3410..4f37b4be 100755 --- a/install/tools/ipa-replica-prepare +++ b/install/tools/ipa-replica-prepare @@ -1,4 +1,4 @@ -#! /usr/bin/python -E +#! /usr/bin/python2 -E # Authors: Petr Viktorin <pviktori@redhat.com> # # Copyright (C) 2012 Red Hat diff --git a/install/tools/ipa-restore b/install/tools/ipa-restore index 604175be..f2572d58 100755 --- a/install/tools/ipa-restore +++ b/install/tools/ipa-restore @@ -1,4 +1,4 @@ -#! /usr/bin/python -E +#! /usr/bin/python2 -E # Authors: Rob Crittenden <rcritten@redhat.com> # # Copyright (C) 2013 Red Hat diff --git a/install/tools/ipa-server-certinstall b/install/tools/ipa-server-certinstall index 9bb0ef85..a0013f65 100755 --- a/install/tools/ipa-server-certinstall +++ b/install/tools/ipa-server-certinstall @@ -1,4 +1,4 @@ -#! /usr/bin/python -E +#! /usr/bin/python2 -E # Authors: Jan Cholasta <jcholast@redhat.com> # # Copyright (C) 2013 Red Hat diff --git a/install/tools/ipa-server-install b/install/tools/ipa-server-install index 9c9b205a..dcf0bceb 100755 --- a/install/tools/ipa-server-install +++ b/install/tools/ipa-server-install @@ -1,4 +1,4 @@ -#! /usr/bin/python -E +#! /usr/bin/python2 -E # Authors: Karl MacMillan <kmacmillan@mentalrootkit.com> # Simo Sorce <ssorce@redhat.com> # Rob Crittenden <rcritten@redhat.com> diff --git a/install/tools/ipa-upgradeconfig b/install/tools/ipa-upgradeconfig index 10526f22..dec56c66 100644 --- a/install/tools/ipa-upgradeconfig +++ b/install/tools/ipa-upgradeconfig @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # # Authors: # Rob Crittenden <rcritten@redhat.com> diff --git a/install/tools/ipactl b/install/tools/ipactl index 2db0fde6..3b42b92c 100755 --- a/install/tools/ipactl +++ b/install/tools/ipactl @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # Authors: Simo Sorce <ssorce@redhat.com> # # Copyright (C) 2008-2010 Red Hat @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # Authors: # Jason Gerard DeRose <jderose@redhat.com> diff --git a/ipa-client/ipa-install/ipa-client-automount b/ipa-client/ipa-install/ipa-client-automount index 076bf081..a431b98e 100755 --- a/ipa-client/ipa-install/ipa-client-automount +++ b/ipa-client/ipa-install/ipa-client-automount @@ -1,4 +1,4 @@ -#!/usr/bin/python -E +#!/usr/bin/python2 -E # # Authors: # Rob Crittenden <rcritten@redhat.com> diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install index 61f9de99..d29f550c 100755 --- a/ipa-client/ipa-install/ipa-client-install +++ b/ipa-client/ipa-install/ipa-client-install @@ -1,4 +1,4 @@ -#! /usr/bin/python -E +#! /usr/bin/python2 -E # Authors: Simo Sorce <ssorce@redhat.com> # Karl MacMillan <kmacmillan@mentalrootkit.com> # diff --git a/ipapython/Makefile b/ipapython/Makefile index a09ffd1b..d1a3ff54 100644 --- a/ipapython/Makefile +++ b/ipapython/Makefile @@ -1,4 +1,4 @@ -PYTHONLIBDIR ?= $(shell python -c "from distutils.sysconfig import *; print get_python_lib()") +PYTHONLIBDIR ?= $(shell python2 -c "from distutils.sysconfig import *; print get_python_lib()") PACKAGEDIR ?= $(DESTDIR)/$(PYTHONLIBDIR)/ipa CONFIGDIR ?= $(DESTDIR)/etc/ipa TESTS = $(wildcard test/*.py) @@ -12,9 +12,9 @@ all: install: if [ "$(DESTDIR)" = "" ]; then \ - python setup.py install; \ + python2 setup.py install; \ else \ - python setup.py install --root $(DESTDIR); \ + python2 setup.py install --root $(DESTDIR); \ fi @for subdir in $(SUBDIRS); do \ (cd $$subdir && $(MAKE) $@) || exit 1; \ @@ -42,4 +42,4 @@ maintainer-clean: distclean test: $(subst .py,.tst,$(TESTS)) %.tst: %.py - python $< + python2 $< diff --git a/ipapython/py_default_encoding/Makefile b/ipapython/py_default_encoding/Makefile index 7cd1f6c5..88f17f70 100644 --- a/ipapython/py_default_encoding/Makefile +++ b/ipapython/py_default_encoding/Makefile @@ -1,15 +1,15 @@ -PYTHONLIBDIR ?= $(shell python -c "from distutils.sysconfig import *; print get_python_lib()") +PYTHONLIBDIR ?= $(shell python2 -c "from distutils.sysconfig import *; print get_python_lib()") PACKAGEDIR ?= $(DESTDIR)/$(PYTHONLIBDIR)/ipa CONFIGDIR ?= $(DESTDIR)/etc/ipa all: - python setup.py build + python2 setup.py build install: if [ "$(DESTDIR)" = "" ]; then \ - python setup.py install; \ + python2 setup.py install; \ else \ - python setup.py install --root $(DESTDIR); \ + python2 setup.py install --root $(DESTDIR); \ fi clean: diff --git a/ipapython/setup.py.in b/ipapython/setup.py.in index 108c95d0..3acc8b8f 100644 --- a/ipapython/setup.py.in +++ b/ipapython/setup.py.in @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # Copyright (C) 2007 Red Hat # see file 'COPYING' for use and warranty information # diff --git a/ipaserver/install/ipa_server_certinstall.py b/ipaserver/install/ipa_server_certinstall.py index 9e2ef3fc..08b27e38 100644 --- a/ipaserver/install/ipa_server_certinstall.py +++ b/ipaserver/install/ipa_server_certinstall.py @@ -1,4 +1,3 @@ -#! /usr/bin/python # Authors: Karl MacMillan <kmacmillan@mentalrootkit.com> # Jan Cholasta <jcholast@redhat.com> # diff --git a/ipatests/i18n.py b/ipatests/i18n.py index 9c8479bb..e0ddfda1 100755 --- a/ipatests/i18n.py +++ b/ipatests/i18n.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # Authors: # John Dennis <jdennis@redhat.com> # diff --git a/ipatests/ipa-run-tests b/ipatests/ipa-run-tests index 2b61d3c8..7e3270b4 100755 --- a/ipatests/ipa-run-tests +++ b/ipatests/ipa-run-tests @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # Authors: # Petr Viktorin <pviktori@redhat.com> diff --git a/ipatests/ipa-test-config b/ipatests/ipa-test-config index fbaf3d57..75e5f6c0 100755 --- a/ipatests/ipa-test-config +++ b/ipatests/ipa-test-config @@ -1,4 +1,4 @@ -#! /usr/bin/python +#! /usr/bin/python2 # Authors: # Petr Viktorin <pviktori@redhat.com> diff --git a/ipatests/ipa-test-task b/ipatests/ipa-test-task index e6ba527e..48be36c9 100755 --- a/ipatests/ipa-test-task +++ b/ipatests/ipa-test-task @@ -1,4 +1,4 @@ -#! /usr/bin/python +#! /usr/bin/python2 # Authors: # Petr Viktorin <pviktori@redhat.com> diff --git a/ipatests/setup.py.in b/ipatests/setup.py.in index 50220d76..b50cb602 100644 --- a/ipatests/setup.py.in +++ b/ipatests/setup.py.in @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # Copyright (C) 2007 Red Hat # see file 'COPYING' for use and warranty information # diff --git a/ipatests/test_ipapython/test_dn.py b/ipatests/test_ipapython/test_dn.py index cdeab937..60802b70 100644 --- a/ipatests/test_ipapython/test_dn.py +++ b/ipatests/test_ipapython/test_dn.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 import unittest from ipapython.dn import * diff --git a/ipatests/test_ipapython/test_ipavalidate.py b/ipatests/test_ipapython/test_ipavalidate.py index 12b1577b..3393de00 100644 --- a/ipatests/test_ipapython/test_ipavalidate.py +++ b/ipatests/test_ipapython/test_ipavalidate.py @@ -1,4 +1,4 @@ -#! /usr/bin/python -E +#! /usr/bin/python2 -E # # Copyright (C) 2007 Red Hat # see file 'COPYING' for use and warranty information diff --git a/lite-server.py b/lite-server.py index e0653578..99089b00 100755 --- a/lite-server.py +++ b/lite-server.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # Authors: # Jason Gerard DeRose <jderose@redhat.com> @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # # Authors: # Jakub Hrozek <jhrozek@redhat.com> @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 """ Run IPA unit tests under multiple versions of Python (if present). diff --git a/make-testcert b/make-testcert index 19c188a7..ff25b399 100755 --- a/make-testcert +++ b/make-testcert @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # # Authors: # Rob Crittenden <rcritten@redhat.com> @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # Authors: # Rob Crittenden <rcritten@redhat.com> # John Dennis <jdennis@redhat.com> diff --git a/setup-client.py b/setup-client.py index 332d2926..a4244405 100755 --- a/setup-client.py +++ b/setup-client.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # Authors: # Jason Gerard DeRose <jderose@redhat.com> @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # Authors: # Jason Gerard DeRose <jderose@redhat.com> |