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