-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ntopng: update for dsm 7 and debian 12 dev env (#6218)
* ntopng: update for dsm 7 and debian 12 dev env - ntopng: avoid patching the generated configure file (file content depends on version of autoconf) - make patching of generated Makefile independent of number of white spaces - patch Makefile.in to avoid some patches of generated Makefile - update paths in start-stop-status.sh and ntopng.conf for DSM 7 compatibility - install ntopng.conf file into var folder (instead of etc folder) - fix mysql_config by cross/mysql-connector-c * add wizard page for DSM 7 with notes for patching the privilege file
- Loading branch information
Showing
13 changed files
with
150 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
cross/ntopng/patches/001-makefile.in_ignore_local_static_lua.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# ignore static lua library within ntopng sources | ||
# we use cross/lua instead | ||
# | ||
--- Makefile.in.orig 2020-11-02 21:27:19.000000000 +0000 | ||
+++ Makefile.in 2024-09-01 14:35:35.320735253 +0000 | ||
@@ -106,7 +106,7 @@ | ||
|
||
###### | ||
TARGET = ntopng | ||
-NLIBS = $(NDPI_LIB) $(LIBPCAP) $(LUA_LIB) $(LIBRRDTOOL_LIB) $(ZEROMQ_LIB) $(JSON_LIB) $(SNMP_LIB) @MAXMINDDB_LIB@ $(SODIUM_LIB) @HIREDIS_LIB@ @SQLITE_LIB@ @MYSQL_LIB@ @RADCLI_LIB@ @EXPAT_LIB@ @SSL_LIB@ @LINK_OPTS@ @LDFLAGS@ @PRO_LIBS@ $(ZSTD_LIB) -lm -lpthread | ||
+NLIBS = $(NDPI_LIB) $(LIBPCAP) $(LIBRRDTOOL_LIB) $(ZEROMQ_LIB) $(JSON_LIB) $(SNMP_LIB) @MAXMINDDB_LIB@ $(SODIUM_LIB) @HIREDIS_LIB@ @SQLITE_LIB@ @MYSQL_LIB@ @RADCLI_LIB@ @EXPAT_LIB@ @SSL_LIB@ @LINK_OPTS@ @LDFLAGS@ @PRO_LIBS@ $(ZSTD_LIB) -lm -lpthread | ||
CPPFLAGS = @CFLAGS@ @HIREDIS_INC@ $(MONGOOSE_INC) $(JSON_INC) $(SNMP_INC) $(SODIUM_INC) $(NDPI_INC) $(LUA_INC) $(LIBRRDTOOL_INC) $(ZEROMQ_INC) @MYSQL_INC@ @CPPFLAGS@ -I$(HTTPCLIENT_INC) @SSL_INC@ @PRO_INCS@ -DDATA_DIR='"$(datadir)"' -I${PWD}/third-party/libgeohash -I${PWD}/third-party/patricia # -D_GLIBCXX_DEBUG | ||
###### | ||
# ntopng-1.0_1234.x86_64.rpm | ||
@@ -118,7 +118,7 @@ | ||
RPM_DATA_PKG = $(TARGET)-data-$(NTOPNG_VERSION)-@[email protected] | ||
###### | ||
|
||
-LIB_TARGETS = $(LUA_LIB) | ||
+LIB_TARGETS = | ||
|
||
ifneq ($(HAS_ZEROMQ), 0) | ||
LIB_TARGETS += $(ZEROMQ_LIB) |
12 changes: 0 additions & 12 deletions
12
cross/ntopng/patches/88f6281/001-define-atomic-not-cstatomic.patch
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,53 @@ | ||
SPK_NAME = ntopng | ||
SPK_VERS = 4.2 | ||
SPK_REV = 3 | ||
SPK_ICON = src/$(SPK_NAME).png | ||
SPK_REV = 4 | ||
SPK_ICON = src/ntopng.png | ||
|
||
DEPENDS = cross/$(SPK_NAME) | ||
DEPENDS = cross/ntopng | ||
|
||
SPK_DEPENDS = "redis" | ||
|
||
# toolchains of DSM <=5.2 have outdated compiler (PPC archs except qoriq) | ||
UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) | ||
# cross/libcap not supported: | ||
UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) $(ARMv5_ARCHS) | ||
|
||
MAINTAINER = hgy59 | ||
DESCRIPTION = ntopng is the next generation version of the original ntop, a network traffic probe that monitors network usage. ntopng is based on libpcap and it has been written in a portable way in order to virtually run on every Unix platform, MacOSX and on Windows as well. | ||
CHANGELOG = "1. Update to version 4.2<br/>2. Update nDPI to version 3.4" | ||
DESCRIPTION = High-Speed Web-based Traffic Analysis and Flow Collection. ntopng is a network traffic probe that provides 360° Network visibility, with its ability to gather traffic information from traffic mirrors, NetFlow exporters, SNMP devices, Firewall logs, Intrusion Detection systems. To run ntopng on DSM 7, the installed privileges file must be manually patched after installation or update. | ||
CHANGELOG = "1. Update to version 4.2<br/>2. Update nDPI to version 3.4<br/>3. Add support for DSM 7." | ||
DISPLAY_NAME = ntopng | ||
|
||
HELPURL = https://www.ntop.org/guides/ntopng/index.html | ||
LICENSE = GNU GPLv3 | ||
LICENSE = GPLv3 | ||
|
||
# 'auto' (reserved value) grabs SPK_NAME | ||
SERVICE_USER = auto | ||
SSS_SCRIPT = src/start-stop-status.sh | ||
STARTABLE = yes | ||
SERVICE_PORT = 3000 | ||
SERVICE_USER = auto | ||
SSS_SCRIPT = src/start-stop-status.sh | ||
STARTABLE = yes | ||
|
||
SERVICE_PORT = 3000 | ||
SERVICE_PORT_TITLE = ntopng (HTTP) | ||
|
||
# generate app/config and app/images/*.png | ||
DSM_UI_DIR = app | ||
|
||
# In case script start-stop-status has to run as root on DSM 6, package can | ||
# provide its own conf/privilege file as far as CONF_DIR variable is set. | ||
include ../../mk/spksrc.common.mk | ||
|
||
ifeq ($(call version_lt, ${TCVERSION}, 7.0),1) | ||
# On DSM 6: package runs as root | ||
CONF_DIR = src/conf | ||
else | ||
# On DSM 7: package must be defined to run as package user to allow installation. | ||
# Since ntopng must be run as root, the privilege file must be manually | ||
# patched after installation (and after package update or package repair). | ||
CONF_DIR = src/conf.dsm7 | ||
WIZARDS_DIR = src/wizard.dsm7/ | ||
endif | ||
|
||
POST_STRIP_TARGET = ntopng_extra_install | ||
|
||
|
||
include ../../mk/spksrc.spk.mk | ||
|
||
.PHONY: ntopng_extra_install | ||
ntopng_extra_install: | ||
install -m 755 -d $(STAGING_DIR)/var/data | ||
install -m 755 -d $(STAGING_DIR)/etc | ||
install -m 644 src/ntopng.conf $(STAGING_DIR)/etc/ntopng.conf | ||
install -m 644 src/ntopng.conf $(STAGING_DIR)/var/ntopng.conf | ||
unzip -o src/GeoLite2.mmdb.zip -d $(STAGING_DIR)/share/ntopng/httpdocs/geoip/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"defaults":{ | ||
"run-as": "package" | ||
}, | ||
"username": "sc-ntopng" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.