From 0e4b68e65a19a70729d6bc665e16e609fad26e3c8f97a77088ac0d6ee2f32903 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= Date: Tue, 4 Jan 2011 17:19:21 +0000 Subject: [PATCH] - Fix build in older distros - run spec cleaner OBS-URL: https://build.opensuse.org/package/show/security/haveged?expand=0&rev=33 --- haveged.changes | 6 ++++++ haveged.spec | 26 +++++++++++++++----------- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/haveged.changes b/haveged.changes index d1ff992..2e4ea3d 100644 --- a/haveged.changes +++ b/haveged.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jan 4 17:18:34 UTC 2011 - cristian.rodriguez@opensuse.org + +- Fix build in older distros +- run spec cleaner + ------------------------------------------------------------------- Tue Dec 7 21:26:31 UTC 2010 - coolo@novell.com diff --git a/haveged.spec b/haveged.spec index f952ae4..c572206 100644 --- a/haveged.spec +++ b/haveged.spec @@ -21,18 +21,22 @@ Name: haveged Version: 0.9_git201011252143 Release: 1 License: GPLv3 -Group: System/Daemons Summary: Feed entropy into random pool Url: http://www.issihosts.com/haveged/ +Group: System/Daemons # Our sources https://github.com/crrodriguez/haveged Source0: http://www.issihosts.com/haveged/haveged-%{version}.tar.xz Source1: haveged.init Source2: haveged.service +BuildRequires: libcap-ng-devel +BuildRequires: xz BuildRoot: %{_tmppath}/%{name}-%{version}-build -Requires(pre): %insserv_prereq sysvinit(syslog) +Requires(pre): %insserv_prereq +%if 0%{suse_version} >= 1140 +Requires(pre): sysvinit(syslog) +%endif Requires(post): grep util-linux -Enhances: openssl gpg2 php5 apache2 openvpn smtp_daemon -BuildRequires: libcap-ng-devel lzma +Enhances: openssl gpg2 php5 apache2 openvpn smtp_daemon %description The haveged daemon feeds the linux entropy pool with random @@ -47,34 +51,34 @@ For more informations see http://www.issihosts.com/haveged/ autoreconf -fiv export LDFLAGS="-Wl,-z,relro,-z,now" %configure --with-libcap-ng=yes --sbindir=/sbin --enable-nistest=yes -make %{?_smp_mflags} +make %{?_smp_mflags} %check make %{?_smp_mflags} check %install -make DESTDIR=$RPM_BUILD_ROOT install -%{__install} -m0755 %{S:1} %{buildroot}/etc/init.d/haveged +%makeinstall +%{__install} -m0755 %{S:1} %{buildroot}%{_initddir}/haveged %{__mkdir_p} %{buildroot}%{_sbindir} %{__ln_s} -f %{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name} %{__mkdir_p} %{buildroot}/lib/systemd/system %{__install} -m0755 %{S:2} %{buildroot}/lib/systemd/system/haveged.service %clean -rm -rf $RPM_BUILD_ROOT +rm -rf %{buildroot} %post ## brace for impact... %if 0%{?sles_version} if [ -x /usr/bin/lscpu ]; then if /usr/bin/lscpu | grep -q "Virtualization type" ; then - ## Is a VM + ## Is a VM %{fillup_and_insserv -fy %{name}} else ## it isnt. %{fillup_and_insserv -f %{name}} fi - else + else ##there is no lscpu! shouldnt happend... %{fillup_and_insserv -f %{name}} fi @@ -93,7 +97,7 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root) %{_sbindir}/rc%{name} /sbin/haveged -%config /etc/init.d/haveged +%config %{_initddir}/haveged %{_mandir}/man8/haveged.8.gz %dir /lib/systemd %dir /lib/systemd/system