pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/www/py-uwsgi
Module Name: pkgsrc
Committed By: joerg
Date: Sun Feb 26 00:52:49 UTC 2023
Modified Files:
pkgsrc/www/py-uwsgi: Makefile distinfo
pkgsrc/www/py-uwsgi/patches: patch-core_logging.c patch-uwsgiconfig.py
Log Message:
Reimplement get_memusage for NetBSD to actually work. Bump revision.
To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 pkgsrc/www/py-uwsgi/Makefile
cvs rdiff -u -r1.42 -r1.43 pkgsrc/www/py-uwsgi/distinfo
cvs rdiff -u -r1.5 -r1.6 pkgsrc/www/py-uwsgi/patches/patch-core_logging.c
cvs rdiff -u -r1.10 -r1.11 pkgsrc/www/py-uwsgi/patches/patch-uwsgiconfig.py
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/www/py-uwsgi/Makefile
diff -u pkgsrc/www/py-uwsgi/Makefile:1.55 pkgsrc/www/py-uwsgi/Makefile:1.56
--- pkgsrc/www/py-uwsgi/Makefile:1.55 Wed Nov 23 16:21:21 2022
+++ pkgsrc/www/py-uwsgi/Makefile Sun Feb 26 00:52:49 2023
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.55 2022/11/23 16:21:21 adam Exp $
+# $NetBSD: Makefile,v 1.56 2023/02/26 00:52:49 joerg Exp $
DISTNAME= uwsgi-2.0.21
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= www python
MASTER_SITES= ${MASTER_SITE_PYPI:=u/uwsgi/}
Index: pkgsrc/www/py-uwsgi/distinfo
diff -u pkgsrc/www/py-uwsgi/distinfo:1.42 pkgsrc/www/py-uwsgi/distinfo:1.43
--- pkgsrc/www/py-uwsgi/distinfo:1.42 Wed Nov 2 07:26:47 2022
+++ pkgsrc/www/py-uwsgi/distinfo Sun Feb 26 00:52:49 2023
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.42 2022/11/02 07:26:47 wiz Exp $
+$NetBSD: distinfo,v 1.43 2023/02/26 00:52:49 joerg Exp $
BLAKE2s (uwsgi-2.0.21.tar.gz) = e68d7fd3bbfa256fe40a52088eb7f329bcf3a57b6fd1b2ca4b2408d0019e3300
SHA512 (uwsgi-2.0.21.tar.gz) = 36a9c1b87a4c3d08482b9045d2227f56b006acb53f38ddf1b510880ae5fc24c0177a077338ec8af3ef0b8f8e220bc4fc7f8311dab8066e13cbcbb616f736c795
Size (uwsgi-2.0.21.tar.gz) = 808494 bytes
SHA1 (patch-base.ini) = 1c5d7693e6c8011e6cc34f5f5d203584c985eb30
-SHA1 (patch-core_logging.c) = d34024813d8437476dcc75d0710b8c33aab9f731
+SHA1 (patch-core_logging.c) = e1e5f39446baecdcfc1738aa97852ad3d5ca40c7
SHA1 (patch-uwsgi.h) = a352f4b83a08272283d3ce948dd78ff1aab4f476
-SHA1 (patch-uwsgiconfig.py) = aab47457f2fafb0206a53913ef3777700175d020
+SHA1 (patch-uwsgiconfig.py) = 4945de7da82f3b05508e7d30ee0c3fe3144a2829
Index: pkgsrc/www/py-uwsgi/patches/patch-core_logging.c
diff -u pkgsrc/www/py-uwsgi/patches/patch-core_logging.c:1.5 pkgsrc/www/py-uwsgi/patches/patch-core_logging.c:1.6
--- pkgsrc/www/py-uwsgi/patches/patch-core_logging.c:1.5 Wed Nov 2 07:26:47 2022
+++ pkgsrc/www/py-uwsgi/patches/patch-core_logging.c Sun Feb 26 00:52:49 2023
@@ -1,17 +1,62 @@
-$NetBSD: patch-core_logging.c,v 1.5 2022/11/02 07:26:47 wiz Exp $
+$NetBSD: patch-core_logging.c,v 1.6 2023/02/26 00:52:49 joerg Exp $
Fix build for NetBSD.
-https://github.com/unbit/uwsgi/pull/2506
---- core/logging.c.orig 2021-10-06 05:22:45.000000000 +0000
+--- core/logging.c.orig 2022-10-24 10:21:58.000000000 +0000
+++ core/logging.c
-@@ -2,7 +2,9 @@
+@@ -1,10 +1,12 @@
+ #ifndef __DragonFly__
#include "uwsgi.h"
#endif
- #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__OpenBSD__)
-+# if !defined(__NetBSD__)
+-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__OpenBSD__)
++#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__OpenBSD__)
#include <sys/user.h>
-+# endif
#include <sys/sysctl.h>
#include <kvm.h>
++#elif defined(__NetBSD__)
++#include <sys/sysctl.h>
#elif defined(__sun__)
+ /* Terrible Hack !!! */
+ #ifndef _LP64
+@@ -791,13 +793,30 @@ void get_memusage(uint64_t * rss, uint64
+ *rss = t_info.resident_size;
+ *vsz = t_info.virtual_size;
+ }
+-#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__OpenBSD__)
++#elif defined(__NetBSD__)
++ struct kinfo_proc2 kproc;
++ int mib[6];
++ size_t size;
++
++ mib[0] = CTL_KERN;
++ mib[1] = KERN_PROC2;
++ mib[2] = KERN_PROC_PID;
++ mib[3] = uwsgi.mypid;
++ mib[4] = sizeof(kproc);
++ mib[5] = 1;
++ if (sysctl(mib, 6, &kproc, &size, NULL, 0) == -1) {
++ uwsgi_log("warning: failed to read process statistics\n");
++ return;
++ }
++ *vsz = kproc.p_vm_vsize * uwsgi.page_size;
++ *rss = kproc.p_vm_rssize * uwsgi.page_size;
++#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(__OpenBSD__)
+ kvm_t *kv;
+ int cnt;
+
+ #if defined(__FreeBSD__)
+ kv = kvm_open(NULL, "/dev/null", NULL, O_RDONLY, NULL);
+-#elif defined(__NetBSD__) || defined(__OpenBSD__)
++#elif defined(__OpenBSD__)
+ kv = kvm_open(NULL, NULL, NULL, KVM_NO_FILES, NULL);
+ #else
+ kv = kvm_open(NULL, NULL, NULL, O_RDONLY, NULL);
+@@ -823,7 +842,7 @@ void get_memusage(uint64_t * rss, uint64
+ *vsz = (kproc->p_vm_dsize + kproc->p_vm_ssize + kproc->p_vm_tsize) * uwsgi.page_size;
+ *rss = kproc->p_vm_rssize * uwsgi.page_size;
+ }
+-#elif defined(__NetBSD__) || defined(__OpenBSD__)
++#elif defined(__OpenBSD__)
+ struct kinfo_proc2 *kproc2;
+
+ kproc2 = kvm_getproc2(kv, KERN_PROC_PID, uwsgi.mypid, sizeof(struct kinfo_proc2), &cnt);
Index: pkgsrc/www/py-uwsgi/patches/patch-uwsgiconfig.py
diff -u pkgsrc/www/py-uwsgi/patches/patch-uwsgiconfig.py:1.10 pkgsrc/www/py-uwsgi/patches/patch-uwsgiconfig.py:1.11
--- pkgsrc/www/py-uwsgi/patches/patch-uwsgiconfig.py:1.10 Mon Apr 6 02:35:54 2015
+++ pkgsrc/www/py-uwsgi/patches/patch-uwsgiconfig.py Sun Feb 26 00:52:49 2023
@@ -1,10 +1,10 @@
-$NetBSD: patch-uwsgiconfig.py,v 1.10 2015/04/06 02:35:54 rodent Exp $
+$NetBSD: patch-uwsgiconfig.py,v 1.11 2023/02/26 00:52:49 joerg Exp $
Disable inclusion of certain packages by default. Use options framework instead.
---- uwsgiconfig.py.orig 2015-03-17 07:34:34.000000000 +0000
+--- uwsgiconfig.py.orig 2022-10-24 10:21:58.000000000 +0000
+++ uwsgiconfig.py
-@@ -73,6 +73,7 @@ report = {
+@@ -86,6 +86,7 @@ report = {
'timer': False,
'filemonitor': False,
'pcre': False,
@@ -12,7 +12,20 @@ Disable inclusion of certain packages by
'routing': False,
'capabilities': False,
'yaml': False,
-@@ -851,6 +852,8 @@ class uConf(object):
+@@ -830,10 +831,11 @@ class uConf(object):
+
+ global uwsgi_version
+
+- kvm_list = ['FreeBSD', 'OpenBSD', 'NetBSD', 'DragonFly']
++ kvm_list = ['FreeBSD', 'OpenBSD', 'DragonFly']
+
+ if 'UWSGI_PROFILE_OVERRIDE' in os.environ:
+ for item in os.environ['UWSGI_PROFILE_OVERRIDE'].split(';'):
++ if not item: continue
+ k,v = item.split('=', 1)
+ self.set(k, v)
+
+@@ -921,6 +923,8 @@ class uConf(object):
if locking_mode == 'auto':
if uwsgi_os == 'Linux' or uwsgi_os == 'SunOS':
locking_mode = 'pthread_mutex'
@@ -21,7 +34,7 @@ Disable inclusion of certain packages by
# FreeBSD umtx is still not ready for process shared locking
# starting from FreeBSD 9 posix semaphores can be shared between processes
elif uwsgi_os in ('FreeBSD', 'GNU/kFreeBSD'):
-@@ -1054,10 +1057,11 @@ class uConf(object):
+@@ -1124,10 +1128,11 @@ class uConf(object):
self.libs.append('-lcap')
report['capabilities'] = True
Home |
Main Index |
Thread Index |
Old Index