Skip to content

Commit

Permalink
Build for el8, with python3
Browse files Browse the repository at this point in the history
Change-Id: Ibe6ca9752f103641c12f0d9995dc6ad4a41f2778
Signed-off-by: Yedidyah Bar David <didi@redhat.com>
  • Loading branch information
didib committed Feb 6, 2020
1 parent 12ed2d6 commit 0ce67e2
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 4 deletions.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ BUILD_VALIDATION=1

PACKAGE_NAME=ovirt-engine-dwh
ANT=ant
PYTHON=python
PYTHON=python2
PYTHON3=$(shell which python3 2> /dev/null)
PYFLAKES=pyflakes
PEP8=pep8
PY_VERSION=$(if $(PYTHON3),3,2)
PREFIX=/usr/local
LOCALSTATE_DIR=$(PREFIX)/var
BIN_DIR=$(PREFIX)/bin
Expand Down Expand Up @@ -102,6 +103,7 @@ BUILD_FILE=tmp.built
-e "s|@VERSION_PATCH_LEVEL@|$(VERSION_PATCH_LEVEL)|g" \
-e "s|@PEP8@|$(PEP8)|g" \
-e "s|@PYFLAKES@|$(PYFLAKES)|g" \
-e "s|@PY_VERSION@|$(PY_VERSION)|g" \
$< > $@

GENERATED = \
Expand All @@ -111,6 +113,7 @@ GENERATED = \
packaging/bin/dwh-prolog.sh \
packaging/services/ovirt-engine-dwhd/config.py \
packaging/services/ovirt-engine-dwhd/ovirt-engine-dwhd.conf \
packaging/services/ovirt-engine-dwhd/ovirt-engine-dwhd.py \
packaging/services/ovirt-engine-dwhd/ovirt-engine-dwhd.systemd \
packaging/services/ovirt-engine-dwhd/ovirt-engine-dwhd.sysv \
packaging/services/ovirt-engine-dwhd/ovirt_engine_dwh_watchdog.cron \
Expand Down
1 change: 1 addition & 0 deletions automation/build-artifacts-manual.packages.el8
10 changes: 10 additions & 0 deletions automation/build-artifacts.packages.el8
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
yum-utils
autoconf
make
python3-pyflakes
python3-pycodestyle
python3-devel
git
maven
java-11-openjdk-devel
ant
1 change: 1 addition & 0 deletions automation/check-merged.packages.el8
1 change: 1 addition & 0 deletions automation/check-patch.packages.el8
2 changes: 1 addition & 1 deletion build/shell-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ret="$(
case "${shell}" in
/bin/sh) shell="${VALIDATION_SHELL} ${EXTRA_ARGS}" ;;
/bin/bash) ;;
/usr/bin/python) skip=1 ;;
/usr/bin/python*) skip=1 ;;
*)
echo "ERROR: Unknown shell '${shell}' for '${f}'"
ret=1
Expand Down
3 changes: 3 additions & 0 deletions ovirt-engine-dwh.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,12 @@
%global use_python_bytecompile 1
%global _python_bytecompile_extra 0
%global with_python3 1
%define py_version 3
%else
%global use_python_bytecompile 0
%global _python_bytecompile_extra 1
%global with_python3 0
%define py_version 2
%endif

%if 0%{?rhel} >= 8
Expand Down Expand Up @@ -123,6 +125,7 @@ getent passwd %1 >/dev/null || useradd -r -u %2 -g %3 -c %5 -s /sbin/nologin -d
PYTHON_DIR=%{python2_sitelib} \\\
%{?with_python3: PYTHON3=%{__python3}} \\\
%{?with_python3: PYTHON3_DIR=%{python3_sitelib}} \\\
PY_VERSION=%{py_version} \\\
JAVA_DIR=%{_javadir} \\\
PKG_USER=%{engine_user} \\\
PKG_GROUP=%{engine_group} \\\
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python@PY_VERSION@

# Copyright 2012-2015 Red Hat
#
Expand Down
2 changes: 1 addition & 1 deletion stdci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
Distributions: ["el7"]
Distributions: ["el7", "el8"]
Release Branches:
master:
- ovirt-master

0 comments on commit 0ce67e2

Please sign in to comment.