55b1212
%define username   memcached
55b1212
%define groupname  memcached
6bd4531
%bcond_without sasl
55453dd
%bcond_with seccomp
55b1212
618683d
Name:           memcached
f0a7faf
Version:        1.5.7
85fadcb
Release:        1%{?dist}
8ca78cb
Epoch:          0
618683d
Summary:        High Performance, Distributed Memory Object Cache
618683d
618683d
Group:          System Environment/Daemons
618683d
License:        BSD
0fa75d8
URL:            https://www.memcached.org/
0fa75d8
Source0:        https://www.memcached.org/files/%{name}-%{version}.tar.gz
ea0733a
Source1:        memcached.sysconfig
618683d
ea0733a
Patch1:         memcached-unit.patch
618683d
7376578
BuildRequires:  gcc libevent-devel systemd
d3bc8c1
BuildRequires:  perl-generators
185350a
BuildRequires:  perl(Test::More), perl(Test::Harness)
6bd4531
%{?with_sasl:BuildRequires: cyrus-sasl-devel}
55453dd
%{?with_seccomp:BuildRequires: libseccomp-devel}
55b1212
55b1212
Requires(pre):  shadow-utils
9d38b9a
%{?systemd_requires}
5db2e5a
618683d
%description
618683d
memcached is a high-performance, distributed memory object caching
618683d
system, generic in nature, but intended for use in speeding up dynamic
618683d
web applications by alleviating database load.
618683d
91094ee
%package devel
8ca78cb
Summary: Files needed for development using memcached protocol
8ca78cb
Group: Development/Libraries
8ca78cb
Requires: %{name} = %{epoch}:%{version}-%{release}
91094ee
91094ee
%description devel
8ca78cb
Install memcached-devel if you are developing C/C++ applications that require
8ca78cb
access to the memcached binary include files.
55b1212
618683d
%prep
618683d
%setup -q
ea0733a
%patch1 -p1 -b .unit
618683d
618683d
%build
ec3ba77
# compile with full RELRO
ec3ba77
export CFLAGS="%{optflags} -pie -fpie"
ec3ba77
export LDFLAGS="-Wl,-z,relro,-z,now"
ec3ba77
6bd4531
%configure \
55453dd
  %{?with_sasl: --enable-sasl} \
55453dd
  %{?with_seccomp: --enable-seccomp}
6bd4531
618683d
make %{?_smp_mflags}
618683d
618683d
%check
70a932c
# disable testing as it is unreliable on build systems
70a932c
exit 0
70a932c
dacc6d4
# whitespace tests fail locally on fedpkg systems now that they use git
dacc6d4
rm -f t/whitespace.t
dacc6d4
507fad5
# Parts of the test suite only succeed as non-root.
507fad5
if [ `id -u` -ne 0 ]; then
507fad5
  # remove failing test that doesn't work in
507fad5
  # build systems
1faabaf
  rm -f t/daemonize.t t/watcher.t t/expirations.t
507fad5
fi
dacc6d4
make test
618683d
618683d
%install
8ca78cb
make install DESTDIR=%{buildroot} INSTALL="%{__install} -p"
618683d
# remove memcached-debug
618683d
rm -f %{buildroot}/%{_bindir}/memcached-debug
618683d
618683d
# Perl script for monitoring memcached
618683d
install -Dp -m0755 scripts/memcached-tool %{buildroot}%{_bindir}/memcached-tool
98f11e2
install -Dp -m0644 scripts/memcached-tool.1 \
98f11e2
        %{buildroot}%{_mandir}/man1/memcached-tool.1
618683d
5db2e5a
# Unit file
ea0733a
install -Dp -m0644 scripts/memcached.service \
ea0733a
        %{buildroot}%{_unitdir}/memcached.service
618683d
618683d
# Default configs
ea0733a
install -Dp -m0644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/sysconfig/%{name}
507fad5
618683d
55b1212
%pre
55b1212
getent group %{groupname} >/dev/null || groupadd -r %{groupname}
55b1212
getent passwd %{username} >/dev/null || \
41935ef
useradd -r -g %{groupname} -d /run/memcached \
55b1212
    -s /sbin/nologin -c "Memcached daemon" %{username}
55b1212
exit 0
55b1212
55b1212
618683d
%post
41935ef
%systemd_post memcached.service
618683d
55b1212
618683d
%preun
41935ef
%systemd_preun memcached.service
618683d
55b1212
618683d
%postun
41935ef
%systemd_postun_with_restart memcached.service
5db2e5a
618683d
618683d
%files
41935ef
%doc AUTHORS ChangeLog COPYING NEWS README.md doc/CONTRIBUTORS doc/*.txt
618683d
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
618683d
%{_bindir}/memcached-tool
618683d
%{_bindir}/memcached
98f11e2
%{_mandir}/man1/memcached-tool.1*
618683d
%{_mandir}/man1/memcached.1*
5db2e5a
%{_unitdir}/memcached.service
618683d
618683d
91094ee
%files devel
91094ee
%{_includedir}/memcached/*
55b1212
618683d
%changelog
7125c7f
* Thu Mar 29 2018 Miroslav Lichvar <mlichvar@redhat.com> - 0:1.5.7-1
7125c7f
- update to 1.5.7
7125c7f
- use https URLs in spec
7125c7f
85fadcb
* Thu Mar 01 2018 Miroslav Lichvar <mlichvar@redhat.com> - 0:1.5.6-1
85fadcb
- update to 1.5.6 (UDP port disabled by default)
85fadcb
- add gcc to build requirements
85fadcb
9819a0e
* Thu Feb 15 2018 Miroslav Lichvar <mlichvar@redhat.com> - 0:1.5.5-2
9819a0e
- rebuild for new libevent
9819a0e
0d2863b
* Tue Feb 13 2018 Miroslav Lichvar <mlichvar@redhat.com> - 0:1.5.5-1
0d2863b
- update to 1.5.5
0d2863b
3469f9b
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0:1.5.4-3
3469f9b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
3469f9b
37d9bd2
* Tue Jan 30 2018 Miroslav Lichvar <mlichvar@redhat.com> - 0:1.5.4-2
3d63200
- fix building with new gcc
37d9bd2
- use macro for systemd scriptlet dependencies
37d9bd2
2dea76c
* Thu Jan 04 2018 Miroslav Lichvar <mlichvar@redhat.com> - 0:1.5.4-1
2dea76c
- update to 1.5.4
2dea76c
133fc61
* Mon Nov 06 2017 Miroslav Lichvar <mlichvar@redhat.com> - 0:1.5.3-1
133fc61
- update to 1.5.3
133fc61
- add build condition for seccomp support
133fc61
2cd221a
* Mon Oct 02 2017 Miroslav Lichvar <mlichvar@redhat.com> - 0:1.5.2-1
2cd221a
- update to 1.5.2
2cd221a
ae699a0
* Fri Aug 25 2017 Miroslav Lichvar <mlichvar@redhat.com> - 0:1.5.1-1
ae699a0
- update to 1.5.1
ae699a0
0b3c4d9
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0:1.5.0-3
0b3c4d9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
0b3c4d9
e7421d3
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0:1.5.0-2
e7421d3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
e7421d3
8361322
* Mon Jul 24 2017 Miroslav Lichvar <mlichvar@redhat.com> - 0:1.5.0-1
8361322
- update to 1.5.0
8361322
8a000f7
* Tue Jul 11 2017 Miroslav Lichvar <mlichvar@redhat.com> - 0:1.4.39-1
2bc6d26
- update to 1.4.39 (CVE-2017-9951)
8a000f7
2a92241
* Tue Jun 27 2017 Miroslav Lichvar <mlichvar@redhat.com> - 0:1.4.38-1
2a92241
- update to 1.4.38
2a92241
505fc42
* Fri Jun 09 2017 Miroslav Lichvar <mlichvar@redhat.com> - 0:1.4.37-1
505fc42
- update to 1.4.37
505fc42
3aa685b
* Wed Mar 22 2017 Miroslav Lichvar <mlichvar@redhat.com> - 0:1.4.36-1
3aa685b
- update to 1.4.36
3aa685b
3f3e760
* Mon Feb 27 2017 Miroslav Lichvar <mlichvar@redhat.com> - 0:1.4.35-1
3f3e760
- update to 1.4.35
3f3e760
0586fc3
* Wed Feb 15 2017 Joe Orton <jorton@redhat.com> - 0:1.4.34-3
653c86f
- fix gcc 7 format-truncation error (#1423934)
0586fc3
c69d407
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0:1.4.34-2
c69d407
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
c69d407
a0f9847
* Mon Jan 16 2017 Miroslav Lichvar <mlichvar@redhat.com> - 0:1.4.34-1
a0f9847
- update to 1.4.34
a0f9847
1e272f8
* Tue Nov 01 2016 Miroslav Lichvar <mlichvar@redhat.com> - 0:1.4.33-1
1e272f8
- update to 1.4.33 (CVE-2016-8704, CVE-2016-8705, CVE-2016-8706)
1e272f8
a71a586
* Thu Oct 13 2016 Miroslav Lichvar <mlichvar@redhat.com> - 0:1.4.32-1
a71a586
- update to 1.4.32
a71a586
b6aaa86
* Wed Sep 07 2016 Miroslav Lichvar <mlichvar@redhat.com> - 0:1.4.31-1
b6aaa86
- update to 1.4.31
70a932c
- disable testing for now
b6aaa86
c82d7c7
* Fri Aug 12 2016 Miroslav Lichvar <mlichvar@redhat.com> - 0:1.4.30-1
c82d7c7
- update to 1.4.30
c82d7c7
1fcfb8c
* Thu Jul 14 2016 Miroslav Lichvar <mlichvar@redhat.com> - 0:1.4.29-1
1fcfb8c
- update to 1.4.29
1fcfb8c
196f436
* Tue Jul 12 2016 Miroslav Lichvar <mlichvar@redhat.com> - 0:1.4.28-1
196f436
- update to 1.4.28
196f436
- listen only on loopback interface by default (#1182542)
196f436
- use upstream unit file (#1350939)
196f436
- remove obsolete macros and scriptlet
196f436
3aeb7f4
* Tue Jun 21 2016 Miroslav Lichvar <mlichvar@redhat.com> - 0:1.4.26-1
3aeb7f4
- update to 1.4.26
3aeb7f4
36f92ae
* Tue Feb 23 2016 Miroslav Lichvar <mlichvar@redhat.com> - 0:1.4.25-1
36f92ae
- update to 1.4.25
36f92ae
- enable SASL support (#815050)
36f92ae
- remove obsolete macros
36f92ae
28e6ab3
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0:1.4.17-5
28e6ab3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
28e6ab3
88f3cb8
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.4.17-4
88f3cb8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
88f3cb8
64c13e4
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.4.17-3
64c13e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
64c13e4
5a0e477
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.4.17-2
5a0e477
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
5a0e477
204d8e1
* Wed Jan 15 2014 Miroslav Lichvar <mlichvar@redhat.com> - 0:1.4.17-1
204d8e1
- update to 1.4.17
d69e001
- fix building with -Werror=format-security in CFLAGS
204d8e1
ebbcfb4
* Wed Aug 07 2013 Miroslav Lichvar <mlichvar@redhat.com> - 0:1.4.15-7
ebbcfb4
- buildrequire systemd-units (#992221)
ebbcfb4
- update memcached man page
ebbcfb4
- add memcached-tool man page
ebbcfb4
c6a7d32
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.4.15-6
c6a7d32
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
c6a7d32
2f6a289
* Wed Jul 17 2013 Petr Pisar <ppisar@redhat.com> - 0:1.4.15-5
2f6a289
- Perl 5.18 rebuild
2f6a289
681e30c
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.4.15-4
681e30c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
681e30c
a875167
* Thu Dec 20 2012 Miroslav Lichvar <mlichvar@redhat.com> - 0:1.4.15-3
a875167
- compile with full RELRO
a875167
185350a
* Tue Nov 20 2012 Joe Orton <jorton@redhat.com> - 0:1.4.15-2
185350a
- BR perl(Test::Harness)
185350a
41935ef
* Tue Nov 20 2012 Joe Orton <jorton@redhat.com> - 0:1.4.15-1
41935ef
- update to 1.4.15 (#782395)
41935ef
- switch to simple systemd service (#878198)
41935ef
- use systemd scriptlet macros (Václav Pavlín, #850204)
41935ef
b2b1ac2
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.4.13-3
b2b1ac2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
b2b1ac2
5db2e5a
* Fri May 04 2012 Jon Ciesla <limburgher@gmail.com> - 0:1.4.13-2
5db2e5a
- Migrate to systemd, 783112.
5db2e5a
8797447
* Tue Feb  7 2012 Paul Lindner <lindner@mirth.inuus.com> - 0:1.4.13-1
8797447
- Upgrade to memcached 1.4.13
8797447
- http://code.google.com/p/memcached/wiki/ReleaseNotes1413
8797447
- http://code.google.com/p/memcached/wiki/ReleaseNotes1412
8797447
- http://code.google.com/p/memcached/wiki/ReleaseNotes1411
8797447
60b6370
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.4.10-2
60b6370
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
60b6370
c492123
* Wed Nov  9 2011 Paul Lindner <lindner@mirth.inuus.com> - 0:1.4.10-1
c492123
- Upgrade to memcached 1.4.10 (http://code.google.com/p/memcached/wiki/ReleaseNotes1410)
c492123
8ca78cb
* Tue Aug 16 2011 Paul Lindner <lindner@inuus.com> - 0:1.4.7-1
8ca78cb
- Upgrade to memcached 1.4.7 (http://code.google.com/p/memcached/wiki/ReleaseNotes147)
8ca78cb
- Fix some rpmlint errors/warnings.
8ca78cb
f45a5bc
* Tue Aug  2 2011 Paul Lindner <lindner@inuus.com> - 0:1.4.6-1
f45a5bc
- Upgrade to memcached-1.4.6
f45a5bc
0c09c03
* Wed Feb 16 2011 Joe Orton <jorton@redhat.com> - 0:1.4.5-7
0c09c03
- fix build
0c09c03
4ad83c2
* Mon Feb 14 2011 Paul Lindner <lindner@inuus.com> - 0:1.4.5-6
4ad83c2
- Rebuild for updated libevent
4ad83c2
992e5a1
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.4.5-5
992e5a1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
992e5a1
4ad83c2
* Sun Nov 28 2010 Paul Lindner <lindner@inuus.com> - 0:1.4.5-4
f95f6cb
- Add code to deal with /var/run/memcached on tmpfs
f95f6cb
dacc6d4
* Wed Sep  8 2010 Paul Lindner <lindner@inuus.com> - 0:1.4.5-3
dacc6d4
- Apply patch from memcached issue #60, solves Bugzilla 631051
dacc6d4
507fad5
* Wed May 26 2010 Joe Orton <jorton@redhat.com> - 0:1.4.5-2
507fad5
- LSB compliance fixes for init script
507fad5
- don't run the test suite as root
507fad5
- ensure a constant timestamp on the sysconfig file
507fad5
02ba636
* Sun Apr  4 2010 Paul Lindner <lindner@inuus.com> - 0:1.4.5-1
02ba636
- Upgrade to upstream memcached-1.4.5 (http://code.google.com/p/memcached/wiki/ReleaseNotes145)
02ba636
fe67e9f
* Wed Jan 20 2010 Paul Lindner <lindner@inuus.com> - 0:1.4.4-2
fe67e9f
- Remove SELinux policies fixes Bugzilla 557073
fe67e9f
1862bb7
* Sat Nov 28 2009 Paul Lindner <lindner@inuus.com> - 0:1.4.4-1
1862bb7
- Upgraded to upstream memcached-1.4.4 (http://code.google.com/p/memcached/wiki/ReleaseNotes144)
1862bb7
- Add explicit Epoch to fix issue with broken devel dependencies (resolves 542001)
1862bb7
1862bb7
* Thu Nov 12 2009 Paul Lindner <lindner@inuus.com> - 1.4.3-1
1ab5cfa
- Add explicit require on memcached for memcached-devel (resolves 537046)
1ab5cfa
- enable-threads option no longer needed
1ab5cfa
- Update web site address
1ab5cfa
d23f0c6
* Wed Nov 11 2009 Paul Lindner <lindner@inuus.com> - 1.4.3-1
d23f0c6
- Upgrade to memcached-1.4.3
d23f0c6
76248e2
* Mon Oct 12 2009 Paul Lindner <lindner@inuus.com> - 1.4.2-1
76248e2
- Upgrade to memcached-1.4.2
76248e2
- Addresses CVE-2009-2415
76248e2
4dea1b0
* Sat Aug 29 2009 Paul Lindner <lindner@inuus.com> - 1.4.1-1
8ca78cb
- Upgrade to 1.4.1
4dea1b0
- http://code.google.com/p/memcached/wiki/ReleaseNotes141
4dea1b0
f6f5f83
* Wed Apr 29 2009 Paul Lindner <lindner@inuus.com> - 1.2.8-1
f6f5f83
- Upgrade to memcached-1.2.8
f6f5f83
- Addresses CVE-2009-1255
f6f5f83
07c829e
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.6-2
07c829e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
07c829e
cfc5f85
* Tue Jul 29 2008 Paul Lindner <lindner@inuus.com> - 1.2.6-1
cfc5f85
- Upgrade to memcached-1.2.6
cfc5f85
7bbc263
* Tue Mar  4 2008 Paul Lindner <lindner@inuus.com> - 1.2.5-1
7bbc263
- Upgrade to memcached-1.2.5
7bbc263
6fd5609
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.2.4-4
6fd5609
- Autorebuild for GCC 4.3
6fd5609
4e7d0fa
* Sun Jan 27 2008 Paul Lindner <lindner@inuus.com> - 1.2.4-3
4e7d0fa
- Adjust libevent dependencies
4e7d0fa
4e7d0fa
* Sat Dec 22 2007 Paul Lindner <lindner@inuus.com> - 1.2.4-2
55b1212
- Upgrade to memcached-1.2.4
55b1212
55b1212
* Fri Sep 07 2007 Konstantin Ryabitsev <icon@fedoraproject.org> - 1.2.3-8
55b1212
- Add selinux policies
55b1212
- Create our own system user
55b1212
fdeed36
* Mon Aug  6 2007 Paul Lindner <lindner@inuus.com> - 1.2.3-7
888f13f
- Fix problem with -P and -d flag combo on x86_64
888f13f
- Fix init script for FC-6
888f13f
f858079
* Fri Jul 13 2007 Paul Lindner <lindner@inuus.com> - 1.2.3-4
f858079
- Remove test that fails in fedora build system on ppc64
80d6042
80d6042
* Sat Jul  7 2007 root <lindner@inuus.com> - 1.2.3-2
618683d
- Upgrade to 1.2.3 upstream
618683d
- Adjust make install to preserve man page timestamp
618683d
- Conform with LSB init scripts standards, add force-reload
618683d
618683d
* Wed Jul  4 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-5
618683d
- Use /var/run/memcached/ directory to hold PID file
618683d
618683d
* Sat May 12 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-4
618683d
- Remove tabs from spec file, rpmlint reports no more errors
618683d
618683d
* Thu May 10 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-3
618683d
- Enable build-time regression tests
618683d
- add dependency on initscripts
618683d
- remove memcached-debug (not needed in dist)
618683d
- above suggestions from Bernard Johnson
618683d
618683d
* Mon May  7 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-2
618683d
- Tidyness improvements suggested by Ruben Kerkhof in bugzilla #238994
618683d
618683d
* Fri May  4 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-1
618683d
- Initial spec file created via rpmdev-newspec