Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
No results found
Show changes
Commits on Source (8)
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=u-boot-omnia PKG_NAME:=u-boot-omnia
PKG_VERSION:=2019-07 PKG_VERSION:=2019-07.1
PKG_RELEASE:=10 PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://gitlab.nic.cz/turris/turris-omnia-uboot.git PKG_SOURCE_URL:=https://gitlab.nic.cz/turris/turris-omnia-uboot.git
......
...@@ -8,11 +8,11 @@ ...@@ -8,11 +8,11 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=python-libsass PKG_NAME:=python-libsass
PKG_VERSION:=0.19.4 PKG_VERSION:=0.20.0
PKG_RELEASE:=1 PKG_RELEASE:=1
PYPI_NAME:=libsass PYPI_NAME:=libsass
PKG_HASH:=8b5b6d1a7c4ea1d954e0982b04474cc076286493f6af2d0a13c2e950fbe0be95 PKG_HASH:=b7452f1df274b166dc22ee2e9154c4adca619bcbbdf8041a7aa05f372a1dacbc
include $(TOPDIR)/feeds/packages/lang/python/pypi.mk include $(TOPDIR)/feeds/packages/lang/python/pypi.mk
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=foris-controller-sentinel-module PKG_NAME:=foris-controller-sentinel-module
PKG_VERSION:=0.1.2 PKG_VERSION:=0.1.3
PKG_RELEASE:=2 PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://gitlab.nic.cz/turris/foris-controller/foris-controller-sentinel-module.git PKG_SOURCE_URL:=https://gitlab.nic.cz/turris/foris-controller/foris-controller-sentinel-module.git
......
From 2e4fde43c49241e4087e1c7d3ea471a55777ad72 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Mat=C4=9Bjek?= <martin.matejek@nic.cz>
Date: Mon, 20 Jul 2020 19:36:32 +0200
Subject: [PATCH] run sentinel-reload after update of settings
---
foris_controller_backends/sentinel/__init__.py | 4 ++++
tests/test_root/usr/bin/pass | 5 +++++
tests/test_root/usr/bin/sentinel-reload | 1 +
tests/test_sentinel.py | 5 ++++-
4 files changed, 14 insertions(+), 1 deletion(-)
create mode 100755 tests/test_root/usr/bin/pass
create mode 120000 tests/test_root/usr/bin/sentinel-reload
diff --git a/foris_controller_backends/sentinel/__init__.py b/foris_controller_backends/sentinel/__init__.py
index 146cf52..fe44a36 100644
--- a/foris_controller_backends/sentinel/__init__.py
+++ b/foris_controller_backends/sentinel/__init__.py
@@ -25,6 +25,7 @@ import os
from io import StringIO
from secrets import token_hex
+from foris_controller_backends.cmdline import BaseCmdLine
from foris_controller_backends.files import BaseFile
from foris_controller_backends.uci import UciBackend, get_option_named, parse_bool, store_bool
@@ -66,6 +67,9 @@ class SentinelUci:
if token:
backend.set_option("sentinel", "main", "device_token", token)
+ # Reload sentinel components
+ BaseCmdLine._run_command_and_check_retval(["/usr/bin/sentinel-reload"], 0)
+
return True, eula, token if eula != 0 else None
def get_fakepot_settings(self) -> dict:
diff --git a/tests/test_root/usr/bin/pass b/tests/test_root/usr/bin/pass
new file mode 100755
index 0000000..ce30955
--- /dev/null
+++ b/tests/test_root/usr/bin/pass
@@ -0,0 +1,5 @@
+#!/bin/sh
+set -e
+basename "$0" >> /tmp/command_called
+echo PASS
+exit 0
diff --git a/tests/test_root/usr/bin/sentinel-reload b/tests/test_root/usr/bin/sentinel-reload
new file mode 120000
index 0000000..fc80254
--- /dev/null
+++ b/tests/test_root/usr/bin/sentinel-reload
@@ -0,0 +1 @@
+pass
\ No newline at end of file
diff --git a/tests/test_sentinel.py b/tests/test_sentinel.py
index a6f15b2..b3e8cdf 100644
--- a/tests/test_sentinel.py
+++ b/tests/test_sentinel.py
@@ -35,7 +35,7 @@ from foris_controller_testtools.fixtures import (
UCI_CONFIG_DIR_PATH,
)
-from foris_controller_testtools.utils import get_uci_module
+from foris_controller_testtools.utils import get_uci_module, command_was_called
def test_get_settings(file_root_init, infrastructure, uci_configs_init, start_buses):
@@ -123,6 +123,8 @@ def test_update_settings_openwrt(
res = infrastructure.process_message(
{"module": "sentinel", "action": "update_settings", "kind": "request", "data": {"eula": 1}}
)
+ assert command_was_called(["sentinel-reload"])
+
res = infrastructure.process_message(
{"module": "sentinel", "action": "get_settings", "kind": "request"}
)
@@ -143,6 +145,7 @@ def test_update_settings_openwrt(
"data": {"eula": 2, "token": token},
}
)
+ assert command_was_called(["sentinel-reload"])
with uci.UciBackend(UCI_CONFIG_DIR_PATH) as uci_backend:
data = uci_backend.read()
--
2.27.0
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=foris-controller PKG_NAME:=foris-controller
PKG_VERSION:=1.0.16 PKG_VERSION:=1.0.17
PKG_RELEASE:=3 PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://gitlab.nic.cz/turris/foris-controller/foris-controller.git PKG_SOURCE_URL:=https://gitlab.nic.cz/turris/foris-controller/foris-controller.git
...@@ -49,6 +49,7 @@ endef ...@@ -49,6 +49,7 @@ endef
define Package/foris-controller-app/conffiles define Package/foris-controller-app/conffiles
/etc/config/foris-controller /etc/config/foris-controller
/etc/config/foris
endef endef
define Py3Package/foris-controller-app/install define Py3Package/foris-controller-app/install
...@@ -57,6 +58,7 @@ define Py3Package/foris-controller-app/install ...@@ -57,6 +58,7 @@ define Py3Package/foris-controller-app/install
$(INSTALL_DIR) $(1)/etc/config/ $(INSTALL_DIR) $(1)/etc/config/
$(INSTALL_CONF) ./files/foris-controller.conf $(1)/etc/config/foris-controller $(INSTALL_CONF) ./files/foris-controller.conf $(1)/etc/config/foris-controller
touch $(1)/etc/config/foris
ifeq ($(CONFIG_TARGET_mvebu_cortexa53_DEVICE_cznic-mox),y) ifeq ($(CONFIG_TARGET_mvebu_cortexa53_DEVICE_cznic-mox),y)
sed -i 's|#\(option single true\)|\1|' $(1)/etc/config/foris-controller sed -i 's|#\(option single true\)|\1|' $(1)/etc/config/foris-controller
endif endif
......
From f58288e88e1e8ed99e4b3b280555ff7a52fb2cbf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Mat=C4=9Bjek?= <martin.matejek@nic.cz>
Date: Mon, 27 Jul 2020 15:12:02 +0200
Subject: [PATCH] wifi: fix reading of 802.11ac HT & VHT modes
Don't try to read 802.11ac HT modes on non-ac wifi card
---
foris_controller_backends/wifi/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/foris_controller_backends/wifi/__init__.py b/foris_controller_backends/wifi/__init__.py
index f68da91..a031b8e 100644
--- a/foris_controller_backends/wifi/__init__.py
+++ b/foris_controller_backends/wifi/__init__.py
@@ -121,7 +121,7 @@ class WifiUci(object):
return [
{
"available_channels": channels[hwmode],
- "available_htmodes": htmodes[MODES_MAP[hwmode]],
+ "available_htmodes": htmodes.get(MODES_MAP[hwmode], [DEFAULT_HTMODE]),
"hwmode": hwmode,
}
for hwmode in ["11g", "11a"]
--
2.25.1
...@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk ...@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=foris PKG_NAME:=foris
PKG_VERSION:=101.1 PKG_VERSION:=101.1
PKG_RELEASE:=1 PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://gitlab.nic.cz/turris/foris/foris.git PKG_SOURCE_URL:=https://gitlab.nic.cz/turris/foris/foris.git
...@@ -53,10 +53,6 @@ define run_foris_makefile ...@@ -53,10 +53,6 @@ define run_foris_makefile
endef endef
Hooks/Compile/Pre += run_foris_makefile Hooks/Compile/Pre += run_foris_makefile
define Package/foris/conffiles
/etc/config/foris
endef
define Py3Package/foris/filespec define Py3Package/foris/filespec
+|$(PYTHON3_PKG_DIR) +|$(PYTHON3_PKG_DIR)
-|$(PYTHON3_PKG_DIR)/foris/locale/* -|$(PYTHON3_PKG_DIR)/foris/locale/*
...@@ -83,9 +79,6 @@ define Py3Package/foris/install ...@@ -83,9 +79,6 @@ define Py3Package/foris/install
$(INSTALL_BIN) ./files/lighttpd-dynamic-conf $(1)/usr/share/foris/lighttpd-dynamic-conf $(INSTALL_BIN) ./files/lighttpd-dynamic-conf $(1)/usr/share/foris/lighttpd-dynamic-conf
$(INSTALL_BIN) ./files/foris-config-cgi $(1)/usr/share/foris/foris-config-cgi $(INSTALL_BIN) ./files/foris-config-cgi $(1)/usr/share/foris/foris-config-cgi
$(SED) 's%/usr/lib/python...%/usr/lib/python$(PYTHON3_VERSION)%g' $(1)/usr/share/foris/lighttpd-dynamic-conf $(SED) 's%/usr/lib/python...%/usr/lib/python$(PYTHON3_VERSION)%g' $(1)/usr/share/foris/lighttpd-dynamic-conf
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DATA) ./files/foris.conf $(1)/etc/config/foris
endef endef
define Package/foris/postinst define Package/foris/postinst
......