summaryrefslogtreecommitdiffstats
path: root/memcached.spec
diff options
context:
space:
mode:
Diffstat (limited to 'memcached.spec')
-rw-r--r--memcached.spec30
1 files changed, 21 insertions, 9 deletions
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