From owner-svn-ports-all@FreeBSD.ORG Sun Jan 18 10:10:46 2015 Return-Path: Delivered-To: svn-ports-all@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 6C3658E1; Sun, 18 Jan 2015 10:10:46 +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 567A264F; Sun, 18 Jan 2015 10:10:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0IAAklA033373; Sun, 18 Jan 2015 10:10:46 GMT (envelope-from danfe@FreeBSD.org) Received: (from danfe@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0IAAj7g033311; Sun, 18 Jan 2015 10:10:45 GMT (envelope-from danfe@FreeBSD.org) Message-Id: <201501181010.t0IAAj7g033311@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: danfe set sender to danfe@FreeBSD.org using -f From: Alexey Dokuchaev Date: Sun, 18 Jan 2015 10:10:45 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r377288 - in 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 10:10:46 -0000 Author: danfe Date: Sun Jan 18 10:10:44 2015 New Revision: 377288 URL: https://svnweb.freebsd.org/changeset/ports/377288 QAT: https://qat.redports.org/buildarchive/r377288/ Log: Backport a (modified) patch from Red Hat to allow passing custom directory for creating new user directories via makeweb(1). Added: head/www/thttpd/files/patch-extras_makeweb.1 (contents, props changed) head/www/thttpd/files/patch-extras_makeweb.c (contents, props changed) Modified: head/www/thttpd/Makefile Modified: head/www/thttpd/Makefile ============================================================================== --- head/www/thttpd/Makefile Sun Jan 18 09:38:15 2015 (r377287) +++ head/www/thttpd/Makefile Sun Jan 18 10:10:44 2015 (r377288) @@ -30,6 +30,8 @@ post-patch: @${REINPLACE_CMD} -e '/\.htpasswd/!s|htpasswd|thttpdpasswd|g' \ ${WRKSRC}/${f} .endfor + @${REINPLACE_CMD} -e 's|/var/www|${WWWDIR}|' \ + ${WRKSRC}/extras/makeweb.1 @${MV} ${WRKSRC}/extras/htpasswd.1 ${WRKSRC}/extras/thttpdpasswd.1 @${MV} ${WRKSRC}/extras/htpasswd.c ${WRKSRC}/extras/thttpdpasswd.c Added: head/www/thttpd/files/patch-extras_makeweb.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/thttpd/files/patch-extras_makeweb.1 Sun Jan 18 10:10:44 2015 (r377288) @@ -0,0 +1,21 @@ +--- extras/makeweb.1.orig 2005-06-29 17:53:22 UTC ++++ extras/makeweb.1 +@@ -2,11 +2,17 @@ + .SH NAME + makeweb - create user web directory + .SH SYNOPSIS +-.B makeweb ++.B makeweb ++[\fI -d webdir \fR] + .SH DESCRIPTION + .PP + This program allows users to create their own web subdirectories off + of the main web directory. ++.PP ++.TP ++\fB\-d\fR ++Specify the root directory for new user directories. The default directory ++is /var/www + .SH "SEE ALSO + thttpd(8) + .SH AUTHOR Added: head/www/thttpd/files/patch-extras_makeweb.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/thttpd/files/patch-extras_makeweb.c Sun Jan 18 10:10:44 2015 (r377288) @@ -0,0 +1,54 @@ +--- extras/makeweb.c.orig 2005-06-29 17:53:25 UTC ++++ extras/makeweb.c +@@ -48,6 +48,11 @@ + + static char* argv0; + ++static void ++usage( void ) ++{ ++ fprintf( stderr, "usage: %s [-d webdir]\n", argv0 ); ++} + + static void + check_room( int size, int len ) +@@ -126,17 +131,27 @@ main( int argc, char** argv ) + struct passwd* pwd; + char* username; + char* homedir; ++ int opts; + char dirname[5000]; + char linkname[5000]; + char linkbuf[5000]; + struct stat sb; + + argv0 = argv[0]; +- if ( argc != 1 ) ++ ++#ifndef TILDE_MAP_2 ++ webdir = WEBDIR; ++#endif /* TILDE_MAP_2 */ ++ ++ if ( (opts = getopt(argc, argv, "d:h")) != -1 ) ++ { ++ switch (opts) + { +- (void) fprintf( stderr, "usage: %s\n", argv0 ); +- exit( 1 ); ++ case 'd': webdir = strdup(optarg); break; ++ case 'h': ++ default: usage(); return 1; break; + } ++ } + + pwd = getpwuid( getuid() ); + if ( pwd == (struct passwd*) 0 ) +@@ -162,8 +177,6 @@ main( int argc, char** argv ) + + #else /* TILDE_MAP_2 */ + +- /* Gather the pieces. */ +- webdir = WEBDIR; + #ifdef TILDE_MAP_1 + prefix = TILDE_MAP_1; + #else /* TILDE_MAP_1 */