diff options
author | Jirka Hladky <jhladky@redhat.com> | 2019-09-30 16:51:55 +0200 |
---|---|---|
committer | Jirka Hladky <jhladky@redhat.com> | 2019-09-30 16:51:55 +0200 |
commit | 525a47d5a51b4d3137345dcb019f27fd04f4b704 (patch) | |
tree | 32711142b967873129f2b5202397faea922955fd | |
parent | Merge pull request #21 from eworm-de/service (diff) | |
download | haveged-525a47d5a51b4d3137345dcb019f27fd04f4b704.tar.xz haveged-525a47d5a51b4d3137345dcb019f27fd04f4b704.zip |
Fix for Unresolved symbol error_exit in libhavege #20 by pld-gitsyncv1.9.7-alphav1.9.7
-rw-r--r-- | haveged.spec | 143 | ||||
-rw-r--r-- | src/Makefile.am | 9 |
2 files changed, 93 insertions, 59 deletions
diff --git a/haveged.spec b/haveged.spec index 06132f0..0a34ebf 100644 --- a/haveged.spec +++ b/haveged.spec @@ -1,76 +1,111 @@ -# -# Sample spec file for haveged and haveged-devel -# Copyright (c) 2013-2014 -# This file and all modifications and additions to the pristine -# package are under the same license as the package itself. -# -%define have_systemd 0 - -Name: haveged -Version: 1.9 -Release: 0 -License: GPLv3 -Group: System Environment/Daemons -Summary: Feed entropy into random pool -URL: http://www.issihosts.com/haveged/ -Source0: http://www.issihosts.com/haveged/haveged-%{version}.tar.gz -BuildRoot: %{_builddir}/%{name}-{%version}-build -%if 0%{?have_systemd} -BuildRequires: systemd -%endif +Summary: A Linux entropy source using the HAVEGE algorithm +Name: haveged +Version: 1.9.6 +Release: 1 +License: GPL v3+ +Group: Daemons +Source0: https://github.com/jirka-h/haveged/archive/v%{version}.tar.gz +# Source0-md5: 445ebbe0ecce01de06847689e9822efd +Patch0: %{name}-link.patch +URL: http://www.irisa.fr/caps/projects/hipsor/ +BuildRequires: autoconf >= 2.59 +BuildRequires: automake +BuildRequires: libtool +BuildRequires: rpmbuild(macros) >= 1.644 +BuildRequires: systemd-devel +Requires(post,preun,postun): systemd-units >= 38 +Requires: systemd-units >= 38 +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description -The haveged daemon feeds the linux entropy pool with random -numbers generated from hidden processor state. +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 libs +Summary: Shared libraries for HAVEGE algorithm +Group: Libraries + +%description libs +Shared libraries for HAVEGE algorithm. %package devel -Summary: haveged development files -Group: Development/Libraries +Summary: Headers and shared development libraries for HAVEGE algorithm +Group: Development/Libraries +Requires: %{name}-devel = %{version}-%{release} %description devel -Headers and shared object symbolic links for the haveged library - -This package contains the haveged implementation of the HAVEGE -algorithm and supporting features. +Headers and shared object symbolic links for the HAVEGE algorithm %prep %setup -q +%patch0 -p1 %build +%{__libtoolize} +%{__aclocal} +%{__autoconf} +%{__autoheader} +%{__automake} %configure \ - --enable-daemon\ - --enable-init=sysv.redhat -make - -%check -make check + --disable-static \ + --enable-init=service.fedora +# SMP build is not working +%{__make} -j1 %install -%makeinstall -%{__install} -D -m0755 init.d/haveged %{buildroot}%{_sysconfdir}/init.d/%{name} -%if 0%{?have_systemd} -%{__install} -D -m0644 init.d/havege.service %{buildroot}%{_unitdir}/%{name}.service -%endif -%{__rm} -f %{buildroot}%{_libdir}/libhavege.*a +rm -rf $RPM_BUILD_ROOT +%{__make} install \ + DESTDIR=$RPM_BUILD_ROOT + +install -d $RPM_BUILD_ROOT%{systemdunitdir} +#cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}/haveged.service + +# We don't ship .la files. +rm $RPM_BUILD_ROOT%{_libdir}/libhavege.la %clean -%{?buildroot:%__rm -rf "%{buildroot}"} +rm -rf $RPM_BUILD_ROOT + +%post libs -p /sbin/ldconfig +%postun libs -p /sbin/ldconfig + +%post +%systemd_post haveged.service + +%preun +%systemd_preun haveged.service + +%postun +%systemd_reload %files -%defattr(-, root, root, -) -%doc COPYING +%defattr(644,root,root,755) +%doc AUTHORS ChangeLog NEWS README contrib/build/havege_sample.c +%attr(755,root,root) %{_sbindir}/haveged %{_mandir}/man8/haveged.8* -%{_sbindir}/haveged -%{_sysconfdir}/init.d/haveged -%if 0%{?have_systemd} -%{_unitdir}/haveged.service -%endif +%{systemdunitdir}/haveged.service + +%files libs +%defattr(644,root,root,755) +%attr(755,root,root) %{_libdir}/libhavege.so.*.*.* +%ghost %{_libdir}/libhavege.so.1 %files devel -%doc COPYING -%defattr(-, root, root, -) +%defattr(644,root,root,755) +%{_includedir}/%{name} +%{_libdir}/libhavege.so %{_mandir}/man3/libhavege.3* -%dir %{_includedir}/%{name} -%{_includedir}/%{name}/havege.h -%doc contrib/build/havege_sample.c -%{_libdir}/*.so* diff --git a/src/Makefile.am b/src/Makefile.am index a50afb9..d1d7d2c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -21,13 +21,12 @@ libhavege_la_CPPFLAGS = libhavege_la_LDFLAGS = -version-number @HAVEGE_LT_VERSION@ libhavege_la_LIBADD = @HA_LDFLAGS@ -libhavege_la_SOURCES = havege.c havegetune.c havegecollect.c havegetest.c havegecmd.c \ - cpuid-43.h havege.h havegetune.h havegecollect.h havegetest.h oneiteration.h \ - havegecmd.h +libhavege_la_SOURCES = havege.c havegetune.c havegecollect.c havegetest.c \ + cpuid-43.h havege.h havegetune.h havegecollect.h havegetest.h oneiteration.h -pkginclude_HEADERS = havege.h havegecmd.h +pkginclude_HEADERS = havege.h -haveged_SOURCES = haveged.c haveged.h +haveged_SOURCES = haveged.c haveged.h havegecmd.c havegecmd.h haveged_LDADD = @HA_LDFLAGS@ libhavege.la ##libtool_end## |