pkgsrc-Bugs archive

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

pkg/52613: update to www/py-meinheld



>Number:         52613
>Category:       pkg
>Synopsis:       update to www/py-meinheld
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 11 18:25:00 +0000 2017
>Originator:     Juraj Lutter
>Release:        SmartOS
>Organization:
>Environment:
SmartOS
>Description:
Please update py-meinheld with the patches attached in order to make it compile and work under SmartOS
>How-To-Repeat:
Compile without patches attached.
>Fix:
Use the following patches:
$NetBSD: patch-meinheld_server_util.c,v 1.1 2017/09/30 12:51:57 wiz Exp $

Add NetBSD support.

--- meinheld/server/util.c.orig 2015-09-16 12:56:12.000000000 +0000
+++ meinheld/server/util.c
@@ -7,7 +7,7 @@ setup_listen_sock(int fd)
     int on = 1, r = -1;
 #ifdef linux
     r = setsockopt(fd, IPPROTO_TCP, TCP_DEFER_ACCEPT, &on, sizeof(on));
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__NetBSD__)
     struct accept_filter_arg afa;
     bzero(&afa, sizeof(afa));
     strcpy(afa.af_name, "httpready");
@@ -59,10 +59,13 @@ int
 enable_cork(client_t *client)
 {
     int on = 1;
-#ifdef linux
+#if defined(linux) || defined(sun)
     setsockopt(client->fd, IPPROTO_TCP, TCP_CORK, &on, sizeof(on));
 #elif defined(__APPLE__) || defined(__FreeBSD__)
     setsockopt(client->fd, IPPROTO_TCP, TCP_NOPUSH, &on, sizeof(on));
+#elif defined(__NetBSD__)
+    /* not supported */
+    return 1;
 #else
 #error
 #endif
@@ -77,10 +80,13 @@ disable_cork(client_t *client)                                                                                                                           [2/1866]
     int off = 0;
     int on = 1;
     if(client->use_cork == 1){
-#ifdef linux
+#if defined(linux) || defined(sun)
         setsockopt(client->fd, IPPROTO_TCP, TCP_CORK, &off, sizeof(off));
 #elif defined(__APPLE__) || defined(__FreeBSD__)
         setsockopt(client->fd, IPPROTO_TCP, TCP_NOPUSH, &off, sizeof(off));
+#elif defined(__NetBSD__)
+    /* not supported */
+    return 1;
 #else
 #error
 #endif
$NetBSD: patch-setup.py,v 1.1 2017/09/30 12:51:57 wiz Exp $

Add NetBSD support.

--- setup.py.orig       2016-11-01 23:46:07.000000000 +0000
+++ setup.py
@@ -37,10 +37,14 @@ def get_picoev_file():

     if "Linux" == platform.system():
         poller_file = 'meinheld/server/picoev_epoll.c'
+    elif "SunOS" == platform.system():
+        poller_file = 'meinheld/server/picoev_epoll.c'
     elif "Darwin" == platform.system():
         poller_file = 'meinheld/server/picoev_kqueue.c'
     elif "FreeBSD" == platform.system():
         poller_file = 'meinheld/server/picoev_kqueue.c'
+    elif "NetBSD" == platform.system():
+        poller_file = 'meinheld/server/picoev_kqueue.c'
     else:
         print("Sorry, not support .")
         sys.exit(1)
@@ -90,7 +94,7 @@ setup(name='meinheld',
     author_email='yutaka.matsubara%gmail.com@localhost',
     url='http://meinheld.org',
     license='BSD',
-    platforms='Linux, BSD, Darwin',
+    platforms='Linux, BSD, Darwin, SunOS',
     packages= ['meinheld'],
     install_requires=install_requires,



Home | Main Index | Thread Index | Old Index