haveged/haveged.spec
Pascal Bleser c31c96c61c - update to 1.3:
* reorganized to allow its collection mechanism to be better accessed
    directly through the file system: includes the option to suppress the
    daemon interface in the build for circumstances where /dev/random is
    unavailable or its use is inappropriate

OBS-URL: https://build.opensuse.org/package/show/security/haveged?expand=0&rev=46
2011-10-25 08:49:07 +00:00

92 lines
2.5 KiB
RPMSpec

#
# spec file for package haveged
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: haveged
Version: 1.3
Release: 2
License: GPLv3
Summary: Feed entropy into random pool
Url: http://www.issihosts.com/haveged/
Group: System/Daemons
Source0: http://www.issihosts.com/haveged/haveged-%{version}.tar.gz
Source1: haveged.init
Source2: haveged.service
Patch1: haveged-ppc64.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExcludeArch: %{arm}
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
%{!?_initddir: %global _initddir /etc/init.d}
%description
The haveged daemon feeds the linux entropy pool with random
numbers generated from hidden processor state.
For more informations see http://www.issihosts.com/haveged/
%prep
%setup -q
%patch1
%build
autoreconf -fiv
export LDFLAGS="-Wl,-z,relro,-z,now"
%configure --with-libcap-ng=yes --sbindir=/sbin --enable-nistest=yes --enable-daemon=yes
make %{?_smp_mflags}
%check
make %{?_smp_mflags} check
%install
%makeinstall
%{__install} -D -m0755 %{S:1} %{buildroot}%{_initddir}/haveged
%{__mkdir_p} %{buildroot}%{_sbindir}
%{__ln_s} -f %{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name}
%{__install} -D -m0755 %{S:2} %{buildroot}/lib/systemd/system/haveged.service
%clean
%{?buildroot:%__rm -rf "%{buildroot}"}
%post
# do not enable on condition here, let YAST, kiwi or the user do it.
%{fillup_and_insserv -f %{name}}
%postun
%restart_on_update %{name}
%{insserv_cleanup}
%preun
%stop_on_removal %{name}
%files
%defattr(-,root,root)
%{_sbindir}/rc%{name}
/sbin/haveged
%config %{_initddir}/haveged
%{_mandir}/man8/haveged.8.gz
%dir /lib/systemd
%dir /lib/systemd/system
/lib/systemd/system/haveged.service
%changelog