From f55b777f122a6e20f68392a0c42aedafa2f86e7e Mon Sep 17 00:00:00 2001 From: Brian <18603393+brian6932@users.noreply.github.com> Date: Sat, 4 Nov 2023 20:20:20 -0400 Subject: [PATCH 1/5] OpenZFS: Add version 2.2.0rc5 --- bucket/openzfs.json | 54 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 bucket/openzfs.json diff --git a/bucket/openzfs.json b/bucket/openzfs.json new file mode 100644 index 000000000..14a69f608 --- /dev/null +++ b/bucket/openzfs.json @@ -0,0 +1,54 @@ +{ + "version": "2.2.0rc5", + "description": "ZFS filesystem driver for Windows", + "homepage": "https://github.com/openzfsonwindows/openzfs", + "license": "CDDL", + "url": "https://github.com/openzfsonwindows/openzfs/releases/download/zfswin-2.2.0rc5/OpenZFSOnWindows-debug-2.2.0rc5.exe", + "hash": "8b70f59c4d9890510c08aa234d7f04d6dc069dd91fdc54773927851beedda907", + "innosetup": true, + "pre_install": [ + "if (!$global) { Write-Host -Foreground Red \"$app should be installed globally.\"; break }", + "'symbols', 'CODE_OF_CONDUCT.md', 'HowToDebug.txt', 'README,*.md' | ForEach-Object { Remove-Item -Recurse \"$dir\\$_\" }" + ], + "installer": { + "script": [ + "# Add cert first before installing driver", + "$cert = (Get-AuthenticodeSignature \"$dir\\OpenZFS.cat\").SignerCertificate", + "if (!(Get-ChildItem Cert:/CurrentUser/TrustedPublisher -Recurse | Where-Object { $_.Thumbprint -eq $cert.Thumbprint })) {", + " Write-Host 'Cert not found, adding to trusted store...'", + " $store = [System.Security.Cryptography.X509Certificates.X509Store]::new([Security.Cryptography.X509Certificates.StoreName]::TrustedPublisher, [Security.Cryptography.X509Certificates.StoreLocation]::LocalMachine)", + " $store.Open([System.Security.Cryptography.X509Certificates.OpenFlags]::ReadWrite)", + " $store.Add($cert.Export([System.Security.Cryptography.X509Certificates.X509ContentType]::Cert))", + " $store.Close()", + "}", + "", + "Write-Host 'Installing driver...'", + "Invoke-ExternalCommand pnputil -ArgumentList @('/add-driver', \"$dir\\OpenZFS.inf\", '/install') -RunAs -ContinueExitCodes @{ 3010 = 'A system reboot is required to finalize the installation.' } | Out-Null" + ] + }, + "uninstaller": { + "script": [ + "if ($cmd -ne 'uninstall') { return }", + "Invoke-ExternalCommand pnputil -ArgumentList @('/remove-device', 'ROOT\\OpenZFS\\0000') -RunAs -ContinueExitCodes @{ 3010 = 'A system reboot is required to finalize the uninstallation.' } | Out-Null", + "pnputil.exe /delete-driver \"$dir\\OpenZFS.inf\" /uninstall | Out-Null", + "sc.exe delete OpenZFS | Out-Null" + ] + }, + "bin": [ + "kstat.exe", + "raidz_test.exe", + "zdb.exe", + "zfs.exe", + "zfsinstaller.exe", + "zpool.exe", + "zstreamdump.exe" + ], + "checkver": { + "url": "https://api.github.com/repositories/283909729/releases/latest", + "jsonpath": "$.tag_name", + "regex": "\\Azfswin-([\\w.]+)\\Z" + }, + "autoupdate": { + "url": "https://github.com/openzfsonwindows/openzfs/releases/download/zfswin-$version/OpenZFSOnWindows-debug-$version.exe" + } +} From 538ef3b46f884fa97b3a24dd0e0cb906adb5b6f9 Mon Sep 17 00:00:00 2001 From: Brian <18603393+brian6932@users.noreply.github.com> Date: Sat, 4 Nov 2023 21:04:17 -0400 Subject: [PATCH 2/5] OpenZFS: Add namespace --- bucket/openzfs.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bucket/openzfs.json b/bucket/openzfs.json index 14a69f608..c7ea8a891 100644 --- a/bucket/openzfs.json +++ b/bucket/openzfs.json @@ -12,13 +12,14 @@ ], "installer": { "script": [ + "using namespace System.Security.Cryptography.X509Certificates", "# Add cert first before installing driver", "$cert = (Get-AuthenticodeSignature \"$dir\\OpenZFS.cat\").SignerCertificate", "if (!(Get-ChildItem Cert:/CurrentUser/TrustedPublisher -Recurse | Where-Object { $_.Thumbprint -eq $cert.Thumbprint })) {", " Write-Host 'Cert not found, adding to trusted store...'", - " $store = [System.Security.Cryptography.X509Certificates.X509Store]::new([Security.Cryptography.X509Certificates.StoreName]::TrustedPublisher, [Security.Cryptography.X509Certificates.StoreLocation]::LocalMachine)", - " $store.Open([System.Security.Cryptography.X509Certificates.OpenFlags]::ReadWrite)", - " $store.Add($cert.Export([System.Security.Cryptography.X509Certificates.X509ContentType]::Cert))", + " $store = [X509Store]::new([StoreName]::TrustedPublisher, [StoreLocation]::LocalMachine)", + " $store.Open([OpenFlags]::ReadWrite)", + " $store.Add($cert.Export([X509ContentType]::Cert))", " $store.Close()", "}", "", From 53f7b3e68a6a2012a22bf2969da04dfb88bd1ea7 Mon Sep 17 00:00:00 2001 From: Brian <18603393+brian6932@users.noreply.github.com> Date: Sat, 4 Nov 2023 21:50:06 -0400 Subject: [PATCH 3/5] Reduce escapes --- bucket/openzfs.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bucket/openzfs.json b/bucket/openzfs.json index c7ea8a891..5055ca790 100644 --- a/bucket/openzfs.json +++ b/bucket/openzfs.json @@ -14,7 +14,7 @@ "script": [ "using namespace System.Security.Cryptography.X509Certificates", "# Add cert first before installing driver", - "$cert = (Get-AuthenticodeSignature \"$dir\\OpenZFS.cat\").SignerCertificate", + "$cert = (Get-AuthenticodeSignature \"$dir/OpenZFS.cat\").SignerCertificate", "if (!(Get-ChildItem Cert:/CurrentUser/TrustedPublisher -Recurse | Where-Object { $_.Thumbprint -eq $cert.Thumbprint })) {", " Write-Host 'Cert not found, adding to trusted store...'", " $store = [X509Store]::new([StoreName]::TrustedPublisher, [StoreLocation]::LocalMachine)", @@ -24,14 +24,14 @@ "}", "", "Write-Host 'Installing driver...'", - "Invoke-ExternalCommand pnputil -ArgumentList @('/add-driver', \"$dir\\OpenZFS.inf\", '/install') -RunAs -ContinueExitCodes @{ 3010 = 'A system reboot is required to finalize the installation.' } | Out-Null" + "Invoke-ExternalCommand pnputil -ArgumentList @('/add-driver', \"$dir/OpenZFS.inf\", '/install') -RunAs -ContinueExitCodes @{ 3010 = 'A system reboot is required to finalize the installation.' } | Out-Null" ] }, "uninstaller": { "script": [ "if ($cmd -ne 'uninstall') { return }", "Invoke-ExternalCommand pnputil -ArgumentList @('/remove-device', 'ROOT\\OpenZFS\\0000') -RunAs -ContinueExitCodes @{ 3010 = 'A system reboot is required to finalize the uninstallation.' } | Out-Null", - "pnputil.exe /delete-driver \"$dir\\OpenZFS.inf\" /uninstall | Out-Null", + "pnputil.exe /delete-driver \"$dir/OpenZFS.inf\" /uninstall | Out-Null", "sc.exe delete OpenZFS | Out-Null" ] }, From 635d75da15a0ab382fa67891cd8a3b357c4c1dc4 Mon Sep 17 00:00:00 2001 From: Brian <18603393+brian6932@users.noreply.github.com> Date: Sun, 5 Nov 2023 22:53:11 -0500 Subject: [PATCH 4/5] Fix store scopes --- bucket/openzfs.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bucket/openzfs.json b/bucket/openzfs.json index 5055ca790..d197ad4e0 100644 --- a/bucket/openzfs.json +++ b/bucket/openzfs.json @@ -17,7 +17,7 @@ "$cert = (Get-AuthenticodeSignature \"$dir/OpenZFS.cat\").SignerCertificate", "if (!(Get-ChildItem Cert:/CurrentUser/TrustedPublisher -Recurse | Where-Object { $_.Thumbprint -eq $cert.Thumbprint })) {", " Write-Host 'Cert not found, adding to trusted store...'", - " $store = [X509Store]::new([StoreName]::TrustedPublisher, [StoreLocation]::LocalMachine)", + " $store = [X509Store]::new([StoreName]::TrustedPublisher, [StoreLocation]::CurrentUser)", " $store.Open([OpenFlags]::ReadWrite)", " $store.Add($cert.Export([X509ContentType]::Cert))", " $store.Close()", From 43c88bcf1f8e460c48f8843934bec6fd74105c89 Mon Sep 17 00:00:00 2001 From: Brian <18603393+brian6932@users.noreply.github.com> Date: Tue, 14 Nov 2023 03:54:55 -0500 Subject: [PATCH 5/5] openzfs-np: Update to version 2.2.0rc6 --- bucket/{openzfs.json => openzfs-np.json} | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) rename bucket/{openzfs.json => openzfs-np.json} (80%) diff --git a/bucket/openzfs.json b/bucket/openzfs-np.json similarity index 80% rename from bucket/openzfs.json rename to bucket/openzfs-np.json index d197ad4e0..d4a68dbaa 100644 --- a/bucket/openzfs.json +++ b/bucket/openzfs-np.json @@ -1,14 +1,14 @@ { - "version": "2.2.0rc5", + "version": "2.2.0rc6", "description": "ZFS filesystem driver for Windows", "homepage": "https://github.com/openzfsonwindows/openzfs", "license": "CDDL", - "url": "https://github.com/openzfsonwindows/openzfs/releases/download/zfswin-2.2.0rc5/OpenZFSOnWindows-debug-2.2.0rc5.exe", - "hash": "8b70f59c4d9890510c08aa234d7f04d6dc069dd91fdc54773927851beedda907", + "url": "https://github.com/openzfsonwindows/openzfs/releases/download/zfswin-2.2.0rc6/OpenZFSOnWindows-debug-2.2.0rc6.exe", + "hash": "d36838151bc04ed012d5f018733e524cf5ba733dd189a69be705c65265d58541", "innosetup": true, "pre_install": [ "if (!$global) { Write-Host -Foreground Red \"$app should be installed globally.\"; break }", - "'symbols', 'CODE_OF_CONDUCT.md', 'HowToDebug.txt', 'README,*.md' | ForEach-Object { Remove-Item -Recurse \"$dir\\$_\" }" + "'symbols', 'CODE_OF_CONDUCT.md', 'HowToDebug.txt', 'README,*.md' | ForEach-Object { Remove-Item -Recurse \"$dir/$_\" }" ], "installer": { "script": [ @@ -17,21 +17,21 @@ "$cert = (Get-AuthenticodeSignature \"$dir/OpenZFS.cat\").SignerCertificate", "if (!(Get-ChildItem Cert:/CurrentUser/TrustedPublisher -Recurse | Where-Object { $_.Thumbprint -eq $cert.Thumbprint })) {", " Write-Host 'Cert not found, adding to trusted store...'", - " $store = [X509Store]::new([StoreName]::TrustedPublisher, [StoreLocation]::CurrentUser)", + " $store = [X509Store]::new([StoreName]::TrustedPublisher, [StoreLocation]::LocalMachine)", " $store.Open([OpenFlags]::ReadWrite)", " $store.Add($cert.Export([X509ContentType]::Cert))", " $store.Close()", "}", "", "Write-Host 'Installing driver...'", - "Invoke-ExternalCommand pnputil -ArgumentList @('/add-driver', \"$dir/OpenZFS.inf\", '/install') -RunAs -ContinueExitCodes @{ 3010 = 'A system reboot is required to finalize the installation.' } | Out-Null" + "Invoke-ExternalCommand pnputil -ArgumentList @('/add-driver', \"$dir\\OpenZFS.inf\", '/install') -RunAs -ContinueExitCodes @{ 3010 = 'A system reboot is required to finalize the installation.' } | Out-Null" ] }, "uninstaller": { "script": [ "if ($cmd -ne 'uninstall') { return }", "Invoke-ExternalCommand pnputil -ArgumentList @('/remove-device', 'ROOT\\OpenZFS\\0000') -RunAs -ContinueExitCodes @{ 3010 = 'A system reboot is required to finalize the uninstallation.' } | Out-Null", - "pnputil.exe /delete-driver \"$dir/OpenZFS.inf\" /uninstall | Out-Null", + "pnputil.exe /delete-driver \"$dir\\OpenZFS.inf\" /uninstall | Out-Null", "sc.exe delete OpenZFS | Out-Null" ] },