diff --git a/deployment/Single Host/Station-Captain/properties.json b/deployment/Single Host/Station-Captain/properties.json index 99814b9e6..b5715eaa3 100644 --- a/deployment/Single Host/Station-Captain/properties.json +++ b/deployment/Single Host/Station-Captain/properties.json @@ -1,6 +1,6 @@ { "packageName":"oqm-manager-station+captain", - "version":"2.4.2", + "version":"2.4.3", "description":"Utility for setting up and maintaining an instance of Open QuarterMaster.", "maintainer": { "name":"EBP" diff --git a/deployment/Single Host/Station-Captain/src/lib/CertsUtils.py b/deployment/Single Host/Station-Captain/src/lib/CertsUtils.py index 80c2ca0d2..c7e962d91 100644 --- a/deployment/Single Host/Station-Captain/src/lib/CertsUtils.py +++ b/deployment/Single Host/Station-Captain/src/lib/CertsUtils.py @@ -18,6 +18,8 @@ from LogUtils import * from ipaddress import * +from PackageManagement import PackageManagement + log = LogUtils.setupLogger(__name__) class CertsUtils: @@ -72,6 +74,12 @@ def ensureCaInstalled(force: bool = False) -> (bool, str): ffPoliciesFile = "/etc/firefox/policies/policies.json" ffPoliciesDir = os.path.basename(ffPoliciesFile) ffCertsDir = "/etc/firefox/policies/certificates/" + elif PackageManagement.checkFirefoxSnapInstalled(): + log.debug("Firefox probably installed via newer snap.") + ffInstalled = True + ffPoliciesFile = "/etc/firefox/policies/policies.json" + ffPoliciesDir = os.path.basename(ffPoliciesFile) + ffCertsDir = "/etc/firefox/policies/certificates/" else: log.debug("Firefox not found on system.") diff --git a/deployment/Single Host/Station-Captain/src/lib/PackageManagement.py b/deployment/Single Host/Station-Captain/src/lib/PackageManagement.py index a1ccf1f7a..3a70b9ef5 100644 --- a/deployment/Single Host/Station-Captain/src/lib/PackageManagement.py +++ b/deployment/Single Host/Station-Captain/src/lib/PackageManagement.py @@ -1,6 +1,7 @@ import os import subprocess import platform +import re from ServiceUtils import * from LogUtils import * @@ -220,3 +221,22 @@ def ensureOnlyPluginsInstalled(pluginList:list) -> (bool, str): PackageManagement.installPackages(pluginList) ServiceUtils.doServiceCommand(ServiceStateCommand.restart, ServiceUtils.SERVICE_ALL) + + @staticmethod + def checkSnapInstalled(): + packageInfo = PackageManagement.getPackageInfo("snapd") + + + @staticmethod + def checkFirefoxSnapInstalled() -> (bool, str): + log.debug("Checking if ") + snapInfoResult = subprocess.run(['snap', 'info', 'firefox'], shell=False, capture_output=True, text=True, check=False) + # print("Firefox snap output: " + snapInfoResult.stdout) + if snapInfoResult.returncode != 0: + # print("snap command for firefox failed") + return False + + if re.search("^installed: ", snapInfoResult.stdout, re.MULTILINE): + return True + # print("Installed not found.") + return False diff --git a/software/oqm-core-api/build.gradle b/software/oqm-core-api/build.gradle index 883c3c94c..d373bae9c 100644 --- a/software/oqm-core-api/build.gradle +++ b/software/oqm-core-api/build.gradle @@ -45,7 +45,7 @@ dependencies { // https://mvnrepository.com/artifact/tech.units/indriya // https://unitsofmeasurement.gitbook.io/uom-guide/getting-started/getting-started-with-indriya - implementation 'tech.units:indriya:2.2' + implementation 'tech.units:indriya:2.2.1' implementation 'systems.uom:systems-common:2.1' // https://mvnrepository.com/artifact/tech.uom.lib/uom-lib-jackson implementation 'tech.uom.lib:uom-lib-jackson:2.1' @@ -65,7 +65,7 @@ dependencies { testImplementation group: 'io.rest-assured', name: 'rest-assured' testImplementation 'io.quarkus:quarkus-smallrye-jwt-build' testImplementation 'io.quarkus:quarkus-test-kafka-companion' - testImplementation 'net.datafaker:datafaker:2.4.1' + testImplementation 'net.datafaker:datafaker:2.4.2' testImplementation 'org.assertj:assertj-core:3.26.3' testImplementation 'io.jaegertracing:jaeger-testcontainers:0.7.0' } diff --git a/software/oqm-core-api/src/test/java/tech/ebp/oqm/core/api/model/object/storage/items/storedWrapper/amountStored/ListAmountStoredWrapperValidationTest.java b/software/oqm-core-api/src/test/java/tech/ebp/oqm/core/api/model/object/storage/items/storedWrapper/amountStored/ListAmountStoredWrapperValidationTest.java index c111440f7..dfc3e0f72 100644 --- a/software/oqm-core-api/src/test/java/tech/ebp/oqm/core/api/model/object/storage/items/storedWrapper/amountStored/ListAmountStoredWrapperValidationTest.java +++ b/software/oqm-core-api/src/test/java/tech/ebp/oqm/core/api/model/object/storage/items/storedWrapper/amountStored/ListAmountStoredWrapperValidationTest.java @@ -21,7 +21,7 @@ public static Stream getInvalid() { Arguments.of( new ListAmountStoredWrapper(Units.DAY), new HashMap<>() {{ - put("parentUnit", "Invalid unit. day not applicable for item storage."); + put("parentUnit", "Invalid unit. d not applicable for item storage."); }} ) ); diff --git a/software/oqm-core-base-station/build.gradle b/software/oqm-core-base-station/build.gradle index 961e8d8e3..d1d4b0ecc 100644 --- a/software/oqm-core-base-station/build.gradle +++ b/software/oqm-core-base-station/build.gradle @@ -33,8 +33,8 @@ dependencies { implementation 'org.apache.commons:commons-io:1.3.2' implementation 'org.apache.commons:commons-text:1.12.0' - implementation group: 'org.jsoup', name: 'jsoup', version: '1.18.1' - implementation 'uk.org.okapibarcode:okapibarcode:0.4.8' + implementation group: 'org.jsoup', name: 'jsoup', version: '1.18.3' + implementation 'uk.org.okapibarcode:okapibarcode:0.4.9' implementation 'com.itextpdf:html2pdf:6.0.0' //webjars @@ -44,9 +44,9 @@ dependencies { testImplementation 'io.quarkus:quarkus-junit5' testImplementation "org.junit.jupiter:junit-jupiter-params:5.11.3" testImplementation 'io.rest-assured:rest-assured' - testImplementation 'net.datafaker:datafaker:2.4.1' + testImplementation 'net.datafaker:datafaker:2.4.2' - testImplementation 'com.microsoft.playwright:playwright:1.48.0' + testImplementation 'com.microsoft.playwright:playwright:1.49.0' testImplementation 'com.deque.html.axe-core:playwright:4.10.1' } diff --git a/software/plugins/external-item-search/build.gradle b/software/plugins/external-item-search/build.gradle index 4241da967..60cb0c7c1 100644 --- a/software/plugins/external-item-search/build.gradle +++ b/software/plugins/external-item-search/build.gradle @@ -28,7 +28,7 @@ dependencies { implementation 'io.quarkus:quarkus-container-image-jib' implementation 'io.quarkus:quarkus-arc' - implementation group: 'org.jsoup', name: 'jsoup', version: '1.18.1' + implementation group: 'org.jsoup', name: 'jsoup', version: '1.18.3' implementation 'io.quarkiverse.wiremock:quarkus-wiremock:1.4.0'