Commit Graph

1275 Commits

Author SHA1 Message Date
Mario Loriedo 91e4f6918a Remove the option to install WSL/HyperV
The Windows installer was able to automatically enable the
Windows features for WSL or HyperV when they were not
already enabled. This PR removes this capability.

Having the installer to automatically install the right prerequiste
(WSL or HyperV) was helpful as users won't have to do it manually to
use Podman after the installation. But it also made the code of
installer more complicated as it needed to manage the installation
of these OS features and a reboot. And we weren't able to automatically
test these scenarios that required a reboot.

In other words the Windows installer, that merely just extracted
some files in a folder, required, to support the installation of
WSL and HyperV, an advanced knowledge of WiX toolkit and of the
Windows Installer SDK, plus contributors-time to manually test
the scenarios that require a reboot.

We decided to remove this capability based on the following reasons:
- We had a couple of regressions in the last month that were hard to
  analyse and fix (#24624 and #24735)
- Podman maintainers currently have a scarce knowledge of the Windows Installer
  and there is no plan to invest in that
- Manually installing WSL or HyperV is not hard (e.g. run `wsl --install`) and
  are features that admins can manage on their fleet of Windows machines
- Competitors such as Docker Desktop don't automatically install these
  components
- Podman `machine init` currently verifies if WSL and HyperV are installed and
  guide the user to install them when they are not

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2025-02-07 16:10:54 +01:00
openshift-merge-bot[bot] 39becc2f05
Merge pull request #24781 from ashley-cui/builtfor
Add BuildOrigin field to podman info
2025-02-04 20:13:27 +00:00
Paul Holzinger 89283c6fcc
update gvproxy version
The current macos installer gvproxy version has a number of issues
around dns handling[1,2]. They should be fixed now in 0.8.3 as they
reverted the dns changes back to the 0.7.5 code. This should make it
work like it used to be. Our 5.3.2 installer ships the 0.7.5 version so
users of the podman installer never noticed that but we got plenty of
reports from brew users. This needs to be backported into v5.4 to make
sure we do not ship the broken version as part of the installer.

[1] https://github.com/containers/gvisor-tap-vsock/issues/462
[2] https://github.com/containers/gvisor-tap-vsock/issues/466

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-02-03 15:54:34 +01:00
Paul Holzinger 4a0006db33
cirrus: ensure HOME is set in postbuild.sh
go 1.24 on rawhide starts to fail with:
go: could not parse netrc (GOAUTH=netrc): $HOME is not defined

GOAUTH is a new go 1.24 feature, and someone this started to require a
$HOME set. We should have $HOME set already in many places but because
the lib.sh script was not loaded here it was not set.

We have GOPATH set AFAICT otherwise go would never have worked without
$HOME.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-01-31 16:05:39 +01:00
Ashley Cui d3706bcad1 Add BuildOrigin field to podman info
BuildOrigin is a field that can be set at build time by packagers. This helps us trace how and where the binary was built and installed from, allowing us to see if the issue is due to a specfic installation or a general podman bug. This field shows up in podman version and in podman info when populated. Note that podman info has a new field, Client, that only appears when running podman info using the remote client.

Automatically set the BuildOrigin field when building the macOS pkginstaller to pkginstaller.

Usage: make podman-remote BUILD_ORIGIN="mypackaging"

Signed-off-by: Ashley Cui <acui@redhat.com>
2025-01-30 14:48:30 -05:00
openshift-merge-bot[bot] 92bce4fd80
Merge pull request #25135 from l0rd/win-installer-block-351-upgrade
Avoid upgrading from v5.3.1 on Windows
2025-01-28 12:11:35 +00:00
Andrew Sayers 527a51dcc4
Fix podman-restart.service when there are no containers
If no containers need to be restarted, podman-restart prints "Error: you must provide at least one name or id" then fails.

Update the service file to handle start and stop symmetrically.

See discussion in https://github.com/containers/podman/pull/25131

Signed-off-by: Andrew Sayers <andrew-github.com@pileofstuff.org>
2025-01-27 14:53:35 +00:00
Mario Loriedo 3aa09dd521 Avoid upgrading from v5.3.1 on Windows
Added a condition in the Windows WiX bundle that
prevents upgrades from v5.3.1 and recommend the
user to upgrade to v5.3.2 first.

That's needed because version 5.3.1 of the installer
had a bug that got patched in v5.3.2 only.

c.f. https://github.com/containers/podman/issues/24735

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2025-01-27 15:52:18 +01:00
openshift-merge-bot[bot] c586d36223
Merge pull request #25021 from l0rd/rm-win-patch
Stop creating a patch for v5.3.1 upgrades on Windows
2025-01-21 13:30:18 +00:00
Florian Apolloner 805e78c2aa Set network ID if available during container inspect
Fixes #24910

Signed-off-by: Florian Apolloner <florian@apolloner.eu>
2025-01-20 15:55:26 +01:00
Mario Loriedo 969057bacc 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>
2025-01-20 11:56:18 +01:00
openshift-merge-bot[bot] f325054939
Merge pull request #24827 from l0rd/win-installer-patch
Add a Windows Installer patch to avoid unrequested reboots
2024-12-13 19:33:55 +00:00
Christophe Fergeau 8b90e3f9c0 vfkit: Use 0.6.0 binary
The go module was update to 0.6.0 but podman is still installing an
older binary. This is not really a problem, but better to use the
latest version.

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
2024-12-13 15:32:49 +01:00
Christophe Fergeau 3021dbec7a gvproxy: Use 0.8.1 binary
This fixes a few bugs, notably in the DNS resolution code.

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
2024-12-13 15:20:03 +01:00
Mario Loriedo 5f79cd3aef Revert "win-installer test: revert to v5.3.0"
This reverts commit 916b805f97.

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2024-12-12 17:49:37 +01:00
Mario Loriedo e3d2463a48 Avoid rebooting twice when installing WSL
For some reason, after upgrading to WiX v5, the forceReboot action
appeared before the Dism actions in the msi InstallExecuteSequence
table. As a consequence the user was asked to reboot before WSL or
Hyper-V installation and to reboot a second time after their
installation.

To avoid that the ForceReboot action field `Before=StopServices` is
replaced with `After=DismX86`

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2024-12-12 15:56:28 +01:00
Mario Loriedo 2bca5052f1 Avoid rebooting on Windows when upgrading and WSL isn't installed
When building an installer from main branch, and using it
to upgrade the latest Podman release on Windows, a reboot
is triggered if WSL is not installed.

This is a regression caused by an update of the condition
to execute `ForceReboot`.

This commit fixes the condition and updates some defaults
to make it even more unlikely that reboot happens withtout
a specific user request for it.

It doesn't fix the v5.3.1 to v5.3.2 upgrade though. v5.3.1
has been released already and this commit doesn't avoid that it
triggers a reboot when updated.

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2024-12-12 15:56:28 +01:00
Mario Loriedo af607d0de4 Add win installer patch
Adding a patch to the bundle so that the update from previous version
(v5.3.1) is a minor update, not a major one. A minor update prevents the
full uninstallation of v5.3.1 and an unrequested reboot of the machine.

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2024-12-12 15:56:28 +01:00
Mario Loriedo d582c39dc8 Bump WiX toolset version to 5.0.2
Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2024-12-12 15:56:28 +01:00
Brent Baude e4a135a6ac Add man pages to Mac installer
This PR adds the man1 pages to the mac installer.  It also sticks a
small configuration file into /usr/local/etc/man.d that allows macos
and the man binary to look for the podman pages in /opt/podman/docs/man.

Fixes #24756

Signed-off-by: Brent Baude <bbaude@redhat.com>
2024-12-10 10:05:46 -06:00
Nicola Sella 2c58af0e6b Use latest version of VS BuildTools
When one or more versions of VS Build tools are installed the script
.\winmake.ps1 installer does not finish with error.

...
Done!
Invoke-Expression: C:\...\podman\contrib\cirrus\win-lib.ps1:101:5
Line |
 101 |      Invoke-Expression $command -OutVariable unformattedLog | Write-Output
     |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot process argument transformation on parameter 'vsinstance'. Cannot convert the "System.Object[]" value of type "System.Object[]" to type
     | "Microsoft.VisualStudio.Setup.Instance".

Signed-off-by: Nicola Sella <nsella@redhat.com>
2024-12-09 12:18:06 +01:00
SEIAROTg 156fc084a9
Fixes missing binary in systemd.
This is broken on e.g. NixOS as systemd only searches a small set of
directories for command binary, which does not include `/bin` [1].

[1]: https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#Command%20lines

Signed-off-by: SEIAROTg <seiarotg@gmail.com>
2024-11-28 23:42:44 +00:00
Paul Holzinger 916b805f97
win-installer test: revert to v5.3.0
Do not pull from a moving target, use a defined version so updates must
happen in a PR and do not break others.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-11-22 17:35:37 +01:00
Mario Loriedo 07aaa7832a Update windows installer tests
The windows installer tests are command line / non interactive. To test as much as
possible the GUI / interactive scenario (that is what user do), update tests
need to use the installer with the default options. That's because when using the GUI
for an update, changing options is not possible.

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2024-11-20 13:54:12 +01:00
Mario Loriedo 7162c58ba2 Windows: don't install WSL/HyperV on update
The condition `NOT Installed` had not effect and has been replaced with
`NOT WIX_UPGRADE_DETECTED` that is `true` during installation and
`false` during updates.

The `ExePackage` WSL Kernel Install is also not installed if Podman is
already present.

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2024-11-20 13:47:05 +01:00
Mario Loriedo c6549fc25b Switch to non-installing WSL by default
The Windows installer GUI has a checkbox to choose if WSL and HyperV
should be installed as part of the installation of Podman. Now, by
default, that checkbox is disabled for both WSL and HyperV.

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2024-11-20 13:43:41 +01:00
Sergio Lopez 7b41e28b95 Bump bundled krunkit to 0.1.4
Bump the bundled krunkit version from 0.1.3 to 0.1.4.

Fixes: #24559

Signed-off-by: Sergio Lopez <slp@redhat.com>
2024-11-14 15:38:11 +01:00
Ed Santiago e39ddde709 Revert "Reapply "CI: test nftables driver on fedora""
This reverts commit 0e66a793bc.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-11-08 05:09:54 -07:00
openshift-merge-bot[bot] cbb5d7f14b
Merge pull request #24394 from vyasgun/pr/gvproxy080
Update gvproxy to v0.8.0 and disable ssh port forwarding on wsl
2024-11-07 12:20:14 +00:00
Ed Santiago 0e66a793bc Reapply "CI: test nftables driver on fedora"
Temporary, until we get CI VMs with kernel 6.11.6.

I've lost track of where this is being discussed.

This reverts commit 7f836df303.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-11-06 11:03:35 -07:00
Gunjan Vyas 52caa0fbb9 build: update gvisor-tap-vsock to 0.8.0
Signed-off-by: Gunjan Vyas <vyasgun20@gmail.com>
2024-11-06 15:27:23 +05:30
openshift-merge-bot[bot] 2da164c9f2
Merge pull request #24459 from arixmkii/contrib-le
Fix inconsistent line ending in win-installer project
2024-11-04 18:48:44 +00:00
Arthur Sengileyev 528b085438 Fix inconsistent line ending in win-installer project
Signed-off-by: Arthur Sengileyev <arthur.sengileyev@gmail.com>
2024-11-04 16:56:20 +02:00
Paul Holzinger ef20e75a77
cirrus: check consitent vendoring in test/tools
Ensure nobody modifies files directly there.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-11-01 13:23:01 +01:00
Paul Holzinger bd75a4e0e0
logformatter: add cleanup tracer log link
I had a few cases where this is super handy in CI and if I can access the
link without one extra click it safes me some time and hopefully makes
it more discoverable for other to see how useful it can be sometimes.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-29 19:35:01 +01:00
Paul Holzinger 203ab6573b
add new podman-user-wait-network-online.service
This service is meant to be used by quadlet as replacement for
network-online.target as this does not work for rootless users.

see #22197

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-18 11:43:45 +02:00
Paul Holzinger a6c4e00e9a
contrib/systemd: switch user symlink for file symlinks
The reason being that I plan to add a unit that should only be used for
the user session and otherwise there is no way to only keep a unit in
user.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-18 11:40:45 +02:00
Paul Holzinger 21d0711a02
contrib/systemd: move podman-auto-update units
There is really no reason why these should be in separate dir.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-17 17:48:28 +02:00
Ed Santiago b3302e8e18 Housekeeping: remove duplicates from success_task
Accidentally introduced in #21639.

Thanks to Paul for the Python code to prevent this from
happening again.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-10-15 10:09:15 -06:00
openshift-merge-bot[bot] 11ab0b7246
Merge pull request #24120 from Luap99/cirrus-build-speed
cirrus: use fastvm for builds
2024-10-14 16:04:12 +00:00
Paul Holzinger 7f836df303
Revert "CI: test nftables driver on fedora"
This reverts commit 43f6173cc6.

The netavark version with nftables default is in f41 and rawhide
already so this is no longer needed. While we do not yet test f41 in CI
we have rawhide which is good enough until we update.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-11 13:13:53 +02:00
Paul Holzinger 9e35fead03
cirrus: use zstd over bzip2 for repo archive
The repo tar process took over 1:20 min, with zstd it takes less than
10s so we safe over a minute by doing this.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-11 11:25:34 +02:00
Paul Holzinger 7eb4a6fe2b
cirrus: speed up postbuild
In particular the main build task already did a make vendor and a
regeneration of the completion scripts. This means the first tre_status
would pick up both changes so the suggestion would be off. And rerunning
the same thing again here just makes thing slower than they need to be.
In particular there was the bug that make completion even rebuild podman
because generate-bindings obviously updates the timestamps of the files
as they are overwritten.

We do however must run generate-bindings as it was not run before.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-11 11:25:33 +02:00
Paul Holzinger 04dffbc2c7
cirrus: change alt arch task to only compile binaries
The current podman-release-%.tar.gz target does a lot more then just
checking if we can build for the given arch, in particular it first
builds a local podman-remote for the remote-docs.sh script. This makes
things slow as we compile several things and then builda and package the
docs. Given the docs are not arch specific there is realy no point in
doing all that work. All we care about is if the bianries can build on
other arches to catch compile issue for otherwise untested arches.

This should make the CI Alt Arch. tasks much faster.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-11 11:25:33 +02:00
Paul Holzinger 9082a14d76
cirrus: run make with parallel jobs where useful
The doc generation and the validate-binaries target can be run in
parallel as they do not depend on each other and a specific ordering. As
such we pass -j $(nproc) but also --output-sync=target to ensure the
output is not intermixed between several targets which could be harder
to read in case of errors.

Hower dus the complex podman-release target we can run podman-release
and validate-binaries at the same time as the dependencies are not right
and we run podman-release first in order to get the correct binaires
build.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-11 11:25:33 +02:00
Sergio Lopez 858472aa83 Bump bundled krunkit to 0.1.3
Bump the bundled krunkit version from 0.1.2 to 0.1.3.

Fixes: #23296

Signed-off-by: Sergio Lopez <slp@redhat.com>
2024-10-07 19:41:20 +02:00
Paul Holzinger 09ba5db035
CI: run and collect cleanup tracer logs
In order to get better debug data for cleanup flakes. The argv is
printed with 0 bytes so replace them with spaces to make the log
readable for humans.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-09-24 12:47:04 +02:00
Ed Santiago 6502e30cfd bats log: differentiate parallel tests from sequential
For tests run in parallel, show file number as |nnn| (vs [nnn])

Teach logformatter to distinguish the two, adding 'p' to anchors
in parallel tests. Necessary because in this scheme we run bats
twice, thus see 'ok 1' twice, and we want to differentiate them.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-09-17 11:19:37 -06:00
openshift-merge-bot[bot] 07397de1eb
Merge pull request #23936 from l0rd/win-setup-radio-button
Add radio buttons to select WSL or Hyper-V in windows setup.exe
2024-09-13 12:44:40 +00:00
Mario Loriedo cb03ca31b2 Add radio buttons to select WSL or Hyper-V in windows setup.exe
Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2024-09-11 17:36:00 +02:00