Skip to content

Commit

Permalink
ci: remove tarantoolctl from deb and rpm
Browse files Browse the repository at this point in the history
tarantoolctl has been removed from packages.
Systemd, sysvinit and logrotate scripts
based on it were also removed.
All this functionality is covered by the tt utility.

Part of tarantool#9443

NO_DOC=CI
NO_TEST=CI
NO_CHANGELOG=CI
  • Loading branch information
0x501D committed Dec 25, 2023
1 parent 17e9c6f commit 58be9d6
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 112 deletions.
20 changes: 0 additions & 20 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,12 @@
VERSION := $(shell dpkg-parsechangelog|grep ^Version|awk '{print $$2}')
UVERSION := $(shell echo $(VERSION)|sed 's/-[[:digit:]]\+$$//')

ifneq ($(wildcard /usr/bin/dh_systemd_start),)
WITH_SYSTEMD:=ON
else
WITH_SYSTEMD:=OFF
endif

DEB_CMAKE_EXTRA_FLAGS := \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_LIBDIR=lib/$(DEB_HOST_MULTIARCH) \
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
-DCMAKE_INSTALL_LOCALSTATEDIR=/var \
-DENABLE_DIST=ON \
-DWITH_SYSVINIT=ON \
-DWITH_SYSTEMD=$(WITH_SYSTEMD)

# Append -DLUAJIT_ENABLE_GC64=ON flag if ${GC64} env variable is 'true'.
ifeq ($(GC64), true)
Expand All @@ -28,12 +20,7 @@ ifneq ($(MAKE_CHECK), false)
DEB_MAKE_CHECK_TARGET := test-force
endif

# Install tarantool.service within tarantool-common package, but does not
# install it within tarantool and tarantool-dev packages.
DEB_DH_INSTALLINIT_ARGS := --name=tarantool
DEB_DH_SYSTEMD_ENABLE_ARGS_tarantool := --name=tarantool
DEB_DH_SYSTEMD_ENABLE_ARGS_tarantool-common := --name=tarantool tarantool.service
DEB_DH_SYSTEMD_START_ARGS_tarantool-common := --no-restart-on-upgrade tarantool.service

# Needed for proper backtraces in fiber.info()
DEB_DH_STRIP_ARGS := -X/usr/bin/tarantool
Expand All @@ -43,13 +30,6 @@ include /usr/share/dpkg/buildflags.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/cmake.mk

debian/tarantool-common.install:
ifneq ($(wildcard /usr/bin/dh_systemd_start),)
cp -p debian/tarantool-common.install.systemd.in $@
else
cp -p debian/tarantool-common.install.sysvinit.in $@
endif

build-indep: debian/tarantool-common.install

tarball: clean
Expand Down
5 changes: 0 additions & 5 deletions debian/tarantool-common.dirs

This file was deleted.

9 changes: 0 additions & 9 deletions debian/tarantool-common.install.systemd.in

This file was deleted.

5 changes: 0 additions & 5 deletions debian/tarantool-common.install.sysvinit.in

This file was deleted.

1 change: 0 additions & 1 deletion debian/tarantool-common.lintian-overrides

This file was deleted.

1 change: 0 additions & 1 deletion debian/tarantool-common.tarantool.init

This file was deleted.

1 change: 0 additions & 1 deletion debian/tarantool.service

This file was deleted.

70 changes: 0 additions & 70 deletions rpm/tarantool.spec
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
# Enable systemd for on RHEL >= 7 and Fedora >= 15
%if (0%{?fedora} >= 15 || 0%{?rhel} >= 7)
%bcond_without systemd
%else
%bcond_with systemd
%endif

# XXX: There is an old CMake (2.8.12) provided by cmake package in
# main CentOS 7 repositories. At the same time, there is a newer
# package cmake3 providing CMake 3+ from EPEL repository. So, one
Expand Down Expand Up @@ -49,18 +42,6 @@ Requires(pre): %{_sbindir}/groupadd
BuildRequires: zlib-devel
Requires: zlib

%if %{with systemd}
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
BuildRequires: systemd
%else
Requires(post): chkconfig
Requires(post): initscripts
Requires(preun): chkconfig
Requires(preun): initscripts
%endif

#
# Disable stripping of /usr/bin/tarantool to allow the debug symbols
# in runtime. Tarantool uses the debug symbols to display fiber's stack
Expand Down Expand Up @@ -162,10 +143,6 @@ C and Lua/C modules.
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_LOCALSTATEDIR:PATH=%{_localstatedir} \
-DCMAKE_INSTALL_SYSCONFDIR:PATH=%{_sysconfdir} \
%if %{with systemd}
-DWITH_SYSTEMD:BOOL=ON \
-DSYSTEMD_UNIT_DIR:PATH=%{_unitdir} \
-DSYSTEMD_TMPFILES_DIR:PATH=%{_tmpfilesdir} \
%endif
%if 0%{?fedora} >= 33
-DENABLE_LTO=ON \
Expand All @@ -192,60 +169,13 @@ make test-force
/usr/sbin/useradd -M %{?rhel:-N} -g tarantool -r -d /var/lib/tarantool -s /sbin/nologin\
-c "Tarantool Server" tarantool > /dev/null 2>&1 || :

%post
%if %{with systemd}
%tmpfiles_create tarantool.conf
%systemd_post tarantool@.service
%else
chkconfig --add tarantool || :
%endif

%preun
%if %{with systemd}
%systemd_preun tarantool@.service
%else
if [ $1 -eq 0 ] ; then # uninstall
service tarantool stop || :
chkconfig --del tarantool || :
fi
%endif

%postun
%if %{with systemd}
%systemd_postun_with_restart tarantool@.service
%endif

%files
%{_bindir}/tarantool
%{_mandir}/man1/tarantool.1*
%doc README.md
%{!?_licensedir:%global license %doc}
%license LICENSE AUTHORS

%{_bindir}/tarantoolctl
%{_mandir}/man1/tarantoolctl.1*
%config(noreplace) %{_sysconfdir}/sysconfig/tarantool
%dir %{_sysconfdir}/tarantool
%dir %{_sysconfdir}/tarantool/instances.available
%config(noreplace) %{_sysconfdir}/tarantool/instances.available/example.lua
# Use 0750 for database files
%attr(0750,tarantool,tarantool) %dir %{_localstatedir}/lib/tarantool/
%attr(0750,tarantool,tarantool) %dir %{_localstatedir}/log/tarantool/
%config(noreplace) %{_sysconfdir}/logrotate.d/tarantool
# tarantool package should own module directories
%dir %{_libdir}/tarantool
%dir %{_datadir}/tarantool
%{_datadir}/tarantool/luarocks

%if %{with systemd}
%{_unitdir}/tarantool@.service
%{_tmpfilesdir}/tarantool.conf
%else
%{_sysconfdir}/init.d/tarantool
%dir %{_sysconfdir}/tarantool/instances.enabled
%attr(-,tarantool,tarantool) %dir %{_localstatedir}/run/tarantool/
%endif

%files devel
%dir %{_includedir}/tarantool
%{_includedir}/tarantool/lauxlib.h
Expand Down

0 comments on commit 58be9d6

Please sign in to comment.