diff options
| -rw-r--r-- | memcached-manpages.patch | 152 | ||||
| -rw-r--r-- | memcached.spec | 38 | ||||
| -rw-r--r--[-rwxr-xr-x] | memcached.sysv | 0 | 
3 files changed, 182 insertions, 8 deletions
diff --git a/memcached-manpages.patch b/memcached-manpages.patch new file mode 100644 index 0000000..53dfb51 --- /dev/null +++ b/memcached-manpages.patch @@ -0,0 +1,152 @@ +From 5ef6d397a0cc40047e8ac50c0ea7fc49f16435aa Mon Sep 17 00:00:00 2001 +From: Miroslav Lichvar <mlichvar@redhat.com> +Date: Tue, 2 Jul 2013 13:54:04 +0200 +Subject: [PATCH 1/3] describe -b and -S options in man page + +--- + doc/memcached.1 | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/doc/memcached.1 b/doc/memcached.1 +index 287e87f..8ee749a 100644 +--- a/doc/memcached.1 ++++ b/doc/memcached.1 +@@ -119,6 +119,9 @@ could reduce the number of TLB misses and improve the performance. In order to + get large pages from the OS, memcached will allocate the total item-cache in + one large chunk. Only available if supported on your OS. + .TP ++.B \-b <num> ++Set the backlog queue limit to <num> connections. The default is 1024. ++.TP + .B \-B <proto> + Specify the binding protocol to use.  By default, the server will + autonegotiate client connections.  By using this option, you can +@@ -131,6 +134,10 @@ minimum is 1k, max is 128m. Adjusting this value changes the item size limit. + Beware that this also increases the number of slabs (use -v to view), and the + overal memory usage of memcached. + .TP ++.B \-S ++Turn on SASL authentication. This option is only meaningful if memcached was ++compiled with SASL support enabled. ++.TP + .B \-F + Disables the "flush_all" command. The cmd_flush counter will increment, but + clients will receive an error message and the flush will not occur. +--  +1.8.4.2 + +From a7fe32807cb49cb7329dfc70ad28f581aa9a49ca Mon Sep 17 00:00:00 2001 +From: Miroslav Lichvar <mlichvar@redhat.com> +Date: Wed, 15 Jan 2014 11:00:16 +0100 +Subject: [PATCH 2/3] fix usage text for -b option + +--- + memcached.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/memcached.c b/memcached.c +index ffe2204..b7c49d0 100644 +--- a/memcached.c ++++ b/memcached.c +@@ -4616,7 +4616,7 @@ static void usage(void) { +            "              requests process for a given connection to prevent \n" +            "              starvation (default: 20)\n"); +     printf("-C            Disable use of CAS\n"); +-    printf("-b            Set the backlog queue limit (default: 1024)\n"); ++    printf("-b <num>      Set the backlog queue limit (default: 1024)\n"); +     printf("-B            Binding protocol - one of ascii, binary, or auto (default)\n"); +     printf("-I            Override the size of each slab page. Adjusts max item size\n" +            "              (default: 1mb, min: 1k, max: 128m)\n"); +--  +1.8.4.2 + +From 330bf108df14e39e11f9be7fdcb25e295cdb949b Mon Sep 17 00:00:00 2001 +From: Miroslav Lichvar <mlichvar@redhat.com> +Date: Tue, 2 Jul 2013 17:15:03 +0200 +Subject: [PATCH 3/3] add man page for memcached-tool + +--- + scripts/memcached-tool.1 | 71 ++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 71 insertions(+) + create mode 100644 scripts/memcached-tool.1 + +diff --git a/scripts/memcached-tool.1 b/scripts/memcached-tool.1 +new file mode 100644 +index 0000000..6bb021b +--- /dev/null ++++ b/scripts/memcached-tool.1 +@@ -0,0 +1,71 @@ ++.TH MEMCACHED-TOOL 1 "Jul 2, 2013" ++.SH NAME ++memcached-tool \- stats and management tool for memcached ++ ++.SH SYNOPSIS ++.B memcached-tool ++.RI < host [: port "] | " /path/to/socket "> ["  mode ] ++ ++.SH DESCRIPTION ++.B memcached-tool ++is a Perl script used to print statistics from a running memcached instance. ++The first parameter specifies the address of the daemon either by a hostname, ++optionally followed by the port number (the default is 11211), or a path to ++UNIX domain socket. The second parameter specifies the mode in which the tool ++should run. ++ ++.SH MODES ++.TP ++.B display ++Print slab class statistics. This is the default mode if no mode is specified. ++The printed columns are: ++.RS ++.TP ++.B # ++Number of the slab class. ++.TP ++.B Item_Size ++The amount of space each chunk uses. One item uses one chunk of the ++appropriate size. ++.TP ++.B Max_age ++Age of the oldest item in the LRU. ++.TP ++.B Pages ++Total number of pages allocated to the slab class. ++.TP ++.B Count ++Number of items presently stored in this class. Expired items are not ++automatically excluded. ++.TP ++.B Full? ++Yes if there are no free chunks at the end of the last allocated page. ++.TP ++.B Evicted ++Number of times an item had to be evicted from the LRU before it expired. ++.TP ++.B Evict_Time ++Seconds since the last access for the most recent item evicted from this ++class. ++.TP ++.B OOM ++Number of times the underlying slab class was unable to store a new item. ++.RE ++ ++.TP ++.B stats ++Print general-purpose statistics of the daemon. Each line contains the name of ++the statistic and its value. ++.TP ++.B dump ++Make a partial dump of the cache written in the add statements of the ++memcached protocol. ++ ++.SH SEE ALSO ++.BR memcached (1), ++.br ++.B http://www.memcached.org ++ ++.SH AUTHOR ++The memcached-tool script was written by Brad Fitzpatrick ++.B <brad@danga.com> +--  +1.8.4.2 + diff --git a/memcached.spec b/memcached.spec index 6151da0..3c1eb1c 100644 --- a/memcached.spec +++ b/memcached.spec @@ -7,18 +7,21 @@  %global with_systemd 0  %endif -%global with_sasl    0 +%global with_sasl    1 + +# Regression tests take a long time, you can skip 'em with this +%{!?runselftest: %global runselftest 1}  Name:           memcached -Version:        1.4.15 -Release:        2%{?dist}.1 +Version:        1.4.17 +Release:        1%{?dist}  Epoch:          0  Summary:        High Performance, Distributed Memory Object Cache  Group:          System Environment/Daemons  License:        BSD  URL:            http://www.memcached.org/ -Source0:        http://memcached.googlecode.com/files/%{name}-%{version}.tar.gz +Source0:        http://www.memcached.org/files/%{name}-%{version}.tar.gz  # custom unit file  Source1:        memcached.service @@ -26,12 +29,17 @@ Source1:        memcached.service  Source2:        memcached.sysv  # Patches +Patch001:       memcached-manpages.patch  # Fixes  BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +%if "%{?vendor}" == "Remi Collet" +BuildRequires:  libevent-devel > 2 +%else  BuildRequires:  libevent-devel +%endif  BuildRequires:  perl(Test::More), perl(Test::Harness)  %if %{with_sasl}  BuildRequires:  cyrus-sasl-devel @@ -45,17 +53,16 @@ Requires(postun): systemd  Requires(post): systemd-sysv  %else  Requires: initscripts -Requires: libevent  Requires(post): /sbin/chkconfig  Requires(preun): /sbin/chkconfig, /sbin/service  Requires(postun): /sbin/service  %endif  Requires(pre):  shadow-utils -  # as of 3.5.5-4 selinux has memcache included  Obsoletes: memcached-selinux +  %description  memcached is a high-performance, distributed memory object caching  system, generic in nature, but intended for use in speeding up dynamic @@ -68,15 +75,20 @@ Group:		Development/Libraries  Requires:	%{name} = %{epoch}:%{version}-%{release}  %description devel -Install memcached-devel if you are developing C/C++ applications that require access to the -memcached binary include files. +Install memcached-devel if you are developing C/C++ applications that require +access to the memcached binary include files.  %prep  %setup -q +%patch001 -p1 -b .manpages  %build +# compile with full RELRO +export CFLAGS="%{optflags} -pie -fpie" +export LDFLAGS="-Wl,-z,relro,-z,now" +  %configure \  %if %{with_sasl}     --enable-sasl @@ -86,6 +98,7 @@ sed -i 's/-Werror/ /' Makefile  make %{?_smp_mflags}  %check +%if %runselftest  # whitespace tests fail locally on fedpkg systems now that they use git  rm -f t/whitespace.t @@ -96,6 +109,7 @@ if [ `id -u` -ne 0 ]; then    rm -f t/daemonize.t  fi  make test +%endif  %install @@ -106,6 +120,8 @@ rm -f %{buildroot}/%{_bindir}/memcached-debug  # Perl script for monitoring memcached  install -Dp -m0755 scripts/memcached-tool %{buildroot}%{_bindir}/memcached-tool +install -Dp -m0644 scripts/memcached-tool.1 \ +        %{buildroot}%{_mandir}/man1/memcached-tool.1  %if %{with_systemd}  # Unit file @@ -221,6 +237,7 @@ fi  %config(noreplace) %{_sysconfdir}/sysconfig/%{name}  %{_bindir}/memcached-tool  %{_bindir}/memcached +%{_mandir}/man1/memcached-tool.1*  %{_mandir}/man1/memcached.1*  %if %{with_systemd}  %{_unitdir}/memcached.service @@ -235,6 +252,11 @@ fi  %{_includedir}/memcached/*  %changelog +* Mon Apr  7 2014 Remi Collet <rpms@famillecollet.com> - 0:1.4.17-1 +- Update to 1.4.17 +- Sync with rawhide +- Build against libevent 2 +  * Sun Dec  2 2012 Remi Collet <rpms@famillecollet.com> - 0:1.4.15-2.1  - build test without SASL diff --git a/memcached.sysv b/memcached.sysv index 19e5a12..19e5a12 100755..100644 --- a/memcached.sysv +++ b/memcached.sysv  | 
