From 7f460113cc9c7eca91935549c25d78a9393e0977 Mon Sep 17 00:00:00 2001 From: Pjotr Date: Mon, 28 Sep 2026 14:48:57 +0000 Subject: container: deployment fixes for the Guix container/VM Changes previously carried as bnw-container-paths.patch in guix-bioinformatics, now applied to the source directly: * unify data directories on /var/lib/genenet/bnw (was /tmp/bnw and ./data/ mixed) * make the shell_exec paths __DIR__-relative and the example/octave helper scripts location-independent, so php-fpm can run them from any working directory * use core-octave randn/exp instead of the statistics-package normrnd/normpdf (not available in the container's octave) * nnodes: strtrim before strfind so the node count parses with the container's octave output * python3 instead of a hardcoded /home/jziebart path * add diag.php, a debug page showing the request and data state * bn_genenet.php: serve the GeneNetwork (GN2) handshake server-side; the My_Gennenet POST is converted (commas -> tabs, semicolons -> newlines) in PHP and the prepared-data page is returned in ONE request. This removes the raw-echo of into a JavaScript string (an XSS hole on public deployments) and is backward compatible for GN2 (same POST, better response). --- sourcecodes/remove_variables_processing_default.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'sourcecodes/remove_variables_processing_default.php') diff --git a/sourcecodes/remove_variables_processing_default.php b/sourcecodes/remove_variables_processing_default.php index 102fffea..95f14747 100644 --- a/sourcecodes/remove_variables_processing_default.php +++ b/sourcecodes/remove_variables_processing_default.php @@ -6,8 +6,8 @@ function get_tier($keyval) { $tier=trim($_GET['tier']); -//$dir="./data/"; -$dir="/tmp/bnw/"; +//$dir="/var/lib/genenet/bnw/"; +$dir="/var/lib/genenet/bnw/"; $tf=$dir.$keyval."del_var.txt"; $fpvar = fopen("$tf","w"); @@ -52,8 +52,8 @@ function describe_tier($fpvar,$keyval) $tierdesc=trim($_GET['tierdesc']); -//$dir="./data/"; -$dir="/tmp/bnw/"; +//$dir="/var/lib/genenet/bnw/"; +$dir="/var/lib/genenet/bnw/"; $tf=$dir.$keyval."tier.txt"; $tier=file_get_contents("$tf"); @@ -200,8 +200,8 @@ if($d1!="" && $d2!="") -//$dir="./data/"; -$dir="/tmp/bnw/"; +//$dir="/var/lib/genenet/bnw/"; +$dir="/var/lib/genenet/bnw/"; //$sid1=$dir.$keyval."ban"; //$sid2=$dir.$keyval."white"; @@ -229,7 +229,7 @@ $al3=rand(0,51); $alpha="$alphas[$al1]"."$alphas[$al2]"."$alphas[$al3]"; $keyval=$alpha; -shell_exec('./run_scripts/run_del_var '.$oldkey.' '.$keyval); +shell_exec(__DIR__.'/run_scripts/run_del_var '.$oldkey.' '.$keyval); //describe_tier($fpb,$keyval); //banlist($fpb); -- cgit 1.4.1