From 3515b306f8b82df840010d11f2ba2ba7f291abae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Chac=C3=B3n?= Date: Thu, 19 Dec 2024 04:04:07 -0700 Subject: [PATCH 1/7] Add missing files from .deb --- src/build_dpkg.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/build_dpkg.sh b/src/build_dpkg.sh index 6dd029c5..2834104e 100755 --- a/src/build_dpkg.sh +++ b/src/build_dpkg.sh @@ -20,7 +20,7 @@ DEBIAN_DIR=$DPKG_DIR/DEBIAN LQOS_DIR=$DPKG_DIR/opt/libreqos/src ETC_DIR=$DPKG_DIR/etc MOTD_DIR=$DPKG_DIR/etc/update-motd.d -LQOS_FILES="integrationCommon.py integrationPowercode.py integrationRestHttp.py integrationSonar.py integrationSplynx.py integrationUISP.py integrationSonar.py LibreQoS.py lqos.example lqTools.py mikrotikFindIPv6.py network.example.json pythonCheck.py README.md scheduler.py ShapedDevices.example.csv lqos.example ../requirements.txt" +LQOS_FILES="csvToNetworkJSON.py integrationCommon.py integrationPowercode.py integrationRestHttp.py integrationSonar.py integrationSplynx.py integrationUISP.py integrationSonar.py LibreQoS.py lqos.example lqTools.py mikrotikFindIPv6.py network.example.json pythonCheck.py README.md scheduler.py ShapedDevices.example.csv mikrotikDHCPRouterList.csv integrationUISPbandwidths.template.csv manualNetwork.template.csv integrationUISProutes.template.csv integrationSplynxBandwidths.template.csv lqos.example ../requirements.txt" LQOS_BIN_FILES="lqos_scheduler.service.example lqosd.service.example" RUSTPROGS="lqosd lqtop xdp_iphash_to_cpu_cmdline xdp_pping lqusers lqos_setup lqos_map_perf uisp_integration lqos_support_tool" -- knotmirror 0.0.1 From af9456d3f91060107c7465bcf40a79af6d488c36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Chac=C3=B3n?= Date: Thu, 19 Dec 2024 04:11:43 -0700 Subject: [PATCH 2/7] Fix ModuleNotFoundError Fixes errors: - ModuleNotFoundError: No module named 'binpacking' - ModuleNotFoundError: No module named 'apscheduler' --- src/build_dpkg.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/build_dpkg.sh b/src/build_dpkg.sh index 2834104e..786dd934 100755 --- a/src/build_dpkg.sh +++ b/src/build_dpkg.sh @@ -71,6 +71,13 @@ echo "pushd /opt/libreqos" >> postinst # - Setup Python dependencies as a post-install task echo "PIP_BREAK_SYSTEM_PACKAGES=1 python3 -m pip install -r src/requirements.txt" >> postinst echo "sudo PIP_BREAK_SYSTEM_PACKAGES=1 python3 -m pip install -r src/requirements.txt" >> postinst +# - Setup Python dependencies as a post-install task - handle issue with two packages on Ubuntu Server 24.04 +echo "PIP_BREAK_SYSTEM_PACKAGES=1 pip uninstall binpacking --yes" >> postinst +echo "sudo PIP_BREAK_SYSTEM_PACKAGES=1 pip uninstall binpacking --yes" >> postinst +echo "sudo PIP_BREAK_SYSTEM_PACKAGES=1 pip install binpacking" >> postinst +echo "PIP_BREAK_SYSTEM_PACKAGES=1 pip uninstall apscheduler --yes" >> postinst +echo "sudo PIP_BREAK_SYSTEM_PACKAGES=1 pip uninstall apscheduler --yes" >> postinst +echo "sudo PIP_BREAK_SYSTEM_PACKAGES=1 pip install apscheduler" >> postinst # - Run lqsetup echo "/opt/libreqos/src/bin/lqos_setup" >> postinst # - Setup the services -- knotmirror 0.0.1 From e02d1c4b7e67220f9b91db245651eb29409b9d4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Chac=C3=B3n?= Date: Thu, 19 Dec 2024 04:44:21 -0700 Subject: [PATCH 3/7] Update requirements.txt --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 385f1bb6..7110b626 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,3 +11,4 @@ waitress setuptools >= 65.5.1 apscheduler deepdiff +routeros_api -- knotmirror 0.0.1 From 0ffd8093fedf846a91697d719104390d91cac267 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Chac=C3=B3n?= Date: Thu, 19 Dec 2024 04:45:15 -0700 Subject: [PATCH 4/7] Update build_dpkg.sh --- src/build_dpkg.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/build_dpkg.sh b/src/build_dpkg.sh index 786dd934..1c5af710 100755 --- a/src/build_dpkg.sh +++ b/src/build_dpkg.sh @@ -78,6 +78,9 @@ echo "sudo PIP_BREAK_SYSTEM_PACKAGES=1 pip install binpacking" >> postinst echo "PIP_BREAK_SYSTEM_PACKAGES=1 pip uninstall apscheduler --yes" >> postinst echo "sudo PIP_BREAK_SYSTEM_PACKAGES=1 pip uninstall apscheduler --yes" >> postinst echo "sudo PIP_BREAK_SYSTEM_PACKAGES=1 pip install apscheduler" >> postinst +echo "PIP_BREAK_SYSTEM_PACKAGES=1 pip uninstall deepdiff --yes" >> postinst +echo "sudo PIP_BREAK_SYSTEM_PACKAGES=1 pip uninstall deepdiff --yes" >> postinst +echo "sudo PIP_BREAK_SYSTEM_PACKAGES=1 pip install deepdiff" >> postinst # - Run lqsetup echo "/opt/libreqos/src/bin/lqos_setup" >> postinst # - Setup the services -- knotmirror 0.0.1 From de022079f278e543a5fced79b9047ff3b5e64dd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Chac=C3=B3n?= Date: Fri, 20 Dec 2024 07:45:27 -0700 Subject: [PATCH 5/7] Update VERSION_STRING --- src/VERSION_STRING | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/VERSION_STRING b/src/VERSION_STRING index 1c2da11d..b01cbb34 100644 --- a/src/VERSION_STRING +++ b/src/VERSION_STRING @@ -1 +1 @@ -1.5-BETA5 +1.5-BETA6 -- knotmirror 0.0.1 From d5176979153753c05384488c6e8e40176abd1340 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Chac=C3=B3n?= Date: Fri, 20 Dec 2024 07:47:50 -0700 Subject: [PATCH 6/7] Update build_dpkg.sh --- src/build_dpkg.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/build_dpkg.sh b/src/build_dpkg.sh index 1c5af710..ee226be6 100755 --- a/src/build_dpkg.sh +++ b/src/build_dpkg.sh @@ -81,6 +81,8 @@ echo "sudo PIP_BREAK_SYSTEM_PACKAGES=1 pip install apscheduler" >> postinst echo "PIP_BREAK_SYSTEM_PACKAGES=1 pip uninstall deepdiff --yes" >> postinst echo "sudo PIP_BREAK_SYSTEM_PACKAGES=1 pip uninstall deepdiff --yes" >> postinst echo "sudo PIP_BREAK_SYSTEM_PACKAGES=1 pip install deepdiff" >> postinst +# Ensure folder permissions are correct post-install +echo "sudo chown -R $USER /opt/libreqos" >> postinst # - Run lqsetup echo "/opt/libreqos/src/bin/lqos_setup" >> postinst # - Setup the services -- knotmirror 0.0.1 From 8a2415bf4cd0cf30d5b29a543430ff231c89a0d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Chac=C3=B3n?= Date: Fri, 20 Dec 2024 08:00:36 -0700 Subject: [PATCH 7/7] Update main.rs --- src/rust/lqos_setup/src/main.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/rust/lqos_setup/src/main.rs b/src/rust/lqos_setup/src/main.rs index 2e8e0986..be02a2dd 100644 --- a/src/rust/lqos_setup/src/main.rs +++ b/src/rust/lqos_setup/src/main.rs @@ -119,10 +119,8 @@ fn write_network_json() { fs::write(NETWORK_JSON, output).expect("Unable to write file"); } -const EMPTY_SHAPED_DEVICES: &str = "# This is a comment -Circuit ID,Circuit Name,Device ID,Device Name,Parent Node,MAC,IPv4,IPv6,Download Min Mbps,Upload Min Mbps,Download Max Mbps,Upload Max Mbps,Comment -# This is another comment -\"9999\",\"968 Circle St., Gurnee, IL 60031\",1,Device 1,AP_7,,\"100.64.1.2, 100.64.0.14\",,25,5,500,500,"; +const EMPTY_SHAPED_DEVICES: &str = "Circuit ID,Circuit Name,Device ID,Device Name,Parent Node,MAC,IPv4,IPv6,Download Min Mbps,Upload Min Mbps,Download Max Mbps,Upload Max Mbps,Comment +\"9999\",\"968 Circle St., Gurnee, IL 60031\",1,Device 1,,,\"100.64.1.2, 100.64.0.14\",,25,5,500,500,"; fn write_shaped_devices() { fs::write(SHAPED_DEVICES, EMPTY_SHAPED_DEVICES) -- knotmirror 0.0.1