[pkg-nagios-changes] [Git][nagios-team/nagvis][master] 9 commits: Update branch in gbp.conf & Vcs-Git URL.

Bas Couwenberg (@sebastic) gitlab at salsa.debian.org
Sun Jun 11 15:51:46 BST 2023



Bas Couwenberg pushed to branch master at Debian Nagios Maintainer Group / nagvis


Commits:
df03eda4 by Bas Couwenberg at 2023-05-09T14:02:44+02:00
Update branch in gbp.conf & Vcs-Git URL.

- - - - -
c97e48e6 by Bas Couwenberg at 2023-05-09T14:28:50+02:00
New upstream version 1.9.35
- - - - -
ac15c68f by Bas Couwenberg at 2023-05-09T14:28:57+02:00
Update upstream source from tag 'upstream/1.9.35'

Update to upstream version '1.9.35'
with Debian dir fa9cbdcc618e598ab4847b84a98ce7bb12a7db37
- - - - -
e3927e2e by Bas Couwenberg at 2023-05-09T14:29:12+02:00
New upstream release.

- - - - -
d9d3f043 by Bas Couwenberg at 2023-05-09T14:29:56+02:00
Refresh patches.

- - - - -
af707923 by Bas Couwenberg at 2023-05-09T14:30:15+02:00
Set distribution to experimental.

- - - - -
852de2ca by Bas Couwenberg at 2023-05-15T05:38:38+02:00
Update Brazilian Portuguese debconf translation. (closes: #1036067)

- - - - -
2f803fc7 by Bas Couwenberg at 2023-06-11T16:45:36+02:00
Revert "Update branch in gbp.conf & Vcs-Git URL."

This reverts commit df03eda44d20cbb406e5600614f1425c5b6bc25d.

- - - - -
ba5f01eb by Bas Couwenberg at 2023-06-11T16:45:36+02:00
Set distribution to unstable.

- - - - -


14 changed files:

- ChangeLog
- debian/changelog
- debian/patches/config.patch
- debian/po/pt_BR.po
- docs/de_DE/about.html
- docs/en_US/about.html
- share/server/core/classes/CoreAuthModPDO.php
- share/server/core/classes/CoreLogonMultisite.php
- share/server/core/classes/CoreModMultisite.php
- share/server/core/classes/CorePDOHandler.php
- share/server/core/classes/GlobalBackendmklivestatus.php
- share/server/core/classes/GlobalMainCfg.php
- share/server/core/classes/objects/NagVisStatefulObject.php
- share/server/core/defines/global.php


Changes:

=====================================
ChangeLog
=====================================
@@ -1,3 +1,19 @@
+1.9.35
+Core
+  * FIX: Fix PHP 8.2 various incompatibilities
+  * FIX: Fix PHP 8.1 fsockopen incompatibility (#337 Thanks to loocars)
+  * FIX: Fix Checkmk Snapin displaying status output when hovering the state icon
+  * FIX: Disable state preview for worldmaps in Checkmk snapin. The state
+    previews do not work correctly for worldmaps. To be able to calculate the
+    state preview, we would need the area of the map the user would see when
+    opening the map. To be able to do so, we need this information when
+    rendering the snapin: a) the viewport size and b) the NagVis javascript
+    code. Both is not available in this situation, so we can not correctly
+    render it. In the past the computation was done based on information cached
+    in NagVis, which could produce aggregated states, but these might be
+    misleading as they did not necessarily represent the state of the objects
+    you see in the map.
+
 1.9.34
 Core:
   * Checkmk BI backend: Add verify_peer, ca_path and verify_depth options to configure


=====================================
debian/changelog
=====================================
@@ -1,12 +1,23 @@
-nagvis (1:1.9.34-2) UNRELEASED; urgency=medium
+nagvis (1:1.9.35-1) unstable; urgency=medium
 
   * Team upload.
+  * Update Brazilian Portuguese debconf translation.
+    (closes: #1036067)
+  * Move from experimental to unstable.
+
+ -- Bas Couwenberg <sebastic at debian.org>  Sun, 11 Jun 2023 16:44:53 +0200
+
+nagvis (1:1.9.35-1~exp1) experimental; urgency=medium
+
+  * Team upload.
+  * New upstream release.
   * Add Rules-Requires-Root to control file.
   * Update Brazilian Portuguese debconf translation.
     (closes: #1028256)
   * Bump Standards-Version to 4.6.2, no changes.
+  * Refresh patches.
 
- -- Bas Couwenberg <sebastic at debian.org>  Wed, 30 Nov 2022 08:19:19 +0100
+ -- Bas Couwenberg <sebastic at debian.org>  Tue, 09 May 2023 14:29:59 +0200
 
 nagvis (1:1.9.34-1) unstable; urgency=medium
 


=====================================
debian/patches/config.patch
=====================================
@@ -6,7 +6,7 @@ Reviewed-by: Markus Frosch <markus at lazyfrosch.de>
 
 --- a/share/server/core/classes/GlobalMainCfg.php
 +++ b/share/server/core/classes/GlobalMainCfg.php
-@@ -1625,11 +1625,11 @@ class GlobalMainCfg {
+@@ -1634,11 +1634,11 @@ class GlobalMainCfg {
       * @author 	Lars Michelsen <lm at larsmichelsen.com>
       */
      private function setPathsByBase($base, $htmlBase) {


=====================================
debian/po/pt_BR.po
=====================================
@@ -2,14 +2,14 @@
 # Copyright (C) 2012 THE nagvis'S COPYRIGHT HOLDER
 # This file is distributed under the same license as the nagvis package.
 # Eder L. Marques <eder at edermarques.net>, 2012
-# Paulo Henrique de Lima Santana (phls) <phls at debian.org>, 2022-2023.
+# Paulo Henrique de Lima Santana (phls) <phls at debian.org>, 2023.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: nagvis_1:1.9.34-1\n"
+"Project-Id-Version: nagvis_1 1.9.34-1\n"
 "Report-Msgid-Bugs-To: nagvis at packages.debian.org\n"
 "POT-Creation-Date: 2020-01-21 20:05+0100\n"
-"PO-Revision-Date: 2023-01-08 13:25-0300\n"
+"PO-Revision-Date: 2023-05-14 18:52-0300\n"
 "Last-Translator: Paulo Henrique de Lima Santana (phls) <phls at debian.org>\n"
 "Language-Team: Brazilian Portuguese <debian-l10n-portuguese at lists.debian."
 "org>\n"
@@ -17,8 +17,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Gtranslator 42.0\n"
 "Plural-Forms: nplurals=2; plural=(n > 1)\n"
+"X-Generator: Gtranslator 42.0\n"
 
 #. Type: select
 #. Choices
@@ -40,7 +40,7 @@ msgid ""
 "live broker backend."
 msgstr ""
 "O pacote NagVis suporta tanto o Icinga quanto o Nagios, usando o backend "
-"intermediário check-mk-live."
+"broker check-mk-live."
 
 #. Type: select
 #. Description
@@ -50,7 +50,7 @@ msgid ""
 "monitoring suite, please choose \"other\". You'll have to configure it "
 "manually."
 msgstr ""
-"Se você quiser usar o NagVis com um backend diferente ou com uma suíte de "
+"Se você quiser usar o NagVis com um backend diferente ou uma suíte de "
 "monitoramento diferente, por favor, escolha \"outra\". Você terá que "
 "configurá-la manualmente."
 
@@ -59,7 +59,7 @@ msgstr ""
 #: ../nagvis.templates:3001
 msgid "Delete NagVis data when purging the package?"
 msgstr ""
-"Apagar os dados do NagVis quando remover completamente (purge) o pacote?"
+"Apagar os dados do NagVis quando remover completamente (\"purge\") o pacote?"
 
 #. Type: boolean
 #. Description
@@ -73,5 +73,5 @@ msgstr ""
 "O NagVis cria arquivos em /var/{cache,lib}/nagvis e /etc/nagvis (por "
 "exemplo, imagens de fundo e arquivos de mapa), incluindo uma pequena base de "
 "dados para autenticação. Se você não precisa de nenhum desses arquivos, eles "
-"podem ser removidos agora, ou você pode mantê-los e fazer a limpeza "
+"podem ser removidos agora, ou você pode querer mantê-los e fazer a limpeza "
 "manualmente depois."


=====================================
docs/de_DE/about.html
=====================================
@@ -35,7 +35,7 @@
         <ul>
             <li><a href="http://mathias-kettner.de/checkmk_livestatus.html">mklivestatus</a> (Default seit NagVis 1.5)</li>
             <li><a href="http://www.nagios.org/download/addons">NDOUtils</a> / <a href="http://docs.icinga.org/latest/en/ch12">IDOUtils</a> (erfordert MySQL)</li>
-            <li><a href="http://www.op5.org/community/projects/merlin">merlin</a> (erfordert MySQL)</li>
+            <li><a href="https://github.com/ITRS-Group/monitor-merlin">merlin</a> (erfordert MySQL)</li>
         </ul>
         Das Backend bekommt die Informationen vom Nagios-Prozess (mklivestatus) oder von einer Datenbank (NDOUtils/IDOUtils, merlin).
         <p>Sie können alle Nagios-Objekte (Hosts, Services, Hostgroups, Servicegroups) zu so genannten Maps hinzufügen.


=====================================
docs/en_US/about.html
=====================================
@@ -27,7 +27,7 @@
         <ul>
         <li><a href="http://mathias-kettner.de/checkmk_livestatus.html">mklivestatus</a> (default since NagVis 1.5)</li>
         <li><a href="http://www.nagios.org/download/addons">NDOUtils</a> / <a href="http://docs.icinga.org/latest/en/ch12">IDOUtils</a> (requires MySQL)</li>
-        <li><a href="http://www.op5.org/community/projects/merlin">merlin</a> (requires MySQL)</li>
+        <li><a href="https://github.com/ITRS-Group/monitor-merlin">merlin</a> (requires MySQL)</li>
         </ul>
         The backend gets the information from the Nagios process (mklivestatus) or from a database (NDOUtils/IDOUtils, merlin).
         <p>You can place all objects from Nagios (Host, Services, Hostgroups, Servicegroups) on so called maps. Each map can be configured through its own


=====================================
share/server/core/classes/CoreAuthModPDO.php
=====================================
@@ -24,6 +24,7 @@
 
 class CoreAuthModPDO extends CoreAuthModule {
     private $USERCFG;
+    private $DB;
 
     private $iUserId = -1;
     private $sUsername = '';


=====================================
share/server/core/classes/CoreLogonMultisite.php
=====================================
@@ -27,13 +27,14 @@ class CoreLogonMultisite extends CoreLogonModule {
     private $htpasswdPath;
     private $serialsPath;
     private $secretPath;
+    private $cookieVersion;
     private $authFile;
 
     public function __construct() {
         $this->htpasswdPath  = cfg('global', 'logon_multisite_htpasswd');
         $this->serialsPath   = cfg('global', 'logon_multisite_serials');
         $this->secretPath    = cfg('global', 'logon_multisite_secret');
-        $this->cookieVersion = cfg('global', 'logon_multisite_cookie_version');
+        $this->cookieVersion = intval(cfg('global', 'logon_multisite_cookie_version'));
 
         // When the auth.serial file exists, use this instead of the htpasswd
         // for validating the cookie. The structure of the file is equal, so
@@ -67,7 +68,7 @@ class CoreLogonMultisite extends CoreLogonModule {
     }
 
     private function loadSecret() {
-        return trim(file_get_contents($this->secretPath));
+        return file_get_contents($this->secretPath);
     }
 
     private function generateHash($username, $session_id, $user_secret) {


=====================================
share/server/core/classes/CoreModMultisite.php
=====================================
@@ -93,6 +93,7 @@ class CoreModMultisite extends CoreModule {
             "alias" => $map['alias'],
             "url" => cfg('paths', 'htmlbase').'/index.php?mod=Map&act=view&show='.$map['name'],
             "summary_state" => $map["summary_state"],
+            "summary_output" => $map["summary_output"],
             "summary_in_downtime" => $map['summary_in_downtime'],
             "summary_problem_has_been_acknowledged" => $map['summary_problem_has_been_acknowledged'],
             "summary_stale" => $map['summary_stale'],
@@ -158,49 +159,77 @@ class CoreModMultisite extends CoreModule {
             );
             $MAP->MAPOBJ->setConfiguration($objConf);
 
+            $sources = $MAPCFG->getValue(0, 'sources') !== false ? $MAPCFG->getValue(0, 'sources') : array();
+            $is_worldmap = in_array('worldmap', $sources);
+
+            $state = null;
             if($config_error !== null) {
-                $MAP->MAPOBJ->clearMembers();
-                $MAP->MAPOBJ->setState(array(
+                $state = array(
                     ERROR,
                     l('Map Configuration Error: ').$config_error,
                     null,
                     null,
                     null,
-                ));
-                $MAP->MAPOBJ->fetchIcon();
+                );
             } elseif($error !== null) {
-                $MAP->MAPOBJ->clearMembers();
-                $MAP->MAPOBJ->setState(array(
+                $state = array(
                     ERROR,
                     l('Error: ').$error,
                     null,
                     null,
                     null,
-                ));
-                $MAP->MAPOBJ->fetchIcon();
-            } elseif($MAP->MAPOBJ->checkMaintenance(0)) {
-                $MAP->MAPOBJ->fetchIcon();
-            } else {
-                $MAP->MAPOBJ->clearMembers();
-                $MAP->MAPOBJ->setState(array(
-                    UNKNOWN,
+                );
+            } elseif($is_worldmap) {
+                // To give the correct state aggregation for the area of the
+                // worldmap the user would see when opening the worldmap, we would
+                // need this:
+                //
+                //   1. Viewport resolution of the users browser
+                //   2. Code needed to compute the bbox (LeafletJS)
+                //
+                // The first could be provided by the Checkmk frontend code. But
+                // the later one is not available there. We also don't have code
+                // to compute it in the PHP code. So, instead of doing things that
+                // would surprise users, we just skip the state computation for
+                // worldmaps here.
+                //
+                // The NagVis internal overview page needs something similar, but
+                // there we have everything we need. See the function addMap() in
+                // share/frontend/nagvis-js/js/ViewOverview.js.
+                $state = array(
+                    PENDING,
+                    l('Worldmaps don\'t support state preview'),
+                    null,
+                    null,
+                    null,
+                );
+            } elseif(!$MAP->MAPOBJ->checkMaintenance(0)) {
+                $state = array(
+                    PENDING,
                     l('mapInMaintenance'),
                     null,
                     null,
                     null
-                ));
-                $MAP->MAPOBJ->fetchIcon();
+                );
+            } else {
+                $MAP->MAPOBJ->queueState(GET_STATE, GET_SINGLE_MEMBER_STATES);
             }
 
-            $MAP->MAPOBJ->queueState(GET_STATE, GET_SINGLE_MEMBER_STATES);
-            $aObjs[] = $MAP->MAPOBJ;
+            $aObjs[] = array($MAP->MAPOBJ, $state);
         }
 
         $_BACKEND->execute();
 
         $aMaps = Array();
-        foreach($aObjs AS $MAP) {
-            $MAP->applyState();
+        foreach($aObjs AS list($MAP, $state)) {
+            if ($state !== null) {
+                $MAP->clearMembers();
+                $MAP->setState($state);
+                $MAP->setSummary($state);
+            } else {
+                $MAP->applyState();
+            }
+
             $MAP->fetchIcon();
 
             $aMaps[] = $MAP->getObjectInformation();


=====================================
share/server/core/classes/CorePDOHandler.php
=====================================
@@ -44,6 +44,12 @@ class CorePDOHandler {
     private $file = null;
     private $dsn = null;
 
+    private $driver = null;
+    private $data = null;
+    private $updating = false;
+    private $lastErrorInfo = null;
+    private $inTrans = false;
+
     // needs to be initialized after class declaration because directly
     // initializing it here is a syntax error in PHP 5.3
     private static $DRIVERS = null;


=====================================
share/server/core/classes/GlobalBackendmklivestatus.php
=====================================
@@ -193,7 +193,7 @@ class GlobalBackendmklivestatus implements GlobalBackendInterface {
         // errors later with an own error message
         // FIXME: Maybe use pfsockopen in the future to use persistent connections
         if($this->socketType === 'unix') {
-            $this->SOCKET = fsockopen('unix://'.$this->socketPath, NULL, $errno, $errstr, (float) cfg('backend_'.$this->backendId, 'timeout'));
+            $this->SOCKET = fsockopen('unix://'.$this->socketPath, -1, $errno, $errstr, (float) cfg('backend_'.$this->backendId, 'timeout'));
 
         } elseif($this->socketType === 'tcp-tls') {
             if (cfg('backend_'.$this->backendId, 'verify_tls_peer') == true) {


=====================================
share/server/core/classes/GlobalMainCfg.php
=====================================
@@ -40,6 +40,7 @@ function listAvailableLanguages() {
 class GlobalMainCfg {
     private $useCache = true;
     private $CACHE;
+    private $PUCACHE;
 
     protected $config = Array();
     protected $preUserConfig = null;


=====================================
share/server/core/classes/objects/NagVisStatefulObject.php
=====================================
@@ -211,6 +211,15 @@ class NagVisStatefulObject extends NagVisObject {
         return 'normal';
     }
 
+    /**
+     * PUBLIC setSummary()
+     *
+     * Set the summary object
+     */
+    public function setSummary($s) {
+        $this->sum = $s;
+    }
+
     /**
      * PUBLIC setSummaryState()
      *


=====================================
share/server/core/defines/global.php
=====================================
@@ -23,7 +23,7 @@
  *****************************************************************************/
  
 // NagVis Version
-define('CONST_VERSION', '1.9.34');
+define('CONST_VERSION', '1.9.35');
 
 // Set PHP error handling to standard level
 // Different levels for php versions below 5.1 because PHP 5.1 reports



View it on GitLab: https://salsa.debian.org/nagios-team/nagvis/-/compare/18da95f2e2ecc5d16041783b726b3eb103c2ba05...ba5f01eb7460079232fbf1380540006476f9c5e0

-- 
View it on GitLab: https://salsa.debian.org/nagios-team/nagvis/-/compare/18da95f2e2ecc5d16041783b726b3eb103c2ba05...ba5f01eb7460079232fbf1380540006476f9c5e0
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-nagios-changes/attachments/20230611/f9b83a83/attachment-0001.htm>


More information about the pkg-nagios-changes mailing list