- Cleanup with spec-cleaner

- Adapt the service file to be forking and match what it does for
  me on Gentoo.
- Disable threads as they seem break some times.
- Capitalize summaries to make rpmlint happy.

OBS-URL: https://build.opensuse.org/package/show/security/haveged?expand=0&rev=90
This commit is contained in:
Tomáš Chvátal 2014-05-07 09:24:36 +00:00 committed by Git OBS Bridge
parent dbd24e73c7
commit d41d862a9d
3 changed files with 41 additions and 30 deletions

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Wed May 7 09:12:26 UTC 2014 - tchvatal@suse.com
- Cleanup with spec-cleaner
- Adapt the service file to be forking and match what it does for
me on Gentoo.
- Disable threads as they seem break some times.
- Capitalize summaries to make rpmlint happy.
-------------------------------------------------------------------
Tue Mar 11 10:21:46 UTC 2014 - dvaleev@suse.com

View File

@ -1,10 +1,14 @@
[Unit]
Description=Haveged Entropy Gathering Daemon
Description=Entropy Daemon based on the HAVEGE algorithm
Documentation=man:haveged(8) http://www.issihosts.com/haveged/
[Service]
Type=simple
ExecStart=/usr/sbin/haveged -w 1024 -v 0 -F
Type=forking
EnvironmentFile=/etc/haveged.conf
PIDFile=/run/haveged.pid
ExecStart=/usr/sbin/haveged -w 1024 -v 0 -p /run/haveged.pid
CapabilityBoundingSet=CAP_SYS_ADMIN
PrivateNetwork=yes
[Install]
WantedBy=multi-user.target

View File

@ -26,16 +26,17 @@ Url: http://www.issihosts.com/haveged/
Source0: http://www.issihosts.com/haveged/%{name}-%{version}.tar.gz
Source2: %{name}.service
Patch0: ppc64le.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Enhances: openssl
Enhances: gpg2
Enhances: php5
Enhances: apache2
Enhances: openvpn
Enhances: smtp_daemon
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
BuildRequires: pkgconfig(systemd)
Enhances: apache2
Enhances: gpg2
Enhances: openssl
Enhances: openvpn
Enhances: php5
Enhances: smtp_daemon
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{?systemd_requires}
%description
@ -45,7 +46,7 @@ numbers generated from hidden processor state.
For more informations see http://www.issihosts.com/haveged/
%package devel
Summary: haveged development files
Summary: Haveged development files
Group: Development/Libraries
Requires: libhavege1 = %{version}
@ -56,7 +57,7 @@ This package contains the haveged implementation of the HAVEGE
algorithm and supporting features.
%package -n libhavege1
Summary: haveged interface library
Summary: Haveged interface library
Group: Development/Libraries/C and C++
%description -n libhavege1
@ -67,38 +68,35 @@ algorithm and supporting features.
%prep
%setup -q
%patch0 -p1
autoreconf -fvi
%build
# mvyskocil: needed because of haveged-ppc.patch
autoreconf -fiv
export CFLAGS="%optflags -fpie"
export CFLAGS="%{optflags} -fpie"
export LDFLAGS="-Wl,-z,relro,-z,now -pie"
%configure --disable-static \
--enable-nistest=yes \
--enable-daemon=yes \
--enable-clock_gettime=yes
# no multiple jobs for now, broken makefile dependencies
#make %{?_smp_mflags}
make
# Threads seem broken
%configure \
--disable-static \
--disable-threads \
--enable-nistest \
--enable-daemon \
--enable-clock_gettime
make %{?_smp_mflags}
%check
#XXX: nist test is killed by SIGKILL with static int random_pool1[_32MB] on
# 32bit. Let change it to _08MB to avoid the test beeing killed, even if I
# am not sure allocate of 128M is prohibited
%ifarch %{ix86}
%ifarch %ix86
sed -i 's/\[_32MB\]/[_08MB]/' nist/nist.c
%endif
make %{?_smp_mflags} check
%install
%makeinstall
%{__install} -D -m0644 %{S:2} %{buildroot}%{_unitdir}/%{name}.service
%{__rm} -f %{buildroot}%{_libdir}/libhavege.*a
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rc%{name}
%clean
%{?buildroot:%__rm -rf "%{buildroot}"}
make DESTDIR=%{buildroot} install %{?_smp_mflags}
install -D -m0644 %{SOURCE2} %{buildroot}%{_unitdir}/%{name}.service
rm -f %{buildroot}%{_libdir}/libhavege.*a
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
%post
%service_add_post %{name}.service