* Add online tests based on AIS-31 * Add -p option to specify the pid location. * Fix -F option to not take argument - i.e. now a switch * Factor diagnostic methods for capture and inject for better performance * Fix install target, move to bin and eliminate script if not daemon, now use sysv and systemd templates - use -F with no arguments in haveged.service * Add s390 architecture. Thanks to Dan Horak and Jiri Hladky * Add generic architecture with clock_gettime() timer. * Rewrite collection loop to support multiple instances and new diagnostics * Rewrite tuning mechanism to add virtual file system mining and correct cpuid bugs * Add prototype multi-thread collection option * Reduce collection buffer size to .5MB * Improve/correct build and install * Add new invocation options to support new features. OBS-URL: https://build.opensuse.org/package/show/security/haveged?expand=0&rev=60
120 lines
3.1 KiB
RPMSpec
120 lines
3.1 KiB
RPMSpec
#
|
|
# spec file for package haveged
|
|
#
|
|
# Copyright (c) 2012 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.5
|
|
Release: 0
|
|
Summary: Feed entropy into random pool
|
|
License: GPL-3.0
|
|
Group: System/Daemons
|
|
Url: http://www.issihosts.com/haveged/
|
|
Source0: http://www.issihosts.com/haveged/%{name}-%{version}.tar.gz
|
|
Source1: %{name}.init
|
|
Source2: %{name}.service
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
ExcludeArch: %{arm}
|
|
BuildRequires: automake
|
|
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}
|
|
%if 0%{?suse_version} > 1140
|
|
BuildRequires: systemd
|
|
%{?systemd_requires}
|
|
%define have_systemd 1
|
|
%endif
|
|
|
|
%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
|
|
|
|
%build
|
|
autoreconf -fiv
|
|
export CFLAGS="%optflags -fpie"
|
|
export LDFLAGS="-Wl,-z,relro,-z,now -pie"
|
|
%configure --enable-nistest=yes --enable-daemon=yes
|
|
make %{?_smp_mflags}
|
|
|
|
%check
|
|
#XXX: nist test is killed by SIGKILL with static int random_pool1[_32MB] on
|
|
# 32bit. Let change it to _08MB to avoid the test beeing killed, even if I
|
|
# am not sure allocate of 128M is prohibited
|
|
%ifarch %{ix86}
|
|
sed -i 's/\[_32MB\]/[_08MB]/' nist/nist.c
|
|
%endif
|
|
|
|
make %{?_smp_mflags} check
|
|
|
|
%install
|
|
%makeinstall
|
|
%{__install} -D -m0755 %{S:1} %{buildroot}%{_initddir}/%{name}
|
|
%{__mkdir_p} %{buildroot}%{_sbindir}
|
|
%{__ln_s} -f %{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name}
|
|
|
|
%if 0%{?have_systemd}
|
|
%{__install} -D -m0644 %{S:2} %{buildroot}%{_unitdir}/%{name}.service
|
|
%endif
|
|
|
|
%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}}
|
|
%if 0%{?have_systemd}
|
|
%service_add_post %{name}.service
|
|
%endif
|
|
|
|
%postun
|
|
%restart_on_update %{name}
|
|
%{insserv_cleanup}
|
|
%if 0%{?have_systemd}
|
|
%service_del_postun %{name}.service
|
|
%endif
|
|
|
|
%pre
|
|
%if 0%{?have_systemd}
|
|
%service_add_pre %{name}.service
|
|
%endif
|
|
|
|
%preun
|
|
%stop_on_removal %{name}
|
|
%if 0%{?have_systemd}
|
|
%service_del_preun %{name}.service
|
|
%endif
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%{_sbindir}/rc%{name}
|
|
%{_sbindir}/%{name}
|
|
%config %{_initddir}/%{name}
|
|
%{_mandir}/man8/%{name}.8.gz
|
|
%if 0%{?have_systemd}
|
|
%{_unitdir}/%{name}.service
|
|
%endif
|
|
|
|
%changelog
|