mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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
This commit is contained in:
committed by
Martin Kosek
parent
2a2f5ac4e6
commit
5e96fbc22a
2
Makefile
2
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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/python2
|
||||
# Authors:
|
||||
# Jason Gerard DeRose <jderose@redhat.com>
|
||||
# John Dennis <jdennis@redhat.com>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/python2
|
||||
#
|
||||
# FreeIPA 2FA companion daemon
|
||||
#
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/python2
|
||||
# Authors:
|
||||
# Jason Gerard DeRose <jderose@redhat.com>
|
||||
#
|
||||
|
||||
@@ -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 || :
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python -E
|
||||
#!/usr/bin/python2 -E
|
||||
#
|
||||
# Authors:
|
||||
# Rob Crittenden <rcritten@redhat.com>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#! /usr/bin/python
|
||||
#! /usr/bin/python2
|
||||
# -*- coding: iso-8859-1 -*-
|
||||
# Originally written by Barry Warsaw <barry@zope.com>
|
||||
#
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python -E
|
||||
#!/usr/bin/python2 -E
|
||||
#
|
||||
# Authors:
|
||||
# Rob Crittenden <rcritten@redhat.com>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python -E
|
||||
#!/usr/bin/python2 -E
|
||||
#
|
||||
# Authors:
|
||||
# Rob Crittenden <rcritten@redhat.com>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python -E
|
||||
#!/usr/bin/python2 -E
|
||||
#
|
||||
# Authors:
|
||||
# Rob Crittenden <rcritten@redhat.com>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python -E
|
||||
#!/usr/bin/python2 -E
|
||||
#
|
||||
# Authors:
|
||||
# Rob Crittenden <rcritten@redhat.com>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python -E
|
||||
#!/usr/bin/python2 -E
|
||||
#
|
||||
# Authors:
|
||||
# Rob Crittenden <rcritten@redhat.com>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python -E
|
||||
#!/usr/bin/python2 -E
|
||||
#
|
||||
# Authors:
|
||||
# Rob Crittenden <rcritten@redhat.com>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#! /usr/bin/python
|
||||
#! /usr/bin/python2
|
||||
|
||||
"""Copy the IPA schema to the CA directory server instance
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#! /usr/bin/python -E
|
||||
#! /usr/bin/python2 -E
|
||||
# Authors: Tomas Babej <tbabej@redhat.com>
|
||||
#
|
||||
# Copyright (C) 2013 Red Hat
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#! /usr/bin/python -E
|
||||
#! /usr/bin/python2 -E
|
||||
# Authors: Rob Crittenden <rcritten@redhat.com>
|
||||
#
|
||||
# Copyright (C) 2013 Red Hat
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#! /usr/bin/python -E
|
||||
#! /usr/bin/python2 -E
|
||||
# Authors: Rob Crittenden <rcritten@redhat.com>
|
||||
#
|
||||
# Copyright (C) 2011 Red Hat
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/python2
|
||||
# Authors: Rob Crittenden <rcritten@redhat.com>
|
||||
# Authors: Simo Sorce <ssorce@redhat.com>
|
||||
#
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
#
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/python2
|
||||
# Authors: Rob Crittenden <rcritten@redhat.com>
|
||||
#
|
||||
# Copyright (C) 2008 Red Hat
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/python2
|
||||
# Authors: Jr Aquino <jr.aquino@citrix.com>
|
||||
#
|
||||
# Copyright (C) 2011 Red Hat
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/python2
|
||||
# Authors: Rob Crittenden <rcritten@redhat.com>
|
||||
# Authors: Simo Sorce <ssorce@redhat.com>
|
||||
#
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#! /usr/bin/python -E
|
||||
#! /usr/bin/python2 -E
|
||||
# Authors: Martin Kosek <mkosek@redhat.com>
|
||||
#
|
||||
# Copyright (C) 2011 Red Hat
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#! /usr/bin/python -E
|
||||
#! /usr/bin/python2 -E
|
||||
# Authors: Karl MacMillan <kmacmillan@mentalrootkit.com>
|
||||
#
|
||||
# Copyright (C) 2007 Red Hat
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#! /usr/bin/python -E
|
||||
#! /usr/bin/python2 -E
|
||||
# Authors: Karl MacMillan <kmacmillan@mentalrootkit.com>
|
||||
#
|
||||
# Copyright (C) 2007 Red Hat
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#! /usr/bin/python -E
|
||||
#! /usr/bin/python2 -E
|
||||
# Authors: Petr Viktorin <pviktori@redhat.com>
|
||||
#
|
||||
# Copyright (C) 2012 Red Hat
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#! /usr/bin/python -E
|
||||
#! /usr/bin/python2 -E
|
||||
# Authors: Rob Crittenden <rcritten@redhat.com>
|
||||
#
|
||||
# Copyright (C) 2013 Red Hat
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#! /usr/bin/python -E
|
||||
#! /usr/bin/python2 -E
|
||||
# Authors: Jan Cholasta <jcholast@redhat.com>
|
||||
#
|
||||
# Copyright (C) 2013 Red Hat
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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: Simo Sorce <ssorce@redhat.com>
|
||||
#
|
||||
# Copyright (C) 2008-2010 Red Hat
|
||||
|
||||
2
ipa
2
ipa
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/python2
|
||||
|
||||
# Authors:
|
||||
# Jason Gerard DeRose <jderose@redhat.com>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python -E
|
||||
#!/usr/bin/python2 -E
|
||||
#
|
||||
# Authors:
|
||||
# Rob Crittenden <rcritten@redhat.com>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#! /usr/bin/python -E
|
||||
#! /usr/bin/python2 -E
|
||||
# Authors: Simo Sorce <ssorce@redhat.com>
|
||||
# Karl MacMillan <kmacmillan@mentalrootkit.com>
|
||||
#
|
||||
|
||||
@@ -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 $<
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/python2
|
||||
# Copyright (C) 2007 Red Hat
|
||||
# see file 'COPYING' for use and warranty information
|
||||
#
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#! /usr/bin/python
|
||||
# Authors: Karl MacMillan <kmacmillan@mentalrootkit.com>
|
||||
# Jan Cholasta <jcholast@redhat.com>
|
||||
#
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/python2
|
||||
# Authors:
|
||||
# John Dennis <jdennis@redhat.com>
|
||||
#
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/python2
|
||||
|
||||
# Authors:
|
||||
# Petr Viktorin <pviktori@redhat.com>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#! /usr/bin/python
|
||||
#! /usr/bin/python2
|
||||
|
||||
# Authors:
|
||||
# Petr Viktorin <pviktori@redhat.com>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#! /usr/bin/python
|
||||
#! /usr/bin/python2
|
||||
|
||||
# Authors:
|
||||
# Petr Viktorin <pviktori@redhat.com>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/python2
|
||||
# Copyright (C) 2007 Red Hat
|
||||
# see file 'COPYING' for use and warranty information
|
||||
#
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/python2
|
||||
|
||||
import unittest
|
||||
from ipapython.dn import *
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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).
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/python2
|
||||
#
|
||||
# Authors:
|
||||
# Rob Crittenden <rcritten@redhat.com>
|
||||
|
||||
2
makeapi
2
makeapi
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/python2
|
||||
# Authors:
|
||||
# Rob Crittenden <rcritten@redhat.com>
|
||||
# John Dennis <jdennis@redhat.com>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/python2
|
||||
|
||||
# Authors:
|
||||
# Jason Gerard DeRose <jderose@redhat.com>
|
||||
|
||||
Reference in New Issue
Block a user