Subject: pkg/16612: maintainer update of chat/silc-server to version 0.8.4
To: None <gnats-bugs@gnats.netbsd.org>
From: Lubomir Sedlacik <salo@Xtrmntr.org>
List: netbsd-bugs
Date: 05/02/2002 13:35:42
>Number:         16612
>Category:       pkg
>Synopsis:       maintainer update of chat/silc-server to version 0.8.4
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu May 02 04:36:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Lubomir Sedlacik
>Release:        NetBSD 1.5ZB
>Organization:
>Environment:
>Description:

hello guys,

since i want to make this package as portable as possible, please let me
know if you have problems on your OS/platform with compilation and/or
running silcd. it is tested on NetBSD/i386, NetBSD/sparc, NetBSD/vax
and Solaris/sparc. i am curious particulary about Darwin/Mac OS X and Linux
since i don't have access to any machine with pkgsrc.

according to ftp.netbsd.org's packages, it should work on NetBSD/amigappc,
NetBSD/macppc, NetBSD/bebox, NetBSD/powerpc (i guess they use the same
package), NetBSD/prep, and maybe NetBSD/arm32. please report your success
too! :)

thanks.


changes in silc-server package:
===============================

- upgraded to version 0.8.4
- added generic startup script for Solaris and Linux (i can't test it on
  Darwin/Mac OS X because i don't have any.. please let me know if it works
  for you. thanks)

  You will need to copy ${PREFIX}/etc/rc.d/silcd to appropriate location in
  your system and do neccessary actions to enable it.

  e.g. Solaris: copy ${PREFIX}/etc/rc.d/silcd to /etc/init.d/ and make links
                in /etc/rc2.d/, /etc/rc1.d/, /etc/rc0.d/.

changes in silc-server since 0.8.1:
===================================

* Fixed a bug in library where sending a bogus authentication
  payload would lead to a crash.
  
* Fixed a bug in the fetch_logging() config callback.
  
* Drop root privileges when started in foreground.  Don't drop them
  if debugging also.

* Added better error logging in rekey protocol.

* Do not check public key types in SKE during rekey. 

* Fixed the rekey protocol with PFS, which was totally broken.
  
* Fixed a negative refcount situtuation for the config context.

* Fixed memory leaks from config object.

* Added support for adding new connections to the server in rehash.
  After rehash they take effect.

* Added support for changing the maximum allowed connections in
  rehash.  The number can grow but going smaller is not supported.

* Added preliminary checking during config parsing for a valid
  public/private key and removed further checks in the code.

* Fixed silc_net_gethostbyaddr to correctly resolve by
  address.

* Fixed the notify relaying to client.  The HMAC to be used
  with relayed packets ws wrong and caused decryption failure
  at the client end.

* Fixed the silc_log_quick handling in the logging routines.
  It didn't log quickly when it was TRUE. Also the flush delay 
  was set even if it was 0 in config file.

* Added support for changing key pair of the server in rehash.

* Fixed the TOPIC_SET notify to not crash.  It changed the topic
  too early, before getting the channel entry.

* Added rehash support. Added function silc_server_rehash() that
  will perform all the basic tasks of the rehashing procedure.

* Added command line option `-x, --hexdump'. This will enable the
  SILC_LOG_HEXDUMP calls that are no longer enabled with `--debug'.
  The option `--hexdump' implies `--debug'.
  
* Fixed a bad bug in the logging APIs (silcutil library) where
  the application would crash after calling silc_log_reset_all().

>How-To-Repeat:

apply included patch and add file files/silcd.generic, thanks
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>Fix:

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/chat/silc-server/Makefile,v
retrieving revision 1.9
diff -u -u -r1.9 Makefile
--- Makefile	2002/03/29 11:34:51	1.9
+++ Makefile	2002/05/02 11:13:07
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.9 2002/03/29 11:34:51 rh Exp $
+# $NetBSD: Makefile,v 1.8 2002/03/03 23:49:49 hubertf Exp $
 
-DISTNAME=		silc-server-0.8.1
+DISTNAME=		silc-server-0.8.4
 CATEGORIES=		chat
 MASTER_SITES=		http://www.silcnet.org/download/server/sources/ \
 			ftp://ftp.silcnet.org/silc/server/sources/ \
@@ -52,8 +52,8 @@
 CONFIGURE_ARGS+=	--with-docdir=${PREFIX}/share/doc/silcd
 CONFIGURE_ARGS+=	--with-etcdir=${PKG_SYSCONFDIR}
 CONFIGURE_ARGS+=	--with-silcd-config-file=${PKG_SYSCONFDIR}/silcd.conf
-CONFIGURE_ARGS+=	--with-silcd-pid-file=/var/run/silcd.pid
 CONFIGURE_ARGS+=	--with-logsdir=/var/log/silcd
+CONFIGURE_ARGS+=	--with-silcd-pid-file=/var/log/silcd/silcd.pid
 CONFIGURE_ARGS+=	--without-ncurses
 
 # list it into IPv6-ready packages
@@ -69,8 +69,13 @@
 .endif
 
 post-install:
+.if (${OPSYS} == "NetBSD")
 	@${SED} ${FILES_SUBST_SED} ${FILESDIR}/silcd.sh \
 		> ${PREFIX}/share/doc/silcd/silcd.default
+.else
+	@${SED} ${FILES_SUBST_SED} ${FILESDIR}/silcd.generic \
+		> ${PREFIX}/share/doc/silcd/silcd.default
+.endif	
 	@${SED} ${FILES_SUBST_SED} ${FILESDIR}/motd.txt \
 		> ${PREFIX}/share/doc/silcd/motd.txt.default
 
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/chat/silc-server/distinfo,v
retrieving revision 1.9
diff -u -u -r1.9 distinfo
--- distinfo	2002/03/29 11:34:51	1.9
+++ distinfo	2002/05/02 11:13:07
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.9 2002/03/29 11:34:51 rh Exp $
+$NetBSD: distinfo,v 1.8 2002/03/03 23:49:49 hubertf Exp $
 
-SHA1 (silc-server-0.8.1.tar.bz2) = fe2f3e677c5ef1580a888aa5b3c5b01ea229cca0
-Size (silc-server-0.8.1.tar.bz2) = 931438 bytes
+SHA1 (silc-server-0.8.4.tar.bz2) = 1549594faa6f21b760f4240ae167bc501efa3101
+Size (silc-server-0.8.4.tar.bz2) = 940368 bytes
 SHA1 (patch-aa) = 97ccff02e5d2d1bd3ff64a1a1942525e5a4522bd
 SHA1 (patch-ab) = 482b7580cb95a0833c85f64a3d94c16b2b1c984f
Index: files/silcd.sh
===================================================================
RCS file: /cvsroot/pkgsrc/chat/silc-server/files/silcd.sh,v
retrieving revision 1.3
diff -u -u -r1.3 silcd.sh
--- silcd.sh	2002/01/26 14:43:17	1.3
+++ silcd.sh	2002/05/02 11:13:07
@@ -15,7 +15,7 @@
 confdir="@PKG_SYSCONFDIR@"
 required_files="$confdir/silcd.conf"
 required_dirs="/var/log/silcd"
-pidfile="/var/run/${name}.pid"
+pidfile="/var/log/silcd/${name}.pid"
 command="@PREFIX@/sbin/silcd"
 start_precmd="silcd_precmd"
 stop_cmd="silcd_stop"

NEW FILE, files/silcd.generic:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

#!/bin/sh
#
# $NetBSD$
#

KILL="/bin/kill"
CAT="/bin/cat"
RM="/bin/rm"

name="silcd"
confdir="@PKG_SYSCONFDIR@"
required_files="$confdir/silcd.conf"
required_dirs="/var/log/silcd"
pidfile="/var/log/silcd/${name}.pid"
command="@PREFIX@/sbin/silcd"
start_precmd="silcd_precmd"

silcd_precmd() {       
	if [ ! -f $confdir/silcd.prv ]; then
		$command -C $confdir
	fi
}

silcd_start() {
	if [ ! -r $required_files ]; then
		echo "$0: WARNING: $required_files is not readable."
		exit 1
	fi
	if [ ! -d $required_dirs ]; then
		echo "$0: WARNING: $required_dirs is not a directory."
		exit 1
	fi

	eval $start_precmd
	return_code=$?
	if [ $return_code != "0" ]; then
		exit 1
	fi

	echo "Starting ${name}."
	eval $command
	return_code=$?
	if [ $return_code != "0" ]; then
		exit 1
	fi
}


silcd_stop() {
	if [ -r $pidfile  -a ! -z $pidfile ]; then
		_pid=`${CAT} ${pidfile}`
	else
		echo "${name} not running?"
	fi
	if [ ${_pid:=0} -gt 1 -a ! "X$_pid" = "X " ]; then
		echo "Stopping ${name}."
		${KILL} ${_pid}
		return_code=$?
		if [ $return_code != "0" ]; then
			exit 1
		fi
	fi
	${RM} -f $pidfile
}

case $1 in

'start')
    silcd_start
    ;;

'stop')
    silcd_stop
    ;;

'restart')
    silcd_stop
    silcd_start
    ;;

*)
    echo "Usage: $0 (start|stop|restart)"
    ;;
esac
>Release-Note:
>Audit-Trail:
>Unformatted: