diff options
author | Remi Collet <remi@remirepo.net> | 2018-02-28 16:46:21 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2018-02-28 16:46:21 +0100 |
commit | 269f086a4e1c4a2807b1ad1b124f31ad513bb46e (patch) | |
tree | d6281866b18d893b979ff30ae4cc9b53c1b5597a | |
parent | 58ac5452a0393fc46db3f29e90728f8c186913a2 (diff) |
Update to 1.5.6
Add systemd instancing support
-rw-r--r-- | memcached-format_errors.patch | 32 | ||||
-rw-r--r-- | memcached-unit.patch | 17 | ||||
-rw-r--r-- | memcached.spec | 30 |
3 files changed, 35 insertions, 44 deletions
diff --git a/memcached-format_errors.patch b/memcached-format_errors.patch deleted file mode 100644 index 53a9c65..0000000 --- a/memcached-format_errors.patch +++ /dev/null @@ -1,32 +0,0 @@ -commit aa5cc9ad74c871970c2d93c114e1d2c125b63e81 -Author: Miroslav Lichvar <mlichvar@redhat.com> -Date: Tue Jan 30 13:28:08 2018 +0100 - - fix gcc warnings - -diff --git a/items.c b/items.c -index 400048b..519764f 100644 ---- a/items.c -+++ b/items.c -@@ -925,7 +925,7 @@ void item_stats_sizes(ADD_STAT add_stats, void *c) { - int i; - for (i = 0; i < stats_sizes_buckets; i++) { - if (stats_sizes_hist[i] != 0) { -- char key[8]; -+ char key[12]; - snprintf(key, sizeof(key), "%d", i * 32); - APPEND_STAT(key, "%u", stats_sizes_hist[i]); - } -diff --git a/memcached.c b/memcached.c -index a8a724c..dba7941 100644 ---- a/memcached.c -+++ b/memcached.c -@@ -3338,7 +3338,7 @@ static void process_stats_conns(ADD_STAT add_stats, void *c) { - int i; - char key_str[STAT_KEY_LEN]; - char val_str[STAT_VAL_LEN]; -- char conn_name[MAXPATHLEN + sizeof("unix:")]; -+ char conn_name[MAXPATHLEN + sizeof("unix:") + sizeof("65535")]; - int klen = 0, vlen = 0; - - assert(add_stats); diff --git a/memcached-unit.patch b/memcached-unit.patch index 103cda3..8d69abb 100644 --- a/memcached-unit.patch +++ b/memcached-unit.patch @@ -1,6 +1,6 @@ -diff -up memcached-1.4.28/scripts/memcached.service.unit memcached-1.4.28/scripts/memcached.service ---- memcached-1.4.28/scripts/memcached.service.unit 2016-07-02 03:14:25.000000000 +0200 -+++ memcached-1.4.28/scripts/memcached.service 2016-07-12 13:54:54.275782170 +0200 +diff -up memcached-1.5.6/scripts/memcached.service.unit memcached-1.5.6/scripts/memcached.service +--- memcached-1.5.6/scripts/memcached.service.unit 2018-02-27 20:19:52.000000000 +0100 ++++ memcached-1.5.6/scripts/memcached.service 2018-02-28 16:28:49.265509810 +0100 @@ -11,6 +11,7 @@ [Unit] @@ -9,3 +9,14 @@ diff -up memcached-1.4.28/scripts/memcached.service.unit memcached-1.4.28/script After=network.target [Service] +diff -up memcached-1.5.6/scripts/memcached@.service.unit memcached-1.5.6/scripts/memcached@.service +--- memcached-1.5.6/scripts/memcached@.service.unit 2018-02-28 16:29:17.820655918 +0100 ++++ memcached-1.5.6/scripts/memcached@.service 2018-02-28 16:29:24.882692052 +0100 +@@ -15,6 +15,7 @@ + + [Unit] + Description=memcached daemon ++Before=httpd.service + After=network.target + + [Service] diff --git a/memcached.spec b/memcached.spec index 1172b75..d767ab8 100644 --- a/memcached.spec +++ b/memcached.spec @@ -1,5 +1,5 @@ # remirepo spec file for memcached -# lastest version with SASL support enabled, from: +# lastest version with SASL and extstore support enabled, from: # # Fedora spec file for memcached # @@ -29,7 +29,7 @@ %global with_tests %{?_with_tests:1}%{!?_with_tests:0} Name: memcached -Version: 1.5.5 +Version: 1.5.6 Release: 1%{?dist} Epoch: 0 Summary: High Performance, Distributed Memory Object Cache @@ -46,13 +46,12 @@ Source2: memcached.sysv Source3: memcached.service Patch1: memcached-unit.patch -Patch2: memcached-format_errors.patch BuildRequires: pkgconfig(libevent) >= 2 %if %{with_systemd} BuildRequires: systemd %endif -%if 0%{?fedora} > 22 +%if 0%{?fedora} >= 23 || 0%{?rhel} >= 8 BuildRequires: perl-generators %endif BuildRequires: perl(Test::More), perl(Test::Harness) @@ -95,7 +94,6 @@ access to the memcached binary include files. %prep %setup -q %patch1 -p1 -b .unit -%patch2 -p1 -b .format_errors %build @@ -134,13 +132,22 @@ install -Dp -m0644 scripts/memcached-tool.1 \ %{buildroot}%{_mandir}/man1/memcached-tool.1 %if %{with_systemd} + # Unit file -%if 0%{?fedora} < 25 +%if 0%{?fedora} < 25 && 0%{?rhel} < 8 install -Dp -m0644 %{SOURCE3} %{buildroot}%{_unitdir}/memcached.service %else -install -Dp -m0644 scripts/memcached.service \ - %{buildroot}%{_unitdir}/memcached.service +install -Dp -m0644 scripts/%{name}.service %{buildroot}%{_unitdir}/%{name}.service +%endif +install -Dp -m0644 scripts/%{name}@.service %{buildroot}%{_unitdir}/%{name}@.service + +# Safer config +%if 0%{?fedora} < 26 && 0%{?rhel} < 8 +sed -e 's/^##safer##/#/g' -i %{buildroot}%{_unitdir}/%{name}*service +%else +sed -e 's/^##safer##//g' -i %{buildroot}%{_unitdir}/%{name}*service %endif + %else # Init script install -Dp -m0755 %{SOURCE2} %{buildroot}%{_initrddir}/memcached @@ -151,7 +158,7 @@ mkdir -p %{buildroot}/%{_localstatedir}/run/memcached # Default configs -%if 0%{?fedora} < 25 +%if 0%{?fedora} < 25 && 0%{?rhel} < 8 mkdir -p %{buildroot}/%{_sysconfdir}/sysconfig cat <<EOF >%{buildroot}/%{_sysconfdir}/sysconfig/%{name} PORT="11211" @@ -240,6 +247,7 @@ fi %{_mandir}/man1/memcached.1* %if %{with_systemd} %{_unitdir}/memcached.service +%{_unitdir}/memcached@.service %else %{_initrddir}/memcached %dir %attr(755,%{username},%{groupname}) %{_localstatedir}/run/memcached @@ -251,6 +259,10 @@ fi %changelog +* Wed Feb 28 2018 Remi Collet <remi@remirepo.net> - 0:1.5.6-1 +- Update to 1.5.6 +- add systemd instancing support + * Tue Feb 13 2018 Remi Collet <remi@remirepo.net> - 0:1.5.5-1 - Update to 1.5.5 |