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
|
|
|
#
|
2018-02-19 07:16:16 +00:00
|
|
|
# Copyright (c) 2018 SUSE LINUX 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.
|
|
|
|
|
2018-09-11 17:24:26 +00:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
2010-10-02 00:11:18 +00:00
|
|
|
#
|
|
|
|
|
2011-12-14 23:48:37 +00:00
|
|
|
|
2018-02-19 07:16:16 +00:00
|
|
|
%{!?_udevrulesdir: %global _udevrulesdir %(pkg-config --variable=udevdir udev)/rules.d }
|
2010-10-02 00:11:18 +00:00
|
|
|
Name: haveged
|
2018-09-11 14:19:25 +00:00
|
|
|
Version: 1.9.4
|
2012-08-13 13:53:01 +00:00
|
|
|
Release: 0
|
2018-09-11 17:24:26 +00:00
|
|
|
Summary: Daemon for feeding entropy into the random pool
|
2018-03-19 14:34:22 +00:00
|
|
|
License: GPL-3.0-only
|
2011-01-04 17:19:21 +00:00
|
|
|
Group: System/Daemons
|
2018-09-11 14:19:25 +00:00
|
|
|
URL: https://github.com/jirka-h/haveged
|
|
|
|
Source0: https://github.com/jirka-h/haveged/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
2011-11-29 03:23:27 +00:00
|
|
|
Source2: %{name}.service
|
2014-05-12 08:39:42 +00:00
|
|
|
Source3: 90-haveged.rules
|
2015-02-18 08:13:58 +00:00
|
|
|
Source4: haveged-dracut.module
|
2018-07-12 12:26:06 +00:00
|
|
|
Source5: %{name}-switch-root.service
|
2014-03-12 13:44:15 +00:00
|
|
|
Patch0: ppc64le.patch
|
2014-05-12 11:01:39 +00:00
|
|
|
# PATCH-FIX-UPSTREAM: ent tests randomly fail so make them conditional tchvatal@suse.cz bnc#876674
|
|
|
|
Patch1: haveged-conditional-enttest.patch
|
2016-06-17 14:37:51 +00:00
|
|
|
# PATCH-FIX-UPSTREAM: don't write to syslog at startup to avoid deadlocks psimons@suse.com bnc#959237
|
2018-07-12 12:26:06 +00:00
|
|
|
Patch2: haveged-no-syslog.patch
|
2018-09-19 10:25:55 +00:00
|
|
|
# PATCH-FIX-GITHUN: Fix segfault on arm machines
|
|
|
|
Patch3: f2193587.patch
|
2013-03-26 14:22:03 +00:00
|
|
|
BuildRequires: autoconf
|
2014-05-07 09:24:36 +00:00
|
|
|
BuildRequires: automake
|
2013-03-26 14:22:03 +00:00
|
|
|
BuildRequires: libtool
|
2018-02-19 07:16:16 +00:00
|
|
|
BuildRequires: pkgconfig
|
2013-03-21 11:27:42 +00:00
|
|
|
BuildRequires: pkgconfig(systemd)
|
2014-05-12 08:39:42 +00:00
|
|
|
BuildRequires: pkgconfig(udev)
|
2018-02-19 07:16:16 +00:00
|
|
|
Requires(post): coreutils
|
|
|
|
Requires(postun): coreutils
|
2014-05-07 09:24:36 +00:00
|
|
|
Enhances: apache2
|
|
|
|
Enhances: gpg2
|
|
|
|
Enhances: openssl
|
|
|
|
Enhances: openvpn
|
|
|
|
Enhances: php5
|
|
|
|
Enhances: smtp_daemon
|
2015-02-18 08:13:58 +00:00
|
|
|
Enhances: systemd
|
2011-11-29 03:23:27 +00:00
|
|
|
%{?systemd_requires}
|
2010-10-02 00:11:18 +00:00
|
|
|
|
|
|
|
%description
|
2018-09-11 17:24:26 +00:00
|
|
|
The haveged daemon feeds the Linux entropy pool with random
|
2010-10-02 00:11:18 +00:00
|
|
|
numbers generated from hidden processor state.
|
|
|
|
|
2018-09-11 17:24:26 +00:00
|
|
|
For more information, see http://www.issihosts.com/haveged/ .
|
2010-10-02 00:11:18 +00:00
|
|
|
|
2013-01-21 10:31:12 +00:00
|
|
|
%package devel
|
2014-05-07 09:24:36 +00:00
|
|
|
Summary: Haveged development files
|
2016-06-19 13:41:12 +00:00
|
|
|
Group: Development/Libraries/C and C++
|
2013-06-17 09:42:58 +00:00
|
|
|
Requires: libhavege1 = %{version}
|
2013-01-21 10:31:12 +00:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
Headers and for the haveged library
|
|
|
|
|
|
|
|
This package contains the haveged implementation of the HAVEGE
|
|
|
|
algorithm and supporting features.
|
|
|
|
|
|
|
|
%package -n libhavege1
|
2014-05-07 09:24:36 +00:00
|
|
|
Summary: Haveged interface library
|
2016-06-19 13:41:12 +00:00
|
|
|
Group: System/Libraries
|
2013-01-21 10:31:12 +00:00
|
|
|
|
|
|
|
%description -n libhavege1
|
2018-09-11 17:24:26 +00:00
|
|
|
Shared object for the haveged library.
|
2013-01-21 10:31:12 +00:00
|
|
|
This package contains the haveged implementation of the HAVEGE
|
|
|
|
algorithm and supporting features.
|
|
|
|
|
2010-10-02 00:11:18 +00:00
|
|
|
%prep
|
|
|
|
%setup -q
|
2014-03-12 13:44:15 +00:00
|
|
|
%patch0 -p1
|
2014-05-12 11:01:39 +00:00
|
|
|
%patch1 -p1
|
2018-07-12 12:26:06 +00:00
|
|
|
%patch2 -p1
|
2018-09-19 10:25:55 +00:00
|
|
|
%patch3 -p1
|
2011-06-06 18:20:10 +00:00
|
|
|
|
2010-10-02 00:11:18 +00:00
|
|
|
%build
|
2014-05-12 08:39:42 +00:00
|
|
|
autoreconf -fvi
|
2018-07-12 12:26:06 +00:00
|
|
|
export CFLAGS="%{optflags} -fpie -D_DEFAULT_SOURCE -D_GNU_SOURCE"
|
2012-02-09 22:52:49 +00:00
|
|
|
export LDFLAGS="-Wl,-z,relro,-z,now -pie"
|
2014-05-12 11:01:39 +00:00
|
|
|
# ENT randomly fails so disable the test
|
2014-05-07 09:24:36 +00:00
|
|
|
%configure \
|
|
|
|
--disable-static \
|
2014-05-12 11:01:39 +00:00
|
|
|
--disable-enttest \
|
2014-05-07 09:24:36 +00:00
|
|
|
--enable-nistest \
|
|
|
|
--enable-daemon \
|
|
|
|
--enable-clock_gettime
|
|
|
|
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
|
2018-02-19 07:16:16 +00:00
|
|
|
%ifarch %{ix86}
|
2012-08-13 13:53:01 +00:00
|
|
|
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
|
2018-02-19 07:16:16 +00:00
|
|
|
%make_install
|
2018-09-11 14:19:25 +00:00
|
|
|
install -Dpm 0644 %{SOURCE2} \
|
|
|
|
%{buildroot}%{_unitdir}/%{name}.service
|
|
|
|
install -Dpm 0644 %{SOURCE3} \
|
|
|
|
%{buildroot}%{_udevrulesdir}/90-%{name}.rules
|
|
|
|
install -Dpm 0644 %{SOURCE5} \
|
|
|
|
%{buildroot}%{_unitdir}/%{name}-switch-root.service
|
|
|
|
install -Dpm 0755 %{SOURCE4} \
|
|
|
|
%{buildroot}%{_prefix}/lib/dracut/modules.d/98%{name}/module-setup.sh
|
2014-05-07 09:24:36 +00:00
|
|
|
rm -f %{buildroot}%{_libdir}/libhavege.*a
|
|
|
|
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
|
2010-10-02 00:11:18 +00:00
|
|
|
|
|
|
|
%post
|
2014-05-12 08:39:42 +00:00
|
|
|
%{?udev_rules_update:%udev_rules_update}
|
2011-11-29 03:23:27 +00:00
|
|
|
%service_add_post %{name}.service
|
2018-07-12 12:26:06 +00:00
|
|
|
%service_add_post %{name}-switch-root.service
|
2015-02-18 08:13:58 +00:00
|
|
|
%{?regenerate_initrd_post}
|
2010-10-02 00:11:18 +00:00
|
|
|
|
|
|
|
%postun
|
2011-11-29 03:23:27 +00:00
|
|
|
%service_del_postun %{name}.service
|
2018-07-12 12:26:06 +00:00
|
|
|
%service_del_postun %{name}-switch-root.service
|
2015-02-18 08:13:58 +00:00
|
|
|
%{?regenerate_initrd_post}
|
|
|
|
|
|
|
|
%posttrans
|
|
|
|
%{?regenerate_initrd_posttrans}
|
2011-11-29 03:23:27 +00:00
|
|
|
|
|
|
|
%pre
|
|
|
|
%service_add_pre %{name}.service
|
2018-07-12 12:26:06 +00:00
|
|
|
%service_add_pre %{name}-switch-root.service
|
2010-10-02 00:11:18 +00:00
|
|
|
|
|
|
|
%preun
|
2011-11-29 03:23:27 +00:00
|
|
|
%service_del_preun %{name}.service
|
2018-07-12 12:26:06 +00:00
|
|
|
%service_del_preun %{name}-switch-root.service
|
2010-10-02 00:11:18 +00:00
|
|
|
|
2013-01-21 10:31:12 +00:00
|
|
|
%post -n libhavege1 -p /sbin/ldconfig
|
|
|
|
%postun -n libhavege1 -p /sbin/ldconfig
|
|
|
|
|
2010-10-02 00:11:18 +00:00
|
|
|
%files
|
2018-03-19 14:34:22 +00:00
|
|
|
%license COPYING
|
2014-02-18 15:56:46 +00:00
|
|
|
%{_sbindir}/rc%{name}
|
2011-12-31 14:51:57 +00:00
|
|
|
%{_sbindir}/%{name}
|
2018-09-11 14:19:25 +00:00
|
|
|
%{_mandir}/man8/%{name}.8%{?ext_man}
|
2011-11-29 03:23:27 +00:00
|
|
|
%{_unitdir}/%{name}.service
|
2018-07-12 12:26:06 +00:00
|
|
|
%{_unitdir}/%{name}-switch-root.service
|
2018-02-19 07:16:16 +00:00
|
|
|
%{_udevrulesdir}/90-%{name}.rules
|
|
|
|
%dir %{_prefix}/lib/dracut
|
|
|
|
%dir %{_prefix}/lib/dracut/modules.d
|
|
|
|
%dir %{_prefix}/lib/dracut/modules.d/98%{name}
|
|
|
|
%{_prefix}/lib/dracut/modules.d/98%{name}/module-setup.sh
|
2010-11-05 16:27:54 +00:00
|
|
|
|
2013-01-21 10:31:12 +00:00
|
|
|
%files devel
|
2018-03-19 14:34:22 +00:00
|
|
|
%license COPYING
|
2018-09-11 14:19:25 +00:00
|
|
|
%{_mandir}/man3/libhavege.3%{?ext_man}
|
2013-01-21 10:31:12 +00:00
|
|
|
%dir %{_includedir}/%{name}
|
|
|
|
%{_includedir}/%{name}/havege.h
|
2018-09-11 14:19:25 +00:00
|
|
|
%{_includedir}/%{name}/havegecmd.h
|
2013-01-21 10:31:12 +00:00
|
|
|
%doc contrib/build/havege_sample.c
|
|
|
|
%{_libdir}/*.so
|
|
|
|
|
|
|
|
%files -n libhavege1
|
2018-03-19 14:34:22 +00:00
|
|
|
%license COPYING
|
2013-01-21 10:31:12 +00:00
|
|
|
%{_libdir}/*.so.*
|
|
|
|
|
2010-10-02 00:11:18 +00:00
|
|
|
%changelog
|