Date: Mon, 20 Jun 2005 23:19:13 +0200 (CEST) From: Joerg Pulz <Joerg.Pulz@frm2.tum.de> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/82454: update net/gatekeeper, take maintainership Message-ID: <200506202119.j5KLJDqx045822@hades.admin.frm2> Resent-Message-ID: <200506202120.j5KLKM3c099895@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 82454 >Category: ports >Synopsis: update net/gatekeeper, take maintainership >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Mon Jun 20 21:20:22 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Joerg Pulz >Release: FreeBSD 5.4-RC1 i386 >Organization: ZWE FRM-II / TU-Munich >Environment: System: FreeBSD hades.admin.frm2 5.4-RC1 FreeBSD 5.4-RC1 #4: Mon Apr 4 12:57:01 CEST 2005 root@hades.admin.frm2:/usr/obj/usr/src/sys/HADES i386 >Description: update net/gatekeeper to v2.2.2 - switch to GNU_CONFIGURE - added knobs to build with MySQL and PostgreSQL (currently not active due to compile problems) - added pkg-install and pkg-deinstall scripts to create an unpriviledged user account and to create/remove (un)necessary files and directories (based on www/squid) - added rcNG script to start and stop the daemon - install example configuration in ${PREFIX}/etc - install more examples to ${EXAMPLESDIR} - updated pkg-plist and distinfo - retired old patches and added a new one as the maintainer is currently set to ports@FreeBSD.org, i would take it to provide further updates. >How-To-Repeat: >Fix: - apply the diff to net/gatekeeper - remove files/patch-makefile and files/patch-singleton.h from CVS - add pkg-install, pkg-deinstall, files/gnugk.sh.sample and files/patch-Makefile.in to CVS --- gatekeeper.diff begins here --- Index: Makefile =================================================================== RCS file: /home/ncvs/ports/net/gatekeeper/Makefile,v retrieving revision 1.37 diff -u -r1.37 Makefile --- Makefile 16 May 2005 02:45:09 -0000 1.37 +++ Makefile 20 Jun 2005 20:58:52 -0000 @@ -6,20 +6,24 @@ # PORTNAME= gatekeeper -PORTVERSION= 2.0.5 +PORTVERSION= 2.2.2 PORTREVISION= 3 CATEGORIES= net MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= openh323gk -DISTNAME= gk-${PORTVERSION} -EXTRACT_SUFX= .tgz +DISTNAME= gnugk-${PORTVERSION} -MAINTAINER= ports@FreeBSD.org +MAINTAINER= Joerg.Pulz@frm2.tum.de COMMENT= GnuGK is GPL Gate Keeper for OhPhone, GnomeMeeting, NetMeeting and H323 BUILD_DEPENDS= ${NONEXISTENT}:${PORTSDIR}/net/openh323:build -WRKSRC= ${WRKDIR}/openh323gk +USE_RC_SUBR= yes +RC_DIR= ${PREFIX}/etc/rc.d + +GNU_CONFIGURE= yes +CONFIGURE_ENV= ${MAKE_ENV} +CONFIGURE_ARGS= --enable-radius NOCLEANDEPENDS= yes @@ -31,8 +35,43 @@ THE_MACHTYPE= ${ARCH:S/i386/x86/} MAKE_ARGS= OSTYPE=${OPSYS} MACHTYPE=${THE_MACHTYPE} OSRELEASE=${OSVERSION} CPLUS=${CXX} HAS_RADACCT=1 +.include <bsd.port.pre.mk> + +#.if defined(WITH_MYSQL) +#USE_MYSQL= 41 +#CONFIGURE_ARGS+= --enable-mysql \ +# --with-mysql-dir=${LOCALBASE} +#.else +CONFIGURE_ARGS+= --disable-mysql +#.endif + +#.if defined(WITH_PGSQL) +#USE_PGSQL= yes +#CONFIGURE_ARGS+= --enable-pgsql \ +# --with-pgsql-dir=${LOCALBASE} +#.else +CONFIGURE_ARGS+= --disable-pgsql +#.endif + +pre-install: + @${SED} -e 's|%%PREFIX%%|${PREFIX}|g' \ + -e 's|%%RC_SUBR%%|${RC_SUBR}|g' \ + ${FILESDIR}/gnugk.sh.sample > ${WRKDIR}/gnugk.sh + +pre-su-install: + @${SETENV} PKG_PREFIX=${PREFIX} \ + ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL + do-install: ${INSTALL_PROGRAM} ${WRKSRC}/obj_${OPSYS}_${THE_MACHTYPE}_r/gnugk ${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/obj_${OPSYS}_${THE_MACHTYPE}_r/addpasswd ${PREFIX}/bin + ${INSTALL_DATA} ${WRKSRC}/etc/complete.ini ${PREFIX}/etc/gnugk.ini.default + @${MKDIR} ${EXAMPLESDIR} + @${CP} -Rp ${WRKSRC}/etc/*.ini ${EXAMPLESDIR} + +post-install: + ${INSTALL_SCRIPT} ${WRKDIR}/gnugk.sh ${RC_DIR} + @${SETENV} PKG_PREFIX=${PREFIX} \ + ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL -.include <bsd.port.mk> +.include <bsd.port.post.mk> Index: distinfo =================================================================== RCS file: /home/ncvs/ports/net/gatekeeper/distinfo,v retrieving revision 1.16 diff -u -r1.16 distinfo --- distinfo 31 Mar 2004 03:09:59 -0000 1.16 +++ distinfo 20 Jun 2005 20:58:52 -0000 @@ -1,2 +1,2 @@ -MD5 (gk-2.0.5.tgz) = e719a6b59de76417ff31bf6c0da2212f -SIZE (gk-2.0.5.tgz) = 319926 +MD5 (gnugk-2.2.2.tar.gz) = 689d1239273d21daba5746fd128d3184 +SIZE (gnugk-2.2.2.tar.gz) = 562982 Index: pkg-deinstall =================================================================== RCS file: pkg-deinstall diff -N pkg-deinstall --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ pkg-deinstall 20 Jun 2005 20:58:52 -0000 @@ -0,0 +1,41 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +PATH=/bin:/usr/bin:/usr/sbin + +gnugk_config=${PKG_PREFIX:-"/usr/local"}/etc/gnugk.ini +gnugk_logdir="/var/log/gnugk" +gnugk_piddir="/var/run/gnugk" + +case $2 in +DEINSTALL) + cmp -s -z ${gnugk_config} ${gnugk_config}.default && rm ${gnugk_config} + rmdir ${gnugk_logdir} 2>/dev/null + rmdir ${gnugk_piddir} 2>/dev/null + ;; +POST-DEINSTALL) + echo "===> post-deinstallation information for $1" + echo "" + echo " Please note that gatekeeper was not completely removed" + echo " from this system:" + echo "" + echo " Any gatekeeper related user accounts were kept." + if [ -f ${gnugk_config} \ + -o -d ${gnugk_logdir} \ + -o -d ${gnugk_piddir} ] ; then + echo "" + echo " Additionally, the log directory as well as any" + echo " modified configuration files were preserved" + echo " too, in case you want to install an updated version" + echo " of gatekeeper. You need to remove them manually if" + echo " you do not want to use it any longer." + fi + echo "" + ;; +*) + exit 64 + ;; +esac +exit 0 Index: pkg-install =================================================================== RCS file: pkg-install diff -N pkg-install --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ pkg-install 20 Jun 2005 20:58:52 -0000 @@ -0,0 +1,91 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +PATH=/bin:/usr/bin:/usr/sbin + +pkgname=$1 +gnugk_user=gnugk +gnugk_group=gnugk +gnugk_config=${PKG_PREFIX:-"/usr/local"}/etc/gnugk.ini +gnugk_logdir="/var/log/gnugk" +gnugk_piddir="/var/run/gnugk" + +if [ -x /usr/sbin/nologin ]; then + nologin=/usr/sbin/nologin +else + nologin=/sbin/nologin +fi + +case $2 in +PRE-INSTALL) + echo "===> Pre-installation configuration for ${pkgname}" + if ! pw groupshow ${gnugk_group} -q >/dev/null ; then + echo "There is no group '${gnugk_group}' on this system, so I will try to create it:" + if ! pw groupadd ${gnugk_group} -q -h - ; then + echo "Failed to create group \"${gnugk_group}\"!" >&2 + echo "Please create it manually." >&2 + exit 1 + else + echo "Group '${gnugk_group}' created successfully:" + fi + else + echo "I will use the existing group '${gnugk_group}':" + fi + pw groupshow ${gnugk_group} + + if ! pw usershow ${gnugk_user} -q >/dev/null ; then + echo "There is no account '${gnugk_user}' on this system, so I will try to create it:" + if ! pw useradd -q -n ${gnugk_user} \ + -g ${gnugk_group} -d/nonexistent \ + -c "GNU Gatekeeper pseudo user" \ + -s "${nologin}" -h - ; then + echo "Failed to create user '${gnugk_user}'!" >&2 + echo "Please create it manually." >&2 + exit 1 + else + echo "User '${gnugk_user}' created successfully:" + fi + else + echo "I will use the existing user '${gnugk_user}':" + fi + pw usershow ${gnugk_user} + + for dir in ${gnugk_logdir} ${gnugk_piddir}; do + if [ ! -d ${dir} ]; then + echo "Creating ${dir}..." + install -d -o ${gnugk_user} -g ${gnugk_group} \ + -m 0750 ${dir} + fi + done + ;; +POST-INSTALL) + if [ ! -f ${gnugk_config} \ + -a -f ${gnugk_config}.default ]; then + echo "Creating ${gnugk_config} from default..." + install -c -o root -g ${gnugk_group} -m 0640 \ + ${gnugk_config}.default \ + ${gnugk_config} + fi + + echo "===> Post-installation informations for ${pkgname}" + echo "" + echo " o A sample configuration file for this package is installed" + echo " as ${gnugk_config}." + echo " More example configurations can be found in + echo " ${PKG_PREFIX}/share/examples/gatekeeper." + echo "" + echo " o A log directory has been created in ${gnugk_logdir}." + echo "" + echo " To enable gatekeeper, set gnugk_enable=yes in either" + echo " /etc/rc.conf, /etc/rc.conf.local or /etc/rc.conf.d/gnugk" + echo " See ${PKG_PREFIX}/etc/rc.d/gnugk.sh for more" + echo " configuration options." + echo "" + ;; +*) + exit 64 + ;; +esac +exit 0 Index: pkg-plist =================================================================== RCS file: /home/ncvs/ports/net/gatekeeper/pkg-plist,v retrieving revision 1.3 diff -u -r1.3 pkg-plist --- pkg-plist 4 Mar 2003 14:53:27 -0000 1.3 +++ pkg-plist 20 Jun 2005 20:58:52 -0000 @@ -1,2 +1,21 @@ +@unexec %D/etc/rc.d/gnugk.sh forcestop 2>/dev/null || true bin/gnugk bin/addpasswd +etc/rc.d/gnugk.sh +etc/gnugk.ini.default +share/examples/gatekeeper/child.ini +share/examples/gatekeeper/clirw.ini +share/examples/gatekeeper/complete.ini +share/examples/gatekeeper/fileacct.ini +share/examples/gatekeeper/mysql.ini +share/examples/gatekeeper/neighbor.ini +share/examples/gatekeeper/proxy.ini +share/examples/gatekeeper/radacct.ini +share/examples/gatekeeper/radaliasauth.ini +share/examples/gatekeeper/radauth.ini +share/examples/gatekeeper/routed.ini +share/examples/gatekeeper/rrqauth.ini +share/examples/gatekeeper/sql.ini +share/examples/gatekeeper/status.ini +share/examples/gatekeeper/vqueue.ini +@dirrm share/examples/gatekeeper Index: files/gnugk.sh.sample =================================================================== RCS file: files/gnugk.sh.sample diff -N files/gnugk.sh.sample --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/gnugk.sh.sample 20 Jun 2005 20:58:52 -0000 @@ -0,0 +1,41 @@ +#!/bin/sh +# +# $FreeBSD:$ +# +# PROVIDE: gnugk +# REQUIRE: NETWORKING SERVERS +# BEFORE: DAEMON +# KEYWORD: shutdown +# +# Add to /etc/rc.conf to enable gnugk: +# gnugk_enable="YES" +# +# Additional options for /etc/rc.conf +# gnugk_user="the user that should run gnugk" (def: gnugk) +# gnugk_config"path to the config file to use" (def: /usr/local/etc/gnugk.ini) +# gnugk_logfile="path to the logfile to log to" (def: /var/log/gnugk/gnugk.log) +# gnugk_pidfile="path to the pidfile to use" (def: /var/run/gnugk/gnugk.pid) +# gnugk_flags="additional flags you need" (def: -t) + +. %%RC_SUBR%% + +name="gnugk" +rcvar=`set_rcvar` +command="%%PREFIX%%/bin/${name}" +extra_commands="reload" + +load_rc_config $name + +gnugk_user=${gnugk_user:-${name}} +gnugk_config=${gnugk_config:-"%%PREFIX%%/etc/${name}.ini"} +gnugk_logfile=${gnugk_logfile:-"/var/log/${name}/${name}.log"} +gnugk_pidfile=${gnugk_pidfile:-"/var/run/${name}/${name}.pid"} + +# use some defaults if no flags are specified in /etc/rc.conf +gnugk_flags=${gnugk_flags:-"-t"} + +required_files=${gnugk_conf} +pidfile=${gnugk_pidfile} +command_args="-u ${gnugk_user} -c ${gnugk_config} -o ${gnugk_logfile} --pid ${pidfile} >/dev/null &" + +run_rc_command "$1" Index: files/patch-Makefile.in =================================================================== RCS file: files/patch-Makefile.in diff -N files/patch-Makefile.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-Makefile.in 20 Jun 2005 20:58:52 -0000 @@ -0,0 +1,20 @@ +--- Makefile.in.orig Mon Jun 20 14:16:12 2005 ++++ Makefile.in Mon Jun 20 14:17:08 2005 +@@ -76,7 +76,7 @@ + LD_RUN_LIST += $(PWLIBDIR)/lib $(OPENH323DIR)/lib + + # compiler/linker flags set by configure script +-STDCCFLAGS += @STDCCFLAGS@ ++STDCCFLAGS += @STDCCFLAGS@ -DPASN_LEANANDMEAN=1 + LDFLAGS += @LDFLAGS@ + ENDLDLIBS += @ENDLDLIBS@ + ENDLDFLAGS += @ENDLDFLAGS@ +@@ -111,7 +111,7 @@ + + # extra targets + addpasswd: $(OBJDIR)/addpasswd.o +- $(CXX) -o $(OBJDIR)/addpasswd $(CFLAGS) $(OBJDIR)/addpasswd.o $(LDFLAGS) -l$(PTLIB_BASE)$(LIB_TYPE) $(ENDLDLIBS) $(ENDLDFLAGS) ++ $(CXX) -o $(OBJDIR)/addpasswd $(CFLAGS) $(OBJDIR)/addpasswd.o $(LDFLAGS) -l$(PTLIB_BASE)$(LIB_TYPE)_s $(ENDLDLIBS) $(ENDLDFLAGS) + + doc: + $(MAKE) -C docs/manual html Index: files/patch-makefile =================================================================== RCS file: /home/ncvs/ports/net/gatekeeper/files/patch-makefile,v retrieving revision 1.2 diff -u -r1.2 patch-makefile --- files/patch-makefile 28 Aug 2003 07:26:16 -0000 1.2 +++ files/patch-makefile 20 Jun 2005 20:58:52 -0000 @@ -1,19 +0,0 @@ -*** Makefile.orig Thu Aug 28 08:22:41 2003 ---- Makefile Thu Aug 28 08:22:54 2003 -*************** endif -*** 187,193 **** - - # extra targets - addpasswd: $(OBJDIR)/addpasswd.o -! $(CXX) -o $(OBJDIR)/addpasswd $(CFLAGS) $(OBJDIR)/addpasswd.o $(LDFLAGS) -l$(PTLIB_BASE)$(LIB_TYPE) $(ENDLDLIBS) $(ENDLDFLAGS) - - doc: docs/manual.sgml - cd docs; sgml2html manual.sgml; \ ---- 187,193 ---- - - # extra targets - addpasswd: $(OBJDIR)/addpasswd.o -! $(CXX) -o $(OBJDIR)/addpasswd $(CFLAGS) $(OBJDIR)/addpasswd.o $(LDFLAGS) -l$(PTLIB_BASE)$(LIB_TYPE)_s $(ENDLDLIBS) $(ENDLDFLAGS) - - doc: docs/manual.sgml - cd docs; sgml2html manual.sgml; \ Index: files/patch-singleton.h =================================================================== RCS file: /home/ncvs/ports/net/gatekeeper/files/patch-singleton.h,v retrieving revision 1.1 diff -u -r1.1 patch-singleton.h --- files/patch-singleton.h 8 Oct 2004 03:54:38 -0000 1.1 +++ files/patch-singleton.h 20 Jun 2005 20:58:52 -0000 @@ -1,15 +0,0 @@ ---- singleton.h.orig Thu Oct 7 19:42:31 2004 -+++ singleton.h Thu Oct 7 19:42:49 2004 -@@ -87,12 +87,7 @@ - Singleton(); - ~Singleton(); - --#ifdef WIN32 - public: --#else -- private: -- friend T *InstanceOf<T>(); --#endif - static SingletonBase *m_Instance; - static PMutex m_CreationLock; - }; --- gatekeeper.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?200506202119.j5KLJDqx045822>