diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-03-29 07:13:27 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-03-29 07:13:27 +0000 |
commit | 3ed757b9cee2e1fe2b18c4630539ccd36f0e0f52 (patch) | |
tree | 647dcdb9239b18e4313d555b2770bd1c339bcebc /net-analyzer | |
parent | c2d0ee62b92dac1051340f2da2f862794cf1bf9f (diff) |
gentoo auto-resync : 29:03:2024 - 07:13:27
Diffstat (limited to 'net-analyzer')
-rw-r--r-- | net-analyzer/Manifest.gz | bin | 43592 -> 43596 bytes | |||
-rw-r--r-- | net-analyzer/nagios-plugins-linux-madrisan/Manifest | 3 | ||||
-rw-r--r-- | net-analyzer/nagios-plugins-linux-madrisan/files/nagios-plugins-linux-madrisan-32-x86-fixes.patch | 148 | ||||
-rw-r--r-- | net-analyzer/nagios-plugins-linux-madrisan/nagios-plugins-linux-madrisan-32-r1.ebuild (renamed from net-analyzer/nagios-plugins-linux-madrisan/nagios-plugins-linux-madrisan-32.ebuild) | 1 |
4 files changed, 151 insertions, 1 deletions
diff --git a/net-analyzer/Manifest.gz b/net-analyzer/Manifest.gz Binary files differindex 1bc620e6104d..de0aa5ed2823 100644 --- a/net-analyzer/Manifest.gz +++ b/net-analyzer/Manifest.gz diff --git a/net-analyzer/nagios-plugins-linux-madrisan/Manifest b/net-analyzer/nagios-plugins-linux-madrisan/Manifest index cc4bc056e41a..bec29eab1371 100644 --- a/net-analyzer/nagios-plugins-linux-madrisan/Manifest +++ b/net-analyzer/nagios-plugins-linux-madrisan/Manifest @@ -1,6 +1,7 @@ AUX nagios-plugins-linux-madrisan-32-rename-with-systemd.patch 3351 BLAKE2B 911021c3f6b566993a26ebc75359b86f8717fd6fb112e8f3fd749a149ca0eecb7fd3073b02d96eb9ce2361190946afaac0d4fb7bf3d2101b6cba04106ee2cbdd SHA512 dceb3f991d8d9ef3b7b05df5a39e444285401e5402874f0d5d3a7553a71238b7899141209739aef0af723929d8020363b10c4869f06f2d2650a7ecbf43c349e6 +AUX nagios-plugins-linux-madrisan-32-x86-fixes.patch 5968 BLAKE2B 649c1224d5b426ed5434f802c1628a1502b7738d7c7cf7e5e114b23524ec00fe4923e1d8558239bacbf1113ddd6d6f9acacf4add605979616136fd53b57897b7 SHA512 98fb5e889600ce1b497021d0bda4711b089f877d97234607230d9e3bf83ed68444d9b109c7b50bf265453ee987029e85911851db43d3ea53834c9ef5756e6529 DIST nagios-plugins-linux-madrisan-31.tar.xz 401556 BLAKE2B 5eca1e96f14b518d9ab5304bb2a54ba47f194bf22cea8445d7fef0769c3b14c800e4ed24c5c0ca32f0daf53aa81a0bd52234478c606a8d2d1a12e96abb90179c SHA512 34d8ae400766e9c7ddd246998f004a50c87ec9ad8dc13deb8e31fc6fcfa07fbe5af2f091d0523b93d06b26438d1a25240bd82d60946e5897bc257fff7c1b73d0 DIST nagios-plugins-linux-madrisan-32.tar.xz 402976 BLAKE2B ef66934315f3ddbee1a2d84723477773549c9a5ed731853780ef15b9f44ea462256f730f854d517415dce2b944a4bf0abcbfa0623a7a1faffef4b5bbf162af76 SHA512 42392c123961bb17192344f20973a3d26c74aeef112638384d5b7a687e7117a3378d6efdb07ad15a7309f5db621404602e9c2beb0dcc4e207924d0d3a466ab59 EBUILD nagios-plugins-linux-madrisan-31.ebuild 1108 BLAKE2B 2aca6ca84f1342ac0c5aa44e70ad6372d97650bd133335066980a707a0bf0607cba5ede1a8f1cd39c95cd7f3a4d7ed0106407b9d7dda2cffcf23e3756428a455 SHA512 026aa2ff3049aee60ee56d9ea0948cd5b4c0bbdd83be5c7f1a3674bbf39c41ded84f87d87da3b7034cb0a59499263a68d1d620d136c82488c4789dea94f424a8 -EBUILD nagios-plugins-linux-madrisan-32.ebuild 1237 BLAKE2B 3ac90c4208a006e04538420c7ba1e1de74bcd999928c13eb9731ec8609367d2fa21de466144147550f3a549a86b8b2f578ac6cc96d3ec45daa2fd0517f6003f7 SHA512 996526fa0d18f42ad56b756c3b092b10f0197718a7d8e069caac4325b5dd5b9b9b40d3a25edd725e460ba9f7a3b94d9b4dbb879b136b7eff30cc8744daef191f +EBUILD nagios-plugins-linux-madrisan-32-r1.ebuild 1273 BLAKE2B 81af8bb216bd268cb214c25ff30dcef47ea7e95b379ac718499aea7ecd6de1cf03dbbd676a05942cc4eb64a3ad0339cfa2c3599f4efb30d53979a729b9edbebf SHA512 ca24fe09ceae69662dc9094fe2fe387fb6f4e404dae5964da8ae55bc714fb7e383c380c89ca5341dd160bbbccbecf2615281cddc2641c31111debe17c217125c MISC metadata.xml 613 BLAKE2B c6c247d18381bc631d4c818acbb3051ec35c243519d289816bcd9f9742c45ffa870d552651b0509b8607b8558a35216afaf609a4747df99cba1d4192c251e2f2 SHA512 9648f98d75b34851252c147db60cbdd5d2ca6bcc42555a65170f79adb911ba175f28b1d286e686be7cbb927bb623e09837dd683e42b95cc045507e23ca51b4d9 diff --git a/net-analyzer/nagios-plugins-linux-madrisan/files/nagios-plugins-linux-madrisan-32-x86-fixes.patch b/net-analyzer/nagios-plugins-linux-madrisan/files/nagios-plugins-linux-madrisan-32-x86-fixes.patch new file mode 100644 index 000000000000..657cd458f06e --- /dev/null +++ b/net-analyzer/nagios-plugins-linux-madrisan/files/nagios-plugins-linux-madrisan-32-x86-fixes.patch @@ -0,0 +1,148 @@ +https://github.com/madrisan/nagios-plugins-linux/pull/146 + +From d09bfd1b3974743af4b719629f59b5b96e1393a1 Mon Sep 17 00:00:00 2001 +From: Davide Madrisan <d.madrisan@proton.me> +Date: Wed, 27 Mar 2024 09:29:59 +0100 +Subject: [PATCH 1/3] fix: size_t variables on 32 and 64 bits arch have + different type + +Fix the following warning on 32-bits architectures: + + In file included from ../lib/container_docker_count.c:44, + from tslibcontainer_docker_count.c:33: + ../lib/container_docker_count.c: In function 'docker_running_containers': + ../include/logging.h:28:44: warning: format '%lu' expects argument of type 'long unsigned int', + but argument 3 has type 'size_t' {aka 'unsigned int'} [-Wformat=] + 28 | # define dbg(format, ...) fprintf (stdout, "DEBUG: " format, ##__VA_ARGS__) + | ^~~~~~~~~ + ../lib/container_docker_count.c:213:3: note: in expansion of macro 'dbg' + 213 | dbg ("%lu bytes retrieved\n", chunk.size); + | ^~~ + +Signed-off-by: Davide Madrisan <d.madrisan@proton.me> +--- a/lib/container_docker_count.c ++++ b/lib/container_docker_count.c +@@ -1,7 +1,7 @@ + // SPDX-License-Identifier: GPL-3.0-or-later + /* + * License: GPLv3+ +- * Copyright (c) 2018 Davide Madrisan <davide.madrisan@gmail.com> ++ * Copyright (c) 2018,2024 Davide Madrisan <davide.madrisan@gmail.com> + * + * A library for checking for Docker exposed metrics. + * +@@ -210,7 +210,7 @@ docker_running_containers (unsigned int *count, const char *image, + #endif /* NPL_TESTING */ + + assert (chunk.memory); +- dbg ("%lu bytes retrieved\n", chunk.size); ++ dbg ("%zu bytes retrieved\n", chunk.size); + dbg ("json data: %s", chunk.memory); + + hashtable = docker_json_parser (chunk.memory, "Image", 1); + +From 4574e9ed77ebda062279622bb3d8678fa983d272 Mon Sep 17 00:00:00 2001 +From: Davide Madrisan <d.madrisan@proton.me> +Date: Wed, 27 Mar 2024 17:36:04 +0100 +Subject: [PATCH 2/3] fix: workaround for a round issue on 32 bits + +On Gentoo Base System release 2.14 for 32-bits + + (unsigned long)(6.26*100) = 625 + +So the test fails. +As a workaround modify the data file used by the test. + +Signed-off-by: Davide Madrisan <d.madrisan@proton.me> +--- a/tests/ts_procpressurecpu.data ++++ b/tests/ts_procpressurecpu.data +@@ -1 +1 @@ +-some avg10=7.48 avg60=6.26 avg300=6.66 total=200932088 ++some avg10=7.48 avg60=6.25 avg300=6.66 total=200932088 +--- a/tests/tslibpressure.c ++++ b/tests/tslibpressure.c +@@ -103,7 +103,7 @@ mymain (void) + /* we multiply by 100 the averages to somewhat transform + * the double values into integer ones */ + DO_TEST ("cpu some avg10", psi_oneline->avg10 * 100, 748ULL); +- DO_TEST ("cpu some avg60", psi_oneline->avg60 * 100, 626ULL); ++ DO_TEST ("cpu some avg60", psi_oneline->avg60 * 100, 625ULL); + DO_TEST ("cpu some avg300", psi_oneline->avg300 * 100, 666ULL); + DO_TEST ("cpu single total", psi_oneline->total, 200932088ULL); + + +From c90afc02705fd6c32a6764741616b4e17688117b Mon Sep 17 00:00:00 2001 +From: Davide Madrisan <d.madrisan@proton.me> +Date: Wed, 27 Mar 2024 21:06:25 +0100 +Subject: [PATCH 3/3] fix: fix test tslibxstrton_sizetollint on 32-bit arch + +Fix the following errors: + + 1) check function sizetollint with arg 1024b ... OK + 2) check function sizetollint with arg 8k ... OK + 3) check function sizetollint with arg 50m ... OK + 4) check function sizetollint with arg 2g ... OK + 5) check function sizetollint with arg 3t ... FAILED + 6) check function sizetollint with arg 2p ... FAILED + 7) check function sizetollint with arg 1024B ... OK + 8) check function sizetollint with arg 8K ... OK + 9) check function sizetollint with arg 50M ... OK + 10) check function sizetollint with arg 2G ... OK + 11) check function sizetollint with arg 3T ... FAILED + 12) check function sizetollint with arg 2P ... FAILED + +The long int is not large enough on 32-bit architectures. + +Signed-off-by: Davide Madrisan <d.madrisan@proton.me> +--- a/tests/tslibxstrton_sizetoint64.c ++++ b/tests/tslibxstrton_sizetoint64.c +@@ -1,7 +1,7 @@ + // SPDX-License-Identifier: GPL-3.0-or-later + /* + * License: GPLv3+ +- * Copyright (c) 2022 Davide Madrisan <davide.madrisan@gmail.com> ++ * Copyright (c) 2022,2024 Davide Madrisan <davide.madrisan@gmail.com> + * + * Unit test for lib/xstrton.c + * +@@ -29,11 +29,11 @@ + typedef struct test_data + { + char *size; +- int64_t expect_value; ++ long long int expect_value; + } test_data; + + static int +-test_sizetoint64 (const void *tdata) ++test_sizetollint (const void *tdata) + { + const struct test_data *data = tdata; + long long int result; +@@ -57,19 +57,19 @@ mymain (void) + .size = SIZE, \ + .expect_value = EXPECT_VALUE, \ + }; \ +- if (test_run("check function sizetoint64 with arg " SIZE, \ +- test_sizetoint64, (&data)) < 0) \ ++ if (test_run("check function sizetollint with arg " SIZE, \ ++ test_sizetollint, (&data)) < 0) \ + ret = -1; \ + } \ + while (0) + + /* test the function sizetoint64() */ + +-#define ONE_KILOBYTE 1000UL +-#define ONE_MEGABYTE (1000UL * ONE_KILOBYTE) +-#define ONE_GIGABYTE (1000UL * ONE_MEGABYTE) +-#define ONE_TERABYTE (1000UL * ONE_GIGABYTE) +-#define ONE_PETABYTE (1000UL * ONE_TERABYTE) ++#define ONE_KILOBYTE 1000ULL ++#define ONE_MEGABYTE (1000ULL * ONE_KILOBYTE) ++#define ONE_GIGABYTE (1000ULL * ONE_MEGABYTE) ++#define ONE_TERABYTE (1000ULL * ONE_GIGABYTE) ++#define ONE_PETABYTE (1000ULL * ONE_TERABYTE) + + DO_TEST ("1024b", 1024); + DO_TEST ("8k", 8 * ONE_KILOBYTE); diff --git a/net-analyzer/nagios-plugins-linux-madrisan/nagios-plugins-linux-madrisan-32.ebuild b/net-analyzer/nagios-plugins-linux-madrisan/nagios-plugins-linux-madrisan-32-r1.ebuild index ef628d4e230c..bcd369b7e003 100644 --- a/net-analyzer/nagios-plugins-linux-madrisan/nagios-plugins-linux-madrisan-32.ebuild +++ b/net-analyzer/nagios-plugins-linux-madrisan/nagios-plugins-linux-madrisan-32-r1.ebuild @@ -27,6 +27,7 @@ RDEPEND="${DEPEND}" PATCHES=( "${FILESDIR}/${P}-rename-with-systemd.patch" + "${FILESDIR}/${P}-x86-fixes.patch" ) src_prepare() { |