Build RPM or Deb package using packpack - AnaNek/tarantool GitHub Wiki

Prerequisites

  • Linux (not sure about Mac OS X).
  • git.
  • docker.
  • packpack. Clone it somewhere outside tarantool repository:
mkdir ~/tools && cd ~/tools
git clone https://github.com/packpack/packpack

How to build RPM / DEB

  • Start docker:
    • OpenRC: /etc/init.d/docker restart or rc-service docker start.
    • systemd: systemctl start docker or service docker start.
  • Chance current directory to tarantool repository root.
  • Run build: OS=<...> DIST=<...> ~/tools/packpack/packpack.
  • Look for the built package in build/ directory.

List of currently supported OS / DIST values:

grep 'OS=\|DIST=' .travis.yml
grep 'OS:\|DIST:' .gitlab-ci.yml

At now (2020-01-21) it is:

OS=el DIST=6
OS=el DIST=7
OS=el DIST=8
OS=fedora DIST=28
OS=fedora DIST=29
OS=fedora DIST=30
OS=fedora DIST=31
OS=ubuntu DIST=trusty
OS=ubuntu DIST=xenial
OS=ubuntu DIST=bionic
OS=ubuntu DIST=cosmic
OS=ubuntu DIST=disco
OS=ubuntu DIST=eoan
OS=debian DIST=jessie
OS=debian DIST=stretch
OS=debian DIST=buster

Customization

Debug build

Default build type is RelWithDebInfo. The following patch changes it to Debug for CentOS and Fedora:

diff --git a/cmake/compiler.cmake b/cmake/compiler.cmake
index 887485c80..334cec0db 100644
--- a/cmake/compiler.cmake
+++ b/cmake/compiler.cmake
@@ -222,6 +222,7 @@ if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
 # Remove VALGRIND code and assertions in *any* type of release build.
     add_definitions("-DNDEBUG" "-DNVALGRIND")
 endif()
+add_definitions("-Wp,-U_FORTIFY_SOURCE")
 
 option(ENABLE_WERROR "Make all compiler warnings into errors" OFF)
 
diff --git a/rpm/tarantool.spec b/rpm/tarantool.spec
index 8bee71ed0..597947208 100644
--- a/rpm/tarantool.spec
+++ b/rpm/tarantool.spec
@@ -121,7 +121,7 @@ C and Lua/C modules.
 
 %build
 # RHBZ #1301720: SYSCONFDIR an LOCALSTATEDIR must be specified explicitly
-%cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+%cmake . -DCMAKE_BUILD_TYPE=Debug \
          -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=%{_localstatedir} \
          -DCMAKE_INSTALL_SYSCONFDIR:PATH=%{_sysconfdir} \
          -DENABLE_BUNDLED_LIBYAML:BOOL=OFF \

Disable tests

diff --git a/rpm/tarantool.spec b/rpm/tarantool.spec
index ff95ed646..c50713b49 100644
--- a/rpm/tarantool.spec
+++ b/rpm/tarantool.spec
@@ -166,7 +166,7 @@ echo "self.skip = True" > ./test/app/socket.skipcond
 # https://github.com/tarantool/tarantool/issues/1322
 echo "self.skip = True" > ./test/app/digest.skipcond
 # run a safe subset of the test suite
-cd test && ./test-run.py --force -j 1 unit/ app/ app-tap/ box/ box-tap/ engine/ vinyl/
+#cd test && ./test-run.py --force -j 1 unit/ app/ app-tap/ box/ box-tap/ engine/ vinyl/
 %endif
 
 %pre
⚠️ **GitHub.com Fallback** ⚠️