From b58f226086539e91dc2660af30ace3a39c7b15db Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Sun, 19 Jul 2015 12:35:21 +0000 Subject: [PATCH] Update to 0.6.3 New custom patches: - fix regress target in Makefile - fix capsicum sandbox in fcgi mode --- www/kcgi/Makefile | 3 +-- www/kcgi/distinfo | 4 ++-- www/kcgi/files/patch-Makefile | 9 +++++++++ www/kcgi/files/patch-child.c | 12 ------------ www/kcgi/files/patch-kcgiregress.c | 12 ------------ www/kcgi/files/patch-output.c | 20 -------------------- www/kcgi/files/patch-sandbox-capsicum.c | 18 ++++++++++++++++++ 7 files changed, 30 insertions(+), 48 deletions(-) create mode 100644 www/kcgi/files/patch-Makefile delete mode 100644 www/kcgi/files/patch-child.c delete mode 100644 www/kcgi/files/patch-kcgiregress.c delete mode 100644 www/kcgi/files/patch-output.c create mode 100644 www/kcgi/files/patch-sandbox-capsicum.c diff --git a/www/kcgi/Makefile b/www/kcgi/Makefile index c41851ebd465..b80be73c33ba 100644 --- a/www/kcgi/Makefile +++ b/www/kcgi/Makefile @@ -1,8 +1,7 @@ # $FreeBSD$ PORTNAME= kcgi -PORTVERSION= 0.6.2 -PORTREVISION= 1 +PORTVERSION= 0.6.3 CATEGORIES= www devel MASTER_SITES= http://kristaps.bsd.lv/kcgi/snapshots/ diff --git a/www/kcgi/distinfo b/www/kcgi/distinfo index 9c5f192d87c8..8c9764982ffa 100644 --- a/www/kcgi/distinfo +++ b/www/kcgi/distinfo @@ -1,2 +1,2 @@ -SHA256 (kcgi-0.6.2.tgz) = a1e5104c521f6528afd544c20e2c35e176916085659a878ae99eb59dc119534d -SIZE (kcgi-0.6.2.tgz) = 97487 +SHA256 (kcgi-0.6.3.tgz) = db71973c11cdda5c2dec01ee906af59743422440a4c5a17797285a78dfdf98c6 +SIZE (kcgi-0.6.3.tgz) = 97541 diff --git a/www/kcgi/files/patch-Makefile b/www/kcgi/files/patch-Makefile new file mode 100644 index 000000000000..0e032d59b11f --- /dev/null +++ b/www/kcgi/files/patch-Makefile @@ -0,0 +1,9 @@ +--- Makefile.orig 2015-07-18 20:23:31 UTC ++++ Makefile +@@ -1,5 +1,5 @@ + .SUFFIXES: .3 .3.html .8 .8.html .dot .svg .gnuplot .png .xml .html +- ++.PHONY: regress + # Comment if you don't need statically linked. + # This is only for the sample program! + #STATIC = -static diff --git a/www/kcgi/files/patch-child.c b/www/kcgi/files/patch-child.c deleted file mode 100644 index 445c8b8051d5..000000000000 --- a/www/kcgi/files/patch-child.c +++ /dev/null @@ -1,12 +0,0 @@ ---- child.c.orig 2015-07-16 22:52:47 UTC -+++ child.c -@@ -17,9 +17,7 @@ - #ifdef HAVE_CONFIG_H - #include "config.h" - #endif --#ifdef __linux__ - #include --#endif - - #include - #include diff --git a/www/kcgi/files/patch-kcgiregress.c b/www/kcgi/files/patch-kcgiregress.c deleted file mode 100644 index e5db70d58016..000000000000 --- a/www/kcgi/files/patch-kcgiregress.c +++ /dev/null @@ -1,12 +0,0 @@ ---- kcgiregress.c.orig 2015-07-17 06:16:43 UTC -+++ kcgiregress.c -@@ -197,9 +197,6 @@ dochild_cgi(kcgi_regress_server child, v - setenv(headbuf, val, 1); - } - -- if (NULL == head) -- goto out; -- - if (-1 != in) - close(in); - if (-1 != s) diff --git a/www/kcgi/files/patch-output.c b/www/kcgi/files/patch-output.c deleted file mode 100644 index 4807f2993625..000000000000 --- a/www/kcgi/files/patch-output.c +++ /dev/null @@ -1,20 +0,0 @@ ---- output.c.orig 2015-07-16 22:52:47 UTC -+++ output.c -@@ -17,9 +17,7 @@ - #ifdef HAVE_CONFIG_H - #include "config.h" - #endif --#ifdef __linux__ - #include --#endif - - #include - #include -@@ -27,6 +25,7 @@ - #include - #include - #include -+#include - #ifdef HAVE_ZLIB - #include - #endif diff --git a/www/kcgi/files/patch-sandbox-capsicum.c b/www/kcgi/files/patch-sandbox-capsicum.c new file mode 100644 index 000000000000..eff70a1e8239 --- /dev/null +++ b/www/kcgi/files/patch-sandbox-capsicum.c @@ -0,0 +1,18 @@ +--- sandbox-capsicum.c.orig 2015-07-18 20:23:31 UTC ++++ sandbox-capsicum.c +@@ -39,10 +39,13 @@ ksandbox_capsicum_init_child(void *arg, + + cap_rights_init(&rights); + +- if (cap_rights_limit(STDIN_FILENO, &rights) < 0 && errno != ENOSYS) ++ cap_rights_init(&rights, CAP_READ|CAP_FSTAT); ++ /* Test for EBADF because STDIN_FILENO can be close in fcgi */ ++ if (cap_rights_limit(STDIN_FILENO, &rights) < 0 && errno != ENOSYS && ++ errno != EBADF) + XWARN("cap_rights_limit: STDIN_FILENO"); + +- cap_rights_init(&rights, CAP_WRITE); ++ cap_rights_init(&rights, CAP_WRITE|CAP_FSTAT); + if (cap_rights_limit(STDOUT_FILENO, &rights) < 0 && errno != ENOSYS) + XWARN("cap_rights_limit: STDOUT_FILENO"); + if (cap_rights_limit(STDERR_FILENO, &rights) < 0 && errno != ENOSYS)