On Tue, Aug 28, 2018 at 02:38:55PM +0200, Antoine Jacoutot wrote:
> On Tue, Aug 28, 2018 at 01:13:46PM +0100, Stuart Henderson wrote:
> > On 2018/08/28 05:25, Remi Locherer wrote:
> > > CVSROOT:  /cvs
> > > Module name:      ports
> > > Changes by:       [email protected]    2018/08/28 05:25:54
> > > 
> > > Log message:
> > >     Import netshot
> > >     
> > >     Netshot is a tool to backup configs from network devices similar to
> > >     rancid. In addition it can also check configs and detected versions
> > >     against a policy. It already knows many platforms and it is easy to
> > >     modify or add drivers for different vendors.
> > >     
> > >     OK danj@
> > >     
> > >     Status:
> > >     
> > >     Vendor Tag:   remi
> > >     Release Tags: remi_20180828
> > >     
> > >     N ports/sysutils/netshot/distinfo
> > >     N ports/sysutils/netshot/Makefile
> > >     N ports/sysutils/netshot/pkg/netshot.rc
> > >     N ports/sysutils/netshot/pkg/DESCR
> > >     N ports/sysutils/netshot/pkg/PLIST
> > >     
> > >     No conflicts created by this import
> > > 
> > 
> > This diff sets WRKDIST correctly for the distfile, and patches to use
> > the variables instead of hardcoded /usr/local.  OK?
> 
> Should be PREFIX, not LOCALBASE :-)
> 
> 
> 
> > 
> > 
> > Index: Makefile
> > ===================================================================
> > RCS file: /cvs/ports/sysutils/netshot/Makefile,v
> > retrieving revision 1.1.1.1
> > diff -u -p -r1.1.1.1 Makefile
> > --- Makefile        28 Aug 2018 11:25:53 -0000      1.1.1.1
> > +++ Makefile        28 Aug 2018 12:09:58 -0000
> > @@ -3,7 +3,9 @@
> >  COMMENT =          config backup and policy check for network devices
> >  
> >  DISTNAME =         netshot_0.8.1
> > +REVISION =         0
> >  PKGNAME =          ${DISTNAME:S/_/-/}
> > +WRKDIST =          ${WRKDIR}
> >  
> >  CATEGORIES =               sysutils
> >  
> > @@ -29,12 +31,15 @@ NO_TEST =               Yes
> >  
> >  SUBST_VARS =               VARBASE
> >  
> > +do-configure:
> > +   ${SUBST_CMD} ${WRKSRC}/netshot.conf
> > +
> >  do-install:
> >     ${INSTALL_DATA_DIR} ${PREFIX}/netshot/drivers \
> >             ${PREFIX}/share/{doc,examples}/netshot
> > -   ${INSTALL_DATA} ${WRKDIR}/netshot.jar ${PREFIX}/netshot
> > -   ${INSTALL_DATA} ${WRKDIR}/COPYING ${PREFIX}/share/doc/netshot
> > -   ${INSTALL_DATA} ${WRKDIR}/*.txt ${PREFIX}/share/doc/netshot
> > -   ${INSTALL_DATA} ${WRKDIR}/netshot.conf ${PREFIX}/share/examples/netshot
> > +   ${INSTALL_DATA} ${WRKSRC}/netshot.jar ${PREFIX}/netshot
> > +   ${INSTALL_DATA} ${WRKSRC}/COPYING ${PREFIX}/share/doc/netshot
> > +   ${INSTALL_DATA} ${WRKSRC}/*.txt ${PREFIX}/share/doc/netshot
> > +   ${INSTALL_DATA} ${WRKSRC}/netshot.conf ${PREFIX}/share/examples/netshot
> >  
> >  .include <bsd.port.mk>
> > Index: patches/patch-netshot_conf
> > ===================================================================
> > RCS file: patches/patch-netshot_conf
> > diff -N patches/patch-netshot_conf
> > --- /dev/null       1 Jan 1970 00:00:00 -0000
> > +++ patches/patch-netshot_conf      28 Aug 2018 12:09:58 -0000
> > @@ -0,0 +1,32 @@
> > +$OpenBSD$
> > +
> > +Index: netshot.conf
> > +--- netshot.conf.orig
> > ++++ netshot.conf
> > +@@ -1,7 +1,7 @@
> > + # Netshot Configuration File
> > + 
> > + # Log file and level
> > +-netshot.log.file = /var/log/netshot/netshot.log
> > ++netshot.log.file = ${VARBASE}/log/netshot/netshot.log
> > + 
> > + # Database connection
> > + netshot.db.driver_class = com.mysql.jdbc.Driver
> > +@@ -13,7 +13,7 @@ netshot.db.password = netshot
> > + netshot.db.encryptionPassword = netshot
> > + 
> > + # REST
> > +-netshot.http.ssl.keystore.file = /usr/local/netshot/netshot.jks
> > ++netshot.http.ssl.keystore.file = ${LOCALBASE}/netshot/netshot.jks
> > + netshot.http.ssl.keystore.pass = password
> > + #netshot.http.baseurl = https://localhost
> > + netshot.http.baseurl = https://0.0.0.0
> > +@@ -29,7 +29,7 @@ netshot.snmptrap.community = Netsh01
> > + # General settings
> > + netshot.snapshots.auto.interval = 15
> > + netshot.snapshots.auto.anyip = true
> > +-netshot.drivers.path = /usr/local/netshot/drivers
> > ++netshot.drivers.path = ${LOCALBASE}/netshot/drivers
> > + 
> > + # Authentication
> > + netshot.aaa.maxidletime = 1800
> > 
> 

Thank you Stuart and Antoine.

ok remi@ for the diff with s/LOCALBASE/PREFIX/ in patch-netshot_conf
(as noted by Stuart and Antoine).

Reply via email to