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 <mario.loriedo@gmail.com>
This commit is contained in:
Mario Loriedo 2025-01-15 18:56:28 +01:00
parent 0f04ba87bb
commit 969057bacc
6 changed files with 29 additions and 104 deletions

View File

@ -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}"

View File

@ -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 "<version> [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")

View File

@ -30,7 +30,6 @@
<MsiProperty Name="WITH_HYPERV" Value="[HyperVCheckbox]" />
<MsiProperty Name="SKIP_CONFIG_FILE_CREATION" Value="[SkipConfigFileCreation]" />
</MsiPackage>
<MspPackage Id="Patch" SourceFile="en-US\podman.msp" Vital="yes" />
<ExePackage DisplayName="WSL Kernel Install" InstallCondition="(MachineProvider = &quot;wsl&quot;) AND (WSLCheckbox = 1) AND (NOT PreviousInstallFolder)" SourceFile="artifacts\podman-wslkerninst.exe" DetectCondition="" Permanent="true" />
</Chain>
<OptionalUpdateRegistration />

View File

@ -1,21 +0,0 @@
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Patch
AllowRemoval="yes"
Classification="Update"
DisplayName="Podman Patch v$(Version)"
Description="Podman Patch v$(Version)"
Manufacturer="Red Hat Inc.">
<Media Id="1000" Cabinet="PodmanPatch.cab">
<PatchBaseline
Id="podmanPatch"
BaselineFile="podman.msi"
UpdateFile="prev-podman.msi"/>
</Media>
<PatchFamily
Id="PodmanPatches"
Version="$(Version)"
Supersede="yes" />
</Patch>
</Wix>

View File

@ -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 <setup-exe-path>' 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 <setup-exe-path>' 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 <setup-exe-path>' to define it."
@ -425,22 +400,20 @@ switch ($scenario) {
throw "Next version installer path is not defined. Use '-nextSetupExePath <setup-exe-path>' 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
}
}

View File

@ -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"