Blob Blame History Raw
BuildRequires: cmake >= 2.8
BuildRequires: gcc >= 4.5
BuildRequires: gcc-c++ >= 4.5
BuildRequires: coreutils
BuildRequires: sed
BuildRequires: readline-devel
BuildRequires: libyaml-devel
BuildRequires: openssl-devel
BuildRequires: msgpuck-devel >= 1.1
BuildRequires: perl-podlators
Requires(pre): %{_sbindir}/useradd
Requires(pre): %{_sbindir}/groupadd

Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
BuildRequires: systemd

# For tests
BuildRequires: python >= 2.7
BuildRequires: python-six >= 1.9.0
BuildRequires: python-gevent >= 1.0
BuildRequires: python-yaml >= 3.0.9

Name: tarantool
Version: 1.6.9.52
Release: 1%{?dist}
Group: Applications/Databases
Summary: In-memory database and Lua application server
License: BSD
# Add dependency on network configuration files used by `socket` module
# https://github.com/tarantool/tarantool/issues/1794
Requires: /etc/protocols
Requires: /etc/services
URL: http://tarantool.org
Source0: http://download.tarantool.org/tarantool/1.6/src/tarantool-%{version}.tar.gz
ExclusiveArch: %{ix86} x86_64 armv7hl armv7hnl aarch64
%description
Tarantool is a high performance in-memory NoSQL database and Lua
application server. Tarantool supports replication, online backup and
stored procedures in Lua.

This package provides the server daemon and admin tools.

%package devel
Summary: Server development files for %{name}
Group: Applications/Databases
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
Tarantool is a high performance in-memory NoSQL database and Lua
application server. Tarantool supports replication, online backup and
stored procedures in Lua.

This package provides server development files needed to create
C and Lua/C modules.

%prep
%setup -q -n %{name}-%{version}

%build
# RHBZ #1301720: SYSCONFDIR an LOCALSTATEDIR must be specified explicitly
%cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo \
         -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=%{_localstatedir} \
         -DCMAKE_INSTALL_SYSCONFDIR:PATH=%{_sysconfdir} \
         -DENABLE_BUNDLED_LIBYAML:BOOL=OFF \
         -DENABLE_BUNDLED_MSGPUCK:BOOL=OFF \
         -DENABLE_BACKTRACE:BOOL=OFF \
         -DWITH_SYSTEMD:BOOL=ON \
         -DSYSTEMD_UNIT_DIR:PATH=%{_unitdir} \
         -DSYSTEMD_TMPFILES_DIR:PATH=%{_tmpfilesdir} \
         -DENABLE_DIST:BOOL=ON
make %{?_smp_mflags}

%install
%make_install
# %%doc and %%license macroses are used instead
rm -rf %{buildroot}%{_datarootdir}/doc/tarantool/

%check
# https://github.com/tarantool/tarantool/issues/1227
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 unit/ app/ app-tap/ box/ box-tap/ engine/ sophia/

%pre
/usr/sbin/groupadd -r tarantool > /dev/null 2>&1 || :
/usr/sbin/useradd -M -N -g tarantool -r -d /var/lib/tarantool -s /sbin/nologin\
    -c "Tarantool Server" tarantool > /dev/null 2>&1 || :

%post
%tmpfiles_create tarantool.conf
%systemd_post tarantool@.service

%preun
%systemd_preun tarantool@.service

%postun
%systemd_postun_with_restart tarantool@.service

%files
%{_bindir}/tarantool
%{_mandir}/man1/tarantool.1*
%doc README.md
%license LICENSE AUTHORS
# tarantool package should own module directories
%dir %{_libdir}/tarantool
%dir %{_datadir}/tarantool

%{_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
%{_unitdir}/tarantool@.service
%{_tmpfilesdir}/tarantool.conf

%files devel
%dir %{_includedir}/tarantool
%{_includedir}/tarantool/lauxlib.h
%{_includedir}/tarantool/luaconf.h
%{_includedir}/tarantool/lua.h
%{_includedir}/tarantool/lua.hpp
%{_includedir}/tarantool/luajit.h
%{_includedir}/tarantool/lualib.h
%{_includedir}/tarantool/module.h

%changelog
* Sat Dec 17 2016 Roman Tsisyk <roman@tarantool.org> 1.6.9.52-1
- Fix CVE-2016-9036 and CVE-2016-9037.

* Wed Sep 28 2016 Roman Tsisyk <roman@tarantool.org> 1.6.9.11-1
 - Add dependency on network configuration files used by `socket` module

* Mon Sep 26 2016 Roman Tsisyk <roman@tarantool.org> 1.6.9.1-1
 - Tab-based autocompletion in the interactive console
 - LUA_PATH and LUA_CPATH environment variables taken into account
 - A new box.cfg { read_only = true } option
 - Upgrade script for 1.6.4 -> 1.6.8 -> 1.6.9
 - Bugs fixed:
   https://github.com/tarantool/tarantool/issues?q=milestone%3A1.6.9+is%3Aclosed

* Thu Sep 01 2016 Roman Tsisyk <roman@tarantool.org> 1.6.8.762-1
- Add support for OpenSSL 1.1

* Sun Feb 28 2016 Roman Tsisyk <roman@tarantool.org> 1.6.8.530-2
- Add ExclusiveArch (#1293100)

* Sat Feb 27 2016 Roman Tsisyk <roman@tarantool.org> 1.6.8.530-1
- Update to the latest 1.6.8 release
- Add missing gcc-g++ BuildRequires

* Fri Feb 19 2016 Roman Tsisyk <roman@tarantool.org> 1.6.8.508-1
- Fix stack overflow in Sophia on armv7l

* Thu Feb 18 2016 Roman Tsisyk <roman@tarantool.org> 1.6.8.504-1
- tarantool package now owns module directories

* Tue Feb 09 2016 Roman Tsisyk <roman@tarantool.org> 1.6.8.462-1
- Enable tests

* Fri Feb 05 2016 Roman Tsisyk <roman@tarantool.org> 1.6.8.451-1
- Add coreutils, make and sed to BuildRequires

* Wed Feb 03 2016 Roman Tsisyk <roman@tarantool.org> 1.6.8.433-1
- Obsolete tarantool-common package

* Thu Jan 21 2016 Roman Tsisyk <roman@tarantool.org> 1.6.8.376-1
- Implement proper support of multi-instance management using systemd

* Sat Jan 9 2016 Roman Tsisyk <roman@tarantool.org> 1.6.8.0-1
- Change naming scheme to include a postrelease number to Version
- Fix arch-specific paths in tarantool-common
- Rename tarantool-dev to tarantool-devel
- Use system libyaml
- Remove Vendor
- Remove SCL support
- Remove devtoolkit support
- Remove Lua scripts
- Remove quotes from %%files
- Disable hardening to fix backtraces
- Fix permissions for tarantoolctl directories
- Comply with http://fedoraproject.org/wiki/Packaging:DistTag
- Comply with http://fedoraproject.org/wiki/Packaging:LicensingGuidelines
- Comply with http://fedoraproject.org/wiki/Packaging:Tmpfiles.d
- Comply with the policy for log files
- Comply with the policy for man pages
- Other changes according to #1293100 review

* Tue Apr 28 2015 Roman Tsisyk <roman@tarantool.org> 1.6.5.0-1
- Remove sql-module, pg-module, mysql-module

* Fri Jun 06 2014 Eugine Blikh <bigbes@tarantool.org> 1.6.3.0-1
- Add SCL support
- Add --with support
- Add dependencies

* Mon May 20 2013 Dmitry Simonenko <support@tarantool.org> 1.5.1.0-1
- Initial version of the RPM spec