[audio-entropyd] 2.0.3
Tom Callaway
spot at fedoraproject.org
Tue Jan 10 14:19:13 UTC 2012
commit 4092f88eb6ee5c19d586d44a05577ab2b3be56ce
Author: Tom Callaway <spot at fedoraproject.org>
Date: Tue Jan 10 09:19:09 2012 -0500
2.0.3
.gitignore | 1 +
audio-entropyd.service | 10 ++++++++
audio-entropyd.spec | 56 ++++++++++++++++++++++++++++++-----------------
sources | 2 +-
4 files changed, 48 insertions(+), 21 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 39c069a..10d2dcb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
audio-entropyd-2.0.1.tgz
+/audio-entropyd-2.0.3.tgz
diff --git a/audio-entropyd.service b/audio-entropyd.service
new file mode 100644
index 0000000..26fe0f2
--- /dev/null
+++ b/audio-entropyd.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Audio Entropy Daemon
+
+[Service]
+Type=forking
+PIDFile=/run/audio-entropyd.pid
+ExecStart=/usr/sbin/audio-entropyd
+
+[Install]
+WantedBy=multi-user.target
diff --git a/audio-entropyd.spec b/audio-entropyd.spec
index aade779..6856cd2 100644
--- a/audio-entropyd.spec
+++ b/audio-entropyd.spec
@@ -1,18 +1,18 @@
Name: audio-entropyd
-Version: 2.0.1
-Release: 3%{?dist}
+Version: 2.0.3
+Release: 1%{?dist}
License: GPLv2
Group: System Environment/Daemons
Summary: Generate entropy from audio output
URL: http://www.vanheusden.com/aed/
Source0: http://www.vanheusden.com/aed/audio-entropyd-%{version}.tgz
-Source1: audio-entropyd
+Source1: audio-entropyd.service
Source2: audio-entropyd.conf
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: alsa-lib-devel
-Requires(post): chkconfig
-Requires(preun): chkconfig, initscripts
-Requires(postun): initscripts
+Requires(post): systemd-sysv
+Requires(post): systemd-units
+Requires(preun): systemd-units
+Requires(postun): systemd-units
%description
Audio-entropyd generates entropy-data for the /dev/random device.
@@ -24,39 +24,55 @@ Audio-entropyd generates entropy-data for the /dev/random device.
make OPT_FLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
%install
-rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_sbindir}
install -m0755 audio-entropyd $RPM_BUILD_ROOT%{_sbindir}
-mkdir -p $RPM_BUILD_ROOT%{_initrddir}
-install -m0755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}
+mkdir -p $RPM_BUILD_ROOT%{_unitdir}
+install -m0755 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
install -m0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/audio-entropyd
-%clean
-rm -rf $RPM_BUILD_ROOT
-
%post
-/sbin/chkconfig --add audio-entropyd
+if [ $1 -eq 1 ] ; then
+ # Initial installation
+ /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+fi
%preun
-if [ "$1" -eq "0" ]; then
- /sbin/service audio-entropyd stop >/dev/null 2>&1
- /sbin/chkconfig --del audio-entropyd
+if [ $1 -eq 0 ] ; then
+ # Package removal, not upgrade
+ /bin/systemctl --no-reload disable audio-entropyd.service > /dev/null 2>&1 || :
+ /bin/systemctl stop audio-entropyd.service > /dev/null 2>&1 || :
fi
%postun
-if [ "$1" -ge "1" ]; then
- /sbin/service audio-entropyd condrestart >/dev/null 2>&1
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+if [ $1 -ge 1 ] ; then
+ # Package upgrade, not uninstall
+ /bin/systemctl try-restart audio-entropyd.service >/dev/null 2>&1 || :
fi
+%triggerun -- audio-entropyd < 2.0.3-1
+# Save the current service runlevel info
+# User must manually run systemd-sysv-convert --apply audio-entropyd
+# to migrate them to systemd targets
+/usr/bin/systemd-sysv-convert --save audio-entropyd >/dev/null 2>&1 ||:
+
+# Run these because the SysV package being removed won't do them
+/sbin/chkconfig --del httpd >/dev/null 2>&1 || :
+/bin/systemctl try-restart audio-entropyd.service >/dev/null 2>&1 || :
+
%files
%defattr(-,root,root,-)
%doc COPYING README TODO
-%{_initrddir}/audio-entropyd
+%{_unitdir}/audio-entropyd.service
%{_sbindir}/audio-entropyd
%config(noreplace) %{_sysconfdir}/sysconfig/audio-entropyd
%changelog
+* Tue Jan 10 2012 Tom Callaway <spot at fedoraproject.org> 2.0.3-1
+- update to 2.0.3
+- convert to systemd
+
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.0.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
diff --git a/sources b/sources
index 0721d40..4a90ba3 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-f8d71e214755b93a2da3dfa29157ef37 audio-entropyd-2.0.1.tgz
+44d355a0e61b6f291922fe99462d47e8 audio-entropyd-2.0.3.tgz
More information about the scm-commits
mailing list