Commit Graph

3090 Commits

Author SHA1 Message Date
David Anderson 5b6f648570 client/lib: add GUI RPCs for reading and writing app_config.xml files.
These will allow GUIs (e.g. BoincTasks) to provide dialogs for editing app config info.
2017-05-11 20:16:35 -07:00
David Anderson 4a9cc3e725 client/lib: code shuffle preparatory to adding app_config GUI RPC 2017-05-11 01:53:50 -07:00
David Anderson 965d372e3b Merge branch 'master' of github.com:BOINC/boinc 2017-05-10 01:38:44 -07:00
David Anderson 3b60641a07 client: small code shuffle; no behavior change 2017-05-10 01:38:12 -07:00
Vitalii Koshura 90ce207073
lib: Remove unused variables
From PVS Studio:
V808
'noproxy' object of 'basic_string' type was created but was not utilized.
https://www.viva64.com/en/w/V808/print

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2017-04-30 08:58:00 +03:00
David Anderson 40b7eb90c5 Merge pull request #1820 from BOINC/fix_issue-1177
Manager/Lib: fix 'New Manager window' function on Linux
2017-04-27 01:33:46 -07:00
David Anderson 8c27b8ffda Don't use names of the form _BOINCxx
Also, declare structs without a lot of noise
2017-04-14 00:44:44 -07:00
David Anderson 6dc6615154 Android (client and API): stack trace voodoo causes crashes on some devices; disable by default. 2017-04-12 15:48:09 -07:00
David Anderson 13a5b9bf3e change multiple-inclusion guard names to BOINC_FILENAME_H 2017-04-07 23:54:49 -07:00
Vitalii Koshura 57769d47fa
lib: fix uninitialized class members in constructor
From PVS Studio:
V730
Not all members of a class are initialized inside the constructor.
Consider inspecting: present.
Consider inspecting: handle.
https://www.viva64.com/en/w/V730/print/

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2017-04-05 23:16:01 +03:00
Vitalii Koshura 92a1ac7343
lib: Fix missed parameters from 'throw' statements.
From PVS Studio:
V667:
The 'throw' operator does not possess any arguments and is not situated within the 'catch' block.
https://www.viva64.com/en/w/V667/print/

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2017-04-02 08:07:44 +03:00
David Anderson cfc850b919 Merge branch 'master' of https://github.com/JuhaSointusalo/boinc into JuhaSointusalo-master
Conflicts:
	clientgui/MainDocument.cpp
2017-03-28 01:30:03 -07:00
Bernd Machenschalk 348c9199cf update lib/Makefile.mingw 'clean' and 'wrapper' targets
- also, if you set MINGW, the whole chain of used tools
  (gcc, g++, ar, ranlib) will be set based on that
2017-03-23 08:59:44 +01:00
Christian Beer 405fd8b61e Merge pull request #1798 from ffontaine/master
Fix LDFLAGS for cross-compilation
2017-03-20 13:36:59 +01:00
Christian Beer 573ee60fed Lib: fix compile error
Fixes ambiguity reported by gcc "error: call of overloaded 'perror(const char [9])' is ambiguous"
2017-03-20 10:00:01 +01:00
Christian Beer 31e8427469 Manager/Lib: fix 'New Manager window' function on Linux
This was not working because the manager was not detecting its own executable name and path so it couldn't start a new instance of itself. Windows and Mac use different codepaths so it worked there.
The new library function can be extended for Windows and Mac to avoid code duplication.
2017-03-16 18:31:42 +01:00
Charlie Fenton 729a9bb6cb lib: Mac: fix compile error from Xcode 8. 2017-03-07 06:02:55 -08:00
Fabrice Fontaine bf807980c1 Fix LDFLAGS for cross-compilation
Remove "-L$(libdir) -rapth $(libdr)" from LDFLAGS of boinc libraries in
Makefile.am of api, lib, sched and zlib directories to be able to
cross-compile boinc.

Indeed, libdir is not equal to the path where BOINC will be installed
but to exec_prefix/lib. The full installation path is
$(DESTDIR)/$(libdir).

To cross-compile boinc, exec_prefix will be set to the target path (for
example: /usr) and DESTDIR will be set (during make install) to the
staging or target directory on the host (for example /home/xxx/target).
The issue of adding -L$(libdir) is that it is not allowed by the
compiler, the error "unsafe header/library path used in
cross-compilation: '-L/usr/lib'" will be raised.

As a result, remove "-L$(libdir) -rapth $(libdr)" from LDFLAGS, the
default library search paths are sufficient for "standard" compilation
or can be updated manually by passing the additional search path to
LDFLAGS during the configure call for cross-compilation.

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2017-03-04 16:46:41 +01:00
Charlie Fenton a0c2d8a949 Mac: add new header file needed for replacing system() calls with posix_spawn() calls. 2017-03-03 15:28:50 -08:00
Charlie Fenton 75179d8ca1 Mac replace all Mac APIs deprecated in OS 10.10, except in MacAccessibility.mm. Updating the accessibility support will require a complete rewrite to use Apple's new NSAccessibility APIs, which are not available on systems prior to OS 10.10, while retaining the current code for use with older versions of OS X. This will require far more time and effort than I can spend at this time.
Note also that Apple has deprecated the UNIX standard call system(const char *) as ofd OS 10.10 and says to use posix_spawn() calls instead. I have added a macro to the precompiled header MacGUI.pch for the Manager builds that converts the calls automatically, but have not been able to do so for the other BOINC modules. If future code in the client, libraries, etc. calls system(), this will have to be handled on a case by case basis, as I have done in boinc_rename_aux() in lib/filesys.cpp and CLIENT_STATE::write_state_file() in client/cs_statefile.cpp.
2017-03-03 06:05:09 -08:00
Charlie Fenton 5192028903 Mac: Fix build break on Mac caused by commit 5df6f25. HAVE_CONFIG_H is not defined in Mac builds of most BOINC modules. 2017-03-03 05:49:53 -08:00
Christian Beer 5df6f25141 Merge pull request #1790 from renyidong/fix_mingw_cross_compile
Fix cross-compile from ubuntu with mingw
2017-03-03 14:29:46 +01:00
Christian Beer 8604fc88bd Merge pull request #1793 from BOINC/travis_mingw_build
Build: try to build libraries with mingw on travis-ci
2017-03-03 14:12:00 +01:00
Charlie Fenton 103eb0ce5e Mac: add new mac_spawn.cpp to project to facilitate replacing system() calls with posix_spawn() calls as instructed by Apple, since system() is deprecated in mac OS 10.10. 2017-03-01 04:53:24 -08:00
Charlie Fenton d737dcf3cb lib: Mac: replace all deprecated Mac APIs as of OS 10.9 2017-02-28 05:17:29 -08:00
Charlie Fenton 2ad20e9962 lib: Mac: replace all deprecated Mac APIs as of OS 10.8 2017-02-27 06:32:58 -08:00
Fabrice Fontaine 312520b74a Check execinfo.h availability in configure.ac
Currently, execinfo.h is included in lib/diagnostics.cpp if __GLIBC__ is
defined. However, this does not work when cross-compiling boinc with
uclibc-ng. So, instead, check the presence of execinfo.h in configure.ac
and update lib/diagnostics.cpp accordingly.

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2017-02-26 11:02:55 +01:00
David Anderson 0681baad54 remote job submission: add <get_job_details> option to query_batch() 2017-02-25 15:05:14 -08:00
Charlie Fenton a8252e983e lib: Mac: continue replacing deprecated Mac APIs 2017-02-25 04:57:37 -08:00
Christian Beer cf8f94f38b Lib: fix mingw build for older versions of mingw
This define was introduced to winternl.h on 2012-07-12 but I couldn't find out which version that corresponds to. At least version 2.0.1-1 of mingw-w64-dev in Ubuntu 12.04 LTS does not define it.
2017-02-17 14:48:48 +01:00
Yidong Ren 1d3cee5e0a Fix cross-compile from ubuntu with mingw 2017-02-16 00:08:51 -05:00
Christian Beer 7eb7aeaa6b Client: normalize whitespace in p_model and p_vendor entries
This was already done for Mac but not Linux and Windows. It collapses multiple consecutive blanks into one blank which is then send to the server.
2017-02-13 16:16:52 +01:00
David Anderson 3aa6b289cd Merge pull request #1743 from sirzooro/cygwin-mingw-compilation-fix
Fixed compilation using MinGW from Cygwin 32 and 64 bit
2017-02-02 23:43:01 -08:00
David Anderson e99c3ab1d7 Merge branch 'master' of https://github.com/BOINC/boinc 2017-02-01 22:56:25 -08:00
David Anderson cba89c6503 Win build: snprintf() fix for VS2015 2017-02-01 21:26:53 -08:00
David Anderson 7c4528a367 Win: fix typos 2017-02-01 00:11:01 -08:00
David Anderson 57ce800fdf Win: use native functions for file ops; work around VS2015/XP bug 2017-02-01 00:03:17 -08:00
David Anderson bbd34f70d3 Lib: fix bug for apps built with VS2015 running on WinXP
for boinc_file_exists(), use GetFileAttributesA().
_stat64() doesn't work in this case
2017-01-31 14:55:38 -08:00
David Anderson 98d908d186 Merge pull request #1768 from AenBleidd/ClientVersionCheck
MGR: Client version check
2017-01-31 01:22:39 -08:00
David Anderson a484b7dd6b Merge pull request #1562 from BOINC/cpu_infos_aarch64
Client: improve CPU and OS detection on Linux
2017-01-31 01:12:55 -08:00
David Anderson ef49109a88 remote job submission: fix error if no input files
also use hashlib instead of md5 in python code to avoid deprecation warning
2017-01-29 15:19:28 -08:00
David Anderson 23a43c7c5d remove file management: fixes; add python interface to query_files 2017-01-27 14:21:03 -08:00
David Anderson 37854b5262 remote job submission, python interface: fix typo 2017-01-27 13:55:26 -08:00
David Anderson ca80cac75a Win build: manage compiler warnings better:
VS lets you choose the compiler warning level, 0 to 4.
Higher is good because compiler warnings often indicate bugs.
However, some warnings are noise, and having a lot of them is bad
because they conceal the important ones.
As an example, a recent update to VS2010 causes it to spew warnings of the form
"function _strdup() is deprecated; use _strdup() instead.

So the new policy is:
- everything compiles with warning level 4
- in boinc_win.h we use #pragmas to suppress 3 specific warnings
  that occur a lot in our code, and are not bugs:
  - the _function names as described above
  - constant conditional expression (like while(1))
  - conversion from int to char

And the goal is to build everything with zero warnings
except from outside code like zip.
We're pretty close to that.

The project files for other VS versions should be modified
to also use level 4 everywhere.
2017-01-27 01:27:32 -08:00
David Anderson d626dfd8d5 client/wrappers, Win: consolidate defines for _getcwd etc in boinc_win.h
They belong here, not in .cpp files
2017-01-26 20:59:11 -08:00
David Anderson 01533dc9e4 remote file management: bug fixes
- The RPC handler was expecting the "BOINC names" to be the file MD5.
  This is no longer true; the BOINC name can be anything as long as it's unique.
- To reflect this, use <phys_name> instead of <md5> in request messages.
  This means that you'll need to update both RPC client and server software.
- BoincJobFile::insert() needed to return the insert ID
2017-01-25 16:17:42 -08:00
Vitalii Koshura 1d88771e36
MGR: Version check. Added new menu option 'Help'->'Check for new version'. Fixed XML new version responce parse. 2017-01-25 05:41:49 +02:00
David Anderson 381e0caf14 Remote job submission: add support for per-job templates in submit requests
This supports the TACC use case,
in the jobs in a batch can use different Docker images
and different input and output file signatures,
none of which are known in advance.

Python API binding:
    - A JOB_DESC object can optionally contain wu_template and result_template
        elements, which are the templates (the actual XML) to use for that job.
        Add these to the XML request message if present.
    - Added the same capability to the PHP binding, but not C++.
    - Added and debugged test cases for both languages.

    Also, submit_batch() can take either a batch name (in which case
    the batch is created) or a batch ID
    (in which the batch was created prior to remotely staging files).

RPC handler:
    - in submit_batch(), check for jobs with templates specified
        and store them in files.
        For input templates (which are deleted after creating jobs)
        we put them in /tmp,
        and use a map so that if two templates are the same we use 1 file.
        For output templates (which have to last until all jobs are done)
        we put them in templates/tmp, with content-based filenames
        to economize.
    - When creating jobs, or generating SQL strings for multiple jobs,
        use these names as --wu_template_filename
        and --result_template_filename args to create_work
        (either cmdline args or stdin args)
    - Delete WU templates when done

create_work.cpp:
    handle per-job --wu_template and --result_template args in stdin job lines
    (the names of per-job WU and result templates).
    Maintain a map mapping WU template name to contents,
    to avoid repeatedly reading them.

    For jobs that don't specify templates, use the ones specified
    at the batch level, or the defaults.
2017-01-21 00:24:11 -08:00
David Anderson ebfc5dc2ce remove compile warnings. Should have done this long ago! 2017-01-20 00:01:25 -08:00
David Anderson e92a398c0a client: fix typo 2017-01-12 13:57:31 -08:00