Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Dec 2018 21:05:01 +0000 (UTC)
From:      Guido Falsi <madpilot@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r488131 - in head: . net/ntopng net/ntopng/files
Message-ID:  <201812222105.wBML51Ma094362@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: madpilot
Date: Sat Dec 22 21:05:01 2018
New Revision: 488131
URL: https://svnweb.freebsd.org/changeset/ports/488131

Log:
  Modify ntopng to use /var/db/ntopng as a data directory by default,
  instead of /var/lib/ntopng.
  
  Updated UPDATING entry text accordingly.
  
  Reported by:	pi

Added:
  head/net/ntopng/files/patch-httpdocs_misc_ntopng-utils-manage-config.in   (contents, props changed)
  head/net/ntopng/files/patch-include_ntop__defines.h   (contents, props changed)
  head/net/ntopng/files/patch-ntopng.8   (contents, props changed)
  head/net/ntopng/files/patch-scripts_lua_examples_sqlite.lua   (contents, props changed)
Modified:
  head/UPDATING
  head/net/ntopng/Makefile
  head/net/ntopng/pkg-plist

Modified: head/UPDATING
==============================================================================
--- head/UPDATING	Sat Dec 22 20:59:07 2018	(r488130)
+++ head/UPDATING	Sat Dec 22 21:05:01 2018	(r488131)
@@ -10,7 +10,7 @@ you update your ports collection, before attempting an
   AUTHOR: madpilot@FreeBSD.org
 
   Since ntopng 3.7, for security reasons, the default setting for
-  the data directory has been changed to "/var/lib/ntopng", and the
+  the data directory has been changed to "/var/db/ntopng", and the
   default user has been changed to "ntopng". This new directory is
   created automatically by the port/package with correct permissions.
 
@@ -21,8 +21,8 @@ you update your ports collection, before attempting an
   the new settings, unless you are already using a custom directory:
 
   # service ntopng stop
-  # mv /var/tmp/ntopng/* /var/lib/ntopng/
-  # chown -R ntopng:ntopng /var/lib/ntopng
+  # mv /var/tmp/ntopng/* /var/db/ntopng/
+  # chown -R ntopng:ntopng /var/db/ntopng
   # service ntopng start
 
   Please check hte upstream FAQ for reference:

Modified: head/net/ntopng/Makefile
==============================================================================
--- head/net/ntopng/Makefile	Sat Dec 22 20:59:07 2018	(r488130)
+++ head/net/ntopng/Makefile	Sat Dec 22 21:05:01 2018	(r488131)
@@ -3,6 +3,7 @@
 
 PORTNAME=	ntopng
 PORTVERSION=	3.8.d20181221
+PORTREVISION=	1
 PORTEPOCH=	1
 CATEGORIES=	net
 
@@ -58,7 +59,7 @@ post-patch:
 
 post-install:
 	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/ntopng
-	${MKDIR} ${STAGEDIR}/var/lib/ntopng
+	${MKDIR} ${STAGEDIR}/var/db/ntopng
 
 post-install-GEOIP-on:
 	${INSTALL_SCRIPT} ${WRKDIR}/ntopng-geoipupdate.sh ${STAGEDIR}${PREFIX}/bin

Added: head/net/ntopng/files/patch-httpdocs_misc_ntopng-utils-manage-config.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/ntopng/files/patch-httpdocs_misc_ntopng-utils-manage-config.in	Sat Dec 22 21:05:01 2018	(r488131)
@@ -0,0 +1,11 @@
+--- httpdocs/misc/ntopng-utils-manage-config.in.orig	2018-12-21 18:58:17 UTC
++++ httpdocs/misc/ntopng-utils-manage-config.in
+@@ -2,7 +2,7 @@
+ 
+ DEFAULT_CONF_FILE="/etc/ntopng/ntopng.conf"
+ 
+-DEFAULT_DATADIR="/var/lib/ntopng"
++DEFAULT_DATADIR="/var/db/ntopng"
+ OLD_DEFAULT_DATADIR="/var/tmp/ntopng"
+ if [ -d "${OLD_DEFAULT_DATADIR}" ]; then
+     DEFAULT_DATADIR="${OLD_DEFAULT_DATADIR}"

Added: head/net/ntopng/files/patch-include_ntop__defines.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/ntopng/files/patch-include_ntop__defines.h	Sat Dec 22 21:05:01 2018	(r488131)
@@ -0,0 +1,11 @@
+--- include/ntop_defines.h.orig	2018-12-21 18:58:17 UTC
++++ include/ntop_defines.h
+@@ -416,7 +416,7 @@
+ #define NTOPNG_NDPI_OS_PROTO_ID      (NDPI_LAST_IMPLEMENTED_PROTOCOL+NDPI_MAX_NUM_CUSTOM_PROTOCOLS-2)
+ #define CONST_DEFAULT_HOME_NET       "192.168.1.0/24"
+ #define CONST_OLD_DEFAULT_DATA_DIR   "/var/tmp/ntopng"
+-#define CONST_DEFAULT_DATA_DIR       "/var/lib/ntopng"
++#define CONST_DEFAULT_DATA_DIR       "/var/db/ntopng"
+ #define CONST_DEFAULT_MAX_UI_STRLEN  24
+ #define CONST_DEFAULT_IS_AUTOLOGOUT_ENABLED               1
+ #define CONST_DEFAULT_IS_IDLE_LOCAL_HOSTS_CACHE_ENABLED   1

Added: head/net/ntopng/files/patch-ntopng.8
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/ntopng/files/patch-ntopng.8	Sat Dec 22 21:05:01 2018	(r488131)
@@ -0,0 +1,11 @@
+--- ntopng.8.orig	2018-12-21 18:58:17 UTC
++++ ntopng.8
+@@ -186,7 +186,7 @@ can be instructed to act as a publisher delivering flo
+ Finally using \-i dummy it is possible to create a dummy interface that generates a large number of flows/hosts in order to saturate ntopng resources. This way ntopng can be tested for performance issues as well proper handling of low-memory situations.
+ 
+ .It \-d|\-\-data\-dir\ <path>
+-Specifies the data directory (it must be writable). Default directory is /var/lib/ntopng
++Specifies the data directory (it must be writable). Default directory is /var/db/ntopng
+ 
+ .It \-t|\-\-install\-dir\ <path>
+ Specifies the installation directory. Default directory is retrieved from common install paths.

Added: head/net/ntopng/files/patch-scripts_lua_examples_sqlite.lua
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/ntopng/files/patch-scripts_lua_examples_sqlite.lua	Sat Dec 22 21:05:01 2018	(r488131)
@@ -0,0 +1,11 @@
+--- scripts/lua/examples/sqlite.lua.orig	2018-12-21 18:58:17 UTC
++++ scripts/lua/examples/sqlite.lua
+@@ -26,7 +26,7 @@ if (query == nil) then
+   <div class="alert alert-warning alert-dismissible" role="alert">
+    <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span>
+    <span class="sr-only">Close</span></button>
+-   <strong>Query Empty!</strong> Example: localhost:3000/lua/examples/sqlite.lua?query=/var/lib/ntopng/0/flows/2014-15-15/07/08/01/45.sqlite
++   <strong>Query Empty!</strong> Example: localhost:3000/lua/examples/sqlite.lua?query=/var/db/ntopng/0/flows/2014-15-15/07/08/01/45.sqlite
+ </div>
+    ]]
+ 

Modified: head/net/ntopng/pkg-plist
==============================================================================
--- head/net/ntopng/pkg-plist	Sat Dec 22 20:59:07 2018	(r488130)
+++ head/net/ntopng/pkg-plist	Sat Dec 22 21:05:01 2018	(r488131)
@@ -514,5 +514,4 @@ man/man8/ntopng.8.gz
 %%DATADIR%%/scripts/lua/username_details.lua
 %%DATADIR%%/scripts/lua/vlan_details.lua
 %%DATADIR%%/scripts/lua/vlan_stats.lua
-@dir(%%NTOPNGUSER%%,%%NTOPNGGROUP%%,750) /var/lib/ntopng
-@dir /var/lib
+@dir(%%NTOPNGUSER%%,%%NTOPNGGROUP%%,750) /var/db/ntopng



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812222105.wBML51Ma094362>