forked from pool/boinc-client
This commit is contained in:
parent
c48a0ba0f9
commit
8f5564b72d
937
bnc-431510.patch
937
bnc-431510.patch
@ -1,937 +0,0 @@
|
||||
diff -Naur boinc-6.2.18/client/app_stats_mac.C boinc-6.2.18-mp/client/app_stats_mac.C
|
||||
--- boinc-6.2.18/client/app_stats_mac.C 2008-08-25 22:29:18.000000000 +0200
|
||||
+++ boinc-6.2.18-mp/client/app_stats_mac.C 1970-01-01 01:00:00.000000000 +0100
|
||||
@@ -1,715 +0,0 @@
|
||||
-// Berkeley Open Infrastructure for Network Computing
|
||||
-// http://boinc.berkeley.edu
|
||||
-// Copyright (C) 2006 University of California
|
||||
-//
|
||||
-// This is free software; you can redistribute it and/or
|
||||
-// modify it under the terms of the GNU Lesser General Public
|
||||
-// License as published by the Free Software Foundation;
|
||||
-// either version 2.1 of the License, or (at your option) any later version.
|
||||
-//
|
||||
-// This software is distributed in the hope that it will be useful,
|
||||
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
-// See the GNU Lesser General Public License for more details.
|
||||
-//
|
||||
-// To view the GNU Lesser General Public License visit
|
||||
-// http://www.gnu.org/copyleft/lesser.html
|
||||
-// or write to the Free Software Foundation, Inc.,
|
||||
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
-
|
||||
-// This file is adapted from code originally supplied by Apple Computer, Inc.
|
||||
-// The Berkeley Open Infrastructure for Network Computing project has modified
|
||||
-// the original code and made additions as of September 22, 2006. The original
|
||||
-// Apple Public Source License statement appears below:
|
||||
-
|
||||
-/*
|
||||
- * Copyright (c) 2002-2004 Apple Computer, Inc. All rights reserved.
|
||||
- *
|
||||
- * @APPLE_LICENSE_HEADER_START@
|
||||
- *
|
||||
- * The contents of this file constitute Original Code as defined in and
|
||||
- * are subject to the Apple Public Source License Version 1.1 (the
|
||||
- * "License"). You may not use this file except in compliance with the
|
||||
- * License. Please obtain a copy of the License at
|
||||
- * http://www.apple.com/publicsource and read it before using this file.
|
||||
- *
|
||||
- * This Original Code and all software distributed under the License are
|
||||
- * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
- * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
|
||||
- * License for the specific language governing rights and limitations
|
||||
- * under the License.
|
||||
- *
|
||||
- * @APPLE_LICENSE_HEADER_END@
|
||||
- */
|
||||
-
|
||||
-// app_stats_mac.C
|
||||
-//
|
||||
-
|
||||
-// #define _DEBUG 1
|
||||
-
|
||||
-// Put a safety limit on recursion
|
||||
-#define MAX_DESCENDANT_LEVEL 4
|
||||
-
|
||||
-// Totals for non_BOINC processes are not useful because most OSs don't
|
||||
-// move idle processes out of RAM, so physical memory is always full
|
||||
-#define GET_NON_BOINC_INFO 0
|
||||
-
|
||||
-// We don't need swap space info because
|
||||
-// http://developer.apple.com/documentation/Performance/Conceptual/ManagingMemory/Articles/AboutMemory.html says:
|
||||
-// Unlike most UNIX-based operating systems, Mac OS X does not use a
|
||||
-// preallocated swap partition for virtual memory. Instead, it uses all
|
||||
-// of the available space on the machineÕs boot partition.
|
||||
-// However, the associated overhead is not significant if we are examining
|
||||
-// only BOINC descendant processes.
|
||||
-#define GET_SWAP_SIZE 1
|
||||
-
|
||||
-// The overhead for getting CPU times is not significant if we are
|
||||
-// examining only BOINC descendant processes.
|
||||
-#define GET_CPU_TIMES 1
|
||||
-
|
||||
-
|
||||
-#include <cerrno>
|
||||
-#include <sys/types.h>
|
||||
-#include <mach/shared_memory_server.h>
|
||||
-#include <mach/mach.h>
|
||||
-#include <mach/mach_error.h>
|
||||
-#include <sys/sysctl.h>
|
||||
-
|
||||
-#include "procinfo.h"
|
||||
-
|
||||
-using std::vector;
|
||||
-
|
||||
-static int get_boinc_proc_info(int my_pid, int boinc_pid);
|
||||
-static int build_proc_list (vector<PROCINFO>& pi, int boinc_pid);
|
||||
-static void output_child_totals(PROCINFO& pinfo);
|
||||
-static boolean_t appstats_task_update(task_t a_task, vector<PROCINFO>& piv);
|
||||
-static void find_all_descendants(vector<PROCINFO>& piv, int pid, int rlvl);
|
||||
-static void add_child_totals(PROCINFO& pi, vector<PROCINFO>& piv, int pid, int rlvl);
|
||||
-//static void add_others(PROCINFO&, std::vector<PROCINFO>&);
|
||||
-static void sig_pipe(int signo);
|
||||
-
|
||||
-#ifdef _DEBUG
|
||||
-static void print_procinfo(PROCINFO& pinfo);
|
||||
-static void vm_size_render(unsigned long long a_size);
|
||||
-#endif
|
||||
-
|
||||
-// BOINC helper application to get info about each of the BOINC Client's
|
||||
-// child processes (including all its descendants) and also totals for
|
||||
-// all other processes.
|
||||
-// On the Mac, much of this information is accessible only by the super-user,
|
||||
-// so this helper application must be run setuid root.
|
||||
-
|
||||
-int main(int argc, char** argv) {
|
||||
- int boinc_pid, my_pid;
|
||||
- int retval;
|
||||
- char buf[256];
|
||||
-
|
||||
- if (geteuid() != 0) // This must be run setuid root
|
||||
- return EACCES;
|
||||
-
|
||||
- my_pid = getpid();
|
||||
- boinc_pid = getppid(); // Assumes we were called by BOINC client
|
||||
-
|
||||
- if (argc == 2)
|
||||
- boinc_pid = atoi(argv[1]); // Pass in any desired valid pid for testing
|
||||
-
|
||||
- if (signal(SIGPIPE, sig_pipe) == SIG_ERR) {
|
||||
- fprintf(stderr, "signal error");
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
- setbuf(stdin, 0);
|
||||
- setbuf(stdout, 0);
|
||||
-
|
||||
- while (1) {
|
||||
- if (fgets(buf, sizeof(buf), stdin) == NULL)
|
||||
- return 0;
|
||||
-
|
||||
- if (feof(stdin))
|
||||
- return 0;
|
||||
-
|
||||
- retval = get_boinc_proc_info(my_pid, boinc_pid);
|
||||
- }
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-static int get_boinc_proc_info(int my_pid, int boinc_pid) {
|
||||
- int retval;
|
||||
- vector<PROCINFO> piv;
|
||||
- PROCINFO child_total;
|
||||
- unsigned int i;
|
||||
-
|
||||
-
|
||||
- retval = build_proc_list(piv, boinc_pid);
|
||||
- if (retval)
|
||||
- return retval;
|
||||
-
|
||||
- for (i=0; i<piv.size(); i++) {
|
||||
- PROCINFO& p = piv[i];
|
||||
- if (p.parentid == boinc_pid) {
|
||||
- if (p.id == my_pid)
|
||||
- continue;
|
||||
-
|
||||
- child_total = p;
|
||||
- p.is_boinc_app = true;
|
||||
-#ifdef _DEBUG
|
||||
- printf("\n\nSumming info for process %d and its children:\n", child_total.id);
|
||||
- print_procinfo(child_total);
|
||||
-#endif
|
||||
- // look for child processes
|
||||
- add_child_totals(child_total, piv, p.id, 0);
|
||||
-#ifdef _DEBUG
|
||||
- printf("Totals for process %d and its children:\n", child_total.id);
|
||||
-#endif
|
||||
- output_child_totals(child_total);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- memset(&child_total, 0, sizeof(child_total));
|
||||
-#if 0
|
||||
-#ifdef _DEBUG
|
||||
- printf("\n\nSumming info for all other processes\n");
|
||||
-#endif
|
||||
- add_others(child_total, piv);
|
||||
-#endif
|
||||
- output_child_totals(child_total); // zero pid signals end of data
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-static void output_child_totals(PROCINFO& pinfo) {
|
||||
- printf("%d %d %.0lf %.0lf %lu %lf %lf\n",
|
||||
- pinfo.id, pinfo.parentid, pinfo.working_set_size, pinfo.swap_size,
|
||||
- pinfo.page_fault_count, pinfo.user_time, pinfo.kernel_time);
|
||||
-// fflush(stdout);
|
||||
-}
|
||||
-
|
||||
-static int build_proc_list (vector<PROCINFO>& pi, int boinc_pid) {
|
||||
- boolean_t retval = FALSE;
|
||||
- kern_return_t error;
|
||||
- mach_port_t appstats_port;
|
||||
- processor_set_t *psets, pset;
|
||||
- task_t *tasks;
|
||||
- unsigned i, j, pcnt, tcnt;
|
||||
- PROCINFO pinfo;
|
||||
- int pid, mib[4];
|
||||
- struct kinfo_proc kinfo;
|
||||
- size_t kinfosize;
|
||||
-
|
||||
- appstats_port = mach_host_self();
|
||||
-
|
||||
- // First, get a list of all tasks / processes
|
||||
-
|
||||
- error = host_processor_sets(appstats_port, &psets, &pcnt);
|
||||
- if (error != KERN_SUCCESS) {
|
||||
- fprintf(stderr,
|
||||
- "Error in host_processor_sets(): %s",
|
||||
- mach_error_string(error));
|
||||
- retval = TRUE;
|
||||
- goto RETURN;
|
||||
- }
|
||||
-
|
||||
- for (i = 0; i < pcnt; i++) {
|
||||
- if (retval)
|
||||
- break;
|
||||
-
|
||||
- error = host_processor_set_priv(appstats_port, psets[i], &pset);
|
||||
- if (error != KERN_SUCCESS) {
|
||||
- fprintf(stderr,
|
||||
- "Error in host_processor_set_priv(): %s",
|
||||
- mach_error_string(error));
|
||||
- retval = TRUE;
|
||||
- break;
|
||||
- }
|
||||
-
|
||||
- error = processor_set_tasks(pset, &tasks, &tcnt);
|
||||
- if (error != KERN_SUCCESS) {
|
||||
- fprintf(stderr,
|
||||
- "Error in processor_set_tasks(): %s",
|
||||
- mach_error_string(error));
|
||||
- retval = TRUE;
|
||||
- break;
|
||||
- }
|
||||
-
|
||||
- for (j = 0; j < tcnt; j++) {
|
||||
- if (retval)
|
||||
- break;
|
||||
-
|
||||
- memset(&pinfo, 0, sizeof(PROCINFO));
|
||||
-
|
||||
- /* Get pid for this task. */
|
||||
- error = pid_for_task(tasks[j], &pid);
|
||||
- if (error != KERN_SUCCESS) {
|
||||
- /* Not a process, or the process is gone. */
|
||||
- continue;
|
||||
- }
|
||||
-
|
||||
- // Get parent pid for each process
|
||||
- /* Get kinfo structure for this task. */
|
||||
- kinfosize = sizeof(struct kinfo_proc);
|
||||
- mib[0] = CTL_KERN;
|
||||
- mib[1] = KERN_PROC;
|
||||
- mib[2] = KERN_PROC_PID;
|
||||
- mib[3] = pid;
|
||||
-
|
||||
- if (sysctl(mib, 4, &kinfo, &kinfosize, NULL, 0) == -1) {
|
||||
- fprintf(stderr,
|
||||
- "%s(): Error in sysctl(): %s", __FUNCTION__,
|
||||
- strerror(errno));
|
||||
- retval = TRUE;
|
||||
- break;
|
||||
- }
|
||||
-
|
||||
- if (kinfo.kp_proc.p_stat == 0) {
|
||||
- /* Zombie process. */
|
||||
- continue;
|
||||
- }
|
||||
-
|
||||
- pinfo.id = pid;
|
||||
- pinfo.parentid = kinfo.kp_eproc.e_ppid;
|
||||
-
|
||||
- pi.push_back(pinfo);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
-#if ! GET_NON_BOINC_INFO
|
||||
- // Next, find all BOINC's decendants and mark them for further study
|
||||
- if (! retval)
|
||||
- find_all_descendants(pi, boinc_pid, 0);
|
||||
-#endif
|
||||
-
|
||||
- // Now get the process information for each descendant
|
||||
- for (i = 0; i < pcnt; i++) {
|
||||
- for (j = 0; j < tcnt; j++) {
|
||||
- if (! retval)
|
||||
- if (appstats_task_update(tasks[j], pi)) {
|
||||
- retval = TRUE;
|
||||
- goto RETURN;
|
||||
- }
|
||||
-
|
||||
- /* Delete task port if it isn't our own. */
|
||||
- if (tasks[j] != mach_task_self()) {
|
||||
- mach_port_deallocate(mach_task_self(),
|
||||
- tasks[j]);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- error = vm_deallocate((vm_map_t)mach_task_self(),
|
||||
- (vm_address_t)tasks, tcnt * sizeof(task_t));
|
||||
- if (error != KERN_SUCCESS) {
|
||||
- if (!retval)
|
||||
- fprintf(stderr,
|
||||
- "Error in vm_deallocate(): %s",
|
||||
- mach_error_string(error));
|
||||
- retval = TRUE;
|
||||
- goto RETURN;
|
||||
- }
|
||||
- if ((error = mach_port_deallocate(mach_task_self(),
|
||||
- pset)) != KERN_SUCCESS
|
||||
- || (error = mach_port_deallocate(mach_task_self(),
|
||||
- psets[i])) != KERN_SUCCESS) {
|
||||
- if (!retval)
|
||||
- fprintf(stderr,
|
||||
- "Error in mach_port_deallocate(): %s",
|
||||
- mach_error_string(error));
|
||||
- retval = TRUE;
|
||||
- goto RETURN;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- error = vm_deallocate((vm_map_t)mach_task_self(),
|
||||
- (vm_address_t)psets, pcnt * sizeof(processor_set_t));
|
||||
- if (error != KERN_SUCCESS) {
|
||||
- if (!retval)
|
||||
- fprintf(stderr,
|
||||
- "Error in vm_deallocate(): %s",
|
||||
- mach_error_string(error));
|
||||
- retval = TRUE;
|
||||
- goto RETURN;
|
||||
- }
|
||||
-
|
||||
- RETURN:
|
||||
- return retval;
|
||||
-
|
||||
-}
|
||||
-
|
||||
-/* Update statistics for task a_task. */
|
||||
-static boolean_t appstats_task_update(task_t a_task, vector<PROCINFO>& piv)
|
||||
-{
|
||||
- boolean_t retval;
|
||||
- kern_return_t error;
|
||||
- mach_msg_type_number_t count;
|
||||
- task_basic_info_data_t ti;
|
||||
- vm_address_t address;
|
||||
- mach_port_t object_name;
|
||||
- vm_region_top_info_data_t info;
|
||||
- vm_size_t size;
|
||||
- thread_array_t thread_table;
|
||||
- unsigned int table_size;
|
||||
- thread_basic_info_t thi;
|
||||
- thread_basic_info_data_t thi_data;
|
||||
- unsigned i;
|
||||
- task_events_info_data_t events;
|
||||
- vm_size_t vsize, rsize;
|
||||
- PROCINFO *pinfo;
|
||||
- int pid;
|
||||
-
|
||||
- /* Get pid for this task. */
|
||||
- error = pid_for_task(a_task, &pid);
|
||||
- if (error != KERN_SUCCESS) {
|
||||
- /* Not a process, or the process is gone. */
|
||||
- retval = FALSE;
|
||||
- goto GONE;
|
||||
- }
|
||||
-
|
||||
- for (i=0; i<piv.size(); i++) {
|
||||
- pinfo = &piv[i];
|
||||
- if (pinfo->id == pid)
|
||||
- break;
|
||||
- }
|
||||
-
|
||||
- if (pinfo->id != pid) {
|
||||
- fprintf(stderr, "pid %d missing from list\n", pid);
|
||||
- retval = FALSE;
|
||||
- goto RETURN;
|
||||
- }
|
||||
-
|
||||
-#if ! GET_NON_BOINC_INFO
|
||||
- if (!pinfo->is_boinc_app) {
|
||||
- retval = FALSE;
|
||||
- goto RETURN;
|
||||
- }
|
||||
-#endif
|
||||
- /*
|
||||
- * Get task_info, which is used for memory usage and CPU usage
|
||||
- * statistics.
|
||||
- */
|
||||
- count = TASK_BASIC_INFO_COUNT;
|
||||
- error = task_info(a_task, TASK_BASIC_INFO, (task_info_t)&ti, &count);
|
||||
- if (error != KERN_SUCCESS) {
|
||||
- retval = FALSE;
|
||||
- goto GONE;
|
||||
- }
|
||||
-
|
||||
- /*
|
||||
- * Get memory usage statistics.
|
||||
- */
|
||||
-
|
||||
- /*
|
||||
- * Set rsize and vsize; they require no calculation. (Well, actually,
|
||||
- * we adjust vsize if traversing memory objects to not include the
|
||||
- * globally shared text and data regions).
|
||||
- */
|
||||
- rsize = ti.resident_size;
|
||||
-#if GET_SWAP_SIZE
|
||||
- vsize = ti.virtual_size;
|
||||
- /*
|
||||
- * Iterate through the VM regions of the process and determine
|
||||
- * the amount of memory of various types it has mapped.
|
||||
- */
|
||||
- for (address = 0; ; address += size) {
|
||||
- /* Get memory region. */
|
||||
- count = VM_REGION_TOP_INFO_COUNT;
|
||||
- if (vm_region(a_task, &address, &size,
|
||||
- VM_REGION_TOP_INFO, (vm_region_info_t)&info, &count,
|
||||
- &object_name) != KERN_SUCCESS) {
|
||||
- /* No more memory regions. */
|
||||
- break;
|
||||
- }
|
||||
-
|
||||
- if (address >= GLOBAL_SHARED_TEXT_SEGMENT
|
||||
- && address < (GLOBAL_SHARED_DATA_SEGMENT
|
||||
- + SHARED_DATA_REGION_SIZE)) {
|
||||
- /* This region is private shared. */
|
||||
-
|
||||
- /*
|
||||
- * Check if this process has the globally shared
|
||||
- * text and data regions mapped in. If so, adjust
|
||||
- * virtual memory size and exit loop.
|
||||
- */
|
||||
- if (info.share_mode == SM_EMPTY) {
|
||||
- vm_region_basic_info_data_64_t b_info;
|
||||
-
|
||||
- count = VM_REGION_BASIC_INFO_COUNT_64;
|
||||
- if (vm_region_64(a_task, &address,
|
||||
- &size, VM_REGION_BASIC_INFO,
|
||||
- (vm_region_info_t)&b_info, &count,
|
||||
- &object_name) != KERN_SUCCESS) {
|
||||
- break;
|
||||
- }
|
||||
-
|
||||
- if (b_info.reserved) {
|
||||
- vsize -= (SHARED_TEXT_REGION_SIZE + SHARED_DATA_REGION_SIZE);
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-#else
|
||||
- vsize = 0;
|
||||
-#endif // GET_SWAP_SIZE
|
||||
- pinfo->working_set_size = rsize;
|
||||
- pinfo->swap_size = vsize;
|
||||
-
|
||||
- /*
|
||||
- * Get CPU usage statistics.
|
||||
- */
|
||||
-
|
||||
- pinfo->user_time = (double)ti.user_time.seconds + (((double)ti.user_time.microseconds)/1000000.);
|
||||
- pinfo->kernel_time = (double)ti.system_time.seconds + (((double)ti.system_time.microseconds)/1000000.);
|
||||
-
|
||||
- /* Get number of threads. */
|
||||
- error = task_threads(a_task, &thread_table, &table_size);
|
||||
- if (error != KERN_SUCCESS) {
|
||||
- retval = FALSE;
|
||||
- goto RETURN;
|
||||
- }
|
||||
-
|
||||
-#if GET_CPU_TIMES
|
||||
- /* Iterate through threads and collect usage stats. */
|
||||
- thi = &thi_data;
|
||||
- for (i = 0; i < table_size; i++) {
|
||||
- count = THREAD_BASIC_INFO_COUNT;
|
||||
- if (thread_info(thread_table[i], THREAD_BASIC_INFO,
|
||||
- (thread_info_t)thi, &count) == KERN_SUCCESS) {
|
||||
- if ((thi->flags & TH_FLAGS_IDLE) == 0) {
|
||||
- pinfo->user_time += (double)thi->user_time.seconds + (((double)thi->user_time.microseconds)/1000000.);
|
||||
- pinfo->kernel_time += (double)thi->system_time.seconds + (((double)thi->system_time.microseconds)/1000000.);
|
||||
- }
|
||||
- }
|
||||
- if (a_task != mach_task_self()) {
|
||||
- if ((error = mach_port_deallocate(mach_task_self(),
|
||||
- thread_table[i])) != KERN_SUCCESS) {
|
||||
- fprintf(stderr,
|
||||
- "Error in mach_port_deallocate(): %s",
|
||||
- mach_error_string(error));
|
||||
- retval = TRUE;
|
||||
- goto RETURN;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- if ((error = vm_deallocate(mach_task_self(), (vm_offset_t)thread_table,
|
||||
- table_size * sizeof(thread_array_t)) != KERN_SUCCESS)) {
|
||||
- fprintf(stderr,
|
||||
- "Error in vm_deallocate(): %s",
|
||||
- mach_error_string(error));
|
||||
- retval = TRUE;
|
||||
- goto RETURN;
|
||||
- }
|
||||
-#endif GET_CPU_TIMES
|
||||
-
|
||||
- /*
|
||||
- * Get event counters.
|
||||
- */
|
||||
-
|
||||
- count = TASK_EVENTS_INFO_COUNT;
|
||||
- if (task_info(a_task, TASK_EVENTS_INFO,
|
||||
- (task_info_t)&events, &count) != KERN_SUCCESS) {
|
||||
- /* Error. */
|
||||
- retval = FALSE;
|
||||
- goto RETURN;
|
||||
- } else {
|
||||
- pinfo->page_fault_count = events.pageins;
|
||||
- }
|
||||
-
|
||||
- retval = FALSE;
|
||||
- RETURN:
|
||||
- GONE:
|
||||
-
|
||||
- return retval;
|
||||
-}
|
||||
-
|
||||
-// Scan the process table marking all the decendants of the parent
|
||||
-// process. Loop thru entire table as the entries aren't in order.
|
||||
-// Recurse at most 5 times to get additional child processes.
|
||||
-//
|
||||
-static void find_all_descendants(vector<PROCINFO>& piv, int pid, int rlvl) {
|
||||
- unsigned int i;
|
||||
-
|
||||
- if (rlvl > MAX_DESCENDANT_LEVEL) {
|
||||
- return;
|
||||
- }
|
||||
- for (i=0; i<piv.size(); i++) {
|
||||
- PROCINFO& p = piv[i];
|
||||
- if (p.parentid == pid) {
|
||||
- p.is_boinc_app = true;
|
||||
- // look for child process of this one
|
||||
- find_all_descendants(piv, p.id, rlvl+1); // recursion - woo hoo!
|
||||
- }
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-// Scan the process table adding in CPU time and mem usage. Loop
|
||||
-// thru entire table as the entries aren't in order. Recurse at
|
||||
-// most 4 times to get additional child processes
|
||||
-//
|
||||
-static void add_child_totals(PROCINFO& pi, vector<PROCINFO>& piv, int pid, int rlvl) {
|
||||
- unsigned int i;
|
||||
-
|
||||
- if (rlvl > (MAX_DESCENDANT_LEVEL - 1)) {
|
||||
- return;
|
||||
- }
|
||||
- for (i=0; i<piv.size(); i++) {
|
||||
- PROCINFO& p = piv[i];
|
||||
- if (p.parentid == pid) {
|
||||
- pi.kernel_time += p.kernel_time;
|
||||
- pi.user_time += p.user_time;
|
||||
- pi.swap_size += p.swap_size;
|
||||
- pi.working_set_size += p.working_set_size;
|
||||
- pi.page_fault_count += p.page_fault_count;
|
||||
- p.is_boinc_app = true;
|
||||
-#ifdef _DEBUG
|
||||
- print_procinfo(p);
|
||||
-#endif
|
||||
- // look for child process of this one
|
||||
- add_child_totals(pi, piv, p.id, rlvl+1); // recursion - woo hoo!
|
||||
- }
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-#if 0
|
||||
-static void add_others(PROCINFO& pi, vector<PROCINFO>& piv) {
|
||||
- unsigned int i;
|
||||
-
|
||||
- memset(&pi, 0, sizeof(pi));
|
||||
- for (i=0; i<piv.size(); i++) {
|
||||
- PROCINFO& p = piv[i];
|
||||
- if (!p.is_boinc_app) {
|
||||
- pi.kernel_time += p.kernel_time;
|
||||
- pi.user_time += p.user_time;
|
||||
- pi.swap_size += p.swap_size;
|
||||
- pi.working_set_size += p.working_set_size;
|
||||
- pi.page_fault_count += p.page_fault_count;
|
||||
- p.is_boinc_app = true;
|
||||
-#ifdef _DEBUG
|
||||
- print_procinfo(p);
|
||||
-#endif
|
||||
- }
|
||||
- }
|
||||
-}
|
||||
-#endif
|
||||
-
|
||||
-static void sig_pipe(int signo)
|
||||
-{
|
||||
- exit(1);
|
||||
-}
|
||||
-
|
||||
-#ifdef _DEBUG
|
||||
-static void print_procinfo(PROCINFO& pinfo) {
|
||||
- unsigned long long rsize, vsize;
|
||||
-
|
||||
- rsize = (unsigned long long)pinfo.working_set_size;
|
||||
- vsize = (unsigned long long)pinfo.swap_size;
|
||||
- printf("pid=%d, ppid=%d, rm=%llu=", pinfo.id, pinfo.parentid, rsize);
|
||||
- vm_size_render(rsize);
|
||||
- printf("=, vm=%llu=", vsize);
|
||||
- vm_size_render(vsize);
|
||||
- printf(", pageins=%lu, usertime=%lf, systime=%lf\n", pinfo.page_fault_count, pinfo.user_time, pinfo.kernel_time);
|
||||
-}
|
||||
-
|
||||
-/*
|
||||
- * Render a memory size in units of B, K, M, or G, depending on the value.
|
||||
- *
|
||||
- * a_size is ULL, since there are places where VM sizes are capable of
|
||||
- * overflowing 32 bits, particularly when VM stats are multiplied by the
|
||||
- * pagesize.
|
||||
- */
|
||||
-static void vm_size_render(unsigned long long a_size)
|
||||
-{
|
||||
- if (a_size < 1024) {
|
||||
- /* 1023B. */
|
||||
- printf("%4lluB", a_size);
|
||||
- } else if (a_size < (1024ULL * 1024ULL)) {
|
||||
- /* K. */
|
||||
- if (a_size < 10ULL * 1024ULL) {
|
||||
- /* 9.99K */
|
||||
- printf("%1.2fK",
|
||||
- ((double)a_size) / 1024);
|
||||
- } else if (a_size < 100ULL * 1024ULL) {
|
||||
- /* 99.9K */
|
||||
- printf("%2.1fK",
|
||||
- ((double)a_size) / 1024);
|
||||
- } else {
|
||||
- /* 1023K */
|
||||
- printf("%4lluK",
|
||||
- a_size / 1024ULL);
|
||||
- }
|
||||
- } else if (a_size < (1024ULL * 1024ULL * 1024ULL)) {
|
||||
- /* M. */
|
||||
- if (a_size < 10ULL * 1024ULL * 1024ULL) {
|
||||
- /* 9.99M */
|
||||
- printf("%1.2fM",
|
||||
- ((double)a_size) / (1024 * 1024));
|
||||
- } else if (a_size < 100ULL * 1024ULL * 1024ULL) {
|
||||
- /* 99.9M */
|
||||
- printf("%2.1fM",
|
||||
- ((double)a_size) / (1024 * 1024));
|
||||
- } else {
|
||||
- /* 1023M */
|
||||
- printf("%4lluM",
|
||||
- a_size / (1024ULL * 1024ULL));
|
||||
- }
|
||||
- } else if (a_size < (1024ULL * 1024ULL * 1024ULL * 1024ULL)) {
|
||||
- /* G. */
|
||||
- if (a_size < 10ULL * 1024ULL * 1024ULL * 1024ULL) {
|
||||
- /* 9.99G. */
|
||||
- printf("%1.2fG",
|
||||
- ((double)a_size) / (1024 * 1024 * 1024));
|
||||
- } else if (a_size < 100ULL * 1024ULL * 1024ULL * 1024ULL) {
|
||||
- /* 99.9G. */
|
||||
- printf("%2.1fG",
|
||||
- ((double)a_size) / (1024 * 1024 * 1024));
|
||||
- } else {
|
||||
- /* 1023G */
|
||||
- printf("%4lluG",
|
||||
- a_size / (1024ULL * 1024ULL * 1024ULL));
|
||||
- }
|
||||
- } else if (a_size < (1024ULL * 1024ULL * 1024ULL * 1024ULL)) {
|
||||
- /* T. */
|
||||
- if (a_size < 10ULL * 1024ULL * 1024ULL * 1024ULL * 1024ULL) {
|
||||
- /* 9.99T. */
|
||||
- printf("%1.2fT",
|
||||
- ((double)a_size) /
|
||||
- (1024ULL * 1024ULL * 1024ULL * 1024ULL));
|
||||
- } else if (a_size < (100ULL * 1024ULL * 1024ULL * 1024ULL
|
||||
- * 1024ULL)) {
|
||||
- /* 99.9T. */
|
||||
- printf("%2.1fT",
|
||||
- ((double)a_size) /
|
||||
- (1024ULL * 1024ULL * 1024ULL * 1024ULL));
|
||||
- } else {
|
||||
- /* 1023T */
|
||||
- printf("%4lluT",
|
||||
- a_size /
|
||||
- (1024ULL * 1024ULL * 1024ULL * 1024ULL));
|
||||
- }
|
||||
- } else {
|
||||
- /* P. */
|
||||
- if (a_size < (10ULL * 1024ULL * 1024ULL * 1024ULL * 1024ULL
|
||||
- * 1024ULL)) {
|
||||
- /* 9.99P. */
|
||||
- printf("%1.2fP",
|
||||
- ((double)a_size) /
|
||||
- (1024ULL * 1024ULL * 1024ULL * 1024ULL
|
||||
- * 1024ULL));
|
||||
- } else if (a_size < (100ULL * 1024ULL * 1024ULL * 1024ULL
|
||||
- * 1024ULL)) {
|
||||
- /* 99.9P. */
|
||||
- printf("%2.1fP",
|
||||
- ((double)a_size) /
|
||||
- (1024ULL * 1024ULL * 1024ULL * 1024ULL
|
||||
- * 1024ULL));
|
||||
- } else {
|
||||
- /* 1023P */
|
||||
- printf("%4lluP",
|
||||
- a_size /
|
||||
- (1024ULL * 1024ULL * 1024ULL * 1024ULL
|
||||
- * 1024ULL));
|
||||
- }
|
||||
- }
|
||||
-}
|
||||
-#endif // _DEBUG
|
||||
diff -Naur boinc-6.2.18/lib/mac/dyld_gdb.h boinc-6.2.18-mp/lib/mac/dyld_gdb.h
|
||||
--- boinc-6.2.18/lib/mac/dyld_gdb.h 2008-08-25 22:27:58.000000000 +0200
|
||||
+++ boinc-6.2.18-mp/lib/mac/dyld_gdb.h 1970-01-01 01:00:00.000000000 +0100
|
||||
@@ -1,214 +0,0 @@
|
||||
-// Berkeley Open Infrastructure for Network Computing
|
||||
-// http://boinc.berkeley.edu
|
||||
-// Copyright (C) 2005 University of California
|
||||
-//
|
||||
-// This is free software; you can redistribute it and/or
|
||||
-// modify it under the terms of the GNU Lesser General Public
|
||||
-// License as published by the Free Software Foundation;
|
||||
-// either version 2.1 of the License, or (at your option) any later version.
|
||||
-//
|
||||
-// This software is distributed in the hope that it will be useful,
|
||||
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
-// See the GNU Lesser General Public License for more details.
|
||||
-//
|
||||
-// To view the GNU Lesser General Public License visit
|
||||
-// http://www.gnu.org/copyleft/lesser.html
|
||||
-// or write to the Free Software Foundation, Inc.,
|
||||
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
-/*
|
||||
- * dyld_gdb.h
|
||||
- *
|
||||
- */
|
||||
-
|
||||
-/* This is part of a backtrace generator for boinc project applications.
|
||||
-*
|
||||
-* Adapted from Apple Developer Technical Support Sample Code QCrashReport
|
||||
-*
|
||||
-* This code handles Mac OS X 10.3.x through 10.4.9. It may require some
|
||||
-* adjustment for future OS versions; see the discussion of _sigtramp and
|
||||
-* PowerPC Signal Stack Frames in file QBacktrace.c.
|
||||
-*
|
||||
-* For useful tips on using backtrace information, see Apple Tech Note 2123:
|
||||
-* http://developer.apple.com/technotes/tn2004/tn2123.html#SECNOSYMBOLS
|
||||
-*
|
||||
-* To convert addresses to correct symbols, use the atos command-line tool:
|
||||
-* atos -o path/to/executable/with/symbols address
|
||||
-* Note: if address 1a23 is hex, use 0x1a23.
|
||||
-*
|
||||
-* To demangle mangled C++ symbols, use the c++filt command-line tool.
|
||||
-* You may need to prefix C++ symbols with an additonal underscore before
|
||||
-* passing them to c++filt (so they begin with two underscore characters).
|
||||
-*
|
||||
-* A very useful shell script to add symbols to a crash dump can be found at:
|
||||
-* http://developer.apple.com/tools/xcode/symbolizingcrashdumps.html
|
||||
-* Pipe the output of the shell script through c++filt to demangle C++ symbols.
|
||||
-*/
|
||||
-
|
||||
-/*
|
||||
- * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
|
||||
- *
|
||||
- * @APPLE_LICENSE_HEADER_START@
|
||||
- *
|
||||
- * This file contains Original Code and/or Modifications of Original Code
|
||||
- * as defined in and that are subject to the Apple Public Source License
|
||||
- * Version 2.0 (the 'License'). You may not use this file except in
|
||||
- * compliance with the License. Please obtain a copy of the License at
|
||||
- * http://www.opensource.apple.com/apsl/ and read it before using this
|
||||
- * file.
|
||||
- *
|
||||
- * The Original Code and all software distributed under the License are
|
||||
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
- * Please see the License for the specific language governing rights and
|
||||
- * limitations under the License.
|
||||
- *
|
||||
- * @APPLE_LICENSE_HEADER_END@
|
||||
- */
|
||||
-#ifndef _DYLD_GDB_
|
||||
-#define _DYLD_GDB_
|
||||
-/*
|
||||
- * This file describes the interface between gdb and dyld created for
|
||||
- * MacOS X GM. Prior to MacOS X GM gdb used the dyld_debug interfaces
|
||||
- * described in <mach-o/dyld_debug.h>.
|
||||
- */
|
||||
-
|
||||
-
|
||||
-#ifdef __cplusplus
|
||||
-extern "C" {
|
||||
-#endif
|
||||
-
|
||||
-
|
||||
-#define OLD_GDB_DYLD_INTERFACE __ppc__ || __i386__
|
||||
-
|
||||
-#if OLD_GDB_DYLD_INTERFACE
|
||||
-/*
|
||||
- * gdb_dyld_version is the version of gdb interface that dyld is currently
|
||||
- * exporting. For the interface described in this header file gdb_dyld_version
|
||||
- * is 2. As the gdb/dyld interface changes this number will be incremented and
|
||||
- * comments will be added as to what are the are changes for the various
|
||||
- * versions.
|
||||
- */
|
||||
-extern unsigned int gdb_dyld_version;
|
||||
-
|
||||
-/*
|
||||
- * gdb_dyld_state_changed is the internal dyld routine called by dyld to notify
|
||||
- * gdb that the state of the data structures has changed. gdb is expected to
|
||||
- * put a break point on this routine and re-read the internal dyld data
|
||||
- * structures below when this break point is hit.
|
||||
- */
|
||||
-extern void gdb_dyld_state_changed(void);
|
||||
-
|
||||
-/*
|
||||
- * gdb looks directly at parts of two of dyld's internal data structures. The
|
||||
- * list of object file images and the list of library images. The parts of
|
||||
- * these structures that gdb looks at will not change unless the value of
|
||||
- * gdb_dyld_version changes. The size of these structures and the other fields
|
||||
- * that gdb does not look at may change.
|
||||
- *
|
||||
- * struct object_images {
|
||||
- * struct object_image images[NOBJECT_IMAGES];
|
||||
- * unsigned long nimages;
|
||||
- * struct object_images *next_images;
|
||||
- * ...
|
||||
- * };
|
||||
- *
|
||||
- * struct library_images {
|
||||
- * struct library_image images[NLIBRARY_IMAGES];
|
||||
- * unsigned long nimages;
|
||||
- * struct library_images *next_images;
|
||||
- * ...
|
||||
- * };
|
||||
- *
|
||||
- * Both the object_image structure and the library_image structure
|
||||
- * start with a structure containing the following fields:
|
||||
- *
|
||||
- * struct image {
|
||||
- * char *physical_name; physical image name (file name)
|
||||
- * unsigned long vmaddr_slide; the slide from the staticly linked address
|
||||
- * struct mach_header *mh; address of the mach header of the image
|
||||
- * unsigned long valid; TRUE if this is struct is valid
|
||||
- * char *name; image name for reporting errors
|
||||
- * ...
|
||||
- * };
|
||||
- *
|
||||
- * In gdb_dyld_version 1 the first field was "name". In gdb_dyld_version 2 the
|
||||
- * first field was changed to "physical_name" and a new fifth field "name" was
|
||||
- * added. These two fields are set to the same values except in the case of
|
||||
- * zero-link. In zero-link the NSLinkModule() option
|
||||
- * NSLINKMODULE_OPTION_TRAILING_PHYS_NAME is used and then the physical_name is
|
||||
- * the file name of the module zero-link loaded that is part of the logical
|
||||
- * image "name".
|
||||
- */
|
||||
-
|
||||
-/* object_images is the global object_images structure */
|
||||
-
|
||||
-/* the number of gdb_object_image structures present per bucket */
|
||||
-extern unsigned int gdb_nobject_images;
|
||||
-
|
||||
-/* the size of each gdb_object_image structure */
|
||||
-extern unsigned int gdb_object_image_size;
|
||||
-
|
||||
-/* library_images is the global library_images structure */
|
||||
-
|
||||
-/* the number of gdb_library_image structures present per bucket */
|
||||
-extern unsigned int gdb_nlibrary_images;
|
||||
-
|
||||
-/* the size of each gdb_library_image structure */
|
||||
-extern unsigned int gdb_library_image_size;
|
||||
-
|
||||
-#endif /* OLD_GDB_DYLD_INTERFACE */
|
||||
-
|
||||
-
|
||||
-/*
|
||||
- * Beginning in Mac OS X 10.4, there is a new mechanism for dyld to notify gdb and other about new images.
|
||||
- *
|
||||
- *
|
||||
- */
|
||||
-
|
||||
-enum dyld_image_mode { dyld_image_adding=0, dyld_image_removing=1 };
|
||||
-
|
||||
-struct dyld_image_info {
|
||||
- const struct mach_header* imageLoadAddress; /* base address image is mapped into */
|
||||
- const char* imageFilePath; /* path dyld used to load the image */
|
||||
- uintptr_t imageFileModDate; /* time_t of image file */
|
||||
- /* if stat().st_mtime of imageFilePath does not match imageFileModDate, */
|
||||
- /* then file has been modified since dyld loaded it */
|
||||
-};
|
||||
-
|
||||
-
|
||||
-typedef void (*dyld_image_notifier)(enum dyld_image_mode mode, uint32_t infoCount, const struct dyld_image_info info[]);
|
||||
-
|
||||
-/*
|
||||
- * gdb looks for the symbol "_dyld_all_image_infos" in dyld. It contains the fields below.
|
||||
- *
|
||||
- * For a snap shot of what images are currently loaded, the infoArray fields contain a pointer
|
||||
- * to an array of all images. If infoArray is NULL, it means it is being modified, come back later.
|
||||
- *
|
||||
- * To be notified of changes, gdb sets a break point on the notification field. The function
|
||||
- * it points to is called by dyld with an array of information about what images have been added
|
||||
- * (dyld_image_adding) or are about to be removed (dyld_image_removing).
|
||||
- *
|
||||
- * The notification is called after infoArray is updated. This means that if gdb attaches to a process
|
||||
- * and infoArray is NULL, gdb can set a break point on notification and let the proccess continue to
|
||||
- * run until the break point. Then gdb can inspect the full infoArray.
|
||||
- */
|
||||
- struct dyld_all_image_infos {
|
||||
- uint32_t version; /* == 1 in Mac OS X 10.4 */
|
||||
- uint32_t infoArrayCount;
|
||||
- const struct dyld_image_info* infoArray;
|
||||
- dyld_image_notifier notification;
|
||||
- bool processDetachedFromSharedRegion;
|
||||
-};
|
||||
-extern struct dyld_all_image_infos dyld_all_image_infos;
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-#ifdef __cplusplus
|
||||
-}
|
||||
-#endif
|
||||
-
|
||||
-#endif /* _DYLD_GDB_ */
|
@ -1,12 +0,0 @@
|
||||
diff -Naur boinc-6.2.18/client/hostinfo_unix.C boinc-6.2.18-mp/client/hostinfo_unix.C
|
||||
--- boinc-6.2.18/client/hostinfo_unix.C 2008-08-25 20:29:18.000000000 +0000
|
||||
+++ boinc-6.2.18-mp/client/hostinfo_unix.C 2008-11-03 17:50:19.000000000 +0000
|
||||
@@ -248,7 +248,7 @@
|
||||
// we need to find the right ac adapter first
|
||||
DirScanner dir("/proc/acpi/ac_adapter/");
|
||||
while (dir.scan(ac_name)) {
|
||||
- if ((ac_name.c_str()==".")||(ac_name.c_str()=="..")) continue;
|
||||
+ if ((strcmp(ac_name.c_str(),".")==0)||(strcmp(ac_name.c_str(),"..")==0)) continue;
|
||||
|
||||
// newer ACPI versions use "state" as filename
|
||||
sprintf(ac_state, "/proc/acpi/ac_adapter/%s/state", ac_name.c_str());
|
@ -1,12 +0,0 @@
|
||||
diff -Naur boinc-6.2.18/win_build/installerv2/redist/Windows/src/boinccas/password.cpp boinc-6.2.18-mp/win_build/installerv2/redist/Windows/src/boinccas/password.cpp
|
||||
--- boinc-6.2.18/win_build/installerv2/redist/Windows/src/boinccas/password.cpp 2008-08-25 22:28:08.000000000 +0200
|
||||
+++ boinc-6.2.18-mp/win_build/installerv2/redist/Windows/src/boinccas/password.cpp 2008-12-23 17:36:53.645629000 +0100
|
||||
@@ -105,7 +105,7 @@
|
||||
//Clean up memory.
|
||||
if (pRandomBuf)
|
||||
{
|
||||
- delete pRandomBuf;
|
||||
+ delete [] pRandomBuf;
|
||||
pRandomBuf = NULL;
|
||||
}
|
||||
|
@ -1,81 +0,0 @@
|
||||
diff -Naur boinc-6.2.18/checkin_notes boinc-6.2.18-mp/checkin_notes
|
||||
--- boinc-6.2.18/checkin_notes 2008-08-25 16:29:18.000000000 -0400
|
||||
+++ boinc-6.2.18-mp/checkin_notes 2009-01-14 14:05:04.000000000 -0500
|
||||
@@ -1,3 +1,13 @@
|
||||
+David Jan 12 2009
|
||||
+ - lib: check return values of RSA_*() functions.
|
||||
+ Also fix a memory leak, missing RSA_free().
|
||||
+ Fixes #823.
|
||||
+
|
||||
+ lib/
|
||||
+ crypt.cpp
|
||||
+ error_numbers.h
|
||||
+ str_util.cpp
|
||||
+
|
||||
David Jan 1 2008
|
||||
- fixed bug in upgrade
|
||||
|
||||
diff -Naur boinc-6.2.18/lib/crypt.C boinc-6.2.18-mp/lib/crypt.C
|
||||
--- boinc-6.2.18/lib/crypt.C 2008-08-25 16:27:59.000000000 -0400
|
||||
+++ boinc-6.2.18-mp/lib/crypt.C 2009-01-14 14:08:24.000000000 -0500
|
||||
@@ -210,7 +210,7 @@
|
||||
// The output block must be decrypted in its entirety.
|
||||
//
|
||||
int encrypt_private(R_RSA_PRIVATE_KEY& key, DATA_BLOCK& in, DATA_BLOCK& out) {
|
||||
- int n, modulus_len;
|
||||
+ int n, modulus_len, retval;
|
||||
|
||||
modulus_len = (key.bits+7)/8;
|
||||
n = in.len;
|
||||
@@ -219,17 +219,27 @@
|
||||
}
|
||||
RSA* rp = RSA_new();
|
||||
private_to_openssl(key, rp);
|
||||
- RSA_private_encrypt(n, in.data, out.data, rp, RSA_PKCS1_PADDING);
|
||||
+ retval = RSA_private_encrypt(n, in.data, out.data, rp, RSA_PKCS1_PADDING);
|
||||
+ if (retval < 0) {
|
||||
+ RSA_free(rp);
|
||||
+ return ERR_CRYPTO;
|
||||
+ }
|
||||
out.len = RSA_size(rp);
|
||||
RSA_free(rp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int decrypt_public(R_RSA_PUBLIC_KEY& key, DATA_BLOCK& in, DATA_BLOCK& out) {
|
||||
+ int retval;
|
||||
RSA* rp = RSA_new();
|
||||
public_to_openssl(key, rp);
|
||||
- RSA_public_decrypt(in.len, in.data, out.data, rp, RSA_PKCS1_PADDING);
|
||||
+ retval = RSA_public_decrypt(in.len, in.data, out.data, rp, RSA_PKCS1_PADDING);
|
||||
+ if (retval < 0) {
|
||||
+ RSA_free(rp);
|
||||
+ return ERR_CRYPTO;
|
||||
+ }
|
||||
out.len = RSA_size(rp);
|
||||
+ RSA_free(rp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
diff -Naur boinc-6.2.18/lib/error_numbers.h boinc-6.2.18-mp/lib/error_numbers.h
|
||||
--- boinc-6.2.18/lib/error_numbers.h 2008-08-25 16:27:59.000000000 -0400
|
||||
+++ boinc-6.2.18-mp/lib/error_numbers.h 2009-01-14 14:12:59.000000000 -0500
|
||||
@@ -187,6 +187,7 @@
|
||||
#define ERR_CHILD_FAILED -228
|
||||
#define ERR_SYMLINK -229
|
||||
#define ERR_DB_CONN_LOST -230
|
||||
+#define ERR_CRYPTO -231
|
||||
|
||||
// PLEASE: add a text description of your error to
|
||||
// the text description function boincerror() in str_util.C.
|
||||
diff -Naur boinc-6.2.18/lib/str_util.C boinc-6.2.18-mp/lib/str_util.C
|
||||
--- boinc-6.2.18/lib/str_util.C 2008-08-25 16:27:59.000000000 -0400
|
||||
+++ boinc-6.2.18-mp/lib/str_util.C 2009-01-14 14:13:57.000000000 -0500
|
||||
@@ -735,6 +735,7 @@
|
||||
case ERR_BAD_FILENAME: return "file name is empty or has '..'";
|
||||
case ERR_TOO_MANY_EXITS: return "application exited too many times";
|
||||
case ERR_RMDIR: return "rmdir() failed";
|
||||
+ case ERR_CRYPTO: return "encryption error";
|
||||
case 404: return "HTTP file not found";
|
||||
case 407: return "HTTP proxy authentication failure";
|
||||
case 416: return "HTTP range request error";
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8a58f7ae15461724ac02934f03da58b63a9c24edb6d8999c1691256b2cde04c5
|
||||
size 28771307
|
@ -1,66 +1,15 @@
|
||||
--- locale/client/Makefile.am.orig 2008-08-25 22:38:54.000000000 +0200
|
||||
+++ locale/client/Makefile.am 2008-08-25 22:38:22.000000000 +0200
|
||||
@@ -0,0 +1,53 @@
|
||||
+## -*- mode: makefile; tab-width: 4 -*-
|
||||
+
|
||||
+include $(top_srcdir)/Makefile.incl
|
||||
+
|
||||
+datadir = $(prefix)/share/locale
|
||||
+
|
||||
+locale_dirs = \
|
||||
+ af_ZA \
|
||||
+ ar \
|
||||
+ be \
|
||||
+ bg \
|
||||
+ ca \
|
||||
+ cs \
|
||||
+ cs_CZ \
|
||||
+ da \
|
||||
+ de \
|
||||
+ el \
|
||||
+ en_US \
|
||||
+ es \
|
||||
+ eu \
|
||||
+ fi \
|
||||
+ fr \
|
||||
+ hr \
|
||||
+ hu \
|
||||
+ it \
|
||||
+ ja \
|
||||
+ ko_KR \
|
||||
+ lt \
|
||||
+ lv \
|
||||
+ nb \
|
||||
+ nl \
|
||||
+ pl \
|
||||
+ pt \
|
||||
+ pt_BR \
|
||||
+ ro \
|
||||
+ ru \
|
||||
+ sk \
|
||||
+ sl \
|
||||
+ sv_SE \
|
||||
+ tr \
|
||||
+ uk \
|
||||
+ zh_CN \
|
||||
+ zh_TW
|
||||
+
|
||||
+install-exec-hook:
|
||||
+ mydir=$(DESTDIR)$(datadir) ;\
|
||||
+ for ldir in $(locale_dirs) ; do \
|
||||
diff -Naur boinc_core_release_6_4_5/locale/client/Makefile.am boinc_core_release_6_4_5p/locale/client/Makefile.am
|
||||
--- boinc_core_release_6_4_5/locale/client/Makefile.am 2009-02-07 10:14:49.000000000 +0100
|
||||
+++ boinc_core_release_6_4_5p/locale/client/Makefile.am 2009-02-10 22:53:18.000000000 +0100
|
||||
@@ -45,9 +45,9 @@
|
||||
install-exec-hook:
|
||||
mydir=$(DESTDIR)$(datadir) ;\
|
||||
for ldir in $(locale_dirs) ; do \
|
||||
- $(INSTALL) -d $$mydir/$$ldir ; \
|
||||
+ $(INSTALL) -d $$mydir/$$ldir/LC_MESSAGES ; \
|
||||
+ if [ -f "$$ldir/BOINC Manager.mo" ] ; then \
|
||||
+ $(INSTALL) "$$ldir/BOINC Manager.mo" $$mydir/$$ldir/LC_MESSAGES/"BOINC Manager.mo" ; \
|
||||
+ fi ;\
|
||||
+ done
|
||||
+
|
||||
--- configure.ac.orig 2008-08-25 22:29:18.000000000 +0200
|
||||
+++ configure.ac 2008-08-25 23:19:42.000000000 +0200
|
||||
@@ -670,6 +670,7 @@
|
||||
doc/Makefile
|
||||
doc/manpages/Makefile
|
||||
lib/Makefile
|
||||
+ locale/client/Makefile
|
||||
Makefile
|
||||
py/Boinc/boinc_path_config.py:py/Boinc/boinc_path_config.py.in
|
||||
py/Boinc/Makefile
|
||||
if [ -f "$$ldir/BOINC Manager.mo" ] ; then \
|
||||
- $(INSTALL) "$$ldir/BOINC Manager.mo" "$$mydir/$$ldir/BOINC Manager.mo" ; \
|
||||
+ $(INSTALL) "$$ldir/BOINC Manager.mo" "$$mydir/$$ldir/LC_MESSAGES/BOINC-Manager.mo" ; \
|
||||
fi ;\
|
||||
done
|
||||
|
||||
|
64
boinc-bnc_465676.patch
Normal file
64
boinc-bnc_465676.patch
Normal file
@ -0,0 +1,64 @@
|
||||
diff -Naur boinc_core_release_6_4_5/lib/crypt.cpp boinc_core_release_6_4_5p/lib/crypt.cpp
|
||||
--- boinc_core_release_6_4_5/lib/crypt.cpp 2009-02-07 10:15:12.000000000 +0100
|
||||
+++ boinc_core_release_6_4_5p/lib/crypt.cpp 2009-02-09 01:12:00.000000000 +0100
|
||||
@@ -243,7 +243,7 @@
|
||||
// The output block must be decrypted in its entirety.
|
||||
//
|
||||
int encrypt_private(R_RSA_PRIVATE_KEY& key, DATA_BLOCK& in, DATA_BLOCK& out) {
|
||||
- int n, modulus_len;
|
||||
+ int n, modulus_len, retval;
|
||||
|
||||
modulus_len = (key.bits+7)/8;
|
||||
n = in.len;
|
||||
@@ -253,15 +253,25 @@
|
||||
RSA* rp = RSA_new();
|
||||
private_to_openssl(key, rp);
|
||||
RSA_private_encrypt(n, in.data, out.data, rp, RSA_PKCS1_PADDING);
|
||||
+ retval = RSA_private_encrypt(n, in.data, out.data, rp, RSA_PKCS1_PADDING);
|
||||
+ if (retval < 0) {
|
||||
+ RSA_free(rp);
|
||||
+ return ERR_CRYPTO;
|
||||
+ }
|
||||
out.len = RSA_size(rp);
|
||||
RSA_free(rp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int decrypt_public(R_RSA_PUBLIC_KEY& key, DATA_BLOCK& in, DATA_BLOCK& out) {
|
||||
+ int retval;
|
||||
RSA* rp = RSA_new();
|
||||
public_to_openssl(key, rp);
|
||||
- RSA_public_decrypt(in.len, in.data, out.data, rp, RSA_PKCS1_PADDING);
|
||||
+ retval = RSA_public_decrypt(in.len, in.data, out.data, rp, RSA_PKCS1_PADDING);
|
||||
+ if (retval < 0) {
|
||||
+ RSA_free(rp);
|
||||
+ return ERR_CRYPTO;
|
||||
+ }
|
||||
out.len = RSA_size(rp);
|
||||
return 0;
|
||||
}
|
||||
diff -Naur boinc_core_release_6_4_5/lib/error_numbers.h boinc_core_release_6_4_5p/lib/error_numbers.h
|
||||
--- boinc_core_release_6_4_5/lib/error_numbers.h 2009-02-07 10:15:12.000000000 +0100
|
||||
+++ boinc_core_release_6_4_5p/lib/error_numbers.h 2009-02-09 01:12:58.000000000 +0100
|
||||
@@ -185,7 +185,7 @@
|
||||
#define ERR_RMDIR -227
|
||||
#define ERR_SYMLINK -229
|
||||
#define ERR_DB_CONN_LOST -230
|
||||
-
|
||||
+#define ERR_CRYPTO -231
|
||||
// PLEASE: add a text description of your error to
|
||||
// the text description function boincerror() in str_util.C.
|
||||
|
||||
diff -Naur boinc_core_release_6_4_5/lib/str_util.cpp boinc_core_release_6_4_5p/lib/str_util.cpp
|
||||
--- boinc_core_release_6_4_5/lib/str_util.cpp 2009-02-07 10:15:12.000000000 +0100
|
||||
+++ boinc_core_release_6_4_5p/lib/str_util.cpp 2009-02-09 01:14:02.000000000 +0100
|
||||
@@ -735,7 +735,8 @@
|
||||
case ERR_RMDIR: return "rmdir() failed";
|
||||
case ERR_SYMLINK: return "symlink() failed";
|
||||
case ERR_DB_CONN_LOST: return "DB connection lost during enumeration";
|
||||
- case 404: return "HTTP file not found";
|
||||
+ case ERR_CRYPTO: return "encryption error";
|
||||
+ case 404: return "HTTP file not found";
|
||||
case 407: return "HTTP proxy authentication failure";
|
||||
case 416: return "HTTP range request error";
|
||||
case 500: return "HTTP internal server error";
|
12
boinc-ca_cert_deactivate.patch
Normal file
12
boinc-ca_cert_deactivate.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -Naur boinc_core_release_6_6_1/client/Makefile.am boinc_core_release_6_6_1p/client/Makefile.am
|
||||
--- boinc_core_release_6_6_1/client/Makefile.am 2009-01-18 23:51:56.000000000 +0100
|
||||
+++ boinc_core_release_6_6_1p/client/Makefile.am 2009-01-22 22:10:38.000000000 +0100
|
||||
@@ -67,7 +67,7 @@
|
||||
boinc_client_LDADD = $(LIBBOINC) $(PTHREAD_LIBS)
|
||||
|
||||
boinc_clientdir = $(bindir)
|
||||
-boinc_client_DATA = ../curl/ca-bundle.crt
|
||||
+#boinc_client_DATA = ../curl/ca-bundle.crt
|
||||
|
||||
switcher_SOURCES = switcher.cpp
|
||||
|
11
boinc-client-hostinfo.patch
Normal file
11
boinc-client-hostinfo.patch
Normal file
@ -0,0 +1,11 @@
|
||||
diff -uNrp boinc_core_release_6_4_5/client/hostinfo_unix.cpp boinc_core_release_6_4_5p/client/hostinfo_unix.cpp
|
||||
--- boinc_core_release_6_4_5/client/hostinfo_unix.cpp 2009-02-07 10:14:39.000000000 +0100
|
||||
+++ boinc_core_release_6_4_5p/client/hostinfo_unix.cpp 2009-03-16 19:54:17.000000000 +0100
|
||||
@@ -293,6 +293,7 @@ bool HOST_INFO::host_is_running_on_batte
|
||||
method = NoBattery;
|
||||
// fall through
|
||||
case NoBattery:
|
||||
+ default:
|
||||
// we have no way to determine if we're on batteries,
|
||||
// so we say we aren't
|
||||
return false;
|
6
boinc-client-rpmlintrc
Normal file
6
boinc-client-rpmlintrc
Normal file
@ -0,0 +1,6 @@
|
||||
# This line is mandatory to access the configuration functions
|
||||
from Config import *
|
||||
|
||||
addFilter("incoherent-init-script-name")
|
||||
addFilter("invalid-lc-messages-dir")
|
||||
addFilter("file-not-in-%lang")
|
12
boinc-client-wxWindowListNode.patch
Normal file
12
boinc-client-wxWindowListNode.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -Naur boinc_core_release_6_4_5/clientgui/DlgAdvPreferences.cpp boinc_core_release_6_4_5p/clientgui/DlgAdvPreferences.cpp
|
||||
--- boinc_core_release_6_4_5/clientgui/DlgAdvPreferences.cpp 2009-02-07 10:13:29.000000000 +0100
|
||||
+++ boinc_core_release_6_4_5p/clientgui/DlgAdvPreferences.cpp 2009-02-25 18:47:40.000000000 +0100
|
||||
@@ -486,7 +486,7 @@
|
||||
}
|
||||
//all text ctrls in proc special time panel
|
||||
wxWindowList children = m_panelProcSpecialTimes->GetChildren();
|
||||
- wxWindowListNode* node = children.GetFirst();
|
||||
+ wxWindowList::compatibility_iterator node = children.GetFirst();
|
||||
while(node) {
|
||||
if(node->GetData()->IsKindOf(CLASSINFO(wxTextCtrl))) {
|
||||
wxTextCtrl* txt = wxDynamicCast(node->GetData(),wxTextCtrl);
|
@ -1,31 +1,103 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 14 14:39:47 EST 2009 - mauro@suse.de
|
||||
Fri Mar 27 11:57:43 CET 2009 - saigkill@opensuse.org
|
||||
|
||||
- removed boinctray depency
|
||||
-------------------------------------------------------------------
|
||||
Sat Mar 14 18:41:07 CET 2009 - saigkill@opensuse.org
|
||||
|
||||
- added rpmlintrc
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 25 15:06:27 CET 2009 - pth@suse.de
|
||||
|
||||
- Use wxWindowList::compatibility_iterator instead of wxWindowListNode*
|
||||
as the latter is not defined when wxWindows is compiled to use
|
||||
the STL.
|
||||
- Include standard compiler flags.
|
||||
- Reformat description
|
||||
- Correct spelling boinc-client-README.SuSE
|
||||
------------------------------------------------------------------
|
||||
Thu Feb 12 11:10:00 CET 2009 - saigkill@opensuse.org
|
||||
|
||||
- added wxstring_conversion.patch (fix Bug #774 Berkeley Bug)
|
||||
------------------------------------------------------------------
|
||||
Wed Feb 11 17:41:00 CET 2009 - saigkill@opensuse.org
|
||||
|
||||
- first stable Version
|
||||
- fixed boincmgr to copy gui_rpc_auth.cfg to every /home
|
||||
------------------------------------------------------------------
|
||||
Wed Feb 11 11:48:44 CET 2009 - saigkill@opensuse.org
|
||||
|
||||
- Export %%changelog to boinc-client.changes
|
||||
------------------------------------------------------------------
|
||||
Tue Feb 10 12:00:00 CET 2009 - saigkill@opensuse.org
|
||||
|
||||
- changed $BOINCEXE from boinc_client to boinc
|
||||
------------------------------------------------------------------
|
||||
Wed Feb 04 12:00:00 CET 2009 - saigkill@opensuse.org
|
||||
|
||||
- Fixed OpenSUSE Bugzilla Bug #468414
|
||||
------------------------------------------------------------------
|
||||
Tue Feb 03 12:00:00 CET 2009 - saigkill@opensuse.org
|
||||
|
||||
- updated to Version 6.4
|
||||
- deleted bnc_465676 (was fixed in sourcecode by boinc-team)
|
||||
------------------------------------------------------------------
|
||||
Mon Feb 02 12:00:00 CET 2009 - dl9pf@gmx.de
|
||||
|
||||
- tweaked -doc package
|
||||
------------------------------------------------------------------
|
||||
Mon Feb 02 12:00:00 CET 2009 - saigkill@opensuse.org
|
||||
|
||||
- added README.SuSE to %%doc
|
||||
- added own Patches:
|
||||
+ boinc-docbook2x (fix using docbook2x)
|
||||
+ boinc-LC_MESSAGES (fix handling .mo LC Messages)
|
||||
+ boinc-rcscript (fix using init.d instead of rc.d)
|
||||
(fix BOINC User root)
|
||||
+ boinc-sysconfig (fix installing conf in /etc/boinc-client.conf)
|
||||
(fix init File as boinc)
|
||||
+ ca_cert_deactivate (fix deactivate using of ca_cert)
|
||||
+ fs_start_included (fix add $fs_network to init.d Script)
|
||||
------------------------------------------------------------------
|
||||
Sun Feb 01 12:00:00 CET 2009 - saigkill@opensuse.org
|
||||
|
||||
- added fillup Macro to use sysconfig
|
||||
- use sysconfig.boinc as source from fillup macro
|
||||
------------------------------------------------------------------
|
||||
Sat Jan 31 12:00:00 CET 2009 - saigkill@opensuse.org
|
||||
|
||||
- deleted bnc_431510 not relevant (for Mac).
|
||||
- deleted bnc_439037 not relevant
|
||||
- deleted bnc_442904 for Win. In my Package no Win/Mac Source
|
||||
- added bnc_465676.patch fix CVE-ID: CVE-2009-0126
|
||||
- branched for Factory:Contrib
|
||||
------------------------------------------------------------------
|
||||
Fri Jan 23 12:00:00 CET 2009 - saigkill@opensuse.org
|
||||
|
||||
- deleted mac/mac_build/win Folders from the Sourcecode
|
||||
------------------------------------------------------------------
|
||||
Wed Jan 14 12:00:00 CET 2009 - mauro@suse.de
|
||||
|
||||
- Added bnc_465676.patch to fix bnc#465676.
|
||||
+ Fixes CVE-2008-5077
|
||||
+ check return values of RSA_*() functions.
|
||||
+ fix a memory leak, missing RSA_free().
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 23 20:24:44 CET 2008 - mauro@suse.de
|
||||
------------------------------------------------------------------
|
||||
Tue Dec 23 12:00:00 CET 2008 - mauro@suse.de
|
||||
|
||||
- Added bnc_442904.patch to fix bnc#442904.
|
||||
+ Use the proper delete.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 3 17:57:24 UTC 2008 - mauro@suse.de
|
||||
------------------------------------------------------------------
|
||||
Mon Nov 03 12:00:00 CET 2008 - mauro@suse.de
|
||||
|
||||
- Add bnc_439037.patch to fix bnc#439037. We now use strcmp
|
||||
instead of the original ==.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Oct 4 05:44:49 CEST 2008 - mauro@suse.de
|
||||
------------------------------------------------------------------
|
||||
Fri Oct 03 12:00:00 CET 2008 - mauro@suse.de
|
||||
|
||||
- Add bnc-431510.patch to fix bnc#431510.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 8 22:15:35 CEST 2008 - mauro@suse.de
|
||||
------------------------------------------------------------------
|
||||
Mon Sep 08 12:00:00 CET 2008 - mauro@suse.de
|
||||
|
||||
- initial package for SuSE. boinc 6.2.18 (based on the enzokiel's
|
||||
opensuse version).
|
||||
|
||||
(opensuse version).
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# spec file for package boinc-client (Version 6.2.18)
|
||||
# spec file for package boinc-client (Version 6.4.5)
|
||||
#
|
||||
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
@ -15,35 +15,40 @@
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
# norootforbuild
|
||||
|
||||
|
||||
Name: boinc-client
|
||||
Summary: The Berkeley Open Infrastructure for Network Computing (BOINC)
|
||||
Version: 6.2.18
|
||||
Release: 5
|
||||
Version: 6.4.5
|
||||
Release: 1
|
||||
License: LGPL v2.1 only
|
||||
Url: http://boinc.berkeley.edu/
|
||||
Source0: boinc-%{version}.tar.bz2
|
||||
Source0: boinc_core_release_6_4_5.tar.bz2
|
||||
Source1: boinc-icons.tar.bz2
|
||||
Source2: boinc-logrotate
|
||||
Source3: boinc-gui.desktop
|
||||
Source4: boincmgr
|
||||
Source5: sysconfig.boinc
|
||||
Source100: boinc-client-rpmlintrc
|
||||
Patch0: boinc-docbook2x.patch
|
||||
Patch1: boinc-LC_MESSAGES.patch
|
||||
Patch2: boinc-rcscript.patch
|
||||
Patch1: boinc-rcscript.patch
|
||||
Patch2: boinc-fs_start_included.patch
|
||||
Patch3: boinc-sysconfig.patch
|
||||
Patch4: boinc-subdirs.patch
|
||||
Patch5: bnc-431510.patch
|
||||
Patch6: bnc_439037.patch
|
||||
Patch7: bnc_442904.patch
|
||||
Patch8: bnc_465676.patch
|
||||
License: LGPL v2.1 only
|
||||
Patch4: boinc-ca_cert_deactivate.patch
|
||||
Patch5: boinc-LC_MESSAGES.patch
|
||||
Patch6: boinc-icon_old.patch
|
||||
Patch7: boinc-bnc_465676.patch
|
||||
Patch8: boinc-client-wxWindowListNode.patch
|
||||
Patch9: boinc-client-hostinfo.patch
|
||||
Group: Productivity/Clustering/Computing
|
||||
BuildRequires: libcurl-devel >= 7.15.2 python-mysql update-desktop-files
|
||||
BuildRequires: Mesa-devel freeglut-devel libopenssl-devel
|
||||
BuildRequires: gcc-c++ gettext-runtime mysql-devel wxGTK-devel >= 2.8.7
|
||||
BuildRequires: docbook2x libjpeg-devel libxslt xorg-x11-libXmu-devel
|
||||
Requires: logrotate
|
||||
BuildRequires: autoconf automake libtool m4 pkg-config
|
||||
PreReq: %insserv_prereq %fillup_prereq
|
||||
Requires: logrotate cron
|
||||
Requires: boinc-doc = %{version}-%{release}
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
@ -59,31 +64,6 @@ many other distributed computing projects.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
University of California, Berkeley
|
||||
Dr. David P. Anderson <davea@ssl.berkeley.edu>
|
||||
Rom Walton <rwalton@ssl.berkeley.edu>
|
||||
Charlie Fenton
|
||||
|
||||
%package -n boinc-gui-lang
|
||||
License: LGPL v2.1 only
|
||||
Summary: The Berkeley Open Infrastructure for Network Computing (BOINC)
|
||||
Group: Productivity/Clustering/Computing
|
||||
|
||||
%description -n boinc-gui-lang
|
||||
The Berkeley Open Infrastructure for Network Computing (BOINC) is an
|
||||
open-source software platform which supports distributed computing,
|
||||
primarily in the form of "volunteer" computing and "desktop Grid"
|
||||
computing. It is well suited for problems which are often described as
|
||||
"trivially parallel".
|
||||
|
||||
BOINC is the underlying software used by projects such as SETI@home,
|
||||
Einstein@Home, ClimatePrediciton.net, the World Community Grid, and
|
||||
many other distributed computing projects.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
University of California, Berkeley
|
||||
@ -95,7 +75,9 @@ Authors:
|
||||
License: LGPL v2.1 only
|
||||
Summary: The Berkeley Open Infrastructure for Network Computing (BOINC)
|
||||
Group: Productivity/Clustering/Computing
|
||||
Requires: boinc-client = %{version}-%{release}, boinc-gui-lang = %{version}-%{release}
|
||||
Requires: boinc-client = %{version}-%{release}
|
||||
Requires: boinc-doc = %{version}-%{release}
|
||||
Requires: boinc-gui-lang = %{version}-%{release}
|
||||
|
||||
%description -n boinc-gui
|
||||
The Berkeley Open Infrastructure for Network Computing (BOINC) is an
|
||||
@ -121,7 +103,6 @@ Authors:
|
||||
License: LGPL v2.1 only
|
||||
Summary: The Berkeley Open Infrastructure for Network Computing (BOINC)
|
||||
Group: Productivity/Clustering/Computing
|
||||
Provides: boinc-client-devel = %{version}
|
||||
Requires: boinc-client = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
@ -137,6 +118,60 @@ many other distributed computing projects.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
University of California, Berkeley
|
||||
Dr. David P. Anderson <davea@ssl.berkeley.edu>
|
||||
Rom Walton <rwalton@ssl.berkeley.edu>
|
||||
Charlie Fenton
|
||||
|
||||
%package -n boinc-doc
|
||||
License: LGPL v2.1 only
|
||||
Summary: The Berkeley Open Infrastructure for Network Computing (BOINC)
|
||||
Group: Productivity/Clustering/Computing
|
||||
Requires: boinc-client = %{version}-%{release}
|
||||
Requires: boinc-gui = %{version}-%{release}
|
||||
|
||||
%description -n boinc-doc
|
||||
The Berkeley Open Infrastructure for Network Computing (BOINC) is an
|
||||
open-source software platform which supports distributed computing,
|
||||
primarily in the form of "volunteer" computing and "desktop Grid"
|
||||
computing. It is well suited for problems which are often described as
|
||||
"trivially parallel".
|
||||
|
||||
BOINC is the underlying software used by projects such as SETI@home,
|
||||
Einstein@Home, ClimatePrediciton.net, the World Community Grid, and
|
||||
many other distributed computing projects.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
University of California, Berkeley
|
||||
Dr. David P. Anderson <davea@ssl.berkeley.edu>
|
||||
Rom Walton <rwalton@ssl.berkeley.edu>
|
||||
Charlie Fenton
|
||||
|
||||
%package -n boinc-gui-lang
|
||||
License: LGPL v2.1 only
|
||||
Summary: The Berkeley Open Infrastructure for Network Computing (BOINC)
|
||||
Group: Productivity/Clustering/Computing
|
||||
Requires: boinc-client = %{version}-%{release}
|
||||
Requires: boinc-gui = %{version}-%{release}
|
||||
|
||||
%description -n boinc-gui-lang
|
||||
The Berkeley Open Infrastructure for Network Computing (BOINC) is an
|
||||
open-source software platform which supports distributed computing,
|
||||
primarily in the form of "volunteer" computing and "desktop Grid"
|
||||
computing. It is well suited for problems which are often described as
|
||||
"trivially parallel".
|
||||
|
||||
BOINC is the underlying software used by projects such as SETI@home,
|
||||
Einstein@Home, ClimatePrediciton.net, the World Community Grid, and
|
||||
many other distributed computing projects.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
University of California, Berkeley
|
||||
@ -145,89 +180,88 @@ Authors:
|
||||
Charlie Fenton
|
||||
|
||||
%prep
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
mkdir $RPM_BUILD_ROOT
|
||||
%setup -q -n boinc-%{version}
|
||||
%patch0
|
||||
%patch1
|
||||
%patch2
|
||||
%patch3
|
||||
%patch4
|
||||
%setup -q -n boinc_core_release_6_4_5
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
tar -xvjf %{S:1}
|
||||
|
||||
%build
|
||||
export RPM_OPT_FLAGS="-O3 -funroll-loops -fforce-addr -ffast-math"
|
||||
export CFLAGS="$RPM_OPT_FLAGS"
|
||||
export CFLAGS="%{optflags} -fno-strict-aliasing"
|
||||
export CXXFLAGS="%{optflags} -fno-strict-aliasing"
|
||||
./_autosetup
|
||||
./configure \
|
||||
--prefix=%{_prefix} \
|
||||
%configure --prefix=%{_prefix} \
|
||||
--libdir=%{_libdir} \
|
||||
--mandir=%{_mandir} \
|
||||
--disable-server \
|
||||
--disable-static \
|
||||
--enable-client \
|
||||
--enable-unicode
|
||||
make
|
||||
make %{?jobs:-j %jobs}
|
||||
|
||||
%install
|
||||
make DESTDIR=$RPM_BUILD_ROOT install
|
||||
%makeinstall
|
||||
# create symlink for boinc_client
|
||||
ln -s %{_bindir}/boinc_client $RPM_BUILD_ROOT%{_bindir}/boinc
|
||||
# remove /etc/sysconfig/boinc-client
|
||||
rm -f %{buildroot}%{_sysconfdir}/sysconfig/boinc
|
||||
# install logrotate and create symlink to /etc/int.d/boinc-client
|
||||
install -d -m755 $RPM_BUILD_ROOT%{_sbindir}
|
||||
ln -s %{_sysconfdir}/init.d/boinc-client $RPM_BUILD_ROOT%{_sbindir}/rcboinc-client
|
||||
install -D -m644 %{S:2} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/boinc
|
||||
# istall desktop-file and icons
|
||||
install -D -m644 %{S:3} $RPM_BUILD_ROOT%{_datadir}/applications/boinc-gui.desktop
|
||||
ln -s %{_sysconfdir}/init.d/boinc $RPM_BUILD_ROOT%{_sbindir}/rcboinc-client
|
||||
install -D -m644 %{S:2} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/boinc-client
|
||||
# install desktop-file and icons
|
||||
%suse_update_desktop_file -i boinc-gui Utility
|
||||
install -D -m644 boinc-gui-128.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/128x128/apps/boinc-gui.png
|
||||
install -D -m644 boinc-gui-64.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/64x64/apps/boinc-gui.png
|
||||
install -D -m644 boinc-gui-48.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/boinc-gui.png
|
||||
install -D -m644 boinc-gui-32.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps/boinc-gui.png
|
||||
install -D -m644 boinc-gui-22.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/22x22/apps/boinc-gui.png
|
||||
install -D -m644 boinc-gui-16.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/apps/boinc-gui.png
|
||||
#removing sysconfig entry
|
||||
rm $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/boinc-client
|
||||
# install boincmgr
|
||||
install -D -m755 %{S:4} $RPM_BUILD_ROOT%{_bindir}/boincmgr
|
||||
# install template for sysconfig
|
||||
install -D -m644 %{S:5} %{buildroot}/var/adm/fillup-templates/sysconfig.boinc
|
||||
# remove static Libs
|
||||
rm %{buildroot}%{_libdir}/*.a
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%pre
|
||||
|
||||
%post
|
||||
# Macro to use an sysconfig File
|
||||
%{fillup_and_insserv -y boinc}
|
||||
|
||||
%preun
|
||||
%stop_on_removal boinc-client
|
||||
%stop_on_removal boinc
|
||||
|
||||
%postun
|
||||
%restart_on_update boinc-client
|
||||
%restart_on_update boinc
|
||||
%insserv_cleanup
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/boinc
|
||||
%{_bindir}/boinc_client
|
||||
%{_bindir}/boinc_cmd
|
||||
%{_bindir}/ca-bundle.crt
|
||||
%{_bindir}/crypt_prog
|
||||
%{_bindir}/switcher
|
||||
%{_sbindir}/*
|
||||
%config %{_sysconfdir}/boinc-client.conf
|
||||
/var/adm/fillup-templates/sysconfig.boinc
|
||||
%config %{_sysconfdir}/init.d/*
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/*
|
||||
#%{_sysconfdir}/sysconfig/*
|
||||
%{_mandir}/man*/*
|
||||
%doc COPYING COPYRIGHT checkin_* INSTALL notes todo TODO_OLD
|
||||
|
||||
%files -n boinc-gui-lang
|
||||
%files -n boinc-doc
|
||||
%defattr(-,root,root)
|
||||
%{_datadir}/locale/*/LC_MESSAGES/*
|
||||
%{_datadir}/locale/ko_KR
|
||||
%{_datadir}/locale/ko_KR/LC_MESSAGES
|
||||
%{_datadir}/locale/sv_SE
|
||||
%{_datadir}/locale/sv_SE/LC_MESSAGES
|
||||
%doc COPYING COPYRIGHT checkin_* INSTALL notes todo TODO_OLD doc/*.txt doc/bolt doc/logo doc/*.php doc/*.png doc/*.html
|
||||
|
||||
%files -n boinc-gui
|
||||
%defattr(-,root,root)
|
||||
@ -236,13 +270,70 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_datadir}/applications/*
|
||||
%{_datadir}/icons/hicolor/*/apps/*
|
||||
|
||||
%files -n boinc-gui-lang
|
||||
%defattr(-,root,root)
|
||||
%{_datadir}/locale/*/LC_MESSAGES/*
|
||||
%dir %{_datadir}/locale/ko_KR
|
||||
%dir %{_datadir}/locale/ko_KR/LC_MESSAGES
|
||||
%dir %{_datadir}/locale/sv_SE
|
||||
%dir %{_datadir}/locale/sv_SE/LC_MESSAGES
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%dir %{_includedir}/BOINC
|
||||
%{_includedir}/BOINC/*.h
|
||||
%{_libdir}/*a
|
||||
%dir %{_includedir}/boinc
|
||||
%{_includedir}/boinc/*.h
|
||||
# %{_libdir}/*a
|
||||
|
||||
%changelog
|
||||
* Fri Mar 27 2009 saigkill@opensuse.org
|
||||
- removed boinctray depency
|
||||
* Sat Mar 14 2009 saigkill@opensuse.org
|
||||
- added rpmlintrc
|
||||
* Wed Feb 25 2009 pth@suse.de
|
||||
- Use wxWindowList::compatibility_iterator instead of wxWindowListNode*
|
||||
as the latter is not defined when wxWindows is compiled to use
|
||||
the STL.
|
||||
- Include standard compiler flags.
|
||||
- Reformat description
|
||||
- Correct spelling boinc-client-README.SuSE
|
||||
* Thu Feb 12 2009 saigkill@opensuse.org
|
||||
- added wxstring_conversion.patch (fix Bug #774 Berkeley Bug)
|
||||
* Wed Feb 11 2009 saigkill@opensuse.org
|
||||
- first stable Version
|
||||
- fixed boincmgr to copy gui_rpc_auth.cfg to every /home
|
||||
* Wed Feb 11 2009 saigkill@opensuse.org
|
||||
- Export %%changelog to boinc-client.changes
|
||||
* Tue Feb 10 2009 saigkill@opensuse.org
|
||||
- changed $BOINCEXE from boinc_client to boinc
|
||||
* Wed Feb 04 2009 saigkill@opensuse.org
|
||||
- Fixed OpenSUSE Bugzilla Bug #468414
|
||||
* Tue Feb 03 2009 saigkill@opensuse.org
|
||||
- updated to Version 6.4
|
||||
- deleted bnc_465676 (was fixed in sourcecode by boinc-team)
|
||||
* Mon Feb 02 2009 dl9pf@gmx.de
|
||||
- tweaked -doc package
|
||||
* Mon Feb 02 2009 saigkill@opensuse.org
|
||||
- added README.SuSE to %%doc
|
||||
- added own Patches:
|
||||
+ boinc-docbook2x (fix using docbook2x)
|
||||
+ boinc-LC_MESSAGES (fix handling .mo LC Messages)
|
||||
+ boinc-rcscript (fix using init.d instead of rc.d)
|
||||
(fix BOINC User root)
|
||||
+ boinc-sysconfig (fix installing conf in /etc/boinc-client.conf)
|
||||
(fix init File as boinc)
|
||||
+ ca_cert_deactivate (fix deactivate using of ca_cert)
|
||||
+ fs_start_included (fix add $fs_network to init.d Script)
|
||||
* Sun Feb 01 2009 saigkill@opensuse.org
|
||||
- added fillup Macro to use sysconfig
|
||||
- use sysconfig.boinc as source from fillup macro
|
||||
* Sat Jan 31 2009 saigkill@opensuse.org
|
||||
- deleted bnc_431510 not relevant (for Mac).
|
||||
- deleted bnc_439037 not relevant
|
||||
- deleted bnc_442904 for Win. In my Package no Win/Mac Source
|
||||
- added bnc_465676.patch fix CVE-ID: CVE-2009-0126
|
||||
- branched for Factory:Contrib
|
||||
* Fri Jan 23 2009 saigkill@opensuse.org
|
||||
- deleted mac/mac_build/win Folders from the Sourcecode
|
||||
* Wed Jan 14 2009 mauro@suse.de
|
||||
- Added bnc_465676.patch to fix bnc#465676.
|
||||
+ Fixes CVE-2008-5077
|
||||
@ -258,4 +349,4 @@ rm -rf $RPM_BUILD_ROOT
|
||||
- Add bnc-431510.patch to fix bnc#431510.
|
||||
* Mon Sep 08 2008 mauro@suse.de
|
||||
- initial package for SuSE. boinc 6.2.18 (based on the enzokiel's
|
||||
opensuse version).
|
||||
(opensuse version).
|
||||
|
@ -1,6 +1,7 @@
|
||||
--- configure.ac.orig 2008-08-25 22:29:18.000000000 +0200
|
||||
+++ configure.ac 2008-08-25 23:06:01.000000000 +0200
|
||||
@@ -150,7 +150,7 @@
|
||||
diff -Naur boinc_core_release_6_6_1/configure.ac boinc_core_release_6_6_1p/configure.ac
|
||||
--- boinc_core_release_6_6_1/configure.ac 2009-01-18 23:52:57.000000000 +0100
|
||||
+++ boinc_core_release_6_6_1p/configure.ac 2009-01-23 13:02:07.000000000 +0100
|
||||
@@ -153,7 +153,7 @@
|
||||
dnl Check for docbook2x-man, which we use to create the manpages in
|
||||
dnl doc/manpages, and set the conditional HAVE_DOCBOOK2X_MAN to build
|
||||
dnl the manpages only if docbook2x-man is available.
|
||||
|
40
boinc-fs_start_included.patch
Normal file
40
boinc-fs_start_included.patch
Normal file
@ -0,0 +1,40 @@
|
||||
diff -Naur boinc_core_release_6_5_0/client/scripts/boinc-client.in boinc_core_release_6_5_0p/client/scripts/boinc-client.in
|
||||
--- boinc_core_release_6_5_0/client/scripts/boinc-client.in 2009-01-12 13:21:03.000000000 +0100
|
||||
+++ boinc_core_release_6_5_0p/client/scripts/boinc-client.in 2009-01-12 18:04:25.000000000 +0100
|
||||
@@ -19,12 +19,12 @@
|
||||
# For more information about BOINC (the Berkeley Open Infrastructure
|
||||
# for Network Computing) see http://boinc.berkeley.edu
|
||||
# processname: boinc
|
||||
-# config: /etc/sysconfig/boinc
|
||||
+# config: /etc/boinc
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: boinc
|
||||
-# Required-Start: $network
|
||||
-# Required-Stop: $network
|
||||
+# Required-Start: $remote_fs $network
|
||||
+# Required-Stop: $remote_fs $network
|
||||
# Default-Start: 3 4 5
|
||||
# Default-Stop: 0 1 2 6
|
||||
# Short-Description: This script monitors the BOINC client.
|
||||
@@ -231,16 +231,16 @@
|
||||
config_files="
|
||||
./boinc-client.conf
|
||||
./boinc.conf
|
||||
-/etc/sysconfig/boinc-client
|
||||
+/etc/boinc/boinc-client
|
||||
/etc/default/boinc-client
|
||||
/etc/boinc-client.conf
|
||||
-${sysconfdir}/sysconfig/boinc-client
|
||||
+${sysconfdir}/boinc/boinc-client
|
||||
${sysconfdir}/default/boinc-client
|
||||
${sysconfdir}/boinc-client.conf
|
||||
-/etc/sysconfig/boinc
|
||||
+/etc/boinc
|
||||
/etc/default/boinc
|
||||
/etc/boinc.conf
|
||||
-${sysconfdir}/sysconfig/boinc
|
||||
+${sysconfdir}/boinc/boinc
|
||||
${sysconfdir}/default/boinc
|
||||
${sysconfdir}/boinc.conf
|
||||
none
|
@ -1,4 +1,3 @@
|
||||
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Exec=boincmgr
|
||||
@ -16,5 +15,4 @@ Comment[pt]=Configurar ou monitorizar o cliente básico do BOINC
|
||||
Comment[cs]=Monitoruje a nastavuje klienta BOINC
|
||||
Categories=Utility;X-SuSE-WebUtility;GTK;
|
||||
X-KDE-StartupNotify=true
|
||||
X-SuSE-translate=true
|
||||
|
||||
|
10
boinc-icon_old.patch
Normal file
10
boinc-icon_old.patch
Normal file
@ -0,0 +1,10 @@
|
||||
diff -Naur boinc_core_release_6_4_5/clientgui/res/Makefile.am boinc_core_release_6_4_5p/clientgui/res/Makefile.am
|
||||
--- boinc_core_release_6_4_5/clientgui/res/Makefile.am 2009-02-07 10:13:25.000000000 +0100
|
||||
+++ boinc_core_release_6_4_5p/clientgui/res/Makefile.am 2009-02-07 13:16:20.000000000 +0100
|
||||
@@ -2,5 +2,5 @@
|
||||
|
||||
include $(top_srcdir)/Makefile.incl
|
||||
|
||||
-dist_pkgdata_DATA = boincmgr.16x16.png boincmgr.32x32.png boincmgr.48x48.png
|
||||
+# dist_pkgdata_DATA = boincmgr.16x16.png boincmgr.32x32.png boincmgr.48x48.png
|
||||
|
@ -1,4 +1,4 @@
|
||||
/var/log/boinc_client.log {
|
||||
/var/log/boinc_client.log {
|
||||
daily
|
||||
compress
|
||||
dateext
|
||||
|
@ -1,50 +1,18 @@
|
||||
--- client/scripts/boinc-client.in.orig Wed Sep 03 13:08:27 2008
|
||||
+++ client/scripts/boinc-client.in Wed Sep 03 13:21:19 2008
|
||||
@@ -25,7 +25,7 @@
|
||||
# Provides: boinc
|
||||
# Required-Start: $network
|
||||
# Required-Stop: $network
|
||||
-# Default-Start: 3 4 5
|
||||
+# Default-Start: 3 4 5
|
||||
# Default-Stop: 0 1 2 6
|
||||
# Short-Description: This script monitors the BOINC client.
|
||||
# Description: This script starts the local BOINC client as a daemon
|
||||
@@ -54,12 +54,13 @@
|
||||
########################################################################
|
||||
|
||||
# set the basic PATH
|
||||
-export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/ucb/bin
|
||||
+PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/ucb/bin
|
||||
+export PATH
|
||||
diff -Naur boinc_core_release_6_4_5/client/scripts/boinc-client.in boinc_core_release_6_4_5p/client/scripts/boinc-client.in
|
||||
--- boinc_core_release_6_4_5/client/scripts/boinc-client.in 2009-02-07 10:14:32.000000000 +0100
|
||||
+++ boinc_core_release_6_4_5p/client/scripts/boinc-client.in 2009-02-10 19:51:39.000000000 +0100
|
||||
@@ -59,8 +59,8 @@
|
||||
|
||||
# Find the correct ps to use. On solaris /usr/ucb/ps is the one to use
|
||||
# on everything else, we hope the first one in the path is the right one.
|
||||
-if [ -x /usr/ucb/ps ] ; then
|
||||
- PS=/usr/ucb/ps
|
||||
+if [ -x /bin/ps ] ; then
|
||||
+ PS=/bin/ps
|
||||
+if [ -x /usr/ps ] ; then
|
||||
+ PS=/usr/ps
|
||||
else
|
||||
PS=ps
|
||||
fi
|
||||
@@ -72,7 +73,7 @@
|
||||
########################################################################
|
||||
SHELLS="bash ksh zsh"
|
||||
# count how many times we've tried to restart
|
||||
-TRIES=$1
|
||||
+TRIES=$2
|
||||
if [ -z "$TRIES" ] ; then
|
||||
TRIES=0
|
||||
fi
|
||||
@@ -92,7 +93,7 @@
|
||||
for try in $SHELLS ; do
|
||||
ex=`which $try`
|
||||
if [ ! -z "${ex}" -a -x "${ex}" ] ; then
|
||||
- if ${ex} $0 $TRIES ; then
|
||||
+ if ${ex} $0 $1 $TRIES ; then
|
||||
# it worked, we can exit
|
||||
exit 0
|
||||
else
|
||||
@@ -114,7 +115,7 @@
|
||||
@@ -115,7 +115,7 @@
|
||||
|
||||
# Name of user to run as:
|
||||
#
|
||||
@ -53,154 +21,35 @@
|
||||
|
||||
# Working directory. Could be /home/boinc, /var/lib/boinc, etc..
|
||||
# The reason I prefer /var/lib/boinc is that this works best for a
|
||||
@@ -129,7 +130,7 @@
|
||||
@@ -128,9 +128,9 @@
|
||||
# but I like to rename it and put it in a public place.
|
||||
# (Hint: move boincmgr to /usr/local/bin too so anyone can easily use it).
|
||||
#
|
||||
BOINCEXE_NAME=boinc_client
|
||||
-BOINCEXE_NAME=boinc_client
|
||||
+BOINCEXE_NAME=boinc
|
||||
BOINCEXE=${bindir}/${BOINCEXE_NAME}
|
||||
-BOINCCMD_NAME=boinccmd
|
||||
+BOINCCMD_NAME=boinc_cmd
|
||||
BOINCCMD=${bindir}/${BOINCCMD_NAME}
|
||||
|
||||
# Log files (you should rotate these occasionally)
|
||||
@@ -161,9 +162,11 @@
|
||||
|
||||
# If there is the subsys directory, then use it ...
|
||||
if [ -d /var/lock/subsys/ ]; then
|
||||
- LOCKFILE=/var/lock/subsys/boinc-client
|
||||
+ LOCKFILE=/var/lock/subsys/${BOINCEXE_NAME}
|
||||
elif [ -d /var/lock ]; then
|
||||
- LOCKFILE=/var/lock/boinc-client
|
||||
+ LOCKFILE=/var/lock/${BOINCEXE_NAME}
|
||||
+elif [ -d /var/run ]; then
|
||||
+ LOCKFILE=/var/run/${BOINCEXE_NAME}.lock
|
||||
fi
|
||||
|
||||
# su on Linux seems to need this to be set to work properly in a script
|
||||
@@ -175,25 +178,26 @@
|
||||
@@ -178,8 +178,8 @@
|
||||
# but if the functions are not found we create our own simple replacements.
|
||||
# (The idea for replacing the functions comes from OpenAFS. Thanks guys!)
|
||||
|
||||
-if [ -f /etc/rc.d/init.d/functions ] ; then
|
||||
- . /etc/rc.d/init.d/functions
|
||||
- if `printf "Hello" >/dev/null 2>/dev/null` ; then
|
||||
+if [ -f /etc/init.d/functions ] ; then
|
||||
+ . /etc/init.d/functions
|
||||
+else
|
||||
+ if printf "Hello" >/dev/null 2>/dev/null ; then
|
||||
else
|
||||
if printf "Hello" >/dev/null 2>/dev/null ; then
|
||||
# printf works
|
||||
printcol='printf \033[60G%s'
|
||||
- if `echo -en "Hello" >/dev/null 2>/dev/null` ; then
|
||||
+ elif echo -en "Hello" >/dev/null 2>/dev/null ; then
|
||||
# echo -en works
|
||||
printcol='echo -en \033[60G'
|
||||
- else
|
||||
+ else
|
||||
# no printf make do with echo -n
|
||||
printcol="echo -n .........."
|
||||
- fi
|
||||
- function echo_success () { $printcol "[OK]" ; }
|
||||
- function echo_failure () { $printcol "[FAILED]" ; }
|
||||
- function echo_warning () { $printcol "[WARNING]" ; }
|
||||
- function killproc() {
|
||||
+ fi
|
||||
+ function echo_success () { $printcol "[OK]" ; }
|
||||
+ function echo_failure () { $printcol "[FAILED]" ; }
|
||||
+ function echo_warning () { $printcol "[WARNING]" ; }
|
||||
+ function killproc() {
|
||||
PID=`local_pidof $1`
|
||||
[ $PID ] && kill $PID
|
||||
- }
|
||||
+ }
|
||||
fi
|
||||
|
||||
# check if we have pidof. If not use ps and grep for the same job.
|
||||
@@ -212,7 +216,9 @@
|
||||
# If we don't have it, use su for the same job.
|
||||
#
|
||||
if [ ! -x /sbin/runuser ] ; then
|
||||
- alias runuser=su
|
||||
+ RUNUSER=su
|
||||
+else
|
||||
+ RUNUSER=runuser
|
||||
fi
|
||||
|
||||
# Some additional places to look for executables
|
||||
@@ -226,16 +232,16 @@
|
||||
./boinc-client.conf
|
||||
./boinc.conf
|
||||
/etc/sysconfig/boinc-client
|
||||
-/etc/default/boinc-client
|
||||
-/etc/boinc-client.conf
|
||||
-${sysconfdir}/sysconfig/boinc-client
|
||||
-${sysconfdir}/default/boinc-client
|
||||
-${sysconfdir}/boinc-client.conf
|
||||
/etc/sysconfig/boinc
|
||||
+/etc/default/boinc-client
|
||||
/etc/default/boinc
|
||||
+/etc/boinc-client.conf
|
||||
/etc/boinc.conf
|
||||
+${sysconfdir}/sysconfig/boinc-client
|
||||
${sysconfdir}/sysconfig/boinc
|
||||
+${sysconfdir}/default/boinc-client
|
||||
${sysconfdir}/default/boinc
|
||||
+${sysconfdir}/boinc-client.conf
|
||||
${sysconfdir}/boinc.conf
|
||||
none
|
||||
"
|
||||
@@ -264,6 +270,9 @@
|
||||
. ${config_file}
|
||||
fi
|
||||
|
||||
+## Get group-id for user $BOINCUSER in stringformat
|
||||
+BOINCGROUP=`id -gn $BOINCUSER`
|
||||
+
|
||||
## Add ${BOINCDIR} to the path, just in case the executables are stored there.
|
||||
export PATH=${PATH}:${BOINCDIR}
|
||||
|
||||
@@ -272,7 +281,7 @@
|
||||
@@ -279,7 +279,7 @@
|
||||
echo -n "Creating $BOINCDIR "
|
||||
if mkdir -p $BOINCDIR 2>/dev/null ; then
|
||||
if [ -n "$BOINCUSER" ] ; then
|
||||
- if chown $BOINCUSER $BOINCDIR ; then
|
||||
+ if chown $BOINCUSER:$BOINCGROUP $BOINCDIR ; then
|
||||
+ if chown $BOINCUSER $BOINCGROUP $BOINCDIR ; then
|
||||
echo_success
|
||||
else
|
||||
echo_failure
|
||||
@@ -288,7 +297,8 @@
|
||||
fi
|
||||
|
||||
## Check what user we are running as:
|
||||
-USERNOW=`whoami`
|
||||
+# we can't rely on the existence of "whoami" or "logname", so we'll use ps.
|
||||
+USERNOW=`${PS} u $$ | tail -1 | awk '{print $1}'`
|
||||
if [ -z "$BOINCUSER" ] ; then
|
||||
BOINCUSER="${USERNOW}"
|
||||
fi
|
||||
@@ -321,7 +331,8 @@
|
||||
exit 8
|
||||
fi
|
||||
elif [ "${USERNOW}" = "root" ] ; then
|
||||
- if [ -z `su -s /bin/sh $BOINCUSER -c "if test -O ${BOINCDIR} ; then echo success ; fi"` ]; then
|
||||
+ cmd="if test -O ${BOINCDIR} ; then echo success ; fi"
|
||||
+ if [ -z `su $BOINCUSER -c "$cmd"` ]; then
|
||||
echo -n ERROR: $BOINCDIR is not owned by $BOINCUSER.
|
||||
echo_failure
|
||||
echo
|
||||
@@ -389,6 +400,7 @@
|
||||
echo
|
||||
fi
|
||||
|
||||
+ touch ${LOGFILE} ${ERRORLOG}
|
||||
NOCORE="ulimit -c 0 2>&1 >/dev/null"
|
||||
echo -n "Starting BOINC client as a daemon: "
|
||||
if [ "${BOINCUSER}" = "${USERNOW}" ] ; then
|
||||
@@ -396,7 +408,8 @@
|
||||
$NOCORE
|
||||
$BOINCEXE $BOINCOPTS >>$LOGFILE 2>>$ERRORLOG &
|
||||
else
|
||||
- runuser - $BOINCUSER -c "$NOCORE ; $BOINCEXE $BOINCOPTS >>$LOGFILE 2>>$ERRORLOG"
|
||||
+ chown ${BOINCUSER}:$BOINCGROUP ${LOGFILE} ${ERRORLOG}
|
||||
+ ${RUNUSER} - $BOINCUSER -c "$NOCORE ; $BOINCEXE $BOINCOPTS >>$LOGFILE 2>>$ERRORLOG" 2>/dev/null > /dev/null &
|
||||
fi
|
||||
sleep 3
|
||||
PID=`local_pidof $BOINCEXE_NAME`
|
||||
|
@ -1,16 +0,0 @@
|
||||
--- Makefile.am.orig 2008-08-25 22:29:18.000000000 +0200
|
||||
+++ Makefile.am 2008-08-25 22:43:08.000000000 +0200
|
||||
@@ -13,11 +13,11 @@
|
||||
endif
|
||||
|
||||
if ENABLE_CLIENT
|
||||
- CLIENT_SUBDIRS = client
|
||||
+ CLIENT_SUBDIRS = client client/scripts
|
||||
endif
|
||||
|
||||
if BUILD_CLIENTGUI
|
||||
- CLIENTGUI_SUBDIRS = clientgui sea
|
||||
+ CLIENTGUI_SUBDIRS = clientgui sea locale/client
|
||||
endif
|
||||
|
||||
# ORDER MATTERS below. One must build dependencies FIRST, then things
|
@ -1,91 +1,17 @@
|
||||
--- client/scripts/boinc-client.conf.orig 2008-08-28 14:24:15.000000000 +0200
|
||||
+++ client/scripts/boinc-client.conf 2008-08-28 14:22:55.000000000 +0200
|
||||
@@ -0,0 +1,63 @@
|
||||
+## Path: Applications/BOINC
|
||||
+## Description: Define userid under which boinc-client is run
|
||||
+## Type: string
|
||||
+## Default: "root"
|
||||
+## Config: boinc-client
|
||||
+# Here you should change the default value to another existing user,
|
||||
+# for example use your (non-root) account.
|
||||
+BOINCUSER="root"
|
||||
+## Path: Applications/BOINC
|
||||
+## Description: Define directory in which boinc-client is run
|
||||
+## Type: string
|
||||
+## Default: "/var/lib/boinc"
|
||||
+## Config: boinc-client
|
||||
+# Enter the dirctory where boinc-client shall store the project data.
|
||||
+BOINCDIR="/var/lib/boinc"
|
||||
+## Path: Applications/BOINC
|
||||
+## Description: Define log file
|
||||
+## Type: string
|
||||
+## Default: "/var/log/boinc_client.log"
|
||||
+## Config: boinc-client
|
||||
+# Name and location of boinc logfile, normally no change necessary.
|
||||
+LOGFILE="/var/log/boinc_client.log"
|
||||
+## Path: Applications/BOINC
|
||||
+## Description: Define error log file
|
||||
+## Type: string
|
||||
+## Default: "/var/log/boinc_client_err.log"
|
||||
+## Config: boinc-client
|
||||
+# Name and location of boinc error-logfile, normally no change necessary.
|
||||
+ERRORLOG="/var/log/boinc_client_err.log"
|
||||
+## Path: Applications/BOINC
|
||||
+## Description: Define pid file
|
||||
+## Type: string
|
||||
+## Default: "/var/run/boinc_client.pid"
|
||||
+## Config: boinc-client
|
||||
+# Name and location of boinc pid-file, normally no change necessary.
|
||||
+PIDFILE="/var/run/boinc_client.pid"
|
||||
+## Path: Applications/BOINC
|
||||
+## Description: Define lockfile
|
||||
+## Type: string
|
||||
+## Default: "/var/lock/subsys/boinc_client"
|
||||
+## Config: boinc-client
|
||||
+# Name and location of boinc lockfile, normally no change necessary.
|
||||
+LOCKFILE="/var/lock/subsys/boinc_client"
|
||||
+## Path: Applications/BOINC
|
||||
+## Description: Define BOINC options
|
||||
+## Type: string
|
||||
+## Default: "--dir $BOINCDIR"
|
||||
+## Config: boinc-client
|
||||
+# Add this option if you want to allow boinc manager connections from remote machines
|
||||
+# BOINCOPTS="--allow_remote_gui_rpc"
|
||||
+#
|
||||
+# Add this option if you want to turn off all logging
|
||||
+# BOINCOPTS="--daemon"
|
||||
+#
|
||||
+# Add this option if you want to redirect logging to the files stderrdae.txt
|
||||
+# and stdoutdae.txt in BOINCDIR rather than LOGFILE and ERRORLOG
|
||||
+# BOINCOPTS="--redirectio"
|
||||
+#
|
||||
+# Add this option if you want to run only when no logins from anywhere are active
|
||||
+# BOINCOPTS="--check_all_logins"
|
||||
+#
|
||||
+# For more options read the manpages.
|
||||
+BOINCOPTS="--dir $BOINCDIR"
|
||||
--- client/scripts/Makefile.am.orig 2008-08-25 22:29:15.000000000 +0200
|
||||
+++ client/scripts/Makefile.am 2008-08-25 22:47:29.000000000 +0200
|
||||
@@ -1,7 +1,17 @@
|
||||
-all:
|
||||
- chmod +x boinc-client
|
||||
-
|
||||
-install:
|
||||
- $(INSTALL) -b boinc-client /etc/init.d/
|
||||
+## -*- mode: makefile; tab-width: 4 -*-
|
||||
|
||||
+install-exec-hook:
|
||||
+ chmod +x boinc-client
|
||||
+ $(INSTALL) -d $(DESTDIR)/etc/init.d
|
||||
+ $(INSTALL) -b boinc-client $(DESTDIR)/etc/init.d/boinc-client
|
||||
+ if [ -d /etc/sysconfig ] ; then \
|
||||
+ $(INSTALL) -d $(DESTDIR)/etc/sysconfig ; \
|
||||
+ $(INSTALL) -m644 boinc-client.conf $(DESTDIR)/etc/sysconfig/boinc-client ; \
|
||||
+ elif [ -d /etc/default ] ; then \
|
||||
+ $(INSTALL) - $(DESTDIR)/etc/default ; \
|
||||
+ $(INSTALL) -m644 boinc-client.conf $(DESTDIR)/etc/default/boinc-client ; \
|
||||
+ else \
|
||||
diff -Naur boinc_core_release_6_4_5/client/scripts/Makefile.am boinc_core_release_6_4_5p/client/scripts/Makefile.am
|
||||
--- boinc_core_release_6_4_5/client/scripts/Makefile.am 2009-02-07 10:14:32.000000000 +0100
|
||||
+++ boinc_core_release_6_4_5p/client/scripts/Makefile.am 2009-02-10 19:37:40.000000000 +0100
|
||||
@@ -3,10 +3,10 @@
|
||||
install-exec-hook:
|
||||
chmod +x boinc-client
|
||||
$(INSTALL) -d $(DESTDIR)/etc/init.d
|
||||
- $(INSTALL) -b boinc-client $(DESTDIR)/etc/init.d/boinc-client
|
||||
+ $(INSTALL) -b boinc-client $(DESTDIR)/etc/init.d/boinc
|
||||
if [ -d /etc/sysconfig ] ; then \
|
||||
- $(INSTALL) -d $(DESTDIR)/etc/sysconfig ; \
|
||||
- $(INSTALL) boinc-client.conf $(DESTDIR)/etc/sysconfig/boinc-client ; \
|
||||
+ $(INSTALL) -d $(DESTDIR)/etc ; \
|
||||
+ $(INSTALL) -m644 boinc-client.conf $(DESTDIR)/etc/boinc-client.conf ; \
|
||||
+ fi
|
||||
|
||||
elif [ -d /etc/default ] ; then \
|
||||
$(INSTALL) -d $(DESTDIR)/etc/default ; \
|
||||
$(INSTALL) boinc-client.conf $(DESTDIR)/etc/default/boinc-client ; \
|
||||
|
3
boinc_core_release_6_4_5.tar.bz2
Normal file
3
boinc_core_release_6_4_5.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:785ae93cba2444e2a7b2e81eedac701054571b445affa9edd383272d9a546889
|
||||
size 11666731
|
7
boincmgr
7
boincmgr
@ -7,7 +7,7 @@
|
||||
|
||||
# Source the configuration file for the boinc-client init script.
|
||||
#
|
||||
config_files="./boinc-client.conf /etc/sysconfig/boinc-client"
|
||||
config_files="/etc/boinc-client.conf /etc/sysconfig/boinc-client"
|
||||
|
||||
# Find the correct config file
|
||||
#
|
||||
@ -18,6 +18,11 @@ for config_file in $config_files ; do
|
||||
fi
|
||||
done
|
||||
|
||||
# Checking for gui_rpc_auth.cfg
|
||||
if ! test -f ~/gui_rpc_auth.cfg ; then
|
||||
ln -s /var/lib/boinc/gui_rpc_auth.cfg .
|
||||
fi
|
||||
|
||||
# Change directory and start BOINC Manager
|
||||
#
|
||||
cd $BOINCDIR
|
||||
|
42
sysconfig.boinc
Normal file
42
sysconfig.boinc
Normal file
@ -0,0 +1,42 @@
|
||||
#
|
||||
# Default variable values for the boinc-client /etc/init.d script
|
||||
#
|
||||
#BOINCEXE_NAME=boinc_client
|
||||
#BOINCCMD_NAME=boinccmd
|
||||
|
||||
# The userid under which boinc_client is run
|
||||
#BOINCUSER=boinc
|
||||
|
||||
# The directory in which boinc_client is run
|
||||
#BOINCDIR=/var/lib/boinc
|
||||
|
||||
# log files
|
||||
#LOGFILE=/var/log/${BOINCEXE_NAME}.log
|
||||
#ERRORLOG=/var/log/${BOINCEXE_NAME}_err.log
|
||||
|
||||
# pid file
|
||||
#PIDFILE=/var/run/${BOINCEXE_NAME}.pid
|
||||
|
||||
# placement of the lockfile depends upon the operating system
|
||||
# it will probably be one of the following:
|
||||
#LOCKFILE=/var/lock/subsys/${BOINCEXE_NAME}
|
||||
#LOCKFILE=/var/lock/${BOINCEXE_NAME}
|
||||
#LOCKFILE=/var/run/${BOINCEXE_NAME}.lock
|
||||
|
||||
|
||||
# BOINC options: for the command line when running the client.
|
||||
# Be aware that --allow_remote_gui_rpc opens up your machine to the world!
|
||||
#
|
||||
# Add this option if you want to allow boinc manager connections from remote
|
||||
# machines
|
||||
#BOINCOPTS="--allow_remote_gui_rpc"
|
||||
# Add this option if you want to turn off all logging
|
||||
#BOINCOPTS="--daemon"
|
||||
# Add this option if you want to redirect logging to the files stderrdae.txt
|
||||
# and stdoutdae.txt in BOINCDIR rather than LOGFILE and ERRORLOG
|
||||
#BOINCOPTS="--redirectio"
|
||||
# Add this option if you want to run only when no logins from anywhere are
|
||||
# active
|
||||
#BOINCOPTS="--check_all_logins"
|
||||
# The default is no options.
|
||||
#BOINCOPTS=
|
Loading…
Reference in New Issue
Block a user