Accepting request 161205 from security
- add autoconf to BuildRequires - explain the need for autoreconf - tag haveged-ppc.patch - Remove all sysvinit compatibility. OBS-URL: https://build.opensuse.org/request/show/161205 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/haveged?expand=0&rev=30
This commit is contained in:
commit
4c626a040c
@ -1,3 +1,15 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Mar 26 14:19:46 UTC 2013 - mvyskocil@suse.com
|
||||||
|
|
||||||
|
- add autoconf to BuildRequires
|
||||||
|
- explain the need for autoreconf
|
||||||
|
- tag haveged-ppc.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Mar 20 23:28:42 UTC 2013 - crrodriguez@opensuse.org
|
||||||
|
|
||||||
|
- Remove all sysvinit compatibility.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jan 21 01:18:16 CET 2013 - ro@suse.de
|
Mon Jan 21 01:18:16 CET 2013 - ro@suse.de
|
||||||
|
|
||||||
|
113
haveged.init
113
haveged.init
@ -1,113 +0,0 @@
|
|||||||
#! /bin/sh
|
|
||||||
|
|
||||||
### BEGIN INIT INFO
|
|
||||||
# Provides: haveged
|
|
||||||
# Required-Start: $syslog $local_fs $remote_fs
|
|
||||||
# Required-Stop: $syslog $local_fs $remote_fs
|
|
||||||
# Default-Start: 2 3 5
|
|
||||||
# Default-Stop:
|
|
||||||
# Short-Description: Daemon to feed entropy into /dev/urandom
|
|
||||||
# Description: The haveged daemon uses the timing variations that occur in executing a fixed loop
|
|
||||||
# to generate random numbers that are fed into the random pool.
|
|
||||||
### END INIT INFO
|
|
||||||
|
|
||||||
HAVEGED_BIN=/usr/sbin/haveged
|
|
||||||
HAVEGED_PARAMS="-w 1024 -v 0"
|
|
||||||
|
|
||||||
# Shell functions sourced from /etc/rc.status:
|
|
||||||
# rc_check check and set local and overall rc status
|
|
||||||
# rc_status check and set local and overall rc status
|
|
||||||
# rc_status -v ditto but be verbose in local rc status
|
|
||||||
# rc_status -v -r ditto and clear the local rc status
|
|
||||||
# rc_failed set local and overall rc status to failed
|
|
||||||
# rc_reset clear local rc status (overall remains)
|
|
||||||
# rc_exit exit appropriate to overall rc status
|
|
||||||
. /etc/rc.status
|
|
||||||
|
|
||||||
# First reset status of this service
|
|
||||||
rc_reset
|
|
||||||
|
|
||||||
# Return values acc. to LSB for all commands but status:
|
|
||||||
# 0 - success
|
|
||||||
# 1 - misc error
|
|
||||||
# 2 - invalid or excess args
|
|
||||||
# 3 - unimplemented feature (e.g. reload)
|
|
||||||
# 4 - insufficient privilege
|
|
||||||
# 5 - program not installed
|
|
||||||
# 6 - program not configured
|
|
||||||
#
|
|
||||||
# Note that starting an already running service, stopping
|
|
||||||
# or restarting a not-running service as well as the restart
|
|
||||||
# with force-reload (in case signalling is not supported) are
|
|
||||||
# considered a success.
|
|
||||||
case "$1" in
|
|
||||||
start)
|
|
||||||
echo -n "Starting haveged daemon "
|
|
||||||
## Start daemon with startproc(8). If this fails
|
|
||||||
## the echo return value is set appropriate.
|
|
||||||
|
|
||||||
|
|
||||||
# startproc should return 0, even if service is
|
|
||||||
# already running to match LSB spec.
|
|
||||||
startproc $HAVEGED_BIN $HAVEGED_PARAMS
|
|
||||||
|
|
||||||
# Remember status and be verbose
|
|
||||||
rc_status -v
|
|
||||||
;;
|
|
||||||
stop)
|
|
||||||
echo -n "Shutting down haveged daemon "
|
|
||||||
killproc -TERM $HAVEGED_BIN
|
|
||||||
|
|
||||||
# Remember status and be verbose
|
|
||||||
rc_status -v
|
|
||||||
;;
|
|
||||||
try-restart|condrestart)
|
|
||||||
## Do a restart only if the service was active before.
|
|
||||||
## Note: try-restart is now part of LSB (as of 1.9).
|
|
||||||
## RH has a similar command named condrestart.
|
|
||||||
if test "$1" = "condrestart"; then
|
|
||||||
echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
|
|
||||||
fi
|
|
||||||
$0 status
|
|
||||||
if test $? = 0; then
|
|
||||||
$0 restart
|
|
||||||
else
|
|
||||||
rc_reset # Not running is not a failure.
|
|
||||||
fi
|
|
||||||
# Remember status and be quiet
|
|
||||||
rc_status
|
|
||||||
;;
|
|
||||||
restart | force-reload)
|
|
||||||
$0 stop
|
|
||||||
$0 start
|
|
||||||
;;
|
|
||||||
reload)
|
|
||||||
## Like force-reload, but if daemon does not support
|
|
||||||
## signaling, do nothing (!)
|
|
||||||
rc_failed 3
|
|
||||||
rc_status -v
|
|
||||||
;;
|
|
||||||
status)
|
|
||||||
echo -n "Checking for haveged daemon "
|
|
||||||
## Check status with checkproc(8), if process is running
|
|
||||||
## checkproc will return with exit status 0.
|
|
||||||
|
|
||||||
# Status has a slightly different for the status command:
|
|
||||||
# 0 - service running
|
|
||||||
# 1 - service dead, but /var/run/ pid file exists
|
|
||||||
# 2 - service dead, but /var/lock/ lock file exists
|
|
||||||
# 3 - service not running
|
|
||||||
|
|
||||||
# NOTE: checkproc returns LSB compliant status values.
|
|
||||||
checkproc $HAVEGED_BIN
|
|
||||||
rc_status -v
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo $"Usage: $0 {start|stop|status|restart|reload}"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
rc_exit
|
|
||||||
|
|
||||||
# vim: set sw=4 ts=4 et:
|
|
44
haveged.spec
44
haveged.spec
@ -24,23 +24,15 @@ License: GPL-3.0
|
|||||||
Group: System/Daemons
|
Group: System/Daemons
|
||||||
Url: http://www.issihosts.com/haveged/
|
Url: http://www.issihosts.com/haveged/
|
||||||
Source0: http://www.issihosts.com/haveged/%{name}-%{version}.tar.gz
|
Source0: http://www.issihosts.com/haveged/%{name}-%{version}.tar.gz
|
||||||
Source1: %{name}.init
|
|
||||||
Source2: %{name}.service
|
Source2: %{name}.service
|
||||||
|
#PATCH-FIX-OPENSUSE: mvyskocil: sent upstream
|
||||||
Patch0: haveged-ppc.patch
|
Patch0: haveged-ppc.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: automake
|
|
||||||
Requires(pre): %insserv_prereq
|
|
||||||
%if 0%{suse_version} >= 1140
|
|
||||||
Requires(pre): sysvinit(syslog)
|
|
||||||
%endif
|
|
||||||
Requires(post): grep util-linux
|
|
||||||
Enhances: openssl gpg2 php5 apache2 openvpn smtp_daemon
|
Enhances: openssl gpg2 php5 apache2 openvpn smtp_daemon
|
||||||
%{!?_initddir: %global _initddir /etc/init.d}
|
BuildRequires: autoconf
|
||||||
%if 0%{?suse_version} > 1140
|
BuildRequires: libtool
|
||||||
BuildRequires: systemd
|
BuildRequires: pkgconfig(systemd)
|
||||||
%{?systemd_requires}
|
%{?systemd_requires}
|
||||||
%define have_systemd 1
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The haveged daemon feeds the linux entropy pool with random
|
The haveged daemon feeds the linux entropy pool with random
|
||||||
@ -72,12 +64,11 @@ algorithm and supporting features.
|
|||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if 0%{?suse_version} < 1220
|
# mvyskocil: needed because of haveged-ppc.patch
|
||||||
autoreconf -fiv
|
autoreconf -fiv
|
||||||
%endif
|
|
||||||
export CFLAGS="%optflags -fpie"
|
export CFLAGS="%optflags -fpie"
|
||||||
export LDFLAGS="-Wl,-z,relro,-z,now -pie"
|
export LDFLAGS="-Wl,-z,relro,-z,now -pie"
|
||||||
%configure \
|
%configure --disable-static \
|
||||||
--enable-nistest=yes \
|
--enable-nistest=yes \
|
||||||
--enable-daemon=yes \
|
--enable-daemon=yes \
|
||||||
--enable-clock_gettime=yes
|
--enable-clock_gettime=yes
|
||||||
@ -97,42 +88,23 @@ make %{?_smp_mflags} check
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
%makeinstall
|
%makeinstall
|
||||||
%{__install} -D -m0755 %{S:1} %{buildroot}%{_initddir}/%{name}
|
|
||||||
%{__mkdir_p} %{buildroot}%{_sbindir}
|
|
||||||
%{__ln_s} -f %{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name}
|
|
||||||
|
|
||||||
%if 0%{?have_systemd}
|
|
||||||
%{__install} -D -m0644 %{S:2} %{buildroot}%{_unitdir}/%{name}.service
|
%{__install} -D -m0644 %{S:2} %{buildroot}%{_unitdir}/%{name}.service
|
||||||
%endif
|
|
||||||
%{__rm} -f %{buildroot}%{_libdir}/libhavege.*a
|
%{__rm} -f %{buildroot}%{_libdir}/libhavege.*a
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
%{?buildroot:%__rm -rf "%{buildroot}"}
|
%{?buildroot:%__rm -rf "%{buildroot}"}
|
||||||
|
|
||||||
%post
|
%post
|
||||||
# do not enable on condition here, let YAST, kiwi or the user do it.
|
|
||||||
%{fillup_and_insserv -f %{name}}
|
|
||||||
%if 0%{?have_systemd}
|
|
||||||
%service_add_post %{name}.service
|
%service_add_post %{name}.service
|
||||||
%endif
|
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%restart_on_update %{name}
|
|
||||||
%{insserv_cleanup}
|
|
||||||
%if 0%{?have_systemd}
|
|
||||||
%service_del_postun %{name}.service
|
%service_del_postun %{name}.service
|
||||||
%endif
|
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
%if 0%{?have_systemd}
|
|
||||||
%service_add_pre %{name}.service
|
%service_add_pre %{name}.service
|
||||||
%endif
|
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
%stop_on_removal %{name}
|
|
||||||
%if 0%{?have_systemd}
|
|
||||||
%service_del_preun %{name}.service
|
%service_del_preun %{name}.service
|
||||||
%endif
|
|
||||||
|
|
||||||
%post -n libhavege1 -p /sbin/ldconfig
|
%post -n libhavege1 -p /sbin/ldconfig
|
||||||
|
|
||||||
@ -141,13 +113,9 @@ make %{?_smp_mflags} check
|
|||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc COPYING
|
%doc COPYING
|
||||||
%{_sbindir}/rc%{name}
|
|
||||||
%{_sbindir}/%{name}
|
%{_sbindir}/%{name}
|
||||||
%config %{_initddir}/%{name}
|
|
||||||
%doc %{_mandir}/man8/%{name}.8*
|
%doc %{_mandir}/man8/%{name}.8*
|
||||||
%if 0%{?have_systemd}
|
|
||||||
%{_unitdir}/%{name}.service
|
%{_unitdir}/%{name}.service
|
||||||
%endif
|
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%doc COPYING
|
%doc COPYING
|
||||||
|
Loading…
x
Reference in New Issue
Block a user