From owner-svn-ports-head@FreeBSD.ORG Mon Jan 19 03:36:40 2015 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19BD1BD6; Mon, 19 Jan 2015 03:36:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F0EB997E; Mon, 19 Jan 2015 03:36:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0J3adAO042204; Mon, 19 Jan 2015 03:36:39 GMT (envelope-from danfe@FreeBSD.org) Received: (from danfe@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0J3abE5042194; Mon, 19 Jan 2015 03:36:37 GMT (envelope-from danfe@FreeBSD.org) Message-Id: <201501190336.t0J3abE5042194@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: danfe set sender to danfe@FreeBSD.org using -f From: Alexey Dokuchaev Date: Mon, 19 Jan 2015 03:36:37 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r377378 - head/www/thttpd/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 03:36:40 -0000 Author: danfe Date: Mon Jan 19 03:36:37 2015 New Revision: 377378 URL: https://svnweb.freebsd.org/changeset/ports/377378 QAT: https://qat.redports.org/buildarchive/r377378/ Log: - Cleanup patches (rebase from previous version) - Fix several warnings that were caught by Clang - Strip installed programs; polish pkg-message text Modified: head/www/thttpd/files/extra-patch-config.h head/www/thttpd/files/patch-Makefile.in head/www/thttpd/files/patch-cgi-src_Makefile.in head/www/thttpd/files/patch-extras_Makefile.in head/www/thttpd/files/patch-extras_htpasswd.c head/www/thttpd/files/patch-mmc.c head/www/thttpd/files/patch-thttpd.c head/www/thttpd/files/pkg-message.in Modified: head/www/thttpd/files/extra-patch-config.h ============================================================================== --- head/www/thttpd/files/extra-patch-config.h Mon Jan 19 02:23:06 2015 (r377377) +++ head/www/thttpd/files/extra-patch-config.h Mon Jan 19 03:36:37 2015 (r377378) @@ -1,6 +1,6 @@ --- config.h.orig Wed Jun 29 19:53:18 2005 +++ config.h Sun Jun 17 20:05:51 2007 -@@ -395,4 +395,6 @@ +@@ -389,4 +389,6 @@ */ #define MIN_WOULDBLOCK_DELAY 100L Modified: head/www/thttpd/files/patch-Makefile.in ============================================================================== --- head/www/thttpd/files/patch-Makefile.in Mon Jan 19 02:23:06 2015 (r377377) +++ head/www/thttpd/files/patch-Makefile.in Mon Jan 19 03:36:37 2015 (r377378) @@ -25,7 +25,7 @@ installthis: -mkdir -p $(DESTDIR)$(BINDIR) - $(INSTALL) -m 555 -o bin -g bin thttpd $(DESTDIR)$(BINDIR) -+ $(INSTALL) -m 555 thttpd $(DESTDIR)$(BINDIR) ++ $(INSTALL) -s -m 555 thttpd $(DESTDIR)$(BINDIR) install-man: -mkdir -p $(DESTDIR)$(MANDIR)/man8 Modified: head/www/thttpd/files/patch-cgi-src_Makefile.in ============================================================================== --- head/www/thttpd/files/patch-cgi-src_Makefile.in Mon Jan 19 02:23:06 2015 (r377377) +++ head/www/thttpd/files/patch-cgi-src_Makefile.in Mon Jan 19 03:36:37 2015 (r377378) @@ -26,15 +26,15 @@ - cp phf $(CGIBINDIR)/phf + -mkdir -p $(DESTDIR)$(CGIBINDIR) + rm -f $(DESTDIR)$(CGIBINDIR)/redirect -+ cp redirect $(DESTDIR)$(CGIBINDIR)/redirect ++ $(INSTALL) -s -m 555 redirect $(DESTDIR)$(CGIBINDIR)/redirect + rm -f $(DESTDIR)$(MANDIR)/man8/redirect.8 -+ cp redirect.8 $(DESTDIR)$(MANDIR)/man8/redirect.8 ++ $(INSTALL) -m 444 redirect.8 $(DESTDIR)$(MANDIR)/man8/redirect.8 + rm -f $(DESTDIR)$(CGIBINDIR)/ssi -+ cp ssi $(DESTDIR)$(CGIBINDIR)/ssi ++ $(INSTALL) -s -m 555 ssi $(DESTDIR)$(CGIBINDIR)/ssi + rm -f $(DESTDIR)$(MANDIR)/man8/ssi.8 -+ cp ssi.8 $(DESTDIR)$(MANDIR)/man8/ssi.8 ++ $(INSTALL) -m 444 ssi.8 $(DESTDIR)$(MANDIR)/man8/ssi.8 + rm -f $(DESTDIR)$(CGIBINDIR)/phf -+ cp phf $(DESTDIR)$(CGIBINDIR)/phf ++ $(INSTALL) -s -m 555 phf $(DESTDIR)$(CGIBINDIR)/phf clean: rm -f $(CLEANFILES) Modified: head/www/thttpd/files/patch-extras_Makefile.in ============================================================================== --- head/www/thttpd/files/patch-extras_Makefile.in Mon Jan 19 02:23:06 2015 (r377377) +++ head/www/thttpd/files/patch-extras_Makefile.in Mon Jan 19 03:36:37 2015 (r377378) @@ -26,15 +26,15 @@ - rm -f $(MANDIR)/man8/syslogtocern.8 - cp syslogtocern.8 $(MANDIR)/man8/syslogtocern.8 + rm -f $(DESTDIR)$(BINDIR)/makeweb $(DESTDIR)$(BINDIR)/thtpasswd $(DESTDIR)$(BINDIR)/syslogtocern -+ cp makeweb $(DESTDIR)$(BINDIR)/makeweb -+ cp htpasswd $(DESTDIR)$(BINDIR)/thtpasswd -+ cp syslogtocern $(DESTDIR)$(BINDIR)/syslogtocern ++ $(INSTALL) -s -m 555 makeweb $(DESTDIR)$(BINDIR)/makeweb ++ $(INSTALL) -s -m 555 htpasswd $(DESTDIR)$(BINDIR)/thtpasswd ++ $(INSTALL) -m 555 syslogtocern $(DESTDIR)$(BINDIR)/syslogtocern + rm -f $(DESTDIR)$(MANDIR)/man1/makeweb.1 -+ cp makeweb.1 $(DESTDIR)$(MANDIR)/man1/makeweb.1 ++ $(INSTALL) -m 444 makeweb.1 $(DESTDIR)$(MANDIR)/man1/makeweb.1 + rm -f $(DESTDIR)$(MANDIR)/man1/thtpasswd.1 -+ cp htpasswd.1 $(DESTDIR)$(MANDIR)/man1/thtpasswd.1 ++ $(INSTALL) -m 444 htpasswd.1 $(DESTDIR)$(MANDIR)/man1/thtpasswd.1 + rm -f $(DESTDIR)$(MANDIR)/man8/syslogtocern.8 -+ cp syslogtocern.8 $(DESTDIR)$(MANDIR)/man8/syslogtocern.8 ++ $(INSTALL) -m 444 syslogtocern.8 $(DESTDIR)$(MANDIR)/man8/syslogtocern.8 clean: rm -f $(CLEANFILES) Modified: head/www/thttpd/files/patch-extras_htpasswd.c ============================================================================== --- head/www/thttpd/files/patch-extras_htpasswd.c Mon Jan 19 02:23:06 2015 (r377377) +++ head/www/thttpd/files/patch-extras_htpasswd.c Mon Jan 19 03:36:37 2015 (r377378) @@ -1,6 +1,6 @@ --- extras/htpasswd.c.orig 2001-12-19 00:08:08 UTC +++ extras/htpasswd.c -@@ -21,7 +21,12 @@ extern char *crypt(const char *key, cons +@@ -19,7 +19,12 @@ #define LF 10 #define CR 13 @@ -13,7 +13,7 @@ int tfd; char temp_template[] = "/tmp/htp.XXXXXX"; -@@ -137,8 +142,9 @@ add_password( char* user, FILE* f ) +@@ -135,8 +140,9 @@ add_password( char* user, FILE* f ) } static void usage(void) { @@ -25,7 +25,7 @@ exit(1); } -@@ -151,51 +157,131 @@ void interrupted(int signo) { +@@ -149,51 +155,128 @@ void interrupted(int signo) { int main(int argc, char *argv[]) { FILE *tfp,*f; char user[MAX_STRING_LEN]; @@ -35,7 +35,7 @@ + char line[MAX_LINE_LEN]; + char l[MAX_LINE_LEN]; char w[MAX_STRING_LEN]; - char command[MAX_STRING_LEN]; +- char command[MAX_STRING_LEN]; - int found; + int found,u; @@ -80,8 +80,7 @@ + exit(1); + } + if (strlen(argv[3]) > (sizeof(user) - 1)) { -+ fprintf(stderr, "%s: username is too long\n", argv[0], -+ sizeof(user) - 1); ++ fprintf(stderr, "%s: username is too long\n", argv[0]); + exit(1); + } + if ((strchr(argv[3], ':')) != NULL) { @@ -109,8 +108,7 @@ + exit(1); + } + if (strlen(argv[2]) > (sizeof(user) - 1)) { -+ fprintf(stderr, "%s: username is too long\n", argv[0], -+ sizeof(user) - 1); ++ fprintf(stderr, "%s: username is too long\n", argv[0]); + exit(1); + } + if ((strchr(argv[2], ':')) != NULL) { @@ -168,7 +166,7 @@ if(strcmp(user,w)) { putline(tfp,line); continue; -@@ -210,10 +296,28 @@ int main(int argc, char *argv[]) { +@@ -208,10 +291,28 @@ int main(int argc, char *argv[]) { printf("Adding user %s\n",user); add_password(user,tfp); } Modified: head/www/thttpd/files/patch-mmc.c ============================================================================== --- head/www/thttpd/files/patch-mmc.c Mon Jan 19 02:23:06 2015 (r377377) +++ head/www/thttpd/files/patch-mmc.c Mon Jan 19 03:36:37 2015 (r377378) @@ -1,7 +1,7 @@ --- mmc.c.orig Tue Oct 22 09:42:01 2002 +++ mmc.c Fri Nov 14 12:26:39 2003 -@@ -74,6 +74,9 @@ - time_t ctime; +@@ -83,6 +83,9 @@ + time_t ct; int refcount; time_t reftime; +#ifdef USE_SENDFILE @@ -10,7 +10,7 @@ void* addr; unsigned int hash; int hash_idx; -@@ -140,7 +143,11 @@ +@@ -149,7 +152,11 @@ /* Yep. Just return the existing map */ ++m->refcount; m->reftime = now; @@ -22,7 +22,7 @@ } /* Open the file. */ -@@ -186,7 +193,9 @@ +@@ -195,7 +202,9 @@ else { size_t size_size = (size_t) m->size; /* loses on files >2GB */ @@ -33,7 +33,7 @@ /* Map the file into memory. */ m->addr = mmap( 0, size_size, PROT_READ, MAP_PRIVATE, fd, 0 ); if ( m->addr == (void*) -1 && errno == ENOMEM ) -@@ -234,8 +243,9 @@ +@@ -243,8 +252,9 @@ } #endif /* HAVE_MMAP */ } @@ -44,7 +44,7 @@ /* Put the Map into the hash table. */ if ( add_hash( m ) < 0 ) { -@@ -253,8 +263,12 @@ +@@ -262,8 +272,12 @@ /* Update the total byte count. */ mapped_bytes += m->size; @@ -57,7 +57,7 @@ } -@@ -267,14 +281,18 @@ +@@ -276,14 +290,18 @@ if ( sbP != (struct stat*) 0 ) { m = find_hash( sbP->st_ino, sbP->st_dev, sbP->st_size, sbP->st_ctime ); @@ -76,14 +76,23 @@ if ( m == (Map*) 0 ) syslog( LOG_ERR, "mmc_unmap failed to find entry!" ); else if ( m->refcount <= 0 ) -@@ -363,7 +381,9 @@ +@@ -372,7 +390,9 @@ m = *mm; if ( m->size != 0 ) { -#ifdef HAVE_MMAP +#ifdef USE_SENDFILE -+ close(m->fd); ++ close(m->fd); +#elif defined(HAVE_MMAP) if ( munmap( m->addr, m->size ) < 0 ) syslog( LOG_ERR, "munmap - %m" ); #else /* HAVE_MMAP */ +@@ -523,7 +543,7 @@ + mmc_logstats( long secs ) + { + syslog( +- LOG_INFO, " map cache - %d allocated, %d active (%lld bytes), %d free; hash size: %d; expire age: %ld", ++ LOG_INFO, " map cache - %d allocated, %d active (%lld bytes), %d free; hash size: %d; expire age: %d", + alloc_count, map_count, (long long) mapped_bytes, free_count, hash_size, + expire_age ); + if ( map_count + free_count != alloc_count ) Modified: head/www/thttpd/files/patch-thttpd.c ============================================================================== --- head/www/thttpd/files/patch-thttpd.c Mon Jan 19 02:23:06 2015 (r377377) +++ head/www/thttpd/files/patch-thttpd.c Mon Jan 19 03:36:37 2015 (r377378) @@ -51,7 +51,7 @@ + sz = sbytes > 0 ? sbytes : -1; + else if (sz == 0) + sz = sbytes; -+#else ++#else sz = write( hc->conn_fd, &(hc->file_address[c->next_byte_index]), MIN( c->end_byte_index - c->next_byte_index, max_bytes ) ); @@ -78,7 +78,7 @@ + sz = sbytes > 0 ? sbytes : -1; + else if (sz == 0) + sz = sbytes; -+#else ++#else /* Yes. We'll combine headers and file into a single writev(), ** hoping that this generates a single packet. */ Modified: head/www/thttpd/files/pkg-message.in ============================================================================== --- head/www/thttpd/files/pkg-message.in Mon Jan 19 02:23:06 2015 (r377377) +++ head/www/thttpd/files/pkg-message.in Mon Jan 19 03:36:37 2015 (r377378) @@ -2,9 +2,9 @@ If you want users to be able to create their own Web subdirectories off of the main web directory, you need to: - 1. Add a group for www admins (e.g., "%%WWWGRP%%") + 1. Add a group for www admins (or use "%%WWWGRP%%") 2. chgrp thatgroup %%PREFIX%%/bin/makeweb %%WWWDIR%% - 3. chmod 2755 %%PREFIX%%/bin/makeweb + 3. chmod g+sx %%PREFIX%%/bin/makeweb 4. Tell users about makeweb(1) See http://www.acme.com/software/thttpd/notes.html for more