From rea-fbsd@codelabs.ru  Fri Aug 31 13:24:55 2007
Return-Path: <rea-fbsd@codelabs.ru>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 828A016A419
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 31 Aug 2007 13:24:55 +0000 (UTC)
	(envelope-from rea-fbsd@codelabs.ru)
Received: from pobox.codelabs.ru (pobox.codelabs.ru [144.206.177.45])
	by mx1.freebsd.org (Postfix) with ESMTP id 3299B13C461
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 31 Aug 2007 13:24:54 +0000 (UTC)
	(envelope-from rea-fbsd@codelabs.ru)
Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25])
	by pobox.codelabs.ru with esmtps (TLSv1:CAMELLIA256-SHA:256)
	id 1IR6GR-000ArR-9u; Fri, 31 Aug 2007 17:10:19 +0400
Message-Id: <20070831131018.E20811AF41E@void.codelabs.ru>
Date: Fri, 31 Aug 2007 17:10:18 +0400 (MSD)
From: Eygene Ryabinkin <rea-fbsd@codelabs.ru>
Reply-To: Eygene Ryabinkin <rea-fbsd@codelabs.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Joerg.Pulz@frm2.tum.de
Subject: enable chrooted dhcpd on the FreeBSD 7.x
X-Send-Pr-Version: 3.113
X-GNATS-Notify: Joerg.Pulz@frm2.tum.de

>Number:         115967
>Category:       ports
>Synopsis:       enable chrooted net/isc-dhcp3-server on the FreeBSD 7.x
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    tmclaugh
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 31 13:30:01 GMT 2007
>Closed-Date:    Tue Dec 04 05:39:08 UTC 2007
>Last-Modified:  Tue Dec 04 05:39:08 UTC 2007
>Originator:     Eygene Ryabinkin
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
Code Labs
>Environment:
System: FreeBSD XXX 7.0-CURRENT FreeBSD 7.0-CURRENT #9: Wed Aug 8 10:56:57 MSD 2007 root@XXX:/usr/src/sys/i386/compile/XXX i386

>Description:

rc.d script for the ISC dhcpd tries to locate the mount_devfs
executable and disables the creation of the device filesystem
at the chroot directory if the binary was not found.

The reason of the error is that mount_devfs was removed from
FreeBSD 7: see src/sbin/Makefile, rev. 1.164.

>How-To-Repeat:

Install FreeBSD 7, isc-dhcpd3 and try to run the daemon.  It will
warn you that 'dhcpd_devfs_enable disabled -- not available' and
dhcpd will not start because it won't see any bpf devices.

>Fix:

Check for the FreeBSD version and do not look for mount_devfs on
7-CURRENT and later.  The following patch implements a quick check
for the first symbol of the 'uname -r'.  It might be possible to
implement more fine-grained check to catch early 7-CURRENT versions
that had mount_devfs inside, but I doubt that it worth the effort.

--- files/isc-dhcpd.in.orig	2007-08-31 16:57:04.000000000 +0400
+++ files/isc-dhcpd.in	2007-08-31 16:58:15.000000000 +0400
@@ -354,12 +354,15 @@
 				err 1 "dhcpd_devfs_enable and dhcpd_makedev_enable" \
 				      "are mutually exclusive. enable only one!"
 			fi
+			# mount_devfs disappeared in FreeBSD 7.
+			if test `uname -r | cut -c 1` -le 6; then
 			if checkyesno dhcpd_devfs_enable &&
 			   ! ( type mount_devfs ) > /dev/null 2>&1; then
 				warn "dhcpd_devfs_enable disabled" \
 				     "-- not available"
 				dhcpd_devfs_enable=NO
 			fi
+			fi
 			if checkyesno dhcpd_makedev_enable &&
 			   ! [ -x ${__dhcpd_devdir}/MAKEDEV ]; then
 				warn "dhcpd_makedev_enable disabled" \
>Release-Note:
>Audit-Trail:

From: Eygene Ryabinkin <rea-fbsd@codelabs.ru>
To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-ports-bugs@FreeBSD.org
Cc:  
Subject: Re: ports/115967: enable chrooted dhcpd on the FreeBSD 7.x
Date: Fri, 31 Aug 2007 18:24:54 +0400

 Patch was not recognised as the patch by the Web interface, so
 I am quoting it properly.
 --- isc-dhcpd.in.patch begins here ---
 --- files/isc-dhcpd.in.orig	2007-08-31 16:57:04.000000000 +0400
 +++ files/isc-dhcpd.in	2007-08-31 16:58:15.000000000 +0400
 @@ -354,12 +354,15 @@
  				err 1 "dhcpd_devfs_enable and dhcpd_makedev_enable" \
  				      "are mutually exclusive. enable only one!"
  			fi
 +			# mount_devfs disappeared in FreeBSD 7.
 +			if test `uname -r | cut -c 1` -le 6; then
  			if checkyesno dhcpd_devfs_enable &&
  			   ! ( type mount_devfs ) > /dev/null 2>&1; then
  				warn "dhcpd_devfs_enable disabled" \
  				     "-- not available"
  				dhcpd_devfs_enable=NO
  			fi
 +			fi
  			if checkyesno dhcpd_makedev_enable &&
  			   ! [ -x ${__dhcpd_devdir}/MAKEDEV ]; then
  				warn "dhcpd_makedev_enable disabled" \
 --- isc-dhcpd.in.patch ends here ---
 -- 
 Eygene
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Sat Sep 1 06:16:10 UTC 2007 
State-Changed-Why:  
Awaiting maintainers feedback 

http://www.freebsd.org/cgi/query-pr.cgi?pr=115967 

From: Sergey Matveychuk <sem@FreeBSD.org>
To: bug-followup@FreeBSD.org,  rea-fbsd@codelabs.ru
Cc:  
Subject: Re: ports/115967: enable chrooted net/isc-dhcp3-server on the FreeBSD
 7.x
Date: Wed, 05 Sep 2007 19:11:42 +0400

 2committer, who will commit it: fix an indentation in if..fi block.
 
 -- 
 Dixi.
 Sem.

From: Eygene Ryabinkin <rea-fbsd@codelabs.ru>
To: freebsd-ports-bugs@FreeBSD.org
Cc: edwin@FreeBSD.org, sem@freebsd.org, Joerg.Pulz@frm2.tum.de
Subject: Re: ports/115967: enable chrooted net/isc-dhcp3-server on the FreeBSD 7.x
Date: Tue, 18 Sep 2007 10:08:35 +0400

 Good day.
 
 Per note of Sergey Matveichuk, I am attaching the properly idented
 version of the patch for the rc.d script.
 
 --- isc-dhcpd.in.patch begins here ---
 --- isc-dhcpd.in.orig	2007-09-18 09:53:53.000000000 +0400
 +++ isc-dhcpd.in	2007-09-18 09:54:41.000000000 +0400
 @@ -354,11 +354,14 @@
  				err 1 "dhcpd_devfs_enable and dhcpd_makedev_enable" \
  				      "are mutually exclusive. enable only one!"
  			fi
 -			if checkyesno dhcpd_devfs_enable &&
 -			   ! ( type mount_devfs ) > /dev/null 2>&1; then
 -				warn "dhcpd_devfs_enable disabled" \
 -				     "-- not available"
 -				dhcpd_devfs_enable=NO
 +			if test `uname -r | cut -c 1` -le 6; then
 +				if checkyesno dhcpd_devfs_enable &&
 +				   ! ( type mount_devfs ) > /dev/null 2>&1;
 +				then
 +					warn "dhcpd_devfs_enable disabled" \
 +					     "-- not available"
 +					dhcpd_devfs_enable=NO
 +				fi
  			fi
  			if checkyesno dhcpd_makedev_enable &&
  			   ! [ -x ${__dhcpd_devdir}/MAKEDEV ]; then
 --- isc-dhcpd.in.patch ends here ---
 
 Please, treat this as a gentle reminder ;)) for the maintainer that
 this problem exists and it will be great to fix it before 7.0,
 because some people running ISC DHCPD can move there and find that
 the (almost) default configuration of dhcpd does no work anymore.
 -- 
 Eygene
 

From: Eygene Ryabinkin <rea-fbsd@codelabs.ru>
To: bug-followup@freebsd.org
Cc: freebsd-ports-bugs@FreeBSD.org, edwin@FreeBSD.org,
	Sergey Matveychuk <sem@FreeBSD.org>,
	Joerg Pulz <Joerg.Pulz@frm2.tum.de>
Subject: Re: ports/115967: enable chrooted net/isc-dhcp3-server on the FreeBSD 7.x
Date: Mon, 24 Sep 2007 09:06:23 +0400

 Tue, Sep 18, 2007 at 10:42:20AM +0200, Joerg Pulz wrote:
 > Would you please submit the refined version of the patch as follow-up to the 
 > original PR, i will then approve it ASAP.
 
 Trying to submit the patch as the follow-up.  Doing it for the first
 time in my life, so there can be errors ;))
 
 --- isc-dhcpd.in.patch begins here ---
 --- isc-dhcpd.in.orig	2007-09-18 09:53:53.000000000 +0400
 +++ isc-dhcpd.in	2007-09-18 09:54:41.000000000 +0400
 @@ -354,11 +354,14 @@
  				err 1 "dhcpd_devfs_enable and dhcpd_makedev_enable" \
  				      "are mutually exclusive. enable only one!"
  			fi
 -			if checkyesno dhcpd_devfs_enable &&
 -			   ! ( type mount_devfs ) > /dev/null 2>&1; then
 -				warn "dhcpd_devfs_enable disabled" \
 -				     "-- not available"
 -				dhcpd_devfs_enable=NO
 +			if test `uname -r | cut -c 1` -le 6; then
 +				if checkyesno dhcpd_devfs_enable &&
 +				   ! ( type mount_devfs ) > /dev/null 2>&1;
 +				then
 +					warn "dhcpd_devfs_enable disabled" \
 +					     "-- not available"
 +					dhcpd_devfs_enable=NO
 +				fi
  			fi
  			if checkyesno dhcpd_makedev_enable &&
  			   ! [ -x ${__dhcpd_devdir}/MAKEDEV ]; then
 --- isc-dhcpd.in.patch ends here ---

From: Joerg Pulz <Joerg.Pulz@frm2.tum.de>
To: bug-followup@FreeBSD.org, rea-fbsd@codelabs.ru
Cc:  
Subject: Re: ports/115967: enable chrooted net/isc-dhcp3-server on the FreeBSD
 7.x
Date: Mon, 15 Oct 2007 14:02:50 +0200 (CEST)

 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
 
 Hi,
 
 sorry for the long delay, but real life is eating my time.
 
 To make it really short: Approved!
 
 Kind regards and special thanks to Eygene
 
 Joerg
 
 - -- 
 The beginning is the most important part of the work.
  				-Plato
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.4 (FreeBSD)
 
 iD8DBQFHE1btSPOsGF+KA+MRAjTXAJ9b5agucF71EqyLcmUPz8A8+dT9NgCgrS/h
 JpwuoLHtv3cDCzHz5WDz3lM=
 =K4TE
 -----END PGP SIGNATURE-----
Responsible-Changed-From-To: freebsd-ports-bugs->tmclaugh 
Responsible-Changed-By: tmclaugh 
Responsible-Changed-When: Mon Nov 5 17:58:39 UTC 2007 
Responsible-Changed-Why:  
Grab 

http://www.freebsd.org/cgi/query-pr.cgi?pr=115967 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/115967: commit references a PR
Date: Tue,  4 Dec 2007 01:28:49 +0000 (UTC)

 tmclaugh    2007-12-04 01:28:43 UTC
 
   FreeBSD ports repository
 
   Modified files:
     net/isc-dhcp3-server Makefile 
     net/isc-dhcp3-server/files isc-dhcpd.in 
   Log:
   Fix dhcpd_devfs_enable on 7.x and later.
   
   PR:             115967
   Submitted by:   Eygene Ryabinkin
   Approved by:    portmgr (linimon, pav), maintainer
   
   Revision  Changes    Path
   1.122     +1 -0      ports/net/isc-dhcp3-server/Makefile
   1.3       +9 -6      ports/net/isc-dhcp3-server/files/isc-dhcpd.in
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: feedback->closed 
State-Changed-By: tmclaugh 
State-Changed-When: Tue Dec 4 05:38:34 UTC 2007 
State-Changed-Why:  
Fix committed 

http://www.freebsd.org/cgi/query-pr.cgi?pr=115967 
>Unformatted:
