gearmand/gearmand.spec

473 lines
15 KiB
RPMSpec
Raw Normal View History

# Use systemd unit files on Fedora 18 and above.
%if 0%{?rhel} >= 7
%global _with_systemd 1
%endif
# Skip deps that are too old on EL5.
%if 0%{?el5}
%global _with_gperftools 0
%global _with_sqlite 0
%global _with_tokyocabinet 0
%else
%global _with_gperftools 1
%global _with_sqlite 1
%global _with_tokyocabinet 1
%endif
2011-02-05 00:38:07 +00:00
2009-05-05 11:53:14 +00:00
Name: gearmand
Version: 1.1.12
2014-09-09 15:14:12 +00:00
Release: 7%{?dist}
2009-05-05 11:53:14 +00:00
Summary: A distributed job system
Group: System Environment/Daemons
License: BSD
URL: http://www.gearman.org
Source0: https://launchpad.net/gearmand/1.2/%{version}/+download/gearmand-%{version}.tar.gz
Source1: gearmand.init
2009-06-22 11:25:12 +00:00
Source2: gearmand.sysconfig
Source3: gearmand.service
2014-09-09 15:14:12 +00:00
Patch0: gearmand-1.1.12-ppc64le.patch
2009-05-05 11:53:14 +00:00
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
2013-07-22 18:20:16 +00:00
# Fails to build on PPC.
# See https://bugzilla.redhat.com/987104 and https://bugzilla.redhat.com/987109
ExcludeArch: ppc ppc64
2009-05-05 11:53:14 +00:00
%if 0%{?el5}
BuildRequires: e2fsprogs-devel
BuildRequires: boost141-devel, boost141-thread
#BuildRequires: gcc44 gcc44-c++ libstdc++44-devel
%else
BuildRequires: libuuid-devel
2012-08-14 21:39:17 +00:00
BuildRequires: boost-devel >= 1.37.0, boost-thread
%endif
%if %{_with_sqlite}
BuildRequires: sqlite-devel
%endif
%if %{_with_tokyocabinet}
BuildRequires: tokyocabinet-devel
%endif
BuildRequires: libevent-devel
BuildRequires: libmemcached-devel, memcached
BuildRequires: gperf
BuildRequires: mysql-devel
BuildRequires: postgresql-devel
BuildRequires: zlib-devel
%if 0%{?_with_systemd}
BuildRequires: systemd-units
%endif
2011-02-05 00:38:07 +00:00
# For %%check
#BuildRequires: curl-devel
#%if 0%{?fedora} >= 20 || 0%{?rhel} >= 7
#BuildRequires: mariadb-server
#%else
#BuildRequires: mysql-server
#%endif
2009-05-05 11:53:14 +00:00
# google perftools available only on these
%ifarch %{ix86} x86_64 ppc
%if %{_with_gperftools}
2012-03-07 19:52:40 +00:00
BuildRequires: gperftools-devel
2009-05-05 11:53:14 +00:00
%endif
%endif
Requires(pre): shadow-utils
2009-05-05 11:53:14 +00:00
Requires: procps
%if 0%{?_with_systemd}
# This is actually needed for the %%triggerun script but Requires(triggerun)
# is not valid. We can use %%post because this particular %%triggerun script
# should fire just after this package is installed.
Requires(post): systemd-sysv
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
%else
Requires(post): chkconfig
Requires(preun): chkconfig, initscripts
%endif
2012-01-13 02:06:15 +00:00
2009-05-05 11:53:14 +00:00
%description
Gearman provides a generic framework to farm out work to other machines
or dispatch function calls to machines that are better suited to do the work.
It allows you to do work in parallel, to load balance processing, and to
call functions between languages. It can be used in a variety of applications,
from high-availability web sites to the transport for database replication.
In other words, it is the nervous system for how distributed processing
communicates.
2011-12-22 21:30:01 +00:00
%package -n libgearman
Summary: Development libraries for gearman
Group: Development/Libraries
Provides: libgearman-1.0 = %{version}-%{release}
Obsoletes: libgearman-1.0 < %{version}-%{release}
%if 0%{?el5}
# gearman requires uuid_generate_time_safe, which only exists in newer
# e2fsprogs-libs
Requires: e2fsprogs-libs >= 1.39-32
%endif
2011-12-22 21:30:01 +00:00
%description -n libgearman
Development libraries for %{name}.
2009-05-05 11:53:14 +00:00
%package -n libgearman-devel
Summary: Development headers for libgearman
Requires: pkgconfig, libgearman = %{version}-%{release}
Group: Development/Libraries
Requires: libevent-devel
Provides: libgearman-1.0-devel = %{version}-%{release}
Obsoletes: libgearman-1.0-devel < %{version}-%{release}
2009-05-05 11:53:14 +00:00
%description -n libgearman-devel
2011-12-22 21:30:01 +00:00
Development headers for %{name}.
2009-05-05 11:53:14 +00:00
%prep
%setup -q
2014-09-09 15:14:12 +00:00
%patch0 -p1
2009-05-05 11:53:14 +00:00
%if 0%{?el5}
# libgearman-1.0 requires a header that's newer than what we have on EL5.
# It looks like it's optional. (If not, we will have to build with gcc44.)
sed -i '/include <tr1\/cinttypes>/d' libgearman-1.0/gearman.h
%endif
2009-05-05 11:53:14 +00:00
%build
%if 0%{?el5}
# We have to use the parallel version of Boost
#export CC='gcc44'
#export CXX='gcc44-c++'
#export CPPFLAGS="-I%{_includedir}/boost141 -I%{_includedir}/c++/4.4.7"
export CPPFLAGS="-I%{_includedir}/boost141"
export LDFLAGS="-L%{_libdir}/boost141"
%else
# HACK to work around boost issues.
export LDFLAGS="$LDFLAGS -lboost_system"
%endif
2009-05-05 11:53:14 +00:00
2009-06-22 11:36:56 +00:00
%ifarch ppc64 sparc64
# no tcmalloc
%configure --disable-static --disable-rpath
2011-02-05 00:38:07 +00:00
%else
%configure --disable-static --disable-rpath --enable-tcmalloc
2011-02-05 00:38:07 +00:00
%endif
%if 0%{?el5}
# the sed operations may be causing this to fail on EL5
%else
2009-05-05 11:53:14 +00:00
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%endif
2012-03-07 17:40:27 +00:00
make %{_smp_mflags}
2009-05-05 11:53:14 +00:00
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
rm -v %{buildroot}%{_libdir}/libgearman*.la
install -p -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/gearmand
2009-05-05 11:53:14 +00:00
%if 0%{?_with_systemd}
# install systemd unit file
mkdir -p %{buildroot}%{_unitdir}
install -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}/%{name}.service
%else
# install legacy SysV init script
install -p -D -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/gearmand
mkdir -p %{buildroot}/var/run/gearmand
%endif
mkdir -p %{buildroot}/var/log
touch %{buildroot}/var/log/gearmand.log
%check
#make check
2009-05-05 11:53:14 +00:00
%clean
rm -rf %{buildroot}
2009-05-05 11:53:14 +00:00
%pre
getent group gearmand >/dev/null || groupadd -r gearmand
getent passwd gearmand >/dev/null || \
useradd -r -g gearmand -d / -s /sbin/nologin \
-c "Gearmand job server" gearmand
exit 0
%post
%if 0%{?_with_systemd}
%systemd_post gearmand.service
%else
if [ $1 = 1 ]; then
/sbin/chkconfig --add gearmand
fi
%endif
/bin/touch /var/log/gearmand.log
2009-05-05 11:53:14 +00:00
%preun
%if 0%{?_with_systemd}
%systemd_preun gearmand.service
%else
if [ "$1" = 0 ] ; then
/sbin/service gearmand stop >/dev/null 2>&1 || :
/sbin/chkconfig --del gearmand
fi
exit 0
%endif
2009-05-05 11:53:14 +00:00
%postun
%if 0%{?_with_systemd}
%systemd_postun_with_restart gearmand.service
%endif
2009-05-05 11:53:14 +00:00
%post -n libgearman -p /sbin/ldconfig
%postun -n libgearman -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING README
%if 0%{?el5} || 0%{?el6}
%attr(755,gearmand,gearmand) /var/run/gearmand
%endif
%config(noreplace) %{_sysconfdir}/sysconfig/gearmand
2009-05-05 11:53:14 +00:00
%{_sbindir}/gearmand
%{_bindir}/gearman
%{_bindir}/gearadmin
%{_mandir}/man1/*
%{_mandir}/man8/*
%attr(0640,gearmand,gearmand) %config(noreplace) %verify(not md5 size mtime) /var/log/gearmand.log
%if 0%{?_with_systemd}
%{_unitdir}/%{name}.service
%else
%{_initrddir}/%{name}
%endif
2009-05-05 11:53:14 +00:00
2011-12-22 21:30:01 +00:00
%files -n libgearman
%defattr(-,root,root,-)
%doc COPYING
2012-10-18 20:03:22 +00:00
%{_libdir}/libgearman.so.8
%{_libdir}/libgearman.so.8.0.0
2009-05-05 11:53:14 +00:00
%files -n libgearman-devel
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING README
%dir %{_includedir}/libgearman
%{_includedir}/libgearman/*.h
%{_libdir}/pkgconfig/gearmand.pc
2011-12-22 21:30:01 +00:00
%{_libdir}/libgearman.so
%{_includedir}/libgearman-1.0/
%{_mandir}/man3/*
2009-05-05 11:53:14 +00:00
%changelog
2014-09-09 15:14:12 +00:00
* Tue Sep 09 2014 Karsten Hopp <karsten@redhat.com> 1.1.12-7
- fix library path for ppc64le
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.12-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.12-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
2014-05-23 11:14:18 +00:00
* Fri May 23 2014 Petr Machata <pmachata@redhat.com> - 1.1.12-4
- Rebuild for boost 1.55.0
2014-05-23 09:21:20 +00:00
* Fri May 23 2014 David Tardon <dtardon@redhat.com> - 1.1.12-3
- rebuild for boost 1.55.0
2014-04-25 03:51:32 +00:00
* Fri Apr 25 2014 Ken Dreyer <ktdreyer@ktdreyer.com> - 1.1.12-2
- Add missing Source0 tarball (oops)
* Fri Apr 25 2014 Ken Dreyer <ktdreyer@ktdreyer.com> - 1.1.12-1
- Update to latest upstream release
- Drop Fedora 18 conditional
- Add el5 e2fsprogs-libs minimum version requirement
- Fix bogus changelog date
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.8-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
2013-07-27 12:56:41 +00:00
* Sat Jul 27 2013 pmachata@redhat.com - 1.1.8-3
- Rebuild for boost 1.54.0
2013-07-22 18:20:16 +00:00
* Mon Jul 22 2013 Blake Gardner <blakegardner@cox.net> - 1.1.8-2
- ExcludeArch ppc ppc64
* Thu Jul 18 2013 Ken Dreyer <ktdreyer@ktdreyer.com> - 1.1.8-1
- Update to latest upstream release.
- Add EL5 and EL6 conditionals to unify the spec across all branches.
- Add mandirs.
- Add /var/log/gearmand.log.
- Add tokyocabinet support.
- Remove commented patches.
- rpmlint fixes (macros in comments).
2013-02-10 01:34:44 +00:00
* Sun Feb 10 2013 Denis Arnaud <denis.arnaud_fedora@m4x.org> - 1.1.2-3
- Rebuild for Boost-1.53.0
2013-02-09 21:56:51 +00:00
* Sat Feb 09 2013 Denis Arnaud <denis.arnaud_fedora@m4x.org> - 1.1.2-2
- Rebuild for Boost-1.53.0
* Thu Oct 18 2012 BJ Dierkes <wdierkes@rackspace.com> - 1.1.2-1
- Bumping to 1.2 branch (1.1.2 current development version).
Release notes are available here:
https://launchpad.net/gearmand/1.2/1.1.2
- Repackaged libgearman-1.0, and libgearman-1.0-devel under the
devel sub-package.
2012-10-18 20:11:05 +00:00
- Updated scriptlets per BZ#850127
2012-09-24 05:18:54 +00:00
* Mon Sep 24 2012 BJ Dierkes <wdierkes@rackspace.com> - 0.39-1
- Latest sources from upstream. Release notes here:
https://launchpad.net/gearmand/trunk/0.39
2012-09-24 06:15:08 +00:00
- Added Postgres support
- Added Sqlite support
2012-09-24 05:18:54 +00:00
2012-08-15 04:28:38 +00:00
* Wed Aug 15 2012 BJ Dierkes <wdierkes@rackspace.com> - 0.35-1
2012-08-14 20:04:14 +00:00
- Latest sources from upstream. Release notes here:
https://launchpad.net/gearmand/trunk/0.35
- Removed Patch3: gearmand-0.33-lp1020778.patch (applied upstream)
- Added zlib support
2012-09-24 06:15:08 +00:00
- Added MySQL support
2012-08-14 20:04:14 +00:00
2012-08-14 20:06:11 +00:00
* Wed Aug 15 2012 BJ Dierkes <wdierkes@rackspace.com> - 0.33-3
- Rebuilt for latest boost.
2012-08-14 21:39:17 +00:00
- BuildRequires: boost-thread
2012-08-15 04:11:09 +00:00
- Added -lboost_system to LDFLAGS to work around boost issue
related to boost-thread.
2012-08-14 20:06:11 +00:00
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.33-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
2012-07-03 05:39:01 +00:00
* Tue Jul 03 2012 BJ Dierkes <wdierkes@rackspace.com> - 0.33-1
- Latest sources from upstream. Release notes here:
https://launchpad.net/gearmand/trunk/0.33
2012-07-03 06:03:59 +00:00
- Adding Patch3: gearmand-0.33-lp1020778.patch
2012-07-03 05:39:01 +00:00
2012-04-23 09:02:07 +00:00
* Mon Apr 23 2012 Remi Collet <remi@fedoraproject.org> - 0.32-2
- rebuild against libmemcached.so.10
* Wed Apr 18 2012 BJ Dierkes <wdierkes@rackspace.com> - 0.32-1
2012-04-18 21:42:13 +00:00
- Latest sources from upstream. Release notes here:
https://launchpad.net/gearmand/trunk/0.32
- Removed Patch2: gearmand-0.31-lp978235.patch (applied upstream)
2012-04-10 11:47:18 +00:00
* Tue Apr 10 2012 BJ Dierkes <wdierkes@rackspace.com> - 0.31-1
- Latest sources from upstream. Release notes here:
https://launchpad.net/gearmand/trunk/0.31
https://launchpad.net/gearmand/trunk/0.29
- Removed Patch1: gearmand-0.28-lp932994.patch (applied upstream)
- Added Patch2: gearmand-0.31-lp978235.patch. Resolves LP#978235.
2012-04-10 11:47:18 +00:00
2012-03-07 17:40:27 +00:00
* Wed Mar 07 2012 BJ Dierkes <wdierkes@rackspace.com> - 0.28-3
- Adding back _smp_mflags
2012-03-07 19:52:40 +00:00
2012-03-07 17:32:17 +00:00
* Wed Mar 07 2012 BJ Dierkes <wdierkes@rackspace.com> - 0.28-2
- Added Patch1: gearmand-0.28-lp932994.patch. Resolves: LP#932994
2012-01-27 21:39:30 +00:00
* Fri Jan 27 2012 BJ Dierkes <wdierkes@rackspace.com> - 0.28-1
- Latest sources from upstream. Release notes here:
https://launchpad.net/gearmand/trunk/0.28
2012-01-27 21:55:05 +00:00
- Removing Patch0: gearmand-0.27-lp914495.patch (applied upstream)
- Removing _smp_mflags per https://bugs.launchpad.net/bugs/901007
2012-02-28 18:28:29 +00:00
2012-01-13 02:06:15 +00:00
* Thu Jan 12 2012 BJ Dierkes <wdierkes@rackspace.com> - 0.27-2
- Adding Patch0: gearmand-0.27-lp914495.patch Resolves LP#914495
2012-01-10 21:33:19 +00:00
* Tue Jan 10 2012 BJ Dierkes <wdierkes@rackspace.com> - 0.27-1
- Latest sources from upstream. Release notes here:
https://launchpad.net/gearmand/trunk/0.27
2011-11-22 08:54:00 +00:00
* Tue Nov 22 2011 BJ Dierkes <wdierkes@rackspace.com> - 0.25-1
- Latest sources from upstream. Release notes here:
https://launchpad.net/gearmand/trunk/0.25
- Also rebuild against libboost_program_options-mt.so.1.47.0
- Added libgearman-1.0, libgearman-1.0-devel per upstream
2011-11-22 08:54:00 +00:00
2011-09-17 13:37:17 +00:00
* Sat Sep 17 2011 Remi Collet <remi@fedoraproject.org> - 0.23-2
- rebuild against libmemcached.so.8
2011-07-21 02:58:38 +00:00
* Thu Jul 21 2011 BJ Dierkes <wdierkes@rackspace.com> - 0.23-1
- Latest source from upstream. Release information available at:
https://launchpad.net/gearmand/+milestone/0.23
* Fri Jun 03 2011 BJ Dierkes <wdierkes@rackspace.com> - 0.20-1
- Latest sources from upstream.
- Add %%ghost to /var/run/gearmand. Resolves BZ#656592
- BuildRequires: boost-devel >= 1.37.0
- Adding gearadmin files
- Converted to Systemd. Resolves BZ#661643
* Tue Mar 22 2011 Dan Horák <dan[at]danny.cz> - 0.14-4
- switch to %%ifarch for google-perftools as BR
* Thu Feb 17 2011 BJ Dierkes <wdierkes@rackspace.com> - 0.14-3
- Rebuild against latest libevent in rawhide/f15
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.14-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
2011-02-05 00:38:07 +00:00
* Fri Feb 04 2011 BJ Dierkes <wdierkes@rackspace.com> - 0.14-1
- Latest sources from upstream. Full changelog available from:
https://launchpad.net/gearmand/trunk/0.14
2010-10-06 13:36:17 +00:00
* Wed Oct 06 2010 Remi Collet <fedora@famillecollet.com> - 0.13-3
- rebuild against new libmemcached
2010-05-05 18:27:21 +00:00
* Wed May 05 2010 Remi Collet <fedora@famillecollet.com> - 0.13-2
- rebuild against new libmemcached
2010-04-07 14:29:46 +00:00
* Wed Apr 07 2010 Ruben Kerkhof <ruben@rubenkerkhof.com> 0.13-1
- Upstream released new version
2010-02-19 13:38:38 +00:00
* Fri Feb 19 2010 Ruben Kerkhof <ruben@rubenkerkhof.com> 0.12-1
- Upstream released new version
2010-02-17 14:41:19 +00:00
* Wed Feb 17 2010 Ruben Kerkhof <ruben@rubenkerkhof.com> 0.11-2
- Add BR on libtool
* Tue Feb 16 2010 Oliver Falk <oliver@linux-kernel.at> 0.11-1
- Update to latest upstream version (#565808)
- Add missing Req. libevent-devel for libgearman-devel (#565808)
- Remove libmemcache patch - should be fixed in 0.11
2010-02-07 16:42:14 +00:00
* Sun Feb 07 2010 Remi Collet <fedora@famillecollet.com> - 0.9-3
- patch to detect libmemcached
2010-02-07 15:48:28 +00:00
* Sun Feb 07 2010 Remi Collet <fedora@famillecollet.com> - 0.9-2
- rebuilt against new libmemcached
2009-07-31 12:26:58 +00:00
* Fri Jul 31 2009 Ruben Kerkhof <ruben@rubenkerkhof.com> 0.9-1
- Upstream released new version
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Tue Jul 14 2009 Ruben Kerkhof <ruben@rubenkerkhof.com> 0.8-1
- Upstream released new version
- Enable libmemcached backend
2009-06-22 11:36:56 +00:00
* Mon Jun 22 2009 Ruben Kerkhof <ruben@rubenkerkhof.com> 0.7-1
- Upstream released new version
2009-06-22 11:25:12 +00:00
* Mon Jun 22 2009 Ruben Kerkhof <ruben@rubenkerkhof.com> 0.6-3
- Don't build with tcmalloc on sparc64
* Sun May 24 2009 Peter Lemenkov <lemenkov@gmail.com> 0.6-2
- Fixed issues, reported in https://bugzilla.redhat.com/show_bug.cgi?id=487148#c9
2009-05-20 11:40:48 +00:00
* Wed May 20 2009 Ruben Kerkhof <ruben@rubenkerkhof.com> 0.6-1
- Upstream released new version
2009-05-05 11:53:14 +00:00
* Mon Apr 27 2009 Ruben Kerkhof <ruben@rubenkerkhof.com> 0.5-1
- Upstream released new version
- Cleanups for review (bz #487148)
* Wed Feb 25 2009 Ruben Kerkhof <ruben@rubenkerkhof.com> 0.3-2
- Add init script
* Sat Feb 07 2009 Ruben Kerkhof <ruben@rubenkerkhof.com> 0.3-1
- Initial import