Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 257113 - sci-misc/boinc-6.4.5: unrecognized option `--stdout'
Summary: sci-misc/boinc-6.4.5: unrecognized option `--stdout'
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Tomáš Chvátal (RETIRED)
URL:
Whiteboard:
Keywords:
: 257173 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-01-31 17:03 UTC by Toralf Förster
Modified: 2009-02-01 23:17 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patched init script (boinc,3.10 KB, text/plain)
2009-02-01 14:16 UTC, Andrea Conti
Details
init script (boinc.init,2.94 KB, text/plain)
2009-02-01 21:19 UTC, Andrea Conti
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2009-01-31 17:03:21 UTC
Upgrading from sci-misc/boinc-6.2.15 (and using the new config & init scripts) I get : 

n22 ~ # /etc/init.d/boinc start
 * Caching service dependencies ...                                                                                  [ ok ]
 * Starting BOINC ...
start-stop-daemon: unrecognized option `--stdout'
Try `start-stop-daemon --help' for more information.                                                                 [ !! ]


Reproducible: Always
Comment 1 Tomáš Chvátal (RETIRED) gentoo-dev 2009-01-31 17:41:05 UTC
What values you have in /etc/conf.d/boinc
Comment 2 Toralf Förster gentoo-dev 2009-01-31 19:04:34 UTC
The default(In reply to comment #1)
> What values you have in /etc/conf.d/boinc
> 

The default given by the ebuild :

n22 ~ # cat /etc/conf.d/boinc
# Config file for /etc/init.d/boinc

# Owner of BOINC process (must be existing)
USER="boinc"
GROUP="boinc"

# Directory with runtime data: Work units, project binaries, user info etc.
RUNTIMEDIR="/var/lib/boinc"

# Location of the boinc command line binary
BOINCBIN="/usr/bin/boinc_client"

# Logfile (/dev/null for nowhere)
LOGFILE="/var/log/boinc.log"

# Allow remote gui RPC yes or no
ALLOW_REMOTE_RPC="no"

# nice level
NICELEVEL="19"

# scheduling parameters, arguments to chrt(1)
SCHED_PARAM="--batch 0"

# Relative CPU allocation for boinc user, default is 1024,
# requires CONFIG_FAIR_GROUP_SCHED and CONFIG_USER_SCHED,
# see /usr/src/linux/Documentation/scheduler/sched-design-CFS.txt
CPU_SHARE="128"


and here it is :
n22 ~ # ls -l /var/log/boinc.log
-rw-r--r-- 1 boinc boinc 2656 Jan 31 17:38 /var/log/boinc.log


Comment 3 Tomáš Chvátal (RETIRED) gentoo-dev 2009-01-31 19:14:30 UTC
Good I guess i see the problem.
What version of openrc you have?
It works out just fine with 0.4.2 here.
Comment 4 Toralf Förster gentoo-dev 2009-01-31 19:23:52 UTC
(In reply to comment #3)
> Good I guess i see the problem.
> What version of openrc you have?
I don't have installed openrc.


Comment 5 svenvermant 2009-02-01 09:40:38 UTC
I have the same problem without having openrc installed. I tried to install it then, however it depends on many ~x86 sys-apps like baselayout-2.0, so I won't give it a try.
Comment 6 Toralf Förster gentoo-dev 2009-02-01 10:02:44 UTC
(In reply to comment #5)
> I have the same problem without having openrc installed. I tried to install it
> then, however it depends on many ~x86 sys-apps like baselayout-2.0, so I won't
> give it a try.
> 

Therefore it would be a good idea to keep the old 6.2.15 ebuild - or ?
Comment 7 svenvermant 2009-02-01 10:20:17 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > I have the same problem without having openrc installed. I tried to install it
> > then, however it depends on many ~x86 sys-apps like baselayout-2.0, so I won't
> > give it a try.
> > 
> 
> Therefore it would be a good idea to keep the old 6.2.15 ebuild - or ?
> 
I'd prefer a working 6.4.5 ;)
Comment 8 Andrea Conti 2009-02-01 13:32:35 UTC
To sum this up:

/sbin/start-stop-daemon from baselayout-1 does not accept a --stdout argument.

On the other hand, /sbin/start-stop-daemon from openrc (baselayout-2) *requires* output redirection to be done via --stdout (using > as in the 6.2 initscript does not cause errors but yields an empty log file).

Isn't compatibility a great thing? :)
Comment 9 Tomáš Chvátal (RETIRED) gentoo-dev 2009-02-01 13:47:18 UTC
My dear, my dear,
you are ruining my day :P
Ok how to handle this:
1) somebody with baselayout-1 modify my initscript so it work with it.
2) i will add tests to the ebuild testing which script to install based on if openrc is around or not.
3) everybody is happy :]
But it needs interaction from your side, i wont alter nice openrc script with baselayout-1 stuff since i dunno what i can and what i cant in there.
Comment 10 svenvermant 2009-02-01 13:56:36 UTC
(In reply to comment #9)
> My dear, my dear,
> you are ruining my day :P
> Ok how to handle this:
> 1) somebody with baselayout-1 modify my initscript so it work with it.
> 2) i will add tests to the ebuild testing which script to install based on if
> openrc is around or not.
> 3) everybody is happy :]
> But it needs interaction from your side, i wont alter nice openrc script with
> baselayout-1 stuff since i dunno what i can and what i cant in there.
I'm willing to help with 1), however I don't know anything about init-scripts, so I would need some advice about what to do precisely...

Comment 11 Tomáš Chvátal (RETIRED) gentoo-dev 2009-02-01 14:07:32 UTC
(In reply to comment #10)
> I'm willing to help with 1), however I don't know anything about init-scripts,
> so I would need some advice about what to do precisely...
> 

Well it is kinda simple, make it not write out that error and use log file, and see if it is complaining about something else :]
I guess it would be just replacement for this:
OLD:
        ${CHRT} start-stop-daemon \
                --quiet --start --chdir ${RUNTIMEDIR} \
                --exec ${BOINCBIN} --chuid ${USER}:${GROUP} \
                --background --stdout ${LOGFILE} --stderr ${LOGFILE} \
                --nicelevel ${NICELEVEL} -- ${ARGS}
NEW:
        ${CHRT} start-stop-daemon \
                --quiet --start --chdir ${RUNTIMEDIR} \
                --exec ${BOINCBIN} --chuid ${USER}:${GROUP} \
                --background --nicelevel ${NICELEVEL} \
                -- ${ARGS} &> ${LOGFILE}
Comment 12 svenvermant 2009-02-01 14:13:50 UTC
(In reply to comment #11)
> (In reply to comment #10)
> > I'm willing to help with 1), however I don't know anything about init-scripts,
> > so I would need some advice about what to do precisely...
> > 
> 
> Well it is kinda simple, make it not write out that error and use log file, and
> see if it is complaining about something else :]
> I guess it would be just replacement for this:
> OLD:
>         ${CHRT} start-stop-daemon \
>                 --quiet --start --chdir ${RUNTIMEDIR} \
>                 --exec ${BOINCBIN} --chuid ${USER}:${GROUP} \
>                 --background --stdout ${LOGFILE} --stderr ${LOGFILE} \
>                 --nicelevel ${NICELEVEL} -- ${ARGS}
> NEW:
>         ${CHRT} start-stop-daemon \
>                 --quiet --start --chdir ${RUNTIMEDIR} \
>                 --exec ${BOINCBIN} --chuid ${USER}:${GROUP} \
>                 --background --nicelevel ${NICELEVEL} \
>                 -- ${ARGS} &> ${LOGFILE}
> 
Seems to work!
Comment 13 Andrea Conti 2009-02-01 14:16:46 UTC
Created attachment 180542 [details]
patched init script

> 1) somebody with baselayout-1 modify my initscript so it work with it.

The attached script runs on both baselayout versions.
Yes, it's ugly and I don't think it's the right way to handle this, however:

> 2) i will add tests to the ebuild testing which script to install based on if
> openrc is around or not.

this will silently break things if you don't rebuild boinc after upgrading to baselayout-2...
Comment 14 Tomáš Chvátal (RETIRED) gentoo-dev 2009-02-01 14:36:50 UTC
I guess i have fixed up the initscript. Please test :].
It was commited to the tree right now so wait for next sync window to test :]
Report if init works as expected aswell as its failitures :]
Comment 15 Tomáš Chvátal (RETIRED) gentoo-dev 2009-02-01 15:08:29 UTC
*** Bug 257173 has been marked as a duplicate of this bug. ***
Comment 16 Nigel Drego 2009-02-01 17:55:08 UTC
(In reply to comment #14)
> I guess i have fixed up the initscript. Please test :].
> It was commited to the tree right now so wait for next sync window to test :]
> Report if init works as expected aswell as its failitures :]
> 
I was having the same problem and now the init script claims to start boinc but it never gets started. If I do a "ps -ef | grep boinc" I get nothing.
Comment 17 Tomáš Chvátal (RETIRED) gentoo-dev 2009-02-01 18:03:57 UTC
(In reply to comment #16)
> I was having the same problem and now the init script claims to start boinc but
> it never gets started. If I do a "ps -ef | grep boinc" I get nothing.
> 

Well then it will take up more time, i have to create some testing enviroment with baselayout-1 :(
So i guess i will have time after fosdem. Next week. :(
Comment 18 Nigel Drego 2009-02-01 18:06:30 UTC
(In reply to comment #17)
> Well then it will take up more time, i have to create some testing enviroment
> with baselayout-1 :(
> So i guess i will have time after fosdem. Next week. :(
> 
I'm willing to help out, although I also don't have any experience modifying init scripts. If I can get some input on things to try running and messing with, I'd be happy to help.

Comment 19 Andrea Conti 2009-02-01 21:19:28 UTC
Created attachment 180609 [details]
init script

As I have both stable and unstable machines around, I did some more testing:

- as for boinc not starting, it's a problem with passing the redirection token within a quoted string, baselayout is innocent here.

- it turned out that we cannot use the "--background" option to s-s-d in baselayout-1 because it detaches the started program's stdout/stderr before daemonizing. Sadly, omitting --background altogether (so that we can use the same code) does not work, since in baselayout-2 s-s-d never outputs anything on its stdout.

- the --stdout and --stderr options append to the target file, so we should also append when redirecting by hand

HTH
Comment 20 Nigel Drego 2009-02-01 21:31:21 UTC
(In reply to comment #19)
> Created an attachment (id=180609) [edit]
> init script
> 
> As I have both stable and unstable machines around, I did some more testing:
> 
> - as for boinc not starting, it's a problem with passing the redirection token
> within a quoted string, baselayout is innocent here.
> 
> - it turned out that we cannot use the "--background" option to s-s-d in
> baselayout-1 because it detaches the started program's stdout/stderr before
> daemonizing. Sadly, omitting --background altogether (so that we can use the
> same code) does not work, since in baselayout-2 s-s-d never outputs anything on
> its stdout.
> 
> - the --stdout and --stderr options append to the target file, so we should
> also append when redirecting by hand
> 
> HTH
> 

Well, that seems to work now. Starts up as expected. Thanks!
Comment 21 Tomáš Chvátal (RETIRED) gentoo-dev 2009-02-01 23:07:23 UTC
Ok added to the tree.
I would like to say very big THANKS YOU to Andrea Conti.
All guys using baselayout-1 should be gratefull :]
Comment 22 Andrea Conti 2009-02-01 23:17:08 UTC
You're welcome.
Now let's get back to crunching :)