[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Freeipa-devel] [PATCH] chenxiaolong-001 Use /usr/bin/python2



On some platforms, "/usr/bin/python" is Python 3. We require Python 2 so we should explicitly use /usr/bin/python2.

Xiao-Long, who owns FreeIPA in Arch Linux's AUR [0], wrote a patch for this issue. I've just updated the patch to current master (so any breakage this causes is my fault).

https://fedorahosted.org/freeipa/ticket/3438


[0] https://aur.archlinux.org/packages/freeipa

--
PetrĀ³
From fbb48c1f1f08464c8ad3bfa110c9a4a06baa8c9a Mon Sep 17 00:00:00 2001
From: Xiao-Long Chen <chenxiaolong cxl epac to>
Date: Wed, 27 Nov 2013 14:53:57 +0100
Subject: [PATCH] Use /usr/bin/python2

Part of the effort to port FreeIPA to Arch Linux,
where Python 3 is the default.

FreeIPA hasn't been ported to Python 3, so the code must be modified to
run /usr/bin/python2

https://fedorahosted.org/freeipa/ticket/3438

Updated by pviktori redhat com
---
 Makefile                                            | 2 +-
 checks/check-ra.py                                  | 2 +-
 daemons/ipa-otpd/test.py                            | 2 +-
 doc/examples/python-api.py                          | 2 +-
 freeipa.spec.in                                     | 4 ++--
 install/certmonger/dogtag-ipa-retrieve-agent-submit | 2 +-
 install/po/pygettext.py                             | 2 +-
 install/restart_scripts/renew_ca_cert               | 2 +-
 install/restart_scripts/renew_ra_cert               | 2 +-
 install/restart_scripts/restart_dirsrv              | 2 +-
 install/restart_scripts/restart_httpd               | 2 +-
 install/restart_scripts/restart_pkicad              | 2 +-
 install/restart_scripts/stop_pkicad                 | 2 +-
 install/share/copy-schema-to-ca.py                  | 2 +-
 install/tools/ipa-adtrust-install                   | 2 +-
 install/tools/ipa-advise                            | 2 +-
 install/tools/ipa-backup                            | 2 +-
 install/tools/ipa-ca-install                        | 2 +-
 install/tools/ipa-compat-manage                     | 2 +-
 install/tools/ipa-csreplica-manage                  | 2 +-
 install/tools/ipa-dns-install                       | 2 +-
 install/tools/ipa-ldap-updater                      | 2 +-
 install/tools/ipa-managed-entries                   | 2 +-
 install/tools/ipa-nis-manage                        | 2 +-
 install/tools/ipa-replica-conncheck                 | 2 +-
 install/tools/ipa-replica-install                   | 2 +-
 install/tools/ipa-replica-manage                    | 2 +-
 install/tools/ipa-replica-prepare                   | 2 +-
 install/tools/ipa-restore                           | 2 +-
 install/tools/ipa-server-certinstall                | 2 +-
 install/tools/ipa-server-install                    | 2 +-
 install/tools/ipa-upgradeconfig                     | 2 +-
 install/tools/ipactl                                | 2 +-
 ipa                                                 | 2 +-
 ipa-client/ipa-install/ipa-client-automount         | 2 +-
 ipa-client/ipa-install/ipa-client-install           | 2 +-
 ipapython/Makefile                                  | 8 ++++----
 ipapython/py_default_encoding/Makefile              | 8 ++++----
 ipapython/setup.py.in                               | 2 +-
 ipaserver/install/ipa_server_certinstall.py         | 1 -
 ipatests/i18n.py                                    | 2 +-
 ipatests/ipa-run-tests                              | 2 +-
 ipatests/ipa-test-config                            | 2 +-
 ipatests/ipa-test-task                              | 2 +-
 ipatests/setup.py.in                                | 2 +-
 ipatests/test_ipapython/test_dn.py                  | 2 +-
 ipatests/test_ipapython/test_ipavalidate.py         | 2 +-
 lite-server.py                                      | 2 +-
 make-lint                                           | 2 +-
 make-test                                           | 2 +-
 make-testcert                                       | 2 +-
 makeapi                                             | 2 +-
 setup-client.py                                     | 2 +-
 setup.py                                            | 2 +-
 54 files changed, 60 insertions(+), 61 deletions(-)

diff --git a/Makefile b/Makefile
index e54f8f0ba6484a12343f389b3cffbc20d7420a5f..0a300b4ba3a0706f85255d74ecc7030fe99b76e2 100644
--- a/Makefile
+++ b/Makefile
@@ -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 13a41263fab23156c05533d884cf8b210c97f86e..a1df50ba4a4ad7fc0b6d2118e40977b1da6edf65 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 d748c825461f961607a4931c0555d4ea7306643a..824f8a292ed51408746e3f1b6cda2033c2a007e0 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 129c56d90a6ba19c1579aeac5101cd1f53be6bc5..805925f262774edca20fd0f31eda214b83a24fc9 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 80df44daaafd2ec28b18fb1bb606c0112c44e70c..e788feba87cd963019355db3582db88535724b56 100644
--- a/freeipa.spec.in
+++ b/freeipa.spec.in
@@ -494,7 +494,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 || :
@@ -530,7 +530,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 3781fc5d01da12ce2dc01e17fc60143e82fbedc6..e5db79f53e34d2ba624dfa281c40c52cdc7c1aec 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 5293ebf24283c6debd052d2e621075a893b0e8ae..4e4212eba0b94194e64817bd3f5f16fc0db92283 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 ab394b970eaee28bc386d4d1ba737643414e2680..714a79d7c54589f26b4965f1ab000fca9c68be2e 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 e541e4ba4dd8a9a39ab4113e8107bcaa7272691b..919f8fc411eedac6ef50fef9479328fa96d155db 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 a9bb897ba8b8e026da6f05ed32fa995c23948431..9b22d08c10c5a039a9ef73d71a71cf5e107c410f 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 96f80bd8ee1b02ccc582b5050da3199160635ed9..16a41ee5b37955be991531cea3af224cc05a2dad 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 a58c3f31e1bd288587842ba5fc4335c967b9405e..3fe09e7accf36a995e44db0eec84a5becfb2d574 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 c8589b286eefbe1c3d79e2a6dab7adfd3ff56b2a..9c24a99e49161f4ef75ecb8b403bbf2af7f380de 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 1888f12513aa3edf22149e9330afea99f62bf41d..a5646cd6baa5d9cd5b4025215ce8bb36b81c07e6 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 fe86a94642465391f18beb165e54685bb291c69c..e81d0ec8fb154c31eadce08e1dc1fbd50a28a71b 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 4ec3c48c7d8b24893ed39e33d3a14ae632483bfa..6d0d9b95dcbee06cb639f8730b12cf571def6b82 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 5bcaa1d8c9854eb0250def69a49f5ee51683b757..bcdcb306568091a6cc0c89b6eae1f2ff7dcd1da9 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 4edd26d337a50eebe686daae539c257f706e0158..864337c5711205690479e422b1ba1586a39bf422 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 7061a3e5b3ee4a2d32dc42b330c000f59a6173fc..bdfb7182a9cd94c5c5d45faea64b402b991dd9af 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 438a1b3abf6b6fc0a8a4a9c02d8a9f2ecb1826ff..276eec9643c61e0a2e5129a5cb2a4a21c5c94b57 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 37a07f8e38d13260b659ad8b0e72014c6e36324e..d87007d2f67e0c652bb8084198393f878e0f0a9b 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 0fc5a5bc448d04eb9ce8562ee1feebbf8f0fe356..98081d791eb348e461b5ba38566294023a13d31c 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 f13497e12890bf6027ec9f0efaec9c410accaa6d..458339e922c2161b1810929c875bb05dba512a14 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 71c0761c633f0b4724e6f2ffc559c8da286d5a52..3320be74afaa138c24915a5409bbe11096cfbffa 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 c861e30cf7c9851ab78dfaee5460e632f53d002a..2c92eb9267e32af374cf011e8fa8a120a940afa4 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 0e7aefef48d47fefa290607e0604c014d9469fdd..d29131bdf3e105f2f7f13b4c4531ca75e1826682 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 989a4ccaf5b08906f2c60fbfdd69472a516a6327..684000599fc0bd2ac6dd00f79a9d03b17f3eaa6a 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 21df341090589fbd2b1c61a61d60c01a45203c0d..4f37b4beee868744eaa8c9053ef21aa4bebdf824 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 604175be24a398866deee6883d78a18cbbb6fe49..f2572d58a1369091fbc281c6ce2b0a2e8a65b4db 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 9bb0ef8505c3a796cea38065f208a62bdb7fb3bc..a0013f653b2e8c5fcb16ccbedddea8f56edf95e0 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 458ebba550d0fe7675bd874e23c7d730c53297e6..2cdee58d7f3dd52be89fec5006a15d0aa38c8c6b 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 10526f226798c78ae75972b82a2f72b200a8aacf..dec56c6635cd6439124e420e22fbb1126ec9ebd6 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 2db0fde68123941191279d2dd7fed0f897f2137e..3b42b92cf6b9120086592d607327a74fb25054fc 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
diff --git a/ipa b/ipa
index c9b73380ec8a0cddbd247a8ffab67f0d9e40ef15..64ceea49732bb11c4d69cf353d1a2d183e58981a 100755
--- a/ipa
+++ b/ipa
@@ -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 076bf08197925caa9bc0361693333fbf97e6e6fb..a431b98e9921c61194a78aa05e0295bde6b0b0fe 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 61f9de996e51debd00738525e09c017babfce5ed..d29f550c209db0d2499b3fc2fdb258070d252a8b 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 a09ffd1bb133764f9ee48ef31e49d37105f71ef6..d1a3ff54bd8ce82d61c697c5af267fb363c6287e 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 7cd1f6c5818f0b7531ec326f7cf18b703a6db280..88f17f70588e1fa20ed98409e37f7dc2e72b6f68 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 108c95d0ccb74e1cec5167759243f428f4ecf21a..3acc8b8fe5a8f1dee837535705cc2a847f056c2b 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 9e2ef3fc7edcea0b0d7945042502da8ead2aea2b..08b27e38ac8815df78e81e7260ad2e33ddf765bc 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 9c8479bb0a7b2a32d413a58fb5b052afa2866f35..e0ddfda1b63d5a18c8a55238ddee1fb7af787089 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 2b61d3c87cea728377441d3ab305a3433ed859a9..7e3270b41e28d9c75473cfdb3f8c36ef016509a0 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 fbaf3d57a4c7395afcf1ff81d3b29502563305cc..75e5f6c08ce926de85e4e71a1537033d6873ce31 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 e6ba527e47a4f2970ee90c63f1ff2365cc30d686..48be36c97887b4f6aa258ff11e0075cc03defeb3 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 50220d76aafb5494448fdaf6388e2876168a97e8..b50cb6026cb5ba68af33207dcdfc13a59d309b38 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 cdeab9374b1159a73fd9b9043dabc86ea9467239..60802b70c988dd864de04e63be56fb4111213c85 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 12b1577bec70093af592787dbc2e715862a0a6ab..3393de00ed194b2ee4658703fc9647d1ad5266e6 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 e065357846d3bcb1f853f8f1e1e6b19e771cc786..99089b00f9a9cc4c54a227c3aff55c7357ba2428 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>
diff --git a/make-lint b/make-lint
index d9c66a847c9b62f313c7d057e4805285af8a2d0d..bbe3f32e45705d5051246d5008e98dfd9326c47a 100755
--- a/make-lint
+++ b/make-lint
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python2
 #
 # Authors:
 #   Jakub Hrozek <jhrozek redhat com>
diff --git a/make-test b/make-test
index b39e4dbde410d64edc69791d617349cbb6e9c903..1cf5bb32975df76574726d5da4522517e5e12eed 100755
--- a/make-test
+++ b/make-test
@@ -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 19c188a717b04d456a50dc09a062f8e17574e5a6..ff25b399cf450c4768d4e7b2a19e7dcea4d7ae67 100755
--- a/make-testcert
+++ b/make-testcert
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python2
 #
 # Authors:
 #   Rob Crittenden <rcritten redhat com>
diff --git a/makeapi b/makeapi
index d9fb9cffbe225464a1a385fb46ec0805cb3099c4..0f31244553dbf8544abb310b2fc5cb9e450e997c 100755
--- a/makeapi
+++ b/makeapi
@@ -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 332d2926424ef25ed9dd0cb63993676c45fe5254..a42444054b583c7323d1c18dddb43992026c0c44 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>
diff --git a/setup.py b/setup.py
index 4a01b1e99ba0ed4f0f1e05bd387ebe40d2afbb2c..af7964d601f811ca5371db4ae0b762e3b0f5238d 100755
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python2
 
 # Authors:
 #   Jason Gerard DeRose <jderose redhat com>
-- 
1.8.3.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]