2019-09-30 10:52:40 -04:00
|
|
|
# NOTICE: this spec file is reriverd from the HAVEGED project(see Source0 as below)attachment
|
|
|
|
|
# and made some modifications. The exactly file path is ./contrib/build/fedora.spec.
|
|
|
|
|
Summary: A Linux entropy source using the HAVEGE algorithm
|
|
|
|
|
Name: haveged
|
2022-07-04 14:20:14 +08:00
|
|
|
Version: 1.9.18
|
2023-09-06 14:32:45 +08:00
|
|
|
Release: 2
|
2019-09-30 10:52:40 -04:00
|
|
|
License: GPLv3+
|
2019-11-06 19:32:48 +08:00
|
|
|
URL: https://github.com/jirka-h/haveged
|
|
|
|
|
Source0: https://github.com/jirka-h/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
|
2019-09-30 10:52:40 -04:00
|
|
|
Source1: haveged.service
|
|
|
|
|
|
2020-07-21 11:45:24 +08:00
|
|
|
Patch0: fix-the-core-file-problem.patch
|
2019-09-30 10:52:40 -04:00
|
|
|
|
|
|
|
|
Requires(post): systemd
|
|
|
|
|
Requires(preun): systemd
|
|
|
|
|
Requires(postun): systemd
|
2021-05-25 19:12:01 +08:00
|
|
|
BuildRequires: gcc
|
2021-07-19 18:49:50 +08:00
|
|
|
BuildRequires: automake coreutils glibc-common systemd
|
2019-09-30 10:52:40 -04:00
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
A Linux entropy source using the HAVEGE algorithm
|
|
|
|
|
|
|
|
|
|
Haveged is a user space entropy daemon which is not dependent upon the
|
|
|
|
|
standard mechanisms for harvesting randomness for the system entropy
|
|
|
|
|
pool. This is important in systems with high entropy needs or limited
|
|
|
|
|
user interaction (e.g. headless servers).
|
|
|
|
|
|
|
|
|
|
Haveged uses HAVEGE (HArdware Volatile Entropy Gathering and Expansion)
|
|
|
|
|
to maintain a 1M pool of random bytes used to fill /dev/random
|
|
|
|
|
whenever the supply of random bits in /dev/random falls below the low
|
|
|
|
|
water mark of the device. The principle inputs to haveged are the
|
|
|
|
|
sizes of the processor instruction and data caches used to setup the
|
|
|
|
|
HAVEGE collector. The haveged default is a 4kb data cache and a 16kb
|
|
|
|
|
instruction cache. On machines with a cpuid instruction, haveged will
|
|
|
|
|
attempt to select appropriate values from internal tables.
|
|
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
|
Summary: Headers and shared development libraries for HAVEGE algorithm
|
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
|
Headers and shared object symbolic links for the HAVEGE algorithm
|
|
|
|
|
|
2019-11-06 19:32:48 +08:00
|
|
|
%package_help
|
2019-09-30 10:52:40 -04:00
|
|
|
|
|
|
|
|
%prep
|
2020-07-21 11:45:24 +08:00
|
|
|
%autosetup -n %{name}-%{version} -p1
|
2019-09-30 10:52:40 -04:00
|
|
|
|
|
|
|
|
%build
|
2019-11-06 19:32:48 +08:00
|
|
|
%configure
|
2019-09-30 10:52:40 -04:00
|
|
|
make
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
make check
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
rm -rf %{buildroot}
|
|
|
|
|
make install DESTDIR=%{buildroot} INSTALL="install -p"
|
|
|
|
|
|
|
|
|
|
chmod 0644 COPYING README ChangeLog AUTHORS
|
|
|
|
|
|
|
|
|
|
rm -rf %{buildroot}/etc/init.d
|
|
|
|
|
pushd $RPM_BUILD_ROOT
|
|
|
|
|
mkdir -p .%{_unitdir}
|
|
|
|
|
install -p -m644 %{SOURCE1} .%{_unitdir}/haveged.service
|
|
|
|
|
popd
|
|
|
|
|
|
2019-11-06 19:32:48 +08:00
|
|
|
%delete_la_and_a
|
2019-09-30 10:52:40 -04:00
|
|
|
|
|
|
|
|
%clean
|
|
|
|
|
rm -rf %{buildroot}
|
|
|
|
|
|
|
|
|
|
%post
|
|
|
|
|
/sbin/ldconfig
|
|
|
|
|
%systemd_post haveged.service
|
2023-09-06 14:32:45 +08:00
|
|
|
/bin/systemctl enable haveged
|
|
|
|
|
/bin/systemctl start haveged
|
2019-09-30 10:52:40 -04:00
|
|
|
|
|
|
|
|
%preun
|
|
|
|
|
%systemd_preun haveged.service
|
|
|
|
|
|
|
|
|
|
%postun
|
|
|
|
|
/sbin/ldconfig
|
|
|
|
|
%systemd_postun_with_restart haveged.service
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%defattr(-, root, root, -)
|
|
|
|
|
%{_sbindir}/haveged
|
|
|
|
|
%{_unitdir}/haveged.service
|
|
|
|
|
%{_libdir}/*so.*
|
|
|
|
|
%doc COPYING README ChangeLog AUTHORS
|
|
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
|
%defattr(-, root, root, -)
|
|
|
|
|
%dir %{_includedir}/%{name}
|
|
|
|
|
%{_includedir}/%{name}/havege.h
|
|
|
|
|
%doc contrib/build/havege_sample.c
|
|
|
|
|
%{_libdir}/*.so
|
|
|
|
|
|
|
|
|
|
%files help
|
|
|
|
|
%defattr(-, root, root, -)
|
|
|
|
|
%{_mandir}/man8/haveged.8*
|
|
|
|
|
%{_mandir}/man3/libhavege.3*
|
|
|
|
|
|
|
|
|
|
%changelog
|
2023-09-06 14:32:45 +08:00
|
|
|
* Wed Sep 6 2023 wangqingsan <wangqingsan@huawei.com> - 1.9.18-2
|
|
|
|
|
- enable haveged.service
|
|
|
|
|
|
2022-07-04 14:20:14 +08:00
|
|
|
* Mon Jul 4 2022 panxiaohe <panxh.life@foxmail.com> - 1.9.18-1
|
|
|
|
|
- update to 1.9.18
|
|
|
|
|
|
2021-11-30 17:03:33 +08:00
|
|
|
* Fri Dec 24 2021 yixiangzhike <yixiangzhike007@163.com> - 1.9.15-1
|
|
|
|
|
- update to 1.9.15
|
|
|
|
|
|
2021-07-19 18:49:50 +08:00
|
|
|
* Mon Jul 19 2021 yixiangzhike <zhangxingliang3@huawei.com> - 1.9.14-3
|
|
|
|
|
- delete unnecessary gdb from BuildRequires
|
|
|
|
|
|
2021-05-25 19:12:01 +08:00
|
|
|
* Tue May 25 2021 yixiangzhike <zhangxingliang3@huawei.com> - 1.9.14-2
|
|
|
|
|
- add gcc to BuildRequires
|
|
|
|
|
|
2021-01-26 16:43:20 +08:00
|
|
|
* Tue Jan 26 2021 fuanan <fuanan3@huawei.com> - 1.9.14-1
|
|
|
|
|
- Update to version 1.9.14
|
|
|
|
|
|
2020-09-11 16:37:38 +08:00
|
|
|
* Fri Sep 11 2020 zhangxingliang <zhangxingliang3@huawei.com> - 1.9.13-3
|
|
|
|
|
- solve startup failure
|
|
|
|
|
|
2020-08-13 10:17:19 +08:00
|
|
|
* Thu Aug 13 2020 Anakin Zhang <benjamin93@163.com> - 1.9.13-2
|
|
|
|
|
- remove libhavege.so.1*
|
|
|
|
|
|
2020-07-21 11:45:24 +08:00
|
|
|
* Thu Jul 23 2020 wangchen <wangchen137@huawei.com> - 1.9.13-1
|
|
|
|
|
- update to 1.9.13
|
|
|
|
|
|
2020-01-07 20:02:23 +08:00
|
|
|
* Tue Jan 7 2020 openEuler Buildteam <buildteam@openeuler.org> - 1.9.8-2
|
|
|
|
|
- update service
|
|
|
|
|
|
2019-11-06 19:32:48 +08:00
|
|
|
* Mon Oct 14 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.9.8-1
|
|
|
|
|
- update to 1.9.8-1
|
|
|
|
|
|
2019-09-30 10:52:40 -04:00
|
|
|
* Fri Sep 27 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.9.1-3
|
|
|
|
|
- fix the core file problem
|
|
|
|
|
|
|
|
|
|
* Fri Sep 27 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.9.1-2
|
|
|
|
|
- adjust requires
|
|
|
|
|
|
|
|
|
|
* Wed Sep 4 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.9.1-1
|
|
|
|
|
- rewrite spec file based upstream spec
|