pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/sysutils/py-psutil



Module Name:    pkgsrc
Committed By:   wiz
Date:           Tue Aug  2 17:13:11 UTC 2022

Modified Files:
        pkgsrc/sysutils/py-psutil: Makefile distinfo
Added Files:
        pkgsrc/sysutils/py-psutil/patches: patch-psutil_arch_netbsd_specific.c

Log Message:
py-psutil: fix bugs in swap code on NetBSD.

Bump PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 pkgsrc/sysutils/py-psutil/Makefile
cvs rdiff -u -r1.45 -r1.46 pkgsrc/sysutils/py-psutil/distinfo
cvs rdiff -u -r0 -r1.6 \
    pkgsrc/sysutils/py-psutil/patches/patch-psutil_arch_netbsd_specific.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/sysutils/py-psutil/Makefile
diff -u pkgsrc/sysutils/py-psutil/Makefile:1.44 pkgsrc/sysutils/py-psutil/Makefile:1.45
--- pkgsrc/sysutils/py-psutil/Makefile:1.44     Thu Jul  7 11:54:53 2022
+++ pkgsrc/sysutils/py-psutil/Makefile  Tue Aug  2 17:13:10 2022
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.44 2022/07/07 11:54:53 adam Exp $
+# $NetBSD: Makefile,v 1.45 2022/08/02 17:13:10 wiz Exp $
 
 DISTNAME=      psutil-5.9.1
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
+PKGREVISION=   1
 CATEGORIES=    sysutils python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=p/psutil/}
 
@@ -17,7 +18,7 @@ PYTHON_VERSIONS_INCOMPATIBLE= 27
 # facilitate PLIST processing
 .if ${OPSYS} == "Darwin"
 PLIST_SUBST+=  SYSTEM=osx
-.elif !empty(OPSYS:M*BSD)
+.elif ${OPSYS:M*BSD}
 PLIST_SUBST+=  SYSTEM=bsd
 .else
 PLIST_SUBST+=  SYSTEM=${OPSYS:tl}

Index: pkgsrc/sysutils/py-psutil/distinfo
diff -u pkgsrc/sysutils/py-psutil/distinfo:1.45 pkgsrc/sysutils/py-psutil/distinfo:1.46
--- pkgsrc/sysutils/py-psutil/distinfo:1.45     Thu Jul  7 11:54:53 2022
+++ pkgsrc/sysutils/py-psutil/distinfo  Tue Aug  2 17:13:10 2022
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.45 2022/07/07 11:54:53 adam Exp $
+$NetBSD: distinfo,v 1.46 2022/08/02 17:13:10 wiz Exp $
 
 BLAKE2s (psutil-5.9.1.tar.gz) = 5aae9fa5a4e596f3074bddead9b0cd0e49aa164b8fc4507a95c4c04569a2e53f
 SHA512 (psutil-5.9.1.tar.gz) = 1ddb119a10243d17d808417817ec8659d22447f12a4bbc0366c13f6587a4b0b59f4e74f6ac5d1e1a908bb5fd287be630466d32beabcb5008f6a19c24a1557c27
 Size (psutil-5.9.1.tar.gz) = 479090 bytes
 SHA1 (patch-psutil___psbsd.py) = ae69cf5f7ce590c34ef4e770b2fb0386425f33b6
+SHA1 (patch-psutil_arch_netbsd_specific.c) = ce7c91a1f7de0cbc443435fcb1e34af96bff4a3e

Added files:

Index: pkgsrc/sysutils/py-psutil/patches/patch-psutil_arch_netbsd_specific.c
diff -u /dev/null pkgsrc/sysutils/py-psutil/patches/patch-psutil_arch_netbsd_specific.c:1.6
--- /dev/null   Tue Aug  2 17:13:11 2022
+++ pkgsrc/sysutils/py-psutil/patches/patch-psutil_arch_netbsd_specific.c       Tue Aug  2 17:13:10 2022
@@ -0,0 +1,27 @@
+$NetBSD: patch-psutil_arch_netbsd_specific.c,v 1.6 2022/08/02 17:13:10 wiz Exp $
+
+Fix swap code.
+https://github.com/giampaolo/psutil/pull/2128
+
+--- psutil/arch/netbsd/specific.c.orig 2022-02-01 21:23:36.000000000 +0000
++++ psutil/arch/netbsd/specific.c
+@@ -459,7 +459,7 @@ psutil_virtual_mem(PyObject *self, PyObj
+         (unsigned long long) uv.active << uv.pageshift,  // active
+         (unsigned long long) uv.inactive << uv.pageshift,  // inactive
+         (unsigned long long) uv.wired << uv.pageshift,  // wired
+-        (unsigned long long) uv.filepages + uv.execpages * pagesize,  // cached
++        (unsigned long long) (uv.filepages + uv.execpages) * pagesize,  // cached
+         // These are determined from /proc/meminfo in Python.
+         (unsigned long long) 0,  // buffers
+         (unsigned long long) 0  // shared
+@@ -495,8 +495,8 @@ psutil_swap_mem(PyObject *self, PyObject
+     swap_total = swap_free = 0;
+     for (i = 0; i < nswap; i++) {
+         if (swdev[i].se_flags & SWF_ENABLE) {
+-            swap_total += swdev[i].se_nblks * DEV_BSIZE;
+-            swap_free += (swdev[i].se_nblks - swdev[i].se_inuse) * DEV_BSIZE;
++            swap_total += (uint64_t)swdev[i].se_nblks * DEV_BSIZE;
++            swap_free += (uint64_t)(swdev[i].se_nblks - swdev[i].se_inuse) * DEV_BSIZE;
+         }
+     }
+     free(swdev);



Home | Main Index | Thread Index | Old Index