Received: by mail.netbsd.org (Postfix, from userid 605) id 9F41684D44; Tue, 2 Aug 2022 17:13:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id D428784CF7 for ; Tue, 2 Aug 2022 17:13:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id jJF_p4P6ZlpY for ; Tue, 2 Aug 2022 17:13:11 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id 2E0F284CDC for ; Tue, 2 Aug 2022 17:13:11 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 1C6ECFB1A; Tue, 2 Aug 2022 17:13:11 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_165946039196370" MIME-Version: 1.0 Date: Tue, 2 Aug 2022 17:13:11 +0000 From: "Thomas Klausner" Subject: CVS commit: pkgsrc/sysutils/py-psutil To: pkgsrc-changes@NetBSD.org Reply-To: wiz@netbsd.org X-Mailer: log_accum Message-Id: <20220802171311.1C6ECFB1A@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_165946039196370 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" 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. --_----------=_165946039196370 Content-Disposition: inline Content-Length: 3386 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii 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); --_----------=_165946039196370--