Commit 176170ff5bc37900e97666781cf298ef996d60c1
1 parent
5b535a5e
Exists in
master
and in
7 other branches
Added redis spec
Showing
1 changed file
with
165 additions
and
0 deletions
Show diff stats
| ... | ... | @@ -0,0 +1,165 @@ |
| 1 | + | |
| 2 | +Summary: redis | |
| 3 | +Name: redis | |
| 4 | +Version: 2.8.17 | |
| 5 | +Release: 1 | |
| 6 | +License: BSD | |
| 7 | +Group: Applications/Multimedia | |
| 8 | +URL: http://redis.io/ | |
| 9 | +Source0: redis-%{version}.tar.gz | |
| 10 | +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root | |
| 11 | +BuildRequires: gcc, make, systemd | |
| 12 | +%{?systemd_requires} | |
| 13 | +Requires(post): /usr/sbin/useradd | |
| 14 | +Provides: redis | |
| 15 | + | |
| 16 | +Packager: Alexandre Barbosa <alexandrealmeidabarbosa@gmail.com> | |
| 17 | + | |
| 18 | +%description | |
| 19 | +Redis is a key-value database. It is similar to memcached but the dataset is | |
| 20 | +not volatile, and values can be strings, exactly like in memcached, but also | |
| 21 | +lists and sets with atomic operations to push/pop elements. | |
| 22 | + | |
| 23 | +In order to be very fast but at the same time persistent the whole dataset is | |
| 24 | +taken in memory and from time to time and/or when a number of changes to the | |
| 25 | +dataset are performed it is written asynchronously on disk. You may lose the | |
| 26 | +last few queries that is acceptable in many applications but it is as fast | |
| 27 | +as an in memory DB (beta 6 of Redis includes initial support for master-slave | |
| 28 | +replication in order to solve this problem by redundancy). | |
| 29 | + | |
| 30 | +Compression and other interesting features are a work in progress. Redis is | |
| 31 | +written in ANSI C and works in most POSIX systems like Linux, *BSD, Mac OS X, | |
| 32 | +and so on. Redis is free software released under the very liberal BSD license. | |
| 33 | + | |
| 34 | + | |
| 35 | +%prep | |
| 36 | +%setup | |
| 37 | + | |
| 38 | +%{__cat} <<EOF >redis.logrotate | |
| 39 | +%{_localstatedir}/log/redis/*log { | |
| 40 | + missingok | |
| 41 | +} | |
| 42 | +EOF | |
| 43 | + | |
| 44 | +%{__cat} <<'EOF' >redis.service | |
| 45 | +[Unit] | |
| 46 | +Description=Redis | |
| 47 | + | |
| 48 | +[Service] | |
| 49 | +User=redis | |
| 50 | +WorkingDirectory=%{_localstatedir}/lib/redis | |
| 51 | +ExecStart=/usr/bin/redis-server %{_sysconfdir}/redis.conf | |
| 52 | +Restart=on-failure | |
| 53 | + | |
| 54 | +[Install] | |
| 55 | +WantedBy=multi-user.target | |
| 56 | +EOF | |
| 57 | + | |
| 58 | + | |
| 59 | +%build | |
| 60 | +%{__make} | |
| 61 | + | |
| 62 | +%install | |
| 63 | +%{__rm} -rf %{buildroot} | |
| 64 | +mkdir -p %{buildroot}%{_bindir} | |
| 65 | +%{__install} -Dp -m 0755 src/redis-server %{buildroot}%{_bindir}/redis-server | |
| 66 | +%{__install} -Dp -m 0755 src/redis-benchmark %{buildroot}%{_bindir}/redis-benchmark | |
| 67 | +%{__install} -Dp -m 0755 src/redis-cli %{buildroot}%{_bindir}/redis-cli | |
| 68 | + | |
| 69 | +%{__install} -Dp -m 0755 redis.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/redis | |
| 70 | +%{__install} -Dp -m 0755 redis.service %{buildroot}%{_unitdir}/redis.service | |
| 71 | +%{__install} -Dp -m 0644 redis.conf %{buildroot}%{_sysconfdir}/redis.conf | |
| 72 | +%{__install} -p -d -m 0755 %{buildroot}%{_localstatedir}/lib/redis | |
| 73 | +%{__install} -p -d -m 0755 %{buildroot}%{_localstatedir}/log/redis | |
| 74 | + | |
| 75 | +%pre | |
| 76 | +/usr/sbin/useradd --system --shell /sbin/nologin --home-dir %{_localstatedir}/lib/redis redis 2> /dev/null || : | |
| 77 | + | |
| 78 | +%preun | |
| 79 | +%systemd_preun redis.service | |
| 80 | + | |
| 81 | +%postun | |
| 82 | +%systemd_postun redis.service | |
| 83 | +/usr/sbin/userdel redis 2> /dev/null || : | |
| 84 | +/usr/sbin/groupdel redis 2> /dev/null || : | |
| 85 | + | |
| 86 | +%post | |
| 87 | +%systemd_post redis.service | |
| 88 | +sed -i 's/# bind 127.0.0.1/bind 127.0.0.1/' %{_sysconfdir}/redis.conf | |
| 89 | + | |
| 90 | +%clean | |
| 91 | +%{__rm} -rf %{buildroot} | |
| 92 | + | |
| 93 | +%files | |
| 94 | +%defattr(-,root,root,0755) | |
| 95 | +%{_bindir}/redis-server | |
| 96 | +%{_bindir}/redis-benchmark | |
| 97 | +%{_bindir}/redis-cli | |
| 98 | +%{_unitdir}/redis.service | |
| 99 | +%config(noreplace) %{_sysconfdir}/redis.conf | |
| 100 | +%{_sysconfdir}/logrotate.d/redis | |
| 101 | +%dir %attr(0770,redis,redis) %{_localstatedir}/lib/redis | |
| 102 | +%dir %attr(0755,redis,redis) %{_localstatedir}/log/redis | |
| 103 | + | |
| 104 | +%changelog | |
| 105 | +* Mon Nov 10 2014 - update for redis-2.8.17 | |
| 106 | +- update preamble | |
| 107 | +- change redis-server, redis-benchmark and redis-cli location | |
| 108 | +- enable daemonize in redis.conf | |
| 109 | + | |
| 110 | +* Tue Jul 13 2010 - jay at causes dot com 2.0.0-rc2 | |
| 111 | +- upped to 2.0.0-rc2 | |
| 112 | + | |
| 113 | +* Mon May 24 2010 - jay at causes dot com 1.3.9-2 | |
| 114 | +- moved pidfile back to /var/run/redis/redis.pid, so the redis | |
| 115 | + user can write to the pidfile. | |
| 116 | +- Factored it out into %{pid_dir} (/var/run/redis), and | |
| 117 | + %{pid_file} (%{pid_dir}/redis.pid) | |
| 118 | + | |
| 119 | + | |
| 120 | +* Wed May 05 2010 - brad at causes dot com 1.3.9-1 | |
| 121 | +- redis updated to version 1.3.9 (development release from GitHub) | |
| 122 | +- extract config file from spec file | |
| 123 | +- move pid file from /var/run/redis/redis.pid to just /var/run/redis.pid | |
| 124 | +- move init file to /etc/init.d/ instead of /etc/rc.d/init.d/ | |
| 125 | + | |
| 126 | +* Fri Sep 11 2009 - jpriebe at cbcnewmedia dot com 1.0-1 | |
| 127 | +- redis updated to version 1.0 stable | |
| 128 | + | |
| 129 | +* Mon Jun 01 2009 - jpriebe at cbcnewmedia dot com 0.100-1 | |
| 130 | +- Massive redis changes in moving from 0.09x to 0.100 | |
| 131 | +- removed log timestamp patch; this feature is now part of standard release | |
| 132 | + | |
| 133 | +* Tue May 12 2009 - jpriebe at cbcnewmedia dot com 0.096-1 | |
| 134 | +- A memory leak when passing more than 16 arguments to a command (including | |
| 135 | + itself). | |
| 136 | +- A memory leak when loading compressed objects from disk is now fixed. | |
| 137 | + | |
| 138 | +* Mon May 04 2009 - jpriebe at cbcnewmedia dot com 0.094-2 | |
| 139 | +- Patch: applied patch to add timestamp to the log messages | |
| 140 | +- moved redis-server to /usr/sbin | |
| 141 | +- set %config(noreplace) on redis.conf to prevent config file overwrites | |
| 142 | + on upgrade | |
| 143 | + | |
| 144 | +* Fri May 01 2009 - jpriebe at cbcnewmedia dot com 0.094-1 | |
| 145 | +- Bugfix: 32bit integer overflow bug; there was a problem with datasets | |
| 146 | + consisting of more than 20,000,000 keys resulting in a lot of CPU usage | |
| 147 | + for iterated hash table resizing. | |
| 148 | + | |
| 149 | +* Wed Apr 29 2009 - jpriebe at cbcnewmedia dot com 0.093-2 | |
| 150 | +- added message to init.d script to warn user that shutdown may take a while | |
| 151 | + | |
| 152 | +* Wed Apr 29 2009 - jpriebe at cbcnewmedia dot com 0.093-1 | |
| 153 | +- version 0.093: fixed bug in save that would cause a crash | |
| 154 | +- version 0.092: fix for bug in RANDOMKEY command | |
| 155 | + | |
| 156 | +* Fri Apr 24 2009 - jpriebe at cbcnewmedia dot com 0.091-3 | |
| 157 | +- change permissions on /var/log/redis and /var/run/redis to 755; this allows | |
| 158 | + non-root users to check the service status and to read the logs | |
| 159 | + | |
| 160 | +* Wed Apr 22 2009 - jpriebe at cbcnewmedia dot com 0.091-2 | |
| 161 | +- cleanup of temp*rdb files in /var/lib/redis after shutdown | |
| 162 | +- better handling of pid file, especially with status | |
| 163 | + | |
| 164 | +* Tue Apr 14 2009 - jpriebe at cbcnewmedia dot com 0.091-1 | |
| 165 | +- Initial release. | ... | ... |