773 Commits

Author SHA1 Message Date
efc3b178bb Build windows arm64 artifacts
Includes the necessary changes so that the `Makefile` target
`release-artifacts` builds the `-windows_arm64.zip` too.

In particular the arm64 versions of gvproxy and win-sshproxy
are downloaded as part of the windows arm64 release zip file.

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2025-05-07 18:43:59 +02:00
ec6423e73b chore(deps): update dependency golangci/golangci-lint to v2.1.6
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-04 17:48:26 +00:00
c9b1bd1cf3 Stop setting btrfs_noversion build tag
c/storage no longer uses this tag after
https://github.com/containers/storage/pull/2308.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-04-30 14:22:25 +02:00
ad20e257d6 Makefile: move some Go-related variable definitions up
Otherwise we evaluate NATIVE_GOOS before it is set, which breaks the
FreeBSD build since various make variables are not set correctly.

Fixes: #26006
Signed-off-by: Mark Johnston <mark.johnston@klarasystems.com>
2025-04-29 16:55:04 +00:00
710c077342 chore(deps): update dependency golangci/golangci-lint to v2.1.5
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-25 10:20:27 +00:00
75aec675d2 chore: use another script to get the version of gvproxy
Signed-off-by: Florent Benoit <fbenoit@redhat.com>
2025-04-22 22:04:08 +02:00
ce0617eac4 Use gvisor-tap-vsock version from go.mod file
Instead of hardcoding gvisor version in different build files, we get gvisor version from go.mod file.

Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
2025-04-22 18:44:04 +02:00
7b30f19535 chore(deps): update dependency golangci/golangci-lint to v2.1.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-15 15:53:06 +00:00
f26765ceb0 update golangci-lint to v2.1.1
Fixes three new issues found by nilnesserr.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-04-14 19:33:42 +02:00
0a0d05b3e3 Merge pull request #25781 from kolyshkin/rm-goimports
Use golangci-lint fmt for pkg/bindings
2025-04-04 09:38:25 +00:00
e65bbab04d Merge pull request #25773 from kolyshkin/freebsd-no-seccomp
Makefile: exclude seccomp build tag for !linux
2025-04-04 02:20:23 +00:00
9d4e820264 Use golangci-lint fmt for pkg/bindings
golangci-lint v2 introduced a new command, fmt, which runs configured
formatters (see formatters in .golangci.yml).

Use this for generated files. Drop separate goimports binary.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-04-03 10:41:14 -07:00
055fc82bd2 Makefile: exclude seccomp build tag for !linux
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-04-03 10:09:07 -07:00
a8dd9bc1ed Makefile: use GOOS/NATIVE_GOOS instead of uname -s
Saves a few fork/execs, and unify the code since other places are
already using NATIVE_GOOS or GOOS.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-04-03 10:08:49 -07:00
275e77d1fa test/tools/vendor: drop ginkgo
It appears[1] that ginkgo binary can be easily built from the top-level
vendor, so it does not make sense to have a second copy in test/tools
(and a hassle of keeping the two in sync).

Inspired by [1], [2], and a run of make localtest, which shows:

> Ginkgo detected a version mismatch between the Ginkgo CLI and the version of Ginkgo imported by your packages:
>   Ginkgo CLI Version:
>     2.22.1
>   Mismatched package versions found:
>     2.23.3 used by podman, common, containers, parse, quadlet, rootlessport, abi, tunnel, libpod, events, file, shm, logs, annotations, libpod, utils, apiutil, auth, ctime, abi, expansion, utils, emulation, env, errorhandling, machine, compression, connection, define, ocipull, provider, proxyenv, qemu, command, shim, vmconfigs, rootless, signal, specgen, generate, kube, specgenutil, systemd, generate, notifyproxy, parser, timetype, trust, util, utils

[1]: af29bb5b6e (r2020246403)
[2]: e6c7ec94e2 (r2020230241)

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-04-01 14:24:41 -07:00
c9b108d5b3 Bump golangci-lint to v2.0.2
This ended up slightly more complicated than anticipated, tin part
because golangci-lint v2 dropped support for --exclude-dirs, so
linter issues with GOOS=windows and GOOS=darwin which were previously
ignored had to be fixed now.

This is also the reason why the ./hack/golangci-lint was simplified.
In addition, it now runs linters on Linux without systemd tag set.

Tested locally with:

	for OS in linux windows darwin; do GOOS=$OS ./hack/golangci-lint.sh; done
	Linting for GOOS=linux
	+ ./bin/golangci-lint run --build-tags=apparmor,seccomp,selinux
	0 issues.
	+ ./bin/golangci-lint run --build-tags=apparmor,seccomp,selinux,systemd
	0 issues.
	+ ./bin/golangci-lint run --build-tags=apparmor,seccomp,selinux,remote
	0 issues.
	Linting for GOOS=windows
	+ ./bin/golangci-lint run --build-tags=remote,containers_image_openpgp
	0 issues.
	Linting for GOOS=darwin
	+ ./bin/golangci-lint run --build-tags=remote,containers_image_openpgp
	0 issues.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-03-31 12:27:55 -07:00
60692ca350 Remove exclude_graphdriver_devicemapper build tag
As of commit d4c7ca39f ("update c/{buildah,common,image,storage} to
latest main") no dependencies use exclude_graphdriver_devicemapper tag.

This (hopefully) concludes the work of removing devicemapper graph
driver.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-03-30 00:30:03 -07:00
87421d9508 Fix WSL installation check on Windows
Fixes #25234

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2025-03-13 09:18:54 +01:00
264c8da0b9 Merge pull request #25501 from evidolob/update-gvisor
update gvproxy version to 0.8.4
2025-03-11 13:53:55 +00:00
48662fa32b update gvproxy version to 0.8.4
The 0.8.4 has one important fix[1], which could improve #25121.
Also it set all places to use same version of gvisor-tap-vsock
[1]https://github.com/containers/gvisor-tap-vsock/issues/474

Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
2025-03-11 09:51:52 +02:00
41dd3f2474 Automate release
Automatically generate our GitHub release.

This GitHub action is traggered on a tag push, or manually. After a the trigger, all artifacts are built, including linux, mac, and windows installers. After everything is built, the release is automatically generated on our GitHub, and an email notification is sent out.

Our old actions are marked deprecated, and now can only be triggered manually. Leave them as-is otherwise, as a backup, so we have a tried-and-tested way of generating images, just in case this new action goes wrong.

Signed-off-by: Ashley Cui <acui@redhat.com>
2025-03-05 14:30:57 -05:00
035fff5fd2 update golangci-lint to v1.64.4
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-02-13 12:18:33 +01:00
986fc9f465 update golangci-lint to v1.64.2
- exportloopref is deprecated and deactivated so it should be removed
  from the disable list.
- tenv is deprecated and was replaced by usetesting

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-02-12 14:01:10 +01:00
b4fc9cd14d Makefile: escape BUILD_ORIGIN properly
When trying to pass a string with spaces that broke the go command cli
parsing, the full argument must be put in quotes to avoid escaping
issues.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-02-07 14:02:25 +01:00
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
bbf00ec6bf Makefile: Add validatepr description for 'make help' output
Signed-off-by: H Dub <14808878+hdub-tech@users.noreply.github.com>
2025-01-24 14:44:00 -06:00
e9fb805522 update golangci/golangci-lint to v1.63.4
Fix new issues found by usetesting, mainly we should use t.TempDir() in
test which makes the code better as this will be removed on test end
automatically so no need for defer or any error checking.
Also fix issues reported by exptostd, these mainly show where we can
switch the imports to the std maps/slices packages instead of the
golang.org/x/exp/... packages.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-01-07 15:48:53 +01:00
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
9c14d15f4c bin/docker: fix broken escaping and variable substitution
In #24034 more variables were added to the envsubst input, but there is no
escaping with envsubst, so the resulting bash script never used
XDG_CONFIG_HOME. Also it replaced HOME with the build time HOME env
var breaking the runtime subsitution, resulting in something bogus like:

[ -e "\${XDG_CONFIG_HOME-\/home/build/.config}/containers/nodocker" ]

Fix by telling envsubst to just replace BINDIR and ETCDIR and remove
the broken escaping in the envsubst input.

Signed-off-by: Christoph Reiter <reiter.christoph@gmail.com>
2024-12-07 15:21:51 +01:00
2f1a1fb6f3 make remotesystem: fail early if serial tests fail
Exit status was being lost due to sequential bats invocations.

Solution: preserve exit status of first (serial) run,
and skip parallel tests if those fail.

I am so, so sorry.

Signed-off-by: Eduardo Santiago <ed@edsantiago.com>
2024-11-27 14:51:52 -07:00
e5ed7847c1 chore(deps): update dependency golangci/golangci-lint to v1.62.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-25 17:38:01 +00:00
9eca92d625 update golangci-lint to v1.62.0
- fix issues found by recvcheck
- skip k8s files from recvcheck
- remove two removed linters gomnd and execinquery

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-11-11 14:21:17 +01:00
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
2279a77303 Merge pull request #24403 from Luap99/tools-vendor
go.mod vendor: ensure we never have the toolchain directive set
2024-11-04 17:15:12 +00:00
0acd192b59 Makefile: vendor target should always remove toolchain
We never want the toolchain as the default is to use the same as the go
version. So the only purpose of toolchain is to force a newer compiler
than necessary which we do not want as we are getting build by many
different distributions and block builds that would otherwise work fine
is just not helpful to anyone.

Also update the go.mod comments remind people that there should be no
toolchain. The make vendor target with the toolchain will now guarantee
this so the CI will fail otherwise.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-11-01 13:23:01 +01:00
6b8e8cbbf7 make podman-clean-transient.service work as user
In the user session there is no boot-complete.target so the Requires=
fails. We do not need it and I am not sure if we need it for the root
unit either but I deicded to keep it there to not change anything and
for the user session we patch it out.

I patched this in the Makefile, while we could try to define two
different source files for that it would make the Makefile logic even
more complicated. In particular as this file is a .in we would need to
add it to PODMAN_GENERATED_UNIT_FILES and then somehow fix the loop. To
much work IMO so the sed trick to patch the user file is simpler.

Fixes #23790

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-30 18:19:36 +01:00
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
1462b52090 Makefile: remove some duplication from install.systemd
Use a single loop for both the user and system service so we do not have
to duplicate the full paths every time.
In particular we can use `$^` to list all dependecies and then add the
not generated files to the loop as well to simplify this. And to make
things clear rename PODMAN_UNIT_FILES to PODMAN_GENERATED_UNIT_FILES so
readers immediately know they are generated and are safe to delete in
contrast to the .socket/.timer unit that are not and part of the git
history.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-18 11:37:58 +02:00
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
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
bc3db7c95b Makefile: allow man-page-check to be run in parallel
This target runs several scripts in serial but they do not have any
dependencies so we can split them all into their own target so that make
-j can run the targets in parallel to speed this up.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-11 11:25:33 +02:00
e2e1996c6a Makefile: fix ginkgo FOCUS option
This fixes a regression that causes the FOCUS option to not work
correctly as the --silence-skips is passes to --focus not as extra
option.

Fixes 23f256349b ("Makefile - silence skipped tests when focusing on a file")

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-07 11:56:41 +02:00
23f256349b Makefile - silence skipped tests when focusing on a file
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2024-10-02 09:54:06 -04:00
d571ca6536 system test parallelization: enable two-pass approach
For the past two months we've been splitting system tests
into two categories: those that CAN be run in parallel,
and those that CANNOT. Much work has been done to replace
hardcoded names (mycontainer, mypod) with safename().
Hundreds of test runs, in CI and on Ed's laptop, have
proven this approach viable.

make {local,remote}system now runs in two steps: first
the serial ones, then the parallel ones. hack/bats will
now recognize the 'ci:parallel' tag and add --jobs (nprocs).

This requires some tweaking of leak_check, because there
can be umpteen tests running (affecting image/container/pod/etc
state) when any given test completes.

Rules for enabling parallelization in tests:

   * use unique container/pod/volume/network names (safename)
   * do not run 'podman rm -a' or 'rmi -a'
   * never use the -l (--latest) option
   * do not run 'podman ps/images' and expect precise output

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-09-17 09:25:02 -06:00
49a07fce49 update golangci-lint to 1.61.0
Silence some new warnings that should not matter here.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-09-17 13:30:59 +02:00
b645f708f8 Merge pull request #23875 from rhatdan/rootless
Add podman-rootless.7 man page
2024-09-06 08:51:55 +00:00
4700b5a58a Add codespell config, pre-commit definition, and move options from Makefile
Signed-off-by: Yaroslav Halchenko <debian@onerussian.com>
2024-09-05 13:56:03 -04:00
c317da8deb Add podman-rootless.7 man page
This is a follow up to 5389eee7376cf81fbfdaf58cd58d38b287f5da23
to add rooltess.md information to man pages to help users
discover solutions to troubleshooting and rooless issues.

Specicifally I was surprised when binding to ports < 1024 was
not covered in podman-troubleshooting.7 man page.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-09-05 09:56:48 -04:00
94431c29b4 cirrus: remove ginkgo-e2e.json artifact
It is not used by anybody so we do not have to store these and can safe
some time by not having to generate it even if it is just ~500ms.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-08-29 18:59:46 +02:00
5389eee737 Create a podman-troubleshooting man page
Generated at build time from troubleshooting.md. Purpose is
to ship an actual man page to end users.

Much more complicated than initial guess, because there was
a bug in my Makefile man page filtering, the sed expression
that cleans up markdown that does not translate to roff.
All I've done here is reorder some of the expressions,
stripping off https links *before* we process
podman man page links.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-08-28 05:49:45 -06:00