From nobody@FreeBSD.org  Fri Feb 12 03:02:56 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 28454106566C
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 12 Feb 2010 03:02:56 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 1811D8FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 12 Feb 2010 03:02:56 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o1C32t8m082339
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 12 Feb 2010 03:02:55 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o1C32tnr082321;
	Fri, 12 Feb 2010 03:02:55 GMT
	(envelope-from nobody)
Message-Id: <201002120302.o1C32tnr082321@www.freebsd.org>
Date: Fri, 12 Feb 2010 03:02:55 GMT
From: Garrett Cooper <yaneurabeya@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Fix conditional inclusion for sbin/atm/atmconfig
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         143830
>Category:       bin
>Synopsis:       [patch] atmconfig(8): Fix conditional inclusion for sbin/atm/atmconfig
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 12 03:10:01 UTC 2010
>Closed-Date:    
>Last-Modified:  Sun Feb 03 22:28:00 UTC 2013
>Originator:     Garrett Cooper
>Release:        RELENG_8
>Organization:
Cisco Systems, Inc
>Environment:
FreeBSD garrcoop-fbsd.cisco.com 8.0-STABLE FreeBSD 8.0-STABLE #2: Wed Feb  3 16:57:07 PST 2010     garrcoop@garrcoop-fbsd.cisco.com:/usr/obj/usr/src/sys/LAPPY_X86  i386
>Description:
bsnmp is a requirement for atmconfig even though it's not spelled out as such in bsd.own.mk, so make release (or make -C sbin/atm) fails if WITHOUT_BSNMP=yes is specified, like the following:

===> sbin/atm/atmconfig (depend)
cat /usr/src/sbin/atm/atmconfig/../../../contrib/ngatm/snmp_atm/atm_tree.def	 /usr/src/sbin/atm/atmconfig/../../../usr.sbin/bsnmpd/modules/snmp_atm/atm_freebsd.def | gensnmptree -e `tail -n +2 /usr/src/sbin/atm/atmconfig/atm_oid.list`  > /usr/obj/usr/src/sbin/atm/atmconfig/oid.h
gensnmptree: not found

I could not properly determine how to remove the subdirectory from the make operation as I'm just getting used to the Makefile infrastructure.
>How-To-Repeat:
(cd release; make release WITHOUT_BSNMP=yes)
>Fix:
Invoke with `WITHOUT_ATM=no WITHOUT_BSNMP=no' or `WITH_ATM=yes WITH_BSNMP=yes'.

Patch attached with submission follows:

Index: sbin/atm/atmconfig/Makefile
===================================================================
RCS file: /usr/local/cvsroot/freebsd/src/sbin/atm/atmconfig/Makefile,v
retrieving revision 1.9
diff -u -r1.9 Makefile
--- sbin/atm/atmconfig/Makefile	19 Oct 2009 16:00:24 -0000	1.9
+++ sbin/atm/atmconfig/Makefile	12 Feb 2010 02:59:55 -0000
@@ -5,6 +5,10 @@
 #
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
+.if ${MK_ATM} != "no"
+
 PROG=	atmconfig
 .ifndef RESCUE
 SRCS=	${.OBJDIR}/oid.h
@@ -40,5 +44,7 @@
 ${.OBJDIR}/oid.h: atm_oid.list ${SNMP_ATM_DEF}
 	cat ${SNMP_ATM_DEF} | gensnmptree -e `tail -n +2 ${.CURDIR}/atm_oid.list` \
 		> ${.OBJDIR}/oid.h
+
+.endif
 
 .include <bsd.prog.mk>


>Release-Note:
>Audit-Trail:

From: Garrett Cooper <yaneurabeya@gmail.com>
To: bug-followup@FreeBSD.org, gcooper@FreeBSD.org
Cc:  
Subject: Re: bin/143830: [patch] atmconfig(8): Fix conditional inclusion for 
	sbin/atm/atmconfig
Date: Fri, 12 Feb 2010 11:44:06 -0800

 This doesn't appear to be the magic silver bullet that solves the
 problem because crud still gets hung up on this error with make
 release.
 
 Trying again with a clean tree...
 
 -Garrett

From: Alexander Best <arundel@freebsd.org>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: bin/143830: [patch] atmconfig(8): Fix conditional inclusion for sbin/atm/atmconfig
Date: Fri, 31 Dec 2010 15:36:53 +0000

 any update on this issue? just ran into it and had to install gensnmptree
 manually in order for target buildworld to succeed.
 
 cheers.
 alex
 
 -- 
 a13x

From: Garrett Cooper <yaneurabeya@gmail.com>
To: bug-followup@FreeBSD.org, gcooper@FreeBSD.org
Cc:  
Subject: Re: bin/143830: [patch] atmconfig(8): Fix conditional inclusion for sbin/atm/atmconfig
Date: Wed, 12 Oct 2011 14:52:01 -0700

 Funny... hit the same problem again almost a year later in a different
 portion of the tree:
 
 gensnmptree -e snmpMIB begemotSnmpdModuleTable begemotSnmpd
 begemotTrapSinkTable  sysUpTime snmpTrapOID coldStart
 authenticationFailure  begemotSnmpdTransUdp begemotSnmpdTransLsock
 begemotSnmpdLocalPortTable  freeBSDVersion <
 /build/home/gcooper/ix-projects/freenas/ix/FreeBSD/src/usr.sbin/bsnmpd/bsnmpd/../../../contrib/bsnmp/snmpd/tree.def
 > oid.h
 gensnmptree: not found
 gensnmptree: not found
 *** Error code 127
 *** Error code 127
 2 errors
 *** Error code 2
 1 error
 *** Error code 2
 1 error
 *** Error code 2
 
 No, I hadn't made any progress on this.
 
 The issue has unrooted itself on a freshly installed system without
 bsnmpd support installed (the build image needs bsnmp support though),
 so I think that it's safe to say that the problem really lies in the
 fact that gensnmptree isn't treated properly like a tool and needs to
 be shoved down into src/Makefile.inc1 .
 
 I'll work on whipping up a patch for this sometime this weekend.
 Thanks,
 -Garrett

From: Garrett Cooper <yaneurabeya@gmail.com>
To: Garrett Cooper <yaneurabeya@gmail.com>
Cc: bug-followup@freebsd.org, gcooper@freebsd.org
Subject: Re: bin/143830: [patch] atmconfig(8): Fix conditional inclusion for
 sbin/atm/atmconfig
Date: Wed, 12 Oct 2011 16:15:30 -0700 (PDT)

   This message is in MIME format.  The first part should be readable text,
   while the remaining parts are likely unreadable without MIME-aware tools.
 
 --967339439-788255950-1318461338=:11533
 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
 
 On Wed, 12 Oct 2011, Garrett Cooper wrote:
 
 > Funny... hit the same problem again almost a year later in a different
 > portion of the tree:
 >
 > gensnmptree -e snmpMIB begemotSnmpdModuleTable begemotSnmpd
 > begemotTrapSinkTable  sysUpTime snmpTrapOID coldStart
 > authenticationFailure  begemotSnmpdTransUdp begemotSnmpdTransLsock
 > begemotSnmpdLocalPortTable  freeBSDVersion <
 > /build/home/gcooper/ix-projects/freenas/ix/FreeBSD/src/usr.sbin/bsnmpd/bsnmpd/../../../contrib/bsnmp/snmpd/tree.def
 >> oid.h
 > gensnmptree: not found
 > gensnmptree: not found
 > *** Error code 127
 > *** Error code 127
 > 2 errors
 > *** Error code 2
 > 1 error
 > *** Error code 2
 > 1 error
 > *** Error code 2
 >
 > No, I hadn't made any progress on this.
 >
 > The issue has unrooted itself on a freshly installed system without
 > bsnmpd support installed (the build image needs bsnmp support though),
 > so I think that it's safe to say that the problem really lies in the
 > fact that gensnmptree isn't treated properly like a tool and needs to
 > be shoved down into src/Makefile.inc1 .
 >
 > I'll work on whipping up a patch for this sometime this weekend.
 
 This should actually do it.
 -Garrett
 --967339439-788255950-1318461338=:11533
 Content-Type: TEXT/PLAIN; charset=US-ASCII; name=add-missing-WITHOUT_BSNMP-logic.patch
 Content-Transfer-Encoding: BASE64
 Content-ID: <alpine.BSF.2.00.1110121615300.11533@toaster.local>
 Content-Description: 
 Content-Disposition: attachment; filename=add-missing-WITHOUT_BSNMP-log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