From a667a3d57774c7fddf21f759f50e87403970cd7e Mon Sep 17 00:00:00 2001
From: Patrick Uiterwijk <puiterwijk@redhat.com>
Date: Nov 13 2017 10:39:55 +0000
Subject: [PATCH 1/3] Update Makefile for Fedora 26/27


Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>

---

diff --git a/Makefile b/Makefile
index 453a554..d09ccf5 100644
--- a/Makefile
+++ b/Makefile
@@ -141,17 +141,17 @@ container-centos7:
 	@(cat tests/containers/Dockerfile-base tests/containers/Dockerfile-centos tests/containers/Dockerfile-rpm; echo "USER testuser") | sed -e 's/BASE/centos:7/' | docker build -f - -q -t ipsilon-centos7 -
 	@echo "CentOS 7 container built"
 
-container-fedora24:
-	@echo "Building Fedora 24 container ..."
-	@(cat tests/containers/Dockerfile-base tests/containers/Dockerfile-fedora tests/containers/Dockerfile-rpm; echo "USER testuser") | sed -e 's/BASE/fedora:24/' | docker build -f - -q -t ipsilon-fedora24 -
-	@echo "Fedora 24 container built"
+container-fedora26:
+	@echo "Building Fedora 26 container ..."
+	@(cat tests/containers/Dockerfile-base tests/containers/Dockerfile-fedora tests/containers/Dockerfile-rpm; echo "USER testuser") | sed -e 's/BASE/fedora:26/' | docker build -f - -q -t ipsilon-fedora26 -
+	@echo "Fedora 26 container built"
 
-container-fedora25:
-	@echo "Building Fedora 25 container ..."
-	@(cat tests/containers/Dockerfile-base tests/containers/Dockerfile-fedora tests/containers/Dockerfile-rpm; echo "USER testuser") | sed -e 's/BASE/fedora:25/' | docker build -f - -q -t ipsilon-fedora25 -
-	@echo "Fedora 25 container built"
+container-fedora27:
+	@echo "Building Fedora 27 container ..."
+	@(cat tests/containers/Dockerfile-base tests/containers/Dockerfile-fedora tests/containers/Dockerfile-rpm; echo "USER testuser") | sed -e 's/BASE/fedora:27/' | docker build -f - -q -t ipsilon-fedora27 -
+	@echo "Fedora 27 container built"
 
-containers: container-centos6 container-centos7 container-fedora24 container-fedora25
+containers: container-centos6 container-centos7 container-fedora26 container-fedora27
 	@echo "Containers built"
 
 containertest-centos6: container-centos6
@@ -163,20 +163,20 @@ containertest-centos7: container-centos7
 	@docker run -v `pwd`:/code -t --rm ipsilon-centos7
 	@echo "CentOS 7 passed"
 
-containertest-fedora24: container-fedora24
-	@echo "Starting Fedora 24 tests ..."
-	@docker run -v `pwd`:/code -t --rm ipsilon-fedora24
-	@echo "Fedora 24 passed"
+containertest-fedora26: container-fedora26
+	@echo "Starting Fedora 26 tests ..."
+	@docker run -v `pwd`:/code -t --rm ipsilon-fedora26
+	@echo "Fedora 26 passed"
 
-containertest-fedora25: container-fedora25
-	@echo "Starting Fedora 25 tests ..."
-	@docker run -v `pwd`:/code -t --rm ipsilon-fedora25
-	@echo "Fedora 25 passed"
+containertest-fedora27: container-fedora27
+	@echo "Starting Fedora 27 tests ..."
+	@docker run -v `pwd`:/code -t --rm ipsilon-fedora27
+	@echo "Fedora 27 passed"
 
-containertest-lint: container-fedora25
+containertest-lint: container-fedora27
 	@echo "Starting code lint tests ..."
-	@docker run -v `pwd`:/code -t --rm --entrypoint /usr/bin/make ipsilon-fedora25 lint pep8
+	@docker run -v `pwd`:/code -t --rm --entrypoint /usr/bin/make ipsilon-fedora27 lint pep8
 	@echo "Code lint tests passed"
 
-containertest: containertest-lint containertest-centos6 containertest-centos7 containertest-fedora24 containertest-fedora25
+containertest: containertest-lint containertest-centos6 containertest-centos7 containertest-fedora26 containertest-fedora27
 	@echo "Container tests passed"

From fef20c6cb72b535aece64426f87069ccc8759276 Mon Sep 17 00:00:00 2001
From: Patrick Uiterwijk <puiterwijk@redhat.com>
Date: Nov 13 2017 11:52:21 +0000
Subject: [PATCH 2/3] Use python2-pylint explicitly


Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>

---

diff --git a/Makefile b/Makefile
index d09ccf5..536361a 100644
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@ all: testdeps lint pep8 test
 testdeps:
 	# Determine if test deps are installed
 	# First, some binaries
-	which pylint
+	which pylint-2
 	which pep8
 	which httpd
 	which postgres
@@ -39,10 +39,10 @@ testdeps:
 lint:
 	# Analyze code
 	# don't show recommendations, info, comments, report
-	# W0613 - unused argument
+        # W0613 - unused argument
 	# Ignore cherrypy class members as they are dynamically added
 	# Ignore IPA API class members as they are dynamically added
-	pylint -d c,r,i,W0613 -r n -f colorized \
+	pylint-2 -d c,r,i,W0613 -r n -f colorized \
 		   --notes= \
 		   --ignored-classes=cherrypy,API \
 		   --disable=star-args \
@@ -73,7 +73,7 @@ cscope:
 	git ls-files | xargs pycscope
 
 lp-test:
-	pylint -d c,r,i,W0613 -r n -f colorized \
+	pylint-2 -d c,r,i,W0613 -r n -f colorized \
 		   --notes= \
 		   --ignored-classes=cherrypy \
 		   --disable=star-args \
@@ -173,9 +173,9 @@ containertest-fedora27: container-fedora27
 	@docker run -v `pwd`:/code -t --rm ipsilon-fedora27
 	@echo "Fedora 27 passed"
 
-containertest-lint: container-fedora27
+containertest-lint: container-centos7
 	@echo "Starting code lint tests ..."
-	@docker run -v `pwd`:/code -t --rm --entrypoint /usr/bin/make ipsilon-fedora27 lint pep8
+	@docker run -v `pwd`:/code -t --rm --entrypoint /usr/bin/make ipsilon-centos7 lint pep8
 	@echo "Code lint tests passed"
 
 containertest: containertest-lint containertest-centos6 containertest-centos7 containertest-fedora26 containertest-fedora27
diff --git a/tests/containers/Dockerfile-rpm b/tests/containers/Dockerfile-rpm
index d3f5346..70547d7 100644
--- a/tests/containers/Dockerfile-rpm
+++ b/tests/containers/Dockerfile-rpm
@@ -2,7 +2,7 @@ RUN yum update -y \
     && yum install -y which
 # This should be kept in sync with the develop page on the website.
 # Distro-specific packages should go in the distro sub-dockerfiles.
-RUN yum install -y make pylint python-pep8 python-openid python-openid-teams \
+RUN yum install -y make python2-pylint python-pep8 python-openid python-openid-teams \
         python-openid-cla python-cherrypy m2crypto lasso-python \
         python-sqlalchemy python-ldap python-pam python-fedora \
         freeipa-python httpd mod_auth_mellon postgresql-server \

From e18b3d4294d4cba34c4b1f1ad254835dd46667a4 Mon Sep 17 00:00:00 2001
From: Patrick Uiterwijk <puiterwijk@redhat.com>
Date: Nov 13 2017 11:52:21 +0000
Subject: [PATCH 3/3] Add python2 deps for Fedora


Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>

---

diff --git a/tests/containers/Dockerfile-fedora b/tests/containers/Dockerfile-fedora
index 4f252c6..c519795 100644
--- a/tests/containers/Dockerfile-fedora
+++ b/tests/containers/Dockerfile-fedora
@@ -1 +1 @@
-RUN yum install -y etcd python-etcd
+RUN yum install -y etcd python2-python-etcd dbus-python python2-ipalib

