FreeBSD Bugzilla – Attachment 253671 Details for
Bug 281384
net-mgmt/check_mk_agent: integrate PR 723 sysctl_mem feature
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
0001-net-mgmt-check_mk_agent-bug-281384.patch
file_281384.txt (text/plain), 4.65 KB, created by
Ian Valentine
on 2024-09-19 20:28:15 UTC
(
hide
)
Description:
0001-net-mgmt-check_mk_agent-bug-281384.patch
Filename:
MIME Type:
Creator:
Ian Valentine
Created:
2024-09-19 20:28:15 UTC
Size:
4.65 KB
patch
obsolete
>From 1ee3ef2bfe9d27ac9ad898e2639ce23adf52f91d Mon Sep 17 00:00:00 2001 >From: Ian Valentine <ivalentine@arizona.edu> >Date: Thu, 19 Sep 2024 13:15:59 -0700 >Subject: [PATCH] net-mgmt/check_mk_agent: bug #281384 > >--- > net-mgmt/check_mk_agent/Makefile | 12 ++--- > .../files/patch-check__mk__agent.freebsd | 44 +++++++++---------- > 2 files changed, 28 insertions(+), 28 deletions(-) > >diff --git a/net-mgmt/check_mk_agent/Makefile b/net-mgmt/check_mk_agent/Makefile >index da8238f35..8423c650e 100644 >--- a/net-mgmt/check_mk_agent/Makefile >+++ b/net-mgmt/check_mk_agent/Makefile >@@ -1,7 +1,7 @@ > PORTNAME= check_mk_agent > DISTVERSIONPREFIX= v > DISTVERSION= 2.3.0p12 >-PORTREVISION= 1 >+PORTREVISION= 2 > CATEGORIES= net-mgmt > MASTER_SITES= https://raw.githubusercontent.com/Checkmk/checkmk/${DISTVERSIONFULL}/agents/:agent \ > https://raw.githubusercontent.com/Checkmk/checkmk/${DISTVERSIONFULL}/doc/agents/:doc \ >@@ -23,7 +23,7 @@ RUN_DEPENDS= bash:shells/bash \ > statgrab:devel/libstatgrab \ > wget:ftp/wget > >-USES= perl5 python:3.4+ shebangfix >+USES= perl5 python:3.4+,run shebangfix > USE_PERL5= run > > SHEBANG_FILES= ${_CHECKMK_AGENT} >@@ -50,12 +50,14 @@ OPTIONS_DEFINE= DOCS > _CHECKMK_AGENT= ${PORTNAME}.freebsd > _CHECKMK_LIBDIR= ${PREFIX}/lib/check_mk_agent > _CHECKMK_CONFDIR= ${PREFIX}/etc/check_mk >+_CHECKMK_VARDIR= /var/db/check_mk_agent > > post-patch: > @${REINPLACE_CMD} \ >- -e 's|%%CHECKMK_LIBDIR%%|${_CHECKMK_LIBDIR}|' \ >- -e 's|%%CHECKMK_CONFDIR%%|${_CHECKMK_CONFDIR}|' \ >- -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ >+ -e 's|/usr/local/lib/check_mk_agent|${_CHECKMK_LIBDIR}|' \ >+ -e 's|/etc/check_mk|${_CHECKMK_CONFDIR}|' \ >+ -e 's|/var/lib/check_mk_agent|${_CHECKMK_VARDIR}|' \ >+ -e 's|/usr/local|${LOCALBASE}|g' \ > ${WRKSRC}/${_CHECKMK_AGENT} > > do-install: >diff --git a/net-mgmt/check_mk_agent/files/patch-check__mk__agent.freebsd b/net-mgmt/check_mk_agent/files/patch-check__mk__agent.freebsd >index 09e7ebd94..ca92e923e 100644 >--- a/net-mgmt/check_mk_agent/files/patch-check__mk__agent.freebsd >+++ b/net-mgmt/check_mk_agent/files/patch-check__mk__agent.freebsd >@@ -1,26 +1,24 @@ >---- check_mk_agent.freebsd.orig 2024-08-15 18:32:18 UTC >+--- check_mk_agent.freebsd.orig 2024-09-19 19:36:29 UTC > +++ check_mk_agent.freebsd >-@@ -117,9 +117,9 @@ set_variable_defaults() { >- # >- >- set_variable_defaults() { >-- : "${MK_LIBDIR:=/usr/local/lib/check_mk_agent}" >-- : "${MK_CONFDIR:=/etc/check_mk}" >-- : "${MK_VARDIR:=/var/lib/check_mk_agent}" >-+ : "${MK_LIBDIR:=%%CHECKMK_LIBDIR%%}" >-+ : "${MK_CONFDIR:=%%CHECKMK_CONFDIR%%}" >-+ : "${MK_VARDIR:=/var/db/check_mk_agent}" >- : "${MK_LOGDIR:=/var/log/check_mk_agent}" >+@@ -597,6 +597,21 @@ run_purely_synchronous_sections() { > >- # some 'booleans' >-@@ -138,8 +138,8 @@ preamble_1() { >- # Make sure locally installed binaries are found >- # Only add binaries if they are not already in the path! If you append to path in a loop the process will >- # eventually each the 128k size limit for the environment and become a zombie process. See execve manpage. >-- [ "${PATH#*"/usr/local/bin"}" != "${PATH}" ] || PATH="${PATH}:/usr/local/bin" >-- [ "${PATH#*"/usr/local/sbin"}" != "${PATH}" ] || PATH="${PATH}:/usr/local/sbin" >-+ [ "${PATH#*"%%LOCALBASE%%/bin"}" != "${PATH}" ] || PATH="${PATH}:%%LOCALBASE%%/bin" >-+ [ "${PATH#*"%%LOCALBASE%%/sbin"}" != "${PATH}" ] || PATH="${PATH}:%%LOCALBASE%%/sbin" >- [ -d "/var/qmail/bin" ] && { [ "${PATH#*"/var/qmail/bin"}" != "${PATH}" ] || PATH="${PATH}:/var/qmail/bin"; } >+ rm -f "${tmpfile}" >+ fi >++ >++ echo '<<<sysctl_mem>>>' >++ _page_size=$( sysctl -n vm.stats.vm.v_page_size ) >++ echo "mem.cache $(( _page_size * $( sysctl -n vm.stats.vm.v_cache_count ) ))" >++ echo "mem.free $(( _page_size * $( sysctl -n vm.stats.vm.v_free_count ) ))" >++ echo "mem.total $( sysctl -n hw.physmem )" >++ echo "mem.used $(( _page_size * ( $( sysctl -n vm.stats.vm.v_active_count ) + $( sysctl -n vm.stats.vm.v_wire_count ) ) ))" >++ _swap_total=$( sysctl -n vm.swap_total ) >++ _swap_used=$(( $( swapinfo | tail -1 | awk '{print $3}' ) * 1024 )) >++ echo "swap.free $(( _swap_total - _swap_used ))" >++ echo "swap.total ${_swap_total}" >++ echo "swap.used ${_swap_used}" >++ unset -v _page_size >++ unset -v _swap_total >++ unset -v _swap_used >+ } > >- # All executables in PLUGINSDIR will simply be executed and their >+ # >-- >2.46.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 281384
:
253450
|
253477
| 253671