Bug ID 999628
Summary BOINC GUI Manager wrapping script specifies incorrect directory
Classification openSUSE
Product openSUSE Distribution
Version Leap 42.1
Hardware All
OS openSUSE 42.1
Status NEW
Severity Minor
Priority P5 - None
Component Other
Assignee bnc-team-screening@forge.provo.novell.com
Reporter avsco@mail.ru
QA Contact qa-bugs@suse.de
Found By ---
Blocker ---

Currently, `boinc-manager` package (as��of��version 7.2.42-3.2) provides these
program files:

��� /usr/bin/boinc-gui ��� GUI Manager binary, called `boincmgr` in��upstream;
��� /usr/bin/boinc-manager ��� wrapper script for��running `boinc-gui`;
��� /usr/bin/boincmanager ��� symlink to��`boinc-manager`;
��� /usr/bin/boincmgr ��� symlink to `boinc-manager`.

All what `boinc-manager` script does is to��ensure that authentication secret
file ~/gui_rpc_auth.cfg exists (defaulting to��be a��symlink to
/var/lib/boinc/gui_rpc_auth.cfg) and��then just launches `boinc-gui -e
/usr/bin`.

Theoretically, option `-e` has the��following meaning:

> -e, --clientdir=<str>   Directory containing the BOINC Client executable
> -d, --datadir=<str>     BOINC data directory

However, it appears to��specify the��location of��manager's data/root directory,
including gui_rpc_auth.cfg, as��seen in��source code (clientgui/BOINCGUIApp.cpp):

> if (!parser.Found(wxT("clientdir"), &m_strBOINCMGRRootDirectory)) {
>     m_strBOINCMGRRootDirectory = ::wxGetCwd();
> }
> if (!parser.Found(wxT("datadir"), &m_strBOINCMGRDataDirectory)) {
      m_strBOINCMGRDataDirectory = m_strBOINCMGRRootDirectory;
> }

There is probably some `chdir()` involved, because gui_rpc_auth.cfg is then
read from��current directory (clientgui/MainDocument.cpp):

> int CNetworkConnection::GetLocalPassword(wxString& strPassword){
>    // .....
>    FILE* f = fopen("gui_rpc_auth.cfg", "r");
>    // .....
> }

Consequently, with��`-e /usr/bin` specified, gui_rpc_auth.cfg is searched in
/usr/bin, which results in��inability to��communicate with��`boinc-client`, as
observed in��issues like #788297. When run from��user's home directory without
arguments, `boinc-gui` successfully connects to��backend, as��well as��when run
with��`-e $HOME` or��`-d $HOME`.

Proposed solution is therefore to��alter (openSUSE-provided?)
/usr/bin/boinc-manager script by��changing

> exec boinc-gui -e /usr/bin

to��either

> exec boinc-gui -e $HOME

or

> exec boinc-gui -d $HOME

or

> cd ~
> exec boinc-gui

It would also be nice to��update
/usr/share/doc/packages/boinc-client/README.SUSE by��removing questionable
advices for��working around this issue by��disabling authentication or��entering
password each time.


You are receiving this mail because: