pkgsrc-Changes archive

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

CVS commit: pkgsrc/lang/python27



Module Name:    pkgsrc
Committed By:   ryoon
Date:           Mon Jul 11 12:17:13 UTC 2016

Modified Files:
        pkgsrc/lang/python27: Makefile distinfo
Added Files:
        pkgsrc/lang/python27/patches:
            patch-Modules___multiprocessing_semaphore.c

Log Message:
Bump PKGREVISION. Do not assume longer name for POSIX semaphore under NetBSD

According to sem_open(3) man page, NetBSD supports 15 chars length.
Fix SemLock errno 63 ENAMETOOLONG under NetBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 pkgsrc/lang/python27/Makefile
cvs rdiff -u -r1.55 -r1.56 pkgsrc/lang/python27/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/lang/python27/patches/patch-Modules___multiprocessing_semaphore.c

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

Modified files:

Index: pkgsrc/lang/python27/Makefile
diff -u pkgsrc/lang/python27/Makefile:1.61 pkgsrc/lang/python27/Makefile:1.62
--- pkgsrc/lang/python27/Makefile:1.61  Sat Jul  2 15:05:43 2016
+++ pkgsrc/lang/python27/Makefile       Mon Jul 11 12:17:13 2016
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.61 2016/07/02 15:05:43 adam Exp $
+# $NetBSD: Makefile,v 1.62 2016/07/11 12:17:13 ryoon Exp $
 
 .include "dist.mk"
 
 PKGNAME=       python27-${PY_DISTVERSION}
+PKGREVISION=   1
 CATEGORIES=    lang python
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost

Index: pkgsrc/lang/python27/distinfo
diff -u pkgsrc/lang/python27/distinfo:1.55 pkgsrc/lang/python27/distinfo:1.56
--- pkgsrc/lang/python27/distinfo:1.55  Sat Jul  2 15:05:43 2016
+++ pkgsrc/lang/python27/distinfo       Mon Jul 11 12:17:13 2016
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.55 2016/07/02 15:05:43 adam Exp $
+$NetBSD: distinfo,v 1.56 2016/07/11 12:17:13 ryoon Exp $
 
 SHA1 (Python-2.7.12.tar.xz) = 05360b8ade117b35e266b2004a7f1f11250c6dcd
 RMD160 (Python-2.7.12.tar.xz) = c330f6ac08ed67f307de0e726a288bab16c832d5
@@ -8,6 +8,7 @@ SHA1 (patch-Include_pyerrors.h) = 0d2cd5
 SHA1 (patch-Include_pyport.h) = f3e4ddbc954425a65301465410911222ca471320
 SHA1 (patch-Lib_distutils_unixccompiler.py) = db16c9aca2f29730945f28247b88b18828739bbb
 SHA1 (patch-Lib_multiprocessing_process.py) = 15699bd8ec822bf54a0631102e00e0a34f882803
+SHA1 (patch-Modules___multiprocessing_semaphore.c) = 03b9c33ef38da383d5f7c2c84c17fe38cdd2911e
 SHA1 (patch-Modules__ssl.c) = 6e68f88ad205106691900f091a897ffe0a4c363c
 SHA1 (patch-Modules_getaddrinfo.c) = aa699d257f1bc98b9a3183a21324053e134409d1
 SHA1 (patch-Modules_getpath.c) = 9bb2c040895ad6bbe4d0b5807803723b5437d47b

Added files:

Index: pkgsrc/lang/python27/patches/patch-Modules___multiprocessing_semaphore.c
diff -u /dev/null pkgsrc/lang/python27/patches/patch-Modules___multiprocessing_semaphore.c:1.1
--- /dev/null   Mon Jul 11 12:17:13 2016
+++ pkgsrc/lang/python27/patches/patch-Modules___multiprocessing_semaphore.c    Mon Jul 11 12:17:13 2016
@@ -0,0 +1,36 @@
+$NetBSD: patch-Modules___multiprocessing_semaphore.c,v 1.1 2016/07/11 12:17:13 ryoon Exp $
+
+--- Modules/_multiprocessing/semaphore.c.orig  2016-06-25 21:49:31.000000000 +0000
++++ Modules/_multiprocessing/semaphore.c
+@@ -424,7 +424,11 @@ newsemlockobject(PyTypeObject *type, SEM
+ static PyObject *
+ semlock_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+ {
++#if defined(__NetBSD__)
++    char buffer[15];
++#else
+     char buffer[256];
++#endif
+     SEM_HANDLE handle = SEM_FAILED;
+     int kind, maxvalue, value;
+     PyObject *result;
+@@ -444,10 +448,19 @@ semlock_new(PyTypeObject *type, PyObject
+      * _PyOS_URandom() are treated as unsigned long to ensure that the filename
+      * is valid (no special characters). */
+     do {
++#if defined(__NetBSD__)
++        unsigned char suffix1;
++        unsigned char suffix2;
++        _PyOS_URandom((char *)&suffix1, sizeof(suffix1));
++        _PyOS_URandom((char *)&suffix2, sizeof(suffix2));
++        PyOS_snprintf(buffer, sizeof(buffer), "/mp%ld-%x%x", (long)getpid(),
++                      suffix1, suffix2);
++#else
+         unsigned long suffix;
+         _PyOS_URandom((char *)&suffix, sizeof(suffix));
+         PyOS_snprintf(buffer, sizeof(buffer), "/mp%ld-%lu", (long)getpid(),
+                       suffix);
++#endif
+         SEM_CLEAR_ERROR();
+         handle = SEM_CREATE(buffer, value, maxvalue);
+     } while ((handle == SEM_FAILED) && (errno == EEXIST) && (++try < 100));



Home | Main Index | Thread Index | Old Index