Hello community,
here is the log from the commit of package haveged for openSUSE:Factory
checked in at Sat Oct 2 02:11:16 CEST 2010.
--------
New Changes file:
--- /dev/null 2010-07-09 01:59:37.000000000 +0200
+++ /mounts/work_src_done/STABLE/haveged/haveged.changes 2010-09-24 18:25:03.000000000 +0200
@@ -0,0 +1,53 @@
+-------------------------------------------------------------------
+Fri Sep 24 16:14:20 UTC 2010 - cristian.rodriguez@opensuse.org
+
+- Drop as much capabilitites as possible using libcap-ng
+
+-------------------------------------------------------------------
+Sat Jul 31 23:55:20 UTC 2010 - cristian.rodriguez@opensuse.org
+
+- I meant Enhances not Supplements
+
+-------------------------------------------------------------------
+Fri Jul 30 22:18:23 UTC 2010 - cristian.rodriguez@opensuse.org
+
+- Implement hack to start by default only in VMs
+
+-------------------------------------------------------------------
+Tue Jul 27 22:02:20 UTC 2010 - cristian.rodriguez@opensuse.org
+
+- Run the complete test suite (for the paranoid)
+- use O_CLOEXEC on fds
+
+-------------------------------------------------------------------
+Tue Jul 20 21:27:49 UTC 2010 - cristian.rodriguez@opensuse.org
+
+- enable daemon by default
+- add a few Supplements so the it gets installed automatically.
+
+-------------------------------------------------------------------
+Sun Jul 18 21:25:16 UTC 2010 - cristian.rodriguez@opensuse.org
+
+- add proper Requires(pre)
+
+-------------------------------------------------------------------
+Fri Jul 16 17:30:31 UTC 2010 - cristian.rodriguez@opensuse.org
+
+- build with no optimization, there are reports saying it
+ may crash with -O1 like http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=563938
+
+-------------------------------------------------------------------
+Thu Jul 15 17:37:11 UTC 2010 - cristian.rodriguez@opensuse.org
+
+- move deamon to /sbin
+- tune the spec file
+- add a SUSE standard init script
+
+-------------------------------------------------------------------
+Fri May 28 14:03:54 CEST 2010 - meissner@suse.de
+
+- haveged 0.9
+
+ Gather entropy by doing calculation and looking
+ at secondary high resolution processor information
+ (tsc, cache misses etc.)
calling whatdependson for head-i586
New:
----
haveged-0.9-cloexec.patch
haveged-0.9.tar.bz2
haveged-capabilties.patch
haveged.changes
haveged.init
haveged.spec
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ haveged.spec ++++++
#
# spec file for package haveged (Version 0.9)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: haveged
Version: 0.9
Release: 1
License: GPLv3
Group: System/Daemons
Summary: Feed entropy into random pool
Url: http://www.issihosts.com/haveged/
Source0: http://www.issihosts.com/haveged/haveged-%{version}.tar.bz2
Source1: haveged.init
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires(pre): %insserv_prereq
Requires(post): grep util-linux
Enhances: openssl gpg2 php5 apache2 openvpn smtp_daemon
Patch: haveged-0.9-cloexec.patch
Patch1: haveged-capabilties.patch
BuildRequires: libcap-ng-devel
%description
The haveged daemon feeds the linux entropy pool with random
numbers generated from hidden processor state.
For more informations see http://www.issihosts.com/haveged/
%prep
%setup -q
%patch
%patch1
%build
autoreconf -fiv
CFLAGS="$RPM_OPT_FLAGS -O0"
%configure --with-libcap-ng=yes --sbindir=/sbin --enable-nistest=yes
make %{?smp_flags}
%check
make %{?smp_flags} check
%install
make DESTDIR=$RPM_BUILD_ROOT install
%{__install} -m0755 %{S:1} %{buildroot}/etc/init.d/haveged
%{__mkdir_p} %{buildroot}%{_sbindir}
%{__ln_s} -f %{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name}
%clean
rm -rf $RPM_BUILD_ROOT
%post
## brace for impact...
%if 0%{?sles_version}
if [ -x /usr/bin/lscpu ]; then
if /usr/bin/lscpu | grep -q "Virtualization type" ; then
## Is a VM
%{fillup_and_insserv -fy %{name}}
else
## it isnt.
%{fillup_and_insserv -f %{name}}
fi
else
##there is no lscpu! shouldnt happend...
%{fillup_and_insserv -f %{name}}
fi
%else
%{fillup_and_insserv -fy %{name}}
%endif
%postun
%restart_on_update %{name}
%{insserv_cleanup}
%preun
%stop_on_removal %{name}
%files
%defattr(-,root,root)
%{_sbindir}/rc%{name}
/sbin/haveged
%config /etc/init.d/haveged
%{_mandir}/man8/haveged.8.gz
%changelog
++++++ haveged-0.9-cloexec.patch ++++++
Index: src/haveged.c
===================================================================
--- src/haveged.c.orig 2009-09-02 18:58:14.000000000 +0200
+++ src/haveged.c 2010-07-26 17:14:35.334236000 +0200
@@ -83,7 +83,7 @@ void daemonize(struct hperf *perf)
signal(SIGTERM, tidy_exit);
if (daemon(0, 0) == -1)
error_exit("Cannot fork into the background");
- fh = fopen(params->pid_file, "w");
+ fh = fopen(params->pid_file, "we");
if (!fh)
error_exit("Couldn't open PID file \"%s\" for writing: %m.", params->pid_file);
fprintf(fh, "%i", getpid());
@@ -147,12 +147,12 @@ int get_poolsize()
int max_bits,major,minor;
if (params->run_level==0) {
- poolsize_fh = fopen(params->poolsize, "rb");
+ poolsize_fh = fopen(params->poolsize, "rbe");
if (poolsize_fh) {
if (fscanf(poolsize_fh, "%d", &max_bits)!=1)
max_bits = -1;
fclose(poolsize_fh);
- osrel_fh = fopen(params->os_rel, "rb");
+ osrel_fh = fopen(params->os_rel, "rbe");
if (osrel_fh) {
if (fscanf(osrel_fh,"%d.%d", &major, &minor)<2)
major = minor = 0;
@@ -263,7 +263,7 @@ void run(int poolsize, struct rand_pool_
daemonize(perf);
if (params->low_water>0)
set_watermark(params->low_water);
- random_fd = open(params->random_device, O_RDWR);
+ random_fd = open(params->random_device, O_RDWR | O_CLOEXEC);
if (random_fd == -1)
error_exit("Couldn't open random device: %m");
break;
@@ -272,7 +272,7 @@ void run(int poolsize, struct rand_pool_
return;
default:
ct = params->sample_size*1024;
- if (!(fout = fopen (params->sample_out, "wb")))
+ if (!(fout = fopen (params->sample_out, "wbe")))
error_exit("Cannot open file <%s> for writing.\n", params->sample_out);
fprintf(stderr, "Writing %d byte sample\n",ct);
}
@@ -334,7 +334,7 @@ void set_watermark(int level)
{
FILE *wm_fh;
- wm_fh = fopen(params->watermark, "w");
+ wm_fh = fopen(params->watermark, "we");
if (wm_fh) {
fprintf(wm_fh, "%d\n", level);
fclose(wm_fh);
Index: configure.ac
===================================================================
--- configure.ac.orig 2009-09-02 01:22:33.000000000 +0200
+++ configure.ac 2010-07-26 17:20:58.745701000 +0200
@@ -8,7 +8,7 @@ AC_CONFIG_AUX_DIR(config)
AC_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([/src/haveged.c])
-
+AC_USE_SYSTEM_EXTENSIONS
## Make nist self-test configurable
AC_ARG_ENABLE(nistest, AS_HELP_STRING([--enable-nistest=[no/yes]],[Run NIST test suite [default=no]]),, enable_nistest="no")
if test "x$enable_nistest" = "xyes"; then
++++++ haveged-capabilties.patch ++++++
--- configure.ac.orig 2010-09-24 18:13:42.282707000 +0200
+++ configure.ac 2010-09-24 18:13:42.311704000 +0200
@@ -68,7 +68,7 @@ AC_FUNC_MALLOC
AC_FUNC_SELECT_ARGTYPES
AC_TYPE_SIGNAL
AC_CHECK_FUNCS([floor gettimeofday memset pow select sqrt])
-
+LIBCAP_NG_PATH
# Sets hardware depedent define for the build
AC_SUBST(HA_CPPFLAGS,$HA_CPPFLAGS)
--- src/Makefile.am.orig 2009-09-01 22:45:25.000000000 +0200
+++ src/Makefile.am 2010-09-24 18:13:42.319719000 +0200
@@ -4,5 +4,5 @@ AM_CFLAGS=-Wall
AM_CPPFLAGS = @HA_CPPFLAGS@
haveged_SOURCES = haveged.c havege.c havegedef.h haveged.h havege.h oneiteration.h loopbody.h
-
+haveged_LDADD = @CAPNG_LDADD@
MAINTAINERCLEANFILES = Makefile.in
--- src/haveged.c.orig 2010-09-24 18:13:42.276714000 +0200
+++ src/haveged.c 2010-09-24 18:14:41.605757000 +0200
@@ -16,6 +16,11 @@
** You should have received a copy of the GNU General Public License
** along with this program. If not, see http://www.gnu.org/licenses/.
*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include