Accepting request 294143 from server:database

1

OBS-URL: https://build.opensuse.org/request/show/294143
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/redis?expand=0&rev=18
This commit is contained in:
Dominique Leuenberger 2015-04-03 12:34:44 +00:00 committed by Git OBS Bridge
commit 1849fba7f7
10 changed files with 204 additions and 21 deletions

29
README.SUSE Normal file
View File

@ -0,0 +1,29 @@
README.SUSE
-------------
1. copy /etc/redis/default.conf.example to /etc/redis/default.conf (or
/etc/redis/otherapp.conf and so on) For the example we will use
otherapp.conf
2. change at least pidfile, logfile and dir setting
# the pid file *has* to match your config filename without the ".conf"
pidfile /var/run/redis/otherapp.pid
logfile /var/log/redis/otherapp.log
dir /var/lib/redis/otherapp/
If you want to run more than one instance you also have to change the
socket path and/or the ip:port combination.
Also make sure if you copy configurations from somewhere, that "daemonize"
should be set to "no".
3. create the database dir:
$ install -d -m redis -g redis -m 0750 /var/lib/redis/otherapp/
4. systemctl start redis@otherapp
5. systemctl enable redis@otherapp
6. to interact with all instances at the same time use:
systemctl restart redis.target
systemctl stop redis.target

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:aa86eab586e4133728396273b671efae35dd70bdcc746e4e3f986e7600d0050d
size 1254077

3
redis-3.0.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:654c95c6236692dcb916fccba9a34d0877cc91338c8b6a372511e6eb080e34bf
size 1358081

View File

@ -2,12 +2,11 @@ Index: src/config.h
===================================================================
--- src/config.h.orig
+++ src/config.h
@@ -57,9 +57,11 @@
#endif
@@ -63,8 +63,10 @@
/* Test for backtrace() */
#if defined(__APPLE__) || (defined(__linux__) && defined(__GLIBC__))
+#if defined(__i386__) || defined(__x86_64__) || defined(__ia64__)
#if defined(__APPLE__) || defined(__linux__)
#define HAVE_BACKTRACE 1
#endif
+#endif

View File

@ -1,3 +1,84 @@
-------------------------------------------------------------------
Thu Apr 2 11:07:42 UTC 2015 - mrueckert@suse.de
- update to 3.0.0
>> What's new in Redis 3.0 compared to Redis 2.8?
* Redis Cluster: a distributed implementation of a subset of Redis.
* New "embedded string" object encoding resulting in less cache
misses. Big speed gain under certain work loads.
* AOF child -> parent final data transmission to minimize latency
due to "last write" during AOF rewrites.
* Much improved LRU approximation algorithm for keys eviction.
* WAIT command to block waiting for a write to be transmitted
to the specified number of slaves.
* MIGRATE connection caching. Much faster keys migraitons.
* MIGARTE new options COPY and REPLACE.
* CLIENT PAUSE command: stop processing client requests for a
specified amount of time.
* BITCOUNT performance improvements.
* CONFIG SET accepts memory values in different units (for
example you can use "CONFIG SET maxmemory 1gb").
* Redis log format slightly changed reporting in each line the
role of the instance (master/slave) or if it's a saving child
log.
* INCR performance improvements.
>> Refactoring changes (no new features nor bug fixes)
* Blocking operations full refactoring (blocked.c)
* Client output buffer memory tracking refactored.
for all the details see
/usr/share/doc/packages/redis/00-RELEASENOTES
- refreshed redis-enable-bactrace-on-x86-and-ia64-only.patch to
apply cleanly
-------------------------------------------------------------------
Wed Apr 1 16:31:16 UTC 2015 - mrueckert@suse.de
- make sure we do not daemonize
-------------------------------------------------------------------
Wed Apr 1 15:57:59 UTC 2015 - mrueckert@suse.de
- finished systemd support
-------------------------------------------------------------------
Mon Mar 30 19:16:52 UTC 2015 - mrueckert@suse.de
- update to 2.8.19
- Don't log admin commands in MONITOR. (antirez)
- List of commands flagged as admin commands modified. (antirez)
- Lua cmsgpack lib updated to latest version. (antirez)
- Add symlink to redis-sentinel during make install (Rhommel
Lamas)
- SORT: Don't sort Set elements if not needed. (antirez)
- Fix zero-ordering SORT when called against lists (Matt
Stancliff)
- Update redis_init_script.tpl (Ben Dowling)
- FIXED redis-benchmark's idle mode.With idle mode shouldn't
create write event (zhanghailei)
- zipmap.c: update comments above (Sun He)
- replaced // comments #2150 (Deepak Verma)
- redis-benchmark AUTH command to be discarded after the first
send #2150 (azure provisioned user)
- sds.c: Correct two spelling mistakes in comments (Sun He)
- sds.c/sdscatvprintf: set va_end to finish va_list cpy (Sun He)
- sds.c: Correct some comments (Sun He)
- Update whatisdoing.sh (Serghei Iakovlev)
- Include stropts only if __sun is defined. (antirez)
- Fix implicit declaration of ioctl on Solaris (Jan-Erik Rediger)
- Silence _BSD_SOURCE warnings in glibc 2.20 and forward (Johan
Bergström)
- Mark whatisdoing.sh as deprecated in top-comment. (antirez)
- getting pid fixes (Serghei Iakovlev)
- sparkline.c: AddSample skip Empty label (Sun He)
- sparkline.c: mov label-ini into the AddSample Function (Sun He)
- Only ignore sigpipe in interactive mode (Jan-Erik Rediger)
- Simplify lua_cmsgpack macro and fix build on old Linux distros.
(antirez)
-------------------------------------------------------------------
Thu Feb 12 07:41:34 UTC 2015 - lang@b1-systems.de

View File

@ -15,13 +15,18 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%if 0%{?suse_version} > 1230
%bcond_without systemd
%else
%bcond_with systemd
%endif
%define _data_dir %{_localstatedir}/lib/%{name}
%define _log_dir %{_localstatedir}/log/%{name}
%define _conf_dir %{_sysconfdir}/%{name}
Name: redis
Version: 2.8.18
Version: 3.0.0
Release: 0
Summary: Persistent key-value database
License: BSD-3-Clause
@ -29,7 +34,10 @@ Group: Productivity/Databases/Servers
Url: http://redis.io/
Source: http://download.redis.io/releases/redis-%{version}.tar.gz
Source1: %{name}.logrotate
Source4: redis.sysconfig
Source2: redis.target
Source3: redis@.service
Source4: redis.tmpfiles.d
Source5: README.SUSE
# PATCH-FIX-OPENSUSE -- openSUSE-style init script
Patch0: %{name}-initscript.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
@ -37,6 +45,12 @@ Patch1: %{name}-conf.patch
Patch2: redis-enable-bactrace-on-x86-and-ia64-only.patch
BuildRequires: procps
BuildRequires: tcl
%if %{with systemd}
BuildRequires: pkgconfig(systemd)
%{?systemd_requires}
%else
PreReq: %{insserv_prereq} %{fillup_prereq}
%endif
Requires: logrotate
Requires: sudo
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -59,22 +73,37 @@ different kind of sorting abilities.
make %{?_smp_mflags} CFLAGS="%{optflags}" V=1
%install
install -d %{buildroot}%{_log_dir} %{buildroot}%{_data_dir} %{buildroot}%{_conf_dir}
install -d %{buildroot}%{_log_dir}/default %{buildroot}%{_data_dir}/default
install -m 0750 -d \
%{buildroot}%{_log_dir} \
%{buildroot}%{_data_dir} \
%{buildroot}%{_conf_dir} \
%{buildroot}%{_log_dir}/default \
%{buildroot}%{_data_dir}/default
install -D -m 0755 src/redis-benchmark %{buildroot}%{_bindir}/redis-benchmark
install -m 0755 src/redis-cli %{buildroot}%{_bindir}/redis-cli
install -m 0755 src/redis-check-dump %{buildroot}%{_bindir}/redis-check-dump
install -m 0755 src/redis-check-aof %{buildroot}%{_bindir}/redis-check-aof
install -m 0755 src/redis-cli %{buildroot}%{_bindir}/redis-cli
install -m 0755 src/redis-check-dump %{buildroot}%{_bindir}/redis-check-dump
install -m 0755 src/redis-check-aof %{buildroot}%{_bindir}/redis-check-aof
install -D -m 0755 src/redis-server %{buildroot}%{_sbindir}/redis-server
%if %{with systemd}
perl -p -i -e 's|daemonize yes|daemonize no|g' redis.conf
%endif
install -D -m 0640 redis.conf %{buildroot}%{_conf_dir}/default.conf.example
#
# init
#
%if %{with systemd}
install -D -m 0644 %{S:2} %{buildroot}%{_unitdir}/redis.target
install -D -m 0644 %{S:3} %{buildroot}%{_unitdir}/redis@.service
install -D -m 0644 %{S:4} %{buildroot}/usr/lib/tmpfiles.d/%{name}.conf
%{__ln_s} -f %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
cp %{S:5} README.SUSE
%else
install -D -m 0755 utils/redis_init_script %{buildroot}%{_sysconfdir}/init.d/redis
ln -s %{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name}
%endif
#
# logrotate
@ -95,21 +124,36 @@ make test && true
%pre
/usr/sbin/groupadd -r %{name} >/dev/null 2>&1 || :
/usr/sbin/useradd -g %{name} -s /bin/false -r -c "User for Redis key-value store" -d %{_data_dir} %{name} >/dev/null 2>&1 || :
%if %{with systemd}
%service_add_pre %{name}.target
%endif
%post
%fillup_and_insserv %{name}
%restart_on_update %{name}
%if %{with systemd}
systemd-tmpfiles --create /usr/lib/tmpfiles.d/%{name}.conf || true
%service_add_post %{name}.target
echo "See /usr/share/doc/packages/redis/README.SUSE to continue"
%else
echo "To start the database server, create your configuration"
echo "starting from /etc/redis/default.conf.example, place it"
echo "in /etc/redis and do: "
echo " sudo rcredis start; sudo chkconfig redis on"
%endif
%preun
%if %{with systemd}
%service_del_preun %{name}.target
%else
%stop_on_removal %{name}
%endif
%postun
%restart_on_update
%if %{with systemd}
%service_del_postun %{name}.target
%else
%restart_on_update %{name}
%insserv_cleanup
%endif
%files
%defattr(-,root,root,-)
@ -118,11 +162,18 @@ echo " sudo rcredis start; sudo chkconfig redis on"
%{_bindir}/redis-*
%{_sbindir}/redis-*
%{_sbindir}/rc%{name}
%config(noreplace) %{_sysconfdir}/init.d/redis
%config(noreplace) %attr(0640, %{name}, %{name}) %{_conf_dir}/default.conf.example
%if %{with systemd}
/usr/lib/tmpfiles.d/%{name}.conf
%{_unitdir}/%{name}@.service
%{_unitdir}/%{name}.target
%doc README.SUSE
%else
%config(noreplace) %{_sysconfdir}/init.d/%{name}
%endif
%config(noreplace) %attr(-, root, %{name}) %{_conf_dir}/
#
%dir %attr(0750, %{name}, %{name}) %{_data_dir}
%dir %attr(0750, %{name}, %{name}) %{_data_dir}/default
%dir %attr(0750, %{name}, %{name}) %{_log_dir}
%dir %attr(0750, %{name}, %{name}) %{_conf_dir}
%changelog

View File

@ -1,2 +0,0 @@
REDIS_HOST=localhost
REDIS_PORT=6379

3
redis.target Normal file
View File

@ -0,0 +1,3 @@
[Unit]
Description=Redis target allowing to start/stop all redis@.service instances at once

2
redis.tmpfiles.d Normal file
View File

@ -0,0 +1,2 @@
# Type Path Mode UID GID Age Argument
d /var/run/redis/ 0755 redis redis - -

20
redis@.service Normal file
View File

@ -0,0 +1,20 @@
[Unit]
Description=Redis
After=network.target
PartOf=redis.target
[Service]
Type=simple
User=redis
Group=redis
PrivateTmp=true
PIDFile=/var/run/redis/%i.pid
ExecStart=/usr/sbin/redis-server /etc/redis/%i.conf
Restart=on-failure
#ExecStart=/usr/sbin/openvpn --daemon --suppress-timestamps --writepid /var/run/openvpn/%i.pid --cd /etc/openvpn/ --config %i.conf
#ExecReload=/sbin/killproc -p /var/run/openvpn/%i.pid -HUP /usr/sbin/openvpn
[Install]
WantedBy=multi-user.target redis.target