796 Commits

Author SHA1 Message Date
5c810ea1c8 Makefile: add SOURCES dep to bin/podman.cross.% target
Without this the corss binaries will never get rebuild until the user
manually deletes them which is not very useful.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-09-03 12:11:23 +02:00
b62f887fbd Makefile: add proper docs for bin/podman.cross.%
To avoid any confusion where people think this target is unused.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-09-03 12:11:23 +02:00
3633cd53e8 Revert "Remove bin/podman.cross Make target"
This reverts commit c45b27ffb094cc09e88bf9dd9dcebfacc80e574f.

This commit was just wrong, local-cross depends on this target as it
calls a target like "bin/podman.cross.linux.amd64". Without this it is
just broken as there is no matching target.

$ make bin/podman.cross.linux.amd64
make: *** No rule to make target 'bin/podman.cross.linux.amd64'.  Stop.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-09-03 12:11:23 +02:00
599c635f9f chore(deps): update dependency golangci/golangci-lint to v2.4.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-14 03:58:04 +00:00
b147284641 Merge pull request #26734 from osalbahr/makefile-clarify-binaries
Makefile: Clarify different `binaries` targets
2025-08-06 12:20:57 +00:00
1001450d77 chore(deps): update dependency golangci/golangci-lint to v2.3.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-03 01:03:20 +00:00
32ec523ef6 Makefile: Clarify different binaries targets
I ran `make help` and found it confusing that `binaries` is listed three times:

```console
Target:                     Description:
--------------              --------------------
binaries                    Build podman and podman-remote binaries
binaries                    Build podman, podman-remote and rootlessport binaries quadlet
binaries                    Build podman-remote (client) only binaries
clean-binaries              Remove platform/architecture specific binary files
clean                       Clean all make artifacts
docs                        Generate documentation
help                        (Default) Print listing of key targets with their descriptions
install.tools               Install needed tools
install                     Install binaries to system locations
local-cross                 Cross compile podman binary for multiple architectures
podman-mac-helper           Build podman-mac-helper for macOS
podman-remote-release-%.zip Build podman-remote for %=$GOOS_$GOARCH, and docs. into an installation zip.
rpm-install                 Install rpm packages
rpm                         Build rpm packages
test                        Run unit, integration, and system tests.
validatepr                  Go Format and lint, which all code changes must pass
```

So I'm proposing a way to differentiate btween them.

Signed-off-by: Osama Albahrani <54853250+osalbahr@users.noreply.github.com>
2025-08-01 23:47:19 +03:00
ea5b83c0cb chore(deps): update dependency golangci/golangci-lint to v2.3.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-21 18:18:40 +00:00
0c586807ea chore(deps): update dependency golangci/golangci-lint to v2.2.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-11 13:37:46 +00:00
d8599658ff Makefile: add Makefile to sources
During my binary size reduce experiments I often switch build tags
around but make binaries does not recompile in these cases.
It is annoying to always do touch cmd/podman/main.go so let's add it to
the SOURCES instead so the Makefile will recompile on changes.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-30 19:39:45 +02:00
3d453572a9 Makefile: add grpcnotrace build tag
The build tag was added to remove the "golang.org/x/net/trace"
dependency[1]. So let's use that.
With that we reoduce the binary size by 432KB.

[1] https://github.com/grpc/grpc-go/pull/6954

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-30 19:22:08 +02:00
92a6298729 chore(deps): update dependency golangci/golangci-lint to v2.2.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-30 09:46:18 +00:00
0439167943 remove hack/install_catatonit.sh
This was not updated to the latest versions and CI and basically any
user should get in from their distro repos.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-17 18:35:28 +02:00
bf7c9a1536 Makefile: remove some old files from clean target
These have not been build or used for a very long time so they can be
dropped IMO.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-17 18:31:10 +02:00
8cfe7bb003 remove cni/
We no longer support CNI upstream and this default config file has not
been nedded for years since we started to generate our own default file
internally. And since 4.0.0 the default config file only exist in the
bianry and not on disk so this should not be installed by anyone even if
they still happen to use CNI.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-17 18:22:01 +02:00
5d88999447 remove contrib/modules-load.d
We used this to load the iptables module, since f41 we use nftables by
default which does not need this at all so drop the module load file.

If some distros default still to the legacy iptables they can manually
add the moduled load file back.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-17 18:11:06 +02:00
605b1f7386 remove contrib/remote/containers.conf
The config file is installed in the remote zip as an example but the
content in there is not being updated and no longer really the way to do
things. With podman 5.0 we have a proper system connection file and
people in general should just use the system connection commands.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-17 17:59:06 +02:00
9541c09620 Merge pull request #26334 from Luap99/sqlite-dynamic-link
dynamically link sqlite
2025-06-12 13:25:54 +00:00
d4a8598ca4 make validate-in-container changes
changing the validate-in-container make target to use
quay.io/libpod/validatepr:latest.  this allows `make validate` to run to
completion doing linting, ed's perl checks, and pre-commit.]

The image is now based on F42 `awk` is not part of the base image, so I added `awk`.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2025-06-10 12:38:35 -05:00
c6842d3425 Makefile: use libsqlite3 build when possible
Dynamically link sqlite3 when installed, the main motivation is that we
reduce the podman binary size with that. I see about 2.5 MB savings.

But also dynamically linking it means if there a vulnerabilities only
the sqlite3 distro package needs updating and we don't have to make a
new podman release with the vendored update.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-10 15:52:11 +02:00
dbebcbe619 Merge pull request #26325 from ninja-quokka/makefile
Allow generate-bindings on darwin
2025-06-10 13:36:40 +00:00
c45b27ffb0 Remove bin/podman.cross Make target
The local-cross Make target has superceeded this old Make target and the
warning to not use it has been in place now for 4+ years.

Removing it to clean up the Makefile slightly.

Signed-off-by: Lewis Roy <lewis@redhat.com>
2025-06-09 22:20:45 +10:00
c96d87ccad Allow generate-bindings on darwin
This exclusion has been there since the make target was added[1]. I wasn't
able to find the reason but this runs on Darwin today and is useful to
be able to run when you are developing bindings on a Mac.

[1] https://github.com/containers/podman/pull/8956

Signed-off-by: Lewis Roy <lewis@redhat.com>
2025-06-09 22:10:41 +10:00
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