[boinc] 01/01: experimental upload
Gianfranco Costamagna
locutusofborg at moszumanska.debian.org
Thu Sep 28 07:02:40 UTC 2017
This is an automated email from the git hooks/post-receive script.
locutusofborg pushed a commit to branch master
in repository boinc.
commit 0e004ee8fc62018bbf151a25ffb7945674e4a356
Author: Gianfranco Costamagna <costamagnagianfranco at yahoo.it>
Date: Thu Sep 28 09:02:31 2017 +0200
experimental upload
---
api/Makefile.am | 17 ++++++++++++++++-
api/graphics2_util.cpp | 4 ++--
apps/Makefile.am | 6 +++---
client/Makefile.am | 1 -
client/client_state.cpp | 2 +-
client/file_names.cpp | 12 ++++++------
client/rrsim_test.cpp | 9 +++++++--
client/scheduler_op.cpp | 2 +-
clientgui/AsyncRPC.cpp | 2 +-
clientgui/BOINCGUIApp.cpp | 3 +++
clientgui/MainDocument.cpp | 18 +++++++++++-------
clientgui/Makefile.am | 1 -
clientgui/NoticeListCtrl.cpp | 21 +++++++++++++--------
clientgui/NoticeListCtrl.h | 6 +++---
clientgui/sg_ProjectPanel.cpp | 18 +++++++++---------
clientgui/stdwx.h | 3 +++
clientscr/Makefile.am | 1 -
configure.ac | 8 +++++++-
debian/changelog | 6 ++++++
generate_svn_version.sh | 4 +++-
html/Makefile.am | 2 +-
html/languages/translations/de.po | 12 ++++++------
lib/Makefile.am | 20 ++++++++++++++++----
lib/crypt.cpp | 1 +
lib/crypt_prog.cpp | 10 ++++++++++
lib/filesys.cpp | 11 ++++++++---
lib/mfile.cpp | 2 +-
lib/parse_test.cpp | 1 +
lib/shmem.cpp | 5 ++++-
lib/unix_util.cpp | 6 ++++++
py/boinc_path_config.py.in | 2 +-
samples/condor/Makefile | 15 +++++++++------
samples/example_app/Makefile | 8 ++++----
samples/multi_thread/Makefile | 2 +-
samples/sleeper/Makefile | 4 ++--
samples/vboxmonitor/Makefile | 2 +-
samples/vboxwrapper/Makefile | 17 +++++++++--------
samples/worker/Makefile | 2 +-
samples/wrapper/Makefile | 4 ++--
samples/wrappture/Makefile | 6 +++---
sched/Makefile.am | 11 +++++------
sched/file_upload_handler.cpp | 6 +++---
sched/sched_driver.cpp | 6 +++---
stripchart/stripchart | 4 ++--
stripchart/stripchart.cgi | 4 ++--
stripchart/stripchart.cnf | 10 +++++-----
tools/Makefile.am | 4 ++--
tools/db_query | 2 +-
tools/make_project | 2 ++
tools/watch_tcp | 2 +-
vda/Makefile.am | 1 -
zip/Makefile.am | 6 +++++-
52 files changed, 213 insertions(+), 121 deletions(-)
diff --git a/api/Makefile.am b/api/Makefile.am
index 383c2af..a56f199 100644
--- a/api/Makefile.am
+++ b/api/Makefile.am
@@ -43,18 +43,33 @@ endif
lib_LTLIBRARIES = libboinc_api.la
libboinc_api_la_SOURCES = $(api_files)
-libboinc_api_la_LDFLAGS = -version-number $(LIBBOINC_VERSION)
+libboinc_api_la_LDFLAGS = -version-number $(LIBBOINC_VERSION) -lpthread
+libboinc_api_la_LIBADD = -L../lib/.libs $(LIBBOINC)
+libboinc_api_la_AR = gcc-ar
+libboinc_api_la_RANLIB = gcc-ranlib
+libboinc_api_a_AR = gcc-ar
+libboinc_api_a_RANLIB = gcc-ranlib
if BUILD_GRAPHICS_API
lib_LTLIBRARIES += libboinc_graphics2.la
libboinc_graphics2_la_SOURCES = $(graphics2_files)
libboinc_graphics2_la_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_srcdir)/samples/image_libs
libboinc_graphics2_la_LDFLAGS = -version-number $(LIBBOINC_VERSION) -ljpeg
+libboinc_graphics2_la_LIBADD = -L../lib/.libs $(APPLIBS)
+libboinc_graphics2_la_AR = gcc-ar
+libboinc_graphics2_la_RANLIB = gcc-ranlib
+libboinc_graphics2_a_AR = gcc-ar
+libboinc_graphics2_a_RANLIB = gcc-ranlib
endif #BUILD_GRAPHICS_API
lib_LTLIBRARIES += libboinc_opencl.la
libboinc_opencl_la_SOURCES = $(opencl_files)
libboinc_opencl_la_LDFLAGS = -version-number $(LIBBOINC_VERSION)
+libboinc_opencl_la_LIBADD = -L../lib/.libs $(APPLIBS)
+libboinc_opencl_la_AR = gcc-ar
+libboinc_opencl_la_RANLIB = gcc-ranlib
+libboinc_opencl_a_AR = gcc-ar
+libboinc_opencl_a_RANLIB = gcc-ranlib
if INSTALL_HEADERS
## install only headers that are meant for exporting the API !!
diff --git a/api/graphics2_util.cpp b/api/graphics2_util.cpp
index 169b7ab..8a2239b 100644
--- a/api/graphics2_util.cpp
+++ b/api/graphics2_util.cpp
@@ -40,7 +40,7 @@
static key_t get_shmem_name(const char* prog_name) {
char cwd[MAXPATHLEN], path[MAXPATHLEN];
boinc_getcwd(cwd);
- sprintf(path, "%s/init_data.xml", cwd);
+ snprintf(path, sizeof(path), "%s/init_data.xml", cwd);
return ftok(path, 2);
}
#else
@@ -50,7 +50,7 @@ static void get_shmem_name(const char* prog_name, char* shmem_name) {
APP_INIT_DATA aid;
int retval = boinc_get_init_data(aid);
if (retval) aid.slot = 0;
- sprintf(shmem_name, "boinc_%s_%d", prog_name, aid.slot);
+ snprintf(shmem_name, MAXPATHLEN, "boinc_%s_%d", prog_name, aid.slot);
}
#endif
diff --git a/apps/Makefile.am b/apps/Makefile.am
index 7f3b1fe..9d441a5 100644
--- a/apps/Makefile.am
+++ b/apps/Makefile.am
@@ -8,15 +8,15 @@ example_PROGRAMS = upper_case concat 1sec
upper_case_SOURCES = upper_case.cpp
upper_case_CXXFLAGS = $(PTHREAD_CFLAGS)
-upper_case_LDFLAGS = -static-libtool-libs $(PTHREAD_CFLAGS)
+upper_case_LDFLAGS = $(PTHREAD_CFLAGS)
upper_case_LDADD = $(APPLIBS)
concat_SOURCES = concat.cpp
concat_CXXFLAGS = $(PTHREAD_CFLAGS)
-concat_LDFLAGS = -static-libtool-libs $(PTHREAD_CFLAGS)
+concat_LDFLAGS = $(PTHREAD_CFLAGS)
concat_LDADD = $(APPLIBS)
1sec_SOURCES = 1sec.cpp
1sec_CXXFLAGS = $(PTHREAD_CFLAGS)
-1sec_LDFLAGS = -static-libtool-libs $(PTHREAD_CFLAGS)
+1sec_LDFLAGS = $(PTHREAD_CFLAGS)
1sec_LDADD = $(APPLIBS)
diff --git a/client/Makefile.am b/client/Makefile.am
index e86dc76..cced5d7 100644
--- a/client/Makefile.am
+++ b/client/Makefile.am
@@ -4,7 +4,6 @@
include $(top_srcdir)/Makefile.incl
if ENABLE_CLIENT_RELEASE
- AM_LDFLAGS += -static-libtool-libs
## for an entirely statically linked library, you may want to try
## -all-static instead. There's a good chance it won't work properly,
## so we'll use the safer "-static-libtool-libs" by default.
diff --git a/client/client_state.cpp b/client/client_state.cpp
index a087716..d98f6ab 100644
--- a/client/client_state.cpp
+++ b/client/client_state.cpp
@@ -598,7 +598,7 @@ int CLIENT_STATE::init() {
// inform the user if there's a newer version of client
//
- newer_version_startup_check();
+// newer_version_startup_check();
// parse account files again,
// now that we know the host's venue on each project
diff --git a/client/file_names.cpp b/client/file_names.cpp
index 2813aed..209ab3e 100644
--- a/client/file_names.cpp
+++ b/client/file_names.cpp
@@ -69,7 +69,7 @@ int make_soft_link(PROJECT* project, char* link_path, char* rel_file_path) {
//
void get_pathname(FILE_INFO* fip, char* path, int len) {
PROJECT* p = fip->project;
- char buf[MAXPATHLEN];
+ char buf[std::max(len,MAXPATHLEN)];
// for testing purposes, it's handy to allow a FILE_INFO without
// an associated PROJECT.
@@ -91,28 +91,28 @@ void get_pathname(FILE_INFO* fip, char* path, int len) {
}
void get_sched_request_filename(PROJECT& project, char* buf, int len) {
- char url[1024];
+ char url[std::max(len,MAXPATHLEN)];
escape_project_url(project.master_url, url);
snprintf(buf, len, "%s%s.xml", SCHED_OP_REQUEST_BASE, url);
}
void get_sched_reply_filename(PROJECT& project, char* buf, int len) {
- char url[1024];
+ char url[std::max(len,MAXPATHLEN)];
escape_project_url(project.master_url, url);
snprintf(buf, len, "%s%s.xml", SCHED_OP_REPLY_BASE, url);
}
void get_master_filename(PROJECT& project, char* buf, int len) {
- char url[1024];
+ char url[std::max(len,MAXPATHLEN)];
escape_project_url(project.master_url, url);
snprintf(buf, len, "%s%s.xml", MASTER_BASE, url);
}
void job_log_filename(PROJECT& project, char* buf, int len) {
- char url[1024];
+ char url[std::max(len,MAXPATHLEN)];
escape_project_url(project.master_url, url);
snprintf(buf, len, "%s%s.txt", JOB_LOG_BASE, url);
@@ -220,7 +220,7 @@ int make_slot_dir(int slot) {
// delete unused stuff in the slots/ directory
//
void delete_old_slot_dirs() {
- char filename[1024], path[MAXPATHLEN];
+ char filename[MAXPATHLEN], path[MAXPATHLEN];
DIRREF dirp;
int retval;
diff --git a/client/rrsim_test.cpp b/client/rrsim_test.cpp
index 9e41f2e..55bfc20 100644
--- a/client/rrsim_test.cpp
+++ b/client/rrsim_test.cpp
@@ -184,7 +184,6 @@ bool CLIENT_STATE::rr_simulation() {
vector<RESULT*> active;
unsigned int i;
double x;
- vector<RESULT*>::iterator it;
bool rval = false;
if (log_flags.rr_simulation) {
@@ -287,7 +286,9 @@ bool CLIENT_STATE::rr_simulation() {
int last_active_size = active.size();
int last_proj_active_size = pbest->active.size();
- // remove *rpbest from active set,
+ {
+ vector<RESULT*>::iterator it;
+ // remove *rpbest from active set,
// and adjust CPU time left for other results
//
it = active.begin();
@@ -301,7 +302,10 @@ bool CLIENT_STATE::rr_simulation() {
++it;
}
}
+ }
+ {
+ vector<RESULT*>::iterator it;
// remove *rpbest from its project's active set
//
it = pbest->active.begin();
@@ -313,6 +317,7 @@ bool CLIENT_STATE::rr_simulation() {
++it;
}
}
+ }
// If project has more results, add one to active set.
//
diff --git a/client/scheduler_op.cpp b/client/scheduler_op.cpp
index f4126bc..bf87596 100644
--- a/client/scheduler_op.cpp
+++ b/client/scheduler_op.cpp
@@ -138,7 +138,7 @@ int SCHEDULER_OP::init_op_project(PROJECT* p, int r) {
// and project list
//
if (!cc_config.no_info_fetch) {
- gstate.new_version_check();
+// gstate.new_version_check();
gstate.all_projects_list_check();
}
}
diff --git a/clientgui/AsyncRPC.cpp b/clientgui/AsyncRPC.cpp
index f196ced..47de6a9 100644
--- a/clientgui/AsyncRPC.cpp
+++ b/clientgui/AsyncRPC.cpp
@@ -19,7 +19,7 @@
#pragma implementation "AsyncRPC.h"
#endif
-#if !(defined(_WIN32) || (defined(__WXMAC__) && (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_4)))
+#if HAVE_XLOCALE_H
#include <xlocale.h>
#endif
diff --git a/clientgui/BOINCGUIApp.cpp b/clientgui/BOINCGUIApp.cpp
index 900424a..7ce9c09 100644
--- a/clientgui/BOINCGUIApp.cpp
+++ b/clientgui/BOINCGUIApp.cpp
@@ -49,6 +49,9 @@
#include "procinfo.h"
#include "sg_BoincSimpleFrame.h"
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
bool s_bSkipExitConfirmation = false;
diff --git a/clientgui/MainDocument.cpp b/clientgui/MainDocument.cpp
index e22b025..09d2204 100644
--- a/clientgui/MainDocument.cpp
+++ b/clientgui/MainDocument.cpp
@@ -1691,7 +1691,6 @@ void CMainDocument::KillGraphicsApp(HANDLE pid) {
}
#else
void CMainDocument::KillGraphicsApp(int pid) {
- char* argv[6];
char currentDir[1024];
char thePIDbuf[20];
int id, iRetVal;
@@ -1699,12 +1698,13 @@ void CMainDocument::KillGraphicsApp(int pid) {
if (g_use_sandbox) {
snprintf(thePIDbuf, sizeof(thePIDbuf), "%d", pid);
- argv[0] = "switcher";
- argv[1] = "/bin/kill";
- argv[2] = "kill";
- argv[3] = "-KILL";
- argv[4] = thePIDbuf;
- argv[5] = 0;
+ char* const argv[6] = {
+ strdup("switcher"),
+ strdup("/bin/kill"),
+ strdup("kill"),
+ strdup("-KILL"),
+ thePIDbuf,0
+ };
iRetVal = run_program(
getcwd(currentDir, sizeof(currentDir)),
@@ -1714,6 +1714,10 @@ void CMainDocument::KillGraphicsApp(int pid) {
0,
id
);
+ free(argv[0]);
+ free(argv[1]);
+ free(argv[2]);
+ free(argv[3]);
} else {
kill_program(pid);
}
diff --git a/clientgui/Makefile.am b/clientgui/Makefile.am
index bc1a45c..371908c 100644
--- a/clientgui/Makefile.am
+++ b/clientgui/Makefile.am
@@ -7,7 +7,6 @@
include $(top_srcdir)/Makefile.incl
if ENABLE_CLIENT_RELEASE
- AM_LDFLAGS += -static-libtool-libs
## for an entirely statically linked library, you may want to try
## -all-static instead. There's a good chance it won't work properly,
## so we'll use the safer "-static-libtool-libs" by default.
diff --git a/clientgui/NoticeListCtrl.cpp b/clientgui/NoticeListCtrl.cpp
index 12d7218..f696af9 100644
--- a/clientgui/NoticeListCtrl.cpp
+++ b/clientgui/NoticeListCtrl.cpp
@@ -50,8 +50,8 @@ IMPLEMENT_DYNAMIC_CLASS( CNoticeListCtrl, wxWindow )
BEGIN_EVENT_TABLE( CNoticeListCtrl, wxWindow )
////@begin CNoticeListCtrl event table entries
- EVT_WEBVIEW_NAVIGATING(ID_LIST_NOTIFICATIONSVIEW, CNoticeListCtrl::OnLinkClicked)
- EVT_WEBVIEW_ERROR(ID_LIST_NOTIFICATIONSVIEW, CNoticeListCtrl::OnWebViewError)
+ EVT_HTML_LINK_CLICKED(ID_LIST_NOTIFICATIONSVIEW, CNoticeListCtrl::OnLinkClicked)
+// EVT_WEBVIEW_ERROR(ID_LIST_NOTIFICATIONSVIEW, CNoticeListCtrl::OnWebViewError)
////@end CNoticeListCtrl event table entries
END_EVENT_TABLE()
@@ -84,7 +84,7 @@ bool CNoticeListCtrl::Create( wxWindow* parent ) {
wxWindow::Create( parent, ID_LIST_NOTIFICATIONSVIEW, wxDefaultPosition, wxDefaultSize,
wxSUNKEN_BORDER | wxTAB_TRAVERSAL );
- m_browser = wxWebView::New( this, ID_LIST_NOTIFICATIONSVIEW );
+ m_browser = new wxHtmlWindow( this, ID_LIST_NOTIFICATIONSVIEW );
////@end CNoticeListCtrl creation
wxBoxSizer *topsizer;
@@ -238,7 +238,7 @@ void CNoticeListCtrl::SetItemCount(int newCount) {
m_noticesBody += wxT("</font></body></html>");
// baseURL is not needed here (see comments above) and it
// must be an empty string for this to work under OS 10.12.4
- m_browser->SetPage(m_noticesBody, wxEmptyString);
+ m_browser->SetPage(m_noticesBody);
}
@@ -248,22 +248,27 @@ void CNoticeListCtrl::Clear() {
}
-void CNoticeListCtrl::OnLinkClicked( wxWebViewEvent& event ) {
- if (event.GetURL().StartsWith(wxT("http://")) || event.GetURL().StartsWith(wxT("https://"))) {
- event.Veto(); // Tell wxWebView not to follow link
- wxLaunchDefaultBrowser(event.GetURL());
+void CNoticeListCtrl::OnLinkClicked( wxHtmlLinkEvent& event ) {
+ wxString url = event.GetLinkInfo().GetHref();
+ if (url.StartsWith(wxT("http://")) || url.StartsWith(wxT("https://"))) {
+ // wxHtmlLinkEvent doesn't have Veto(), but only loads the page if you
+ // call Skip().
+ // event.Veto(); // Tell wxWebView not to follow link
+ wxLaunchDefaultBrowser(url);
} else {
event.Skip();
}
}
+#if 0
void CNoticeListCtrl::OnWebViewError( wxWebViewEvent& event ) {
fprintf(stderr, "wxWebView error: target=%s, URL=%s\n",
(event.GetTarget().ToStdString()).c_str(), (event.GetURL().ToStdString()).c_str());
event.Skip();
}
+#endif
/*!
diff --git a/clientgui/NoticeListCtrl.h b/clientgui/NoticeListCtrl.h
index 4bee9a4..a145215 100644
--- a/clientgui/NoticeListCtrl.h
+++ b/clientgui/NoticeListCtrl.h
@@ -45,8 +45,8 @@ public:
////@begin CNoticeListCtrl event handler declarations
- void OnLinkClicked( wxWebViewEvent& event );
- void OnWebViewError( wxWebViewEvent& event );
+ void OnLinkClicked( wxHtmlLinkEvent& event );
+// void OnWebViewError( wxWebViewEvent& event );
////@end CNoticeListCtrl event handler declarations
@@ -56,7 +56,7 @@ public:
bool m_bDisplayFetchingNotices;
bool m_bDisplayEmptyNotice;
private:
- wxWebView* m_browser;
+ wxHtmlWindow* m_browser;
bool m_bNeedsReloading;
int m_itemCount;
wxString m_noticesBody;
diff --git a/clientgui/sg_ProjectPanel.cpp b/clientgui/sg_ProjectPanel.cpp
index 030da1b..83a99e0 100644
--- a/clientgui/sg_ProjectPanel.cpp
+++ b/clientgui/sg_ProjectPanel.cpp
@@ -426,8 +426,7 @@ void CSimpleProjectPanel::UpdateProjectList() {
CMainDocument* pDoc = wxGetApp().GetDocument();
ProjectSelectionData* selData;
PROJECT* project;
- char* ctrl_url;
- int i, j, oldProjectSelection, newProjectSelection;
+ int oldProjectSelection, newProjectSelection;
if ( pDoc->IsConnected() ) {
int projCnt = pDoc->GetSimpleProjectCount();
@@ -435,10 +434,11 @@ void CSimpleProjectPanel::UpdateProjectList() {
oldProjectSelection = m_ProjectSelectionCtrl->GetSelection();
// If a new project has been added, figure out which one
- for(i=0; i<projCnt; i++) {
+ for(int i=0; i<projCnt; i++) {
+ char* ctrl_url;
project = pDoc->state.projects[i];
bool found = false;
- for(j=0; j<ctrlCount; j++) {
+ for(int j=0; j<ctrlCount; j++) {
ctrl_url = ((ProjectSelectionData*)m_ProjectSelectionCtrl->GetClientData(j))->project_url;
if (!strcmp(project->master_url, ctrl_url)) {
found = true;
@@ -450,7 +450,7 @@ void CSimpleProjectPanel::UpdateProjectList() {
if ( !found ) {
wxString projname(project->project_name.c_str(), wxConvUTF8);
#if SORTPROJECTLIST
- int alphaOrder;
+ int alphaOrder,j;
for(j = 0; j < ctrlCount; ++j) {
alphaOrder = (m_ProjectSelectionCtrl->GetString(j)).CmpNoCase(projname);
if (alphaOrder > 0) {
@@ -482,8 +482,8 @@ void CSimpleProjectPanel::UpdateProjectList() {
if ( projCnt < ctrlCount ) {
project = NULL;
// Check items in descending order so deletion won't change indexes of items yet to be checked
- for(j=ctrlCount-1; j>=0; --j) {
- ctrl_url = ((ProjectSelectionData*)m_ProjectSelectionCtrl->GetClientData(j))->project_url;
+ for(int j=ctrlCount-1; j>=0; --j) {
+ char* ctrl_url = ((ProjectSelectionData*)m_ProjectSelectionCtrl->GetClientData(j))->project_url;
project = pDoc->state.lookup_project(ctrl_url);
if ( project == NULL ) {
selData = (ProjectSelectionData*)m_ProjectSelectionCtrl->GetClientData(j);
@@ -511,9 +511,9 @@ void CSimpleProjectPanel::UpdateProjectList() {
// Check to see if we need to reload the project icon
ctrlCount = m_ProjectSelectionCtrl->GetCount();
- for(j=0; j<ctrlCount; j++) {
+ for(int j=0; j<ctrlCount; j++) {
selData = (ProjectSelectionData*)m_ProjectSelectionCtrl->GetClientData(j);
- ctrl_url = selData->project_url;
+ char* ctrl_url = selData->project_url;
project = pDoc->state.lookup_project(ctrl_url);
if ( (project != NULL) && (project->project_files_downloaded_time > selData->project_files_downloaded_time) ) {
wxBitmap* projectBM = GetProjectSpecificBitmap(ctrl_url);
diff --git a/clientgui/stdwx.h b/clientgui/stdwx.h
index eadd65e..6588945 100644
--- a/clientgui/stdwx.h
+++ b/clientgui/stdwx.h
@@ -117,8 +117,11 @@
#include <wx/mstream.h>
#include <wx/hash.h>
#include <wx/selstore.h>
+#if 0
#include <wx/webview.h>
#include <wx/webviewfshandler.h>
+#endif
+#include <wx/html/htmlwin.h>
#include <wx/snglinst.h>
#include <wx/bmpcbox.h>
#include <wx/evtloop.h>
diff --git a/clientscr/Makefile.am b/clientscr/Makefile.am
index 51ed3cd..2debb8d 100644
--- a/clientscr/Makefile.am
+++ b/clientscr/Makefile.am
@@ -5,7 +5,6 @@ include $(top_srcdir)/Makefile.incl
AM_LDFLAGS += -lpthread
if ENABLE_CLIENT_RELEASE
- AM_LDFLAGS += -static-libtool-libs
## for an entirely statically linked library, you may want to try
## -all-static instead. There's a good chance it won't work properly,
## so we'll use the safer "-static-libtool-libs" by default.
diff --git a/configure.ac b/configure.ac
index 0faba6c..c1d0421 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,7 +28,7 @@ dnl AM_INIT_AUTOMAKE(dist-zip subdir-objects)
AM_INIT_AUTOMAKE(dist-zip)
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+#m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_CONFIG_SRCDIR(lib/shmem.cpp)
@@ -69,6 +69,12 @@ SAH_LINKS
AC_LANG_PUSH(C)
AM_PROG_CC_C_O
+dnl ------
+dnl essential for LTO and static applications in apps and samples
+AC_PROG_RANLIB
+AM_PROG_AR
+dnl ------
+
m4_divert_once([HELP_ENABLE],
AS_HELP_STRING([BOINC Default enable values], [--enable-server --enable-client --enable-libraries --enable-manager: builds server, client, and libraries]))
diff --git a/debian/changelog b/debian/changelog
index 2d99850..9be3bf9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+boinc (7.8.2+dfsg-4exp1) experimental; urgency=medium
+
+ * Upload to experimental again, with the boinc-server-* packages.
+
+ -- Gianfranco Costamagna <locutusofborg at debian.org> Thu, 28 Sep 2017 09:02:08 +0200
+
boinc (7.8.2+dfsg-4) unstable; urgency=medium
* Upload to unstable
diff --git a/generate_svn_version.sh b/generate_svn_version.sh
index 0c469d1..d950ed7 100644
--- a/generate_svn_version.sh
+++ b/generate_svn_version.sh
@@ -7,7 +7,9 @@ echo "#ifndef SVN_VERSION_H" > $TMPFILE
echo "#define SVN_VERSION_H" >> $TMPFILE
echo "" >> $TMPFILE
-if [ -d .git/svn ]; then
+if [ -d "debian" ]; then
+ CMD=""
+elif [ -d .git/svn ]; then
CMD="git svn info"
elif [ -d .git ]; then
GIT_LOG=`git log -n1 --pretty="format:%H"`
diff --git a/html/Makefile.am b/html/Makefile.am
index c27e634..183ffb0 100644
--- a/html/Makefile.am
+++ b/html/Makefile.am
@@ -1,4 +1,4 @@
htmldir=$(DESTDIR)/$(prefix)/share/boinc-server-maker/html
install-data-local:
mkdir -p $(htmldir)
- cp -r $(srcdir)/inc $(srcdir)/languages $(srcdir)/ops $(srcdir)/user $(htmldir)
+ cp -r $(srcdir)/../drupal $(srcdir)/inc $(srcdir)/languages $(srcdir)/ops $(srcdir)/project.sample $(srcdir)/user $(htmldir)
diff --git a/html/languages/translations/de.po b/html/languages/translations/de.po
index 06d8cfa..ea29090 100644
--- a/html/languages/translations/de.po
+++ b/html/languages/translations/de.po
@@ -1209,8 +1209,8 @@ msgstr "Erlaubt es einige Prozessoren für andere Anwendungen zu reservieren. Be
#: html/inc/prefs.inc:58
#, no-php-format
-msgid "% of the CPUs"
-msgstr "% der Prozessoren"
+msgid "%% of the CPUs"
+msgstr "%% der Prozessoren"
#: html/inc/prefs.inc:63
#, no-php-format
@@ -1222,8 +1222,8 @@ msgstr "Die Berechnung alle paar Sekunden pausieren/fortsetzen um die Prozessort
#: html/inc/prefs.inc:66
#, no-php-format
-msgid "% of CPU time"
-msgstr "% der Prozessorzeit"
+msgid "%% of CPU time"
+msgstr "%% der Prozessorzeit"
#: html/inc/prefs.inc:68 html/inc/prefs.inc:214
msgid "When to suspend"
@@ -1377,8 +1377,8 @@ msgstr "Prozentuale begrenzung des Festplattenplatzes den BOINC auf dem Datentr
#: html/inc/prefs.inc:158
#, no-php-format
-msgid "% of total"
-msgstr "% von Gesamt"
+msgid "%% of total"
+msgstr "%% von Gesamt"
#: html/inc/prefs.inc:164
msgid "When computer is in use, use at most"
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 7b00871..2ee4d98 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -176,7 +176,11 @@ lib_LTLIBRARIES = libboinc.la
libboinc_la_SOURCES = $(generic_sources) $(mac_sources) $(win_sources)
libboinc_la_CFLAGS = $(AM_CFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS)
libboinc_la_CXXFLAGS = $(AM_CXXFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS)
-libboinc_la_LDFLAGS = -static -version-number $(LIBBOINC_VERSION)
+libboinc_la_AR = gcc-ar
+libboinc_la_RANLIB = gcc-ranlib
+libboinc_a_AR = gcc-ar
+libboinc_a_RANLIB = gcc-ranlib
+libboinc_la_LDFLAGS = -version-number $(LIBBOINC_VERSION)
libboinc_la_LIBADD =
if ENABLE_BOINCCRYPT
@@ -184,8 +188,12 @@ lib_LTLIBRARIES += libboinc_crypt.la
libboinc_crypt_la_SOURCES = crypt.cpp
libboinc_crypt_la_CFLAGS = $(AM_CFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS) $(SSL_CFLAGS)
libboinc_crypt_la_CXXFLAGS = $(AM_CXXFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS) $(SSL_CXXFLAGS)
-libboinc_crypt_la_LDFLAGS = -static -version-number $(LIBBOINC_VERSION)
-libboinc_crypt_la_LIBADD =
+libboinc_crypt_la_AR = gcc-ar
+libboinc_crypt_la_RANLIB = gcc-ranlib
+libboinc_crypt_a_AR = gcc-ar
+libboinc_crypt_a_RANLIB = gcc-ranlib
+libboinc_crypt_la_LDFLAGS = -version-number $(LIBBOINC_VERSION) $(SSL_LIBS) $(RSA_LIBS)
+libboinc_crypt_la_LIBADD = $(LIBBOINC)
endif
if ENABLE_FCGI
@@ -193,6 +201,10 @@ lib_LTLIBRARIES += libboinc_fcgi.la
libboinc_fcgi_la_SOURCES = $(libfcgi_sources) $(mac_sources) $(win_sources)
libboinc_fcgi_la_CFLAGS = -D_USING_FCGI_ $(AM_CFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS)
libboinc_fcgi_la_CXXFLAGS = -D_USING_FCGI_ $(AM_CXXFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS)
+libboinc_fcgi_la_AR = gcc-ar
+libboinc_fcgi_la_RANLIB = gcc-ranlib
+libboinc_fcgi_a_AR = gcc-ar
+libboinc_fcgi_a_RANLIB = gcc-ranlib
libboinc_fcgi_la_LDFLAGS = -version-number $(LIBBOINC_VERSION)
libboinc_fcgi_la_LIBADD =
endif
@@ -256,7 +268,7 @@ msg_test_CXXFLAGS = $(PTHREAD_CFLAGS)
msg_test_LDADD = $(LIBBOINC)
crypt_prog_SOURCES = crypt_prog.cpp
crypt_prog_CXXFLAGS = $(PTHREAD_CFLAGS) $(SSL_CXXFLAGS)
-crypt_prog_LDADD = $(LIBBOINC_CRYPT_STATIC) $(LIBBOINC) $(SSL_LIBS)
+crypt_prog_LDADD = $(LIBBOINC_CRYPT) $(LIBBOINC) $(SSL_LIBS)
parse_test_SOURCES = parse_test.cpp
parse_test_CXXFLAGS = $(PTHREAD_CFLAGS)
parse_test_LDADD = $(LIBBOINC)
diff --git a/lib/crypt.cpp b/lib/crypt.cpp
index cb1f49c..a4e8cd4 100644
--- a/lib/crypt.cpp
+++ b/lib/crypt.cpp
@@ -349,6 +349,7 @@ int check_file_signature(
char clear_buf[MD5_LEN];
int n, retval;
DATA_BLOCK clear_signature;
+ clear_buf[0]=0;
n = (int)strlen(md5_buf);
clear_signature.data = (unsigned char*)clear_buf;
diff --git a/lib/crypt_prog.cpp b/lib/crypt_prog.cpp
index 8cfffc2..0b3836b 100644
--- a/lib/crypt_prog.cpp
+++ b/lib/crypt_prog.cpp
@@ -168,6 +168,8 @@ int main(int argc, char** argv) {
if (!fpub) die("fopen");
print_key_hex(fpriv, (KEY*)&private_key, sizeof(private_key));
print_key_hex(fpub, (KEY*)&public_key, sizeof(public_key));
+ fclose(fpriv);
+ fclose(fpub);
} else if (!strcmp(argv[1], "-sign")) {
if (argc < 4) {
@@ -182,6 +184,7 @@ int main(int argc, char** argv) {
signature.len = 256;
retval = sign_file(argv[2], private_key, signature);
print_hex_data(stdout, signature);
+ fclose(fpriv);
} else if (!strcmp(argv[1], "-sign_string")) {
if (argc < 4) {
usage();
@@ -193,6 +196,7 @@ int main(int argc, char** argv) {
if (retval) die("scan_key_hex\n");
generate_signature(argv[2], cbuf, private_key);
puts(cbuf);
+ fclose(fpriv);
} else if (!strcmp(argv[1], "-verify")) {
if (argc < 5) {
usage();
@@ -207,6 +211,8 @@ int main(int argc, char** argv) {
signature.data = signature_buf;
signature.len = 256;
retval = scan_hex_data(f, signature);
+ fclose(f);
+ fclose(fpub);
if (retval) die("scan_hex_data");
char md5_buf[64];
@@ -236,6 +242,8 @@ int main(int argc, char** argv) {
if (!fpub) die("fopen");
retval = scan_key_hex(fpub, (KEY*)&public_key, sizeof(public_key));
if (retval) die("read_public_key");
+ fclose(fpriv);
+ fclose(fpub);
strcpy((char*)buf2, "encryption test successful");
in.data = buf2;
in.len = strlen((char*)in.data);
@@ -254,6 +262,7 @@ int main(int argc, char** argv) {
signature.data = signature_buf;
signature.len = 256;
retval = scan_hex_data(f, signature);
+ fclose(f);
if (retval) die("cannot scan_hex_data");
certpath = check_validity(argv[4], argv[2], signature.data, argv[5]);
if (certpath == NULL) {
@@ -426,6 +435,7 @@ int main(int argc, char** argv) {
die("fopen");
}
print_key_hex(fpub, (KEY*)&public_key, sizeof(public_key));
+ fclose(fpub);
}
}
} else {
diff --git a/lib/filesys.cpp b/lib/filesys.cpp
index 53c11c8..1fa4e8f 100644
--- a/lib/filesys.cpp
+++ b/lib/filesys.cpp
@@ -154,7 +154,12 @@ DIRREF dir_open(const char* p) {
dirp->handle = INVALID_HANDLE_VALUE;
#else
dirp = opendir(p);
- if (!dirp) return NULL;
+ if (!dirp) {
+ char b[MAXPATHLEN+1];
+ boinc_getcwd(b);
+ fprintf(stderr,"dir_open: Could not open directory '%s' from '%s'.\n",p,b);
+ return NULL;
+ }
#endif
return dirp;
}
@@ -600,7 +605,7 @@ int boinc_copy(const char* orig, const char* newf) {
}
return 0;
#elif defined(__EMX__)
- char cmd[2*MAXPATHLEN];
+ char cmd[2*MAXPATHLEN+5];
snprintf(cmd, sizeof(cmd), "copy \"%s\" \"%s\"", orig, newf);
cmd[sizeof(cmd)-1] = 0;
return system(cmd);
@@ -684,7 +689,7 @@ static int boinc_rename_aux(const char* old, const char* newf) {
//
int retval = rename(old, newf);
if (retval) {
- char buf[MAXPATHLEN+MAXPATHLEN];
+ char buf[MAXPATHLEN+MAXPATHLEN+1+7];
sprintf(buf, "mv \"%s\" \"%s\"", old, newf);
#ifdef __APPLE__
// system() is deprecated in Mac OS 10.10.
diff --git a/lib/mfile.cpp b/lib/mfile.cpp
index 1290fcc..82ab01b 100644
--- a/lib/mfile.cpp
+++ b/lib/mfile.cpp
@@ -43,7 +43,7 @@ MFILE::MFILE() {
}
MFILE::~MFILE() {
- if (buf) free(buf);
+ close();
}
int MFILE::open(const char* path, const char* mode) {
diff --git a/lib/parse_test.cpp b/lib/parse_test.cpp
index e388e1f..f88873e 100644
--- a/lib/parse_test.cpp
+++ b/lib/parse_test.cpp
@@ -57,6 +57,7 @@ int main() {
exit(1);
}
parse(f);
+ fclose(f);
}
/* try it with something like:
diff --git a/lib/shmem.cpp b/lib/shmem.cpp
index 19d63cd..52649aa 100644
--- a/lib/shmem.cpp
+++ b/lib/shmem.cpp
@@ -339,7 +339,10 @@ int create_shmem_mmap(const char *path, size_t size, void** pp) {
// area to all zeros because they write beyond the old EOF.
// See the lseek man page for details.
lseek(fd, size-1, SEEK_SET);
- write(fd, "\0", 1);
+ if (1 != write(fd, "\0", 1)) {
+ close(fd);
+ return ERR_SHMGET;
+ }
}
*pp = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_FILE | MAP_SHARED, fd, 0);
diff --git a/lib/unix_util.cpp b/lib/unix_util.cpp
index 5b57c4c..2c70229 100644
--- a/lib/unix_util.cpp
+++ b/lib/unix_util.cpp
@@ -80,7 +80,13 @@ int setenv(const char *name, const char *value, int overwrite) {
}
if (i!=envstrings.end()) {
// we allocated this string. Reallocate it.
+ char *b=buf;
buf=(char *)realloc(buf,strlen(name)+strlen(value)+2);
+ if (!buf) {
+ free(b);
+ errno=ENOMEM;
+ return -1;
+ }
*i=buf;
} else {
// someone else allocated the string. Allocate new memory.
diff --git a/py/boinc_path_config.py.in b/py/boinc_path_config.py.in
index fc5fa96..5127367 100644
--- a/py/boinc_path_config.py.in
+++ b/py/boinc_path_config.py.in
@@ -8,5 +8,5 @@
import sys, os
-TOP_BUILD_DIR = "@TOP_BUILD_DIR@"
+TOP_BUILD_DIR = "/usr/share/boinc-server-maker"
sys.path.insert(0, os.path.join(TOP_BUILD_DIR, 'py'))
diff --git a/samples/condor/Makefile b/samples/condor/Makefile
index 0e54db3..405ae74 100644
--- a/samples/condor/Makefile
+++ b/samples/condor/Makefile
@@ -1,14 +1,17 @@
all: boinc_gahp
clean:
- rm boinc_gahp
+ rm boinc_gahp libcurl.a
-boinc_gahp: boinc_gahp.cpp ../../lib/remote_submit.h ../../lib/remote_submit.cpp
- g++ -g -O0 -I../../lib \
+libcurl.a:
+ ln -s `$(CXX) -print-file-name=libcurl.a`
+
+boinc_gahp: boinc_gahp.cpp ../../lib/remote_submit.h ../../lib/remote_submit.cpp $(BOINC_LIB_DIR)/libboinc.a
+ $(CXX) $(CPPFLAGS) -static -pthread -g -O0 -I../../lib \
-o boinc_gahp boinc_gahp.cpp ../../lib/remote_submit.cpp \
- -L../../lib -lboinc -lpthread -lcurl
+ $(BOINC_API_DIR)/libboinc_api.a $(BOINC_LIB_DIR)/libboinc.a libcurl.a
test: test.cpp ../../lib/remote_submit.cpp ../../lib/remote_submit.h
- g++ -g -o test -I../../lib \
+ $(CXX) $(CPPFLAGS) -static -g -o test -I../../lib \
test.cpp ../../lib/remote_submit.cpp \
- -L../../lib -lboinc -lcurl
+ $(BOINC_LIB_DIR)/libboinc.a libcurl.a
diff --git a/samples/example_app/Makefile b/samples/example_app/Makefile
index 8163dab..2d4ee31 100644
--- a/samples/example_app/Makefile
+++ b/samples/example_app/Makefile
@@ -61,17 +61,17 @@ install: uc2
# because otherwise you might get a version in /usr/lib etc.
uc2: uc2.o libstdc++.a $(BOINC_API_DIR)/libboinc_api.a $(BOINC_LIB_DIR)/libboinc.a
- $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o uc2 uc2.o libstdc++.a -pthread \
+ $(CXX) $(CPPFLAGS) -static -pthread -o uc2 uc2.o libstdc++.a \
$(BOINC_API_DIR)/libboinc_api.a \
$(BOINC_LIB_DIR)/libboinc.a
ucn: ucn.o libstdc++.a $(BOINC_API_DIR)/libboinc_api.a $(BOINC_LIB_DIR)/libboinc.a
- $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o ucn ucn.o libstdc++.a -pthread \
+ $(CXX) $(CPPFLAGS) -static -pthread -o ucn ucn.o libstdc++.a \
$(BOINC_API_DIR)/libboinc_api.a \
$(BOINC_LIB_DIR)/libboinc.a
uc2_graphics: uc2_graphics.o ttfont.o libstdc++.a $(BOINC_LIB_DIR)/libboinc.a $(BOINC_API_DIR)/libboinc_graphics2.a
- $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o uc2_graphics uc2_graphics.o ttfont.o libstdc++.a -pthread \
+ $(CXX) $(CPPFLAGS) -static -pthread -o uc2_graphics uc2_graphics.o ttfont.o libstdc++.a \
$(BOINC_API_DIR)/libboinc_graphics2.a \
$(BOINC_API_DIR)/libboinc_api.a \
$(BOINC_LIB_DIR)/libboinc.a \
@@ -79,7 +79,7 @@ uc2_graphics: uc2_graphics.o ttfont.o libstdc++.a $(BOINC_LIB_DIR)/libboinc.a $(
-lftgl -lGL -lX11 -lXmu -lm
slide_show: slide_show.o libstdc++.a $(BOINC_LIB_DIR)/libboinc.a $(BOINC_API_DIR)/libboinc_graphics2.a
- $(CXX) $(CXXFLAGS) -o slide_show slide_show.o libstdc++.a -pthread \
+ $(CXX) -static -pthread -o slide_show slide_show.o libstdc++.a \
$(BOINC_API_DIR)/libboinc_graphics2.a \
$(BOINC_API_DIR)/libboinc_api.a \
$(BOINC_LIB_DIR)/libboinc.a \
diff --git a/samples/multi_thread/Makefile b/samples/multi_thread/Makefile
index 48f9b10..2c01ef5 100644
--- a/samples/multi_thread/Makefile
+++ b/samples/multi_thread/Makefile
@@ -26,4 +26,4 @@ distclean:
/bin/rm -f $(PROGS) *.o libstdc++.a
multi_thread: multi_thread.o libstdc++.a $(BOINC_API_DIR)/libboinc_api.a $(BOINC_LIB_DIR)/libboinc.a
- $(CXX) $(CXXFLAGS) -o multi_thread multi_thread.o libstdc++.a -pthread -lboinc_api -lboinc
+ $(CXX) $(CPPFLAGS) -static -pthread -o multi_thread multi_thread.o libstdc++.a $(BOINC_API_DIR)/libboinc_api.a $(BOINC_LIB_DIR)/libboinc.a
diff --git a/samples/sleeper/Makefile b/samples/sleeper/Makefile
index ade7828..ab571ee 100644
--- a/samples/sleeper/Makefile
+++ b/samples/sleeper/Makefile
@@ -17,7 +17,7 @@ PROGS = sleeper
all: $(PROGS)
libstdc++.a:
- ln -s `g++ -print-file-name=libstdc++.a`
+ ln -s `$(CXX) -print-file-name=libstdc++.a`
clean: distclean
@@ -25,4 +25,4 @@ distclean:
rm -f $(PROGS) *.o libstdc++.a
sleeper: sleeper.o libstdc++.a $(BOINC_LIB_DIR)/libboinc.a $(BOINC_API_DIR)/libboinc_api.a
- g++ $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o sleeper sleeper.o libstdc++.a -pthread -lboinc_api -lboinc
+ $(CXX) $(CPPFLAGS) -static -pthread -o sleeper sleeper.o libstdc++.a $(BOINC_API_DIR)/libboinc_api.a $(BOINC_LIB_DIR)/libboinc.a
diff --git a/samples/vboxmonitor/Makefile b/samples/vboxmonitor/Makefile
index 41b9eaa..6b09f17 100644
--- a/samples/vboxmonitor/Makefile
+++ b/samples/vboxmonitor/Makefile
@@ -27,4 +27,4 @@ distclean:
/bin/rm -f $(PROGS) *.o libstdc++.a
vboxmonitor: vboxmonitor.o libstdc++.a $(BOINC_LIB_DIR)/libboinc.a $(BOINC_API_DIR)/libboinc_api.a
- g++ $(CXXFLAGS) -o vboxmonitor vboxmonitor.o libstdc++.a -pthread -lboinc_api -lboinc
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -static -pthread -o vboxmonitor vboxmonitor.o libstdc++.a $(BOINC_API_DIR)/libboinc_api.a $(BOINC_LIB_DIR)/libboinc.a
diff --git a/samples/vboxwrapper/Makefile b/samples/vboxwrapper/Makefile
index da8ec01..5925dae 100644
--- a/samples/vboxwrapper/Makefile
+++ b/samples/vboxwrapper/Makefile
@@ -27,25 +27,26 @@ distclean:
/bin/rm -f $(PROGS) *.o libstdc++.a
floppyio.o: floppyio.cpp
- g++ $(CXXFLAGS) -c floppyio.cpp
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c floppyio.cpp
vbox_common.o: vbox_common.cpp
- g++ $(CXXFLAGS) -c vbox_common.cpp
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c vbox_common.cpp
vbox_vboxmanage.o: vbox_vboxmanage.cpp
- g++ $(CXXFLAGS) -c vbox_vboxmanage.cpp
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c vbox_vboxmanage.cpp
vboxcheckpoint.o: vboxcheckpoint.cpp
- g++ $(CXXFLAGS) -c vboxcheckpoint.cpp
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c vboxcheckpoint.cpp
vboxjob.o: vboxjob.cpp
- g++ $(CXXFLAGS) -c vboxjob.cpp
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c vboxjob.cpp
vboxlogging.o: vboxlogging.cpp
- g++ $(CXXFLAGS) -c vboxlogging.cpp
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c vboxlogging.cpp
vboxwrapper.o: vboxwrapper.cpp
- g++ $(CXXFLAGS) -c vboxwrapper.cpp
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c vboxwrapper.cpp
vboxwrapper: vboxwrapper.o vbox_common.o vbox_vboxmanage.o vboxcheckpoint.o vboxjob.o vboxlogging.o floppyio.o libstdc++.a $(BOINC_LIB_DIR)/libboinc.a $(BOINC_API_DIR)/libboinc_api.a
- g++ $(CXXFLAGS) -o vboxwrapper vboxwrapper.o vbox_common.o vbox_vboxmanage.o vboxcheckpoint.o vboxjob.o vboxlogging.o floppyio.o libstdc++.a -pthread -lboinc_api -lboinc
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -static -pthread -o vboxwrapper vboxwrapper.o vbox_common.o vbox_vboxmanage.o vboxcheckpoint.o vboxjob.o vboxlogging.o floppyio.o \
+ libstdc++.a $(BOINC_API_DIR)/libboinc_api.a $(BOINC_LIB_DIR)/libboinc.a
diff --git a/samples/worker/Makefile b/samples/worker/Makefile
index 4fdc0bf..2ce975f 100644
--- a/samples/worker/Makefile
+++ b/samples/worker/Makefile
@@ -10,4 +10,4 @@ distclean:
rm -f $(PROGS) *.o
worker: worker.o
- g++ $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o worker worker.o
+ $(CXX) $(CPPFLAGS) -static -o worker worker.o
diff --git a/samples/wrapper/Makefile b/samples/wrapper/Makefile
index 01cf8fc..f9b2b8f 100644
--- a/samples/wrapper/Makefile
+++ b/samples/wrapper/Makefile
@@ -37,5 +37,5 @@ REGEXP_OBJS = \
regexp_memory.o \
regexp_report.o
-wrapper: wrapper.o libstdc++.a $(BOINC_LIB_DIR)/libboinc.a $(BOINC_API_DIR)/libboinc_api.a $(REGEXP_OBJS)
- $(CXX) $(CXXFLAGS) $(CPPFLAGS) -o wrapper wrapper.o $(REGEXP_OBJS) libstdc++.a $(PTHREAD) -lboinc_api -lboinc -lboinc_zip
+wrapper: wrapper.o libstdc++.a $(BOINC_LIB_DIR)/libboinc.a $(BOINC_API_DIR)/libboinc_api.a $(BOINC_ZIP_DIR)/libboinc_zip.a $(REGEXP_OBJS)
+ $(CXX) $(CPPFLAGS) $(PTHREAD) -static -o wrapper wrapper.o $(REGEXP_OBJS) libstdc++.a $(BOINC_API_DIR)/libboinc_api.a $(BOINC_ZIP_DIR)/libboinc_zip.a $(BOINC_LIB_DIR)/libboinc.a
diff --git a/samples/wrappture/Makefile b/samples/wrappture/Makefile
index 4894392..05fccca 100644
--- a/samples/wrappture/Makefile
+++ b/samples/wrappture/Makefile
@@ -29,10 +29,10 @@ distclean:
/bin/rm -f $(PROGS) *.o libstdc++.a
wrappture.o: wrappture.cpp
- g++ $(CXXFLAGS) -c -o wrappture.o wrappture.cpp
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o wrappture.o wrappture.cpp
wrappture_example: wrappture.o wrappture_example.o libstdc++.a $(BOINC_LIB_DIR)/libboinc.a $(BOINC_API_DIR)/libboinc_api.a $(RAPPTURE_DIR)/librappture.a
- g++ $(CXXFLAGS) -o wrappture_example wrappture_example.o wrappture.o $(RAPPTURE_DIR)/librappture.a libstdc++.a -pthread -lboinc_api -lboinc -lexpat -lz
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -static -pthread -o wrappture_example wrappture_example.o wrappture.o $(RAPPTURE_DIR)/librappture.a libstdc++.a $(BOINC_API_DIR)/libboinc_api.a $(BOINC_LIB_DIR)/libboinc.a
fermi: fermi.cpp
- g++ $(CSSFLAGS) -o fermi fermi.cpp
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -static -o fermi fermi.cpp
diff --git a/sched/Makefile.am b/sched/Makefile.am
index ccb66c2..24e4cbb 100644
--- a/sched/Makefile.am
+++ b/sched/Makefile.am
@@ -4,7 +4,6 @@
include $(top_srcdir)/Makefile.incl
AM_CPPFLAGS += $(MYSQL_CFLAGS) $(PTHREAD_CFLAGS)
-AM_LDFLAGS += -static
if ENABLE_LIBRARIES
@@ -25,8 +24,8 @@ lib_LTLIBRARIES = libsched.la
libsched_la_SOURCES = $(libsched_sources)
libsched_la_CFLAGS = $(AM_CPPFLAGS)
libsched_la_CXXFLAGS = $(AM_CPPFLAGS)
-libsched_la_LDFLAGS= -version-number $(LIBBOINC_VERSION)
-libsched_la_LIBADD= $(SSL_LIBS)
+libsched_la_LDFLAGS= -version-number $(LIBBOINC_VERSION) $(SSL_LIBS)
+libsched_la_LIBADD= $(LIBBOINC) $(LIBBOINC_CRYPT)
## install only headers that are meant for exporting the API !!
if INSTALL_HEADERS
@@ -48,7 +47,7 @@ libsched_fcgi_la_SOURCES = $(libsched_sources)
libsched_fcgi_la_CFLAGS = -D_USING_FCGI_ $(AM_CPPFLAGS)
libsched_fcgi_la_CXXFLAGS = -D_USING_FCGI_ $(AM_CPPFLAGS)
libsched_fcgi_la_LDFLAGS= -version-number $(LIBBOINC_VERSION)
-libsched_fcgi_la_LIBADD=
+libsched_fcgi_la_LIBADD= $(LIBBOINC_CRYPT)
endif
# end of "if ENABLE_FCGI"
@@ -277,7 +276,7 @@ update_stats_SOURCES = update_stats.cpp
update_stats_LDADD = $(SERVERLIBS)
file_upload_handler_SOURCES = file_upload_handler.cpp sched_config.cpp sched_util_basic.cpp sched_limit.cpp
-file_upload_handler_LDADD = $(FUHLIBS)
+file_upload_handler_LDADD = $(FUHLIBS) $(LIBBOINC)
make_work_SOURCES = make_work.cpp
make_work_LDADD = $(SERVERLIBS)
@@ -318,7 +317,7 @@ fcgi_file_upload_handler_SOURCES = \
file_upload_handler.cpp \
sched_config.cpp
fcgi_file_upload_handler_CPPFLAGS = -D_USING_FCGI_ $(AM_CPPFLAGS)
-fcgi_file_upload_handler_LDADD = $(SERVERLIBS_FCGI)
+fcgi_file_upload_handler_LDADD = $(SERVERLIBS_FCGI) $(LIBBOINC)
endif
# end of "if ENABLE_FCGI"
diff --git a/sched/file_upload_handler.cpp b/sched/file_upload_handler.cpp
index a4fd0eb..beb6594 100644
--- a/sched/file_upload_handler.cpp
+++ b/sched/file_upload_handler.cpp
@@ -137,13 +137,13 @@ int copy_socket_to_file(FILE* in, char* name, char* path, double offset, double
bytes_left = nbytes - offset;
while (bytes_left > 0) {
- int n, m, to_write;
+ int m;
m = bytes_left<(double)BLOCK_SIZE ? (int)bytes_left : BLOCK_SIZE;
// try to get m bytes from socket (n>=0 is number actually returned)
//
- n = fread(buf, 1, m, in);
+ size_t n = fread(buf, 1, m, in);
// delay opening the file until we've done the first socket read
// to avoid filesystem lockups (WCG, possible paranoia)
@@ -222,7 +222,7 @@ int copy_socket_to_file(FILE* in, char* name, char* path, double offset, double
// try to write n bytes to file
//
- to_write=n;
+ size_t to_write=n;
while (to_write > 0) {
ssize_t ret = write(fd, buf+n-to_write, to_write);
if (ret < 0) {
diff --git a/sched/sched_driver.cpp b/sched/sched_driver.cpp
index 694e0c7..8d008a8 100644
--- a/sched/sched_driver.cpp
+++ b/sched/sched_driver.cpp
@@ -53,9 +53,9 @@
using std::vector;
struct HOST_DESC{
- char os_name[256];
- char p_vendor[256];
- char p_model[256];
+ char os_name[512];
+ char p_vendor[512];
+ char p_model[512];
};
vector<HOST_DESC> host_descs;
diff --git a/stripchart/stripchart b/stripchart/stripchart
index db4b6b7..71e2fcb 100755
--- a/stripchart/stripchart
+++ b/stripchart/stripchart
@@ -1,4 +1,4 @@
-#!/usr/bin/env perl
+#!/usr/bin/perl
# The contents of this file are subject to the Mozilla Public License
# Version 1.0 (the "License"); you may not use this file except in
@@ -47,7 +47,7 @@ $|++;
################
# Where is the .cnf file?
-$cnfpath = "./stripchart.cnf";
+$cnfpath = "/etc/stripchart.cnf";
# Read it in:
open (CNFFILE,$cnfpath) or die "cannot open configuration file: $cnfpath\nmake sure this variable is set properly";
diff --git a/stripchart/stripchart.cgi b/stripchart/stripchart.cgi
index 26fa9fb..0ac8a9f 100755
--- a/stripchart/stripchart.cgi
+++ b/stripchart/stripchart.cgi
@@ -1,4 +1,4 @@
-#! /usr/bin/env perl
+#!/usr/bin/perl
# The contents of this file are subject to the Mozilla Public License
# Version 1.0 (the "License"); you may not use this file except in
@@ -44,7 +44,7 @@ use File::Basename;
################
# Where is the .cnf file?
-$cnfpath = "./stripchart.cnf";
+$cnfpath = "/etc/stripchart.cnf";
# Read it in:
open (CNFFILE,$cnfpath) or die "cannot open configuration file: $cnfpath\nmake sure this variable is set properly";
diff --git a/stripchart/stripchart.cnf b/stripchart/stripchart.cnf
index 834ee28..1d616ec 100644
--- a/stripchart/stripchart.cnf
+++ b/stripchart/stripchart.cnf
@@ -4,7 +4,7 @@ use Time::Local;
$majorversion = 2; $minorversion = 1;
# Directory where gnuplot is
-$gnuplot = "/usr/local/bin"
+$gnuplot = "/usr/bin"
# Temporary files
$suffix = rand(10000);
@@ -38,7 +38,7 @@ $daysecs = 86400;
$tzdiff = timegm($sec,$min,$hour,$mday,$mon,$year) - timelocal($sec,$min,$hour,$mday,$mon,$year);
# Where is the stripchart executable located?
-$stripchartexe = "./stripchart"
+$stripchartexe = "/usr/lib/cgi-bin/stripchart"
# What is the default number of stripcharts?
$defaultnumcharts = 1;
@@ -48,11 +48,11 @@ $defaultflags = "-s";
# Where is the list of datafiles for stripchart.cgi?
# Note: there is a sample copy in the samples directory:
-$datafilelist = "datafiles";
+$datafilelist = "/usr/share/stripchart/datafiles";
-# Where is the list of user-definied cgi queries?
+# Where is the list of user-defined cgi queries?
# Note: this file gets created by the cgi - must put it somewhere that the cgi user can write to
-$queryfilelist = "querylist";
+$queryfilelist = "/tmp/querylist";
# What time is it right now?
$rightnow = time;
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 165885d..d48f06b 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -40,10 +40,10 @@ dist_tools_SCRIPTS = \
watch_tcp
dist_tools_DATA = \
- project.xml
+ project.xml \
+ gui_urls.xml
AM_CXXFLAGS += $(MYSQL_CFLAGS)
-AM_LDFLAGS += -static
cancel_jobs_SOURCES = cancel_jobs.cpp
cancel_jobs_LDADD = $(SERVERLIBS)
diff --git a/tools/db_query b/tools/db_query
index 4852cfa..02aaf54 100755
--- a/tools/db_query
+++ b/tools/db_query
@@ -1,4 +1,4 @@
-#! /bin/tcsh
+#!/usr/bin/tcsh
set CIVDATE = `date "+%Y:%m:%d:%H:%M"`
set UNIXDATE = `perl -e 'print time()'`
diff --git a/tools/make_project b/tools/make_project
index 6562296..2ffdedc 100755
--- a/tools/make_project
+++ b/tools/make_project
@@ -385,6 +385,7 @@ print >>open(httpd_conf_template_filename,'w'), '''
<Directory "%(proot)s/html">
Options Indexes MultiViews
AllowOverride AuthConfig
+ Require all granted
Order allow,deny
Allow from all
</Directory>
@@ -393,6 +394,7 @@ print >>open(httpd_conf_template_filename,'w'), '''
<Directory "%(proot)s/cgi-bin">
Options ExecCGI
AllowOverride AuthConfig
+ Require all granted
Order allow,deny
Allow from all
</Directory>
diff --git a/tools/watch_tcp b/tools/watch_tcp
index 3f4eede..5686014 100755
--- a/tools/watch_tcp
+++ b/tools/watch_tcp
@@ -1,4 +1,4 @@
-#! /bin/csh
+#!/usr/bin/tcsh
#
# by jeffc
#
diff --git a/vda/Makefile.am b/vda/Makefile.am
index eccbbfe..96795d0 100644
--- a/vda/Makefile.am
+++ b/vda/Makefile.am
@@ -4,7 +4,6 @@ vdadir=$(prefix)/lib/boinc-server-maker/vda
vda_PROGRAMS = vda vdad ssim
AM_CXXFLAGS += $(MYSQL_CFLAGS)
-AM_LDFLAGS += -static
vda_SOURCES = vda.cpp vda_lib.cpp vda_lib2.cpp vda_policy.cpp stats.cpp
vda_LDADD = $(SERVERLIBS)
diff --git a/zip/Makefile.am b/zip/Makefile.am
index 569f84c..b1cd3cb 100644
--- a/zip/Makefile.am
+++ b/zip/Makefile.am
@@ -62,7 +62,11 @@ endif
lib_LTLIBRARIES = libboinc_zip.la
libboinc_zip_la_SOURCES = $(libboinc_zip_sources)
libboinc_zip_la_LDFLAGS = -version-number $(LIBBOINC_VERSION)
-libboinc_zip_la_LIBADD =
+libboinc_zip_la_LIBADD = $(LIBBOINC)
+libboinc_zip_la_AR = gcc-ar
+libboinc_zip_la_RANLIB = gcc-ranlib
+libboinc_zip_a_AR = gcc-ar
+libboinc_zip_a_RANLIB = gcc-ranlib
# Some OSs may not prefix libraries with lib.
# For example OS2
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-boinc/boinc.git
More information about the pkg-boinc-commits
mailing list