Version in base suite: 2.5.9-1 Base version: oar_2.5.9-1 Target version: oar_2.5.9-1+deb12u1 Base file: /srv/ftp-master.debian.org/ftp/pool/main/o/oar/oar_2.5.9-1.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/o/oar/oar_2.5.9-1+deb12u1.dsc changelog | 13 ++ control | 1 patches/drawgantt-svg_fixes_for_php_8.patch | 45 ++++++++++ patches/fix_the_oar_user_creation_with_debian12_adduser_3.130.patch | 24 +++++ patches/series | 2 5 files changed, 85 insertions(+) diff -Nru oar-2.5.9/debian/changelog oar-2.5.9/debian/changelog --- oar-2.5.9/debian/changelog 2021-01-11 15:44:43.000000000 +0000 +++ oar-2.5.9/debian/changelog 2024-04-10 12:02:42.000000000 +0000 @@ -1,3 +1,16 @@ +oar (2.5.9-1+deb12u1) bookworm; urgency=medium + + [ Pierre Neyron ] + * Fix Drawgantt-SVG with php8 (Closes: #1068444) + - create_function does not exists anymore + - static methods must be declared as such + * Fix the oar user creation on new install (locked otherwise) (Closes: + #1068713) + * oar-web-status: add missing dependency to libcgi-fast-perl (Closes: + #1068711) + + -- Vincent Danjean Wed, 10 Apr 2024 14:02:42 +0200 + oar (2.5.9-1) unstable; urgency=medium * New release diff -Nru oar-2.5.9/debian/control oar-2.5.9/debian/control --- oar-2.5.9/debian/control 2021-01-11 15:44:43.000000000 +0000 +++ oar-2.5.9/debian/control 2024-04-10 12:02:42.000000000 +0000 @@ -194,6 +194,7 @@ libtie-ixhash-perl, libappconfig-perl, libsort-naturally-perl, + libcgi-fast-perl, php, php-mysql | php-pgsql Suggests: oar-doc diff -Nru oar-2.5.9/debian/patches/drawgantt-svg_fixes_for_php_8.patch oar-2.5.9/debian/patches/drawgantt-svg_fixes_for_php_8.patch --- oar-2.5.9/debian/patches/drawgantt-svg_fixes_for_php_8.patch 1970-01-01 00:00:00.000000000 +0000 +++ oar-2.5.9/debian/patches/drawgantt-svg_fixes_for_php_8.patch 2024-04-10 12:02:42.000000000 +0000 @@ -0,0 +1,45 @@ +[drawgantt-svg] Fixes for PHP 8 + +Backported from upstream 2.5.10 + +Fix fatal errors occuring with PHP8: +- The create_function function is REMOVED as of PHP 8.0.0. (https://www.php.net/manual/en/function.create-function.php) +- Non-static methods Shuffle::Init() and Shuffle::get_int() cannot be called statically. Need to make them static. + +From: Pierre Neyron + +diff --git a/sources/visualization_interfaces/DrawGantt-SVG/drawgantt-svg.php.in b/sources/visualization_interfaces/DrawGantt-SVG/drawgantt-svg.php.in +index 5fd3b636..e24d3faa 100644 +--- a/sources/visualization_interfaces/DrawGantt-SVG/drawgantt-svg.php.in ++++ b/sources/visualization_interfaces/DrawGantt-SVG/drawgantt-svg.php.in +@@ -269,10 +269,10 @@ function date2px($date) { + // class to compute colors for jobs + class Shuffle { + protected static $singleton; +- function init($shuffle_instance) { ++ static function init($shuffle_instance) { + self::$singleton = $shuffle_instance; + } +- function get_int($job) { ++ static function get_int($job) { + if (self::$singleton === null) { + self::init(new Shuffle()); + } +@@ -603,7 +603,7 @@ class Resource { + if ($this->type == $CONF['resource_group_level']) { + $first_resource_base = true; + } +- usort($this->children, create_function('$a,$b','return $b->cmp($a);')); ++ usort($this->children, function($a,$b) { return $b->cmp($a); }); + foreach ($this->children as $child) { + $h += $child->svg_hierarchy($x+$CONF['hierarchy_resource_width'], $y+$h, $labels); + } +@@ -650,7 +650,7 @@ class Resource { + } + } + foreach ($states as $value => $date_weight_array) { +- usort($date_weight_array, create_function('$a,$b','list($d1,$w1)=$a; list($d2,$w2)=$b; return ($d1 != $d2)?(($d1 < $d2)?-1:1):(($w1 != $w2)?(($w1 < $w2)?1:-1):0);')); ++ usort($date_weight_array, function($a,$b) { list($d1,$w1)=$a; list($d2,$w2)=$b; return ($d1 != $d2)?(($d1 < $d2)?-1:1):(($w1 != $w2)?(($w1 < $w2)?1:-1):0); }); + $weight = 0; + foreach ($date_weight_array as $dwr) { + list ($d,$w,$r) = $dwr; diff -Nru oar-2.5.9/debian/patches/fix_the_oar_user_creation_with_debian12_adduser_3.130.patch oar-2.5.9/debian/patches/fix_the_oar_user_creation_with_debian12_adduser_3.130.patch --- oar-2.5.9/debian/patches/fix_the_oar_user_creation_with_debian12_adduser_3.130.patch 1970-01-01 00:00:00.000000000 +0000 +++ oar-2.5.9/debian/patches/fix_the_oar_user_creation_with_debian12_adduser_3.130.patch 2024-04-10 12:02:42.000000000 +0000 @@ -0,0 +1,24 @@ +[setup] Fix the oar user creation with Debian12 (adduser > 3.130) + +Backported from upstream 2.5.10 + +adduser >= 3.130 changes to way adduser's --disabled-(login|password) options work. +Need to force the "disabled password flag to '*' instead of '!', so that ssh connection are allowed. + +From: Pierre Neyron + +diff --git a/setup/common.sh.in b/setup/common.sh.in +index a2eef6f7..bbfdf74e 100644 +--- a/setup/common.sh.in ++++ b/setup/common.sh.in +@@ -30,6 +30,10 @@ create_oar_user() { + --no-create-home \ + --disabled-password \ + ${OAROWNER} 2>/dev/null || true ++ # Force the "disabled password flag to '*' instead of '!'. ++ # Required in Debian12 (adduser >= 3.130), which changes to way ++ # adduser's --disabled-(login|password) options work. ++ usermod -p '*' ${OAROWNER} || true + ;; + *) + useradd --system \ diff -Nru oar-2.5.9/debian/patches/series oar-2.5.9/debian/patches/series --- oar-2.5.9/debian/patches/series 2021-01-11 15:44:43.000000000 +0000 +++ oar-2.5.9/debian/patches/series 2024-04-10 12:02:42.000000000 +0000 @@ -0,0 +1,2 @@ +fix_the_oar_user_creation_with_debian12_adduser_3.130.patch +drawgantt-svg_fixes_for_php_8.patch