ports/177956: [MAINTAINER] net-mgmt/netdisco: update to 1.2
Geoffroy Desvernay
dgeo at centrale-marseille.fr
Thu Apr 18 14:50:00 UTC 2013
>Number: 177956
>Category: ports
>Synopsis: [MAINTAINER] net-mgmt/netdisco: update to 1.2
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Thu Apr 18 14:50:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Geoffroy Desvernay
>Release: FreeBSD 9.1-RELEASE amd64
>Organization:
Ecole Centrale de Marseille
>Environment:
System: FreeBSD dgeo.sysadm.ec-m.fr 9.1-RELEASE FreeBSD 9.1-RELEASE #0: Tue Dec 18 11:55:35 CET 2012
>Description:
- Update to 1.2
- removed option to fetch oui.txt while building the port (let the user read pkg-message)
Generated with FreeBSD Port Tools 0.99_7 (mode: update, diff: SVN)
>How-To-Repeat:
>Fix:
--- netdisco-1.2.patch begins here ---
Index: Makefile
===================================================================
--- Makefile (revision 316041)
+++ Makefile (working copy)
@@ -1,22 +1,18 @@
-# New ports collection makefile for: netdisco
-# Date created: 2006-04-08
-# Whom: Shaun Amott <shaun at inerd.com>
-#
+# Created by: Shaun Amott <shaun at inerd.com>
# $FreeBSD$
#
PORTNAME= netdisco
-PORTVERSION= 1.1
+PORTVERSION= 1.2
CATEGORIES= net-mgmt www
MASTER_SITES= SF
MAINTAINER= dgeo at centrale-marseille.fr
COMMENT= Web-based network management tool for moderate to large networks
-OPTIONS_DEFINE= GRAPHVIZ OUIDL MIBS
+OPTIONS_DEFINE= GRAPHVIZ MIBS
OPTIONS_DEFAULT=GRAPHVIZ MIBS
MIBS_DESC= Depend on net-mgmt/netdisco-mibs
-OUIDL_DESC= Download oui.txt file
GRAPHVIZ_DESC= Install GraphViz for network map support
RUN_DEPENDS+= ${APACHE_PKGNAMEPREFIX}mod_perl2>=0:${PORTSDIR}/www/mod_perl2 \
@@ -48,7 +44,7 @@
NETDISCO_DBDIR= /var/db/netdisco
SUB_FILES= pkg-message
-SUB_LIST= NETDISCO_DBDIR=${NETDISCO_DBDIR} NETDISCO_RUNDIR=${NETDISCO_RUNDIR} NETDISCO_USER=${USERS}
+SUB_LIST= NETDISCO_DBDIR=${NETDISCO_DBDIR} NETDISCO_RUNDIR=${NETDISCO_RUNDIR} NETDISCO_USER=${USERS} NETDISCO_GROUP=${GROUPS}
PLIST_SUB= NETDISCO_DBDIR=${NETDISCO_DBDIR} NETDISCO_RUNDIR=${NETDISCO_RUNDIR}
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
@@ -90,12 +86,6 @@
p5-GraphViz>=0:${PORTSDIR}/graphics/p5-GraphViz
.endif
-.if ${PORT_OPTIONS:MOUIDL}
-PLIST_SUB+= OUIDL=""
-.else
-PLIST_SUB+= OUIDL="@comment "
-.endif
-
pre-install:
. for i in ${ALTER_FILES}
@(${MV} ${WRKSRC}/${i}.bak ${WRKSRC}/${i} 2>/dev/null || ${TRUE})
@@ -163,10 +153,6 @@
fi)
. endif
-. if ${PORT_OPTIONS:MOUIDL}
- ${FETCH_CMD} -q -o ${DATADIR}/oui.txt http://standards.ieee.org/develop/regauth/oui/oui.txt
-. endif
-
post-install:
@${CAT} ${PKGMESSAGE}
Index: distinfo
===================================================================
--- distinfo (revision 316041)
+++ distinfo (working copy)
@@ -1,2 +1,2 @@
-SHA256 (netdisco-1.1.tar.gz) = 849e9f80a0833af3f4eb8a114c629fa43c238b244cf41d63ef9063d5ef169151
-SIZE (netdisco-1.1.tar.gz) = 1403579
+SHA256 (netdisco-1.2.tar.gz) = 18af19b5753eb752edf9d4fb7e8865628ac35cf7b60266c7d50da020e9994a1f
+SIZE (netdisco-1.2.tar.gz) = 1349238
Index: files/netdisco.in
===================================================================
--- files/netdisco.in (revision 316041)
+++ files/netdisco.in (working copy)
@@ -18,36 +18,34 @@
: ${netdisco_group="%%NETDISCO_GROUP%%"}
start_precmd=${name}_prestart
-start_cmd=${name}_start
stop_cmd=${name}_stop
restart_cmd=${name}_restart
status_cmd=${name}_status
command="%%PREFIX%%/bin/netdisco"
command_interpreter="/usr/bin/perl"
-pidfile=%%NETDISCO_RUNDIR%%/netdisco_daemon.pid
+netdisco_config="%%ETCDIR%%/netdisco.conf"
+pidfile=$(grep ^daemon_pid $netdisco_config | sed -E 's/.*=\s+//')
+flags="-p start"
-required_files="%%ETCDIR%%/netdisco.conf"
+required_files="$netdisco_config"
netdisco_prestart() {
- test -d %%NETDISCO_RUNDIR%% || install -d -m 0700 -o $netdisco_user -g $netdisco_group %%NETDISCO_RUNDIR%%
+ test -d ${pidfile%/*} || install -d -m 0700 -o $netdisco_user -g $netdisco_group ${pidfile%/*}
+ touch $pidfile && chown $netdisco_user $pidfile
test -d %%NETDISCO_DBDIR%% || install -d -m 0700 -o $netdisco_user -g $netdisco_group %%NETDISCO_DBDIR%%
}
-netdisco_start() {
- $command -p start
-}
-
netdisco_stop() {
- $command -p stop
+ su -m "$netdisco_user" -c "$command -p stop"
}
netdisco_restart() {
- $command -p restart
+ su -m "$netdisco_user" -c "$command -p restart"
}
netdisco_status() {
- $command -p status
+ su -m "$netdisco_user" -c "$command -p status"
}
run_rc_command "$1"
Index: files/patch-netdisco.conf
===================================================================
--- files/patch-netdisco.conf (revision 316041)
+++ files/patch-netdisco.conf (working copy)
@@ -1,5 +1,5 @@
---- netdisco.conf.orig 2010-08-03 15:35:43.000000000 +0200
-+++ netdisco.conf 2012-02-16 13:10:38.000000000 +0100
+--- netdisco.conf.orig 2013-04-13 12:30:38.000000000 +0200
++++ netdisco.conf 2013-04-18 16:25:10.000000000 +0200
@@ -13,11 +13,11 @@
# ---- General Settings ----
@@ -14,7 +14,7 @@
timeout = 180
macsuck_timeout = 240
#macsuck_all_vlans = true
-@@ -65,7 +65,7 @@
+@@ -67,7 +67,7 @@
# ---- Admin Panel Daemon Settings ----
daemon_bg = true
@@ -23,7 +23,7 @@
daemon_poll = 2
# ---- Port Control Settings ---
-@@ -80,7 +80,7 @@
+@@ -82,7 +82,7 @@
# Data Archiving and Logging
compresslogs = true
compress = /usr/bin/gzip -f
@@ -32,12 +32,13 @@
logextension = txt
#nmis_dump = netdisco_nmis
-@@ -131,24 +131,7 @@
- # snmptimeout in micro-seconds before retry, 1000000 micro-seconds = 1 second
- snmptimeout = 1000000
+@@ -136,25 +136,7 @@
snmpretries = 3
+ #If you want to use a Net-SNMP configuration file uncomment and set to 0
+ #ignoresnmpconf = 1
-mibdirs = \
- $home/mibs/allied, \
+- $home/mibs/apc, \
- $home/mibs/arista, \
- $home/mibs/aruba, \
- $home/mibs/asante, \
Index: files/pkg-message.in
===================================================================
--- files/pkg-message.in (revision 316041)
+++ files/pkg-message.in (working copy)
@@ -7,7 +7,7 @@
and modify them to suit your needs.
2) if you didn't use the port's option for that (OUIDL),
- # fetch -o %%DATADIR%%/oui.txt http://standards.ieee.org/regauth/oui/oui.txt
+ # fetch -o %%DATADIR%%/oui.txt http://standards.ieee.org/develop/regauth/oui/oui.txt
3) Run the following to create and initialise the netdisco database:
# perl %%DATADIR%%/sql/pg --init
Index: pkg-plist
===================================================================
--- pkg-plist (revision 316041)
+++ pkg-plist (working copy)
@@ -21,7 +21,9 @@
%%DATADIR%%/sql/node_ip.sql
%%DATADIR%%/sql/node_monitor.sql
%%DATADIR%%/sql/node_nbt.sql
+%%DATADIR%%/sql/node_vlan.sql
%%DATADIR%%/sql/node_wireless.sql
+%%DATADIR%%/sql/node_wireless_ssid.sql
%%DATADIR%%/sql/oui.sql
%%DATADIR%%/sql/pg
%%DATADIR%%/sql/process.sql
@@ -32,6 +34,7 @@
%%DATADIR%%/sql/upgrade-0.94-to-0.95.sql
%%DATADIR%%/sql/upgrade-0.95-to-1.0.sql
%%DATADIR%%/sql/upgrade-1.0-to-1.1.sql
+%%DATADIR%%/sql/upgrade-1.1-to-1.2.sql
%%DATADIR%%/sql/user_log.sql
%%DATADIR%%/sql/users.sql
%%DATADIR%%/Makefile
@@ -56,7 +59,6 @@
%%WWWDIR%%/device_search.html
%%WWWDIR%%/discoball2.gif
%%WWWDIR%%/doc/ChangeLog.txt
-%%WWWDIR%%/doc/README.html
%%WWWDIR%%/doc/index.html
%%WWWDIR%%/doc/netdisco-api-backend.html
%%WWWDIR%%/doc/netdisco-api-shared.html
--- netdisco-1.2.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list