Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Mar 2008 22:53:42 GMT
From:      Lukasz Wasikowski <lukasz@wasikowski.net>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/121630: New port: mail/sgwi PHP web interface to SQLGrey
Message-ID:  <200803112253.m2BMrg8N029024@www.freebsd.org>
Resent-Message-ID: <200803112300.m2BN0193076275@freefall.freebsd.org>

Next in thread | Raw E-Mail | Index | Archive | Help

>Number:         121630
>Category:       ports
>Synopsis:       New port: mail/sgwi PHP web interface to SQLGrey
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 11 23:00:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Lukasz Wasikowski
>Release:        FreeBSD 7.0-RELEASE
>Organization:
>Environment:
FreeBSD bijou.wasikowski.net 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Mon Feb 25 16:09:17 CET 2008     root@bijou.wasikowski.net:/usr/obj/usr/src/sys/bijou  i386
>Description:
sgwi is a web interface to SQLGrey written in PHP. It allows you to edit the white- and blacklists as well as the current state of the greylist.

>How-To-Repeat:

>Fix:


Patch attached with submission follows:

# 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:
#
#	/usr/ports/mail/sgwi
#	/usr/ports/mail/sgwi/distinfo
#	/usr/ports/mail/sgwi/Makefile
#	/usr/ports/mail/sgwi/files
#	/usr/ports/mail/sgwi/files/pkg-message.in
#	/usr/ports/mail/sgwi/files/patch-.htaccess
#	/usr/ports/mail/sgwi/files/patch-.htpasswd
#	/usr/ports/mail/sgwi/files/patch-copyright.php
#	/usr/ports/mail/sgwi/pkg-descr
#	/usr/ports/mail/sgwi/pkg-plist
#
echo c - /usr/ports/mail/sgwi
mkdir -p /usr/ports/mail/sgwi > /dev/null 2>&1
echo x - /usr/ports/mail/sgwi/distinfo
sed 's/^X//' >/usr/ports/mail/sgwi/distinfo << 'END-of-/usr/ports/mail/sgwi/distinfo'
XMD5 (sqlgreywebinterface-0.7.tgz) = e7d5cc531651f8a2703ea8490c3f6ae4
XSHA256 (sqlgreywebinterface-0.7.tgz) = b9b664ce5f9b194aa7431350b6dc31485f1753e55ac6ef8614c2b7f25dc82ccf
XSIZE (sqlgreywebinterface-0.7.tgz) = 5023
END-of-/usr/ports/mail/sgwi/distinfo
echo x - /usr/ports/mail/sgwi/Makefile
sed 's/^X//' >/usr/ports/mail/sgwi/Makefile << 'END-of-/usr/ports/mail/sgwi/Makefile'
X# New ports collection makefile for:  sgwi
X# Date created:                       11 March 2008
X# Whom:                               Lukasz Wasikowski <lukasz@wasikowski.net>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	sgwi
XPORTVERSION=	0.7
XCATEGORIES=	mail www
XMASTER_SITES=	http://www.vanheusden.com/sgwi/
XDISTNAME=	sqlgreywebinterface-${PORTVERSION}
XEXTRACT_SUFX=	.tgz
X
XMAINTAINER=	lukasz@wasikowski.net
XCOMMENT=	PHP web interface to SQLGrey
X
XNO_BUILD=	yes
XSUB_FILES+=	pkg-message
X
XOPTIONS=	MYSQL "MySQL back-end (use mysql PHP extension)" on
XOPTIONS+=	PGSQL "PostgreSQL back-end (use pgsql PHP extension)" off
X
X.include <bsd.port.pre.mk>
X
X.if !defined(WITHOUT_MYSQL)
XUSE_PHP+=	mysql
X.endif
X
X.if defined(WITH_PGSQL)
XUSE_PHP+=	pgsql
X.endif
X
X.if defined(WITHOUT_MYSQL) && !defined(WITH_PGSQL)
XIGNORE=	needs at least one database back-end
X.endif
X
Xpost-patch:
X		${FIND} ${WRKSRC} -name '*.orig' -delete
X
Xdo-install:
X		@[ ! -f ${WRKSRC}/.htpasswd ] || ${MV} ${WRKSRC}/.htpasswd ${WRKSRC}/.htpasswd.dist
X		@[ ! -f ${WRKSRC}/.htaccess ] || ${MV} ${WRKSRC}/.htaccess ${WRKSRC}/.htaccess.dist
X		@[ ! -f ${WRKSRC}/config.inc.php ] || ${MV} ${WRKSRC}/config.inc.php ${WRKSRC}/config.inc.php.dist
X		@${MKDIR} ${PREFIX}/www/sgwi
X		@${INSTALL_DATA} ${WRKSRC}/*.php ${PREFIX}/www/sgwi
X		@${INSTALL_DATA} ${WRKSRC}/*.txt ${PREFIX}/www/sgwi
X		@${INSTALL_DATA} ${WRKSRC}/*.dist ${PREFIX}/www/sgwi
X		@${INSTALL_DATA} ${WRKSRC}/.ht* ${PREFIX}/www/sgwi
X		@[ -f ${PREFIX}/www/sgwi/config.inc.php ] || \
X			${CP} ${PREFIX}/www/sgwi/config.inc.php.dist \
X				${PREFIX}/www/sgwi/config.inc.php
X		@[ -f ${PREFIX}/www/sgwi/.htpasswd ] || \
X			${CP} ${PREFIX}/www/sgwi/.htpasswd.dist \
X				${PREFIX}/www/sgwi/.htpasswd
X		@[ -f ${PREFIX}/www/sgwi/.htaccess ] || \
X			${CP} ${PREFIX}/www/sgwi/.htaccess.dist \
X				${PREFIX}/www/sgwi/.htaccess
X
Xpost-install:
X		@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/www/sgwi
X		@${CHOWN} root ${PREFIX}/www/sgwi/.ht* ${PREFIX}/www/sgwi/config.inc.php*
X		@${CHMOD} 640 ${PREFIX}/www/sgwi/*.php ${PREFIX}/www/sgwi/*.txt ${PREFIX}/www/sgwi/.ht* ${PREFIX}/www/sgwi/*.dist
X		${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.post.mk>
END-of-/usr/ports/mail/sgwi/Makefile
echo c - /usr/ports/mail/sgwi/files
mkdir -p /usr/ports/mail/sgwi/files > /dev/null 2>&1
echo x - /usr/ports/mail/sgwi/files/pkg-message.in
sed 's/^X//' >/usr/ports/mail/sgwi/files/pkg-message.in << 'END-of-/usr/ports/mail/sgwi/files/pkg-message.in'
X
X1. Configure sgwi
X-----------------
XEdit the %%PREFIX%%/www/sgwi/config.inc.php file to reflect your
Xsetup.
X
XThe default password for sgwi is admin/admin. It's specified in
Xthe .htpasswd file in %%PREFIX%%/www/sgwi/ directory. Change it
Xwith:
X
Xhtpasswd %%PREFIX%%/www/sgwi/.htpasswd admin
X
XAlso make sure that the location of the .htpasswd file specified 
Xin .htaccess file matches your path.
X
X2. Configure Apache
X-------------------
XAdd a line in your httpd.conf to allow the use of .htaccess file.
X
X<Directory "%%PREFIX%%/www/sgwi">
X        Options Indexes
X        AllowOverride AuthConfig
X</Directory>
X
END-of-/usr/ports/mail/sgwi/files/pkg-message.in
echo x - /usr/ports/mail/sgwi/files/patch-.htaccess
sed 's/^X//' >/usr/ports/mail/sgwi/files/patch-.htaccess << 'END-of-/usr/ports/mail/sgwi/files/patch-.htaccess'
X--- /dev/null	2008-03-11 22:05:01.000000000 +0100
X+++ .htaccess	2008-03-11 22:03:36.000000000 +0100
X@@ -0,0 +1,8 @@
X+AuthUserFile /usr/local/www/sgwi/.htpasswd
X+AuthGroupFile /dev/null
X+AuthName "sgwi Admin"
X+AuthType Basic
X+
X+<limit GET POST>
X+require valid-user
X+</limit>
END-of-/usr/ports/mail/sgwi/files/patch-.htaccess
echo x - /usr/ports/mail/sgwi/files/patch-.htpasswd
sed 's/^X//' >/usr/ports/mail/sgwi/files/patch-.htpasswd << 'END-of-/usr/ports/mail/sgwi/files/patch-.htpasswd'
X--- /dev/null	2008-03-11 22:05:01.000000000 +0100
X+++ .htpasswd	2008-03-11 22:02:21.000000000 +0100
X@@ -0,0 +1 @@
X+admin:1Cm2R1zl5.LII
END-of-/usr/ports/mail/sgwi/files/patch-.htpasswd
echo x - /usr/ports/mail/sgwi/files/patch-copyright.php
sed 's/^X//' >/usr/ports/mail/sgwi/files/patch-copyright.php << 'END-of-/usr/ports/mail/sgwi/files/patch-copyright.php'
X--- copyright.inc.php.orig	2008-03-11 22:23:21.000000000 +0100
X+++ copyright.inc.php	2008-03-11 22:23:33.000000000 +0100
X@@ -1,4 +1,4 @@
X <TR HEIGHT=64><TD>
X <HR>
X-<FONT SIZE=-1><A HREF="http://www.vanheusden.com/sgwi/" TARGET="_new">SQLGrey webinterface v0.6</A> by <A HREF="http://www.vanheusden.com/feedbackform.php?subject=SQLGrey%20webinterface" TARGET="_new">folkert@vanheusden.com</A>
X+<FONT SIZE=-1><A HREF="http://www.vanheusden.com/sgwi/" TARGET="_new">SQLGrey webinterface v0.7</A> by <A HREF="http://www.vanheusden.com/feedbackform.php?subject=SQLGrey%20webinterface" TARGET="_new">folkert@vanheusden.com</A>
X </TD></TR>
END-of-/usr/ports/mail/sgwi/files/patch-copyright.php
echo x - /usr/ports/mail/sgwi/pkg-descr
sed 's/^X//' >/usr/ports/mail/sgwi/pkg-descr << 'END-of-/usr/ports/mail/sgwi/pkg-descr'
Xsgwi is a web interface to SQLGrey written in PHP. 
XIt allows you to edit the white- and blacklists as 
Xwell as the current state of the greylist.
X
XWWW:	http://www.vanheusden.com/sgwi/
END-of-/usr/ports/mail/sgwi/pkg-descr
echo x - /usr/ports/mail/sgwi/pkg-plist
sed 's/^X//' >/usr/ports/mail/sgwi/pkg-plist << 'END-of-/usr/ports/mail/sgwi/pkg-plist'
X@unexec if cmp -s %D/www/sgwi/.htaccess %D/www/sgwi/.htaccess.dist; then rm -f %D/www/sgwi/.htaccess; fi
Xwww/sgwi/.htaccess.dist
X@exec [ -f %B/.htaccess ] || cp %B/%f %B/.htaccess
X@unexec if cmp -s %D/www/sgwi/.htpasswd %D/www/sgwi/.htpasswd.dist; then rm -f %D/www/sgwi/.htpasswd; fi
Xwww/sgwi/.htpasswd.dist
X@exec [ -f %B/.htpasswd ] || cp %B/%f %B/.htpasswd
Xwww/sgwi/awl.php
Xwww/sgwi/awl_add.php
Xwww/sgwi/awl_delete.php
Xwww/sgwi/awl_delete_undef.php
X@unexec if cmp -s %D/www/sgwi/config.inc.php %D/www/sgwi/config.inc.php.dist; then rm -f %D/www/sgwi/config.inc.php; fi
Xwww/sgwi/config.inc.php.dist
X@exec [ -f %B/config.inc.php ] || cp %B/%f %B/config.inc.php
Xwww/sgwi/connect.php
Xwww/sgwi/connect_delete.php
Xwww/sgwi/connect_purge.php
Xwww/sgwi/connect_whitelist.php
Xwww/sgwi/copyright.inc.php
Xwww/sgwi/db.inc.php
Xwww/sgwi/index.php
Xwww/sgwi/license.txt
Xwww/sgwi/opt_in_out.php
Xwww/sgwi/opt_in_out_add.php
Xwww/sgwi/opt_in_out_delete.php
Xwww/sgwi/opt_in_out_helpers.inc.php
Xwww/sgwi/readme.txt
Xwww/sgwi/tools.inc.php
X@dirrm www/sgwi
END-of-/usr/ports/mail/sgwi/pkg-plist
exit



>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?200803112253.m2BMrg8N029024>