From 5725b76f5631efd1cffed114174d3e36f5a14b55 Mon Sep 17 00:00:00 2001
From: Davide Madrisan <d.madrisan@proton.me>
Date: Mon, 1 Apr 2024 23:03:40 +0200
Subject: [PATCH] =?UTF-8?q?Version=2033=20('=C5=9Amigus-Dyngus')?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Davide Madrisan <d.madrisan@proton.me>
---
 NEWS.md          | 82 ++++++++++++++++++++++++++++++++++++++++++++++++
 README.md        |  2 +-
 VERSION          |  2 +-
 debian/changelog | 10 ++++++
 4 files changed, 94 insertions(+), 2 deletions(-)

diff --git a/NEWS.md b/NEWS.md
index 5944aaa..69d7a3c 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,3 +1,85 @@
+## Version 33 ("Śmigus-Dyngus")
+### Apr 1st, 2024
+
+#### BREAKING CHANGES
+
+##### Build
+
+ * lib/container: Podman 3.0+ API support.
+   This library and the check_container plugin are to be considered a PoC, i.e. not production-ready code.
+   Note that now varlink is no more a build requirement.
+   The plugins `check_docker` and `check_podman` were merged into `check_container`.
+ * rename `--with-systemd` to `--enable-systemd` for consistency with the other optional boolean options.
+
+#### FIXES
+
+##### Plugins
+
+ * check_container: passing on non running `--image` no longer produces a program core dump.
+ * check_memory: remove comma from perfdata (issues#140).
+   Thanks to [Grischa Zengel (ggzengel)](https://github.com/ggzengel) for reporting this problem.
+
+##### Libraries
+
+ * lib/*info_procps: fix build with `--enable-libprocps`.
+
+##### Tests
+
+ * tests: fix tests tslibxstrton_sizetollint and tslibpressure on 32-bit architectures.
+   See: https://bugs.gentoo.org/927490
+
+#### ENHANCEMENTS / CHANGES
+
+ * check_container: print short container names in the plugin perfdata.
+   Example: `docker.io/traefik:v2.9.8` becomes `traefik:v2.9.8`.
+
+##### Test framework
+
+ * ci: add gentoo to os matrix in github workflows.
+
+### GIT DIFF
+```
+ .github/workflows/build-checks.yml                               |  16 ++---
+ DEVELOPERS.md                                                    |  74 --------------------
+ README.md                                                        |  15 ++---
+ configure.ac                                                     |  91 +++++++++++--------------
+ debian/Makefile.am                                               |   2 +-
+ debian/changelog                                                 |   6 ++
+ debian/control                                                   |   8 +--
+ debian/nagios-plugins-linux-container.install                    |   1 +
+ debian/nagios-plugins-linux-docker.install                       |   1 -
+ include/Makefile.am                                              |   5 +-
+ include/{container_docker.h => container.h}                      |   8 ++-
+ include/container_podman.h                                       | 118 --------------------------------
+ include/json_helpers.h                                           |   2 +
+ include/xstrton.h                                                |   4 +-
+ lib/Makefile.am                                                  |  14 +---
+ lib/collection.c                                                 |   1 +
+ lib/container.c                                                  | 428 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ lib/container_docker_count.c                                     | 256 ---------------------------------------------------------------------
+ lib/container_docker_memory.c                                    | 175 ------------------------------------------------
+ lib/container_podman.c                                           | 374 -----------------------------------------------------------------------------------------------------
+ lib/container_podman_count.c                                     | 115 -------------------------------
+ lib/container_podman_stats.c                                     | 180 -------------------------------------------------
+ lib/json_helpers.c                                               | 128 ++++++++++++++++++++++++++++++++++-
+ lib/meminfo_procps.c                                             |   4 +-
+ lib/pressure.c                                                   |   1 +
+ lib/vminfo_procps.c                                              |   4 +-
+ lib/xstrton.c                                                    |  20 +++---
+ packages/specs/nagios-plugins-linux.spec.in                      |  48 +++++--------
+ plugins/Makefile.am                                              |  21 ++----
+ plugins/{check_docker.c => check_container.c}                    | 150 +++++++++++++++++------------------------
+ plugins/check_filecount.c                                        |  10 +--
+ plugins/check_podman.c                                           | 262 -----------------------------------------------------------------------
+ tests/Makefile.am                                                |  23 +++----
+ tests/ts_container_podman_GetContainerStats.data                 |   1 -
+ tests/ts_container_podman_ListContainers.data                    |   1 -
+ tests/ts_procpressurecpu.data                                    |   2 +-
+ tests/{tslibcontainer_docker_count.c => tslibcontainer_count.c}  |  43 ++++++------
+ tests/tslibcontainer_docker_memory.c                             | 116 --------------------------------
+ tests/tslibpressure.c                                            |   2 +-
+```
+
 ## Version 32 ("Gematria")
 ### Jan 25th, 2024
 
diff --git a/README.md b/README.md
index 37cbc4a..bb684fa 100644
--- a/README.md
+++ b/README.md
@@ -16,7 +16,7 @@
 Here is the list of the available plugins:
 
 * **check_clock** - returns the number of seconds elapsed between local time and Nagios server time
-* **check_container** - checks the number of running docker/podman containers (:warning: *pre-alpha*, requires *libcurl* version 7.40.0+)
+* **check_container** - checks docker/podman containers :warning: *pre-alpha*, requires *libcurl* version 7.40.0+
 * **check_cpu** - checks the CPU (user mode) utilization
 * **check_cpufreq** - displays the CPU frequency characteristics
 * **check_cswch** - checks the total number of context switches across all CPUs
diff --git a/VERSION b/VERSION
index f5c8955..bb95160 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-32
+33
diff --git a/debian/changelog b/debian/changelog
index f14bcc7..a367d0a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+nagios-plugins-linux (33-1) stable; urgency=low
+  * Release 33 "Śmigus-Dyngus":
+     - Podman 3.0+ API support in check_container and fixes
+     - build: rename --with-systemd to --enable-systemd.
+     - fix: remove comma from perfdata in check_memory
+     - fix build with --enable-libprocps
+     - tests: fix tests on 32-bit architectures
+
+ -- Davide Madrisan <d.madrisan@proton.me>  Mon,  1 Apr 2024 23:00:54 +0200
+
 nagios-plugins-linux (32-1) stable; urgency=low
   * Release 32 "Gematria":
      - Fixes in check_network, check_users, and check_cpufreq.