From 0ade02724e81943c2c4740e0e130856381d40831 Mon Sep 17 00:00:00 2001 From: Miloš Jakubíček Date: Apr 14 2008 09:14:36 +0000 Subject: - Fixed running the boinc daemon as boinc user instead of root, file permissions changed accordingly. --- diff --git a/boinc-client-init-d b/boinc-client-init-d index b4f478b..85f3d54 100644 --- a/boinc-client-init-d +++ b/boinc-client-init-d @@ -73,7 +73,6 @@ ERRORLOG=/var/log/boincerr.log #BOINCOPTS="--allow_remote_gui_rpc" BOINCOPTS="--daemon" - # Subsys lock file ... # If there is the subsys directory, then use it ... @@ -170,7 +169,7 @@ case "$1" in fi echo -n "Starting BOINC client as a daemon: " - daemon "$BOINCEXE $BOINCOPTS" >>$LOGFILE 2>>$ERRORLOG & + daemon --user $BOINCUSER "$BOINCEXE $BOINCOPTS" >>$LOGFILE 2>>$ERRORLOG & sleep 1 PID=`pidof -s -x -o $$ -o $PPID -o %PPID $BOINCEXE` if [ $PID ]; then diff --git a/boinc-client.spec b/boinc-client.spec index 2f2c4b0..620d849 100644 --- a/boinc-client.spec +++ b/boinc-client.spec @@ -4,7 +4,7 @@ Summary: The BOINC client core Name: boinc-client Version: 5.10.45 -Release: 6.%{snap}svn%{?dist} +Release: 7.%{snap}svn%{?dist} License: LGPLv2+ Group: Applications/Engineering URL: http://boinc.berkeley.edu/ @@ -190,6 +190,11 @@ exit 0 %post /sbin/chkconfig --add boinc-client +#correct wrong owner and group on files under /var/lib/boinc and log files +#caused by bug fixed in 5.10.45-7 +chown --silent boinc:boinc %{_localstatedir}/log/boinc* \ +%{_localstatedir}/lib/boinc/* + %preun if [ $1 -eq 0 ]; then #if uninstalling, not only updating /sbin/service boinc-client stop @@ -221,7 +226,6 @@ fi %doc checkin_notes_2004 %doc checkin_notes_2003 %doc checkin_notes_2002 -%{_localstatedir}/lib/boinc %{_bindir}/boinc %{_bindir}/boinc_client %{_bindir}/boinc_cmd @@ -232,6 +236,8 @@ fi %{_mandir}/man1/boinc_client.1.gz %{_mandir}/man1/boinc_cmd.1.gz %{_mandir}/man1/boincmgr.1.gz +%defattr(-,boinc,boinc,-) +%{_localstatedir}/lib/boinc/ %files -n boinc-manager -f BOINC-Manager.lang %defattr(-,root,root,-) @@ -257,6 +263,10 @@ fi %changelog +* Mon Apr 14 2008 Milos Jakubicek - 5.10.45-7.20080315svn +- Fixed running the boinc daemon as boinc user instead of root, file + permissions changed accordingly. + * Mon Apr 07 2008 Milos Jakubicek - 5.10.45-6.20080315svn - Using --with-boinc-platform=i686-pc-linux-gnu on i386 instead of --build, --host, --target