Subject: pkg/7322: ucd-snmp-3.6 has been withdrawn -- patch to upgrade pkg to 3.6.1 (pkg improvements also included)
To: None <gnats-bugs@gnats.netbsd.org>
From: None <woods@mail.weird.com>
List: netbsd-bugs
Date: 04/04/1999 17:45:31
>Number:         7322
>Category:       pkg
>Synopsis:       ucd-snmp-3.6 has been withdrawn -- patch to upgrade pkg to 3.6.1 (pkg improvements also included)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Apr  4 14:50:00 1999
>Last-Modified:
>Originator:     Greg A. Woods
>Organization:
Planix, Inc.; Toronto, Ontario; Canada
>Release:        pkgsrc-current sup Sun Apr  4 09:16:33 EDT 1999
>Environment:

	NetBSD  1.3.3 and 1.3K

>Description:

	It seems ucd-snmp-3.6 has been withdrawn and been replaced by
	the bug-fix release 3.6.1.

	The pkg configuration does not make use of NetBSD's integrated
	tcp_wrappers support (even though doing so currently requires a
	silly hack because of NetBSD's somewhat broken linker).

	The existing pkg patch incorrectly patches the configure script
	instead of configure.in.

	The pkg install does things in the Makefile that should only be
	done in an INSTALL script in order to facilitate correct
	installation and removal in binary-only environments.

	The FTP daemon on ftp.win.or.jp is not compatible with NetBSD's
	fetch method (it requires full "user@domain" for anon password)
	and so should be removed from the list of mirror sites.

	The pkg MESSAGE file doesn't include the maintainer's request
	for postcards from users.

>How-To-Repeat:

	try fetching ucd-snmp-3.6 from ucdavis.

>Fix:

	apply the following patch in /usr/pkgsrc/net/ucd-snmp

Index: Makefile
===================================================================
RCS file: /cvs/NetBSD/pkgsrc/net/ucd-snmp/Makefile,v
retrieving revision 1.1.1.5
diff -c -c -r1.1.1.5 Makefile
*** Makefile	1999/03/29 17:43:56	1.1.1.5
--- Makefile	1999/04/04 20:57:54
***************
*** 2,34 ****
  # FreeBSD Id: Makefile,v 1.18 1998/04/06 20:50:31 andreas Exp
  #
  
! DISTNAME=	ucd-snmp-3.6
  CATEGORIES=	net
  MASTER_SITES= 	ftp://ucd-snmp.ucdavis.edu/ \
! 		ftp://sunsite.cnlab-switch.ch/mirror/ucd-snmp/ \
! 		ftp://ftp.win.or.jp/pub/network/snmp/ucd-snmp/
  
  MAINTAINER=	packages@netbsd.org
  HOMEPAGE=	http://www.ece.ucdavis.edu/ucd-snmp/
  
  GNU_CONFIGURE=	yes
! CONFIGURE_ARGS=	--with-defaults
  
! BIN=		snmpbulkwalk snmpget snmpgetnext snmpnetstat snmpset \
! 		snmpstatus snmptest snmptranslate snmptrap snmpwalk
! SBIN=		snmpd snmptrapd
  
  post-install:
- 	( cd ${PREFIX}/bin; strip ${BIN} )
- 	( cd ${PREFIX}/sbin; strip ${SBIN} )
  	@${MKDIR} ${PREFIX}/share/examples/ucd-snmp
  	@for F in ${WRKSRC}/etc/* ; do \
! 		${INSTALL_DATA} $$F ${PREFIX}/share/examples/ucd-snmp ; done
! 	@if [ ! -f ${PREFIX}/etc/rc.d/snmpd.sh ]; then \
! 		${ECHO} "Creating ${PREFIX}/etc/rc.d/snmpd.sh startup file."; \
! 		${ECHO} "#!/bin/sh" > ${PREFIX}/etc/rc.d/snmpd.sh; \
! 		${ECHO} "[ -x ${PREFIX}/sbin/snmpd ] && ${PREFIX}/sbin/snmpd && ${ECHO} -n ' snmpd'" >> ${PREFIX}/etc/rc.d/snmpd.sh; \
! 		chmod 751 ${PREFIX}/etc/rc.d/snmpd.sh; \
! 	 fi
  
  .include "../../mk/bsd.pkg.mk"
--- 2,55 ----
  # FreeBSD Id: Makefile,v 1.18 1998/04/06 20:50:31 andreas Exp
  #
  
! DISTNAME=	ucd-snmp-3.6.1
  CATEGORIES=	net
  MASTER_SITES= 	ftp://ucd-snmp.ucdavis.edu/ \
! 		ftp://sunsite.cnlab-switch.ch/mirror/ucd-snmp/
  
  MAINTAINER=	packages@netbsd.org
  HOMEPAGE=	http://www.ece.ucdavis.edu/ucd-snmp/
  
+ BUILD_DEPENDS+=	autoconf:../../devel/autoconf
+ 
  GNU_CONFIGURE=	yes
! CONFIGURE_ARGS+= --with-defaults
! CONFIGURE_ARGS+= --with-libwrap
! # note the default appends a redundant and silly ".log"
! CONFIGURE_ARGS+= --with-logfile="/var/log/snmpd"
! # this might make it easier to use scotty's mibs, and local ones too
! CONFIGURE_ARGS+= --with-mibdirs="${PREFIX}/share/snmp/mibs:${PREFIX}/lib/tnm2.1.8/mibs:/usr/local/share/snmp/mibs"
! 
! # pass down PKG_PREFIX to simulate pkg_add's environment
! MAKE_ENV+=	PKG_PREFIX="${PREFIX}"
! 
! .include "../../mk/bsd.prefs.mk"
! 
! # XXX This most horrible hack is necessary because of the stupid linker's
! # insistence on requiring that all externals referenced from a shared library
! # be defined, even if nothing elese from the library is ever used.  In this
! # case the libwrap.so library is at fault as it references 'deny_severity' and
! # 'allow_severity', but none of the configure tests will include this, nor
! # indeed will any product binary except for snmpd (which is the only one that
! # actualy uses tcp_wrappers).
! #
! # /usr/libexec/ld.so: Undefined symbol "_deny_severity" in conftest:/usr/lib/libwrap.so.0.0
! #
! CFLAGS+=	-static
! 
! pre-configure:
! 	(cd ${WRKSRC}; autoreconf --force)
  
! # Need to run INSTALL script as this doesn't happen automagically from pkgsrc.
! pre-install:
! 	@${SETENV} ${MAKE_ENV} ${SHELL} ${INSTALL_FILE} ${PKGNAME} PRE-INSTALL
  
+ # Need to run INSTALL script as this doesn't happen automagically from pkgsrc.
  post-install:
  	@${MKDIR} ${PREFIX}/share/examples/ucd-snmp
  	@for F in ${WRKSRC}/etc/* ; do \
! 		${INSTALL_DATA} $$F ${PREFIX}/share/examples/ucd-snmp ; \
! 	done
! 	@${SETENV} ${MAKE_ENV} ${SHELL} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
  
  .include "../../mk/bsd.pkg.mk"
Index: files/md5
===================================================================
RCS file: /cvs/NetBSD/pkgsrc/net/ucd-snmp/files/md5,v
retrieving revision 1.1.1.4
diff -c -c -r1.1.1.4 md5
*** files/md5	1999/03/29 17:43:57	1.1.1.4
--- files/md5	1999/04/04 18:49:40
***************
*** 1,3 ****
! $NetBSD: md5,v 1.5 1999/03/07 04:02:06 hubertf Exp $
  
! MD5 (ucd-snmp-3.6.tar.gz) = 3be64678ece8add138182d29c9432572
--- 1,3 ----
! $NetBSD$
  
! MD5 (ucd-snmp-3.6.1.tar.gz) = 4ebb94d59c086cef4dbb27396f9b77cb
Index: patches/patch-aa
===================================================================
RCS file: /cvs/NetBSD/pkgsrc/net/ucd-snmp/patches/patch-aa,v
retrieving revision 1.1.1.2
diff -c -c -r1.1.1.2 patch-aa
*** patches/patch-aa	1998/09/01 18:52:16	1.1.1.2
--- patches/patch-aa	1999/04/04 20:42:47
***************
*** 1,20 ****
! $NetBSD: patch-aa,v 1.3 1998/08/07 11:11:02 agc Exp $
! 
! --- configure-orig	Fri Jun 19 22:14:25 1998
! +++ configure	Mon Aug  3 16:44:56 1998
! @@ -4599,11 +4599,11 @@
!  #include "confdefs.h"
!  
!  #include <sys/types.h>
! -#define KERNEL
! -#define _KERNEL
! +/* #define KERNEL
! +#define _KERNEL */
!  #include <sys/socket.h>
! -#undef KERNEL
! -#undef _KERNEL
! +/* #undef KERNEL
! +#undef _KERNEL */
!  #include <net/route.h>
!  
!  int main() {
--- 1,44 ----
! *** configure.in-ORIG	Mon Mar 15 18:31:43 1999
! --- configure.in	Sun Apr  4 16:42:20 1999
! ***************
! *** 821,831 ****
!   
!   AC_CHECK_STRUCT_FOR([
!   #include <sys/types.h>
! - #define KERNEL
! - #define _KERNEL
!   #include <sys/socket.h>
! - #undef KERNEL
! - #undef _KERNEL
!   #include <net/route.h>
!   ], rtentry, rt_dst, no)
!   
! --- 821,827 ----
! ***************
! *** 836,846 ****
!   dnl 4.4 compat
!   AC_TRY_COMPILE([
!   #include <sys/types.h>
! - #define KERNEL
! - #define _KERNEL
!   #include <sys/socket.h>
! - #undef KERNEL
! - #undef _KERNEL
!   #include <net/route.h>
!   ],[
!   
! --- 832,838 ----
! ***************
! *** 857,867 ****
!   if test "x$ac_cv_RTENTRY_TYPE" = "x"; then
!   AC_TRY_COMPILE([
!   #include <sys/types.h>
! - #define KERNEL
! - #define _KERNEL
!   #include <sys/socket.h>
! - #undef KERNEL
! - #undef _KERNEL
!   #include <net/route.h>
!   ],[
!   struct rtentry rt; 
! --- 849,855 ----
Index: pkg/INSTALL
===================================================================
RCS file: INSTALL
diff -N INSTALL
*** /dev/null	Sun Apr  4 16:48:50 1999
--- INSTALL	Sun Apr  4 14:47:59 1999
***************
*** 0 ****
--- 1,24 ----
+ #! /bin/sh
+ :
+ #
+ #	NetBSD package INSTALL script for UCD-SNMP
+ #
+ # Copyright assigned to the Public Domain
+ # by Greg A. Woods <woods@planix.com> March 1999
+ #
+ #ident	"@(#)pkgsrc/mail/smail/pkg:$Name$:$Id$"
+ 
+ case $2 in
+ PRE-INSTALL)
+ 	;;
+ POST-INSTALL)
+ 	if [ ! -f ${PKG_PREFIX}/etc/rc.d/snmpd.sh ]; then
+ 		echo "Creating ${PKG_PREFIX}/etc/rc.d/snmpd.sh startup file."
+ 		echo "#! /bin/sh" > ${PKG_PREFIX}/etc/rc.d/snmpd.sh
+ 		echo "[ -x ${PKG_PREFIX}/sbin/snmpd ] && ${PKG_PREFIX}/sbin/snmpd && echo -n ' snmpd'" >> ${PKG_PREFIX}/etc/rc.d/snmpd.sh
+ 		chmod 751 ${PKG_PREFIX}/etc/rc.d/snmpd.sh
+ 	fi
+ 	;;
+ esac
+ 
+ exit 0
Index: pkg/MESSAGE
===================================================================
RCS file: /cvs/NetBSD/pkgsrc/net/ucd-snmp/pkg/MESSAGE,v
retrieving revision 1.1.1.2
diff -c -c -r1.1.1.2 MESSAGE
*** pkg/MESSAGE	1998/09/01 18:52:17	1.1.1.2
--- pkg/MESSAGE	1999/01/19 17:39:40
***************
*** 4,6 ****
--- 4,23 ----
  # You may want to install the x11/p5-Tk and net/p5-SNMP packages to
  # use the tkmib application!
  #
+ # You may also want to install the net/scotty package to do network
+ # monitoring.
+ #
+ # Finally, a note from the maintainer:
+ # 
+ #   I'm asking (begging) people to send me a postcard of your home city,
+ #   area, or country.  I intend to arrange them into a logo, take a
+ #   picture of them all, and use the picture on the ucd-snmp web page.
+ #   I've gotten a few already, but need a lot more to make the logo a
+ #   decent size.  The first pass from the postcards people have sent me so far
+ #   can be seen on the ucd-snmp web site, listed below.  If you wish to send 
+ #   a postcard, please send it to:
+ # 
+ #          Wes Hardaker
+ #          IT - DCAS
+ #          UCDavis
+ #          Davis CA, 95616
Index: pkg/PLIST
===================================================================
RCS file: /cvs/NetBSD/pkgsrc/net/ucd-snmp/pkg/PLIST,v
retrieving revision 1.1.1.3
diff -c -c -r1.1.1.3 PLIST
*** pkg/PLIST	1999/03/29 17:43:58	1.1.1.3
--- pkg/PLIST	1999/04/04 19:15:15
***************
*** 13,19 ****
  bin/snmptable
  bin/snmpcheck
  bin/tkmib
- etc/rc.d/snmpd.sh
  include/ucd-snmp/acl.h
  include/ucd-snmp/asn1.h
  include/ucd-snmp/context.h
--- 13,18 ----
***************
*** 27,39 ****
  include/ucd-snmp/snmp_debug.h
  include/ucd-snmp/snmp_impl.h
  include/ucd-snmp/system.h
- include/ucd-snmp/ucd-snmp-includes.h
- include/ucd-snmp/view.h
  include/ucd-snmp/ucd-snmp-config.h
  include/ucd-snmp/version.h
  lib/libsnmp.a
- lib/snmp/dlmod/dlmod_mib.so
- lib/snmp/dlmod/example.so
  man/man1/snmpcmd.1
  man/man1/snmpget.1
  man/man1/snmpset.1
--- 26,36 ----
  include/ucd-snmp/snmp_debug.h
  include/ucd-snmp/snmp_impl.h
  include/ucd-snmp/system.h
  include/ucd-snmp/ucd-snmp-config.h
+ include/ucd-snmp/ucd-snmp-includes.h
  include/ucd-snmp/version.h
+ include/ucd-snmp/view.h
  lib/libsnmp.a
  man/man1/snmpcmd.1
  man/man1/snmpget.1
  man/man1/snmpset.1
***************
*** 65,97 ****
  share/examples/ucd-snmp/context.conf
  share/examples/ucd-snmp/party.conf
  share/examples/ucd-snmp/view.conf
  share/snmp/mibs/RFC1155-SMI.txt
  share/snmp/mibs/RFC1213-MIB.txt
! share/snmp/mibs/SNMPv2-CONF.txt
! share/snmp/mibs/SNMPv2-SMI.txt
! share/snmp/mibs/SNMPv2-TC.txt
! share/snmp/mibs/SNMPv2-TM.txt
! share/snmp/mibs/SNMPv2-MIB.txt
! share/snmp/mibs/SNMPv2-M2M-MIB.txt
! share/snmp/mibs/SNMPv2-PARTY-MIB.txt
  share/snmp/mibs/SNMP-FRAMEWORK-MIB.txt
  share/snmp/mibs/SNMP-MPD-MIB.txt
- share/snmp/mibs/SNMP-TARGET-MIB.txt
  share/snmp/mibs/SNMP-NOTIFICATION-MIB.txt
  share/snmp/mibs/SNMP-PROXY-MIB.txt
  share/snmp/mibs/SNMP-USER-BASED-SM-MIB.txt
  share/snmp/mibs/SNMP-VIEW-BASED-ACM-MIB.txt
! share/snmp/mibs/IANAifType-MIB.txt
! share/snmp/mibs/IF-MIB.txt
! share/snmp/mibs/IP-MIB.txt
  share/snmp/mibs/TCP-MIB.txt
- share/snmp/mibs/UDP-MIB.txt
- share/snmp/mibs/EtherLike-MIB.txt
- share/snmp/mibs/HOST-RESOURCES-MIB.txt
- share/snmp/mibs/RFC1271-MIB.txt
  share/snmp/mibs/UCD-SNMP-MIB.txt
! share/snmp/mibs/IPFWACC-MIB.txt
! share/snmp/mibs/DLMOD-MIB.txt
  @unexec /bin/rm -f %D/share/snmp/mibs/.index
  @dirrm lib/snmp/dlmod
  @dirrm share/snmp/mibs
--- 62,94 ----
  share/examples/ucd-snmp/context.conf
  share/examples/ucd-snmp/party.conf
  share/examples/ucd-snmp/view.conf
+ share/snmp/mibs/DLMOD-MIB.txt
+ share/snmp/mibs/EtherLike-MIB.txt
+ share/snmp/mibs/HOST-RESOURCES-MIB.txt
+ share/snmp/mibs/IANAifType-MIB.txt
+ share/snmp/mibs/IF-MIB.txt
+ share/snmp/mibs/IP-MIB.txt
+ share/snmp/mibs/IPFWACC-MIB.txt
  share/snmp/mibs/RFC1155-SMI.txt
  share/snmp/mibs/RFC1213-MIB.txt
! share/snmp/mibs/RFC1271-MIB.txt
  share/snmp/mibs/SNMP-FRAMEWORK-MIB.txt
  share/snmp/mibs/SNMP-MPD-MIB.txt
  share/snmp/mibs/SNMP-NOTIFICATION-MIB.txt
  share/snmp/mibs/SNMP-PROXY-MIB.txt
+ share/snmp/mibs/SNMP-TARGET-MIB.txt
  share/snmp/mibs/SNMP-USER-BASED-SM-MIB.txt
  share/snmp/mibs/SNMP-VIEW-BASED-ACM-MIB.txt
! share/snmp/mibs/SNMPv2-CONF.txt
! share/snmp/mibs/SNMPv2-M2M-MIB.txt
! share/snmp/mibs/SNMPv2-MIB.txt
! share/snmp/mibs/SNMPv2-PARTY-MIB.txt
! share/snmp/mibs/SNMPv2-SMI.txt
! share/snmp/mibs/SNMPv2-TC.txt
! share/snmp/mibs/SNMPv2-TM.txt
  share/snmp/mibs/TCP-MIB.txt
  share/snmp/mibs/UCD-SNMP-MIB.txt
! share/snmp/mibs/UDP-MIB.txt
  @unexec /bin/rm -f %D/share/snmp/mibs/.index
  @dirrm lib/snmp/dlmod
  @dirrm share/snmp/mibs
>Audit-Trail:
>Unformatted: