From 969057bacc233ca528020ae562bd63e1f2ec9c33 Mon Sep 17 00:00:00 2001 From: Mario Loriedo Date: Wed, 15 Jan 2025 18:56:28 +0100 Subject: [PATCH] Stop creating a patch for v5.3.1 upgrades on windows Removes the windows installer patch for upgrading from v5.3.1 to v5.3.x that was introduced in https://github.com/containers/podman/pull/24827. We need to do that because windows patches are allowed only for small and minor updates https://learn.microsoft.com/en-us/windows/win32/msi/patching-and-upgrades. We also need to start blocking upgrades from v5.3.1 to v5.4.x, which will be implemented in a separate commit. Signed-off-by: Mario Loriedo --- contrib/cirrus/win-installer-main.ps1 | 16 ++---- contrib/win-installer/build.ps1 | 20 ------- contrib/win-installer/burn.wxs | 1 - contrib/win-installer/podman-patch.wxs | 21 ------- contrib/win-installer/test-installer.ps1 | 73 ++++++++---------------- winmake.ps1 | 2 +- 6 files changed, 29 insertions(+), 104 deletions(-) delete mode 100644 contrib/win-installer/podman-patch.wxs diff --git a/contrib/cirrus/win-installer-main.ps1 b/contrib/cirrus/win-installer-main.ps1 index a967c0dfe7..09fa4f17e6 100644 --- a/contrib/cirrus/win-installer-main.ps1 +++ b/contrib/cirrus/win-installer-main.ps1 @@ -17,18 +17,13 @@ Push-Location $WIN_INST_FOLDER # Build and test the windows installer -# Download v5.3.1 installer as `build.ps1` uses it to build the patch -# (podman.msp). `build.ps1` reads `$env:V531_SETUP_EXE_PATH` to get its path. -# The v5.3.1 installer is also used to test the "v5.3.1 -> current" version minor -# update (with patch). -if (!$env:V531_SETUP_EXE_PATH) { - $env:V531_SETUP_EXE_PATH = Get-Podman-Setup-From-GitHub -version "tags/v5.3.1" -} +# Download the previous installer to test a major update -# Download the previous installer to test a major update (without patch) -# After v5.3.2 release we should download latest instead of v5.3.0 (i.e. -# `Get-Latest-Podman-Setup-From-GitHub`) if (!$env:PREV_SETUP_EXE_PATH) { + # After v5.3.2 is released we should replace + # `Get-Podman-Setup-From-GitHub -version "tags/v5.3.0"` + # with + # `Get-Latest-Podman-Setup-From-GitHub` $env:PREV_SETUP_EXE_PATH = Get-Podman-Setup-From-GitHub -version "tags/v5.3.0" } @@ -48,5 +43,4 @@ $command += "-provider $ENV:CONTAINERS_MACHINE_PROVIDER " $command += "-setupExePath `"$WIN_INST_FOLDER\podman-$ENV:WIN_INST_VER-dev-setup.exe`"" $command += "-previousSetupExePath `"$env:PREV_SETUP_EXE_PATH`"" $command += "-nextSetupExePath `"$WIN_INST_FOLDER\podman-$NEXT_WIN_INST_VER-dev-setup.exe`"" -$command += "-v531SetupExePath `"$env:V531_SETUP_EXE_PATH`"" Run-Command "${command}" diff --git a/contrib/win-installer/build.ps1 b/contrib/win-installer/build.ps1 index ae3dd8f61e..000ff1480d 100644 --- a/contrib/win-installer/build.ps1 +++ b/contrib/win-installer/build.ps1 @@ -49,22 +49,6 @@ function CheckRequirements() { CheckCommand "go" "Golang" } -function Build-531-Patch() { - param( - [ValidateScript({Test-Path $_ -PathType Leaf})] - [string]$v531SetupExePath=$ENV:V531_SETUP_EXE_PATH - ) - - if (!$v531SetupExePath) { - . $PSScriptRoot\utils.ps1 - $v531SetupExePath=Get-Podman-Setup-From-GitHub "tags/v5.3.1" - } - wix burn extract $v531SetupExePath -o $PSScriptRoot\prevPodmanMsi; ExitOnError - Move-Item $PSScriptRoot\prevPodmanMsi\a1 $PSScriptRoot\en-US\prev-podman.wixpdb -Force; ExitOnError - Move-Item $PSScriptRoot\prevPodmanMsi\a0 $PSScriptRoot\en-US\prev-podman.msi -Force; ExitOnError - wix build -define "Version=$ENV:INSTVER" -bindpath $PSScriptRoot\en-US -out $PSScriptRoot\en-US\podman.msp podman-patch.wxs; ExitOnError -} - if ($args.Count -lt 1 -or $args[0].Length -lt 1) { Write-Host "Usage: " $MyInvocation.MyCommand.Name " [dev|prod] [release_dir]" Write-Host @@ -145,10 +129,6 @@ if (Test-Path ./obj) { dotnet build podman.wixproj /property:DefineConstants="VERSION=$ENV:INSTVER" -o .; ExitOnError SignItem @("en-US\podman.msi") -# Build the Patch for 5.3.1 -Build-531-Patch -SignItem @("en-US\podman.msp") - dotnet build podman-setup.wixproj /property:DefineConstants="VERSION=$ENV:INSTVER" -o .; ExitOnError wix burn detach podman-setup.exe -engine engine.exe; ExitOnError SignItem @("engine.exe") diff --git a/contrib/win-installer/burn.wxs b/contrib/win-installer/burn.wxs index f0deda302e..9481b7a9e8 100644 --- a/contrib/win-installer/burn.wxs +++ b/contrib/win-installer/burn.wxs @@ -30,7 +30,6 @@ - diff --git a/contrib/win-installer/podman-patch.wxs b/contrib/win-installer/podman-patch.wxs deleted file mode 100644 index 4f6b6c9ca0..0000000000 --- a/contrib/win-installer/podman-patch.wxs +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - diff --git a/contrib/win-installer/test-installer.ps1 b/contrib/win-installer/test-installer.ps1 index a8adace025..f3ced04695 100644 --- a/contrib/win-installer/test-installer.ps1 +++ b/contrib/win-installer/test-installer.ps1 @@ -16,7 +16,6 @@ # -previousSetupExePath ".\contrib\win-installer\podman-5.3.0-dev-setup.exe" ` # -setupExePath ".\contrib\win-installer\podman-5.4.0-dev-setup.exe" ` # -nextSetupExePath ".\contrib\win-installer\podman-9.9.9-dev-setup.exe" ` -# -v531SetupExePath ".\contrib\win-installer\podman-5.3.1-dev-setup.exe" ` # -provider hyperv # @@ -25,7 +24,6 @@ param ( [Parameter(Mandatory)] [ValidateSet("test-objects-exist", "test-objects-exist-not", "installation-green-field", "installation-skip-config-creation-flag", "installation-with-pre-existing-podman-exe", "update-without-user-changes", "update-with-user-changed-config-file", "update-with-user-removed-config-file", - "update-without-user-changes-from-531", "update-with-user-changed-config-file-from-531", "update-with-user-removed-config-file-from-531", "update-without-user-changes-to-next", "update-with-user-changed-config-file-to-next", "update-with-user-removed-config-file-to-next", "all")] [string]$scenario, @@ -35,8 +33,6 @@ param ( [string]$previousSetupExePath, [ValidateScript({Test-Path $_ -PathType Leaf})] [string]$nextSetupExePath, - [ValidateScript({Test-Path $_ -PathType Leaf})] - [string]$v531SetupExePath, [ValidateSet("wsl", "hyperv")] [string]$provider="wsl", [switch]$installWSL=$false, @@ -263,7 +259,7 @@ function Start-Scenario-Installation-With-Pre-Existing-Podman-Exe { function Start-Scenario-Update-Without-User-Changes { param ( - [ValidateSet("From-Previous", "From-531", "To-Next")] + [ValidateSet("From-Previous", "To-Next")] [string]$mode="From-Previous" ) Write-Host "`n======================================================" @@ -271,7 +267,6 @@ function Start-Scenario-Update-Without-User-Changes { Write-Host "======================================================" switch ($mode) { 'From-Previous' {$i = $previousSetupExePath; $u = $setupExePath} - 'From-531' {$i = $v531SetupExePath; $u = $setupExePath} 'To-Next' {$i = $setupExePath; $u = $nextSetupExePath} } Install-Podman -setupExePath $i @@ -282,17 +277,13 @@ function Start-Scenario-Update-Without-User-Changes { Test-Uninstallation } -function Start-Scenario-Update-Without-User-Changes-From-531 { - Start-Scenario-Update-Without-User-Changes -mode "From-531" -} - function Start-Scenario-Update-Without-User-Changes-To-Next { Start-Scenario-Update-Without-User-Changes -mode "To-Next" } function Start-Scenario-Update-With-User-Changed-Config-File { param ( - [ValidateSet("From-Previous", "From-531", "To-Next")] + [ValidateSet("From-Previous", "To-Next")] [string]$mode="From-Previous" ) Write-Host "`n==============================================================" @@ -300,7 +291,6 @@ function Start-Scenario-Update-With-User-Changed-Config-File { Write-Host "==============================================================" switch ($mode) { 'From-Previous' {$i = $previousSetupExePath; $u = $setupExePath} - 'From-531' {$i = $v531SetupExePath; $u = $setupExePath} 'To-Next' {$i = $setupExePath; $u = $nextSetupExePath} } Install-Podman -setupExePath $i @@ -312,17 +302,13 @@ function Start-Scenario-Update-With-User-Changed-Config-File { Test-Uninstallation } -function Start-Scenario-Update-With-User-Changed-Config-File-From-531 { - Start-Scenario-Update-With-User-Changed-Config-File -mode "From-531" -} - function Start-Scenario-Update-With-User-Changed-Config-File-To-Next { Start-Scenario-Update-With-User-Changed-Config-File -mode "To-Next" } function Start-Scenario-Update-With-User-Removed-Config-File { param ( - [ValidateSet("From-Previous", "From-531", "To-Next")] + [ValidateSet("From-Previous", "To-Next")] [string]$mode="From-Previous" ) Write-Host "`n==============================================================" @@ -330,7 +316,6 @@ function Start-Scenario-Update-With-User-Removed-Config-File { Write-Host "==============================================================" switch ($mode) { 'From-Previous' {$i = $previousSetupExePath; $u = $setupExePath} - 'From-531' {$i = $v531SetupExePath; $u = $setupExePath} 'To-Next' {$i = $setupExePath; $u = $nextSetupExePath} } Install-Podman -setupExePath $i @@ -342,10 +327,6 @@ function Start-Scenario-Update-With-User-Removed-Config-File { Test-Uninstallation } -function Start-Scenario-Update-With-User-Removed-Config-File-From-531 { - Start-Scenario-Update-With-User-Removed-Config-File -mode "From-531" -} - function Start-Scenario-Update-With-User-Removed-Config-File-To-Next { Start-Scenario-Update-With-User-Removed-Config-File -mode "To-Next" } @@ -368,16 +349,14 @@ switch ($scenario) { } 'update-without-user-changes' { if (!$previousSetupExePath) { - $previousSetupExePath = Get-Latest-Podman-Setup-From-GitHub + # After v5.3.2 is released we should replace + # `Get-Podman-Setup-From-GitHub -version "tags/v5.3.0"` + # with + # `Get-Latest-Podman-Setup-From-GitHub` + $previousSetupExePath = Get-Podman-Setup-From-GitHub -version "tags/v5.3.0" } Start-Scenario-Update-Without-User-Changes } - 'update-without-user-changes-from-531' { - if (!$v531SetupExePath) { - $v531SetupExePath = Get-Podman-Setup-From-GitHub -version "tags/v5.3.1" - } - Start-Scenario-Update-Without-User-Changes-From-531 - } 'update-without-user-changes-to-next' { if (!$nextSetupExePath) { throw "Next version installer path is not defined. Use '-nextSetupExePath ' to define it." @@ -386,16 +365,14 @@ switch ($scenario) { } 'update-with-user-changed-config-file' { if (!$previousSetupExePath) { - $previousSetupExePath = Get-Latest-Podman-Setup-From-GitHub + # After v5.3.2 is released we should replace + # `Get-Podman-Setup-From-GitHub -version "tags/v5.3.0"` + # with + # `Get-Latest-Podman-Setup-From-GitHub` + $previousSetupExePath = Get-Podman-Setup-From-GitHub -version "tags/v5.3.0" } Start-Scenario-Update-With-User-Changed-Config-File } - 'update-with-user-changed-config-file-from-531' { - if (!$v531SetupExePath) { - $v531SetupExePath = Get-Podman-Setup-From-GitHub -version "tags/v5.3.1" - } - Start-Scenario-Update-With-User-Changed-Config-File-From-531 - } 'update-with-user-changed-config-file-to-next' { if (!$nextSetupExePath) { throw "Next version installer path is not defined. Use '-nextSetupExePath ' to define it." @@ -404,16 +381,14 @@ switch ($scenario) { } 'update-with-user-removed-config-file' { if (!$previousSetupExePath) { - $previousSetupExePath = Get-Latest-Podman-Setup-From-GitHub + # After v5.3.2 is released we should replace + # `Get-Podman-Setup-From-GitHub -version "tags/v5.3.0"` + # with + # `Get-Latest-Podman-Setup-From-GitHub` + $previousSetupExePath = Get-Podman-Setup-From-GitHub -version "tags/v5.3.0" } Start-Scenario-Update-With-User-Removed-Config-File } - 'update-with-user-removed-config-file-from-531' { - if (!$v531SetupExePath) { - $v531SetupExePath = Get-Podman-Setup-From-GitHub -version "tags/v5.3.1" - } - Start-Scenario-Update-With-User-Removed-Config-File-From-531 - } 'update-with-user-removed-config-file-to-next' { if (!$nextSetupExePath) { throw "Next version installer path is not defined. Use '-nextSetupExePath ' to define it." @@ -425,22 +400,20 @@ switch ($scenario) { throw "Next version installer path is not defined. Use '-nextSetupExePath ' to define it." } if (!$previousSetupExePath) { - $previousSetupExePath = Get-Latest-Podman-Setup-From-GitHub - } - if (!$v531SetupExePath) { - $v531SetupExePath = Get-Podman-Setup-From-GitHub -version "tags/v5.3.1" + # After v5.3.2 is released we should replace + # `Get-Podman-Setup-From-GitHub -version "tags/v5.3.0"` + # with + # `Get-Latest-Podman-Setup-From-GitHub` + $previousSetupExePath = Get-Podman-Setup-From-GitHub -version "tags/v5.3.0" } Start-Scenario-Installation-Green-Field Start-Scenario-Installation-Skip-Config-Creation-Flag Start-Scenario-Installation-With-Pre-Existing-Podman-Exe Start-Scenario-Update-Without-User-Changes - Start-Scenario-Update-Without-User-Changes-From-531 Start-Scenario-Update-Without-User-Changes-To-Next Start-Scenario-Update-With-User-Changed-Config-File - Start-Scenario-Update-With-User-Changed-Config-File-From-531 Start-Scenario-Update-With-User-Changed-Config-File-To-Next Start-Scenario-Update-With-User-Removed-Config-File - Start-Scenario-Update-With-User-Removed-Config-File-From-531 Start-Scenario-Update-With-User-Removed-Config-File-To-Next } } diff --git a/winmake.ps1 b/winmake.ps1 index b2dca0d5c1..6aa8907611 100644 --- a/winmake.ps1 +++ b/winmake.ps1 @@ -39,7 +39,7 @@ function Win-SSHProxy { New-Item -ItemType Directory -Force -Path "./bin/windows" if (-Not $Version) { - $Version = "v0.7.2" + $Version = "v0.8.1" } curl.exe -sSL -o "./bin/windows/gvproxy.exe" --retry 5 "https://github.com/containers/gvisor-tap-vsock/releases/download/$Version/gvproxy-windowsgui.exe" curl.exe -sSL -o "./bin/windows/win-sshproxy.exe" --retry 5 "https://github.com/containers/gvisor-tap-vsock/releases/download/$Version/win-sshproxy.exe"