2010-10-02 00:11:18 +00:00
|
|
|
#
|
2011-03-02 10:43:07 +00:00
|
|
|
# spec file for package haveged
|
2010-10-02 00:11:18 +00:00
|
|
|
#
|
2012-02-09 22:52:49 +00:00
|
|
|
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2010-10-02 00:11:18 +00:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
2011-12-14 23:48:37 +00:00
|
|
|
|
2010-10-02 00:11:18 +00:00
|
|
|
Name: haveged
|
2012-08-13 13:53:01 +00:00
|
|
|
Version: 1.5
|
|
|
|
Release: 0
|
2010-10-02 00:11:18 +00:00
|
|
|
Summary: Feed entropy into random pool
|
2012-02-09 22:52:49 +00:00
|
|
|
License: GPL-3.0
|
2011-01-04 17:19:21 +00:00
|
|
|
Group: System/Daemons
|
2012-02-09 22:52:49 +00:00
|
|
|
Url: http://www.issihosts.com/haveged/
|
2012-05-14 07:58:10 +00:00
|
|
|
Source0: http://www.issihosts.com/haveged/%{name}-%{version}.tar.gz
|
2011-11-29 03:23:27 +00:00
|
|
|
Source1: %{name}.init
|
|
|
|
Source2: %{name}.service
|
2010-10-02 00:11:18 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2011-12-02 07:27:26 +00:00
|
|
|
BuildRequires: automake
|
2011-01-04 17:19:21 +00:00
|
|
|
Requires(pre): %insserv_prereq
|
|
|
|
%if 0%{suse_version} >= 1140
|
|
|
|
Requires(pre): sysvinit(syslog)
|
|
|
|
%endif
|
2010-10-02 00:11:18 +00:00
|
|
|
Requires(post): grep util-linux
|
2011-01-04 17:19:21 +00:00
|
|
|
Enhances: openssl gpg2 php5 apache2 openvpn smtp_daemon
|
2011-01-04 23:37:59 +00:00
|
|
|
%{!?_initddir: %global _initddir /etc/init.d}
|
2011-11-29 03:23:27 +00:00
|
|
|
%if 0%{?suse_version} > 1140
|
|
|
|
BuildRequires: systemd
|
|
|
|
%{?systemd_requires}
|
|
|
|
%define have_systemd 1
|
|
|
|
%endif
|
2010-10-02 00:11:18 +00:00
|
|
|
|
|
|
|
%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
|
2011-06-06 18:20:10 +00:00
|
|
|
|
2010-10-02 00:11:18 +00:00
|
|
|
%build
|
|
|
|
autoreconf -fiv
|
2012-02-09 22:52:49 +00:00
|
|
|
export CFLAGS="%optflags -fpie"
|
|
|
|
export LDFLAGS="-Wl,-z,relro,-z,now -pie"
|
2011-12-31 14:51:57 +00:00
|
|
|
%configure --enable-nistest=yes --enable-daemon=yes
|
2011-01-04 17:19:21 +00:00
|
|
|
make %{?_smp_mflags}
|
2010-10-02 00:11:18 +00:00
|
|
|
|
|
|
|
%check
|
2012-08-13 13:53:01 +00:00
|
|
|
#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
|
|
|
|
|
2010-11-24 16:23:37 +00:00
|
|
|
make %{?_smp_mflags} check
|
2010-10-02 00:11:18 +00:00
|
|
|
|
|
|
|
%install
|
2011-01-04 17:19:21 +00:00
|
|
|
%makeinstall
|
2011-11-29 03:23:27 +00:00
|
|
|
%{__install} -D -m0755 %{S:1} %{buildroot}%{_initddir}/%{name}
|
2010-10-02 00:11:18 +00:00
|
|
|
%{__mkdir_p} %{buildroot}%{_sbindir}
|
|
|
|
%{__ln_s} -f %{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name}
|
2011-11-29 03:23:27 +00:00
|
|
|
|
|
|
|
%if 0%{?have_systemd}
|
|
|
|
%{__install} -D -m0644 %{S:2} %{buildroot}%{_unitdir}/%{name}.service
|
|
|
|
%endif
|
2010-10-02 00:11:18 +00:00
|
|
|
|
|
|
|
%clean
|
2011-10-25 08:49:07 +00:00
|
|
|
%{?buildroot:%__rm -rf "%{buildroot}"}
|
2010-10-02 00:11:18 +00:00
|
|
|
|
|
|
|
%post
|
2011-03-01 09:31:24 +00:00
|
|
|
# do not enable on condition here, let YAST, kiwi or the user do it.
|
|
|
|
%{fillup_and_insserv -f %{name}}
|
2011-11-29 03:23:27 +00:00
|
|
|
%if 0%{?have_systemd}
|
|
|
|
%service_add_post %{name}.service
|
|
|
|
%endif
|
2010-10-02 00:11:18 +00:00
|
|
|
|
|
|
|
%postun
|
|
|
|
%restart_on_update %{name}
|
|
|
|
%{insserv_cleanup}
|
2011-11-29 03:23:27 +00:00
|
|
|
%if 0%{?have_systemd}
|
|
|
|
%service_del_postun %{name}.service
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%pre
|
|
|
|
%if 0%{?have_systemd}
|
|
|
|
%service_add_pre %{name}.service
|
|
|
|
%endif
|
2010-10-02 00:11:18 +00:00
|
|
|
|
|
|
|
%preun
|
|
|
|
%stop_on_removal %{name}
|
2011-11-29 03:23:27 +00:00
|
|
|
%if 0%{?have_systemd}
|
|
|
|
%service_del_preun %{name}.service
|
|
|
|
%endif
|
2010-10-02 00:11:18 +00:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_sbindir}/rc%{name}
|
2011-12-31 14:51:57 +00:00
|
|
|
%{_sbindir}/%{name}
|
2011-11-29 03:23:27 +00:00
|
|
|
%config %{_initddir}/%{name}
|
|
|
|
%{_mandir}/man8/%{name}.8.gz
|
|
|
|
%if 0%{?have_systemd}
|
|
|
|
%{_unitdir}/%{name}.service
|
|
|
|
%endif
|
2010-11-05 16:27:54 +00:00
|
|
|
|
2010-10-02 00:11:18 +00:00
|
|
|
%changelog
|