Skip to content

Commit 651be09

Browse files
committed
Merge branch 'main' into lslavkov-22400
2 parents 39123de + c3b13df commit 651be09

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+796
-269
lines changed

.cirrus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ env:
3333
DEBIAN_NAME: "debian-13"
3434

3535
# Image identifiers
36-
IMAGE_SUFFIX: "c20241118t130000z-f41f40d13"
36+
IMAGE_SUFFIX: "c20241212t122344z-f41f40d13"
3737

3838
# EC2 images
3939
FEDORA_AMI: "fedora-aws-${IMAGE_SUFFIX}"

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ endif
218218

219219
# gvisor-tap-vsock version for gvproxy.exe and win-sshproxy.exe downloads
220220
# the upstream project ships pre-built binaries since version 0.7.1
221-
GV_VERSION=v0.8.0
221+
GV_VERSION=v0.8.1
222222

223223
###
224224
### Primary entry-point targets

build_windows.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ The Podman Windows installer (e.g., `podman-5.1.0-dev-setup.exe`) is a bundle
315315
that includes an msi package (`podman.msi`) and installs the WSL kernel
316316
(`podman-wslkerninst.exe`). It's built using the
317317
[WiX Toolset](https://wixtoolset.org/) and the
318-
[PanelSwWixExtension](https://github.com/nirbar/PanelSwWixExtension/tree/wix3-v3.11.1.353)
318+
[PanelSwWixExtension](https://github.com/nirbar/PanelSwWixExtension/tree/master5)
319319
WiX extension. The source code is in the folder `contrib\win-installer`.
320320

321321
### Build the Windows installer

cmd/podman/common/completion.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import (
1616
"github.com/containers/common/pkg/config"
1717
"github.com/containers/common/pkg/ssh"
1818
"github.com/containers/image/v5/pkg/sysregistriesv2"
19+
imageTypes "github.com/containers/image/v5/types"
1920
"github.com/containers/podman/v5/cmd/podman/registry"
2021
"github.com/containers/podman/v5/libpod/define"
2122
"github.com/containers/podman/v5/libpod/events"
@@ -276,7 +277,9 @@ func getSecrets(cmd *cobra.Command, toComplete string, cType completeType) ([]st
276277
}
277278

278279
func getRegistries() ([]string, cobra.ShellCompDirective) {
279-
regs, err := sysregistriesv2.UnqualifiedSearchRegistries(nil)
280+
sysCtx := &imageTypes.SystemContext{}
281+
SetRegistriesConfPath(sysCtx)
282+
regs, err := sysregistriesv2.UnqualifiedSearchRegistries(sysCtx)
280283
if err != nil {
281284
cobra.CompErrorln(err.Error())
282285
return nil, cobra.ShellCompDirectiveNoFileComp

cmd/podman/common/registries.go

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package common
2+
3+
import (
4+
"os"
5+
6+
"github.com/containers/image/v5/types"
7+
)
8+
9+
// SetRegistriesConfPath sets the registries.conf path for the specified context.
10+
// NOTE: this is a verbatim copy from c/common/libimage which we're not using
11+
// to prevent leaking c/storage into this file. Maybe this should go into c/image?
12+
func SetRegistriesConfPath(systemContext *types.SystemContext) {
13+
if systemContext.SystemRegistriesConfPath != "" {
14+
return
15+
}
16+
if envOverride, ok := os.LookupEnv("CONTAINERS_REGISTRIES_CONF"); ok {
17+
systemContext.SystemRegistriesConfPath = envOverride
18+
return
19+
}
20+
if envOverride, ok := os.LookupEnv("REGISTRIES_CONFIG_PATH"); ok {
21+
systemContext.SystemRegistriesConfPath = envOverride
22+
return
23+
}
24+
}

cmd/podman/containers/update.go

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,16 @@ func GetChangedHealthCheckConfiguration(cmd *cobra.Command, vals *entities.Conta
113113
return updateHealthCheckConfig
114114
}
115115

116+
func GetChangedDeviceLimits(s *specgen.SpecGenerator) *define.UpdateContainerDevicesLimits {
117+
updateDevicesLimits := define.UpdateContainerDevicesLimits{}
118+
updateDevicesLimits.SetBlkIOWeightDevice(s.WeightDevice)
119+
updateDevicesLimits.SetDeviceReadBPs(s.ThrottleReadBpsDevice)
120+
updateDevicesLimits.SetDeviceWriteBPs(s.ThrottleWriteBpsDevice)
121+
updateDevicesLimits.SetDeviceReadIOPs(s.ThrottleReadIOPSDevice)
122+
updateDevicesLimits.SetDeviceWriteIOPs(s.ThrottleWriteIOPSDevice)
123+
return &updateDevicesLimits
124+
}
125+
116126
func update(cmd *cobra.Command, args []string) error {
117127
var err error
118128
// use a specgen since this is the easiest way to hold resource info
@@ -124,33 +134,35 @@ func update(cmd *cobra.Command, args []string) error {
124134
return err
125135
}
126136

127-
if updateOpts.Restart != "" {
128-
policy, retries, err := util.ParseRestartPolicy(updateOpts.Restart)
129-
if err != nil {
130-
return err
131-
}
132-
s.RestartPolicy = policy
133-
if policy == define.RestartPolicyOnFailure {
134-
s.RestartRetries = &retries
135-
}
136-
}
137-
138-
// we need to pass the whole specgen since throttle devices are parsed later due to cross compat.
139137
s.ResourceLimits, err = specgenutil.GetResources(s, &updateOpts)
140138
if err != nil {
141139
return err
142140
}
143141

144-
healthCheckConfig := GetChangedHealthCheckConfiguration(cmd, &updateOpts)
145-
if err != nil {
146-
return err
142+
if s.ResourceLimits == nil {
143+
s.ResourceLimits = &specs.LinuxResources{}
147144
}
148145

146+
healthCheckConfig := GetChangedHealthCheckConfiguration(cmd, &updateOpts)
147+
149148
opts := &entities.ContainerUpdateOptions{
150149
NameOrID: strings.TrimPrefix(args[0], "/"),
151-
Specgen: s,
150+
Resources: s.ResourceLimits,
152151
ChangedHealthCheckConfiguration: &healthCheckConfig,
152+
DevicesLimits: GetChangedDeviceLimits(s),
153+
}
154+
155+
if cmd.Flags().Changed("restart") {
156+
policy, retries, err := util.ParseRestartPolicy(updateOpts.Restart)
157+
if err != nil {
158+
return err
159+
}
160+
opts.RestartPolicy = &policy
161+
if policy == define.RestartPolicyOnFailure {
162+
opts.RestartRetries = &retries
163+
}
153164
}
165+
154166
rep, err := registry.ContainerEngine().ContainerUpdate(context.Background(), opts)
155167
if err != nil {
156168
return err

cmd/podman/login.go

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -99,28 +99,11 @@ func login(cmd *cobra.Command, args []string) error {
9999
sysCtx := &types.SystemContext{
100100
DockerInsecureSkipTLSVerify: skipTLS,
101101
}
102-
setRegistriesConfPath(sysCtx)
102+
common.SetRegistriesConfPath(sysCtx)
103103
registriesFromFile, _ := sysregistriesv2.UnqualifiedSearchRegistries(sysCtx)
104104
if len(registriesFromFile) > 1 {
105105
return errors.New("multiple registries in registry.conf, a registry must be provided")
106106
}
107107
loginOptions.GetLoginSet = cmd.Flag("get-login").Changed
108108
return auth.Login(context.Background(), sysCtx, &loginOptions.LoginOptions, args)
109109
}
110-
111-
// setRegistriesConfPath sets the registries.conf path for the specified context.
112-
// NOTE: this is a verbatim copy from c/common/libimage which we're not using
113-
// to prevent leaking c/storage into this file. Maybe this should go into c/image?
114-
func setRegistriesConfPath(systemContext *types.SystemContext) {
115-
if systemContext.SystemRegistriesConfPath != "" {
116-
return
117-
}
118-
if envOverride, ok := os.LookupEnv("CONTAINERS_REGISTRIES_CONF"); ok {
119-
systemContext.SystemRegistriesConfPath = envOverride
120-
return
121-
}
122-
if envOverride, ok := os.LookupEnv("REGISTRIES_CONFIG_PATH"); ok {
123-
systemContext.SystemRegistriesConfPath = envOverride
124-
return
125-
}
126-
}

cmd/podman/logout.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func init() {
5151
// Implementation of podman-logout.
5252
func logout(cmd *cobra.Command, args []string) error {
5353
sysCtx := &types.SystemContext{}
54-
setRegistriesConfPath(sysCtx)
54+
common.SetRegistriesConfPath(sysCtx)
5555
registriesFromFile, _ := sysregistriesv2.UnqualifiedSearchRegistries(sysCtx)
5656
if len(registriesFromFile) > 1 {
5757
return errors.New("multiple registries in registry.conf, a registry must be provided")

contrib/cirrus/win-installer-main.ps1

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env powershell
22

33
. $PSScriptRoot\win-lib.ps1
4+
. $PSScriptRoot\..\win-installer\utils.ps1
45

56
if ($Env:CI -eq "true") {
67
$WIN_INST_FOLDER = "$ENV:CIRRUS_WORKING_DIR\repo\contrib\win-installer"
@@ -14,15 +15,38 @@ if ($Env:CI -eq "true") {
1415

1516
Push-Location $WIN_INST_FOLDER
1617

17-
# Build Installer
18+
# Build and test the windows installer
19+
20+
# Download v5.3.1 installer as `build.ps1` uses it to build the patch
21+
# (podman.msp). `build.ps1` reads `$env:V531_SETUP_EXE_PATH` to get its path.
22+
# The v5.3.1 installer is also used to test the "v5.3.1 -> current" version minor
23+
# update (with patch).
24+
if (!$env:V531_SETUP_EXE_PATH) {
25+
$env:V531_SETUP_EXE_PATH = Get-Podman-Setup-From-GitHub -version "tags/v5.3.1"
26+
}
27+
28+
# Download the previous installer to test a major update (without patch)
29+
# After v5.3.2 release we should download latest instead of v5.3.0 (i.e.
30+
# `Get-Latest-Podman-Setup-From-GitHub`)
31+
if (!$env:PREV_SETUP_EXE_PATH) {
32+
$env:PREV_SETUP_EXE_PATH = Get-Podman-Setup-From-GitHub -version "tags/v5.3.0"
33+
}
34+
1835
# Note: consumes podman-remote-release-windows_amd64.zip from repo.tar.zst
1936
Run-Command ".\build.ps1 $Env:WIN_INST_VER dev `"$RELEASE_DIR`""
2037

38+
# Build a v9.9.10 installer to test an update from current to next version
39+
$NEXT_WIN_INST_VER="9.9.10"
40+
Run-Command ".\build.ps1 `"$NEXT_WIN_INST_VER`" dev `"$RELEASE_DIR`""
41+
2142
Pop-Location
2243

2344
# Run the installer silently and WSL/HyperV install options disabled (prevent reboots)
2445
$command = "$WIN_INST_FOLDER\test-installer.ps1 "
2546
$command += "-scenario all "
2647
$command += "-provider $ENV:CONTAINERS_MACHINE_PROVIDER "
2748
$command += "-setupExePath `"$WIN_INST_FOLDER\podman-$ENV:WIN_INST_VER-dev-setup.exe`""
49+
$command += "-previousSetupExePath `"$env:PREV_SETUP_EXE_PATH`""
50+
$command += "-nextSetupExePath `"$WIN_INST_FOLDER\podman-$NEXT_WIN_INST_VER-dev-setup.exe`""
51+
$command += "-v531SetupExePath `"$env:V531_SETUP_EXE_PATH`""
2852
Run-Command "${command}"

contrib/pkginstaller/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ ifeq ($(ARCH), aarch64)
66
else
77
GOARCH:=$(ARCH)
88
endif
9-
GVPROXY_VERSION ?= 0.8.0
10-
VFKIT_VERSION ?= 0.5.1
9+
GVPROXY_VERSION ?= 0.8.1
10+
VFKIT_VERSION ?= 0.6.0
1111
KRUNKIT_VERSION ?= 0.1.4
1212
GVPROXY_RELEASE_URL ?= https://github.com/containers/gvisor-tap-vsock/releases/download/v$(GVPROXY_VERSION)/gvproxy-darwin
1313
VFKIT_RELEASE_URL ?= https://github.com/crc-org/vfkit/releases/download/v$(VFKIT_VERSION)/vfkit-unsigned

0 commit comments

Comments
 (0)