memcached/memcached.spec

251 lines
7.3 KiB
RPMSpec
Raw Normal View History

%define username memcached
%define groupname memcached
2007-07-10 20:00:32 +00:00
Name: memcached
Version: 1.4.5
2011-02-16 16:57:13 +00:00
Release: 7%{?dist}
Epoch: 0
2007-07-10 20:00:32 +00:00
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
2007-07-10 20:00:32 +00:00
# custom init script
Source1: memcached.sysv
# Patches
# From http://code.google.com/p/memcached/issues/detail?id=60
Patch001: memcached-1.4.5-issue60.diff
# Fixes
2007-07-10 20:00:32 +00:00
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libevent-devel
BuildRequires: perl(Test::More)
2008-01-27 15:33:48 +00:00
Requires: initscripts
Requires: libevent
Requires(pre): shadow-utils
2007-07-10 20:00:32 +00:00
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig, /sbin/service
Requires(postun): /sbin/service
# as of 3.5.5-4 selinux has memcache included
Obsoletes: memcached-selinux
2007-07-10 20:00:32 +00:00
%description
memcached is a high-performance, distributed memory object caching
system, generic in nature, but intended for use in speeding up dynamic
web applications by alleviating database load.
%package devel
Summary: Files needed for development using memcached protocol
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.
2007-07-10 20:00:32 +00:00
%prep
%setup -q
%patch001 -p1
2007-07-10 20:00:32 +00:00
%build
%configure
2011-02-16 17:17:16 +00:00
sed -i 's/-Werror/ /' Makefile
2007-07-10 20:00:32 +00:00
make %{?_smp_mflags}
%check
# whitespace tests fail locally on fedpkg systems now that they use git
rm -f t/whitespace.t
# Parts of the test suite only succeed as non-root.
if [ `id -u` -ne 0 ]; then
# remove failing test that doesn't work in
# build systems
rm -f t/daemonize.t
fi
make test
2007-07-10 20:00:32 +00:00
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot} INSTALL="%{__install} -p"
# remove memcached-debug
rm -f %{buildroot}/%{_bindir}/memcached-debug
# Perl script for monitoring memcached
install -Dp -m0755 scripts/memcached-tool %{buildroot}%{_bindir}/memcached-tool
# Init script
install -Dp -m0755 %{SOURCE1} %{buildroot}%{_initrddir}/memcached
# Default configs
mkdir -p %{buildroot}/%{_sysconfdir}/sysconfig
cat <<EOF >%{buildroot}/%{_sysconfdir}/sysconfig/%{name}
PORT="11211"
USER="%{username}"
2007-07-10 20:00:32 +00:00
MAXCONN="1024"
CACHESIZE="64"
OPTIONS=""
EOF
# Constant timestamp on the config file.
touch -r %{SOURCE1} %{buildroot}/%{_sysconfdir}/sysconfig/%{name}
2007-07-10 20:00:32 +00:00
# pid directory
mkdir -p %{buildroot}/%{_localstatedir}/run/memcached
%clean
rm -rf %{buildroot}
%pre
getent group %{groupname} >/dev/null || groupadd -r %{groupname}
getent passwd %{username} >/dev/null || \
useradd -r -g %{groupname} -d %{_localstatedir}/run/memcached \
-s /sbin/nologin -c "Memcached daemon" %{username}
exit 0
2007-07-10 20:00:32 +00:00
%post
/sbin/chkconfig --add %{name}
2007-07-10 20:00:32 +00:00
%preun
if [ "$1" = 0 ] ; then
/sbin/service %{name} stop > /dev/null 2>&1
/sbin/chkconfig --del %{name}
fi
exit 0
2007-07-10 20:00:32 +00:00
%postun
if [ "$1" -ge 1 ]; then
/sbin/service %{name} condrestart > /dev/null 2>&1
fi
exit 0
%files
%defattr(-,root,root,-)
2009-10-12 22:22:43 +00:00
%doc AUTHORS ChangeLog COPYING NEWS README doc/CONTRIBUTORS doc/*.txt
2007-07-10 20:00:32 +00:00
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%ghost %dir %attr(755,%{username},%{groupname}) %{_localstatedir}/run/memcached
2007-07-10 20:00:32 +00:00
%{_bindir}/memcached-tool
%{_bindir}/memcached
%{_mandir}/man1/memcached.1*
%{_initrddir}/memcached
%files devel
%defattr(-,root,root,0755)
%{_includedir}/memcached/*
2007-07-10 20:00:32 +00:00
%changelog
2011-02-16 16:57:13 +00:00
* Wed Feb 16 2011 Joe Orton <jorton@redhat.com> - 0:1.4.5-7
- fix build
2011-02-14 09:34:15 +00:00
* Mon Feb 14 2011 Paul Lindner <lindner@inuus.com> - 0:1.4.5-6
- Rebuild for updated libevent
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.4.5-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
2011-02-14 09:34:15 +00:00
* Sun Nov 28 2010 Paul Lindner <lindner@inuus.com> - 0:1.4.5-4
- Add code to deal with /var/run/memcached on tmpfs
* Wed Sep 8 2010 Paul Lindner <lindner@inuus.com> - 0:1.4.5-3
- Apply patch from memcached issue #60, solves Bugzilla 631051
* Wed May 26 2010 Joe Orton <jorton@redhat.com> - 0:1.4.5-2
- LSB compliance fixes for init script
- don't run the test suite as root
- ensure a constant timestamp on the sysconfig file
* Sun Apr 4 2010 Paul Lindner <lindner@inuus.com> - 0:1.4.5-1
- Upgrade to upstream memcached-1.4.5 (http://code.google.com/p/memcached/wiki/ReleaseNotes145)
* Wed Jan 20 2010 Paul Lindner <lindner@inuus.com> - 0:1.4.4-2
- Remove SELinux policies fixes Bugzilla 557073
* Sat Nov 28 2009 Paul Lindner <lindner@inuus.com> - 0:1.4.4-1
- Upgraded to upstream memcached-1.4.4 (http://code.google.com/p/memcached/wiki/ReleaseNotes144)
- Add explicit Epoch to fix issue with broken devel dependencies (resolves 542001)
* Thu Nov 12 2009 Paul Lindner <lindner@inuus.com> - 1.4.3-1
- Add explicit require on memcached for memcached-devel (resolves 537046)
- enable-threads option no longer needed
- Update web site address
2009-11-11 18:37:14 +00:00
* Wed Nov 11 2009 Paul Lindner <lindner@inuus.com> - 1.4.3-1
- Upgrade to memcached-1.4.3
2009-10-12 22:22:43 +00:00
* Mon Oct 12 2009 Paul Lindner <lindner@inuus.com> - 1.4.2-1
- Upgrade to memcached-1.4.2
- Addresses CVE-2009-2415
2009-08-30 04:03:16 +00:00
* Sat Aug 29 2009 Paul Lindner <lindner@inuus.com> - 1.4.1-1
- Upgrade to 1.4.1
- http://code.google.com/p/memcached/wiki/ReleaseNotes141
* Wed Apr 29 2009 Paul Lindner <lindner@inuus.com> - 1.2.8-1
- Upgrade to memcached-1.2.8
- Addresses CVE-2009-1255
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
2008-07-29 18:26:28 +00:00
* Tue Jul 29 2008 Paul Lindner <lindner@inuus.com> - 1.2.6-1
- Upgrade to memcached-1.2.6
2008-03-04 11:53:21 +00:00
* Tue Mar 4 2008 Paul Lindner <lindner@inuus.com> - 1.2.5-1
- Upgrade to memcached-1.2.5
2008-02-19 19:52:32 +00:00
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.2.4-4
- Autorebuild for GCC 4.3
2008-01-27 15:33:48 +00:00
* Sun Jan 27 2008 Paul Lindner <lindner@inuus.com> - 1.2.4-3
- Adjust libevent dependencies
* Sat Dec 22 2007 Paul Lindner <lindner@inuus.com> - 1.2.4-2
- Upgrade to memcached-1.2.4
* Fri Sep 07 2007 Konstantin Ryabitsev <icon@fedoraproject.org> - 1.2.3-8
- Add selinux policies
- Create our own system user
* Mon Aug 6 2007 Paul Lindner <lindner@inuus.com> - 1.2.3-7
- Fix problem with -P and -d flag combo on x86_64
- Fix init script for FC-6
* Fri Jul 13 2007 Paul Lindner <lindner@inuus.com> - 1.2.3-4
- Remove test that fails in fedora build system on ppc64
* Sat Jul 7 2007 root <lindner@inuus.com> - 1.2.3-2
2007-07-10 20:00:32 +00:00
- Upgrade to 1.2.3 upstream
- Adjust make install to preserve man page timestamp
- Conform with LSB init scripts standards, add force-reload
* Wed Jul 4 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-5
- Use /var/run/memcached/ directory to hold PID file
* Sat May 12 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-4
- Remove tabs from spec file, rpmlint reports no more errors
* Thu May 10 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-3
- Enable build-time regression tests
- add dependency on initscripts
- remove memcached-debug (not needed in dist)
- above suggestions from Bernard Johnson
* Mon May 7 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-2
- Tidyness improvements suggested by Ruben Kerkhof in bugzilla #238994
* Fri May 4 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-1
- Initial spec file created via rpmdev-newspec