mirror of https://github.com/BOINC/boinc.git
- update_versions: get key directory from config file
This commit is contained in:
parent
c8bc624553
commit
f1b4b16bbf
|
@ -6438,3 +6438,9 @@ David 28 Oct 2012
|
|||
client/
|
||||
app_control.cpp
|
||||
http_curl.cpp
|
||||
|
||||
David 28 Oct 2012
|
||||
- update_versions: get key directory from config file
|
||||
|
||||
tools/
|
||||
update_versions
|
||||
|
|
|
@ -31,9 +31,15 @@ $apps = BoincApp::enum("");
|
|||
$platforms = BoincPlatform::enum("");
|
||||
|
||||
$config = file_get_contents("config.xml");
|
||||
if (!$config) die("config.xml not found. Run this in project root dir.\n");
|
||||
$download_url = parse_element($config, "<download_url>");
|
||||
if (!$download_url) die("<download_url> not found in config.xml\n");
|
||||
$download_dir = parse_element($config, "<download_dir>");
|
||||
if (!$download_dir) die("<download_dir> not found in config.xml\n");
|
||||
$fanout = parse_element($config, "<uldl_dir_fanout>");
|
||||
if (!$fanout) die("<fanout> not found in config.xml\n");
|
||||
$key_dir = parse_element($config, "<key_dir>");
|
||||
if (!$key_dir) die("<key_dir> not found in config.xml\n");
|
||||
|
||||
function lookup_app($name) {
|
||||
global $apps;
|
||||
|
@ -217,6 +223,7 @@ function confirm_sig_gen($name) {
|
|||
// process a file
|
||||
//
|
||||
function process_file($a, $v, $p, $name, $fds) {
|
||||
global $key_dir;
|
||||
$fd = lookup_file($fds, $name);
|
||||
if (!$fd) {
|
||||
$fd = null;
|
||||
|
@ -236,7 +243,7 @@ function process_file($a, $v, $p, $name, $fds) {
|
|||
if (is_file($sigpath)) {
|
||||
$fd->signature = file_get_contents($sigpath);
|
||||
} else {
|
||||
$keypath = "keys/code_sign_private";
|
||||
$keypath = "$key_dir/code_sign_private";
|
||||
if (is_file($keypath)) {
|
||||
confirm_sig_gen($name);
|
||||
$handle = popen("bin/sign_executable $path $keypath", "r");
|
||||
|
|
Loading…
Reference in New Issue