|
|
9bbaee |
%define username memcached
|
|
|
9bbaee |
%define groupname memcached
|
|
|
9bbaee |
|
|
|
9bbaee |
Name: memcached
|
|
|
9bbaee |
Version: 1.4.15
|
|
|
e2a29e |
Release: 9%{?dist}
|
|
|
9bbaee |
Epoch: 0
|
|
|
9bbaee |
Summary: High Performance, Distributed Memory Object Cache
|
|
|
9bbaee |
|
|
|
9bbaee |
Group: System Environment/Daemons
|
|
|
9bbaee |
License: BSD
|
|
|
9bbaee |
URL: http://www.memcached.org/
|
|
|
9bbaee |
Source0: http://memcached.googlecode.com/files/%{name}-%{version}.tar.gz
|
|
|
9bbaee |
|
|
|
9bbaee |
# custom unit file
|
|
|
9bbaee |
Source1: memcached.service
|
|
|
9bbaee |
|
|
|
9bbaee |
# Patches
|
|
|
9bbaee |
Patch001: memcached-manpages.patch
|
|
|
e2a29e |
Patch002: memcached-CVE-2011-4971.patch
|
|
|
e2a29e |
Patch003: memcached-CVE-2013-0179_7290_7291.patch
|
|
|
9bbaee |
|
|
|
9bbaee |
# Fixes
|
|
|
9bbaee |
|
|
|
9bbaee |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
9bbaee |
|
|
|
9bbaee |
BuildRequires: libevent-devel
|
|
|
9bbaee |
BuildRequires: perl(Test::More), perl(Test::Harness)
|
|
|
9bbaee |
BuildRequires: systemd-units
|
|
|
9bbaee |
|
|
|
9bbaee |
Requires(post): systemd
|
|
|
9bbaee |
Requires(preun): systemd
|
|
|
9bbaee |
Requires(postun): systemd
|
|
|
9bbaee |
# For triggerun
|
|
|
9bbaee |
Requires(post): systemd-sysv
|
|
|
9bbaee |
Requires(pre): shadow-utils
|
|
|
9bbaee |
|
|
|
9bbaee |
|
|
|
9bbaee |
# as of 3.5.5-4 selinux has memcache included
|
|
|
9bbaee |
Obsoletes: memcached-selinux
|
|
|
9bbaee |
|
|
|
9bbaee |
%description
|
|
|
9bbaee |
memcached is a high-performance, distributed memory object caching
|
|
|
9bbaee |
system, generic in nature, but intended for use in speeding up dynamic
|
|
|
9bbaee |
web applications by alleviating database load.
|
|
|
9bbaee |
|
|
|
9bbaee |
%package devel
|
|
|
9bbaee |
Summary: Files needed for development using memcached protocol
|
|
|
9bbaee |
Group: Development/Libraries
|
|
|
9bbaee |
Requires: %{name} = %{epoch}:%{version}-%{release}
|
|
|
9bbaee |
|
|
|
9bbaee |
%description devel
|
|
|
9bbaee |
Install memcached-devel if you are developing C/C++ applications that require
|
|
|
9bbaee |
access to the memcached binary include files.
|
|
|
9bbaee |
|
|
|
9bbaee |
%prep
|
|
|
9bbaee |
%setup -q
|
|
|
9bbaee |
%patch001 -p1 -b .manpages
|
|
|
e2a29e |
%patch002 -p1 -b .CVE-2011-4971
|
|
|
e2a29e |
%patch003 -p1 -b .CVE-2013-0179_7290_7291
|
|
|
9bbaee |
|
|
|
9bbaee |
%build
|
|
|
9bbaee |
# compile with full RELRO
|
|
|
9bbaee |
export CFLAGS="%{optflags} -pie -fpie"
|
|
|
9bbaee |
export LDFLAGS="-Wl,-z,relro,-z,now"
|
|
|
9bbaee |
|
|
|
9bbaee |
%configure
|
|
|
9bbaee |
sed -i 's/-Werror/ /' Makefile
|
|
|
9bbaee |
make %{?_smp_mflags}
|
|
|
9bbaee |
|
|
|
9bbaee |
%check
|
|
|
9bbaee |
# whitespace tests fail locally on fedpkg systems now that they use git
|
|
|
9bbaee |
rm -f t/whitespace.t
|
|
|
9bbaee |
|
|
|
9bbaee |
# Parts of the test suite only succeed as non-root.
|
|
|
9bbaee |
if [ `id -u` -ne 0 ]; then
|
|
|
9bbaee |
# remove failing test that doesn't work in
|
|
|
9bbaee |
# build systems
|
|
|
9bbaee |
rm -f t/daemonize.t
|
|
|
9bbaee |
fi
|
|
|
9bbaee |
make test
|
|
|
9bbaee |
|
|
|
9bbaee |
%install
|
|
|
9bbaee |
rm -rf %{buildroot}
|
|
|
9bbaee |
make install DESTDIR=%{buildroot} INSTALL="%{__install} -p"
|
|
|
9bbaee |
# remove memcached-debug
|
|
|
9bbaee |
rm -f %{buildroot}/%{_bindir}/memcached-debug
|
|
|
9bbaee |
|
|
|
9bbaee |
# Perl script for monitoring memcached
|
|
|
9bbaee |
install -Dp -m0755 scripts/memcached-tool %{buildroot}%{_bindir}/memcached-tool
|
|
|
9bbaee |
install -Dp -m0644 scripts/memcached-tool.1 \
|
|
|
9bbaee |
%{buildroot}%{_mandir}/man1/memcached-tool.1
|
|
|
9bbaee |
|
|
|
9bbaee |
# Unit file
|
|
|
9bbaee |
install -Dp -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/memcached.service
|
|
|
9bbaee |
|
|
|
9bbaee |
# Default configs
|
|
|
9bbaee |
mkdir -p %{buildroot}/%{_sysconfdir}/sysconfig
|
|
|
9bbaee |
cat <<EOF >%{buildroot}/%{_sysconfdir}/sysconfig/%{name}
|
|
|
9bbaee |
PORT="11211"
|
|
|
9bbaee |
USER="%{username}"
|
|
|
9bbaee |
MAXCONN="1024"
|
|
|
9bbaee |
CACHESIZE="64"
|
|
|
9bbaee |
OPTIONS=""
|
|
|
9bbaee |
EOF
|
|
|
9bbaee |
|
|
|
9bbaee |
# Constant timestamp on the config file.
|
|
|
9bbaee |
touch -r %{SOURCE1} %{buildroot}/%{_sysconfdir}/sysconfig/%{name}
|
|
|
9bbaee |
|
|
|
9bbaee |
%clean
|
|
|
9bbaee |
rm -rf %{buildroot}
|
|
|
9bbaee |
|
|
|
9bbaee |
|
|
|
9bbaee |
%pre
|
|
|
9bbaee |
getent group %{groupname} >/dev/null || groupadd -r %{groupname}
|
|
|
9bbaee |
getent passwd %{username} >/dev/null || \
|
|
|
9bbaee |
useradd -r -g %{groupname} -d /run/memcached \
|
|
|
9bbaee |
-s /sbin/nologin -c "Memcached daemon" %{username}
|
|
|
9bbaee |
exit 0
|
|
|
9bbaee |
|
|
|
9bbaee |
|
|
|
9bbaee |
%post
|
|
|
9bbaee |
%systemd_post memcached.service
|
|
|
9bbaee |
|
|
|
9bbaee |
|
|
|
9bbaee |
%preun
|
|
|
9bbaee |
%systemd_preun memcached.service
|
|
|
9bbaee |
|
|
|
9bbaee |
|
|
|
9bbaee |
%postun
|
|
|
9bbaee |
%systemd_postun_with_restart memcached.service
|
|
|
9bbaee |
|
|
|
9bbaee |
%triggerun -- memcached < 0:1.4.13-2
|
|
|
9bbaee |
# Save the current service runlevel info
|
|
|
9bbaee |
# User must manually run systemd-sysv-convert --apply memcached
|
|
|
9bbaee |
# to migrate them to systemd targets
|
|
|
9bbaee |
/usr/bin/systemd-sysv-convert --save memcached >/dev/null 2>&1 ||:
|
|
|
9bbaee |
|
|
|
9bbaee |
# Run these because the SysV package being removed won't do them
|
|
|
9bbaee |
/sbin/chkconfig --del memcached >/dev/null 2>&1 || :
|
|
|
9bbaee |
/bin/systemctl try-restart memcached.service >/dev/null 2>&1 || :
|
|
|
9bbaee |
|
|
|
9bbaee |
|
|
|
9bbaee |
%files
|
|
|
9bbaee |
%defattr(-,root,root,-)
|
|
|
9bbaee |
%doc AUTHORS ChangeLog COPYING NEWS README.md doc/CONTRIBUTORS doc/*.txt
|
|
|
9bbaee |
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
|
|
|
9bbaee |
%{_bindir}/memcached-tool
|
|
|
9bbaee |
%{_bindir}/memcached
|
|
|
9bbaee |
%{_mandir}/man1/memcached-tool.1*
|
|
|
9bbaee |
%{_mandir}/man1/memcached.1*
|
|
|
9bbaee |
%{_unitdir}/memcached.service
|
|
|
9bbaee |
|
|
|
9bbaee |
|
|
|
9bbaee |
%files devel
|
|
|
9bbaee |
%defattr(-,root,root,0755)
|
|
|
9bbaee |
%{_includedir}/memcached/*
|
|
|
9bbaee |
|
|
|
9bbaee |
%changelog
|
|
|
e2a29e |
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 01.4.15-9
|
|
|
e2a29e |
- Mass rebuild 2014-01-24
|
|
|
e2a29e |
|
|
|
e2a29e |
* Tue Jan 14 2014 Miroslav Lichvar <mlichvar@redhat.com> - 0:1.4.15-8
|
|
|
e2a29e |
- fix unbound key printing (CVE-2013-0179, CVE-2013-7290, CVE-2013-7291)
|
|
|
e2a29e |
|
|
|
e2a29e |
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 01.4.15-7
|
|
|
e2a29e |
- Mass rebuild 2013-12-27
|
|
|
e2a29e |
|
|
|
e2a29e |
* Thu Dec 12 2013 Miroslav Lichvar <mlichvar@redhat.com> - 0:1.4.15-6
|
|
|
e2a29e |
- fix segfault on specially crafted packet (#988739, CVE-2011-4971)
|
|
|
e2a29e |
|
|
|
9bbaee |
* Mon Jul 08 2013 Miroslav Lichvar <mlichvar@redhat.com> - 0:1.4.15-5
|
|
|
9bbaee |
- update memcached man page
|
|
|
9bbaee |
- add memcached-tool man page
|
|
|
9bbaee |
- buildrequire systemd-units
|
|
|
9bbaee |
|
|
|
9bbaee |
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.4.15-4
|
|
|
9bbaee |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
|
9bbaee |
|
|
|
9bbaee |
* Thu Dec 20 2012 Miroslav Lichvar <mlichvar@redhat.com> - 0:1.4.15-3
|
|
|
9bbaee |
- compile with full RELRO
|
|
|
9bbaee |
|
|
|
9bbaee |
* Tue Nov 20 2012 Joe Orton <jorton@redhat.com> - 0:1.4.15-2
|
|
|
9bbaee |
- BR perl(Test::Harness)
|
|
|
9bbaee |
|
|
|
9bbaee |
* Tue Nov 20 2012 Joe Orton <jorton@redhat.com> - 0:1.4.15-1
|
|
|
9bbaee |
- update to 1.4.15 (#782395)
|
|
|
9bbaee |
- switch to simple systemd service (#878198)
|
|
|
9bbaee |
- use systemd scriptlet macros (Václav PavlÃn, #850204)
|
|
|
9bbaee |
|
|
|
9bbaee |
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.4.13-3
|
|
|
9bbaee |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
|
|
9bbaee |
|
|
|
9bbaee |
* Fri May 04 2012 Jon Ciesla <limburgher@gmail.com> - 0:1.4.13-2
|
|
|
9bbaee |
- Migrate to systemd, 783112.
|
|
|
9bbaee |
|
|
|
9bbaee |
* Tue Feb 7 2012 Paul Lindner <lindner@mirth.inuus.com> - 0:1.4.13-1
|
|
|
9bbaee |
- Upgrade to memcached 1.4.13
|
|
|
9bbaee |
- http://code.google.com/p/memcached/wiki/ReleaseNotes1413
|
|
|
9bbaee |
- http://code.google.com/p/memcached/wiki/ReleaseNotes1412
|
|
|
9bbaee |
- http://code.google.com/p/memcached/wiki/ReleaseNotes1411
|
|
|
9bbaee |
|
|
|
9bbaee |
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.4.10-2
|
|
|
9bbaee |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
|
|
9bbaee |
|
|
|
9bbaee |
* Wed Nov 9 2011 Paul Lindner <lindner@mirth.inuus.com> - 0:1.4.10-1
|
|
|
9bbaee |
- Upgrade to memcached 1.4.10 (http://code.google.com/p/memcached/wiki/ReleaseNotes1410)
|
|
|
9bbaee |
|
|
|
9bbaee |
* Tue Aug 16 2011 Paul Lindner <lindner@inuus.com> - 0:1.4.7-1
|
|
|
9bbaee |
- Upgrade to memcached 1.4.7 (http://code.google.com/p/memcached/wiki/ReleaseNotes147)
|
|
|
9bbaee |
- Fix some rpmlint errors/warnings.
|
|
|
9bbaee |
|
|
|
9bbaee |
* Tue Aug 2 2011 Paul Lindner <lindner@inuus.com> - 0:1.4.6-1
|
|
|
9bbaee |
- Upgrade to memcached-1.4.6
|
|
|
9bbaee |
|
|
|
9bbaee |
* Wed Feb 16 2011 Joe Orton <jorton@redhat.com> - 0:1.4.5-7
|
|
|
9bbaee |
- fix build
|
|
|
9bbaee |
|
|
|
9bbaee |
* Mon Feb 14 2011 Paul Lindner <lindner@inuus.com> - 0:1.4.5-6
|
|
|
9bbaee |
- Rebuild for updated libevent
|
|
|
9bbaee |
|
|
|
9bbaee |
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.4.5-5
|
|
|
9bbaee |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
|
|
9bbaee |
|
|
|
9bbaee |
* Sun Nov 28 2010 Paul Lindner <lindner@inuus.com> - 0:1.4.5-4
|
|
|
9bbaee |
- Add code to deal with /var/run/memcached on tmpfs
|
|
|
9bbaee |
|
|
|
9bbaee |
* Wed Sep 8 2010 Paul Lindner <lindner@inuus.com> - 0:1.4.5-3
|
|
|
9bbaee |
- Apply patch from memcached issue #60, solves Bugzilla 631051
|
|
|
9bbaee |
|
|
|
9bbaee |
* Wed May 26 2010 Joe Orton <jorton@redhat.com> - 0:1.4.5-2
|
|
|
9bbaee |
- LSB compliance fixes for init script
|
|
|
9bbaee |
- don't run the test suite as root
|
|
|
9bbaee |
- ensure a constant timestamp on the sysconfig file
|
|
|
9bbaee |
|
|
|
9bbaee |
* Sun Apr 4 2010 Paul Lindner <lindner@inuus.com> - 0:1.4.5-1
|
|
|
9bbaee |
- Upgrade to upstream memcached-1.4.5 (http://code.google.com/p/memcached/wiki/ReleaseNotes145)
|
|
|
9bbaee |
|
|
|
9bbaee |
* Wed Jan 20 2010 Paul Lindner <lindner@inuus.com> - 0:1.4.4-2
|
|
|
9bbaee |
- Remove SELinux policies fixes Bugzilla 557073
|
|
|
9bbaee |
|
|
|
9bbaee |
* Sat Nov 28 2009 Paul Lindner <lindner@inuus.com> - 0:1.4.4-1
|
|
|
9bbaee |
- Upgraded to upstream memcached-1.4.4 (http://code.google.com/p/memcached/wiki/ReleaseNotes144)
|
|
|
9bbaee |
- Add explicit Epoch to fix issue with broken devel dependencies (resolves 542001)
|
|
|
9bbaee |
|
|
|
9bbaee |
* Thu Nov 12 2009 Paul Lindner <lindner@inuus.com> - 1.4.3-1
|
|
|
9bbaee |
- Add explicit require on memcached for memcached-devel (resolves 537046)
|
|
|
9bbaee |
- enable-threads option no longer needed
|
|
|
9bbaee |
- Update web site address
|
|
|
9bbaee |
|
|
|
9bbaee |
* Wed Nov 11 2009 Paul Lindner <lindner@inuus.com> - 1.4.3-1
|
|
|
9bbaee |
- Upgrade to memcached-1.4.3
|
|
|
9bbaee |
|
|
|
9bbaee |
* Mon Oct 12 2009 Paul Lindner <lindner@inuus.com> - 1.4.2-1
|
|
|
9bbaee |
- Upgrade to memcached-1.4.2
|
|
|
9bbaee |
- Addresses CVE-2009-2415
|
|
|
9bbaee |
|
|
|
9bbaee |
* Sat Aug 29 2009 Paul Lindner <lindner@inuus.com> - 1.4.1-1
|
|
|
9bbaee |
- Upgrade to 1.4.1
|
|
|
9bbaee |
- http://code.google.com/p/memcached/wiki/ReleaseNotes141
|
|
|
9bbaee |
|
|
|
9bbaee |
* Wed Apr 29 2009 Paul Lindner <lindner@inuus.com> - 1.2.8-1
|
|
|
9bbaee |
- Upgrade to memcached-1.2.8
|
|
|
9bbaee |
- Addresses CVE-2009-1255
|
|
|
9bbaee |
|
|
|
9bbaee |
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.6-2
|
|
|
9bbaee |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
|
|
9bbaee |
|
|
|
9bbaee |
* Tue Jul 29 2008 Paul Lindner <lindner@inuus.com> - 1.2.6-1
|
|
|
9bbaee |
- Upgrade to memcached-1.2.6
|
|
|
9bbaee |
|
|
|
9bbaee |
* Tue Mar 4 2008 Paul Lindner <lindner@inuus.com> - 1.2.5-1
|
|
|
9bbaee |
- Upgrade to memcached-1.2.5
|
|
|
9bbaee |
|
|
|
9bbaee |
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.2.4-4
|
|
|
9bbaee |
- Autorebuild for GCC 4.3
|
|
|
9bbaee |
|
|
|
9bbaee |
* Sun Jan 27 2008 Paul Lindner <lindner@inuus.com> - 1.2.4-3
|
|
|
9bbaee |
- Adjust libevent dependencies
|
|
|
9bbaee |
|
|
|
9bbaee |
* Sat Dec 22 2007 Paul Lindner <lindner@inuus.com> - 1.2.4-2
|
|
|
9bbaee |
- Upgrade to memcached-1.2.4
|
|
|
9bbaee |
|
|
|
9bbaee |
* Fri Sep 07 2007 Konstantin Ryabitsev <icon@fedoraproject.org> - 1.2.3-8
|
|
|
9bbaee |
- Add selinux policies
|
|
|
9bbaee |
- Create our own system user
|
|
|
9bbaee |
|
|
|
9bbaee |
* Mon Aug 6 2007 Paul Lindner <lindner@inuus.com> - 1.2.3-7
|
|
|
9bbaee |
- Fix problem with -P and -d flag combo on x86_64
|
|
|
9bbaee |
- Fix init script for FC-6
|
|
|
9bbaee |
|
|
|
9bbaee |
* Fri Jul 13 2007 Paul Lindner <lindner@inuus.com> - 1.2.3-4
|
|
|
9bbaee |
- Remove test that fails in fedora build system on ppc64
|
|
|
9bbaee |
|
|
|
9bbaee |
* Sat Jul 7 2007 root <lindner@inuus.com> - 1.2.3-2
|
|
|
9bbaee |
- Upgrade to 1.2.3 upstream
|
|
|
9bbaee |
- Adjust make install to preserve man page timestamp
|
|
|
9bbaee |
- Conform with LSB init scripts standards, add force-reload
|
|
|
9bbaee |
|
|
|
9bbaee |
* Wed Jul 4 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-5
|
|
|
9bbaee |
- Use /var/run/memcached/ directory to hold PID file
|
|
|
9bbaee |
|
|
|
9bbaee |
* Sat May 12 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-4
|
|
|
9bbaee |
- Remove tabs from spec file, rpmlint reports no more errors
|
|
|
9bbaee |
|
|
|
9bbaee |
* Thu May 10 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-3
|
|
|
9bbaee |
- Enable build-time regression tests
|
|
|
9bbaee |
- add dependency on initscripts
|
|
|
9bbaee |
- remove memcached-debug (not needed in dist)
|
|
|
9bbaee |
- above suggestions from Bernard Johnson
|
|
|
9bbaee |
|
|
|
9bbaee |
* Mon May 7 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-2
|
|
|
9bbaee |
- Tidyness improvements suggested by Ruben Kerkhof in bugzilla #238994
|
|
|
9bbaee |
|
|
|
9bbaee |
* Fri May 4 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-1
|
|
|
9bbaee |
- Initial spec file created via rpmdev-newspec
|