Bug 169827 - [PATCH] sysutils/nut: convert optionsNG and update 2.6.4
Summary: [PATCH] sysutils/nut: convert optionsNG and update 2.6.4
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Ion-Mihai "IOnut" Tetcu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-13 15:50 UTC by William Grzybowski
Modified: 2012-08-12 10:20 UTC (History)
0 users

See Also:


Attachments
nut.patch (7.76 KB, patch)
2012-07-13 15:50 UTC, William Grzybowski
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description William Grzybowski 2012-07-13 15:50:01 UTC
	- Update to 2.6.4
	- Convert to use options ng

	If the maintainer is no longer maintaining this port I will be happy to...

Fix: See attached patch
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-07-13 15:50:13 UTC
Responsible Changed
From-To: freebsd-ports-bugs->itetcu

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2012-08-12 10:14:20 UTC
Author: itetcu
Date: Sun Aug 12 09:14:06 2012
New Revision: 302430
URL: http://svn.freebsd.org/changeset/ports/302430

Log:
  - update to 2.6.4
  - convert to OPTIONSng
  - fix buffer overflow in upsd when receiving data from network
  
  PR:		169827
  Submitted by:	169827
  Security:	http://www.vuxml.org/freebsd/47f13540-c4cb-4971-8dc6-28d0dabfd9cd.html

Modified:
  head/sysutils/nut/Makefile   (contents, props changed)
  head/sysutils/nut/distinfo   (contents, props changed)
  head/sysutils/nut/pkg-plist   (contents, props changed)

Modified: head/sysutils/nut/Makefile
==============================================================================
--- head/sysutils/nut/Makefile	Sun Aug 12 09:13:44 2012	(r302429)
+++ head/sysutils/nut/Makefile	Sun Aug 12 09:14:06 2012	(r302430)
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	nut
-PORTVERSION=	2.6.1
+PORTVERSION=	2.6.4
 CATEGORIES=	sysutils
 MASTER_SITES=	http://www.networkupstools.org/source/${PORTVERSION:R}/
 DISTFILES=	${DISTNAME}${EXTRACT_SUFX} ${DISTNAME}${EXTRACT_SUFX}.sig
@@ -25,14 +25,16 @@ NUT_USER?=	uucp
 NUT_GROUP?=	uucp
 STATEDIR?=	/var/db/nut
 
-OPTIONS=	SERIAL		"SERIAL support" on \
-		USB		"USB support" on \
-		SNMP		"SNMP support" on \
-		NEON		"NEON XML/HTTP support"	on \
-		PDU		"Powerman PDU support" off \
-		HAL		"HAL support" off \
-		CGI		"Web CGI interface" off \
-		BASH		"Bash Completion support" off
+OPTIONS_DEFINE=	SERIAL USB SNMP NEON PDU HAL CGI BASH
+OPTIONS_DEFAULT=SERIAL USB SNMP NEON
+
+SERIAL_DESC=	SERIAL support
+USB_DESC=	USB support
+SNMP_DESC=	SNMP support
+NEON_DESC=	NEON XML/HTTP support
+PDU_DESC=	Powerman PDU support
+CGI_DESC=	Web CGI interface
+BASH_DESC=	Bash Completion support
 
 USE_RC_SUBR=	nut nut_upsmon nut_upslog
 SUB_LIST+=	STATEDIR=${STATEDIR}
@@ -67,7 +69,7 @@ CONFIGURE_ARGS=	--sysconfdir=${PREFIX}/e
 		--with-group=${NUT_GROUP} \
 		--with-dev
 
-.if defined(WITH_CGI)
+.if ${PORT_OPTIONS:MCGI}
 LIB_DEPENDS+=	gd.4:${PORTSDIR}/graphics/gd
 MAN5+=		hosts.conf.5 upsset.conf.5 upsstats.html.5
 MAN8+=		upsset.cgi.8 upsstats.cgi.8 upsimage.cgi.8
@@ -85,7 +87,7 @@ CONFIGURE_ARGS+=	--without-cgi
 PLIST_SUB+=	NUT_CGI="@comment "
 .endif
 
-.if !defined(WITHOUT_SERIAL)
+.if ${PORT_OPTIONS:MSERIAL}
 CONFIGURE_ARGS+=	--with-serial
 MAN8+=		apcsmart.8 bestfortress.8 bcmxcp.8 belkin.8 belkinunv.8 \
 		bestuferrups.8 bestups.8 bestfcom.8 blazer.8 clone.8 \
@@ -100,7 +102,7 @@ CONFIGURE_ARGS+=	--without-serial
 PLIST_SUB+=	NUT_SERIAL="@comment "
 .endif
 
-.if !defined(WITHOUT_USB)
+.if ${PORT_OPTIONS:MUSB}
 . if ${OSVERSION} < 800069
 LIB_DEPENDS+=	usb-0.1.8:${PORTSDIR}/devel/libusb
 . else
@@ -114,7 +116,7 @@ CONFIGURE_ARGS+=	--without-usb
 PLIST_SUB+=	NUT_USB="@comment "
 .endif
 
-.if !defined(WITHOUT_SNMP)
+.if ${PORT_OPTIONS:MSNMP}
 LIB_DEPENDS+=	netsnmp.30:${PORTSDIR}/net-mgmt/net-snmp
 CONFIGURE_ARGS+=	--with-snmp
 MAN8+=		snmp-ups.8
@@ -124,7 +126,7 @@ CONFIGURE_ARGS+=	--without-snmp
 PLIST_SUB+=	NUT_SNMP="@comment "
 .endif
 
-.if !defined(WITHOUT_NEON)
+.if ${PORT_OPTIONS:MNEON}
 LIB_DEPENDS+=	neon.27:${PORTSDIR}/www/neon29
 CONFIGURE_ARGS+=	--with-neonxml
 MAN8+=		netxml-ups.8
@@ -134,7 +136,7 @@ CONFIGURE_ARGS+=	--without-neonxml
 PLIST_SUB+=	NUT_NEON="@comment "
 .endif
 
-.if defined(WITH_PDU)
+.if ${PORT_OPTIONS:MPDU}
 LIB_DEPENDS+=	powerman.0:${PORTSDIR}/sysutils/powerman
 CONFIGURE_ARGS+=	--with-powerman
 MAN8+=		powerman-pdu.8
@@ -144,8 +146,8 @@ CONFIGURE_ARGS+=	--without-powerman
 PLIST_SUB+=	NUT_PDU="@comment "
 .endif
 
-.if defined(WITH_HAL)
-. if defined(WITHOUT_USB)
+.if ${PORT_OPTIONS:MHAL}
+. if empty(PORT_OPTIONS:MUSB)
 BROKEN=		HAL is only usable with USB support enabled. Run 'make config' again!
 . endif
 LIB_DEPENDS+=	hal.1:${PORTSDIR}/sysutils/hal
@@ -158,7 +160,7 @@ CONFIGURE_ARGS+=	--without-hal
 PLIST_SUB+=	NUT_HAL="@comment "
 .endif
 
-.if defined(WITH_BASH)
+.if ${PORT_OPTIONS:MBASH}
 RUN_DEPENDS+=	${LOCALBASE}/bin/bash_completion.sh:${PORTSDIR}/shells/bash-completion
 PLIST_SUB+=	BASH=""
 .else
@@ -177,7 +179,8 @@ pre-install:
 
 .if !defined(NOPORTDOCS)
 post-install:
-.if defined(WITH_BASH)
+.if ${PORT_OPTIONS:MBASH}
+	@${MKDIR} ${PREFIX}/etc/bash_completion.d/
 	${INSTALL_DATA} ${WRKSRC}/scripts/misc/nut.bash_completion ${PREFIX}/etc/bash_completion.d/
 .endif
 	@${MKDIR} ${DOCSDIR}/cables

Modified: head/sysutils/nut/distinfo
==============================================================================
--- head/sysutils/nut/distinfo	Sun Aug 12 09:13:44 2012	(r302429)
+++ head/sysutils/nut/distinfo	Sun Aug 12 09:14:06 2012	(r302430)
@@ -1,4 +1,4 @@
-SHA256 (nut-2.6.1.tar.gz) = f5c46b856c0cf5b7f0e4b22d82b670af64cc98717a90eaac8723dd402a181c00
-SIZE (nut-2.6.1.tar.gz) = 1776645
-SHA256 (nut-2.6.1.tar.gz.sig) = 780be2a54fcd4df1124f8dcec4e49df3c1c7a985e030856dbe63fd77d0e76ea8
-SIZE (nut-2.6.1.tar.gz.sig) = 72
+SHA256 (nut-2.6.4.tar.gz) = 4a8455ca7ba2e18b57a39206acc5a496e855d845828e970822bd84afd1178fe5
+SIZE (nut-2.6.4.tar.gz) = 1992488
+SHA256 (nut-2.6.4.tar.gz.sig) = a364d09b9c6877c1542183dd7eac35cf189ab9d178532d6fd29a04662560754f
+SIZE (nut-2.6.4.tar.gz.sig) = 72

Modified: head/sysutils/nut/pkg-plist
==============================================================================
--- head/sysutils/nut/pkg-plist	Sun Aug 12 09:13:44 2012	(r302429)
+++ head/sysutils/nut/pkg-plist	Sun Aug 12 09:14:06 2012	(r302430)
@@ -1,3 +1,22 @@
+%%NUT_CGI%%%%CGIDIR%%/upsimage.cgi
+%%NUT_CGI%%%%CGIDIR%%/upsset.cgi
+%%NUT_CGI%%%%CGIDIR%%/upsstats.cgi
+%%NUT_CGI%%%%CGIETCDIR%%/hosts.conf.sample
+%%NUT_CGI%%%%CGIETCDIR%%/upsset.conf.sample
+%%NUT_CGI%%%%CGIETCDIR%%/upsstats.html.sample
+%%NUT_CGI%%%%CGIETCDIR%%/upsstats-single.html.sample
+%%NUT_CGI%%%%WWWDIR%%/bottom.html
+%%NUT_CGI%%%%WWWDIR%%/header.html
+%%NUT_CGI%%%%WWWDIR%%/index.html
+%%NUT_CGI%%%%WWWDIR%%/nut-banner.png
+%%ETCDIR%%/cmdvartab
+%%ETCDIR%%/driver.list
+%%ETCDIR%%/nut.conf.sample
+%%ETCDIR%%/ups.conf.sample
+%%ETCDIR%%/upsd.conf.sample
+%%ETCDIR%%/upsd.users.sample
+%%ETCDIR%%/upsmon.conf.sample
+%%ETCDIR%%/upssched.conf.sample
 @stopdaemon nut_upsmon
 @stopdaemon nut_upslog
 @stopdaemon nut
@@ -7,31 +26,30 @@ bin/upslog
 bin/upsrw
 bin/upssched-cmd
 %%BASH%%etc/bash_completion.d/nut.bash_completion
-etc/nut/cmdvartab
-etc/nut/driver.list
-etc/nut/nut.conf.sample
-etc/nut/ups.conf.sample
-etc/nut/upsd.conf.sample
-etc/nut/upsd.users.sample
-etc/nut/upsmon.conf.sample
-etc/nut/upssched.conf.sample
+include/nut-scan.h
+include/nutscan-device.h
+include/nutscan-init.h
+include/nutscan-ip.h
 include/parseconf.h
 include/upsclient.h
 lib/libupsclient.a
-lib/libupsclient.so.1
-lib/libupsclient.so
 lib/libupsclient.la
-%%NUT_HAL%%libexec/hald-addon-blazer_usb
+lib/libupsclient.so
+lib/libupsclient.so.2
+libdata/pkgconfig/libnutscan.pc
+libdata/pkgconfig/libupsclient.pc
 %%NUT_HAL%%libexec/hald-addon-bcmxcp_usb
+%%NUT_HAL%%libexec/hald-addon-blazer_usb
 %%NUT_HAL%%libexec/hald-addon-tripplite_usb
 %%NUT_HAL%%libexec/hald-addon-usbhid-ups
 %%NUT_SERIAL%%libexec/nut/apcsmart
-%%NUT_SERIAL%%libexec/nut/bestfortress
+%%NUT_SERIAL%%libexec/nut/apcsmart-old
 %%NUT_SERIAL%%libexec/nut/bcmxcp
 %%NUT_USB%%libexec/nut/bcmxcp_usb
 %%NUT_SERIAL%%libexec/nut/belkin
 %%NUT_SERIAL%%libexec/nut/belkinunv
 %%NUT_SERIAL%%libexec/nut/bestfcom
+%%NUT_SERIAL%%libexec/nut/bestfortress
 %%NUT_SERIAL%%libexec/nut/bestuferrups
 %%NUT_SERIAL%%libexec/nut/bestups
 %%NUT_SERIAL%%libexec/nut/blazer_ser
@@ -62,8 +80,8 @@ lib/libupsclient.la
 %%NUT_SERIAL%%libexec/nut/rhino
 %%NUT_USB%%libexec/nut/richcomm_usb
 %%NUT_SERIAL%%libexec/nut/safenet
-%%NUT_SNMP%%libexec/nut/snmp-ups
 %%NUT_SERIAL%%libexec/nut/skel
+%%NUT_SNMP%%libexec/nut/snmp-ups
 %%NUT_SERIAL%%libexec/nut/solis
 %%NUT_SERIAL%%libexec/nut/tripplite
 %%NUT_USB%%libexec/nut/tripplite_usb
@@ -72,26 +90,13 @@ lib/libupsclient.la
 libexec/nut/upsdrvctl
 %%NUT_USB%%libexec/nut/usbhid-ups
 %%NUT_SERIAL%%libexec/nut/victronups
-libdata/pkgconfig/libupsclient.pc
 sbin/upsd
 sbin/upsmon
 sbin/upssched
 %%NUT_HAL%%share/hal/fdi/information/20thirdparty/20-ups-nut-device.fdi
-%%NUT_CGI%%%%CGIDIR%%/upsimage.cgi
-%%NUT_CGI%%%%CGIDIR%%/upsset.cgi
-%%NUT_CGI%%%%CGIDIR%%/upsstats.cgi
-%%NUT_CGI%%%%CGIETCDIR%%/hosts.conf.sample
-%%NUT_CGI%%%%CGIETCDIR%%/upsset.conf.sample
-%%NUT_CGI%%%%CGIETCDIR%%/upsstats.html.sample
-%%NUT_CGI%%%%CGIETCDIR%%/upsstats-single.html.sample
-%%NUT_CGI%%%%WWWDIR%%/bottom.html
-%%NUT_CGI%%%%WWWDIR%%/header.html
-%%NUT_CGI%%%%WWWDIR%%/index.html
-%%NUT_CGI%%%%WWWDIR%%/nut-banner.png
-@dirrmtry etc/nut
-@dirrmtry libdata/pkgconfig
+@dirrmtry share/hal/fdi/information/20thirdparty
+@dirrmtry %%CGIDIR%%
+@dirrmtry %%ETCDIR%%
+@dirrmtry %%WWWDIR%%
+@dirrmtry etc/bash_completion.d
 @dirrmtry libexec/nut
-@dirrmtry %%STATEDIR%%
-%%NUT_CGI%%@dirrm %%CGIDIR%%
-%%NUT_CGI%%@dirrmtry www/cgi-bin
-%%NUT_CGI%%@dirrm %%WWWDIR%%
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Ion-Mihai "IOnut" Tetcu freebsd_committer freebsd_triage 2012-08-12 10:15:51 UTC
State Changed
From-To: open->closed

Committed. Thanks!