*** empty log message ***

svn path=/trunk/boinc/; revision=2253
This commit is contained in:
Karl Chen 2003-09-04 07:16:14 +00:00
parent 16675d96f1
commit ade0cffd06
17 changed files with 410 additions and 146 deletions

View File

@ -46,7 +46,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILD_TOP_DIR = @BUILD_TOP_DIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@ -97,6 +96,8 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STATIC_FLAGS = @STATIC_FLAGS@
STRIP = @STRIP@
TOP_BUILD_DIR = @TOP_BUILD_DIR@
TOP_SOURCE_DIR = @TOP_SOURCE_DIR@
VERSION = @VERSION@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
@ -157,7 +158,7 @@ subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = py/Makefile py/version.py
CONFIG_CLEAN_FILES =
DIST_SOURCES =
RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
@ -206,10 +207,6 @@ $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(top_srcdir)/configure.ac $(ACLOC
distclean-hdr:
-rm -f config.h stamp-h1
py/Makefile: $(top_builddir)/config.status $(top_srcdir)/py/Makefile.in
cd $(top_builddir) && $(SHELL) ./config.status $@
py/version.py: $(top_builddir)/config.status $(top_srcdir)/py/version.py.in
cd $(top_builddir) && $(SHELL) ./config.status $@
uninstall-info-am:
# This directory's subdirectories are mostly independent; you can cd
@ -346,7 +343,7 @@ distcleancheck_listfiles = find . -type f -print
distdir: $(DISTFILES)
$(am__remove_distdir)
mkdir $(distdir)
$(mkinstalldirs) $(distdir)/py $(distdir)/test
$(mkinstalldirs) $(distdir)/py/Boinc $(distdir)/test
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \

View File

@ -48,7 +48,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILD_TOP_DIR = @BUILD_TOP_DIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@ -100,6 +99,8 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STATIC_FLAGS = @STATIC_FLAGS@
STRIP = @STRIP@
TOP_BUILD_DIR = @TOP_BUILD_DIR@
TOP_SOURCE_DIR = @TOP_SOURCE_DIR@
VERSION = @VERSION@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@

View File

@ -48,7 +48,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILD_TOP_DIR = @BUILD_TOP_DIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@ -100,6 +99,8 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STATIC_FLAGS = @STATIC_FLAGS@
STRIP = @STRIP@
TOP_BUILD_DIR = @TOP_BUILD_DIR@
TOP_SOURCE_DIR = @TOP_SOURCE_DIR@
VERSION = @VERSION@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@

View File

@ -6086,8 +6086,8 @@ quarl 2003/09/03
- configure runs test/test_sanity.py
- wrote documentation for python framework and tools; revised other
documentation
- wrote extensive documentation for python framework and tools; revised
other documentation
py/Boinc/ (added entire tree)
Makefile.am
@ -6098,7 +6098,7 @@ quarl 2003/09/03
database.py
db_def_to_py
db_mid.py
setup_project.py
setup_project.py (this used to be py/boinc.py)
util.py
version.py.in
test/

View File

@ -48,7 +48,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILD_TOP_DIR = @BUILD_TOP_DIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@ -102,6 +101,8 @@ SHELL = @SHELL@
# by default, "-static -static-libgcc" on linux.
STATIC_FLAGS = @STATIC_FLAGS@
STRIP = @STRIP@
TOP_BUILD_DIR = @TOP_BUILD_DIR@
TOP_SOURCE_DIR = @TOP_SOURCE_DIR@
VERSION = @VERSION@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@

36
configure vendored
View File

@ -1,5 +1,5 @@
#! /bin/sh
# From configure.ac Revision: 1.34 .
# From configure.ac Revision: 1.37 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.57 for BOINC 1.12.
#
@ -329,7 +329,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE MAJOR_VERSION MINOR_VERSION BUILD_TOP_DIR MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CPP RANLIB ac_ct_RANLIB PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS MYSQL_CONFIG MYSQL_LIBS MYSQL_CFLAGS EGREP CLIENT_BIN_FILENAME STATIC_FLAGS LIBOBJS LTLIBOBJS'
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE MAJOR_VERSION MINOR_VERSION CLIENT_BIN_FILENAME TOP_BUILD_DIR TOP_SOURCE_DIR MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CPP RANLIB ac_ct_RANLIB PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS MYSQL_CONFIG MYSQL_LIBS MYSQL_CFLAGS EGREP STATIC_FLAGS LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@ -1841,8 +1841,11 @@ cat >>confdefs.h <<_ACEOF
#define HOSTTYPE "$host"
_ACEOF
CLIENT_BIN_FILENAME=boinc_1.12_$host${EXEEXT}
BUILD_TOP_DIR=`pwd`
TOP_BUILD_DIR=`pwd`
TOP_SOURCE_DIR=`(cd \`dirname "$0"\` && pwd)`
echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
@ -6454,9 +6457,6 @@ _ACEOF
fi
CLIENT_BIN_FILENAME=boinc_1.12_$host${EXEEXT}
# by default, create static binaries on linux.
if [ "$target_os" = "linux-gnu" ]; then
STATIC_FLAGS="-static"
@ -6464,7 +6464,7 @@ fi
echo "checking static flags... ${STATIC_FLAGS:-(none)}"
ac_config_files="$ac_config_files RSAEuro/source/Makefile RSAEuro/Makefile api/Makefile apps/Makefile client/Makefile db/Makefile lib/Makefile sched/Makefile tools/Makefile test/Makefile py/Makefile test/version.inc py/version.py Makefile"
ac_config_files="$ac_config_files Makefile RSAEuro/source/Makefile RSAEuro/Makefile api/Makefile apps/Makefile client/Makefile db/Makefile lib/Makefile sched/Makefile tools/Makefile test/Makefile test/version.inc py/Makefile py/Boinc/Makefile py/Boinc/version.py py/Boinc/boinc_path_config.py:py/Boinc/boinc_path_config.py.in py/boinc_path_config.py:py/Boinc/boinc_path_config.py.in sched/boinc_path_config.py:py/Boinc/boinc_path_config.py.in tools/boinc_path_config.py:py/Boinc/boinc_path_config.py.in test/boinc_path_config.py:py/Boinc/boinc_path_config.py.in"
ac_config_headers="$ac_config_headers config.h"
@ -7032,6 +7032,7 @@ for ac_config_target in $ac_config_targets
do
case "$ac_config_target" in
# Handling of arguments.
"Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"RSAEuro/source/Makefile" ) CONFIG_FILES="$CONFIG_FILES RSAEuro/source/Makefile" ;;
"RSAEuro/Makefile" ) CONFIG_FILES="$CONFIG_FILES RSAEuro/Makefile" ;;
"api/Makefile" ) CONFIG_FILES="$CONFIG_FILES api/Makefile" ;;
@ -7042,10 +7043,15 @@ do
"sched/Makefile" ) CONFIG_FILES="$CONFIG_FILES sched/Makefile" ;;
"tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
"test/Makefile" ) CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
"py/Makefile" ) CONFIG_FILES="$CONFIG_FILES py/Makefile" ;;
"test/version.inc" ) CONFIG_FILES="$CONFIG_FILES test/version.inc" ;;
"py/version.py" ) CONFIG_FILES="$CONFIG_FILES py/version.py" ;;
"Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"py/Makefile" ) CONFIG_FILES="$CONFIG_FILES py/Makefile" ;;
"py/Boinc/Makefile" ) CONFIG_FILES="$CONFIG_FILES py/Boinc/Makefile" ;;
"py/Boinc/version.py" ) CONFIG_FILES="$CONFIG_FILES py/Boinc/version.py" ;;
"py/Boinc/boinc_path_config.py" ) CONFIG_FILES="$CONFIG_FILES py/Boinc/boinc_path_config.py:py/Boinc/boinc_path_config.py.in" ;;
"py/boinc_path_config.py" ) CONFIG_FILES="$CONFIG_FILES py/boinc_path_config.py:py/Boinc/boinc_path_config.py.in" ;;
"sched/boinc_path_config.py" ) CONFIG_FILES="$CONFIG_FILES sched/boinc_path_config.py:py/Boinc/boinc_path_config.py.in" ;;
"tools/boinc_path_config.py" ) CONFIG_FILES="$CONFIG_FILES tools/boinc_path_config.py:py/Boinc/boinc_path_config.py.in" ;;
"test/boinc_path_config.py" ) CONFIG_FILES="$CONFIG_FILES test/boinc_path_config.py:py/Boinc/boinc_path_config.py.in" ;;
"depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
@ -7165,7 +7171,9 @@ s,@AWK@,$AWK,;t t
s,@SET_MAKE@,$SET_MAKE,;t t
s,@MAJOR_VERSION@,$MAJOR_VERSION,;t t
s,@MINOR_VERSION@,$MINOR_VERSION,;t t
s,@BUILD_TOP_DIR@,$BUILD_TOP_DIR,;t t
s,@CLIENT_BIN_FILENAME@,$CLIENT_BIN_FILENAME,;t t
s,@TOP_BUILD_DIR@,$TOP_BUILD_DIR,;t t
s,@TOP_SOURCE_DIR@,$TOP_SOURCE_DIR,;t t
s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
s,@MAINT@,$MAINT,;t t
@ -7201,7 +7209,6 @@ s,@MYSQL_CONFIG@,$MYSQL_CONFIG,;t t
s,@MYSQL_LIBS@,$MYSQL_LIBS,;t t
s,@MYSQL_CFLAGS@,$MYSQL_CFLAGS,;t t
s,@EGREP@,$EGREP,;t t
s,@CLIENT_BIN_FILENAME@,$CLIENT_BIN_FILENAME,;t t
s,@STATIC_FLAGS@,$STATIC_FLAGS,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
@ -7825,3 +7832,8 @@ if test "$no_create" != yes; then
$ac_cs_success || { (exit 1); exit 1; }
fi
echo "--- Configured BOINC 1.12 ---"
test/test_sanity.py

View File

@ -46,7 +46,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILD_TOP_DIR = @BUILD_TOP_DIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@ -97,6 +96,8 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STATIC_FLAGS = @STATIC_FLAGS@
STRIP = @STRIP@
TOP_BUILD_DIR = @TOP_BUILD_DIR@
TOP_SOURCE_DIR = @TOP_SOURCE_DIR@
VERSION = @VERSION@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@

View File

@ -1,7 +1,9 @@
<?
require_once("docutil.php");
page_head("Implementation and debugging of BOINC");
echo "
<? // -*- html -*-
// $Id$
require_once("docutil.php");
page_head("Implementation and debugging of BOINC");
?>
<p>
The BOINC source code is <a href=source/>here</a>.
<p>
@ -50,8 +52,11 @@ Protocols
Miscellaneous
</b></font>
<ul>
<li> <a href=python.php>Python framework</a>
<li> <a href=prefs_impl.php>Preferences</a>
</ul>
";
page_tail();
<?
page_tail();
?>

View File

@ -20,7 +20,7 @@ To ensure <code>boinc/py/</code> is in your python path:
<blockquote>
<code>import boinc_path_config</code>
</blockquote>
This is a special kludge module that <code>configure</code> places in relevant
This is a special module that <code>configure</code> places in relevant
directories which then modifies <code>sys.path</code> appropriately.
<h2>Project-specific settings</h2>
@ -90,20 +90,133 @@ details.
</td></tr>
<tr><td><code>setup_project.py</code></td><td>
module fore creating a project. Use
internal module for creating a project. See <a href=
tool_make_project.php><code>make_project</code></a> and test scripts.
</td></tr>
<tr><td><code>database.py</code></td><td>
defines database backend functions and database operations.
defines database backend functions and database operations; see below.
</td></tr>
<tr><td><code>db_mid.py</code></td><td>
"middle-end": optional mix-in to ease debugging by allowing printing of
database objects directly
</td></tr>
<tr><td><code>util.py</code></td><td>
miscellaneous functions
</td></tr>
<tr><td><code>version.py.in</code></td><td>
version and platform-specific definitions snarfed by <code>configure</code>
</td></tr>
</table>
<h1>Python database access</h1>
<code>Database.py</code> defines database backend library and database table
and object relationships to allow easy data manipulation.
<p>
All <a href=database.php>database tables</a> have a corresponding class and
its rows have classes, where each column is a member of that class. Ids are
automatically translated to and from objects. To begin, import
the <code>database</code> module:
<pre>
from Boinc import database
</pre>
Connect to the database:
<pre>
database.connect_default_config()
</pre>
Table classes can be indexed using the [ ] operator to retrieve an object by
id; e.g.
<pre>
# executes 'select * from project where id=1'.
# exception is raised if project is not found
project_with_id_1 = database.Projects[1]
</pre>
Table classes have a <code>find</code> function that builds and executes a
MySQL query based on its arguments:
<pre>
# this could return any number (0, 1, 2, ...) of platforms
# executes 'select * from platform where user_friendly_name="commodore 64"'
list_of_platforms_called_c64 = database.Platforms.find(
user_friendly_name = 'Commodore 64')
</pre>
Find can take any number of arguments; they are ANDed. For more advanced
usage such as custom SQL queries (anything is possible :) see the pydoc.
<pre>
all_apps = database.Apps.find()
finished_yeti_wus = database.Workunits.find(
app = database.Apps.find(name='YETI@home')[0]
assimilate_state = ASSIMILATE_DONE)
</pre>
Objects (table rows) have their column data as members so you can access and
modify them directly.
<pre>
user_quarl = database.users.find(email_addr='quarl@quarl.org')[0]
print "name =", user_quarl.name
user_quarl.postal_code = 97404
</pre>
To create a new database object, create a Python object and give all values
as parameters to the initializer:
<pre>
new_app = database.App(name='SPAGHETTI@home',
min_version=1,
create_time=time.time())
</pre>
To commit any changes (including a new object), call <code>commit()</code>
(the tool <code>boinc/tools/add.py</code> is a command-line interface to
this):
<pre>
user_quarl.commit() # executes an UPDATE
new_app.commit() # executes an INSERT
</pre>
To remove an object, call <code>remove()</code>:
<pre>
team_eric_test = database.Teams(name="Eric's Test Team")[0]
team_eric_test.remove()
# OR
for team in database.Teams(name="Eric's Test Team"):
team.remove()
# OR
map(database.Team.remove,database.Teams(name="Eric's Test Team"))
</pre>
To access objects related by id, access the field name without "id" suffix:
(the <code>result</code> table has a column '<code>workunitid</code>')
<pre>
wu_1234 = database.Workunits.find(name='1234.wu')[0]
results_of_wu_1234 = database.Results.find(workunit=wu_1234)
for result in results_of_wu_1234:
os.system("echo 'you are crunching %s' | mail '%s'" %(
result.name, result.host.user.email_addr))
</pre>
<table border=1 width=100%>
<tr><th>Table</th><th>Python table object</th><th>Python row object
class</th></tr>
<tr><td>project</td><td>Projects</td><td>Project</td></tr>
<tr><td>platform</td><td>Platforms</td><td>Platform</td></tr>
<tr><td>core_version</td><td>CoreVersions</td><td>CoreVersion</td></tr>
<tr><td>app</td><td>Apps</td><td>App</td></tr>
<tr><td>app_version</td><td>AppVersions</td><td>AppVersion</td></tr>
<tr><td>user</td><td>Users</td><td>User</td></tr>
<tr><td>team</td><td>Teams</td><td>Team</td></tr>
<tr><td>host</td><td>Hosts</td><td>Host</td></tr>
<tr><td>workunit</td><td>Workunits</td><td>Workunit</td></tr>
<tr><td>result</td><td>Results</td><td>Result</td></tr>
<tr><td>workseq</td><td>Workseqs</td><td>Workseq</td></tr>
</table>
<?
page_tail();
page_tail();
?>

View File

@ -48,7 +48,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILD_TOP_DIR = @BUILD_TOP_DIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@ -100,6 +99,8 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STATIC_FLAGS = @STATIC_FLAGS@
STRIP = @STRIP@
TOP_BUILD_DIR = @TOP_BUILD_DIR@
TOP_SOURCE_DIR = @TOP_SOURCE_DIR@
VERSION = @VERSION@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@

View File

@ -565,28 +565,45 @@ def _connectp(dbname, user, passwd, host='localhost'):
boincdb = MySQLdb.connect(db=dbname,host=host,user=user,passwd=passwd,
cursorclass=MySQLdb.cursors.DictCursor)
def _connectm(module):
_connectp(module.database, module.username, module.password)
# def _connectm(module):
# _connectp(module.database, module.username, module.password)
def connect(readonly = False):
"""Connect if not already connected or if we're adding write permissions"""
# def connect(readonly = False):
# """Connect if not already connected or if we're adding write permissions"""
# global boincdb
# if boincdb:
# if not readonly and boincdb.readonly:
# # re-open with write access
# boincdb.close()
# boincdb = None
# else:
# return 0
# if readonly:
# import password_settings_r
# _connectm(password_settings_r)
# else:
# import password_settings
# _connectm(password_settings)
# boincdb.readonly = readonly
# return 1
def connect(config):
"""Connect if not already connected, using config values"""
global boincdb
if boincdb:
if not readonly and boincdb.readonly:
# re-open with write access
boincdb.close()
boincdb = None
else:
return 0
if readonly:
import password_settings_r
_connectm(password_settings_r)
else:
import password_settings
_connectm(password_settings)
boincdb.readonly = readonly
return 0
_connectp(db_name = config.db_name,
user = config.get('db_user'),
passwd = config.et('db_passwd'))
return 1
def connect_default_config():
"""Connect using the default config.xml"""
import configxml
config = configxml.ConfigFile().read()
database.connect(config.config)
def close():
"""Closes the connection to the sql boinc and deletes the Boincdb object."""
boincdb.close()

View File

@ -2,6 +2,8 @@
# TODO: make things work if build_dir != src_dir
# TODO: use database.py
import boinc_path_config
import version
from boinc_db import *

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.7.6 from Makefile.am.
# Makefile.in generated by automake 1.7 from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -14,8 +14,6 @@
@SET_MAKE@
# Note: MYSQL_CFLAGS and MYSQL_LIBS set by configure from mysql_config
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
@ -48,7 +46,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILD_TOP_DIR = @BUILD_TOP_DIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@ -82,7 +79,6 @@ MAKEINFO = @MAKEINFO@
MINOR_VERSION = @MINOR_VERSION@
MYSQL_CFLAGS = @MYSQL_CFLAGS@
MYSQL_CONFIG = @MYSQL_CONFIG@
MYSQL_LIBS = @MYSQL_LIBS@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
@ -100,6 +96,8 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STATIC_FLAGS = @STATIC_FLAGS@
STRIP = @STRIP@
TOP_BUILD_DIR = @TOP_BUILD_DIR@
TOP_SOURCE_DIR = @TOP_SOURCE_DIR@
VERSION = @VERSION@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
@ -110,7 +108,6 @@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
bindir = @bindir@
build = @build@
@ -144,69 +141,159 @@ target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
RSA_LIBS = \
-L$(top_builddir)/RSAEuro/source \
-lrsaeuro
AM_CFLAGS = -g -Wall
AM_CXXFLAGS = -g -Wall
AM_CPPFLAGS = \
-I$(top_srcdir)/lib \
-I$(top_srcdir)/api \
-I$(top_srcdir)/db \
-I$(top_srcdir)/RSAEuro/source \
-I$(top_srcdir)/client \
-I$(top_srcdir)/tools \
-I$(top_srcdir)/sched \
$(MYSQL_CFLAGS) \
-include $(top_builddir)/config.h
# this is useful as a dependency to make sure librsaeuro gets compiled before
# programs linking to it:
LIBRSA = $(top_builddir)/RSAEuro/source/librsaeuro.a
EXTRA_DIST = boinc.py boinc_db.py version.py.in db_def_to_py
SUBDIRS = Boinc
subdir = py
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = version.py
CONFIG_CLEAN_FILES = boinc_path_config.py
DIST_SOURCES =
DIST_COMMON = $(top_srcdir)/Makefile.incl Makefile.am Makefile.in \
version.py.in
all: all-am
RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
ps-recursive install-info-recursive uninstall-info-recursive \
all-recursive install-data-recursive install-exec-recursive \
installdirs-recursive install-recursive uninstall-recursive \
check-recursive installcheck-recursive
DIST_COMMON = Makefile.am Makefile.in
DIST_SUBDIRS = $(SUBDIRS)
all: all-recursive
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/Makefile.incl $(top_srcdir)/configure.ac $(ACLOCAL_M4)
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu py/Makefile
Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
version.py: $(top_builddir)/config.status version.py.in
boinc_path_config.py: $(top_builddir)/config.status $(top_srcdir)/py/Boinc/boinc_path_config.py.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
uninstall-info-am:
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ETAGS = etags
ETAGSFLAGS =
CTAGS = ctags
CTAGSFLAGS =
tags: TAGS
TAGS:
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
ctags: CTAGS
CTAGS:
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
$(mkinstalldirs) $(distdir)/..
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
@ -227,20 +314,34 @@ distdir: $(DISTFILES)
|| exit 1; \
fi; \
done
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d $(distdir)/$$subdir \
|| mkdir $(distdir)/$$subdir \
|| exit 1; \
(cd $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" \
distdir=../$(distdir)/$$subdir \
distdir) \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
check: check-recursive
all-am: Makefile
installdirs: installdirs-recursive
installdirs-am:
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
@ -256,19 +357,19 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean: clean-recursive
clean-am: clean-generic mostlyclean-am
distclean: distclean-am
distclean: distclean-recursive
distclean-am: clean-am distclean-generic
distclean-am: clean-am distclean-generic distclean-tags
dvi: dvi-am
dvi: dvi-recursive
dvi-am:
info: info-am
info: info-recursive
info-am:
@ -276,47 +377,47 @@ install-data-am:
install-exec-am:
install-info: install-info-am
install-info: install-info-recursive
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
maintainer-clean: maintainer-clean-recursive
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic
pdf: pdf-am
pdf: pdf-recursive
pdf-am:
ps: ps-am
ps: ps-recursive
ps-am:
uninstall-am: uninstall-info-am
.PHONY: all all-am check check-am clean clean-generic distclean \
distclean-generic distdir dvi dvi-am info info-am install \
install-am install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \
uninstall-info-am
uninstall-info: uninstall-info-recursive
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
clean-generic clean-recursive ctags ctags-recursive distclean \
distclean-generic distclean-recursive distclean-tags distdir \
dvi dvi-am dvi-recursive info info-am info-recursive install \
install-am install-data install-data-am install-data-recursive \
install-exec install-exec-am install-exec-recursive \
install-info install-info-am install-info-recursive install-man \
install-recursive install-strip installcheck installcheck-am \
installdirs installdirs-am installdirs-recursive \
maintainer-clean maintainer-clean-generic \
maintainer-clean-recursive mostlyclean mostlyclean-generic \
mostlyclean-recursive pdf pdf-am pdf-recursive ps ps-am \
ps-recursive tags tags-recursive uninstall uninstall-am \
uninstall-info-am uninstall-info-recursive uninstall-recursive
$(LIBRSA):
cd $(top_builddir)/RSAEuro/source; ${MAKE} librsaeuro.a
$(srcdir)/boinc_db.py: ../db/boinc_db.h ../lib/result_state.h
cat $^ | $(srcdir)/db_def_to_py > $@
# all: $(srcdir)/boinc_db.py
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -48,7 +48,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILD_TOP_DIR = @BUILD_TOP_DIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@ -100,6 +99,8 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STATIC_FLAGS = @STATIC_FLAGS@
STRIP = @STRIP@
TOP_BUILD_DIR = @TOP_BUILD_DIR@
TOP_SOURCE_DIR = @TOP_SOURCE_DIR@
VERSION = @VERSION@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
@ -267,7 +268,7 @@ fcgi_LDADD = $(LDADD) $(RSA_LIBS) -lfcgi -lfcgi++ $(MYSQL_LIBS)
subdir = sched
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_FILES = boinc_path_config.py
LIBRARIES = $(noinst_LIBRARIES)
libsched_a_AR = $(AR) cru
@ -402,6 +403,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/Makefile
$(AUTOMAKE) --gnu sched/Makefile
Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
boinc_path_config.py: $(top_builddir)/config.status $(top_srcdir)/py/Boinc/boinc_path_config.py.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
AR = ar

View File

@ -48,7 +48,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILD_TOP_DIR = @BUILD_TOP_DIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@ -100,6 +99,8 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STATIC_FLAGS = @STATIC_FLAGS@
STRIP = @STRIP@
TOP_BUILD_DIR = @TOP_BUILD_DIR@
TOP_SOURCE_DIR = @TOP_SOURCE_DIR@
VERSION = @VERSION@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
@ -168,17 +169,18 @@ AM_CPPFLAGS = \
LIBRSA = $(top_builddir)/RSAEuro/source/librsaeuro.a
TESTS = test_sanity.py \
test_uc.py \
test_concat.py \
test_1sec.py \
test_abort.py \
test_rsc.py \
test_exit.py \
test_signal.py \
test_masterurl_failure.py
test_uc.py
# test_concat.py
# test_1sec.py
# test_abort.py
# test_rsc.py
# test_exit.py
# test_signal.py
# test_masterurl_failure.py
# TODO: phase out php stuff
EXTRA_DIST = \
*.xml *wu *result *output *input \
@ -189,7 +191,7 @@ EXTRA_DIST = \
subdir = test
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = version.inc
CONFIG_CLEAN_FILES = version.inc boinc_path_config.py
DIST_SOURCES =
DIST_COMMON = $(top_srcdir)/Makefile.incl Makefile.am Makefile.in \
version.inc.in
@ -203,6 +205,8 @@ Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.s
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
version.inc: $(top_builddir)/config.status version.inc.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
boinc_path_config.py: $(top_builddir)/config.status $(top_srcdir)/py/Boinc/boinc_path_config.py.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
uninstall-info-am:
tags: TAGS
TAGS:

View File

@ -48,7 +48,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILD_TOP_DIR = @BUILD_TOP_DIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@ -100,6 +99,8 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STATIC_FLAGS = @STATIC_FLAGS@
STRIP = @STRIP@
TOP_BUILD_DIR = @TOP_BUILD_DIR@
TOP_SOURCE_DIR = @TOP_SOURCE_DIR@
VERSION = @VERSION@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
@ -217,13 +218,13 @@ sign_executable_SOURCES = \
sign_executable_DEPENDENCIES = $(LIBRSA)
sign_executable_LDSIGN_EXECUTABLE = $(RSA_LIBS) $(MYSQL_LIBS)
sign_executable_LDADD = $(RSA_LIBS) $(MYSQL_LIBS)
country_select_SOURCES = country_select.C ../lib/countries.C
subdir = tools
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_FILES = boinc_path_config.py
bin_PROGRAMS = create_work$(EXEEXT) add$(EXEEXT) country_select$(EXEEXT) \
sign_executable$(EXEEXT)
PROGRAMS = $(bin_PROGRAMS)
@ -248,7 +249,6 @@ create_work_LDFLAGS =
am_sign_executable_OBJECTS = sign_executable.$(OBJEXT) \
md5_file.$(OBJEXT) md5.$(OBJEXT) crypt.$(OBJEXT)
sign_executable_OBJECTS = $(am_sign_executable_OBJECTS)
sign_executable_LDADD = $(LDADD)
sign_executable_LDFLAGS =
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
@ -286,6 +286,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/Makefile
$(AUTOMAKE) --gnu tools/Makefile
Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
boinc_path_config.py: $(top_builddir)/config.status $(top_srcdir)/py/Boinc/boinc_path_config.py.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)

View File

@ -3,6 +3,9 @@
# $Id$
# Creates a new BOINC project.
# TODO: use database.py (mainly for setup_project.py)
# TOOD: don't add app / app version here.
import sys, os, getopt, re
sys.path.append('../py')
from version import *