From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Jun 9 10:01:35 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5807E16A47B for ; Fri, 9 Jun 2006 10:01:35 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 087A143DE4 for ; Fri, 9 Jun 2006 10:00:30 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k59A0U31017955 for ; Fri, 9 Jun 2006 10:00:30 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k59A0TAS017954; Fri, 9 Jun 2006 10:00:29 GMT (envelope-from gnats) Resent-Date: Fri, 9 Jun 2006 10:00:29 GMT Resent-Message-Id: <200606091000.k59A0TAS017954@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Joerg Pulz Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 056B516A418; Fri, 9 Jun 2006 09:54:09 +0000 (UTC) (envelope-from Joerg.Pulz@frm2.tum.de) Received: from mailhost.frm2.tum.de (mailhost.frm2.tum.de [129.187.179.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id BD65843DA0; Fri, 9 Jun 2006 09:53:58 +0000 (GMT) (envelope-from Joerg.Pulz@frm2.tum.de) Received: from localhost (mailhost.frm2.tum.de [129.187.179.12]) by mailhost.frm2.tum.de (8.13.4/8.13.4) with ESMTP id k599rtDC088100; Fri, 9 Jun 2006 11:53:55 +0200 (CEST) (envelope-from jpulz@frm2.tum.de) Received: from hades.admin.frm2 (hades.admin.frm2 [172.25.1.10]) by mailhost.frm2.tum.de (8.13.4/8.13.4) with ESMTP id k599rpOa088095 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 9 Jun 2006 11:53:51 +0200 (CEST) (envelope-from jpulz@frm2.tum.de) Received: from hades.admin.frm2 (localhost [127.0.0.1]) by hades.admin.frm2 (8.13.6/8.13.6) with ESMTP id k599rp6T037470; Fri, 9 Jun 2006 11:53:51 +0200 (CEST) (envelope-from jpulz@frm2.tum.de) Received: (from jpulz@localhost) by hades.admin.frm2 (8.13.6/8.13.6/Submit) id k599rolF037469; Fri, 9 Jun 2006 11:53:50 +0200 (CEST) (envelope-from jpulz) Message-Id: <200606090953.k599rolF037469@hades.admin.frm2> Date: Fri, 9 Jun 2006 11:53:50 +0200 (CEST) From: Joerg Pulz To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Maintainer Subject: ports/98741: net/dhcp6: update to 20060322, rewrite rc scripts X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Joerg Pulz List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jun 2006 10:01:35 -0000 >Number: 98741 >Category: ports >Synopsis: net/dhcp6: update to 20060322, rewrite rc scripts >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: Fri Jun 09 10:00:29 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Joerg Pulz >Release: FreeBSD 6.1-STABLE-jpulz-001 i386 >Organization: TU-Munich / ZWE FRM-II >Environment: System: FreeBSD hades.admin.frm2 6.1-STABLE-jpulz-001 FreeBSD 6.1-STABLE-jpulz-001 #0: Thu Jun 1 11:46:30 CEST 2006 root@hades.admin.frm2:/usr/obj/usr/src/sys/HADES i386 >Description: Update net/dhcp6 to version 20060322. - Makefile * pet portlint about whitespace * use USE_RC_SUBR to install rc scripts * remove the homemade rc script handling - distinfo * update for the new version - pkg-plist * add some lines to stop running services when deinstalling * remove the rc scripts, these are added automatically now - files/dhcp6c.sh (dead) * we need files/dhcp6c.sh.in for USE_RC_SUBR - files/dhcp6relay.sh (dead) * we need files/dhcp6relay.sh.in for USE_RC_SUBR - files/dhcp6s.sh (dead) * we need files/dhcp6s.sh.in for USE_RC_SUBR - files/dhcp6c.sh.in (new) * rewritten version of the old files/dhcp6c.sh rc script * be more porters-handbook compliant * handle more rc.conf variables for easier configuration * make use of the pidfile for process control (status, stop, restart) * check that ${dhcp6c_interfaces} is set, otherwise bail out with a WARNING - files/dhcp6relay.sh.in (new) * rewritten version of the old files/dhcp6relay.sh rc script * be more porters-handbook compliant * handle more rc.conf variables for easier configuration * check that ${dhcp6relay_interfaces} is set, otherwise bail out with a WARNING - files/dhcp6s.sh.in (new) * rewritten version of the old files/dhcp6s.sh rc script * be more porters-handbook compliant * handle more rc.conf variables for easier configuration * check that ${dhcp6s_interface} is set, otherwise bail out with a WARNING - files/patch-lease.c (new) * fix compilation on FreeBSD-4.x >How-To-Repeat: >Fix: - apply the patch - remove files/dhcp6*.sh from CVS - add files/dhcp6*.sh.in to CVS - add files/patch-lease.c to CVS --- net_dhcp6.diff begins here --- Index: Makefile =================================================================== RCS file: /home/ncvs/ports/net/dhcp6/Makefile,v retrieving revision 1.7 diff -u -r1.7 Makefile --- Makefile 11 May 2006 22:49:05 -0000 1.7 +++ Makefile 9 Jun 2006 08:46:38 -0000 @@ -6,33 +6,24 @@ # PORTNAME= dhcp6 -PORTVERSION= 20060114 -PORTREVISION= 0 +PORTVERSION= 20060322 +#PORTREVISION= 0 CATEGORIES= net ipv6 MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= wide-dhcpv6 -DISTNAME= wide-dhcpv6-${PORTVERSION} +DISTNAME= wide-dhcpv6-${PORTVERSION} MAINTAINER= suz@FreeBSD.org COMMENT= KAME DHCP6 client, server, and relay WRKSRC= ${WRKDIR}/${DISTNAME} -USE_RC_SUBR= yes GNU_CONFIGURE= yes CONFIGURE_ARGS+= --sysconfdir=${LOCALBASE}/etc --with-localdbdir=/var/db MAN5= dhcp6c.conf.5 dhcp6s.conf.5 MAN8= dhcp6c.8 dhcp6s.8 dhcp6relay.8 dhcp6ctl.8 -RC_SCRIPTS= dhcp6c.sh dhcp6relay.sh dhcp6s.sh -RC_SCRIPTS_SUB= PREFIX=${PREFIX} \ - RC_SUBR=${RC_SUBR} - -post-patch: -.for f in ${RC_SCRIPTS} - @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ - ${FILESDIR}/${f} > ${WRKDIR}/${f} -.endfor +USE_RC_SUBR= dhcp6c.sh dhcp6relay.sh dhcp6s.sh post-install: .if !defined(NOPORTDOCS) @@ -41,8 +32,5 @@ .endif ${INSTALL_DATA} ${WRKSRC}/dhcp6c.conf.sample ${PREFIX}/etc ${INSTALL_DATA} ${WRKSRC}/dhcp6s.conf.sample ${PREFIX}/etc -.for f in ${RC_SCRIPTS} - @${INSTALL_SCRIPT} ${WRKDIR}/${f} ${PREFIX}/etc/rc.d/${f} -.endfor .include Index: distinfo =================================================================== RCS file: /home/ncvs/ports/net/dhcp6/distinfo,v retrieving revision 1.6 diff -u -r1.6 distinfo --- distinfo 22 Jan 2006 21:23:00 -0000 1.6 +++ distinfo 9 Jun 2006 08:46:38 -0000 @@ -1,3 +1,3 @@ -MD5 (wide-dhcpv6-20060114.tar.gz) = af600c0a0eb8e31a36e96c650d4f1945 -SHA256 (wide-dhcpv6-20060114.tar.gz) = ce2eaef614ad615b215abfb95374f0c027920b60fa634623f780c78a0c97aae9 -SIZE (wide-dhcpv6-20060114.tar.gz) = 177849 +MD5 (wide-dhcpv6-20060322.tar.gz) = f6464d893b7b8fdeb7ea941ac8532ed9 +SHA256 (wide-dhcpv6-20060322.tar.gz) = 2902335f71a3c782375064889c5d9154583a97453464eab6ca5d1eb99f24aed5 +SIZE (wide-dhcpv6-20060322.tar.gz) = 161026 Index: pkg-plist =================================================================== RCS file: /home/ncvs/ports/net/dhcp6/pkg-plist,v retrieving revision 1.3 diff -u -r1.3 pkg-plist --- pkg-plist 25 Jul 2005 04:47:03 -0000 1.3 +++ pkg-plist 9 Jun 2006 08:46:38 -0000 @@ -1,8 +1,11 @@ +@unexec %D/etc/rc.d/dhcp6s.sh forcestop 2>/dev/null || true +@unexec %D/etc/rc.d/dhcp6relay.sh forcestop 2>/dev/null || true +@unexec %D/etc/rc.d/dhcp6c.sh forcestop 2>/dev/null || true +@unexec %D/etc/rc.d/dhcp6s forcestop 2>/dev/null || true +@unexec %D/etc/rc.d/dhcp6relay forcestop 2>/dev/null || true +@unexec %D/etc/rc.d/dhcp6c forcestop 2>/dev/null || true etc/dhcp6s.conf.sample etc/dhcp6c.conf.sample -etc/rc.d/dhcp6c.sh -etc/rc.d/dhcp6relay.sh -etc/rc.d/dhcp6s.sh sbin/dhcp6c sbin/dhcp6relay sbin/dhcp6s Index: files/dhcp6c.sh =================================================================== RCS file: files/dhcp6c.sh diff -N files/dhcp6c.sh --- files/dhcp6c.sh 20 Feb 2006 20:47:22 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,36 +0,0 @@ -#!/bin/sh -# -# $FreeBSD: ports/net/dhcp6/files/dhcp6c.sh,v 1.2 2006/02/20 20:47:22 dougb Exp $ -# - -# PROVIDE: dhcp6c -# REQUIRE: DAEMON -# BEFORE: LOGIN -# KEYWORD: shutdown -# -# NOTE for FreeBSD 5.0+: -# If you want this script to start with the base rc scripts -# move dhcp6c.sh to /etc/rc.d/dhcp6c - -prefix=%%PREFIX%% - -# Define these dhcp6c_* variables in one of these files: -# /etc/rc.conf -# /etc/rc.conf.local -# /etc/rc.conf.d/dhcp6c -# -# DO NOT CHANGE THESE DEFAULT VALUES HERE -# -dhcp6c_enable=${dhcp6c_enable:-"NO"} # Enable dhcp6c -#dhcp6c_program="${prefix}/sbin/${name}" # Location of dhcp6c -#dhcp6c_flags="fxp0" # Flags to dhcp6c program - -. %%RC_SUBR%% - -name="dhcp6c" -rcvar=`set_rcvar` -command="${prefix}/sbin/${name}" -required_files="${prefix}/etc/${name}.conf" - -load_rc_config $name -run_rc_command "$1" Index: files/dhcp6c.sh.in =================================================================== RCS file: files/dhcp6c.sh.in diff -N files/dhcp6c.sh.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/dhcp6c.sh.in 9 Jun 2006 08:46:38 -0000 @@ -0,0 +1,53 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: dhcp6c +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: shutdown + +# Add the following lines to +# /etc/rc.conf.d/dhcp6c /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# dhcp6c_enable (bool): Set to NO by default. +# Set it to YES to enable dhcp6c. +# dhcp6c_config (path): Set to %%PREFIX%%/etc/dhcp6c.conf +# by default. +# dhcp6c_pidfile (path): Set to /var/run/dhcp6c.pid +# by default. +# dhcp6c_interfaces (NIC list): Not defined by default. +# Set it to the network interface(s) where dhcp6c should work on. +# dhcp6c_flags (additional arguments): Not defined by default. +# + +. %%RC_SUBR%% + +name="dhcp6c" +rcvar=${name}_enable + +prefix="%%PREFIX%%" +command="${prefix}/sbin/${name}" +start_precmd="${name}_precmd" + +load_rc_config $name + +: ${dhcp6c_enable="NO"} +: ${dhcp6c_config="${prefix}/etc/${name}.conf"} +: ${dhcp6c_pidfile="/var/run/${name}.pid"} + +required_files="${dhcp6c_config}" +pidfile="${dhcp6c_pidfile}" +command_args="-c ${dhcp6c_config} -p ${dhcp6c_pidfile} ${dhcp6c_flags} ${dhcp6c_interfaces}" + +dhcp6c_precmd() +{ + if [ -z ${dhcp6c_interfaces} ]; then + warn "dhcp6c_interfaces is not set." + return 1 + fi +} + +run_rc_command "$1" Index: files/dhcp6relay.sh =================================================================== RCS file: files/dhcp6relay.sh diff -N files/dhcp6relay.sh --- files/dhcp6relay.sh 20 Feb 2006 20:47:22 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,35 +0,0 @@ -#!/bin/sh -# -# $FreeBSD: ports/net/dhcp6/files/dhcp6relay.sh,v 1.2 2006/02/20 20:47:22 dougb Exp $ -# - -# PROVIDE: dhcp6relay -# REQUIRE: DAEMON -# BEFORE: LOGIN -# KEYWORD: shutdown -# -# NOTE for FreeBSD 5.0+: -# If you want this script to start with the base rc scripts -# move dhcp6relay.sh to /etc/rc.d/dhcp6relay - -prefix=%%PREFIX%% - -# Define these dhcp6relay_* variables in one of these files: -# /etc/rc.conf -# /etc/rc.conf.local -# /etc/rc.conf.d/dhcp6relay -# -# DO NOT CHANGE THESE DEFAULT VALUES HERE -# -dhcp6relay_enable=${dhcp6relay_enable:-"NO"} # Enable dhcp6relay -#dhcp6relay_program="${prefix}/sbin/${name}" # Location of dhcp6relay -#dhcp6relay_flags="-r fxp1 fxp0" # Flags to dhcp6relay program - -. %%RC_SUBR%% - -name="dhcp6relay" -rcvar=`set_rcvar` -command="${prefix}/sbin/${name}" - -load_rc_config $name -run_rc_command "$1" Index: files/dhcp6relay.sh.in =================================================================== RCS file: files/dhcp6relay.sh.in diff -N files/dhcp6relay.sh.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/dhcp6relay.sh.in 9 Jun 2006 08:46:38 -0000 @@ -0,0 +1,46 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: dhcp6relay +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: shutdown + +# Add the following lines to +# /etc/rc.conf.d/dhcp6relay /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# dhcp6relay_enable (bool): Set to NO by default. +# Set it to YES to enable dhcp6relay. +# dhcp6relay_interfaces (NIC list): Not defined by default. +# Set it to the network interface(s) where dhcp6relay should work +# on. +# dhcp6relay_flags (additional arguments): Not defined by default. +# + +. %%RC_SUBR%% + +name="dhcp6relay" +rcvar=${name}_enable + +prefix=%%PREFIX%% +command=${prefix}/sbin/${name} +start_precmd="${name}_precmd" + +load_rc_config $name + +: ${dhcp6relay_enable="NO"} + +command_args="${dhcp6relay_flags} ${dhcp6relay_interfaces}" + +dhcp6relay_precmd() +{ + if [ -z ${dhcp6relay_interfaces} ]; then + warn "dhcp6relay_interfaces is not set." + return 1 + fi +} + +run_rc_command "$1" Index: files/dhcp6s.sh =================================================================== RCS file: files/dhcp6s.sh diff -N files/dhcp6s.sh --- files/dhcp6s.sh 20 Feb 2006 20:47:22 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,36 +0,0 @@ -#!/bin/sh -# -# $FreeBSD: ports/net/dhcp6/files/dhcp6s.sh,v 1.2 2006/02/20 20:47:22 dougb Exp $ -# - -# PROVIDE: dhcp6s -# REQUIRE: DAEMON -# BEFORE: LOGIN -# KEYWORD: shutdown -# -# NOTE for FreeBSD 5.0+: -# If you want this script to start with the base rc scripts -# move dhcp6s.sh to /etc/rc.d/dhcp6s - -prefix=%%PREFIX%% - -# Define these dhcp6s_* variables in one of these files: -# /etc/rc.conf -# /etc/rc.conf.local -# /etc/rc.conf.d/dhcp6s -# -# DO NOT CHANGE THESE DEFAULT VALUES HERE -# -dhcp6s_enable=${dhcp6s_enable:-"NO"} # Enable dhcp6s -#dhcp6s_program="${prefix}/sbin/${name}" # Location of dhcp6s -#dhcp6s_flags="fxp0" # Flags to dhcp6s program - -. %%RC_SUBR%% - -name="dhcp6s" -rcvar=`set_rcvar` -command="${prefix}/sbin/${name}" -required_files="${prefix}/etc/${name}.conf" - -load_rc_config $name -run_rc_command "$1" Index: files/dhcp6s.sh.in =================================================================== RCS file: files/dhcp6s.sh.in diff -N files/dhcp6s.sh.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/dhcp6s.sh.in 9 Jun 2006 08:46:38 -0000 @@ -0,0 +1,49 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: dhcp6s +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: shutdown + +# Add the following lines to +# /etc/rc.conf.d/dhcp6s /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# dhcp6s_enable (bool): Set to NO by default. +# Set it to YES to enable dhcp6s. +# dhcp6s_config (path): Set to %%PREFIX%%/etc/dhcp6s.conf +# by default. +# dhcp6s_interface (NIC): Not defined by default. +# Set it to the network interface where dhcp6s should work on. +# dhcp6s_flags (additional arguments): Not defined by default. +# + +. %%RC_SUBR%% + +name="dhcp6s" +rcvar=${name}_enable + +prefix=%%PREFIX%% +command=${prefix}/sbin/${name} +start_precmd="${name}_precmd" + +load_rc_config $name + +: ${dhcp6s_enable="NO"} +: ${dhcp6s_config="${prefix}/etc/${name}.conf"} + +required_files=${dhcp6s_config} +command_args="-c ${dhcp6s_config} ${dhcp6s_flags} ${dhcp6s_interface}" + +dhcp6s_precmd() +{ + if [ -z ${dhcp6s_interface} ]; then + warn "dhcp6s_interface is not set." + return 1 + fi +} + +run_rc_command "$1" Index: files/patch-lease.c =================================================================== RCS file: files/patch-lease.c diff -N files/patch-lease.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-lease.c 9 Jun 2006 08:46:38 -0000 @@ -0,0 +1,28 @@ +--- lease.c.orig Thu Jan 26 07:48:28 2006 ++++ lease.c Thu Jun 8 22:05:22 2006 +@@ -33,6 +33,16 @@ + #include + #include + #include ++#if TIME_WITH_SYS_TIME ++# include ++# include ++#else ++# if HAVE_SYS_TIME_H ++# include ++# else ++# include ++# endif ++#endif + #include + #include "dhcp6.h" + #include "config.h" +@@ -45,7 +55,7 @@ + + struct hash_entry { + LIST_ENTRY(hash_entry) list; +- char val[]; ++ char *val; + }; + + LIST_HEAD(hash_head, hash_entry); --- net_dhcp6.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: