[beanstalkd/f19] apply updates from master

jjh jjh at fedoraproject.org
Mon Sep 9 05:17:38 UTC 2013


commit d3620f49244d84f7e64f1d37d16799c1e790cfb0
Author: Jeremy Hinegardner <jeremy at hinegardner.org>
Date:   Sun Sep 8 22:46:38 2013 -0600

    apply updates from master

 .gitignore                                         |    1 +
 ...-rename-beanstalkd-s-dprintf-to-dbgprintf.patch |  125 --------------------
 beanstalkd.spec                                    |   66 +++++------
 sources                                            |    2 +-
 4 files changed, 31 insertions(+), 163 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 78ed894..4422c65 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 beanstalkd-1.4.6.tar.gz
 *~
+/v1.9.tar.gz
diff --git a/beanstalkd.spec b/beanstalkd.spec
index cc6b18a..89f57ca 100644
--- a/beanstalkd.spec
+++ b/beanstalkd.spec
@@ -1,35 +1,30 @@
+%global _hardened_build 1
+
 %define beanstalkd_user      beanstalkd
 %define beanstalkd_group     %{beanstalkd_user}
 %define beanstalkd_home      %{_localstatedir}/lib/beanstalkd
 %define beanstalkd_binlogdir %{beanstalkd_home}/binlog
 
 Name:           beanstalkd
-Version:        1.4.6
-Release:        8%{?dist}
+Version:        1.9
+Release:        1%{?dist}
 Summary:        A simple, fast work-queue service
 
 Group:          System Environment/Daemons
-License:        GPLv3+
-URL:            http://kr.github.com/%{name}/
-Source0:        https://github.com/downloads/kr/%{name}/%{name}-%{version}.tar.gz
+License:        MIT
+URL:            http://kr.github.io/%{name}/
+Source0:        https://github.com/kr/%{name}/archive/v%{version}.tar.gz
 Source1:        %{name}.service
 Source2:        %{name}.sysconfig
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires:  libevent-devel
 BuildRequires:  systemd-units
 
-
 Requires(pre):    shadow-utils
 Requires(post):   systemd-units
 Requires(preun):  systemd-units
 Requires(postun): systemd-units
 
-# fixes dprintf source conflict.  This is patch from upstream's git repository.
-# A new release has not been made that includes this patch
-# https://github.com/kr/beanstalkd/commit/976ec8ba8e70e3b5027f441de529f479c11c8507
-Patch0: 0007-Patch-to-rename-beanstalkd-s-dprintf-to-dbgprintf.patch 
-
 %description
 beanstalkd is a simple, fast work-queue service. Its interface is generic,
 but was originally designed for reducing the latency of page views in
@@ -39,26 +34,26 @@ asynchronously.
 
 %prep
 %setup -q
-%patch0 -p1
-
-if [ ! -e configure ]; then
-  sh autogen.sh
-fi
 
 
 %build
-%configure --disable-rpath
-make %{?_smp_mflags}
+make LDFLAGS="%{?__global_ldflags}" CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
+
+
+%check
+make check
 
 
 %install
 rm -rf $RPM_BUILD_ROOT
-make install-man1 DESTDIR=$RPM_BUILD_ROOT
-make install-exec-am DESTDIR=$RPM_BUILD_ROOT
+make install PREFIX=%{buildroot}%{_prefix}
 %{__install} -p -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
 %{__install} -p -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
 %{__install} -d -m 0755 %{buildroot}%{beanstalkd_home}
 %{__install} -d -m 0755 %{buildroot}%{beanstalkd_binlogdir}
+%{__install} -d -m 00755 %{buildroot}%{_mandir}/man1
+%{__gzip} doc/%{name}.1
+%{__install} -p -m 0644 doc/%{name}.1.gz %{buildroot}%{_mandir}/man1/
 
 
 %clean
@@ -81,31 +76,20 @@ if [ -d %{beanstalkd_home} ]; then
         -o %{beanstalkd_user} -g %{beanstalkd_user} \
         %{beanstalkd_binlogdir}
 fi
-
-if [ $1 -eq 1 ] ; then
-    # Initial installation
-    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-fi
+%systemd_preun %{name}.service
 
 
 %preun
-if [ $1 -eq 0 ] ; then
-    # Package removal, not upgrade
-    /bin/systemctl --no-reload disable %{name}.service > /dev/null 2>&1 || :
-    /bin/systemctl stop %{name}.service > /dev/null 2>&1 || :
-fi
+%systemd_preun %{name}.service
+
 
 %postun
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ $1 -ge 1 ] ; then
-    # Package upgrade, not uninstall
-    /bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
-fi
+%systemd_postun_with_restart %{name}.service
 
 
 %files
 %defattr(-,root,root,-)
-%doc README README-DEVELOPERS README-TESTS COPYING doc/protocol.txt
+%doc README LICENSE doc/protocol.txt
 %{_unitdir}/%{name}.service
 %{_bindir}/%{name}
 %{_mandir}/man1/%{name}.1.gz
@@ -115,6 +99,14 @@ fi
 
 
 %changelog
+* Sun Sep 08 2013 Jeremy Hinegardner <jeremy at hinegardner.org> - 1.9-1
+- update scriptlets with systemd macros (#850044) - from Václav Pavlín
+- add hardened build (#954331)
+- update to latests upstream
+
+* Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.4.6-9
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
+
 * Wed Feb 13 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.4.6-8
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
 
diff --git a/sources b/sources
index 91f19ea..1c422ec 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-3dbbb64a6528efaaaa841ea83b30768e  beanstalkd-1.4.6.tar.gz
+37dd1bc580c77745c26239033f910ec5  v1.9.tar.gz


More information about the scm-commits mailing list