From 51968263ff9bfac91f606c6108575a6f8812d05a Mon Sep 17 00:00:00 2001 From: az Date: Fri, 26 May 2023 12:00:22 +0200 Subject: [PATCH] Revert "[skip-ci]Update gopass/gopass-jsonapi Version 1.15.5; add check for SHA256sum to gopass-jsonapi download" This reverts commit 0c24b094897f1aee2b880d639c7f7eeedd8bab48. --- .../provs/desktop/infrastructure/Gopass.kt | 6 +++--- .../provs/desktop/infrastructure/GopassBridge.kt | 10 ++++------ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/main/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/Gopass.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/Gopass.kt index 37be9fb..d648574 100644 --- a/src/main/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/Gopass.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/Gopass.kt @@ -11,9 +11,9 @@ import org.domaindrivenarchitecture.provs.framework.ubuntu.web.base.downloadFrom fun Prov.installGopass( - version: String = "1.15.5", + version: String = "1.12.7", enforceVersion: Boolean = false, - sha256sum: String = "23ec10015c2643f22cb305859eb36d671094d463d2eb1798cc675e7bb06f4b39" + sha256sum: String = "0824d5110ff1e68bff1ba10c1be63acb67cb1ad8e3bccddd6b6fc989608beca8" // checksum for sha256sum version 8.30 (e.g. ubuntu 20.04) ) = taskWithResult { if (isPackageInstalled("gopass") && !enforceVersion) { @@ -45,7 +45,7 @@ fun Prov.installGopass( fun Prov.configureGopass(gopassRootFolder: String? = null, publicGpgKey: Secret? = null) = taskWithResult { - val configFile = ".config/gopass/config" + val configFile = ".config/gopass/config.yml" if (checkFile(configFile)) { return@taskWithResult ProvResult(true, out = "Gopass already configured in file $configFile") diff --git a/src/main/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/GopassBridge.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/GopassBridge.kt index 5dd3192..21c9e6d 100644 --- a/src/main/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/GopassBridge.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/GopassBridge.kt @@ -21,12 +21,10 @@ fun Prov.downloadGopassBridge() = task { // needs manual installation with: firefox Downloads/gopass_bridge-0.8.0-fx.xpi } -fun Prov.installGopassJsonApi( - sha256sum: String = "ec9976e39a468428ae2eb1e2e0b9ceccba7f60d66b8097e2425b0c07f4fed108" -) = taskWithResult { +fun Prov.installGopassJsonApi() = taskWithResult { // see https://github.com/gopasspw/gopass-jsonapi - val gopassJsonApiVersion = "1.15.5" - val requiredGopassVersion = "1.15.5" + val gopassJsonApiVersion = "1.11.1" + val requiredGopassVersion = "1.12.7" val filename = "gopass-jsonapi_${gopassJsonApiVersion}_linux_amd64.deb" val downloadUrl = "-L https://github.com/gopasspw/gopass-jsonapi/releases/download/v$gopassJsonApiVersion/$filename" val downloadDir = "${userHome()}Downloads" @@ -37,7 +35,7 @@ fun Prov.installGopassJsonApi( if (checkGopassVersion(requiredGopassVersion)) { aptInstall("git gnupg2") // required dependencies createDir(downloadDir) - downloadFromURL(downloadUrl, filename, downloadDir, sha256sum = sha256sum) + downloadFromURL(downloadUrl, filename, downloadDir) cmd("dpkg -i $downloadDir/$filename", sudo = true) } else { ProvResult(