Index: head/www/thttpd/Makefile =================================================================== --- head/www/thttpd/Makefile (revision 110182) +++ head/www/thttpd/Makefile (revision 110183) @@ -1,92 +1,92 @@ # New ports collection makefile for: thttpd # Date created: 24 May 1999 # Whom: Anders Nordby # # $FreeBSD$ # PORTNAME= thttpd -PORTVERSION= 2.24 +PORTVERSION= 2.25b CATEGORIES= www ipv6 MASTER_SITES= http://www.acme.com/software/thttpd/ \ http://atreides.freenix.no/~anders/ DISTFILES= ${DISTNAME}${EXTRACT_SUFX} notes.html DIST_SUBDIR= ${PORTNAME} EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER= anders@FreeBSD.org COMMENT= Tiny/turbo/throttling HTTP server IGNOREFILES= notes.html GNU_CONFIGURE= yes USE_REINPLACE= yes MAN1= makeweb.1 htpasswd.1 MAN8= thttpd.8 redirect.8 ssi.8 syslogtocern.8 .include do-install: @${INSTALL_PROGRAM} ${WRKSRC}/thttpd ${PREFIX}/sbin/ @${INSTALL_MAN} ${WRKSRC}/thttpd.8 ${PREFIX}/man/man8 @${INSTALL} -d -o root -g wheel -m 0755 ${PREFIX}/www @${INSTALL} -d -o root -g wheel -m 0755 ${PREFIX}/www/data @${INSTALL} -d -o root -g wheel -m 0755 ${PREFIX}/www/logs @${INSTALL} -d -o root -g wheel -m 0755 ${PREFIX}/www/cgi-bin @${INSTALL_PROGRAM} ${WRKSRC}/cgi-src/redirect ${PREFIX}/www/cgi-bin/ @${INSTALL_PROGRAM} ${WRKSRC}/cgi-src/ssi ${PREFIX}/www/cgi-bin/ @${INSTALL_PROGRAM} ${WRKSRC}/cgi-src/phf ${PREFIX}/www/cgi-bin/ @${INSTALL_MAN} ${WRKSRC}/cgi-src/redirect.8 ${PREFIX}/man/man8 @${INSTALL_MAN} ${WRKSRC}/cgi-src/ssi.8 ${PREFIX}/man/man8 @${INSTALL_PROGRAM} ${WRKSRC}/extras/makeweb ${PREFIX}/bin/ @${INSTALL} -c -m 755 -o root -g wheel ${WRKSRC}/extras/syslogtocern ${PREFIX}/bin/ @${INSTALL_PROGRAM} ${WRKSRC}/extras/htpasswd ${PREFIX}/bin/ @${INSTALL_MAN} ${WRKSRC}/extras/makeweb.1 ${PREFIX}/man/man1 @${INSTALL_MAN} ${WRKSRC}/extras/htpasswd.1 ${PREFIX}/man/man1 @${INSTALL_MAN} ${WRKSRC}/extras/syslogtocern.8 ${PREFIX}/man/man8 @if [ ! -f ${PREFIX}/sbin/thttpd_wrapper ]; then \ ${ECHO} "Installing ${PREFIX}/sbin/thttpd_wrapper file."; \ ${ECHO_CMD} "#!/bin/sh" > ${PREFIX}/sbin/thttpd_wrapper; \ ${ECHO_CMD} "${ECHO_CMD} \$$\$$ > /var/run/thttpd_wrapper.pid" >> ${PREFIX}/sbin/thttpd_wrapper; \ ${ECHO_CMD} "while true ; do" >> ${PREFIX}/sbin/thttpd_wrapper; \ ${ECHO_CMD} " ${PREFIX}/sbin/thttpd -D -C ${PREFIX}/etc/thttpd.conf" >> ${PREFIX}/sbin/thttpd_wrapper; \ ${ECHO_CMD} " sleep 10" >> ${PREFIX}/sbin/thttpd_wrapper; \ ${ECHO_CMD} "done" >> ${PREFIX}/sbin/thttpd_wrapper; \ ${CHMOD} 751 ${PREFIX}/sbin/thttpd_wrapper; \ fi @${ECHO} "Installing ${PREFIX}/etc/thttpd.conf.sample configuration file." @${ECHO_CMD} "dir=${PREFIX}/www/data" > ${PREFIX}/etc/thttpd.conf.sample @${ECHO_CMD} "chroot" >> ${PREFIX}/etc/thttpd.conf.sample @${ECHO_CMD} "cgipat=*.cgi" >> ${PREFIX}/etc/thttpd.conf.sample @${ECHO_CMD} "logfile=${PREFIX}/www/logs/thttpd.log" >> ${PREFIX}/etc/thttpd.conf.sample @${ECHO_CMD} "pidfile=/var/run/thttpd.pid" >> ${PREFIX}/etc/thttpd.conf.sample @if [ ! -f ${PREFIX}/etc/rc.d/thttpd.sh ]; then \ ${ECHO} "Installing ${PREFIX}/etc/rc.d/thttpd.sh startup file."; \ ${INSTALL_SCRIPT} -m 751 ${FILESDIR}/thttpd.sh ${PREFIX}/etc/rc.d/thttpd.sh; \ ${REINPLACE_CMD} -i '' -e 's|%%PREFIX%%|${PREFIX}|g' ${PREFIX}/etc/rc.d/thttpd.sh; \ fi .if !defined(NOPORTDOCS) @${MKDIR} ${PREFIX}/share/doc/thttpd @${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/notes.html ${PREFIX}/share/doc/thttpd .endif post-install: @${CAT} ${PKGMESSAGE} post-configure: config-message .if ${OSVERSION} > 502101 @cd ${WRKSRC} && patch < ${PATCHDIR}/extra-patch-config.h .endif post-build: config-message config-message: @${ECHO} "=====================================================================" @${ECHO} "" @${ECHO} "Be sure to take a look at the options in config.h before (re)building" @${ECHO} "if you want to tweak the server." @${ECHO} "" @${ECHO} "=====================================================================" .include Property changes on: head/www/thttpd/Makefile ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.35 \ No newline at end of property +1.36 \ No newline at end of property Index: head/www/thttpd/distinfo =================================================================== --- head/www/thttpd/distinfo (revision 110182) +++ head/www/thttpd/distinfo (revision 110183) @@ -1,3 +1,3 @@ -MD5 (thttpd/thttpd-2.24.tar.gz) = 9e72c27986548d0cbc8ea850b7b47bdd -SIZE (thttpd/thttpd-2.24.tar.gz) = 130116 +MD5 (thttpd/thttpd-2.25b.tar.gz) = a0e9cd87455d3a0ea11e5ea7e947adf6 +SIZE (thttpd/thttpd-2.25b.tar.gz) = 132363 MD5 (thttpd/notes.html) = IGNORE Property changes on: head/www/thttpd/distinfo ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.24 \ No newline at end of property +1.25 \ No newline at end of property Index: head/www/thttpd/files/patch-thttpd.c =================================================================== --- head/www/thttpd/files/patch-thttpd.c (revision 110182) +++ head/www/thttpd/files/patch-thttpd.c (revision 110183) @@ -1,56 +1,56 @@ ---- thttpd.c.orig Tue May 13 17:14:33 2003 -+++ thttpd.c Wed Oct 29 05:50:14 2003 -@@ -1593,12 +1593,45 @@ +--- thttpd.c.orig Thu Dec 25 19:06:52 2003 ++++ thttpd.c Fri May 28 12:25:54 2004 +@@ -1723,12 +1723,45 @@ if ( hc->responselen == 0 ) { /* No, just write the file. */ +#ifdef USE_SENDFILE + off_t sbytes; + + sz = sendfile( -+ hc->file_fd, hc->conn_fd, c->bytes_sent, -+ MIN( c->bytes_to_send - c->bytes_sent, c->max_limit ), ++ hc->file_fd, hc->conn_fd, c->next_byte_index, ++ MIN( c->end_byte_index - c->next_byte_index, max_bytes ), + NULL, &sbytes, 0 ); + if (sz == -1 && errno == EAGAIN) + sz = sbytes > 0 ? sbytes : -1; + else if (sz == 0) + sz = sbytes; +#else sz = write( - hc->conn_fd, &(hc->file_address[c->bytes_sent]), - MIN( c->bytes_to_send - c->bytes_sent, c->max_limit ) ); + hc->conn_fd, &(hc->file_address[c->next_byte_index]), + MIN( c->end_byte_index - c->next_byte_index, max_bytes ) ); +#endif } else { +#ifdef USE_SENDFILE + struct sf_hdtr sf; + struct iovec iv; + off_t sbytes; + + iv.iov_base = hc->response; + iv.iov_len = hc->responselen; + sf.headers = &iv; + sf.hdr_cnt = 1; + sf.trailers = NULL; + sf.trl_cnt = 0; + sz = sendfile( -+ hc->file_fd, hc->conn_fd, c->bytes_sent, -+ MIN( c->bytes_to_send - c->bytes_sent, c->max_limit ), ++ hc->file_fd, hc->conn_fd, c->next_byte_index, ++ MIN( c->end_byte_index - c->next_byte_index, max_bytes ), + &sf, &sbytes, 0 ); + if (sz == -1 && errno == EAGAIN) + sz = sbytes > 0 ? sbytes : -1; + else if (sz == 0) + sz = sbytes; +#else /* Yes. We'll combine headers and file into a single writev(), ** hoping that this generates a single packet. */ -@@ -1609,6 +1642,7 @@ - iv[1].iov_base = &(hc->file_address[c->bytes_sent]); - iv[1].iov_len = MIN( c->bytes_to_send - c->bytes_sent, c->max_limit ); +@@ -1739,6 +1772,7 @@ + iv[1].iov_base = &(hc->file_address[c->next_byte_index]); + iv[1].iov_len = MIN( c->end_byte_index - c->next_byte_index, max_bytes ); sz = writev( hc->conn_fd, iv, 2 ); +#endif } - if ( sz == 0 || + if ( sz < 0 && errno == EINTR ) Property changes on: head/www/thttpd/files/patch-thttpd.c ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.2 \ No newline at end of property +1.3 \ No newline at end of property Index: head/www/thttpd/pkg-plist =================================================================== --- head/www/thttpd/pkg-plist (revision 110182) +++ head/www/thttpd/pkg-plist (revision 110183) @@ -1,16 +1,16 @@ bin/htpasswd bin/makeweb bin/syslogtocern etc/rc.d/thttpd.sh etc/thttpd.conf.sample sbin/thttpd sbin/thttpd_wrapper -%%PORTDOCS%%share/doc/thttpd/notes.html +%%PORTDOCS%%%%DOCSDIR%%/notes.html www/cgi-bin/phf www/cgi-bin/redirect www/cgi-bin/ssi -%%PORTDOCS%%@dirrm share/doc/thttpd +%%PORTDOCS%%@dirrm %%DOCSDIR%% @unexec rmdir %D/www/cgi-bin 2> /dev/null || true @unexec rmdir %D/www/data 2> /dev/null || true @unexec rmdir %D/www/logs 2> /dev/null || true @unexec rmdir %D/www 2> /dev/null || true Property changes on: head/www/thttpd/pkg-plist ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.6 \ No newline at end of property +1.7 \ No newline at end of property