PackPack - tsafin/tarantool GitHub Wiki
PackPack is our tool to build RPM and Debian packages from git repository using Docker.
Key features of PackPack are:
- Fast reproducible builds using Docker containers.
- Semantic versioning based on annotated git tags.
- Support for all major Linux distributions as targets.
- Install git.
- Install Docker using instructions from docker.com.
-
Start docker:
- OpenRC:
/etc/init.d/docker restart
orrc-service docker start
. - systemd:
systemctl start docker
orservice docker start
.
- OpenRC:
-
Change current directory to tarantool repository root.
-
Clean the git repository:
cd path/to/tarantool git clean -f -x -d git submodule foreach git clean -f -x -d
-
Build a package:
-
Generally:
OS=<...> DIST=<...> path/to/packpack
-
(!!) For Tarantool:
OS=<...> DIST=<...> make -f .gitlab.mk package
-
-
Look for the built package in
build/
directory.
That is it. See README.md in packpack/packpack repo for additional details.
List of currently supported OS/DIST values:
$ for f in .github/workflows/*.yml; do \
OS="$(grep -o 'OS: [^$]*' "${f}" | cut -d: -f2 | sed "s/[' ]//g")"; \
DIST="$(grep -o 'DIST: [^$]*' "${f}" | cut -d: -f2 | sed "s/[' ]//g")"; \
if [ -n "${OS}" ] && [ -n "${DIST}" ]; then \
echo "OS=${OS} DIST=${DIST}"; \
fi; \
done | uniq
At now (2021-12-08) it is:
OS=el DIST=7
OS=el DIST=8
OS=debian DIST=buster
OS=debian DIST=bullseye
OS=debian DIST=stretch
OS=fedora DIST=30
OS=fedora DIST=31
OS=fedora DIST=32
OS=fedora DIST=33
OS=fedora DIST=34
OS=opensuse-leap DIST=15.1
OS=opensuse-leap DIST=15.2
OS=ubuntu DIST=xenial
OS=ubuntu DIST=bionic
OS=ubuntu DIST=focal
OS=ubuntu DIST=groovy
OS=ubuntu DIST=hirsute
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 b51832624..7bf9e3f40 100644
--- a/cmake/compiler.cmake
+++ b/cmake/compiler.cmake
@@ -253,6 +253,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 f83ce38cc..9726d7169 100644
--- a/rpm/tarantool.spec
+++ b/rpm/tarantool.spec
@@ -175,7 +175,7 @@ C and Lua/C modules.
%cmake \
%endif
-B . \
- -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+ -DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_LOCALSTATEDIR:PATH=%{_localstatedir} \
-DCMAKE_INSTALL_SYSCONFDIR:PATH=%{_sysconfdir} \
%if %{with backtrace}
diff --git a/rpm/tarantool.spec b/rpm/tarantool.spec
index f83ce38cc..10f6c8113 100644
--- a/rpm/tarantool.spec
+++ b/rpm/tarantool.spec
@@ -200,8 +200,8 @@ make %{?_smp_mflags}
# %%doc and %%license macroses are used instead
rm -rf %{buildroot}%{_datarootdir}/doc/tarantool/
-%check
-make test-force
+#%check
+#make test-force
%pre
/usr/sbin/groupadd -r tarantool > /dev/null 2>&1 || :