mirror of
https://abf.rosa.ru/djam/redis.git
synced 2025-02-23 14:32:49 +00:00
Automatic import for version 2.4.14
This commit is contained in:
parent
6223ba0a83
commit
ae1ed6e594
8 changed files with 183 additions and 200 deletions
2
.abf.yml
2
.abf.yml
|
@ -1,2 +1,2 @@
|
|||
sources:
|
||||
"redis-2.2.8.tar.gz": 30fb67ed71c179a7294d06d2c83c9b074a98fb79
|
||||
"redis-2.4.14.tar.gz": 3f0a2ac2eef9319edb0d789d3553f77b2a3dc31d
|
||||
|
|
|
@ -1,21 +1,15 @@
|
|||
---
|
||||
redis.conf | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
Index: redis.conf
|
||||
===================================================================
|
||||
--- redis.conf.orig
|
||||
+++ redis.conf
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
# By default Redis does not run as a daemon. Use 'yes' if you need it.
|
||||
# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
|
||||
-daemonize no
|
||||
+daemonize yes
|
||||
--- redis-2.4.6/redis.conf.orig 2012-01-13 09:01:20.032263652 +0100
|
||||
+++ redis-2.4.6/redis.conf 2012-01-13 09:02:57.223037913 +0100
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
# When running daemonized, Redis writes a pid file in /var/run/redis.pid by
|
||||
# default. You can specify a custom pid file location here.
|
||||
@@ -27,7 +27,7 @@ port 6379
|
||||
-pidfile /var/run/redis.pid
|
||||
+pidfile /var/run/redis/redis.pid
|
||||
|
||||
# Accept connections on the specified port, default is 6379.
|
||||
# If port 0 is specified Redis will not listen on a TCP socket.
|
||||
@@ -27,7 +27,7 @@
|
||||
# If you want you can bind a single interface, if the bind option is not
|
||||
# specified all the interfaces will listen for incoming connections.
|
||||
#
|
||||
|
@ -24,7 +18,7 @@ Index: redis.conf
|
|||
|
||||
# Specify the path for the unix socket that will be used to listen for
|
||||
# incoming connections. There is no default, so Redis will not listen
|
||||
@@ -44,12 +44,12 @@ timeout 300
|
||||
@@ -45,12 +45,12 @@
|
||||
# verbose (many rarely useful info, but not a mess like the debug level)
|
||||
# notice (moderately verbose, what you want in production probably)
|
||||
# warning (only very important / critical messages are logged)
|
||||
|
@ -39,7 +33,7 @@ Index: redis.conf
|
|||
|
||||
# To enable logging to the system logger, just set 'syslog-enabled' to yes,
|
||||
# and optionally update the other syslog parameters to suit your needs.
|
||||
@@ -103,7 +103,7 @@ dbfilename dump.rdb
|
||||
@@ -104,7 +104,7 @@
|
||||
# Also the Append Only File will be created inside this directory.
|
||||
#
|
||||
# Note that you must specify a directory here, not a file name.
|
|
@ -1,97 +0,0 @@
|
|||
---
|
||||
utils/redis_init_script | 67 +++++++++++++++++++++++++++++++++++++-----------
|
||||
1 file changed, 53 insertions(+), 14 deletions(-)
|
||||
|
||||
Index: utils/redis_init_script
|
||||
===================================================================
|
||||
--- utils/redis_init_script.orig
|
||||
+++ utils/redis_init_script
|
||||
@@ -1,35 +1,74 @@
|
||||
#!/bin/sh
|
||||
+#
|
||||
+# /etc/init.d/redis
|
||||
+#
|
||||
+### BEGIN INIT INFO
|
||||
+# Provides: redis
|
||||
+# Required-Start: $syslog $remote_fs
|
||||
+# Should-Start:
|
||||
+# Required-Stop: $syslog $remote_fs
|
||||
+# Should-Stop:
|
||||
+# Default-Start: 3 4 5
|
||||
+# Default-Stop: 0 1 2 6
|
||||
+# Short-Description: Redis server
|
||||
+# Description: Starts and stops the Redis daemon
|
||||
+### END INIT INFO
|
||||
+
|
||||
+. /etc/rc.status
|
||||
|
||||
REDISPORT=6379
|
||||
-EXEC=/usr/local/bin/redis-server
|
||||
+EXEC=/usr/sbin/redis-server
|
||||
|
||||
-PIDFILE=/var/run/redis_${REDISPORT}.pid
|
||||
-CONF="/etc/redis/${REDISPORT}.conf"
|
||||
+LOGFILE=/var/log/redis.log
|
||||
+PIDFILE=/var/run/redis.pid
|
||||
+CONF=/etc/redis.conf
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
- if [ -f $PIDFILE ]
|
||||
- then
|
||||
- echo -n "$PIDFILE exists, process is already running or crashed\n"
|
||||
- else
|
||||
- echo -n "Starting Redis server...\n"
|
||||
- $EXEC $CONF
|
||||
+ if [ ! -r $LOGFILE ]; then
|
||||
+ touch $LOGFILE
|
||||
+ chown redis:redis $LOGFILE
|
||||
+ fi
|
||||
+ # Create a pidfile the server can write into.
|
||||
+ if [ ! -r $PIDFILE ]; then
|
||||
+ touch $PIDFILE
|
||||
+ chown redis:redis $PIDFILE
|
||||
fi
|
||||
+ echo -n "Starting service Redis "
|
||||
+ /sbin/startproc -u redis -g redis -p $PIDFILE -s -e $EXEC $CONF >/dev/null 2>&1
|
||||
+ rc_status -v
|
||||
;;
|
||||
stop)
|
||||
if [ ! -f $PIDFILE ]
|
||||
then
|
||||
- echo -n "$PIDFILE does not exist, process is not running\n"
|
||||
+ echo -n "$PIDFILE does not exist, process is not running"
|
||||
+ rc_failed
|
||||
else
|
||||
+ echo -n "Stopping service Redis..."
|
||||
+ echo -e "SHUTDOWN\r" | /usr/bin/netcat localhost $REDISPORT &
|
||||
PID=$(cat $PIDFILE)
|
||||
- echo -n "Stopping ...\n"
|
||||
- echo -n "SHUTDOWN\r\n" | nc localhost $REDISPORT &
|
||||
while [ -x /proc/${PIDFILE} ]
|
||||
do
|
||||
- echo "Waiting for Redis to shutdown ..."
|
||||
sleep 1
|
||||
done
|
||||
- echo "Redis stopped"
|
||||
fi
|
||||
+ rc_status -v
|
||||
+ ;;
|
||||
+ restart)
|
||||
+ $0 stop
|
||||
+ $0 start
|
||||
;;
|
||||
+ reload)
|
||||
+ $0 restart
|
||||
+ ;;
|
||||
+ status)
|
||||
+ echo -n "Checking for service Redis: "
|
||||
+ /sbin/checkproc -p $PIDFILE $EXEC
|
||||
+ rc_status -v
|
||||
+ ;;
|
||||
+ *)
|
||||
+ echo $"Usage: $0 {start|stop|status|restart|reload}"
|
||||
+ exit 1
|
||||
esac
|
||||
+rc_exit
|
||||
+
|
88
redis.init
Normal file
88
redis.init
Normal file
|
@ -0,0 +1,88 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# redis init file for starting up the redis daemon
|
||||
#
|
||||
# chkconfig: - 20 80
|
||||
# description: Starts and stops the redis daemon.
|
||||
|
||||
# Source function library.
|
||||
. /etc/rc.d/init.d/functions
|
||||
|
||||
name="redis-server"
|
||||
exec="/usr/sbin/$name"
|
||||
pidfile="/var/run/redis/redis.pid"
|
||||
REDIS_CONFIG="/etc/redis.conf"
|
||||
|
||||
[ -e /etc/sysconfig/redis ] && . /etc/sysconfig/redis
|
||||
|
||||
lockfile=/var/lock/subsys/redis
|
||||
|
||||
start() {
|
||||
[ -f $REDIS_CONFIG ] || exit 6
|
||||
[ -x $exec ] || exit 5
|
||||
echo -n $"Starting $name: "
|
||||
daemon --user ${REDIS_USER-redis} "$exec $REDIS_CONFIG"
|
||||
retval=$?
|
||||
echo
|
||||
[ $retval -eq 0 ] && touch $lockfile
|
||||
return $retval
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo -n $"Stopping $name: "
|
||||
killproc -p $pidfile $name
|
||||
retval=$?
|
||||
echo
|
||||
[ $retval -eq 0 ] && rm -f $lockfile
|
||||
return $retval
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
reload() {
|
||||
false
|
||||
}
|
||||
|
||||
rh_status() {
|
||||
status -p $pidfile $name
|
||||
}
|
||||
|
||||
rh_status_q() {
|
||||
rh_status >/dev/null 2>&1
|
||||
}
|
||||
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
rh_status_q && exit 0
|
||||
$1
|
||||
;;
|
||||
stop)
|
||||
rh_status_q || exit 0
|
||||
$1
|
||||
;;
|
||||
restart)
|
||||
$1
|
||||
;;
|
||||
reload)
|
||||
rh_status_q || exit 7
|
||||
$1
|
||||
;;
|
||||
force-reload)
|
||||
force_reload
|
||||
;;
|
||||
status)
|
||||
rh_status
|
||||
;;
|
||||
condrestart|try-restart)
|
||||
rh_status_q || exit 0
|
||||
restart
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart}"
|
||||
exit 2
|
||||
esac
|
||||
exit $?
|
|
@ -1,9 +1,9 @@
|
|||
/var/log/redis/*.log {
|
||||
weekly
|
||||
rotate 10
|
||||
copytruncate
|
||||
delaycompress
|
||||
compress
|
||||
notifempty
|
||||
missingok
|
||||
/var/log/redis/redis.log {
|
||||
weekly
|
||||
rotate 10
|
||||
copytruncate
|
||||
delaycompress
|
||||
compress
|
||||
notifempty
|
||||
missingok
|
||||
}
|
||||
|
|
13
redis.service
Normal file
13
redis.service
Normal file
|
@ -0,0 +1,13 @@
|
|||
[Unit]
|
||||
Description=A persistent key-value database
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
PIDFile=/var/run/redis/redis.pid
|
||||
ExecStart=/usr/sbin/redis-server /etc/redis.conf
|
||||
User=redis
|
||||
Group=redis
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
137
redis.spec
137
redis.spec
|
@ -1,71 +1,44 @@
|
|||
%define _data_dir %{_var}/lib/%{name}
|
||||
%define _log_dir %{_var}/log/%{name}
|
||||
|
||||
Name: redis
|
||||
Version: 2.2.8
|
||||
Release: %mkrel 1
|
||||
License: BSD License
|
||||
Group: Databases
|
||||
Summary: Persistent key-value database
|
||||
Url: http://redis.io/
|
||||
Source: http://redis.googlecode.com/files/%{name}-%{version}.tar.gz
|
||||
Source1: %{name}.logrotate
|
||||
Source4: redis.sysconfig
|
||||
Patch0: %{name}-initscript.patch
|
||||
Patch1: %{name}-conf.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Requires: netcat
|
||||
Requires: logrotate
|
||||
BuildRequires: tcl
|
||||
Name: redis
|
||||
Version: 2.4.14
|
||||
Release: %mkrel 1
|
||||
License: BSD License
|
||||
Group: Databases
|
||||
Summary: Persistent key-value database
|
||||
Url: http://redis.io/
|
||||
Source0: http://redis.googlecode.com/files/%{name}-%{version}.tar.gz
|
||||
Requires: netcat
|
||||
Patch0: %{name}-2.4.6-redis.conf.patch
|
||||
Source1: %{name}.logrotate
|
||||
Source2: %{name}.init
|
||||
Source3: %{name}.service
|
||||
|
||||
Requires: logrotate
|
||||
BuildRequires: tcl
|
||||
|
||||
%description
|
||||
Redis is an advanced key-value store. It is similar to memcached but the dataset
|
||||
is not volatile, and values can be strings, exactly like in memcached,
|
||||
but also lists, sets, and ordered sets. All this data types can be manipulated
|
||||
with atomic operations to push/pop elements, add/remove elements, perform server
|
||||
side union, intersection, difference between sets, and so forth. Redis supports
|
||||
Redis is an advanced key-value store.
|
||||
It is similar to memcached but the dataset
|
||||
is not volatile, and values can be
|
||||
strings, exactly like in memcached,
|
||||
but also lists, sets, and ordered sets.
|
||||
All this data types can be manipulated
|
||||
with atomic operations to push/pop elements,
|
||||
add/remove elements, perform server
|
||||
side union, intersection, difference between
|
||||
sets, and so forth. Redis supports
|
||||
different kind of sorting abilities.
|
||||
|
||||
%package doc
|
||||
Summary: HTML documentation for redis
|
||||
Group: Databases
|
||||
Requires: redis = %{version}
|
||||
|
||||
%description doc
|
||||
HTML documentation for redis database.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0
|
||||
mv doc html
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
make PROF="%{optflags}" %{?jobs:-j%jobs}
|
||||
%make all
|
||||
|
||||
%install
|
||||
%{__install} -Dd -m 0755 \
|
||||
%{buildroot}%{_initrddir}/ \
|
||||
%{buildroot}%{_sysconfdir}/logrotate.d \
|
||||
%{buildroot}%{_bindir} \
|
||||
%{buildroot}%{_libdir} \
|
||||
%{buildroot}%{_sbindir} \
|
||||
%{buildroot}%{_log_dir} \
|
||||
%{buildroot}%{_data_dir}
|
||||
|
||||
%{__install} -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-server %{buildroot}%{_sbindir}/redis-server
|
||||
%{__install} -m 0640 redis.conf %{buildroot}%{_sysconfdir}/redis.conf
|
||||
|
||||
# init
|
||||
%{__install} -m 0755 utils/redis_init_script %{buildroot}%{_initrddir}/redis
|
||||
%{__ln_s} %{_initrddir}/%{name} %{buildroot}%{_sbindir}/rc%{name}
|
||||
|
||||
# logrotate
|
||||
%{__install} -m 0644 %{S:1} \
|
||||
%{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
||||
|
||||
%check
|
||||
|
||||
|
@ -77,9 +50,27 @@ The test suite often fails to start a server, with
|
|||
EOF
|
||||
make test && true
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%install
|
||||
make install PREFIX=%{buildroot}%{_prefix}
|
||||
# Install misc other
|
||||
install -p -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
||||
install -p -D -m 755 %{SOURCE2} %{buildroot}%{_initrddir}/%{name}
|
||||
install -p -D -m 644 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}.conf
|
||||
install -d -m 755 %{buildroot}%{_localstatedir}/lib/%{name}
|
||||
install -d -m 755 %{buildroot}%{_localstatedir}/log/%{name}
|
||||
install -d -m 755 %{buildroot}%{_localstatedir}/run/%{name}
|
||||
# Install systemd unit
|
||||
install -p -D -m 644 %{SOURCE3} %{buildroot}/%{_unitdir}/%{name}.service
|
||||
|
||||
# Fix non-standard-executable-perm error
|
||||
chmod 755 %{buildroot}%{_bindir}/%{name}-*
|
||||
|
||||
# Ensure redis-server location doesn't change
|
||||
mkdir -p %{buildroot}%{_sbindir}
|
||||
mv %{buildroot}%{_bindir}/%{name}-server %{buildroot}%{_sbindir}/%{name}-server
|
||||
|
||||
#==========================================================
|
||||
%pre
|
||||
/usr/sbin/groupadd -r %{name} &>/dev/null || :
|
||||
/usr/sbin/useradd -o -g %{name} -s /bin/false -r -c "User for Redis key-value store" -d %{_data_dir} %{name} &>/dev/null || :
|
||||
|
@ -93,30 +84,26 @@ echo " sudo rcredis start; insserv redis"
|
|||
%_preun_service %{name}
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc 00-RELEASENOTES BUGS CONTRIBUTING COPYING Changelog README TODO
|
||||
%doc 00-RELEASENOTES BUGS CONTRIBUTING COPYING README
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
||||
%{_bindir}/redis-*
|
||||
%{_sbindir}/redis-*
|
||||
%{_sbindir}/rc%{name}
|
||||
%config(noreplace) %{_initrddir}/redis
|
||||
%config(noreplace) %attr(0640, %{name}, %{name}) %{_sysconfdir}/redis.conf
|
||||
%dir %attr(0750, %{name}, %{name}) %{_data_dir}
|
||||
%dir %attr(0750, %{name}, %{name}) %{_log_dir}
|
||||
|
||||
%files doc
|
||||
%defattr(-,root,root)
|
||||
%doc html/
|
||||
|
||||
%config(noreplace) %{_sysconfdir}/%{name}.conf
|
||||
%dir %attr(0755, redis, root) %{_localstatedir}/lib/%{name}
|
||||
%dir %attr(0755, redis, root) %{_localstatedir}/log/%{name}
|
||||
%dir %attr(0755, redis, root) %{_localstatedir}/run/%{name}
|
||||
%{_bindir}/%{name}-*
|
||||
%{_sbindir}/%{name}-*
|
||||
%{_initrddir}/%{name}
|
||||
%{_unitdir}/%{name}.service
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Jun 09 2011 Antoine Ginies <aginies@mandriva.com> 2.2.8-1mdv2011.0
|
||||
* Thu May 31 2012 Alexander Khrukin <akhrukin@mandriva.org> 2.4.14-1mdv2012.0
|
||||
+ Revision: 801550
|
||||
- version update 2.4.14
|
||||
|
||||
* Thu Jun 09 2011 Antoine Ginies <aginies@mandriva.com> 2.2.8-1
|
||||
+ Revision: 683424
|
||||
- fix group in subpackages
|
||||
- fix group
|
||||
- import redis
|
||||
|
||||
|
||||
* Wed Jun 8 2011 Antoine Ginies <aginies@mandriva.com> 2.2.8
|
||||
- first release for Mandriva based on OpenSUSE SRPM
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
REDIS_HOST=localhost
|
||||
REDIS_PORT=6379
|
Loading…
Add table
Reference in a new issue