Date: Mon, 28 Aug 2006 19:31:39 +0200 (CEST) From: Jonas Kvinge <jonas@night-light.net> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/102615: ircproxy Message-ID: <200608281731.k7SHVdho049557@emptyglass.night-light.net> Resent-Message-ID: <200608281740.k7SHeGT3038220@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 102615 >Category: ports >Synopsis: ircproxy >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Mon Aug 28 17:40:15 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Jonas Kvinge >Release: FreeBSD 6.1-RELEASE i386 >Organization: >Environment: System: FreeBSD emptyglass.night-light.net 6.1-RELEASE FreeBSD 6.1-RELEASE #0: Sat Jul 15 21:58:50 CEST 2006 drowned@emptyglass.night-light.net:/usr/obj/usr/src/sys/EMPTYGLASS i386 >Description: >How-To-Repeat: >Fix: --- ircproxy.diff begins here --- diff -ruN ircproxy.old/Makefile ircproxy/Makefile --- ircproxy.old/Makefile Sat Aug 26 19:50:03 2006 +++ ircproxy/Makefile Mon Aug 28 19:14:55 2006 @@ -1,39 +1,37 @@ -# New ports collection makefile for: ircproxy -# Date created: 10 July 2003 -# Whom: Jonas Kvinge <jonas@night-light.net> -# -# $FreeBSD: ports/irc/ircproxy/Makefile,v 1.5 2006/02/08 16:00:35 vs Exp $ -# - -PORTNAME= ircproxy -PORTVERSION= 1.2.41 -CATEGORIES= irc -MASTER_SITES= ftp://ftp.night-light.net/pub/unix/ircproxy/ -DISTNAME= ircproxy-1.2.41d.pl2 - -MAINTAINER= jonaski@night-light.net -COMMENT= An IRC proxy server - -GNU_CONFIGURE= yes -CONFIGURE_WRKSRC= ${WRKSRC}/config - -# -# Copy the freebsd port setup file to automatically generate setup.h -# So we dont need to do make config, I think this might be the best -# solution. -# -pre-build: - @if [ ! -f ${WRKSRC}/config/setup-file ]; then ( \ - if [ ! -f ${WRKSRC}/setup/setup-freebsd ]; then ( ${ECHO} "Missing the setup-freebsd file!"; exit 1; ) fi; \ - ${CP} ${WRKSRC}/setup/setup-freebsd ${WRKSRC}/setup/setup-file || exit 1; \ - cd ${WRKSRC}/setup; SETUP_BATCH=y SETUP_QUIET=y ${SH} ./setup || exit 1; \ - cd ${WRKSRC}/setup; ${SH} ./setup-makefile || exit 1; \ - ) \ - fi; - ${CHMOD} u+x ${WRKSRC}/pkg-install || exit 1 - ${CHMOD} u+x ${WRKSRC}/pkg-deinstall || exit 1 - -post-configure: - @${REINPLACE_CMD} -e 's+^MAIL=+MAIL="/bin/true"+' ${WRKSRC}/sendreport.sh - -.include <bsd.port.mk> +# New ports collection makefile for: ircproxy +# Date created: 10 July 2003 +# Whom: Jonas Kvinge <jonas@night-light.net> +# +# $FreeBSD$ +# + +PORTNAME= ircproxy +PORTVERSION= 1.2.42d.pre2 +CATEGORIES= irc +MASTER_SITES= http://www.ircproxy.night-light.net/files/ +DISTNAME= ircproxy-1.2.42d.pre2 + +MAINTAINER= jonas@night-light.net +COMMENT= An IRC proxy/bouncer daemon + +GNU_CONFIGURE= yes +#CONFIGURE_ARGS= --prefix=${LOCALBASE} +CONFIGURE_WRKSRC= ${WRKSRC}/config + +# +# Copy the freebsd port setup file to automatically generate setup.h +# So we dont need to do make config, I think this might be the best +# solution. +# +pre-build: + @if [ ! -f ${WRKSRC}/config/setup-file ]; then ( \ + if [ ! -f ${WRKSRC}/setup/setup-freebsd ]; then ( ${ECHO} "Missing the setup-freebsd file!"; exit 1; ) fi; \ + ${CP} ${WRKSRC}/setup/setup-freebsd ${WRKSRC}/setup/setup-file || exit 1; \ + cd ${WRKSRC}/setup; SETUP_BATCH=y SETUP_QUIET=y ${SH} ./setup || exit 1; \ + cd ${WRKSRC}/setup; ${SH} ./setup-makefile || exit 1; \ + ) \ + fi; + ${CHMOD} u+x ${WRKSRC}/pkg-install || exit 1 + ${CHMOD} u+x ${WRKSRC}/pkg-deinstall || exit 1 + +.include "bsd.port.mk" diff -ruN ircproxy.old/distinfo ircproxy/distinfo --- ircproxy.old/distinfo Sat Aug 26 19:50:03 2006 +++ ircproxy/distinfo Mon Aug 28 19:18:16 2006 @@ -1,3 +1,3 @@ -MD5 (ircproxy-1.2.41d.pl2.tar.gz) = 0fda244dd742e2e7ee848e96b6ec04c2 -SHA256 (ircproxy-1.2.41d.pl2.tar.gz) = 57f3e12855eb08348fce676d45147bdee3f6090fbbd77f6fb4d4e5b832f9400f -SIZE (ircproxy-1.2.41d.pl2.tar.gz) = 227032 +MD5 (ircproxy-1.2.42d.pre2.tar.gz) = f3b5d9800b78ebda3346b137a5489671 +SHA256 (ircproxy-1.2.42d.pre2.tar.gz) = c8d1370db589cc1778f581e60a5107defe3d1eed3ada46c40544f4f9ca968f58 +SIZE (ircproxy-1.2.42d.pre2.tar.gz) = 239968 diff -ruN ircproxy.old/pkg-deinstall ircproxy/pkg-deinstall --- ircproxy.old/pkg-deinstall Sat Aug 26 19:50:02 2006 +++ ircproxy/pkg-deinstall Mon Aug 28 19:14:54 2006 @@ -1,111 +1,56 @@ -#!/bin/sh -# -# Night Light IRC Proxy -# Deinstallation script for FreeBSD ports -# Written by Jonas Kvinge -# -# Last modified: Jonas Kvinge (10.07.2003) -# - -c='' -n='' -if [ "`eval echo -n 'a'`" = "-n a" ] ; then - c='\c' -else - n='-n' -fi - -EGROUP="ircproxy" -EUSER="ircproxy" -PIDFILEPATH="$PKG_PREFIX/ircproxy/ircproxy.pid" - -if [ "$2" = "DEINSTALL" ]; then - - echo "*-----------------------------------------------------------------------------" - echo "* Night Light IRC Proxy FreeBSD de-installation script" - echo "* Copyright (C) 2003 Jonas Kvinge, all rights reserved." - echo "*-----------------------------------------------------------------------------" - - echo $n "Checking to see whether ircproxy is installed in crontab... $c" - grep -q "^[^#]*$PKG_PREFIX/ircproxy/ircproxy\.sh" /etc/crontab >/dev/null 2>&1 - if [ $? -eq 0 ]; then - echo "YES" - echo $n "Removing ircproxy from crontab... $c" - sed -e "s:^[^#]*$PKG_PREFIX/ircproxy/ircproxy\.sh::" -e '/^$/d' /etc/crontab >/tmp/crontab || exit 1 - mv /tmp/crontab /etc/crontab || exit - chmod 644 /etc/crontab || exit - echo "OK" - else - echo "NO" - fi - echo $n "Checking to see whether ircproxy is running... $c" - if [ -f $PIDFILEPATH ] ; then - if [ ! -r $PIDFILEPATH ] ; then - echo "ERROR" - echo "Error: Cannot read PID file $PIDFILEPATH!" - exit 1 - fi - PID=`cat "$PIDFILEPATH"` - if ps -p "$PID" >/dev/null 2>&1 ; then - echo "YES" - for count in 1 2 3 4 5 6 7 8 9 10; do - if [ $count -ge 5 ]; then - echo $n "Sending KILL signal to ircproxy... $c" - kill -KILL "$PID" || break - echo "OK" - break - fi - echo $n "Sending TERM signal to ircproxy and waiting two seconds... $c" - kill -TERM "$PID" || break - sleep 2 - if ps -p `cat "$PIDFILEPATH"` >/dev/null 2>&1 ; then - echo "Still Running!" - else - echo "Successfully terminated!" - break - fi - done - else - echo "NO" - fi - else - echo "NO" - fi -fi - -if [ "$2" = "POST-DEINSTALL" ]; then - - echo "*-----------------------------------------------------------------------------" - echo "* Night Light IRC Proxy FreeBSD post de-installation script" - echo "* Copyright (C) 2003 Jonas Kvinge, all rights reserved." - echo "*-----------------------------------------------------------------------------" - - echo $n "Checking if $PKG_PREFIX/ircproxy exist... $c" - if [ -d "$PKG_PREFIX/ircproxy" ]; then - echo "YES" - echo $n "Removing $PKG_PREFIX/ircproxy... $c" - rm -R -f "$PKG_PREFIX/ircproxy" && echo "OK" || exit 1 - else - echo "NO" - fi - echo $n "Checking if $EGROUP group exist... $c" - pw group show ${EGROUP} >/dev/null 2>&1 - if [ $? -eq 0 ] ; then - echo "YES" - echo $n "Removing the $EGROUP group from the system... $c" - pw groupdel -n "$EGROUP" && echo "OK" || exit 1 - else - echo "NO" - fi - echo $n "Checking if $EUSER user account exist... $c" - pw user show ${EUSER} >/dev/null 2>&1 - if [ $? -eq 0 ] ; then - echo "YES" - echo $n "Removing the $EUSER user account from the system... $c" - pw userdel -n "$EUSER" && echo "OK" || exit 1 - else - echo "NO" - fi -fi - -exit 0 +#!/bin/sh +# +# Night Light IRC Proxy +# Deinstallation script for FreeBSD ports +# Written by Jonas Kvinge +# +# Last modified: Jonas Kvinge (26.08.2006) +# + +BINFILE=ircproxyd +PIDFILE="/var/run/ircproxyd.pid" +EUSER="ircproxy" +EGROUP="ircproxy" + +if [ "$2" = "DEINSTALL" ]; then + + grep -q "^[^#]*${PKG_PREFIX}/sbin/ircproxy\.sh" /etc/crontab >/dev/null 2>&1 + if [ $? -eq 0 ]; then + sed -i -e "s:^[^#]*${PKG_PREFIX}/sbin/ircproxy\.sh::" /etc/crontab + sed -i -e '/^$/d' /etc/crontab + rm -f /etc/crontab-e + fi + + if [ -f $PIDFILE ] && [ -r $PIDFILE ] ; then + PID=`cat "$PIDFILE"` + ps -p "$PID" >/dev/null 2>&1 + if [ $? -eq 0 ]; then + for count in 1 2 3 4 5 6 7 8 9 10; do + if [ $count -ge 5 ]; then + kill -KILL "$PID" || break + break + fi + kill -TERM "$PID" || break + sleep 2 + ps -p "$PID" >/dev/null 2>&1 + if [ ! $? -eq 0 ]; then + break; + fi + done + fi + fi +fi + +if [ "$2" = "POST-DEINSTALL" ]; then + + pw group show ${EGROUP} >/dev/null 2>&1 + if [ $? -eq 0 ] ; then + pw groupdel -n "$EGROUP" + fi + pw user show ${EUSER} >/dev/null 2>&1 + if [ $? -eq 0 ] ; then + pw userdel -n "$EUSER" + fi +fi + +exit 0 diff -ruN ircproxy.old/pkg-descr ircproxy/pkg-descr --- ircproxy.old/pkg-descr Sat Aug 26 19:50:03 2006 +++ ircproxy/pkg-descr Mon Aug 28 19:14:55 2006 @@ -1,6 +1,6 @@ -This is a port of ircproxy, it is an Internet Relay Chat Proxy. - -WWW: http://www.ircproxy.night-light.net/ - -- Jonas Kvinge -jonas@jonas.night-light.net +This is a port of ircproxy, it is an IRC proxy/bouncer. + +WWW: http://www.ircproxy.night-light.net/ + +- Jonas Kvinge +jonas@night-light.net diff -ruN ircproxy.old/pkg-install ircproxy/pkg-install --- ircproxy.old/pkg-install Thu Jan 1 01:00:00 1970 +++ ircproxy/pkg-install Mon Aug 28 19:14:55 2006 @@ -0,0 +1,41 @@ +#!/bin/sh +# +# Night Light IRC Proxy +# Installation script for FreeBSD ports +# Written by Jonas Kvinge +# +# Last modified: Jonas Kvinge (26.08.2006) +# + +BINFILE="ircproxyd" +PIDFILE="/var/run/ircproxyd.pid" +EUSER="ircproxy" +EGROUP="ircproxy" + +if [ "$2" = "POST-INSTALL" ]; then + + pw group show ${EGROUP} >/dev/null 2>&1 + if [ ! $? -eq 0 ]; then + pw groupadd ${EGROUP} + fi + + pw user show ${EUSER} >/dev/null 2>&1 + if [ ! $? -eq 0 ]; then + pw useradd ${EUSER} -g ${EGROUP} -s /nonexistent -c "Night Light IRC Proxy" + fi + + sed -i -e "s:^IRCPROXYBINFILE=.*:IRCPROXYBINFILE=${PKG_PREFIX}/sbin/${BINFILE}:" ${PKG_PREFIX}/sbin/ircproxy.sh || exit 1 + sed -i -e "s:^IRCPROXYPIDFILE=.*:IRCPROXYPIDFILE=${PIDFILE}:" ${PKG_PREFIX}/sbin/ircproxy.sh || exit 1 + rm -f ${PKG_PREFIX}/sbin/ircproxy.sh-e + + grep -q "^[^#]*${PKG_PREFIX}/sbin/ircproxy\.sh" /etc/crontab >/dev/null 2>&1 + if [ ! $? -eq 0 ] ; then + cat <<EOF >>/etc/crontab || exit 1 +*/5 * * * * root $PKG_PREFIX/sbin/ircproxy.sh +EOF + fi +fi + + +exit 0 + diff -ruN ircproxy.old/pkg-plist ircproxy/pkg-plist --- ircproxy.old/pkg-plist Sat Aug 26 19:50:03 2006 +++ ircproxy/pkg-plist Mon Aug 28 19:14:55 2006 @@ -1,5 +1,7 @@ -ircproxy/ircproxy -ircproxy/mkpasswd -ircproxy/data/listen.conf -ircproxy/data/access.conf -ircproxy/data/conn.conf +sbin/ircproxyd +sbin/mkpasswd +sbin/ircproxy.sh +etc/ircproxy/ircproxy-listen.conf +etc/ircproxy/ircproxy-access.conf +etc/ircproxy/ircproxy-conn.conf +@dirrm etc/ircproxy --- ircproxy.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608281731.k7SHVdho049557>