Sophie

Sophie

distrib > Fedora > 16 > x86_64 > media > updates-src > by-pkgid > ab8ed014c92c1994d86cd56966e019fb > files > 3

haveged-1.3-2.fc16.src.rpm

Summary:        A Linux entropy source using the HAVEGE algorithm
Name:           haveged
Version:        1.3
Release:        2%{?dist}
License:        GPLv3+
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Group:          System Environment/Daemons
URL:            http://www.irisa.fr/caps/projects/hipsor/
Source0:        http://www.issihosts.com/haveged/haveged-1.3.tar.gz
#Source1:       test.gdb
Patch0:         haveged-1.3_ppc.patch
#Source2:       cpuid-20110305.src.tar.gz
# Patch represents changes planed for the version 1.3:
# - changed run levels:
# - added option to write random bytes to stdout: -f -
#Patch0:         haveged-1.2_jh.patch 
Requires(post):   chkconfig
Requires(preun):  chkconfig, initscripts
Requires(postun): initscripts
BuildRequires:  automake gdb coreutils

%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.

%prep
%setup -q
%patch0 -p1

%build
autoreconf -fiv
%configure
make %{?_smp_mflags}

%check
#install -p -m 644 %%{SOURCE1} ./
#install -p -m 644 %%{SOURCE2} ./
#tar zxvf cpuid-20110305.src.tar.gz
#cd cpuid-20110305
#make
#cd ..
#uname -a
#cat /proc/cpuinfo
#gcc --version
#cpuid-20110305/cpuid -r
#cpuid-20110305/cpuid
#cat /sys/devices/system/cpu/cpu0/cache/index*/size
#cat /sys/devices/system/cpu/cpu0/cache/index*/type
#gdb src/haveged --batch -x test.gdb
#src/haveged -r 1 -v -1
make check


%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot} INSTALL="%{__install} -p"

#Installing Fedora specific haveged SysV-style initscript 
#http://fedoraproject.org/wiki/Packaging:SysVInitScript
#Need to remove haveged specific script from __buildroot__ since it's installed to the wrong location 
#(/etc/init.d instead of /etc/rc.d/init.d)
rm -rf %{buildroot}/etc/init.d
install -m755 -D contrib/haveged_fedora %{buildroot}%{_initrddir}/haveged
chmod 0644 COPYING README ChangeLog AUTHORS

%clean
rm -rf %{buildroot}

%post
/sbin/chkconfig --add haveged

%preun
if [ "$1" -eq "0" ]; then
  /sbin/service haveged stop >/dev/null 2>&1
  /sbin/chkconfig --del haveged
fi

%postun
if [ "$1" -ge "1" ]; then
  /sbin/service haveged condrestart >/dev/null 2>&1
fi


%files
%defattr(-, root, root, -)
%{_mandir}/man8/haveged.8*
%{_sbindir}/haveged
%{_initrddir}/haveged
%doc COPYING README ChangeLog AUTHORS

%changelog
* Sat Nov 06 2011 Jirka Hladky <hladky.jiri@gmail.com> - 1.3-2
- Fixed a bug on non x86 systems
* Sat Nov 05 2011 Jirka Hladky <hladky.jiri@gmail.com> - 1.3-1
- update from the upstream (1.3 stable)
* Mon Oct 03 2011 Jirka Hladky <hladky.jiri@gmail.com> - 1.3-0
-version 1.3 beta
* Fri Sep 30 2011 Jirka Hladky <hladky.jiri@gmail.com> - 1.2-4
- ppc64 build
* Mon Sep 26 2011 Jirka Hladky <hladky.jiri@gmail.com> - 1.2-3
- Cleaned spec file according to https://bugzilla.redhat.com/show_bug.cgi?id=739347#c11
* Sat Sep 24 2011 Jirka Hladky <hladky.jiri@gmail.com> - 1.2-2
- Added comment to explain why we need use Fedora specific start script
* Wed Sep 21 2011 Jirka Hladky <hladky.jiri@gmail.com> - 1.2-1
- Cleaned spec file according to https://bugzilla.redhat.com/show_bug.cgi?id=739347#c1
* Wed Sep 07 2011  Jirka Hladky <hladky.jiri@gmail.com> - 1.2-0
- Initial build