Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

edgesec: bump to v0.1.0-alpha.0 #21

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 30 additions & 6 deletions edgesec/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=edgesec
PKG_VERSION:=0.0.8
PKG_RELEASE:=4
PKG_VERSION:=0.1.0-alpha.0
PKG_RELEASE:=1

# Use the following settings for testing with unreleased git commits
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/nqminds/edgesec.git
PKG_SOURCE_DATE:=2022-07-28
PKG_SOURCE_VERSION:=20e12a9f295b121dfeba7829622a050a5985452e
# Patches over official v0.1.0-alpha.0 release:
# - download uthash from GitHub.com during OpenWRT download step
# - add _BSD_SOURCE defines for including libpcap
# - fix missing non-standard ISO C features (e.g. lots of _POSIX_C_SOURCE)
# - fix OpenWRT UCI segmentation fault
PKG_SOURCE_DATE:=2022-11-11
PKG_SOURCE_VERSION:=321a9be655a7462e8bf8c3e8cccba456dd39cceb

# PKG_SOURCE:=edgesec-$(PKG_VERSION).tar.gz
# PKG_SOURCE_URL_FILE:=v$(PKG_VERSION).tar.gz
# PKG_SOURCE_URL:=https://github.com/nqminds/edgesec/archive/refs/tags
# PKG_HASH:=fa467dd2445f182d9fb0d1a2b6e51791a9bc4fbcbf46fb61c28175a66e8c66c3

PKG_MAINTAINER:=Alexandru Mereacre
PKG_LICENSE:=MIT
Expand Down Expand Up @@ -60,7 +71,8 @@ CMAKE_OPTIONS += \
-DBUILD_UUID_LIB=OFF \
-DUSE_CLEANER_MIDDLEWARE=OFF \
-DUSE_HEADER_MIDDLEWARE=ON \
-DUSE_PCAP_MIDDLEWARE=OFF
-DUSE_PCAP_MIDDLEWARE=OFF \
-DEP_DOWNLOAD_DIR=$(DL_DIR)

define Package/edgesec/install
$(INSTALL_DIR) $(1)/usr/bin
Expand All @@ -72,11 +84,23 @@ define Package/edgesec/install

$(INSTALL_DIR) $(1)/etc/edgesec
$(INSTALL_CONF) ./files/config.ini $(1)/etc/edgesec

# default folder for storing edgesec databases
# Warning!! Will error if `/srv` does not exist
# Normally, this should be external storage, not internal storage
$(INSTALL_DIR) $(1)/srv/edgesec
endef

# Download edgesec uthash dependency during download step in DL_DIR
# Make sure version and hash matches what edgesec expects
UTHASH_VERION:=2.1.0
UTHASH_FILE:=uthash-$(UTHASH_VERION).tar.gz
define Download/uthash
FILE:=$(UTHASH_FILE)
URL_FILE:=v$(UTHASH_VERION).tar.gz
URL:=https://github.com/troydhanson/uthash/archive/refs/tags
HASH:=152ccd8e64d0f495377232e3964d06c7ec8bb8c3fbd3217f8a5702614f9a669e
endef

$(eval $(call Download,uthash))
$(eval $(call BuildPackage,edgesec))
7 changes: 4 additions & 3 deletions edgesec/files/config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ execAp = true
execRadius = true
execDhcp = true
execCapture = true
execMdnsForward = true
execMdnsForward = false
execFirewall = true
setIpForward = true
connectionDbPath = "/srv/edgesec/connection.sqlite"
Expand All @@ -27,6 +27,7 @@ filter = ""
promiscuous = false
bufferTimeout = 10
immediate = false
middlewareParams = ""

[supervisor]
supervisorControlPort = 32001
Expand All @@ -51,8 +52,8 @@ wpaKeyMgmt = "WPA-PSK"
rsnPairwise = "CCMP"
ctrlInterface = "/var/run/hostapd"
macaddrAcl = 2
dynamicVlan = 1
vlanFile = "/srv/hostapd.vlan"
dynamicVlan = 2
vlanFile = "/var/run/hostapd-wlan1.vlan"
loggerStdout = -1
loggerStdoutLevel = 0
loggerSyslog = -1
Expand Down