diff options
Diffstat (limited to 'net-mgmt')
46 files changed, 1290 insertions, 34 deletions
diff --git a/net-mgmt/Makefile b/net-mgmt/Makefile index a7e943abb5f7..5aebf555281d 100644 --- a/net-mgmt/Makefile +++ b/net-mgmt/Makefile @@ -296,6 +296,7 @@ SUBDIR += pandorafms_agent SUBDIR += pandorafms_console SUBDIR += pandorafms_server + SUBDIR += peering-manager SUBDIR += pftabled SUBDIR += php-fpm_exporter SUBDIR += php81-snmp @@ -343,6 +344,7 @@ SUBDIR += py-pyIOSXR SUBDIR += py-pyang SUBDIR += py-pyeapi + SUBDIR += py-pyixapi SUBDIR += py-pynetbox SUBDIR += py-pynxos SUBDIR += py-pypowerwall diff --git a/net-mgmt/adguard-exporter/Makefile b/net-mgmt/adguard-exporter/Makefile index 68cc1d4a2d83..8e28849dc65a 100644 --- a/net-mgmt/adguard-exporter/Makefile +++ b/net-mgmt/adguard-exporter/Makefile @@ -1,7 +1,7 @@ PORTNAME= adguard-exporter DISTVERSIONPREFIX= v DISTVERSION= 1.14 -PORTREVISION= 28 +PORTREVISION= 29 CATEGORIES= net-mgmt MAINTAINER= christer.edwards@gmail.com diff --git a/net-mgmt/alertmanager/Makefile b/net-mgmt/alertmanager/Makefile index 107288d3453c..8926b778eabb 100644 --- a/net-mgmt/alertmanager/Makefile +++ b/net-mgmt/alertmanager/Makefile @@ -1,7 +1,7 @@ PORTNAME= alertmanager PORTVERSION= 0.26.0 DISTVERSIONPREFIX= v -PORTREVISION= 13 +PORTREVISION= 14 CATEGORIES= net-mgmt MAINTAINER= michal@hanu.la diff --git a/net-mgmt/blackbox_exporter/Makefile b/net-mgmt/blackbox_exporter/Makefile index 8167829f6900..c8178fd70c47 100644 --- a/net-mgmt/blackbox_exporter/Makefile +++ b/net-mgmt/blackbox_exporter/Makefile @@ -1,7 +1,7 @@ PORTNAME= blackbox_exporter DISTVERSIONPREFIX= v DISTVERSION= 0.27.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= net-mgmt MAINTAINER= eduardo@FreeBSD.org diff --git a/net-mgmt/bosun/Makefile b/net-mgmt/bosun/Makefile index 99a58e653eeb..f70367a0f1ac 100644 --- a/net-mgmt/bosun/Makefile +++ b/net-mgmt/bosun/Makefile @@ -1,7 +1,7 @@ PORTNAME= bosun DISTVERSION= 0.9.0 DISTVERSIONSUFFIX= -preview -PORTREVISION= 29 +PORTREVISION= 30 CATEGORIES= net-mgmt MAINTAINER= langer.markus@gmail.com diff --git a/net-mgmt/carbon-relay-ng/Makefile b/net-mgmt/carbon-relay-ng/Makefile index 03efcbf95517..62831bc9f13b 100644 --- a/net-mgmt/carbon-relay-ng/Makefile +++ b/net-mgmt/carbon-relay-ng/Makefile @@ -1,6 +1,6 @@ PORTNAME= carbon-relay-ng DISTVERSION= 0.10.0 -PORTREVISION= 14 +PORTREVISION= 15 CATEGORIES= net-mgmt MAINTAINER= a.andersson.thn@gmail.com diff --git a/net-mgmt/carbonzipper/Makefile b/net-mgmt/carbonzipper/Makefile index 141d5f487bd4..82e25394960d 100644 --- a/net-mgmt/carbonzipper/Makefile +++ b/net-mgmt/carbonzipper/Makefile @@ -1,6 +1,6 @@ PORTNAME= carbonzipper DISTVERSION= 0.74 -PORTREVISION= 28 +PORTREVISION= 29 CATEGORIES= net-mgmt MAINTAINER= a.andersson.thn@gmail.com diff --git a/net-mgmt/fli/Makefile b/net-mgmt/fli/Makefile index f9fb8775f48b..e7df35d0a890 100644 --- a/net-mgmt/fli/Makefile +++ b/net-mgmt/fli/Makefile @@ -1,7 +1,7 @@ PORTNAME= fli DISTVERSIONPREFIX= v DISTVERSION= 0.1.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net-mgmt MAINTAINER= olgeni@FreeBSD.org diff --git a/net-mgmt/grok_exporter/Makefile b/net-mgmt/grok_exporter/Makefile index a15a5b3a1e9d..32313de9720c 100644 --- a/net-mgmt/grok_exporter/Makefile +++ b/net-mgmt/grok_exporter/Makefile @@ -1,7 +1,7 @@ PORTNAME= grok_exporter DISTVERSIONPREFIX=v DISTVERSION= 1.0.0.RC4 -PORTREVISION= 28 +PORTREVISION= 29 CATEGORIES= net-mgmt MAINTAINER= gasol.wu@gmail.com diff --git a/net-mgmt/icingadb/Makefile b/net-mgmt/icingadb/Makefile index 6b558e50f867..c51dce5dfbcd 100644 --- a/net-mgmt/icingadb/Makefile +++ b/net-mgmt/icingadb/Makefile @@ -1,7 +1,7 @@ PORTNAME= icingadb DISTVERSIONPREFIX= v DISTVERSION= 1.4.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= net-mgmt MAINTAINER= dvl@FreeBSD.org diff --git a/net-mgmt/intel-snap/Makefile b/net-mgmt/intel-snap/Makefile index d1f00de5f4d1..49cb5b5e9afe 100644 --- a/net-mgmt/intel-snap/Makefile +++ b/net-mgmt/intel-snap/Makefile @@ -1,6 +1,6 @@ PORTNAME= intel-snap PORTVERSION= 0.0.1 -PORTREVISION= 29 +PORTREVISION= 30 CATEGORIES= net-mgmt MAINTAINER= ports@FreeBSD.org diff --git a/net-mgmt/kapacitor/Makefile b/net-mgmt/kapacitor/Makefile index 015f423980ff..b78bb1b51b51 100644 --- a/net-mgmt/kapacitor/Makefile +++ b/net-mgmt/kapacitor/Makefile @@ -1,7 +1,7 @@ PORTNAME= kapacitor DISTVERSIONPREFIX= v DISTVERSION= 1.5.1 -PORTREVISION= 28 +PORTREVISION= 29 CATEGORIES= net-mgmt MAINTAINER= cheffo@freebsd-bg.org diff --git a/net-mgmt/mqtt2prometheus/Makefile b/net-mgmt/mqtt2prometheus/Makefile index 905cc4b44283..66118dc52639 100644 --- a/net-mgmt/mqtt2prometheus/Makefile +++ b/net-mgmt/mqtt2prometheus/Makefile @@ -1,7 +1,7 @@ PORTNAME= mqtt2prometheus DISTVERSIONPREFIX= v DISTVERSION= 0.1.7 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= net-mgmt MAINTAINER= manu@FreeBSD.org diff --git a/net-mgmt/netdata/Makefile b/net-mgmt/netdata/Makefile index 7bee121eb952..bd4f0c84c95e 100644 --- a/net-mgmt/netdata/Makefile +++ b/net-mgmt/netdata/Makefile @@ -1,6 +1,7 @@ PORTNAME= netdata DISTVERSIONPREFIX= v DISTVERSION= 2.6.3 +PORTREVISION= 1 CATEGORIES= net-mgmt MASTER_SITES= https://github.com/${PORTNAME}/${PORTNAME}/releases/download/v${DISTVERSION}/:netdata \ https://raw.githubusercontent.com/netdata/netdata/refs/tags/v${DISTVERSION}/src/go/:goplugin \ diff --git a/net-mgmt/nsd_exporter/Makefile b/net-mgmt/nsd_exporter/Makefile index 2fad1ef2a3b9..b43465570a35 100644 --- a/net-mgmt/nsd_exporter/Makefile +++ b/net-mgmt/nsd_exporter/Makefile @@ -1,7 +1,7 @@ PORTNAME= nsd_exporter PORTVERSION= 0.3.1 DISTVERSIONPREFIX= v -PORTREVISION= 12 +PORTREVISION= 13 CATEGORIES= net-mgmt MAINTAINER= zi@FreeBSD.org diff --git a/net-mgmt/nvidia_gpu_prometheus_exporter/Makefile b/net-mgmt/nvidia_gpu_prometheus_exporter/Makefile index db3a4d1b4112..0732ab526ba1 100644 --- a/net-mgmt/nvidia_gpu_prometheus_exporter/Makefile +++ b/net-mgmt/nvidia_gpu_prometheus_exporter/Makefile @@ -1,6 +1,6 @@ PORTNAME= nvidia_gpu_prometheus_exporter DISTVERSION= g20181028 -PORTREVISION= 29 +PORTREVISION= 30 CATEGORIES= net-mgmt MAINTAINER= 0mp@FreeBSD.org diff --git a/net-mgmt/peering-manager/Makefile b/net-mgmt/peering-manager/Makefile new file mode 100644 index 000000000000..527e3d99d9dd --- /dev/null +++ b/net-mgmt/peering-manager/Makefile @@ -0,0 +1,93 @@ +PORTNAME= peering-manager +DISTVERSIONPREFIX= v +DISTVERSION= 1.9.7 +CATEGORIES= net-mgmt python + +MAINTAINER= bofh@FreeBSD.org +COMMENT= BGP sessions management tool +WWW= https://peering-manager.net/ + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE + +RUN_DEPENDS= \ + ${PYTHON_PKGNAMEPREFIX}Jinja2>=3.1:devel/py-Jinja2@${PY_FLAVOR} \ + bgpq4>0:net-mgmt/bgpq4 \ + ${PYTHON_PKGNAMEPREFIX}django51>=5.1<5.2:www/py-django51@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj51-djangorestframework>=3.15:www/py-dj51-djangorestframework@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj51-django-debug-toolbar>=5.0:www/py-dj51-django-debug-toolbar@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj51-django-filter>=25.1:www/py-dj51-django-filter@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj51-django-netfields>=1.3:www/py-dj51-django-netfields@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj51-django-prometheus>=2.3:www/py-dj51-django-prometheus@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj51-django-redis>=5.4:www/py-dj51-django-redis@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj51-django-rq>=2.10:devel/py-dj51-django-rq@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj51-django-tables2>=2.7:www/py-dj51-django-tables2@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj51-django-taggit>=6.1:www/py-dj51-django-taggit@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj51-drf-spectacular>=0.28:www/py-dj51-drf-spectacular@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj51-drf-spectacular-sidecar>=2025:www/py-dj51-drf-spectacular-sidecar@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj51-social-auth-app-django>=5.4:www/py-dj51-social-auth-app-django@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dulwich>=0.22:devel/py-dulwich@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}gunicorn>=23.0.0:www/py-gunicorn@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}markdown>=3.7:textproc/py-markdown@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}napalm>=5.0:net-mgmt/py-napalm@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}packaging>=23.2:devel/py-packaging@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}psycopg>=3.1:databases/py-psycopg@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}psycopg-pool>=3.1:databases/py-psycopg-pool@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pyixapi>=0.2:net-mgmt/py-pyixapi@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pynetbox>=7.3:net-mgmt/py-pynetbox@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pyyaml>=6.0:devel/py-pyyaml@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}requests>=2.32:www/py-requests@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}social-auth-core>=4.5.4:security/py-social-auth-core@${PY_FLAVOR} + +USES= cpe pgsql:13+ python:3.10-3.12 +CPE_VENDOR= ${PORTNAME} +CPE_PRODUCT= ${PORTNAME:S/-/_/} +USE_GITHUB= yes +USE_RC_SUBR= peering_manager_rq + +NO_ARCH= yes +NO_BUILD= yes +SUB_FILES= gunicorn.conf.py 850.peeringmanager-housekeeping +SUB_LIST= WWWDIR=${WWWDIR} PORTNAME=${PORTNAME} WSGI_APP=peering_manager.wsgi PYTHON_CMD=${PYTHON_CMD} PYTHON_VER=${PYTHON_VER} + +PORTDOCS= * + +OPTIONS_DEFINE= DOCS +OPTIONS_DEFAULT=REDIS +OPTIONS_RADIO= KVBACKENDS +OPTIONS_RADIO_KVBACKENDS= REDIS VALKEY + +KVBACKENDS_DESC=Key Value Storage Backends +REDIS_DESC= Redis Key Value Backend support +VALKEY_DESC= Valkey Key Value Backend support + +REDIS_RUN_DEPENDS= redis>=8.2.1:databases/redis +VALKEY_RUN_DEPENDS= valkey>=1.0:databases/valkey + +FIND_EXPR= "! -name *.orig ! -name .gitattributes ! -name .gitignore ! -name .gitattributes ! -name .isort.cfg ! -name .pre-commit-config.yaml ! -name .readthedocs.yaml ! -name CHANGELOG.md ! -name LICENSE ! -name README.md ! -name mkdocs.yaml ! -name poetry.lock ! -name pyproject.toml ! -name requirements.txt ! -name configuration.example.py ! -path */.github ! -path */.github/* ! -path */docs ! -path */docs/* -prune" + +do-install: + ${MKDIR} ${STAGEDIR}${WWWDIR} + ${MKDIR} ${STAGEDIR}${PREFIX}/etc/periodic/daily + ${ECHO} "@owner www" >> ${TMPPLIST} + ${ECHO} "@group www" >> ${TMPPLIST} + (cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR} ${FIND_EXPR}) + ${FIND} -s ${STAGEDIR}${PREFIX}/www/${PORTNAME} -not -type d | ${SORT} | \ + ${SED} -e 's|^${STAGEDIR}${PREFIX}/||' >> ${TMPPLIST} + ${FIND} -s ${STAGEDIR}${PREFIX}/www/${PORTNAME} -type d -empty | ${SORT} -r | \ + ${SED} -e 's|^${STAGEDIR}${PREFIX}/|@dir |' >> ${TMPPLIST} + ${INSTALL_DATA} ${WRKDIR}/gunicorn.conf.py ${STAGEDIR}${WWWDIR}/gunicorn.conf.py.sample + ${INSTALL_DATA} ${WRKSRC}/peering_manager/configuration.example.py ${STAGEDIR}${WWWDIR}/peering_manager/configuration.py.sample + ${INSTALL_DATA} ${WRKDIR}/850.peeringmanager-housekeeping ${STAGEDIR}${PREFIX}/etc/periodic/daily/850.peeringmanager-housekeeping + ${ECHO} "@sample ${WWWDIR}/gunicorn.conf.py.sample" >> ${TMPPLIST} + ${ECHO} "@sample ${WWWDIR}/peering_manager/configuration.py.sample" >> ${TMPPLIST} + ${ECHO} "etc/periodic/daily/850.peeringmanager-housekeeping" >> ${TMPPLIST} + +do-install-DOCS-on: + @${MKDIR} ${STAGEDIR}${DOCSDIR} + cd ${WRKSRC}/docs && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} +.for f in CHANGELOG.md README.md + ${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR} +.endfor + +.include <bsd.port.mk> diff --git a/net-mgmt/peering-manager/distinfo b/net-mgmt/peering-manager/distinfo new file mode 100644 index 000000000000..95bbe9b48822 --- /dev/null +++ b/net-mgmt/peering-manager/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1756827986 +SHA256 (peering-manager-peering-manager-v1.9.7_GH0.tar.gz) = fa272abe40fec06d3f0c541d771d560f9a93f8940dea96b8538785a9cef32afd +SIZE (peering-manager-peering-manager-v1.9.7_GH0.tar.gz) = 8349343 diff --git a/net-mgmt/peering-manager/files/850.peeringmanager-housekeeping.in b/net-mgmt/peering-manager/files/850.peeringmanager-housekeeping.in new file mode 100755 index 000000000000..675f0f2aef63 --- /dev/null +++ b/net-mgmt/peering-manager/files/850.peeringmanager-housekeeping.in @@ -0,0 +1,32 @@ +#!/bin/sh +# This shell script invokes Peering Manager's housekeeping management command, +# which intended to be run nightly. +# +# If you want to enable this script, copy it to %%PREFIX%%/etc/periodic/daily +# and place the following into /etc/periodic.conf: +# +# daily_peeringmanager_housekeeping_enable="YES" +# +# If Peering Manager has been installed into a nonstandard location, update the +# paths below. +command="%%PYTHON_CMD%%" +peeringmanager_root="%%WWWDIR%%" + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ]; then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +rc=0 + +case "$daily_peeringmanager_housekeeping_enable" in + [Yy][Ee][Ss]) + echo "" + echo "Running Peering Manager housekeeping:" + $command "$peeringmanager_root/manage.py" housekeeping + rc=$? +esac + +exit $rc diff --git a/net-mgmt/peering-manager/files/gunicorn.conf.py.in b/net-mgmt/peering-manager/files/gunicorn.conf.py.in new file mode 100644 index 000000000000..0477e5bf9f64 --- /dev/null +++ b/net-mgmt/peering-manager/files/gunicorn.conf.py.in @@ -0,0 +1,245 @@ +# Sample Gunicorn configuration file. +import multiprocessing +# +# Server socket +# +# bind - The socket to bind. +# +# A string of the form: 'HOST', 'HOST:PORT', 'unix:PATH'. +# An IP is a valid HOST. +# +# backlog - The number of pending connections. This refers +# to the number of clients that can be waiting to be +# served. Exceeding this number results in the client +# getting an error when attempting to connect. It should +# only affect servers under significant load. +# +# Must be a positive integer. Generally set in the 64-2048 +# range. +# + +bind = ['127.0.0.1:8001','[::1]:8001'] +backlog = 2048 + +# +# Worker processes +# +# workers - The number of worker processes that this server +# should keep alive for handling requests. +# +# A positive integer generally in the 2-4 x $(NUM_CORES) +# range. You'll want to vary this a bit to find the best +# for your particular application's work load. +# +# worker_class - The type of workers to use. The default +# sync class should handle most 'normal' types of work +# loads. You'll want to read +# http://docs.gunicorn.org/en/latest/design.html#choosing-a-worker-type +# for information on when you might want to choose one +# of the other worker classes. +# +# A string referring to a Python path to a subclass of +# gunicorn.workers.base.Worker. The default provided values +# can be seen at +# http://docs.gunicorn.org/en/latest/settings.html#worker-class +# +# worker_connections - For the eventlet and gevent worker classes +# this limits the maximum number of simultaneous clients that +# a single process can handle. +# +# A positive integer generally set to around 1000. +# +# timeout - If a worker does not notify the master process in this +# number of seconds it is killed and a new worker is spawned +# to replace it. +# +# Generally set to thirty seconds. Only set this noticeably +# higher if you're sure of the repercussions for sync workers. +# For the non sync workers it just means that the worker +# process is still communicating and is not tied to the length +# of time required to handle a single request. +# +# keepalive - The number of seconds to wait for the next request +# on a Keep-Alive HTTP connection. +# +# A positive integer. Generally set in the 1-5 seconds range. +# + +#workers = 5 +workers = multiprocessing.cpu_count() * 2 + 1 +worker_class = 'sync' +worker_connections = 1000 +timeout = 300 +keepalive = 2 +threads = 3 +max_requests = 5000 +max_requests_jitter = 500 + +# +# spew - Install a trace function that spews every line of Python +# that is executed when running the server. This is the +# nuclear option. +# +# True or False +# + +spew = False + +# +# Server mechanics +# +# daemon - Detach the main Gunicorn process from the controlling +# terminal with a standard fork/fork sequence. +# +# True or False +# +# raw_env - Pass environment variables to the execution environment. +# +# pidfile - The path to a pid file to write +# +# A path string or None to not write a pid file. +# +# user - Switch worker processes to run as this user. +# +# A valid user id (as an integer) or the name of a user that +# can be retrieved with a call to pwd.getpwnam(value) or None +# to not change the worker process user. +# +# group - Switch worker process to run as this group. +# +# A valid group id (as an integer) or the name of a user that +# can be retrieved with a call to pwd.getgrnam(value) or None +# to change the worker processes group. +# +# umask - A mask for file permissions written by Gunicorn. Note that +# this affects unix socket permissions. +# +# A valid value for the os.umask(mode) call or a string +# compatible with int(value, 0) (0 means Python guesses +# the base, so values like "0", "0xFF", "0022" are valid +# for decimal, hex, and octal representations) +# +# tmp_upload_dir - A directory to store temporary request data when +# requests are read. This will most likely be disappearing soon. +# +# A path to a directory where the process owner can write. Or +# None to signal that Python should choose one on its own. +# + +daemon = False +umask = 0 +user = None +tmp_upload_dir = None +pythonpath = '%%WWWDIR%%' +chdir = '%%WWWDIR%%' +wsgi_app = '%%WSGI_APP%%' + +# +# Logging +# +# logfile - The path to a log file to write to. +# +# A path string. "-" means log to stdout. +# +# loglevel - The granularity of log output +# +# A string of "debug", "info", "warning", "error", "critical" +# + +syslog = True +syslog_prefix = '%%PORTNAME%%' +syslog_addr = 'unix:///var/run/log#dgram' +disable_redirect_access_to_syslog = True +errorlog = '-' +loglevel = 'info' +accesslog = '-' +access_log_format = '%(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s"' + +# +# Process naming +# +# proc_name - A base to use with setproctitle to change the way +# that Gunicorn processes are reported in the system process +# table. This affects things like 'ps' and 'top'. If you're +# going to be running more than one instance of Gunicorn you'll +# probably want to set a name to tell them apart. This requires +# that you install the setproctitle module. +# +# A string or None to choose a default of something like 'gunicorn'. +# + +proc_name = '%%PORTNAME%%' + +# +# Server hooks +# +# post_fork - Called just after a worker has been forked. +# +# A callable that takes a server and worker instance +# as arguments. +# +# pre_fork - Called just prior to forking the worker subprocess. +# +# A callable that accepts the same arguments as post_fork +# +# pre_exec - Called just prior to forking off a secondary +# master process during things like config reloading. +# +# A callable that takes a server instance as the sole argument. +# + +def post_fork(server, worker): + server.log.info("Worker spawned (pid: %s)", worker.pid) + +def pre_fork(server, worker): + pass + +def pre_exec(server): + server.log.info("Forked child, re-executing.") + +def when_ready(server): + server.log.info("Server is ready. Spawning workers") + +def worker_int(worker): + worker.log.info("worker received INT or QUIT signal") + + ## get traceback info + import threading, sys, traceback + id2name = {th.ident: th.name for th in threading.enumerate()} + code = [] + for threadId, stack in sys._current_frames().items(): + code.append("\n# Thread: %s(%d)" % (id2name.get(threadId,""), + threadId)) + for filename, lineno, name, line in traceback.extract_stack(stack): + code.append('File: "%s", line %d, in %s' % (filename, + lineno, name)) + if line: + code.append(" %s" % (line.strip())) + worker.log.debug("\n".join(code)) + +def worker_abort(worker): + worker.log.info("worker received SIGABRT signal") + +def ssl_context(conf, default_ssl_context_factory): + import ssl + + # The default SSLContext returned by the factory function is initialized + # with the TLS parameters from config, including TLS certificates and other + # parameters. + context = default_ssl_context_factory() + + # The SSLContext can be further customized, for example by enforcing + # minimum TLS version. + context.minimum_version = ssl.TLSVersion.TLSv1_3 + + # Server can also return different server certificate depending which + # hostname the client uses. Requires Python 3.7 or later. + def sni_callback(socket, server_hostname, context): + if server_hostname == "foo.127.0.0.1.nip.io": + new_context = default_ssl_context_factory() + new_context.load_cert_chain(certfile="foo.pem", keyfile="foo-key.pem") + socket.context = new_context + + context.sni_callback = sni_callback + + return context diff --git a/net-mgmt/peering-manager/files/patch-peering__manager_configuration.example.py b/net-mgmt/peering-manager/files/patch-peering__manager_configuration.example.py new file mode 100644 index 000000000000..1865973e0e30 --- /dev/null +++ b/net-mgmt/peering-manager/files/patch-peering__manager_configuration.example.py @@ -0,0 +1,11 @@ +--- peering_manager/configuration.example.py.orig 2025-09-05 10:59:41 UTC ++++ peering_manager/configuration.example.py +@@ -9,7 +9,7 @@ ALLOWED_HOSTS = ["*"] + # A random one can be generated with Python in the Peering Manager venv with + # from django.core.management.utils import get_random_secret_key + # get_random_secret_key() +-SECRET_KEY = "ef7npku*djrj_r4jt4cojo8^j@2($$@05e(eq_mn!ywx*jg0vy" ++#SECRET_KEY = "<GENERATE A KEY>" + + # Base URL path if accessing Peering Manager within a directory. + BASE_PATH = "" diff --git a/net-mgmt/peering-manager/files/peering_manager_rq.in b/net-mgmt/peering-manager/files/peering_manager_rq.in new file mode 100755 index 000000000000..6b12856dfa9b --- /dev/null +++ b/net-mgmt/peering-manager/files/peering_manager_rq.in @@ -0,0 +1,50 @@ +#!/bin/sh + +# This sample rc script starts the RQ worker background service which is +# required for Webhooks and various automation tasks. + +# +# PROVIDE: peering_manager_rq +# REQUIRE: DAEMON +# KEYWORD: shutdown +# +# Add the following line to /etc/rc.conf.local or /etc/rc.conf +# to enable peering_manager-rq: +# +# peering_manager_rq_enable (bool): Set to NO by default. +# Set it to YES to enable peering_manager_rq. +# +# peering_manager_rq_user (str): User to run worker as. +# Defaults to www. + +. /etc/rc.subr + +name=peering_manager_rq +rcvar=peering_manager_rq_enable + +load_rc_config $name + +: ${peering_manager_rq_enable:=NO} +: ${peering_manager_rq_user:=www} +: ${peering_manager_rq_workers:=1} + +start_cmd="peering_manager_rq_start" +start_precmd="peering_manager_rq_precmd" +command="%%PYTHON_CMD%%" +command_args="%%WWWDIR%%/manage.py rqworker" +_pidprefix="/var/run/%%PORTNAME%%" + +peering_manager_rq_precmd() +{ + install -d -o ${peering_manager_rq_user} ${_pidprefix} +} + +peering_manager_rq_start() +{ + echo "Starting peering_manager_rq." + for i in `jot - 1 $peering_manager_rq_workers`; do + /usr/sbin/daemon -cf -p ${_pidprefix}/${name}-${i}.pid -u ${peering_manager_rq_user} ${command} ${command_args} --name peering-manager@${i} + done +} + +run_rc_command "$1" diff --git a/net-mgmt/peering-manager/files/pkg-message.in b/net-mgmt/peering-manager/files/pkg-message.in new file mode 100644 index 000000000000..13913edb961b --- /dev/null +++ b/net-mgmt/peering-manager/files/pkg-message.in @@ -0,0 +1,9 @@ +[ +{ type: install + message: <<EOD +For installation instructions please refer to the related wiki page: + +- https://wiki.freebsd.org/Ports/net-mgmt/peering-manager +EOD +} +] diff --git a/net-mgmt/peering-manager/pkg-descr b/net-mgmt/peering-manager/pkg-descr new file mode 100644 index 000000000000..ae00708cbbd6 --- /dev/null +++ b/net-mgmt/peering-manager/pkg-descr @@ -0,0 +1,24 @@ +Peering Manager was originally and still is developed by its lead + maintainer, Guillaume Mazoyer in 2017 as part of an effort to automate + BGP peering provisionning. + +Since then, many organisations around the world have used Peering + Manager as their central network source of truth to empower both + network operators and automation. + +Key Features +Peering Manager was built specifically to serve the needs of network + engineers and operators operating BGP networks. Below is a very brief + overview of the core features it provides. + +- Autonomous system management +- BGP groups +- Internet Exchange Points +- BGP sessions with with differences between classic ones and IXP ones +- BGP communities and routing policies +- Devices and configuration rendering leveraging Jinja2 +- Configuration installation for NAPALM supported platforms +- Detailed, automatic change logging +- Global search engine +- Event-driven webhooks +- Interoperability with other tools such as PeeringDB, IX-API, and more diff --git a/net-mgmt/php-fpm_exporter/Makefile b/net-mgmt/php-fpm_exporter/Makefile index 58086a2e1dd8..46ce5c1d8441 100644 --- a/net-mgmt/php-fpm_exporter/Makefile +++ b/net-mgmt/php-fpm_exporter/Makefile @@ -1,7 +1,7 @@ PORTNAME= php-fpm_exporter DISTVERSIONPREFIX=v DISTVERSION= 2.2.0 -PORTREVISION= 26 +PORTREVISION= 27 CATEGORIES= net-mgmt MAINTAINER= freebsd.org@neant.ro diff --git a/net-mgmt/phpfpm_exporter/Makefile b/net-mgmt/phpfpm_exporter/Makefile index 03eb376e10d2..f748175a8e4c 100644 --- a/net-mgmt/phpfpm_exporter/Makefile +++ b/net-mgmt/phpfpm_exporter/Makefile @@ -1,7 +1,7 @@ PORTNAME= phpfpm_exporter DISTVERSIONPREFIX= v DISTVERSION= 0.6.1 -PORTREVISION= 18 +PORTREVISION= 19 CATEGORIES= net-mgmt MAINTAINER= gasol.wu@gmail.com diff --git a/net-mgmt/ping_exporter/Makefile b/net-mgmt/ping_exporter/Makefile index 8ad371ed9286..0b593e76d68f 100644 --- a/net-mgmt/ping_exporter/Makefile +++ b/net-mgmt/ping_exporter/Makefile @@ -1,5 +1,6 @@ PORTNAME= ping_exporter DISTVERSION= 1.1.4 +PORTREVISION= 1 CATEGORIES= net-mgmt MAINTAINER= ivy@FreeBSD.org diff --git a/net-mgmt/prometheus-bird-exporter/Makefile b/net-mgmt/prometheus-bird-exporter/Makefile index 44f5d1a65436..976753003fdb 100644 --- a/net-mgmt/prometheus-bird-exporter/Makefile +++ b/net-mgmt/prometheus-bird-exporter/Makefile @@ -1,6 +1,6 @@ PORTNAME= prometheus-bird-exporter DISTVERSION= 1.4.3 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= net-mgmt MAINTAINER= ivy@FreeBSD.org diff --git a/net-mgmt/prometheus-collectd-exporter/Makefile b/net-mgmt/prometheus-collectd-exporter/Makefile index c3643a8493e6..5c6c6f309292 100644 --- a/net-mgmt/prometheus-collectd-exporter/Makefile +++ b/net-mgmt/prometheus-collectd-exporter/Makefile @@ -1,7 +1,7 @@ PORTNAME= prometheus-collectd-exporter PORTVERSION= 0.5.0 DISTVERSIONPREFIX= v -PORTREVISION= 29 +PORTREVISION= 30 CATEGORIES= net-mgmt MAINTAINER= dsp@php.net diff --git a/net-mgmt/prometheus1/Makefile b/net-mgmt/prometheus1/Makefile index d6960c6ce80c..84982bb1e19c 100644 --- a/net-mgmt/prometheus1/Makefile +++ b/net-mgmt/prometheus1/Makefile @@ -1,7 +1,7 @@ PORTNAME= prometheus PORTVERSION= 1.8.2 DISTVERSIONPREFIX= v -PORTREVISION= 32 +PORTREVISION= 33 CATEGORIES= net-mgmt PKGNAMESUFFIX= 1 diff --git a/net-mgmt/prometheus3/Makefile b/net-mgmt/prometheus3/Makefile index 169c04818fb9..6848b982dee5 100644 --- a/net-mgmt/prometheus3/Makefile +++ b/net-mgmt/prometheus3/Makefile @@ -1,7 +1,7 @@ PORTNAME= prometheus DISTVERSIONPREFIX= v DISTVERSION= 3.5.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net-mgmt MASTER_SITES= https://raw.githubusercontent.com/${GH_ACCOUNT}/${GH_PROJECT}/${DISTVERSIONFULL}/:gomod \ https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/releases/download/${DISTVERSIONFULL}/:ui diff --git a/net-mgmt/promscale/Makefile b/net-mgmt/promscale/Makefile index 5a7fa5be0076..c4a5c6184d91 100644 --- a/net-mgmt/promscale/Makefile +++ b/net-mgmt/promscale/Makefile @@ -1,6 +1,6 @@ PORTNAME= promscale DISTVERSION= 0.17.0 -PORTREVISION= 20 +PORTREVISION= 21 CATEGORIES= net-mgmt MASTER_SITES= https://raw.githubusercontent.com/${GH_ACCOUNT}/${GH_PROJECT}/${DISTVERSIONFULL}/:gomod DISTFILES= go.mod:gomod diff --git a/net-mgmt/promxy/Makefile b/net-mgmt/promxy/Makefile index bb29457beb0a..9cae80e178a3 100644 --- a/net-mgmt/promxy/Makefile +++ b/net-mgmt/promxy/Makefile @@ -1,7 +1,7 @@ PORTNAME= promxy DISTVERSIONPREFIX= v DISTVERSION= 0.0.93 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= net-mgmt MAINTAINER= timp87@gmail.com diff --git a/net-mgmt/pushgateway/Makefile b/net-mgmt/pushgateway/Makefile index 529f463bee72..71c2971ac772 100644 --- a/net-mgmt/pushgateway/Makefile +++ b/net-mgmt/pushgateway/Makefile @@ -1,7 +1,7 @@ PORTNAME= pushgateway DISTVERSIONPREFIX= v DISTVERSION= 1.11.1 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= net-mgmt MAINTAINER= dutra@FreeBSD.org diff --git a/net-mgmt/py-pyixapi/Makefile b/net-mgmt/py-pyixapi/Makefile new file mode 100644 index 000000000000..b1c57adfe523 --- /dev/null +++ b/net-mgmt/py-pyixapi/Makefile @@ -0,0 +1,23 @@ +PORTNAME= pyixapi +DISTVERSION= 0.2.6 +CATEGORIES= net-mgmt python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= bofh@FreeBSD.org +COMMENT= Python API client library for IX-API +WWW= https://ix-api.net/ + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}poetry-core>0:devel/py-poetry-core@${PY_FLAVOR} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pyjwt>=2.4.0:www/py-pyjwt@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}requests>=2.20.0:www/py-requests@${PY_FLAVOR} + +USES= python +USE_PYTHON= autoplist pep517 + +NO_ARCH= yes + +.include <bsd.port.mk> diff --git a/net-mgmt/py-pyixapi/distinfo b/net-mgmt/py-pyixapi/distinfo new file mode 100644 index 000000000000..108271427920 --- /dev/null +++ b/net-mgmt/py-pyixapi/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1756893360 +SHA256 (pyixapi-0.2.6.tar.gz) = 864ef41255f62613db3161127b4c7c7bb36c776fb675cb3cdea3f7deee8a9732 +SIZE (pyixapi-0.2.6.tar.gz) = 14614 diff --git a/net-mgmt/py-pyixapi/pkg-descr b/net-mgmt/py-pyixapi/pkg-descr new file mode 100644 index 000000000000..41fcb40e2774 --- /dev/null +++ b/net-mgmt/py-pyixapi/pkg-descr @@ -0,0 +1,3 @@ +Python API client library for IX-API. + +Currently Supported API versions are version 1 and version 2. diff --git a/net-mgmt/semaphore/Makefile b/net-mgmt/semaphore/Makefile index af3649f6f53d..27d4c8941a24 100644 --- a/net-mgmt/semaphore/Makefile +++ b/net-mgmt/semaphore/Makefile @@ -1,7 +1,7 @@ PORTNAME= semaphore PORTVERSION= 2.9.2 DISTVERSIONPREFIX= v -PORTREVISION= 15 +PORTREVISION= 16 CATEGORIES= net-mgmt MAINTAINER= egypcio@FreeBSD.org diff --git a/net-mgmt/telegraf/Makefile b/net-mgmt/telegraf/Makefile index bab7558c53dc..443694e6321f 100644 --- a/net-mgmt/telegraf/Makefile +++ b/net-mgmt/telegraf/Makefile @@ -1,6 +1,7 @@ PORTNAME= telegraf DISTVERSIONPREFIX=v DISTVERSION= 1.35.4 +PORTREVISION= 2 CATEGORIES= net-mgmt MAINTAINER= girgen@FreeBSD.org @@ -16,7 +17,7 @@ USES= go:1.24,modules USE_RC_SUBR= telegraf GO_MODULE= github.com/influxdata/telegraf -GO_BUILDFLAGS= -ldflags "-X main.goos=freebsd -X main.goarch=${ARCH} -X main.version=${DISTVERSION}" +GO_BUILDFLAGS= -ldflags "-X github.com/influxdata/telegraf/internal.Version=${DISTVERSION}" GO_TARGET= ./cmd/telegraf SUB_FILES= telegraf diff --git a/net-mgmt/telegraf/files/patch-gopsutil b/net-mgmt/telegraf/files/patch-gopsutil new file mode 100644 index 000000000000..623b9e2e61da --- /dev/null +++ b/net-mgmt/telegraf/files/patch-gopsutil @@ -0,0 +1,753 @@ +--- vendor/github.com/shirou/gopsutil/v4/disk/disk_freebsd_arm64.go.orig 2025-09-01 15:17:42.603499000 +0000 ++++ vendor/github.com/shirou/gopsutil/v4/disk/disk_freebsd_arm64.go 2025-09-03 08:20:12.866056000 +0000 +@@ -52,7 +52,7 @@ + Flags uint32 + Device_type uint32 + Priority uint32 +- Id *byte ++ Id [sizeofPtr]byte + Sequence1 uint32 + Pad_cgo_0 [4]byte + } +--- vendor/github.com/shirou/gopsutil/v4/disk/disk_freebsd_arm.go.orig 2025-09-01 15:17:42.603343000 +0000 ++++ vendor/github.com/shirou/gopsutil/v4/disk/disk_freebsd_arm.go 2025-09-03 08:20:12.865772000 +0000 +@@ -50,7 +50,7 @@ + Flags uint32 + Device_type uint32 + Priority uint32 +- Id *byte ++ Id [sizeofPtr]byte + Sequence1 uint32 + } + +--- vendor/github.com/shirou/gopsutil/v4/disk/disk_freebsd_amd64.go.orig 2025-09-01 15:17:42.603178000 +0000 ++++ vendor/github.com/shirou/gopsutil/v4/disk/disk_freebsd_amd64.go 2025-09-03 08:20:12.865459000 +0000 +@@ -52,7 +52,7 @@ + Device_type uint32 + Priority uint32 + Pad_cgo_1 [4]byte +- ID *byte ++ ID [sizeofPtr]byte + Sequence1 uint32 + Pad_cgo_2 [4]byte + } +--- vendor/github.com/shirou/gopsutil/v4/disk/disk_openbsd.go.orig 2025-09-01 15:17:42.604526000 +0000 ++++ vendor/github.com/shirou/gopsutil/v4/disk/disk_openbsd.go 2025-09-03 08:20:12.866408000 +0000 +@@ -114,9 +114,7 @@ + func parseDiskstats(buf []byte) (Diskstats, error) { + var ds Diskstats + br := bytes.NewReader(buf) +- // err := binary.Read(br, binary.LittleEndian, &ds) +- err := common.Read(br, binary.LittleEndian, &ds) +- if err != nil { ++ if err := binary.Read(br, binary.LittleEndian, &ds); err != nil { + return ds, err + } + +--- vendor/github.com/shirou/gopsutil/v4/disk/disk_freebsd.go.orig 2025-09-01 15:17:42.602868000 +0000 ++++ vendor/github.com/shirou/gopsutil/v4/disk/disk_freebsd.go 2025-09-03 08:20:12.864783000 +0000 +@@ -154,9 +154,7 @@ + func parsedevstat(buf []byte) (devstat, error) { + var ds devstat + br := bytes.NewReader(buf) +- // err := binary.Read(br, binary.LittleEndian, &ds) +- err := common.Read(br, binary.LittleEndian, &ds) +- if err != nil { ++ if err := binary.Read(br, binary.LittleEndian, &ds); err != nil { + return ds, err + } + +--- vendor/github.com/shirou/gopsutil/v4/disk/disk_freebsd_386.go.orig 2025-09-01 15:17:42.603028000 +0000 ++++ vendor/github.com/shirou/gopsutil/v4/disk/disk_freebsd_386.go 2025-09-03 08:20:12.865161000 +0000 +@@ -50,7 +50,7 @@ + Flags uint32 + Device_type uint32 + Priority uint32 +- Id *byte ++ Id [sizeofPtr]byte + Sequence1 uint32 + } + +--- vendor/github.com/shirou/gopsutil/v4/process/process_bsd.go.orig 2025-09-01 15:17:42.632928000 +0000 ++++ vendor/github.com/shirou/gopsutil/v4/process/process_bsd.go 2025-09-03 08:20:15.328852000 +0000 +@@ -71,6 +71,6 @@ + func parseKinfoProc(buf []byte) (KinfoProc, error) { + var k KinfoProc + br := bytes.NewReader(buf) +- err := common.Read(br, binary.LittleEndian, &k) ++ err := binary.Read(br, binary.LittleEndian, &k) + return k, err + } +--- vendor/github.com/shirou/gopsutil/v4/process/process_freebsd.go.orig 2025-09-01 15:17:42.633796000 +0000 ++++ vendor/github.com/shirou/gopsutil/v4/process/process_freebsd.go 2025-09-03 08:20:15.329256000 +0000 +@@ -79,7 +79,7 @@ + + var k kinfoFile + br := bytes.NewReader(buf) +- if err := common.Read(br, binary.LittleEndian, &k); err != nil { ++ if err := binary.Read(br, binary.LittleEndian, &k); err != nil { + return "", err + } + cwd := common.IntToString(k.Path[:]) +@@ -279,7 +279,7 @@ + if err != nil { + return nil, err + } +- pageSize := common.LittleEndian.Uint16([]byte(v)) ++ pageSize := binary.LittleEndian.Uint16([]byte(v)) + + return &MemoryInfoStat{ + RSS: uint64(k.Rssize) * uint64(pageSize), +--- vendor/github.com/shirou/gopsutil/v4/internal/common/binary.go.orig 2025-09-01 15:17:42.617027000 +0000 ++++ vendor/github.com/shirou/gopsutil/v4/internal/common/binary.go 2025-09-03 08:20:15.328241000 +0000 +@@ -1,638 +0,0 @@ +-// SPDX-License-Identifier: BSD-3-Clause +-package common +- +-// Copyright 2009 The Go Authors. All rights reserved. +-// Use of this source code is governed by a BSD-style +-// license that can be found in the LICENSE file. +- +-// Package binary implements simple translation between numbers and byte +-// sequences and encoding and decoding of varints. +-// +-// Numbers are translated by reading and writing fixed-size values. +-// A fixed-size value is either a fixed-size arithmetic +-// type (int8, uint8, int16, float32, complex64, ...) +-// or an array or struct containing only fixed-size values. +-// +-// The varint functions encode and decode single integer values using +-// a variable-length encoding; smaller values require fewer bytes. +-// For a specification, see +-// http://code.google.com/apis/protocolbuffers/docs/encoding.html. +-// +-// This package favors simplicity over efficiency. Clients that require +-// high-performance serialization, especially for large data structures, +-// should look at more advanced solutions such as the encoding/gob +-// package or protocol buffers. +- +-import ( +- "errors" +- "io" +- "math" +- "reflect" +-) +- +-// A ByteOrder specifies how to convert byte sequences into +-// 16-, 32-, or 64-bit unsigned integers. +-type ByteOrder interface { +- Uint16([]byte) uint16 +- Uint32([]byte) uint32 +- Uint64([]byte) uint64 +- PutUint16([]byte, uint16) +- PutUint32([]byte, uint32) +- PutUint64([]byte, uint64) +- String() string +-} +- +-// LittleEndian is the little-endian implementation of ByteOrder. +-var LittleEndian littleEndian +- +-// BigEndian is the big-endian implementation of ByteOrder. +-var BigEndian bigEndian +- +-type littleEndian struct{} +- +-func (littleEndian) Uint16(b []byte) uint16 { return uint16(b[0]) | uint16(b[1])<<8 } +- +-func (littleEndian) PutUint16(b []byte, v uint16) { +- b[0] = byte(v) +- b[1] = byte(v >> 8) +-} +- +-func (littleEndian) Uint32(b []byte) uint32 { +- return uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24 +-} +- +-func (littleEndian) PutUint32(b []byte, v uint32) { +- b[0] = byte(v) +- b[1] = byte(v >> 8) +- b[2] = byte(v >> 16) +- b[3] = byte(v >> 24) +-} +- +-func (littleEndian) Uint64(b []byte) uint64 { +- return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | +- uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56 +-} +- +-func (littleEndian) PutUint64(b []byte, v uint64) { +- b[0] = byte(v) +- b[1] = byte(v >> 8) +- b[2] = byte(v >> 16) +- b[3] = byte(v >> 24) +- b[4] = byte(v >> 32) +- b[5] = byte(v >> 40) +- b[6] = byte(v >> 48) +- b[7] = byte(v >> 56) +-} +- +-func (littleEndian) String() string { return "LittleEndian" } +- +-func (littleEndian) GoString() string { return "binary.LittleEndian" } +- +-type bigEndian struct{} +- +-func (bigEndian) Uint16(b []byte) uint16 { return uint16(b[1]) | uint16(b[0])<<8 } +- +-func (bigEndian) PutUint16(b []byte, v uint16) { +- b[0] = byte(v >> 8) +- b[1] = byte(v) +-} +- +-func (bigEndian) Uint32(b []byte) uint32 { +- return uint32(b[3]) | uint32(b[2])<<8 | uint32(b[1])<<16 | uint32(b[0])<<24 +-} +- +-func (bigEndian) PutUint32(b []byte, v uint32) { +- b[0] = byte(v >> 24) +- b[1] = byte(v >> 16) +- b[2] = byte(v >> 8) +- b[3] = byte(v) +-} +- +-func (bigEndian) Uint64(b []byte) uint64 { +- return uint64(b[7]) | uint64(b[6])<<8 | uint64(b[5])<<16 | uint64(b[4])<<24 | +- uint64(b[3])<<32 | uint64(b[2])<<40 | uint64(b[1])<<48 | uint64(b[0])<<56 +-} +- +-func (bigEndian) PutUint64(b []byte, v uint64) { +- b[0] = byte(v >> 56) +- b[1] = byte(v >> 48) +- b[2] = byte(v >> 40) +- b[3] = byte(v >> 32) +- b[4] = byte(v >> 24) +- b[5] = byte(v >> 16) +- b[6] = byte(v >> 8) +- b[7] = byte(v) +-} +- +-func (bigEndian) String() string { return "BigEndian" } +- +-func (bigEndian) GoString() string { return "binary.BigEndian" } +- +-// Read reads structured binary data from r into data. +-// Data must be a pointer to a fixed-size value or a slice +-// of fixed-size values. +-// Bytes read from r are decoded using the specified byte order +-// and written to successive fields of the data. +-// When reading into structs, the field data for fields with +-// blank (_) field names is skipped; i.e., blank field names +-// may be used for padding. +-// When reading into a struct, all non-blank fields must be exported. +-func Read(r io.Reader, order ByteOrder, data any) error { +- // Fast path for basic types and slices. +- if n := intDataSize(data); n != 0 { +- var b [8]byte +- var bs []byte +- if n > len(b) { +- bs = make([]byte, n) +- } else { +- bs = b[:n] +- } +- if _, err := io.ReadFull(r, bs); err != nil { +- return err +- } +- switch data := data.(type) { +- case *int8: +- *data = int8(b[0]) +- case *uint8: +- *data = b[0] +- case *int16: +- *data = int16(order.Uint16(bs)) +- case *uint16: +- *data = order.Uint16(bs) +- case *int32: +- *data = int32(order.Uint32(bs)) +- case *uint32: +- *data = order.Uint32(bs) +- case *int64: +- *data = int64(order.Uint64(bs)) +- case *uint64: +- *data = order.Uint64(bs) +- case []int8: +- for i, x := range bs { // Easier to loop over the input for 8-bit values. +- data[i] = int8(x) +- } +- case []uint8: +- copy(data, bs) +- case []int16: +- for i := range data { +- data[i] = int16(order.Uint16(bs[2*i:])) +- } +- case []uint16: +- for i := range data { +- data[i] = order.Uint16(bs[2*i:]) +- } +- case []int32: +- for i := range data { +- data[i] = int32(order.Uint32(bs[4*i:])) +- } +- case []uint32: +- for i := range data { +- data[i] = order.Uint32(bs[4*i:]) +- } +- case []int64: +- for i := range data { +- data[i] = int64(order.Uint64(bs[8*i:])) +- } +- case []uint64: +- for i := range data { +- data[i] = order.Uint64(bs[8*i:]) +- } +- } +- return nil +- } +- +- // Fallback to reflect-based decoding. +- v := reflect.ValueOf(data) +- size := -1 +- switch v.Kind() { +- case reflect.Ptr: +- v = v.Elem() +- size = dataSize(v) +- case reflect.Slice: +- size = dataSize(v) +- } +- if size < 0 { +- return errors.New("binary.Read: invalid type " + reflect.TypeOf(data).String()) +- } +- d := &decoder{order: order, buf: make([]byte, size)} +- if _, err := io.ReadFull(r, d.buf); err != nil { +- return err +- } +- d.value(v) +- return nil +-} +- +-// Write writes the binary representation of data into w. +-// Data must be a fixed-size value or a slice of fixed-size +-// values, or a pointer to such data. +-// Bytes written to w are encoded using the specified byte order +-// and read from successive fields of the data. +-// When writing structs, zero values are written for fields +-// with blank (_) field names. +-func Write(w io.Writer, order ByteOrder, data any) error { +- // Fast path for basic types and slices. +- if n := intDataSize(data); n != 0 { +- var b [8]byte +- var bs []byte +- if n > len(b) { +- bs = make([]byte, n) +- } else { +- bs = b[:n] +- } +- switch v := data.(type) { +- case *int8: +- bs = b[:1] +- b[0] = byte(*v) +- case int8: +- bs = b[:1] +- b[0] = byte(v) +- case []int8: +- for i, x := range v { +- bs[i] = byte(x) +- } +- case *uint8: +- bs = b[:1] +- b[0] = *v +- case uint8: +- bs = b[:1] +- b[0] = byte(v) +- case []uint8: +- bs = v +- case *int16: +- bs = b[:2] +- order.PutUint16(bs, uint16(*v)) +- case int16: +- bs = b[:2] +- order.PutUint16(bs, uint16(v)) +- case []int16: +- for i, x := range v { +- order.PutUint16(bs[2*i:], uint16(x)) +- } +- case *uint16: +- bs = b[:2] +- order.PutUint16(bs, *v) +- case uint16: +- bs = b[:2] +- order.PutUint16(bs, v) +- case []uint16: +- for i, x := range v { +- order.PutUint16(bs[2*i:], x) +- } +- case *int32: +- bs = b[:4] +- order.PutUint32(bs, uint32(*v)) +- case int32: +- bs = b[:4] +- order.PutUint32(bs, uint32(v)) +- case []int32: +- for i, x := range v { +- order.PutUint32(bs[4*i:], uint32(x)) +- } +- case *uint32: +- bs = b[:4] +- order.PutUint32(bs, *v) +- case uint32: +- bs = b[:4] +- order.PutUint32(bs, v) +- case []uint32: +- for i, x := range v { +- order.PutUint32(bs[4*i:], x) +- } +- case *int64: +- bs = b[:8] +- order.PutUint64(bs, uint64(*v)) +- case int64: +- bs = b[:8] +- order.PutUint64(bs, uint64(v)) +- case []int64: +- for i, x := range v { +- order.PutUint64(bs[8*i:], uint64(x)) +- } +- case *uint64: +- bs = b[:8] +- order.PutUint64(bs, *v) +- case uint64: +- bs = b[:8] +- order.PutUint64(bs, v) +- case []uint64: +- for i, x := range v { +- order.PutUint64(bs[8*i:], x) +- } +- } +- _, err := w.Write(bs) +- return err +- } +- +- // Fallback to reflect-based encoding. +- v := reflect.Indirect(reflect.ValueOf(data)) +- size := dataSize(v) +- if size < 0 { +- return errors.New("binary.Write: invalid type " + reflect.TypeOf(data).String()) +- } +- buf := make([]byte, size) +- e := &encoder{order: order, buf: buf} +- e.value(v) +- _, err := w.Write(buf) +- return err +-} +- +-// Size returns how many bytes Write would generate to encode the value v, which +-// must be a fixed-size value or a slice of fixed-size values, or a pointer to such data. +-// If v is neither of these, Size returns -1. +-func Size(v any) int { +- return dataSize(reflect.Indirect(reflect.ValueOf(v))) +-} +- +-// dataSize returns the number of bytes the actual data represented by v occupies in memory. +-// For compound structures, it sums the sizes of the elements. Thus, for instance, for a slice +-// it returns the length of the slice times the element size and does not count the memory +-// occupied by the header. If the type of v is not acceptable, dataSize returns -1. +-func dataSize(v reflect.Value) int { +- if v.Kind() == reflect.Slice { +- if s := sizeof(v.Type().Elem()); s >= 0 { +- return s * v.Len() +- } +- return -1 +- } +- return sizeof(v.Type()) +-} +- +-// sizeof returns the size >= 0 of variables for the given type or -1 if the type is not acceptable. +-func sizeof(t reflect.Type) int { +- switch t.Kind() { +- case reflect.Array: +- if s := sizeof(t.Elem()); s >= 0 { +- return s * t.Len() +- } +- +- case reflect.Struct: +- sum := 0 +- for i, n := 0, t.NumField(); i < n; i++ { +- s := sizeof(t.Field(i).Type) +- if s < 0 { +- return -1 +- } +- sum += s +- } +- return sum +- +- case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, +- reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, +- reflect.Float32, reflect.Float64, reflect.Complex64, reflect.Complex128, reflect.Ptr: +- return int(t.Size()) +- } +- +- return -1 +-} +- +-type coder struct { +- order ByteOrder +- buf []byte +-} +- +-type ( +- decoder coder +- encoder coder +-) +- +-func (d *decoder) uint8() uint8 { +- x := d.buf[0] +- d.buf = d.buf[1:] +- return x +-} +- +-func (e *encoder) uint8(x uint8) { +- e.buf[0] = x +- e.buf = e.buf[1:] +-} +- +-func (d *decoder) uint16() uint16 { +- x := d.order.Uint16(d.buf[0:2]) +- d.buf = d.buf[2:] +- return x +-} +- +-func (e *encoder) uint16(x uint16) { +- e.order.PutUint16(e.buf[0:2], x) +- e.buf = e.buf[2:] +-} +- +-func (d *decoder) uint32() uint32 { +- x := d.order.Uint32(d.buf[0:4]) +- d.buf = d.buf[4:] +- return x +-} +- +-func (e *encoder) uint32(x uint32) { +- e.order.PutUint32(e.buf[0:4], x) +- e.buf = e.buf[4:] +-} +- +-func (d *decoder) uint64() uint64 { +- x := d.order.Uint64(d.buf[0:8]) +- d.buf = d.buf[8:] +- return x +-} +- +-func (e *encoder) uint64(x uint64) { +- e.order.PutUint64(e.buf[0:8], x) +- e.buf = e.buf[8:] +-} +- +-func (d *decoder) int8() int8 { return int8(d.uint8()) } +- +-func (e *encoder) int8(x int8) { e.uint8(uint8(x)) } +- +-func (d *decoder) int16() int16 { return int16(d.uint16()) } +- +-func (e *encoder) int16(x int16) { e.uint16(uint16(x)) } +- +-func (d *decoder) int32() int32 { return int32(d.uint32()) } +- +-func (e *encoder) int32(x int32) { e.uint32(uint32(x)) } +- +-func (d *decoder) int64() int64 { return int64(d.uint64()) } +- +-func (e *encoder) int64(x int64) { e.uint64(uint64(x)) } +- +-func (d *decoder) value(v reflect.Value) { +- switch v.Kind() { +- case reflect.Array: +- l := v.Len() +- for i := 0; i < l; i++ { +- d.value(v.Index(i)) +- } +- +- case reflect.Struct: +- t := v.Type() +- l := v.NumField() +- for i := 0; i < l; i++ { +- // Note: Calling v.CanSet() below is an optimization. +- // It would be sufficient to check the field name, +- // but creating the StructField info for each field is +- // costly (run "go test -bench=ReadStruct" and compare +- // results when making changes to this code). +- if v = v.Field(i); v.CanSet() || t.Field(i).Name != "_" { +- d.value(v) +- } else { +- d.skip(v) +- } +- } +- +- case reflect.Slice: +- l := v.Len() +- for i := 0; i < l; i++ { +- d.value(v.Index(i)) +- } +- +- case reflect.Int8: +- v.SetInt(int64(d.int8())) +- case reflect.Int16: +- v.SetInt(int64(d.int16())) +- case reflect.Int32: +- v.SetInt(int64(d.int32())) +- case reflect.Int64: +- v.SetInt(d.int64()) +- +- case reflect.Uint8: +- v.SetUint(uint64(d.uint8())) +- case reflect.Uint16: +- v.SetUint(uint64(d.uint16())) +- case reflect.Uint32: +- v.SetUint(uint64(d.uint32())) +- case reflect.Uint64: +- v.SetUint(d.uint64()) +- +- case reflect.Float32: +- v.SetFloat(float64(math.Float32frombits(d.uint32()))) +- case reflect.Float64: +- v.SetFloat(math.Float64frombits(d.uint64())) +- +- case reflect.Complex64: +- v.SetComplex(complex( +- float64(math.Float32frombits(d.uint32())), +- float64(math.Float32frombits(d.uint32())), +- )) +- case reflect.Complex128: +- v.SetComplex(complex( +- math.Float64frombits(d.uint64()), +- math.Float64frombits(d.uint64()), +- )) +- } +-} +- +-func (e *encoder) value(v reflect.Value) { +- switch v.Kind() { +- case reflect.Array: +- l := v.Len() +- for i := 0; i < l; i++ { +- e.value(v.Index(i)) +- } +- +- case reflect.Struct: +- t := v.Type() +- l := v.NumField() +- for i := 0; i < l; i++ { +- // see comment for corresponding code in decoder.value() +- if v = v.Field(i); v.CanSet() || t.Field(i).Name != "_" { +- e.value(v) +- } else { +- e.skip(v) +- } +- } +- +- case reflect.Slice: +- l := v.Len() +- for i := 0; i < l; i++ { +- e.value(v.Index(i)) +- } +- +- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: +- switch v.Type().Kind() { +- case reflect.Int8: +- e.int8(int8(v.Int())) +- case reflect.Int16: +- e.int16(int16(v.Int())) +- case reflect.Int32: +- e.int32(int32(v.Int())) +- case reflect.Int64: +- e.int64(v.Int()) +- } +- +- case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: +- switch v.Type().Kind() { +- case reflect.Uint8: +- e.uint8(uint8(v.Uint())) +- case reflect.Uint16: +- e.uint16(uint16(v.Uint())) +- case reflect.Uint32: +- e.uint32(uint32(v.Uint())) +- case reflect.Uint64: +- e.uint64(v.Uint()) +- } +- +- case reflect.Float32, reflect.Float64: +- switch v.Type().Kind() { +- case reflect.Float32: +- e.uint32(math.Float32bits(float32(v.Float()))) +- case reflect.Float64: +- e.uint64(math.Float64bits(v.Float())) +- } +- +- case reflect.Complex64, reflect.Complex128: +- switch v.Type().Kind() { +- case reflect.Complex64: +- x := v.Complex() +- e.uint32(math.Float32bits(float32(real(x)))) +- e.uint32(math.Float32bits(float32(imag(x)))) +- case reflect.Complex128: +- x := v.Complex() +- e.uint64(math.Float64bits(real(x))) +- e.uint64(math.Float64bits(imag(x))) +- } +- } +-} +- +-func (d *decoder) skip(v reflect.Value) { +- d.buf = d.buf[dataSize(v):] +-} +- +-func (e *encoder) skip(v reflect.Value) { +- n := dataSize(v) +- for i := range e.buf[0:n] { +- e.buf[i] = 0 +- } +- e.buf = e.buf[n:] +-} +- +-// intDataSize returns the size of the data required to represent the data when encoded. +-// It returns zero if the type cannot be implemented by the fast path in Read or Write. +-func intDataSize(data any) int { +- switch data := data.(type) { +- case int8, *int8, *uint8: +- return 1 +- case []int8: +- return len(data) +- case []uint8: +- return len(data) +- case int16, *int16, *uint16: +- return 2 +- case []int16: +- return 2 * len(data) +- case []uint16: +- return 2 * len(data) +- case int32, *int32, *uint32: +- return 4 +- case []int32: +- return 4 * len(data) +- case []uint32: +- return 4 * len(data) +- case int64, *int64, *uint64: +- return 8 +- case []int64: +- return 8 * len(data) +- case []uint64: +- return 8 * len(data) +- } +- return 0 +-} +--- vendor/github.com/shirou/gopsutil/v4/mem/mem_openbsd.go.orig 2025-09-01 15:17:42.625682000 +0000 ++++ vendor/github.com/shirou/gopsutil/v4/mem/mem_openbsd.go 2025-09-03 08:20:15.328569000 +0000 +@@ -61,8 +61,7 @@ + } + var bcs Bcachestats + br := bytes.NewReader(buf) +- err = common.Read(br, binary.LittleEndian, &bcs) +- if err != nil { ++ if err := binary.Read(br, binary.LittleEndian, &bcs); err != nil { + return nil, err + } + ret.Buffers = uint64(bcs.Numbufpages) * p diff --git a/net-mgmt/thanos/Makefile b/net-mgmt/thanos/Makefile index 09fd8fc1ff4a..e7a4c4877c4e 100644 --- a/net-mgmt/thanos/Makefile +++ b/net-mgmt/thanos/Makefile @@ -1,7 +1,7 @@ PORTNAME= thanos DISTVERSIONPREFIX= v DISTVERSION= 0.39.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net-mgmt MAINTAINER= alven@FreeBSD.org diff --git a/net-mgmt/unbound_exporter/Makefile b/net-mgmt/unbound_exporter/Makefile index c6b43368b793..ec42d04dcbb0 100644 --- a/net-mgmt/unbound_exporter/Makefile +++ b/net-mgmt/unbound_exporter/Makefile @@ -1,7 +1,7 @@ PORTNAME= unbound_exporter PORTVERSION= 0.4.6 DISTVERSIONPREFIX= v -PORTREVISION= 11 +PORTREVISION= 12 CATEGORIES= net-mgmt MAINTAINER= aduitsis@cpan.org diff --git a/net-mgmt/victoria-logs/Makefile b/net-mgmt/victoria-logs/Makefile index 2835deec2137..389955c97f0b 100644 --- a/net-mgmt/victoria-logs/Makefile +++ b/net-mgmt/victoria-logs/Makefile @@ -1,6 +1,7 @@ PORTNAME= victoria-logs -PORTVERSION= 1.31.0 +PORTVERSION= 1.32.0 DISTVERSIONPREFIX= v +PORTREVISION= 1 CATEGORIES= net-mgmt MAINTAINER= samm@FreeBSD.org diff --git a/net-mgmt/victoria-logs/distinfo b/net-mgmt/victoria-logs/distinfo index 6dbfd7cf2f2a..bd39e6600077 100644 --- a/net-mgmt/victoria-logs/distinfo +++ b/net-mgmt/victoria-logs/distinfo @@ -1,5 +1,5 @@ -TIMESTAMP = 1756723992 -SHA256 (go/net-mgmt_victoria-logs/victoria-logs-v1.31.0/v1.31.0.mod) = acf605656d2b19bc4524b239c73f98e3827c433e8898c189297997b235a9152f -SIZE (go/net-mgmt_victoria-logs/victoria-logs-v1.31.0/v1.31.0.mod) = 958 -SHA256 (go/net-mgmt_victoria-logs/victoria-logs-v1.31.0/v1.31.0.zip) = d98cf5293b76a56ce41a57b02d3567ba47319dcf585115d40c9db1a6ede3483d -SIZE (go/net-mgmt_victoria-logs/victoria-logs-v1.31.0/v1.31.0.zip) = 2880791 +TIMESTAMP = 1756877909 +SHA256 (go/net-mgmt_victoria-logs/victoria-logs-v1.32.0/v1.32.0.mod) = acf605656d2b19bc4524b239c73f98e3827c433e8898c189297997b235a9152f +SIZE (go/net-mgmt_victoria-logs/victoria-logs-v1.32.0/v1.32.0.mod) = 958 +SHA256 (go/net-mgmt_victoria-logs/victoria-logs-v1.32.0/v1.32.0.zip) = df15e59c1c994a4bef0dfd2b3c3f37bb28398c8d37d3ffacadcc350bbe850c16 +SIZE (go/net-mgmt_victoria-logs/victoria-logs-v1.32.0/v1.32.0.zip) = 2907554 diff --git a/net-mgmt/victoria-metrics/Makefile b/net-mgmt/victoria-metrics/Makefile index 8ded27bc0e4d..65abb771c070 100644 --- a/net-mgmt/victoria-metrics/Makefile +++ b/net-mgmt/victoria-metrics/Makefile @@ -1,7 +1,7 @@ PORTNAME?= victoria-metrics PORTVERSION= 1.123.0 # don't forget to update BUILDINFO_TAG DISTVERSIONPREFIX= v -PORTREVISION?= 0 +PORTREVISION?= 1 CATEGORIES= net-mgmt MAINTAINER= danfe@FreeBSD.org diff --git a/net-mgmt/vmutils/Makefile b/net-mgmt/vmutils/Makefile index faa8e86c8244..81fa7ca916df 100644 --- a/net-mgmt/vmutils/Makefile +++ b/net-mgmt/vmutils/Makefile @@ -1,4 +1,5 @@ PORTNAME= vmutils +PORTREVISION= 1 COMMENT= Ancillary utilities and agent for VictoriaMetrics |