diff --git a/sysutils/py-psutil/Makefile b/sysutils/py-psutil/Makefile index de7c78a6083b..fbcc83762093 100644 --- a/sysutils/py-psutil/Makefile +++ b/sysutils/py-psutil/Makefile @@ -1,28 +1,29 @@ PORTNAME= psutil PORTVERSION= 7.2.2 +PORTREVISION= 1 CATEGORIES= sysutils python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= sunpoet@FreeBSD.org COMMENT= Process utilities module for Python WWW= https://psutil.readthedocs.io/en/latest/ \ https://github.com/giampaolo/psutil LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=43:devel/py-setuptools@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR} USES= cpe python USE_PYTHON= autoplist concurrent pep517 LDFLAGS+= -lutil CPE_VENDOR= psutil_project post-install: ${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} + .include diff --git a/sysutils/py-psutil/files/patch-psutil_arch_freebsd_cpu.c b/sysutils/py-psutil/files/patch-psutil_arch_freebsd_cpu.c new file mode 100644 index 000000000000..2e38e50e73b2 --- /dev/null +++ b/sysutils/py-psutil/files/patch-psutil_arch_freebsd_cpu.c @@ -0,0 +1,13 @@ +Obtained from: https://github.com/giampaolo/psutil/commit/04794aa03cb9d30287e8e7fd9c80acc8c4f2aa46 + +--- psutil/arch/freebsd/cpu.c.orig 2025-12-14 20:10:53 UTC ++++ psutil/arch/freebsd/cpu.c +@@ -149,7 +149,7 @@ psutil_cpu_freq(PyObject *self, PyObject *args) { + int current; + int core; + char sensor[26]; +- char available_freq_levels[1000]; ++ char available_freq_levels[1000] = {0}; + size_t size; + + if (!PyArg_ParseTuple(args, "i", &core)) diff --git a/sysutils/py-psutil/files/patch-psutil_arch_posix_sysctl.c b/sysutils/py-psutil/files/patch-psutil_arch_posix_sysctl.c new file mode 100644 index 000000000000..b033cee39611 --- /dev/null +++ b/sysutils/py-psutil/files/patch-psutil_arch_posix_sysctl.c @@ -0,0 +1,22 @@ +Obtained from: https://github.com/giampaolo/psutil/commit/04794aa03cb9d30287e8e7fd9c80acc8c4f2aa46 + +--- psutil/arch/posix/sysctl.c.orig 2026-01-12 08:59:45 UTC ++++ psutil/arch/posix/sysctl.c +@@ -28,7 +28,7 @@ psutil_sysctl(int *mib, u_int miblen, void *buf, size_ + return -1; + } + +- if (len != buflen) { ++ if (len > buflen) { + psutil_runtime_error("sysctl() size mismatch"); + return -1; + } +@@ -139,7 +139,7 @@ psutil_sysctlbyname(const char *name, void *buf, size_ + return -1; + } + +- if (len != buflen) { ++ if (len > buflen) { + str_format( + errbuf, + sizeof(errbuf),