ae13a40e |
Summary: advanced key-value store
Name: redis |
ce1d37c7 |
Version: 4.0.11
Release: 1%{?dist} |
ae13a40e |
License: BSD
URL: http://redis.io/
Group: Applications/Databases
Vendor: VMware, Inc.
Distribution: Photon
Source0: http://download.redis.io/releases/%{name}-%{version}.tar.gz |
ce1d37c7 |
%define sha1 redis=a13ccf0f7051f82dc1c979bd94f0b9a9ba039122 |
18ecfa67 |
Patch0: redis-conf.patch |
ae13a40e |
BuildRequires: gcc |
eea51dea |
BuildRequires: systemd |
ae13a40e |
BuildRequires: make |
ce1d37c7 |
BuildRequires: which
BuildRequires: tcl
BuildRequires: tcl-devel |
eea51dea |
Requires: systemd |
7f9d2e12 |
Requires(pre): /usr/sbin/useradd /usr/sbin/groupadd |
212f651c |
|
ae13a40e |
%description
Redis is an in-memory data structure store, used as database, cache and message broker.
%prep
%setup -q |
18ecfa67 |
%patch0 -p1 |
ae13a40e |
%build
make %{?_smp_mflags}
%install
install -vdm 755 %{buildroot}
make PREFIX=%{buildroot}/usr install |
eea51dea |
install -D -m 0640 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}.conf |
18ecfa67 |
mkdir -p %{buildroot}/var/lib/redis |
212f651c |
mkdir -p %{buildroot}/var/log
mkdir -p %{buildroot}/var/opt/%{name}/log
ln -sfv /var/opt/%{name}/log %{buildroot}/var/log/%{name} |
eea51dea |
mkdir -p %{buildroot}/usr/lib/systemd/system
cat << EOF >> %{buildroot}/usr/lib/systemd/system/redis.service
[Unit]
Description=Redis in-memory key-value database
After=network.target
[Service]
ExecStart=/usr/bin/redis-server /etc/redis.conf --daemonize no |
18ecfa67 |
ExecStop=/usr/bin/redis-cli shutdown |
eea51dea |
User=redis
Group=redis
[Install]
WantedBy=multi-user.target
EOF |
ae13a40e |
%check |
ce1d37c7 |
make check |
eea51dea |
%pre
getent group %{name} &> /dev/null || \
groupadd -r %{name} &> /dev/null
getent passwd %{name} &> /dev/null || \
useradd -r -g %{name} -d %{_sharedstatedir}/%{name} -s /sbin/nologin \
-c 'Redis Database Server' %{name} &> /dev/null
exit 0
%post
/sbin/ldconfig
%systemd_post redis.service |
ae13a40e |
%postun |
eea51dea |
/sbin/ldconfig
%systemd_postun_with_restart redis.service
|
ae13a40e |
%files
%defattr(-,root,root) |
18ecfa67 |
%dir %attr(0750, redis, redis) /var/lib/redis |
212f651c |
%dir %attr(0750, redis, redis) /var/opt/%{name}/log
%attr(0750, redis, redis) %{_var}/log/%{name} |
ae13a40e |
%{_bindir}/* |
eea51dea |
%{_libdir}/systemd/*
%config(noreplace) %attr(0640, %{name}, %{name}) %{_sysconfdir}/redis.conf |
ae13a40e |
%changelog |
ce1d37c7 |
* Tue Sep 11 2018 Keerthana K <keerthanak@vmware.com> 4.0.11-1
- Updated to version 4.0.11. |
212f651c |
* Thu Dec 28 2017 Divya Thaluru <dthaluru@vmware.com> 3.2.8-5
- Fixed the log file directory structure |
7f9d2e12 |
* Mon Sep 18 2017 Alexey Makhalov <amakhalov@vmware.com> 3.2.8-4
- Remove shadow from requires and use explicit tools for post actions
* Wed May 31 2017 Siju Maliakkal <smaliakkal@vmware.com> 3.2.8-3
- Fix DB persistence,log file,grace-ful shutdown issues
* Tue May 16 2017 Siju Maliakkal <smaliakkal@vmware.com> 3.2.8-2
- Added systemd service unit
* Wed Apr 5 2017 Siju Maliakkal <smaliakkal@vmware.com> 3.2.8-1
- Updating to latest version
* Mon Oct 3 2016 Dheeraj Shetty <dheerajs@vmware.com> 3.2.4-1
- initial version |