Merge pull request #614 from LibreQoE/rchac-patch-6

Fix python pip issue with Ubuntu Server 24.04
This commit is contained in:
Robert Chacón
2024-12-20 07:10:27 -08:00
committed by GitHub
4 changed files with 17 additions and 6 deletions

View File

@@ -11,3 +11,4 @@ waitress
setuptools >= 65.5.1
apscheduler
deepdiff
routeros_api

View File

@@ -1 +1 @@
1.5-BETA5
1.5-BETA6

View File

@@ -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"
@@ -71,6 +71,18 @@ 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
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

View File

@@ -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)