[Tarantool-patches] [PATCH v2] build: enable CentOS 8 packaging

Alexander V. Tikhonov avtikhon at tarantool.org
Tue Nov 5 07:10:53 MSK 2019


Enabled packages build rules for CentOS 8.

For now CentOS 8 uses 'python2-' prefix for Python 2 modules
rather the 'python-', changed CentOS 8 packages installation
rules to use python2 packages instead of python.

Found that old packages like python-gevent and python-greenlet
were completely removed from CentOS 8. To fix it the sources
if these packages were downloaded from https://cbs.centos.org/
and rebuilt, to make them available the binaries were saved
at the PackageCloud packpack backport repository.

Met the issue with app-tap/pwd.test.lua test from the commit
7732daded14f86a314d44486e306e17bbc6ab293 (lua: treat ENOENT as
success in getpwall/getgrall), temporary blocked the test (till
the fix will be pushed) with the new issue:
https://github.com/tarantool/tarantool/issues/4592

Found that libunwind library couldn't be installed from dependecies
which was needed by backtrace feature. Decided to block it temporary
till it will be enabled by issue:
https://github.com/tarantool/tarantool/issues/4611

Added CentOS 8 into regular testing at gitlab-ci and travis-ci.

Closes #4543
---

Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-4543-centos8-full-ci
Issue: https://github.com/tarantool/tarantool/issues/4543

 .gitlab-ci.yml            |  6 ++++++
 .travis.yml               |  3 +++
 rpm/tarantool.spec        | 13 ++++++++++++-
 test/app-tap/pwd.skipcond | 11 +++++++++++
 4 files changed, 32 insertions(+), 1 deletion(-)
 create mode 100644 test/app-tap/pwd.skipcond

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index cd5f2806f..cf13c382e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -152,6 +152,12 @@ centos_7:
     OS: 'el'
     DIST: '7'
 
+centos_8:
+  <<: *deploy_test_definition
+  variables:
+    OS: 'el'
+    DIST: '8'
+
 fedora_28:
   <<: *deploy_test_definition
   variables:
diff --git a/.travis.yml b/.travis.yml
index db7d80bd2..d48ef39e0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -43,6 +43,9 @@ jobs:
       - name: "CentOS 7 build + test + deploy RPM"
         env: OS=el DIST=7
         if: branch = "master"
+      - name: "CentOS 8 build + test + deploy RPM"
+        env: OS=el DIST=8
+        if: branch = "master"
       - name: "Fedora 28 build + test + deploy RPM"
         env: OS=fedora DIST=28
         if: branch = "master"
diff --git a/rpm/tarantool.spec b/rpm/tarantool.spec
index b837214a6..416b4ebb4 100644
--- a/rpm/tarantool.spec
+++ b/rpm/tarantool.spec
@@ -63,12 +63,18 @@ BuildRequires: libunwind-devel
 %endif
 
 # For tests
-%if (0%{?fedora} >= 22 || 0%{?rhel} >= 7)
+%if (0%{?fedora} >= 22 || 0%{?rhel} == 7)
 BuildRequires: python >= 2.7
 BuildRequires: python-six >= 1.9.0
 BuildRequires: python-gevent >= 1.0
 BuildRequires: python-yaml >= 3.0.9
 %endif
+%if (0%{?rhel} >= 8)
+BuildRequires: python2 >= 2.7
+BuildRequires: python2-six >= 1.9.0
+BuildRequires: python2-gevent >= 1.0
+BuildRequires: python2-yaml >= 3.0.9
+%endif
 
 Name: tarantool
 # ${major}.${major}.${minor}.${patch}, e.g. 1.6.8.175
@@ -125,14 +131,19 @@ C and Lua/C modules.
 
 %build
 # RHBZ #1301720: SYSCONFDIR an LOCALSTATEDIR must be specified explicitly
+# gh-4611: temporary blocked the backtrace on CentOS 8 till completely enabled
 %cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo \
          -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=%{_localstatedir} \
          -DCMAKE_INSTALL_SYSCONFDIR:PATH=%{_sysconfdir} \
+%if (0%{?rhel} >= 8)
+         -DENABLE_BACKTRACE:BOOL=OFF \
+%else
 %if %{with backtrace}
          -DENABLE_BACKTRACE:BOOL=ON \
 %else
          -DENABLE_BACKTRACE:BOOL=OFF \
 %endif
+%endif
 %if %{with systemd}
          -DWITH_SYSTEMD:BOOL=ON \
          -DSYSTEMD_UNIT_DIR:PATH=%{_unitdir} \
diff --git a/test/app-tap/pwd.skipcond b/test/app-tap/pwd.skipcond
new file mode 100644
index 000000000..cebc6706c
--- /dev/null
+++ b/test/app-tap/pwd.skipcond
@@ -0,0 +1,11 @@
+import subprocess
+
+# Disabled at CentOS 8 build due to issue #4592.
+try:
+    if subprocess.check_output(["rpm --eval '%{centos_ver}'"], \
+            shell=True).strip() == '8':
+        self.skip = 1
+except:
+    pass
+
+# vim: set ft=python:
-- 
2.17.1



More information about the Tarantool-patches mailing list