1
0
forked from pool/cdemu-daemon
Jan Engelhardt 2012-05-29 08:50:16 +00:00 committed by Git OBS Bridge
parent 40c599cca7
commit 8f436e9b96
3 changed files with 27 additions and 34 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue May 29 08:47:19 UTC 2012 - jengelh@inai.de
- Remove dbus autostart and systemd unit file for system-bus mode.
Place system logfile in proper place (bnc#764063)
------------------------------------------------------------------- -------------------------------------------------------------------
Tue May 8 22:39:47 UTC 2012 - jengelh@inai.de Tue May 8 22:39:47 UTC 2012 - jengelh@inai.de

View File

@ -23,19 +23,14 @@ Group: System/Daemons
Url: http://cdemu.sf.net/ Url: http://cdemu.sf.net/
Source: http://downloads.sf.net/cdemu/%name-%version.tar.bz2 Source: http://downloads.sf.net/cdemu/%name-%version.tar.bz2
Source2: %name-rpmlintrc
Source3: cdemu-daemon.sysconfig Source3: cdemu-daemon.sysconfig
Source4: cdemu-daemon.service Patch1: logfile.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
#BuildRequires: autoconf >= 2.59 #BuildRequires: autoconf >= 2.59
BuildRequires: pkgconfig pkgconfig(glib-2.0) >= 2.28 BuildRequires: pkgconfig pkgconfig(glib-2.0) >= 2.28
BuildRequires: pkgconfig(gobject-2.0) >= 2.28 pkgconfig(gmodule-2.0) >= 2.28 BuildRequires: pkgconfig(gobject-2.0) >= 2.28 pkgconfig(gmodule-2.0) >= 2.28
BuildRequires: pkgconfig(gthread-2.0) >= 2.28, pkgconfig(gio-2.0) >= 2.28 BuildRequires: pkgconfig(gthread-2.0) >= 2.28, pkgconfig(gio-2.0) >= 2.28
BuildRequires: pkgconfig(ao) >= 0.8.0, pkgconfig(libmirage) >= 1.5.0 BuildRequires: pkgconfig(ao) >= 0.8.0, pkgconfig(libmirage) >= 1.5.0
%if 0%{?suse_version} >= 1210
BuildRequires: systemd
%systemd_requires
%endif
%description %description
cdemu-daemon receives SCSI commands from kernel module thorugh the cdemu-daemon receives SCSI commands from kernel module thorugh the
@ -50,6 +45,7 @@ that can be used by clients to control it.
%prep %prep
%setup -q %setup -q
%patch -P 1 -p1
%build %build
%configure %configure
@ -68,31 +64,8 @@ EOF
chmod a+x "$b/%_sbindir/cdemud-launch"; chmod a+x "$b/%_sbindir/cdemud-launch";
mkdir -p "$b/%_localstatedir/adm/fillup-templates"; mkdir -p "$b/%_localstatedir/adm/fillup-templates";
install -pm0644 "%{S:3}" "$b/%_localstatedir/adm/fillup-templates/sysconfig.cdemu-daemon"; install -pm0644 "%{S:3}" "$b/%_localstatedir/adm/fillup-templates/sysconfig.cdemu-daemon";
%if %{?_unitdir:1} # Not desired
mkdir -p "$b/%_unitdir"; rm -Rf "$b/%_datadir/dbus-1/system-services";
install -pm0644 "%{S:4}" "$b/%_unitdir/";
%endif
%if %{?_unitdir:1}
%pre
%service_add_pre cdemu-daemon.service
%endif
%post
%fillup_and_insserv -i
%if %{?_unitdir:1}
%service_add_post cdemu-daemon.service
%endif
%if %{?_unitdir:1}
%preun
%service_del_preun cdemu-daemon.service
%endif
%if %{?_unitdir:1}
%postun
%service_del_postun cdemu-daemon.service
%endif
%files %files
%defattr(-,root,root) %defattr(-,root,root)
@ -105,8 +78,5 @@ install -pm0644 "%{S:4}" "$b/%_unitdir/";
%_datadir/dbus-1 %_datadir/dbus-1
%_mandir/man8/cdemud.8* %_mandir/man8/cdemud.8*
%_localstatedir/adm/fillup-templates/sysconfig.cdemu-daemon %_localstatedir/adm/fillup-templates/sysconfig.cdemu-daemon
%if %{?_unitdir:1}
%_unitdir/*
%endif
%changelog %changelog

17
logfile.diff Normal file
View File

@ -0,0 +1,17 @@
---
system/cdemu-daemon-system.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: cdemu-daemon-1.5.0/system/cdemu-daemon-system.sh
===================================================================
--- cdemu-daemon-1.5.0.orig/system/cdemu-daemon-system.sh
+++ cdemu-daemon-1.5.0/system/cdemu-daemon-system.sh
@@ -6,7 +6,7 @@
# Default settings
NUM_DEVICES=2
AUDIO_DRIVER=null
-LOG_FILE=/tmp/cdemu-daemon.log
+LOG_FILE=/var/log/cdemu-daemon.log
# Read the settings
CONFIG_FILE=/etc/sysconfig/cdemu-daemon