aboutsummaryrefslogtreecommitdiff
path: root/www/pserv
diff options
context:
space:
mode:
authorAlex Dupre <ale@FreeBSD.org>2004-11-24 14:16:13 +0000
committerAlex Dupre <ale@FreeBSD.org>2004-11-24 14:16:13 +0000
commitab09f0fef42b42e6eeeb6f00da4f51860e5e8681 (patch)
treede85d0080f2fe4ba67432d7b2c432ca81b216ffe /www/pserv
parentd0144fcd1694624ef519c6515b784396df27fa79 (diff)
downloadports-ab09f0fef42b42e6eeeb6f00da4f51860e5e8681.tar.gz
ports-ab09f0fef42b42e6eeeb6f00da4f51860e5e8681.zip
Update to 3.1 release.
Notes
Notes: svn path=/head/; revision=122305
Diffstat (limited to 'www/pserv')
-rw-r--r--www/pserv/Makefile2
-rw-r--r--www/pserv/distinfo4
-rw-r--r--www/pserv/files/patch-Makefile6
-rw-r--r--www/pserv/files/patch-handlers.c33
-rw-r--r--www/pserv/files/patch-main.h45
-rw-r--r--www/pserv/files/patch-pserv.conf13
6 files changed, 43 insertions, 60 deletions
diff --git a/www/pserv/Makefile b/www/pserv/Makefile
index ec01c2f355b9..a5e3ab5d7794 100644
--- a/www/pserv/Makefile
+++ b/www/pserv/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= pserv
-PORTVERSION= 3.0
+PORTVERSION= 3.1
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
diff --git a/www/pserv/distinfo b/www/pserv/distinfo
index 6e6d3754ea1b..6c758c4c4f3f 100644
--- a/www/pserv/distinfo
+++ b/www/pserv/distinfo
@@ -1,2 +1,2 @@
-MD5 (pserv-3.0.tar.Z) = 2c38f859631ab09f3cd4ff15b4de457e
-SIZE (pserv-3.0.tar.Z) = 49961
+MD5 (pserv-3.1.tar.Z) = c106d7709bf2a65e9acf16147f2e3a1f
+SIZE (pserv-3.1.tar.Z) = 49511
diff --git a/www/pserv/files/patch-Makefile b/www/pserv/files/patch-Makefile
index 790f11dc2970..29e0af094a5d 100644
--- a/www/pserv/files/patch-Makefile
+++ b/www/pserv/files/patch-Makefile
@@ -1,10 +1,10 @@
---- sources/Makefile.orig Mon Aug 30 13:19:03 2004
-+++ sources/Makefile Wed Sep 15 14:38:14 2004
+--- sources/Makefile.orig Fri Nov 5 23:04:15 2004
++++ sources/Makefile Wed Nov 24 14:52:32 2004
@@ -1,11 +1,11 @@
#Change the following to your needs
-CC = gcc
-#insert here flags, eg. optimizations
--CFLAGS = -Wall -Os
+-CFLAGS = -Wall -Os -pedantic
+CC ?= gcc
LIBS =
SRCS = main.c handlers.c mime.c log.c
diff --git a/www/pserv/files/patch-handlers.c b/www/pserv/files/patch-handlers.c
index abaf7027c74b..a2190ce615e5 100644
--- a/www/pserv/files/patch-handlers.c
+++ b/www/pserv/files/patch-handlers.c
@@ -1,6 +1,6 @@
---- sources/handlers.c.orig Fri May 21 16:58:26 2004
-+++ sources/handlers.c Wed Sep 15 14:47:49 2004
-@@ -24,6 +24,7 @@
+--- sources/handlers.c.orig Fri Nov 5 23:04:15 2004
++++ sources/handlers.c Wed Nov 24 15:12:55 2004
+@@ -25,6 +25,7 @@
#endif
extern char cgiRoot[MAX_PATH_LEN+1]; /* root for CGI scripts exec */
@@ -8,7 +8,7 @@
extern int port; /* server port */
extern char defaultFileName[MAX_PATH_LEN+1]; /* default name for index, default or similar file */
-@@ -263,6 +264,14 @@
+@@ -323,6 +324,14 @@
i = 0;
/* beware of not overfilling this array, check MAX_ENVP_LEN */
@@ -23,7 +23,7 @@
strcpy(newEnvp[i], "SERVER_SOFTWARE=");
strcat(newEnvp[i], SERVER_SOFTWARE_STR);
strcat(newEnvp[i], "/");
-@@ -285,6 +294,11 @@
+@@ -345,6 +354,11 @@
strcat(newEnvp[i++], req.userAgent);
strcpy(newEnvp[i], "SCRIPT_FILENAME=");
strcat(newEnvp[i++], completedPath);
@@ -35,7 +35,7 @@
newEnvp[i] = NULL;
/* we change the current working directory to the scripts one */
-@@ -317,8 +331,252 @@
+@@ -377,8 +391,237 @@
return 0;
}
@@ -120,24 +120,9 @@
+ else if (!howMany)
+ printf("Nothing read from script pipe.\n");
+ else {
-+ pipeReadBuf[howMany] = '\0';
-+ if (send(sock, pipeReadBuf, howMany, 0) < 0)
-+ {
-+ printf("error during CGI sock writing! %d\n", errno);
-+ if (errno == EAGAIN)
-+ printf("output resource temporarily not available\n");
-+ else if (errno == EPIPE)
-+ {
-+ printf("broken pipe during CGI out.\n");
-+ fatal = YES;
-+ } else if (errno == EBADF)
-+ {
-+#ifdef PRINTF_DEBUG
-+ printf("invalid out descriptor.\n");
-+#endif
-+ fatal = YES;
-+ }
-+ } else
++ if (sendChunk(sock, pipeReadBuf, howMany) < 0)
++ fatal = YES;
++ else
+ totalSentFromPipe += howMany;
+ }
+ }
diff --git a/www/pserv/files/patch-main.h b/www/pserv/files/patch-main.h
index 4648e828f6b5..35e07635b947 100644
--- a/www/pserv/files/patch-main.h
+++ b/www/pserv/files/patch-main.h
@@ -1,24 +1,21 @@
---- sources/main.h.orig Mon Aug 30 13:19:03 2004
-+++ sources/main.h Wed Sep 15 15:24:32 2004
-@@ -18,14 +18,16 @@
-
-
+--- sources/main.h.orig Wed Nov 24 11:12:35 2004
++++ sources/main.h Wed Nov 24 14:58:06 2004
+@@ -20,12 +20,14 @@
/* --- CPP parsing options --- */
--#define PRINTF_DEBUG /* enable this to print some debugging messages */
-+#undef PRINTF_DEBUG /* enable this to print some debugging messages */
+ #undef PRINTF_DEBUG /* enable this to print some debugging messages */
#undef ON_THE_FLY_CONVERSION /* enable this for line ending conversion */
+#define LOG /* enable logging to file */
#define BRAIN_DEAD_CAST /* if your compiler is brainwashed and does not cast standard types.h structures */
#define FORKING_SERVER /* enables to fork for every request */
#define AUTO_INDEX /* enables auto-index of directories */
#define SOCKADDR_REUSE /* enables reuse oth the socket (quick relaunch) */
- #define VOID_SIG_HANDLERS /* enables different signal functíon types */
- #define ADDR_LEN_TYPE_INT /* in accept() if addrlen is int */
+ #define VOID_SIG_HANDLERS /* enables different signal function types */
+ #undef ADDR_LEN_TYPE_INT /* in accept() if addrlen is int */
+#define PHP /* enables transparent PHP support */
-
/* --- Configure options --- */
-@@ -37,18 +39,19 @@
+ #define CONFIG_FILE_NAME "pserv.conf" /* name of the configuration file, concatenated to DEFAULT_CONFIG_LOCATION */
+@@ -36,18 +38,19 @@
#define MIME_TYPE_DEFAULT "application/octet-stream"
/* configuration file location */
@@ -29,7 +26,7 @@
-#define DEFAULT_PORT 2000
+#define DEFAULT_PORT 80
#define DEFAULT_MAX_CHILDREN 5
--#define DEFAULT_DOCS_LOCATION "/home/multix/public_html"
+-#define DEFAULT_DOCS_LOCATION "/usr/people/multix/public_html"
+#define DEFAULT_DOCS_LOCATION "/usr/local/www/data"
#define DEFAULT_FILE_NAME "index.html"
#define DEFAULT_SEC_TO 1
@@ -37,14 +34,14 @@
-#define DEFAULT_LOG_FILE "/home/multix/pserv/pserv.log"
-#define DEFAULT_MIME_FILE "/home/multix/pserv/mime_types.dat"
-#define DEFAULT_CGI_ROOT "/home/multix/public_html/cgi-bin"
-+#define DEFAULT_LOG_FILE "/var/log/pserv.log"
-+#define DEFAULT_MIME_FILE "/usr/local/etc/mime.types"
-+#define DEFAULT_PHP_FILE "/usr/local/bin/php"
-+#define DEFAULT_CGI_ROOT "/usr/local/www/cgi-bin"
++#define DEFAULT_LOG_FILE "/var/log/pserv.log"
++#define DEFAULT_MIME_FILE "/usr/local/etc/mime.types"
++#define DEFAULT_PHP_FILE "/usr/local/bin/php"
++#define DEFAULT_CGI_ROOT "/usr/local/www/cgi-bin"
#define DEFAULT_SERVER_NAME "localhost"
/* amount of connections queued in listening */
-@@ -122,8 +125,10 @@
+@@ -120,8 +123,10 @@
#define ADDRESS_LEN 16
#define METHOD_LEN 16
#define PROTOCOL_LEN 16
@@ -55,13 +52,13 @@
/* ------ Structures ------- */
/* we use +1 to be safe with handling the end-of-string */
-@@ -141,7 +146,9 @@
- char protocolVersion[PROTOCOL_LEN+1];
- int keepAlive;
- char userAgent[USER_AGENT_LEN+1];
-+ char cookie[MAX_COOKIE_LEN+1];
+@@ -139,7 +144,9 @@
+ char protocolVersion[PROTOCOL_LEN+1];
+ int keepAlive;
+ char userAgent[USER_AGENT_LEN+1];
++ char cookie[MAX_COOKIE_LEN+1];
long int contentLength;
-+ char contentType[CONTENT_TYPE_LEN+1];
- char rest[BUFFER_SIZE+1];
++ char contentType[CONTENT_TYPE_LEN+1];
+ char rest[BUFFER_SIZE+1];
};
diff --git a/www/pserv/files/patch-pserv.conf b/www/pserv/files/patch-pserv.conf
index 4f63175ddf70..d40fee1e80af 100644
--- a/www/pserv/files/patch-pserv.conf
+++ b/www/pserv/files/patch-pserv.conf
@@ -1,10 +1,11 @@
---- defaults/pserv.conf.orig Tue Apr 13 18:19:55 2004
-+++ defaults/pserv.conf Wed Sep 15 15:26:34 2004
+--- defaults/pserv.conf.orig Tue Nov 9 19:03:50 2004
++++ defaults/pserv.conf Wed Nov 24 15:00:53 2004
@@ -1,9 +1,10 @@
- port 80
+-port 8080
++port 80
maxChildren 4
--documentsPath /usr/people/multix/public_html
-+documentsPath %%PREFIX%%/www/data
+-documentsPath /usr/people/multix/public_html
++documentsPath %%PREFIX%%/www/data
defaultFile index.html
secTimeout 1
uSecTimeout 100000
@@ -13,5 +14,5 @@
-cgiRoot /usr/people/multix/public_html/cgi-bin
+logFile /var/log/pserv.log
+mimeTypesFile %%PREFIX%%/etc/mime.types
-+phpFile %%LOCALBASE%%/bin/php
++phpFile %%LOCALBASE%%/bin/php
+cgiRoot %%PREFIX%%/www/cgi-bin