From 8d29e92352c4ca30777f438030c96717978e1227 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8C=C3=A1bera?= Date: Wed, 4 Aug 2021 22:48:47 +0200 Subject: [PATCH 1/5] 7zip: Add version 21.03 [ci skip] TODO: Wait for arm; Add older versions --- bucket/7zip.json | Bin 0 -> 2872 bytes bucket/old/7zip/16.04.json | 0 bucket/old/7zip/19.00.json | 0 bucket/old/7zip/9.20.json | 0 4 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 bucket/7zip.json create mode 100644 bucket/old/7zip/16.04.json create mode 100644 bucket/old/7zip/19.00.json create mode 100644 bucket/old/7zip/9.20.json diff --git a/bucket/7zip.json b/bucket/7zip.json new file mode 100644 index 0000000000000000000000000000000000000000..729562a4b8d2c19182eb20356e27a5db212af3de GIT binary patch literal 2872 zcmchZ+iuf95QgU(iFb%BEUAT2?>b{N`)LBnuzqECZSN&R|md-ovmvp z4NWU5%ZHhr<3F>r{`32nJ+?>IT3msBx7^NbYGXUGV+-shD}ja9wT^9D#P{=tMux`J zQnbc)YO{vs9`po>mL*7}Hi9mFwCtSk862&(+{&S&QhXm_>&#j9v9zF*h5h9yMouS3 zE3rfLeB>iEW^kuu@`CH!T^)<9Z5Q}IC9e}KAF{S=b%I2SwPWlr1*mJq$_!bH|7{0T&_JL;`Y=vyw;XSdRti7_2_6APG{TlQVn=ky=v9Em3u{yc( zwn@(Q3_C>sgFC3z_;RV{RV`;^lcJ#r{)JHAdNy=5FL7Co7;#D@0OLt%V(Y)kZp zppX)G0ty9q^vOMTIETC=I1!u-Y%=H!T!mx;f5+h^&6{oR~PoVgsRZiKFRnJZUd+ST!n3qwOv+* z4!IC%?Wr8>q*3kxafN=DTNRRZ-6g&S_6qcG!uk5i)9mN~E1E=_`I;|Zu|I~YCTe-E zOzjJoX2ECHPg$?e$N>N2YbTkeL&w?Hv}(#~=j$|>;d9P&y70GOn}>e4t>*gGfT%8P z&)(nY&rABZG^#wVqvItGYH=Ja#jo>K^Z481jP+;iVWyEv<{mfBXk;K!* z+SUqWbOz19W)8;MLz?^Rc0quQKkp@byEDS)8PH#woE4Sc`jc?onel`e^{0~1EuVN- ze?iNq$g0}-7@D2z`To7>jIQ+lM{d Date: Mon, 9 Aug 2021 20:52:12 +0200 Subject: [PATCH 2/5] TODO: Properly test all versions [ci skip] --- bucket/7zip.json | Bin 2872 -> 1435 bytes bucket/old/7zip/16.04.json | 28 ++++++++++++++++++++++++++++ bucket/old/7zip/19.00.json | 28 ++++++++++++++++++++++++++++ bucket/old/7zip/9.20.json | 28 ++++++++++++++++++++++++++++ 4 files changed, 84 insertions(+) diff --git a/bucket/7zip.json b/bucket/7zip.json index 729562a4b8d2c19182eb20356e27a5db212af3de..477821e520cbc55da12fa0cac87dcc21dd775ac4 100644 GIT binary patch literal 1435 zcmbVMTW^~%6n^ioK|32(onpA0} z)=$2Dmt(%e<_UuYc(E}|iH2}Q1GL;8jrS7YNbk=I@EQzPB(w3oWX4t|#T6kql z+g(g1^Z7jB{!+C;qwlvDr%GVm*?W)9ldD2Wtc@xaYA3G|=b&+X{q_5`PXppN_4Hx< z`NyTt{4Z1J2l%=m2k!OsMb*hhE-(u-a(b)HQ@HXB3e)RnW|F8-=D^=EnO$KMnD8YH z3G)|86wErc=gk2t=qhWF@eri|nz1Czk`g(lL=ch{6pAR$D1o8?L{@SPOAJK{Owx#x zf-#N}jn@7x<)#M5&glExzUFkWRtUjBmT7`KW0bR$p(K*a7!lH#6oNp;MS=i8Wn4l* zBf^VJ0v{|NcM5uzMDKZ52YlVH%xD}TOA>}@LYPbeGE&BA93`nNctJ5FNQr%UiUdNC zB*F*>uVq#idwvfxGPI8dVg5+9&gIY+U7mCQw`#X>E|lvSz6@}&P35So8f`>xx}nmSUn6?SDUAT2?>b{N`)LBnuzqECZSN&R|md-ovmvp z4NWU5%ZHhr<3F>r{`32nJ+?>IT3msBx7^NbYGXUGV+-shD}ja9wT^9D#P{=tMux`J zQnbc)YO{vs9`po>mL*7}Hi9mFwCtSk862&(+{&S&QhXm_>&#j9v9zF*h5h9yMouS3 zE3rfLeB>iEW^kuu@`CH!T^)<9Z5Q}IC9e}KAF{S=b%I2SwPWlr1*mJq$_!bH|7{0T&_JL;`Y=vyw;XSdRti7_2_6APG{TlQVn=ky=v9Em3u{yc( zwn@(Q3_C>sgFC3z_;RV{RV`;^lcJ#r{)JHAdNy=5FL7Co7;#D@0OLt%V(Y)kZp zppX)G0ty9q^vOMTIETC=I1!u-Y%=H!T!mx;f5+h^&6{oR~PoVgsRZiKFRnJZUd+ST!n3qwOv+* z4!IC%?Wr8>q*3kxafN=DTNRRZ-6g&S_6qcG!uk5i)9mN~E1E=_`I;|Zu|I~YCTe-E zOzjJoX2ECHPg$?e$N>N2YbTkeL&w?Hv}(#~=j$|>;d9P&y70GOn}>e4t>*gGfT%8P z&)(nY&rABZG^#wVqvItGYH=Ja#jo>K^Z481jP+;iVWyEv<{mfBXk;K!* z+SUqWbOz19W)8;MLz?^Rc0quQKkp@byEDS)8PH#woE4Sc`jc?onel`e^{0~1EuVN- ze?iNq$g0}-7@D2z`To7>jIQ+lM{d Date: Thu, 23 Dec 2021 21:06:49 +0100 Subject: [PATCH 3/5] 21.06 --- bucket/7zip.json | 29 ++++++++++++++++++----------- cosi.ps1 | 11 +++++++++-- 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/bucket/7zip.json b/bucket/7zip.json index 477821e5..cf36488c 100644 --- a/bucket/7zip.json +++ b/bucket/7zip.json @@ -1,6 +1,6 @@ { "##": "TODO: Associations, context menu", - "version": "21.03", + "version": "21.06", "description": "File archiver with a high compression ratio", "homepage": "https://www.7-zip.org", "license": { @@ -9,19 +9,21 @@ }, "architecture": { "64bit": { - "url": "https://7-zip.org/a/7z2103-x64.msi", - "hash": "371edca2936196fe7e80c009b2ab45920abbaee3f7e1fe1c8a3d2470b337e424" + "url": "https://stor.shovel.ash258.com/7zip/7z2106-x64.zip", + "hash": "bd3c29d43e3311393085623a17dc242391289cf2064ebadac70a27aae858a73d", + "extract_dir": "7z2106-x64" }, "32bit": { - "url": "https://7-zip.org/a/7z2103.msi", - "hash": "e7ebcc3adf86e79327383ed0d7d5eea850bc0a97c6eaaa2d5fab2407b9da7247" + "url": "https://stor.shovel.ash258.com/7zip/7z2106.zip", + "hash": "ad7ac37f73ceb9b3dba689357a23bb536f639589d94c30f602200c1408c18db7", + "extract_dir": "7z2106" }, "arm64": { - "url": "https://7-zip.org/a/7z2103-arm64.msi", - "hash": "e7d9254e3663e8603d8aa90f585468db7b2e10e2036192e0a1ad04e4e247f9fb" + "url": "https://stor.shovel.ash258.com/7zip/7z2106-arm64.zip", + "hash": "77e3e97ff0cb672781f80596d599a7b0411165514b6e987e4677822e65868df4", + "extract_dir": "7z2106-arm64" } }, - "extract_dir": "Files\\7-Zip", "bin": "7z.exe", "shortcuts": [ [ @@ -31,15 +33,20 @@ ], "checkver": "\\s+([\\d.]+)\\s+\\(\\d+", "autoupdate": { + "disable": true, + "archive": true, "architecture": { "64bit": { - "url": "https://7-zip.org/a/7z$cleanVersion-x64.msi" + "url": "https://stor.shovel.ash258.com/7zip/7z${cleanVersion}-x64.zip", + "extract_dir": "7z${cleanVersion}-x64" }, "32bit": { - "url": "https://7-zip.org/a/7z$cleanVersion.msi" + "url": "https://stor.shovel.ash258.com/7zip/7z${cleanVersion}.zip", + "extract_dir": "7z${cleanVersion}" }, "arm64": { - "url": "https://7-zip.org/a/7z$cleanVersion-arm64.msi" + "url": "https://stor.shovel.ash258.com/7zip/7z${cleanVersion}-arm64.zip", + "extract_dir": "7z${cleanVersion}-arm64" } } } diff --git a/cosi.ps1 b/cosi.ps1 index bd97d1c8..d44a75c3 100644 --- a/cosi.ps1 +++ b/cosi.ps1 @@ -1,3 +1,5 @@ +Join-Path $env:SCOOP_HOME 'supporting\yaml\bin\powershell-yaml.psd1' | Import-Module + $urls = @() $implemented = Get-ChildItem './bucket/' -File | Select-Object -ExpandProperty 'BaseName' @@ -11,8 +13,13 @@ $excludes = @( ) # Get all URLS -foreach ($f in Get-ChildItem '../Extras/bucket/', '../Main/bucket/', '../Ash258/bucket' -File | Where-Object -Property 'BaseName' -NotIn @($excludes + $implemented) ) { - $json = Get-Content $f.FullName -Raw | ConvertFrom-Json +foreach ($f in Get-ChildItem '../Extras/bucket/', '../Main/bucket/', '../ash258.ash258/bucket' -File | Where-Object -Property 'BaseName' -NotIn @($excludes + $implemented) ) { + $json = Get-Content -Raw $f.FullName + if ($f.Extension -eq '.json') { + $json = $json | ConvertFrom-Json + } else { + $json = $json | ConvertFrom-Yaml + } if ($json.architecture.'arm64') { continue } From 6e8d3bcfdba051a52b66cee7ed3792fa53379b71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8C=C3=A1bera?= Date: Sun, 16 Jan 2022 15:54:25 +0100 Subject: [PATCH 4/5] 21.07 --- bucket/7zip.json | 21 +++++++------- bucket/old/7zip/21.06.json | 34 ++++++++++++++++++++++ support/7zip/repack.ps1 | 59 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 103 insertions(+), 11 deletions(-) create mode 100644 bucket/old/7zip/21.06.json create mode 100644 support/7zip/repack.ps1 diff --git a/bucket/7zip.json b/bucket/7zip.json index cf36488c..c00c8286 100644 --- a/bucket/7zip.json +++ b/bucket/7zip.json @@ -1,6 +1,6 @@ { "##": "TODO: Associations, context menu", - "version": "21.06", + "version": "21.07", "description": "File archiver with a high compression ratio", "homepage": "https://www.7-zip.org", "license": { @@ -9,19 +9,19 @@ }, "architecture": { "64bit": { - "url": "https://stor.shovel.ash258.com/7zip/7z2106-x64.zip", - "hash": "bd3c29d43e3311393085623a17dc242391289cf2064ebadac70a27aae858a73d", - "extract_dir": "7z2106-x64" + "url": "https://stor.shovel.ash258.com/7zip/7z2107-x64.zip", + "hash": "b10324340c82c05a7b237f24049dd6cffa8d66ad16f68f9642bd4d12dfbc3ef5", + "extract_dir": "7z2107-x64" }, "32bit": { - "url": "https://stor.shovel.ash258.com/7zip/7z2106.zip", - "hash": "ad7ac37f73ceb9b3dba689357a23bb536f639589d94c30f602200c1408c18db7", - "extract_dir": "7z2106" + "url": "https://stor.shovel.ash258.com/7zip/7z2107.zip", + "hash": "9b1ef46b9b02853bbc1f55d9c9ac3cdc660813154405dbe03d3fb0387e9393ec", + "extract_dir": "7z2107" }, "arm64": { - "url": "https://stor.shovel.ash258.com/7zip/7z2106-arm64.zip", - "hash": "77e3e97ff0cb672781f80596d599a7b0411165514b6e987e4677822e65868df4", - "extract_dir": "7z2106-arm64" + "url": "https://stor.shovel.ash258.com/7zip/7z2107-arm64.zip", + "hash": "944cb106d21a32a71b8565921bb0b8e4f17615f611f6ee3a9b117da2aacfb1c5", + "extract_dir": "7z2107-arm64" } }, "bin": "7z.exe", @@ -33,7 +33,6 @@ ], "checkver": "\\s+([\\d.]+)\\s+\\(\\d+", "autoupdate": { - "disable": true, "archive": true, "architecture": { "64bit": { diff --git a/bucket/old/7zip/21.06.json b/bucket/old/7zip/21.06.json new file mode 100644 index 00000000..74e3fe01 --- /dev/null +++ b/bucket/old/7zip/21.06.json @@ -0,0 +1,34 @@ +{ + "##": "TODO: Associations, context menu", + "version": "21.06", + "description": "File archiver with a high compression ratio", + "homepage": "https://www.7-zip.org", + "license": { + "identifier": "Freeware,LGPL-2.0-only,BSD-3-Clause", + "url": "https://www.7-zip.org/license.txt" + }, + "architecture": { + "64bit": { + "url": "https://stor.shovel.ash258.com/7zip/7z2106-x64.zip", + "hash": "bd3c29d43e3311393085623a17dc242391289cf2064ebadac70a27aae858a73d", + "extract_dir": "7z2106-x64" + }, + "32bit": { + "url": "https://stor.shovel.ash258.com/7zip/7z2106.zip", + "hash": "ad7ac37f73ceb9b3dba689357a23bb536f639589d94c30f602200c1408c18db7", + "extract_dir": "7z2106" + }, + "arm64": { + "url": "https://stor.shovel.ash258.com/7zip/7z2106-arm64.zip", + "hash": "77e3e97ff0cb672781f80596d599a7b0411165514b6e987e4677822e65868df4", + "extract_dir": "7z2106-arm64" + } + }, + "bin": "7z.exe", + "shortcuts": [ + [ + "7zFM.exe", + "7-Zip" + ] + ] +} diff --git a/support/7zip/repack.ps1 b/support/7zip/repack.ps1 new file mode 100644 index 00000000..3efc5896 --- /dev/null +++ b/support/7zip/repack.ps1 @@ -0,0 +1,59 @@ +param([Parameter(Mandatory)] [String] $Version, [String] $ScpTarget) + +$ProgressPreference = 'SilentlyContinue' + +$_v = $Version -replace '\.' + +# Download first all the files +@('', '-arm64', '-x64') | ForEach-Object { + $url = "https://www.7-zip.org/a/7z${_v}${_}.exe" + Write-Output "Downloading '$url'" + Invoke-WebRequest $url -OutFile (Join-Path $PSScriptRoot (($url -split '/')[-1])) +} + +# Download source code +Write-Host 'Downloading source code' +Invoke-WebRequest "https://www.7-zip.org/a/7z${_v}-src.tar.xz" -OutFile "$PSScriptRoot/7z${_v}-src.tar.xz" + +Set-Content "$PSScriptRoot/README.md" @' +# 7-zip repacked as zip + +Zero dependency zip package of 7-zip mainly for NanoServer installations and use for Shovel installer. + +All archived were built by [script](https://github.com/shovel-org/Base/main/support/7zip/repack.ps1) using 7zip + +Original site, source code and artifcats are avaialble at +'@ -Encoding 'utf8' + +$7zPath = (Get-Command -Name '7z' -CommandType 'Application').Source + +# Extract original 7-zips +Get-ChildItem -LiteralPath $PSScriptRoot -Include '*.exe' -File | ForEach-Object { + $checksum = (Get-FileHash -LiteralPath $_.FullName -Algorithm 'SHA256').Hash + + Write-Output "Original '$($_.Name)' checksum: $checksum" + + & $7zPath x -y -o"$PSScriptRoot/$($_.BaseName)/" $_.FullName + + Remove-Item -LiteralPath $_.FullName -Force -Recurse +} + +# Create new zips +Get-ChildItem -LiteralPath $PSScriptRoot -Directory | ForEach-Object { + Write-Output "Repackaing '$($_.BaseName).zip'" + + & $7zPath a "$PSScriptRoot/$($_.BaseName).zip" $_.FullName + + $zipHash = (Get-FileHash -LiteralPath "$($_.FullName).zip" -Algorithm 'SHA256').Hash + Write-Output "New '$($_.BaseName).zip' checksum: $zipHash" + + Remove-Item $_.Fullname -Force -Recurse +} + +if ($ScpTarget) { + Write-Output 'Copying all required files to server' + scp "$PSScriptRoot/*" $ScpTarget + + # Remove all temporary files + Get-ChildItem -LiteralPath $PSScriptRoot -Exclude '*.ps1' | Remove-Item -Force -Recurse +} From 8f7082567e6242bf66474dda98701a953963ea9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8C=C3=A1bera?= Date: Mon, 31 Jan 2022 19:40:44 +0100 Subject: [PATCH 5/5] archives. Properly test in clean docker images installation --- bucket/old/7zip/16.04.json | 11 ++++++----- bucket/old/7zip/19.00.json | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/bucket/old/7zip/16.04.json b/bucket/old/7zip/16.04.json index dca44ddc..9494bbf6 100644 --- a/bucket/old/7zip/16.04.json +++ b/bucket/old/7zip/16.04.json @@ -9,15 +9,16 @@ }, "architecture": { "64bit": { - "url": "https://www.7-zip.org/a/7z1604-x64.msi", - "hash": "b3885b2f090f1e9b5cf2b9f802b07fe88e472d70d60732db9f830209ac296067" + "url": "https://stor.shovel.ash258.com/7zip/7z1604-x64.zip", + "hash": "ded5d8351cc601c6407587aa9d53fc619bd796ed9adfe991ee561adbf29843ae", + "extract_dir": "7z1604-x64" }, "32bit": { - "url": "https://www.7-zip.org/a/7z1604.msi", - "hash": "d9b62c0ed0eb48d2df86d8b83394048414a2a4e1d64a50adb9abcff643471d20" + "url": "https://stor.shovel.ash258.com/7zip/7z1604.zip", + "hash": "5535542f808f0fd86b7719f4836a226b86adbdb98b70f9e3add2a2f8553b7793", + "extract_dir": "7z1604" } }, - "extract_dir": "Files\\7-Zip", "bin": "7z.exe", "shortcuts": [ [ diff --git a/bucket/old/7zip/19.00.json b/bucket/old/7zip/19.00.json index 433ef173..d9087897 100644 --- a/bucket/old/7zip/19.00.json +++ b/bucket/old/7zip/19.00.json @@ -9,15 +9,16 @@ }, "architecture": { "64bit": { - "url": "https://www.7-zip.org/a/7z1900-x64.msi", - "hash": "a7803233eedb6a4b59b3024ccf9292a6fffb94507dc998aa67c5b745d197a5dc" + "url": "https://stor.shovel.ash258.com/7zip/7z1900-x64.zip", + "hash": "8f047e4a7762d7f8f51361de3ea8fa8d2c7ca22220b63c3914a488e1d15c022c", + "extract_dir": "7z1900-x64" }, "32bit": { - "url": "https://www.7-zip.org/a/7z1900.msi", - "hash": "b49d55a52bc0eab14947c8982c413d9be141c337da1368a24aa0484cbb5e89cd" + "url": "https://stor.shovel.ash258.com/7zip/7z1900.zip", + "hash": "9979fb1a42586799fea562aeb719d78abeb5edb9053f9cda2756b26167cf86c7", + "extract_dir": "7z1900" } }, - "extract_dir": "Files\\7-Zip", "bin": "7z.exe", "shortcuts": [ [