pkgsrc-Bugs archive

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

pkg/54332: sysutils/py-psutils suffer from changes on sys/sys/lwp.h after 8.99.46



>Number:         54332
>Category:       pkg
>Synopsis:       sysutils/py-psutils suffer from changes on sys/sys/lwp.h after 8.99.46
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 30 02:00:00 +0000 2019
>Originator:     Makoto Fujiwara
>Release:        NetBSD 8.99.45
>Organization:
	U Tokyo
>Environment:
	
	
System: NetBSD CF-SX2 8.99.45 NetBSD 8.99.45 (GENERIC-no-SYNAPTICS) #0: Sun Jun 23 08:30:11 JST 2019 root@CF-SX3:/tmp/O/sys/arch/amd64/compile/GENERIC-no-SYNAPTICS amd64
Architecture: x86_64
Machine: amd64
>Description:
  /usr/pkgsrc/sysutils/py-psutils	has build problem after 8.99.46
  with sys/sys/lwp.h change as
  --------	
  cdf62ad0810b (kamil 2019-06-18 22:40:09 +0000 292) /* define LSDEAD 6 Process is almost a zombie. (removed in 5.0) */with this commit
  --------
  and got following error
  ----------
  psutil/_psutil_bsd.c: In function 'init_psutil_bsd':
psutil/_psutil_bsd.c:1076:46: error: 'LSDEAD' undeclared (first use in this function); did you mean 'SDEAD'?
     PyModule_AddIntConstant(module, "SDEAD", LSDEAD);
                                              ^~~~~~
                                              SDEAD
psutil/_psutil_bsd.c:1076:46: note: each undeclared identifier is reported only once for each function it appears in
error: command 'gcc' failed with exit status 1
  ----------

>How-To-Repeat:
	install 8.99.45 (8.99.46 ?)
	cd /usr/pkgsrc/sysutils/py-psutils
	make clean && make package
		
>Fix:
(I may be wrong with 899004500 or 899004600)

Index: sysutils/py-psutil/distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/py-psutil/distinfo,v
retrieving revision 1.31
diff -u -r1.31 distinfo
--- sysutils/py-psutil/distinfo	11 Jun 2019 22:55:04 -0000	1.31
+++ sysutils/py-psutil/distinfo	30 Jun 2019 01:46:53 -0000
@@ -5,6 +5,6 @@
 SHA512 (psutil-5.6.3.tar.gz) = 62cf120c9391705bd393d6554afa32d672470b61ebb3c0e7458bad26134b784175ba64d3eff119ace6def2aebc97df73cd0c9d213776176ce39c3d47da3f3d9c
 Size (psutil-5.6.3.tar.gz) = 435374 bytes
 SHA1 (patch-psutil___psbsd.py) = f8888b8f386a1928446c7d588a7a46f2674c69f6
-SHA1 (patch-psutil___psutil__bsd.c) = 6251074874ac1f5a763df0448d3d60b7f955056e
+SHA1 (patch-psutil___psutil__bsd.c) = dd91fb34cdf8ffe31af529034fb412537cf87baf
 SHA1 (patch-psutil_arch_netbsd_specific.c) = b44e3aca5a221cd38482a16b013edb170818905a
 SHA1 (patch-psutil_arch_netbsd_specific.h) = 4d6b3c96eefeec4908e1006b96ab175d64714dd2
Index: sysutils/py-psutil/patches/patch-psutil___psutil__bsd.c
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/py-psutil/patches/patch-psutil___psutil__bsd.c,v
retrieving revision 1.10
diff -u -r1.10 patch-psutil___psutil__bsd.c
--- sysutils/py-psutil/patches/patch-psutil___psutil__bsd.c	11 Jun 2019 22:55:04 -0000	1.10
+++ sysutils/py-psutil/patches/patch-psutil___psutil__bsd.c	30 Jun 2019 01:46:53 -0000
@@ -1,10 +1,12 @@
 $NetBSD: patch-psutil___psutil__bsd.c,v 1.10 2019/06/11 22:55:04 leot Exp $
 
-Define proc_cwd on NetBSD >= 8.99.42.
+- Define proc_cwd on NetBSD >= 8.99.42.
+- LSDEAD gone at 8.99.46 with the changes on sys/sys/lwp.h as:
+cdf62ad0810b (kamil 2019-06-18 22:40:09 +0000 292) /* define LSDEAD 6 Process is almost a zombie. (removed in 5.0) */with this commit
 
---- psutil/_psutil_bsd.c.orig	2019-04-11 21:10:12.000000000 +0000
-+++ psutil/_psutil_bsd.c
-@@ -919,6 +921,8 @@ PsutilMethods[] = {
+--- psutil/_psutil_bsd.c.orig	2019-06-11 13:04:44.000000000 +0900
++++ psutil/_psutil_bsd.c	2019-06-30 10:32:23.516396930 +0900
+@@ -921,6 +921,8 @@
  #if defined(PSUTIL_FREEBSD) || defined(PSUTIL_OPENBSD)
      {"proc_connections", psutil_proc_connections, METH_VARARGS,
       "Return connections opened by process"},
@@ -13,3 +15,13 @@
      {"proc_cwd", psutil_proc_cwd, METH_VARARGS,
       "Return process current working directory."},
  #endif
+@@ -1071,7 +1073,9 @@
+     PyModule_AddIntConstant(module, "SSLEEP", LSSLEEP);
+     PyModule_AddIntConstant(module, "SSTOP", LSSTOP);
+     PyModule_AddIntConstant(module, "SZOMB", LSZOMB);
++#if (__NetBSD_Version__ < 899004600)
+     PyModule_AddIntConstant(module, "SDEAD", LSDEAD);
++#endif
+     PyModule_AddIntConstant(module, "SONPROC", LSONPROC);
+     // unique to NetBSD
+     PyModule_AddIntConstant(module, "SSUSPENDED", LSSUSPENDED);

>Unformatted:
 	
 	


Home | Main Index | Thread Index | Old Index