From owner-freebsd-ports Sun Oct 28 23:10:20 2001 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 6B07937B407 for ; Sun, 28 Oct 2001 23:10:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f9T7A1O92195; Sun, 28 Oct 2001 23:10:01 -0800 (PST) (envelope-from gnats) Received: from totem.fix.no (totem.fix.no [213.142.66.130]) by hub.freebsd.org (Postfix) with ESMTP id C69E637B40D for ; Sun, 28 Oct 2001 23:07:31 -0800 (PST) Received: by totem.fix.no (Postfix, from userid 1000) id 127883D3C; Mon, 29 Oct 2001 08:07:31 +0100 (CET) Message-Id: <20011029070731.127883D3C@totem.fix.no> Date: Mon, 29 Oct 2001 08:07:31 +0100 (CET) From: Anders Nordby Reply-To: Anders Nordby To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: ports/31577: New port: www/mod_mysqluserdir Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 31577 >Category: ports >Synopsis: New port: www/mod_mysqluserdir >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Oct 28 23:10:01 PST 2001 >Closed-Date: >Last-Modified: >Originator: Anders Nordby >Release: FreeBSD 4.4-STABLE i386 >Organization: Fluxpod Information eXchange >Environment: >Description: New port of mod_mysqluserdir, an Apache module to make Apache get userdirs from MySQL. >How-To-Repeat: >Fix: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # mod_mysqluserdir # mod_mysqluserdir/files # mod_mysqluserdir/files/README # mod_mysqluserdir/files/patch-mod_mysqluserdir.c # mod_mysqluserdir/distinfo # mod_mysqluserdir/pkg-descr # mod_mysqluserdir/pkg-plist # mod_mysqluserdir/pkg-comment # mod_mysqluserdir/Makefile # mod_mysqluserdir/pkg-message # echo c - mod_mysqluserdir mkdir -p mod_mysqluserdir > /dev/null 2>&1 echo c - mod_mysqluserdir/files mkdir -p mod_mysqluserdir/files > /dev/null 2>&1 echo x - mod_mysqluserdir/files/README sed 's/^X//' >mod_mysqluserdir/files/README << 'END-of-mod_mysqluserdir/files/README' XNotes from the author: X====================== X XModified by Jaanus Toomsalu for using MYSQL userdirs X03. Sept. 2001 XConfiguration options X MyUserDirHost localhost - Mysql database host X MyUserDirSock /var/run/mysql/mysql.sock - Mysql Unix filesocket X if not present then database host option will be used X MyUserDirUser user - DB User X MyUserDirPass pass - DB User password X MyUserDirDB database _ DB name X MyUserDirTable table - DB table name X MyUserDirDirCol directory - directory column name X MyUserDirUserCol login - login column name X #MyUserDirLeftJoinCol - if needed X MyUserDirWhereCol "and enabled=1" X XNotes from Anders: X================== X XThe module is successfully tested with this configuration: X XMyUserDirSock /tmp/mysql.sock XMyUserDirUser sqluserdir XMyUserDirPass foo XMyUserDirDB sqlusers XMyUserDirTable sqlusers XMyUserDirDirCol directory XMyUserDirUserCol user X XI had to disable the LoadModule and AddModule commands for the default Apache Xmod_userdir to make mod_mysqluserdir work. X XAnd a MySQL table crated like this: X XCREATE TABLE sqlusers ( X id int(13) NOT NULL auto_increment, X user varchar(50) NOT NULL default '', X directory varchar(50) NOT NULL default '', X enabled tinyint(3) NOT NULL default '1', X PRIMARY KEY (id) X); X XINSERT INTO sqlusers VALUES (1,'anders','/home/anders',1); END-of-mod_mysqluserdir/files/README echo x - mod_mysqluserdir/files/patch-mod_mysqluserdir.c sed 's/^X//' >mod_mysqluserdir/files/patch-mod_mysqluserdir.c << 'END-of-mod_mysqluserdir/files/patch-mod_mysqluserdir.c' X--- mod_mysqluserdir.c.orig Sun Oct 28 14:08:24 2001 X+++ mod_mysqluserdir.c Sun Oct 28 14:08:53 2001 X@@ -614,7 +614,6 @@ X X if (sql_row=mysql_fetch_row(result)) { X values=sql_row[0]; X- mysql_free_result(result); X } X X else END-of-mod_mysqluserdir/files/patch-mod_mysqluserdir.c echo x - mod_mysqluserdir/distinfo sed 's/^X//' >mod_mysqluserdir/distinfo << 'END-of-mod_mysqluserdir/distinfo' XMD5 (mod_mysqluserdir_0.1.tar.gz) = 3f74bc9f8ce6959018767695c52c00c4 END-of-mod_mysqluserdir/distinfo echo x - mod_mysqluserdir/pkg-descr sed 's/^X//' >mod_mysqluserdir/pkg-descr << 'END-of-mod_mysqluserdir/pkg-descr' Xmod_mysqluserdir is a configurable Apache module for fetching Xhttp://server/~username type info from a MySQL database. X XWWW: http://freshmeat.net/projects/mod_mysqluserdir/ X X- Anders Nordby END-of-mod_mysqluserdir/pkg-descr echo x - mod_mysqluserdir/pkg-plist sed 's/^X//' >mod_mysqluserdir/pkg-plist << 'END-of-mod_mysqluserdir/pkg-plist' Xlibexec/apache/mod_mysqluserdir.so X@exec %D/sbin/apxs -e -A -n userdir %D/%F X@unexec %D/sbin/apxs -e -A -n userdir %D/%F X%%PORTDOCS%%share/doc/mod_mysqluserdir/README X%%PORTDOCS%%@dirrm share/doc/mod_mysqluserdir END-of-mod_mysqluserdir/pkg-plist echo x - mod_mysqluserdir/pkg-comment sed 's/^X//' >mod_mysqluserdir/pkg-comment << 'END-of-mod_mysqluserdir/pkg-comment' XAn Apache module to make Apache get userdirs from MySQL END-of-mod_mysqluserdir/pkg-comment echo x - mod_mysqluserdir/Makefile sed 's/^X//' >mod_mysqluserdir/Makefile << 'END-of-mod_mysqluserdir/Makefile' X# New ports collection makefile for: mod_mysqluserdir X# Date created: 28 October 2001 X# Whom: Anders Nordby X# X# $FreeBSD$ X XPORTNAME= mod_mysqluserdir XPORTVERSION= 0.1 XCATEGORIES= www XMASTER_SITES= ftp://sys.estpak.ee/pub/ \ X ftp://ftp.nuug.no/pub/anders/distfiles/ XDISTNAME= ${PORTNAME}_${PORTVERSION} X XMAINTAINER= anders@fix.no X XBUILD_DEPENDS= ${APXS}:${PORTSDIR}/www/apache13 XRUN_DEPENDS= ${APXS}:${PORTSDIR}/www/apache13 XLIB_DEPENDS= mysqlclient.10:${PORTSDIR}/databases/mysql323-client X XAPXS= ${LOCALBASE}/sbin/apxs X Xdo-build: X (cd ${WRKSRC} && ${APXS} -c -I${LOCALBASE}/include \ X -L${LOCALBASE}/lib/mysql -lmysqlclient mod_mysqluserdir.c) X Xdo-install: X (cd ${WRKSRC} && ${APXS} -i -A -n 'userdir' mod_mysqluserdir.so) X.if !defined(NOPORTDOCS) X ${INSTALL} -d -o root -g wheel -m 0755 ${DOCSDIR} X ${INSTALL_DATA} ${FILESDIR}/README ${DOCSDIR}/ X.endif X ${CAT} ${PKGMESSAGE} X X.include END-of-mod_mysqluserdir/Makefile echo x - mod_mysqluserdir/pkg-message sed 's/^X//' >mod_mysqluserdir/pkg-message << 'END-of-mod_mysqluserdir/pkg-message' X************************************************************ XYou've installed mod_mysqluserdir, an Apache module to make XApache get userdirs from MySQL. X XEdit your apache.conf or httpd.conf to enable and setup this Xmodule. Have a look at the files in X${PREFIX}/share/doc/mod_mysqluserdir for information on how Xto configure it etc. X XYou need to disable the LoadModule and AddModule commands Xfor the default Apache mod_userdir module to make Xmod_mysqluserdir work. X XThen do this to make it work effective: X X# apachectl configtest (see if there are any config errors) X# apachectl restart X X************************************************************ END-of-mod_mysqluserdir/pkg-message exit >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message