Commit Graph

24865 Commits

Author SHA1 Message Date
Kir Kolyshkin 6bf1923f3e pkg/specgen: fix ST1019 on freebsd
> pkg/specgen/generate/oci_freebsd.go:15:2: ST1019: package "github.com/opencontainers/runtime-spec/specs-go" is being imported more than once (staticcheck)
> 	"github.com/opencontainers/runtime-spec/specs-go"
> 	^
> pkg/specgen/generate/oci_freebsd.go:16:2: ST1019(related information): other import of "github.com/opencontainers/runtime-spec/specs-go" (staticcheck)
> 	spec "github.com/opencontainers/runtime-spec/specs-go"
> 	^

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-04-02 13:35:14 -07:00
Kir Kolyshkin 118670b31f pkg/specgen/generate: fix S1002 on freebsd
> pkg/specgen/generate/namespaces_freebsd.go:60:9: S1002: should omit comparison to bool constant, can be simplified to !jail.NeedVnetJail() (staticcheck)
> 	return jail.NeedVnetJail() == false
> 	       ^

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-04-02 13:35:14 -07:00
Kir Kolyshkin 0eea1cb297 libpod: don't capitalize error string
This fixes the following warning:

> libpod/networking_freebsd.go:148:19: ST1005: error strings should not be capitalized (staticcheck)
> 		return "", nil, fmt.Errorf("Failed to create vnet jail %s for container %s: %w", netns, ctr.ID(), err)
> 		                ^

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-04-02 13:35:14 -07:00
Kir Kolyshkin 66c7efdb6b libpod: use context.TODO to fix SA1012 on freebsd
This one:

> libpod/container_internal_freebsd.go:393:37: SA1012: do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (staticcheck)
> 		inspectData, err := image.Inspect(nil, nil)
> 		                                  ^

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-04-02 13:35:14 -07:00
Kir Kolyshkin 4165877c58 libpod: gix a govet warning on freebsd
> libpod/networking_freebsd.go:160:4: printf: github.com/sirupsen/logrus.Errorf does not support error-wrapping directive %w (govet)
> 			logrus.Errorf("failed to destroy vnet jail %s: %w", netns, err)
> 			^

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-04-02 13:35:14 -07:00
Kir Kolyshkin 851bd141af Fix errcheck warnings on freebsd
These two:

> libpod/container_internal_freebsd.go:183:33: Error return value of `c.runtime.state.UpdateContainer` is not checked (errcheck)
> 	c.runtime.state.UpdateContainer(nsCtr)
> 	                               ^
> pkg/specgen/generate/config_freebsd.go:51:12: Error return value is not checked (errcheck)
> 		addDevice(g, resolvedDevicePath)
> 		         ^

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-04-02 13:35:14 -07:00
Kir Kolyshkin 8fd7143e36 cmd/podman-testing: fix freebsd compilation
This fixes:

cmd/podman-testing/create.go:1: : # github.com/containers/podman/v5/cmd/podman-testing
cmd/podman-testing/main.go:65:12: undefined: storeBefore
cmd/podman-testing/main.go:69:28: undefined: engineMode
cmd/podman-testing/main.go:99:12: undefined: storeAfter (typecheck)

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-04-02 13:35:14 -07:00
Kir Kolyshkin c6189c5b51 test/checkseccomp: add linux build tag
This is a linux-only binary.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-04-02 13:35:14 -07:00
Kir Kolyshkin f589811073 pkg/rootless: fix ST1005 warning for freebsd
> pkg/rootless/rootless_freebsd.go:24:20: ST1005: error strings should not be capitalized (staticcheck)
> 	return false, -1, errors.New("Rootless mode is not supported on FreeBSD - run podman as root")
> 	                  ^

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-04-02 13:35:14 -07:00
openshift-merge-bot[bot] 4f75d0be47
Merge pull request #25770 from containers/renovate/github.com-onsi-gomega-1.x
fix(deps): update module github.com/onsi/gomega to v1.37.0
2025-04-02 19:31:33 +00:00
openshift-merge-bot[bot] dac6de0f1d
Merge pull request #25757 from baude/needsinfo
Add autocomment for `needs-info` label
2025-04-02 19:26:09 +00:00
openshift-merge-bot[bot] 1d8947965d
Merge pull request #25764 from xixishidibei/main
chore: fix function name in comment
2025-04-02 19:09:30 +00:00
openshift-merge-bot[bot] d04783ad8e
Merge pull request #25398 from mheon/add_governance
Add initial draft of Podman project Governance
2025-04-02 18:44:47 +00:00
openshift-merge-bot[bot] f938f0d175
Merge pull request #25768 from baude/updateroadmap2q25
Update roadmap for 2Q 2025
2025-04-02 18:36:23 +00:00
renovate[bot] 783f0c8076
fix(deps): update module github.com/onsi/gomega to v1.37.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-02 18:13:17 +00:00
openshift-merge-bot[bot] 0d7ffeb1e9
Merge pull request #25767 from plettich/update_documentation
Update links and markup in man pages
2025-04-02 18:11:41 +00:00
Matt Heon f1f84320a2 Add initial draft of Podman project Governance
This is the initial version of the governance model we're looking
to implement. It is still very early, and comments and
suggestions are very welcome!

Signed-off-by: Matt Heon <mheon@redhat.com>
2025-04-02 14:04:12 -04:00
Brent Baude 83cf9ee8a9 Update roadmap for 2Q 2025
now that the priorities have been determined, we are able to publish
general roadmap items for 2W 2025.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2025-04-02 12:27:17 -05:00
Paul Lettich 84203fa6ce Update links and markup in man pages
- Fix links to other man-pages in podman-build.1.md.in
- Fix markup and add link to oci-hooks manpage in podman.1.md

Signed-off-by: Paul Lettich <paul.lettich@netknights.it>
2025-04-02 17:22:43 +02:00
xixishidibei 040385ef9b chore: fix function name in comment
Signed-off-by: xixishidibei <xixishidibei@outlook.com>
2025-04-02 21:26:27 +08:00
Brent Baude 8db52f8984 Add autocomment for `needs-info` label
When a reviewer of an issue determines that an issue is incompleted, a
`needs-info` label can be added to the issue.  This will trigger a GH
action with an automated response.  The reviewer should also have told
the user what is needed or asked a question.  Also, we have no automated
way to remove the label when a response is provided, so this still needs
to be managed.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2025-04-02 07:36:12 -05:00
openshift-merge-bot[bot] 53be17d126
Merge pull request #25756 from danegsta/danegsta/buildahVendor
Update vendored c/buildah to `32d78c69be17`
2025-04-02 00:26:44 +00:00
David Negstad 684126e426 Suppress failing bud tests in remote
Signed-off-by: David Negstad <David.Negstad@microsoft.com>
2025-04-01 14:54:34 -07:00
David Negstad 3d12f1e2ed Update vendored c/buildah to 32d78c69be17
Signed-off-by: David Negstad <David.Negstad@microsoft.com>
2025-04-01 13:26:06 -07:00
openshift-merge-bot[bot] 4b2472595c
Merge pull request #25753 from flouthoc/vendor-common
vendor: bump c/common to `9b0d134f392`
2025-04-01 19:09:00 +00:00
openshift-merge-bot[bot] f5120f4ee8
Merge pull request #25752 from containers/renovate/github.com-shirou-gopsutil-v4-4.x
fix(deps): update module github.com/shirou/gopsutil/v4 to v4.25.3
2025-04-01 17:41:01 +00:00
flouthoc 74356e1b5a
config: use ErrInvalidName
SA1019: types.RegexError is deprecated: use [ErrInvalidName] instead.

Making linter happy.

Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2025-04-01 10:14:51 -07:00
renovate[bot] c27195ea65
fix(deps): update module github.com/shirou/gopsutil/v4 to v4.25.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-01 16:58:58 +00:00
flouthoc 51bb71d1b3
vendor: bump c/common to 9b0d134f392
Bump common to 9b0d134f392f41de3f3065aad162e73a3904168e

Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2025-04-01 09:58:43 -07:00
openshift-merge-bot[bot] d4988898ac
Merge pull request #25726 from kolyshkin/golangci-v2
Golangci v2
2025-04-01 16:56:56 +00:00
openshift-merge-bot[bot] 69408391f6
Merge pull request #25744 from containers/renovate/github.com-opencontainers-runtime-tools-digest
fix(deps): update github.com/opencontainers/runtime-tools digest to 260e151
2025-04-01 14:41:28 +00:00
openshift-merge-bot[bot] ce959bbd40
Merge pull request #25745 from containers/renovate/github.com-openshift-imagebuilder-digest
fix(deps): update github.com/openshift/imagebuilder digest to e87e4e1
2025-04-01 14:22:18 +00:00
renovate[bot] 66b2bf83d9
fix(deps): update github.com/openshift/imagebuilder digest to e87e4e1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-01 06:03:55 +00:00
renovate[bot] 6703564339
fix(deps): update github.com/opencontainers/runtime-tools digest to 260e151
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-01 01:50:57 +00:00
Kir Kolyshkin 4eb75f68cf test/e2e: fix unused linter warning
This is shown when golangci-lint is run with --tests=false

> test/e2e/config.go:7:2: var fedoraMinimal is unused (unused)
> 	fedoraMinimal     = "quay.io/libpod/systemd-image:20240124"
> 	^
> test/e2e/config.go:18:2: var volumeTest is unused (unused)
> 	volumeTest        = "quay.io/libpod/volume-plugin-test-img:20220623"
> 	^

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-03-31 12:30:43 -07:00
Kir Kolyshkin dac3fa2f97 pkg/specgen/generate: fix unused warning on freebsd
> pkg/specgen/generate/validate_freebsd.go:6:6: func verifyContainerResources is unused (unused)
> func verifyContainerResources(s *specgen.SpecGenerator) ([]string, error) {
>      ^

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-03-31 12:30:43 -07:00
Kir Kolyshkin 18fdbaee80 pkg/machine/qemu: fix ST1016 linter warning on freebsd
> pkg/machine/qemu/stubber.go:92:23: ST1016: methods on the same type should have the same receiver name (seen 1x "v", 25x "q") (staticcheck)
> func (q *QEMUStubber) CreateVM(opts define.CreateVMOpts, mc *vmconfigs.MachineConfig, builder *ignition.IgnitionBuilder) error {
>                       ^

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-03-31 12:30:43 -07:00
Kir Kolyshkin c860e67884 cmd/rootlessport: add missing linux build tags
This amends commit 772ead253 ("Use simulated dual-stack binds when using WSL")
which started using linux tag but not for all files.

Alas, this breaks ginkgo run on Windows, so add an exclusion.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-03-31 12:29:21 -07:00
Kir Kolyshkin 061e1a17a9 pkg/rctl: fix fprintf statement
While at it, rename the file to have freebsd suffix instead of using
a go:build annotation.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-03-31 12:27:55 -07:00
Kir Kolyshkin 1739b7170e pkg/systemd/quadlet: rm splitPorts
Usage of splitPorts was removed by commit abc4cfb04 ("quadlet: allow
variables in PublishPort") but the function remained, as well as its
tests.

Drop those.

Found by running golangci-lint with --tests=false option.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-03-31 12:27:55 -07:00
Kir Kolyshkin 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
Kir Kolyshkin 8bd73b7d2c pkg/machine/wsl: rm unused structures
Those are not used since commit 0c587f024 ("refactor(machine,wsl):
improve operations of Windows API").

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-03-31 12:27:55 -07:00
Kir Kolyshkin 2861bc3702 pkg/machine/qemu: rm unused code
Looks like this is a forgotten part of commit 9bb191df5
("[CI:MACHINE]Podman5 QEMU refactor"). The reason is,
linters for Windows skip pkg/machine/qemu, and linters
for freebsd are not run at all.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-03-31 12:27:55 -07:00
Kir Kolyshkin 9f0032d3fd pkg/machine/shim: fix unused warnings on windows
These:

> pkg/machine/shim/claim_unsupported.go:9:6: func dockerClaimHelperInstalled is unused (unused)
> func dockerClaimHelperInstalled() bool {
>      ^
> pkg/machine/shim/claim_unsupported.go:13:6: func claimDockerSock is unused (unused)
> func claimDockerSock() bool {
>      ^
> pkg/machine/shim/claim_unsupported.go:17:6: func dockerClaimSupported is unused (unused)
> func dockerClaimSupported() bool {
>      ^

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-03-31 12:27:55 -07:00
Kir Kolyshkin d9090645c3 pkg/machine: fix various linter warnings
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-03-31 12:27:55 -07:00
Kir Kolyshkin 4638d434bc pkg/machine/wsl/wutil: fix imports formatting
Otherwise goimports linter complains.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-03-31 12:27:55 -07:00
Kir Kolyshkin c1f9c0b127 pkg/machine/e2e: fix unparam warnings
This one:

> pkg/machine/e2e/config_windows_test.go:42:56: runSystemCommand - timeout always receives defaultTimeout (600000000000) (unparam)
> func runSystemCommand(binary string, cmdArgs []string, timeout time.Duration, wait bool) (*machineSession, error) {
>                                                        ^

and, subsequently, this one:

> pkg/machine/e2e/config_windows_test.go:41:56: runSystemCommand - wait always receives true (unparam)
> func runSystemCommand(binary string, cmdArgs []string, wait bool) (*machineSession, error) {
>                                                        ^

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-03-31 12:27:55 -07:00
Kir Kolyshkin 7c175064da libpod: rm nolint annotation
It does not make sense because MemInfo.MemTotal is always int64 so the
conversion is always needed.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-03-31 12:27:55 -07:00
Kir Kolyshkin 032250a478 pkg/binding/images: rm dead code
Here err is always nil, so the check is useless.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-03-31 12:27:55 -07:00
Kir Kolyshkin 486327e2b9 pkg/bindings/images: fix linter warning on Darwin
With GOOS=darwin, golangci-lint complains:

> pkg/bindings/images/build_unix.go:13:24: directive `//nolint:unconvert` is unused for linter "unconvert" (nolintlint)
> 		Dev: uint64(st.Dev), //nolint:unconvert
> 		                     ^

Indeed, Stat_t.Dev is always uint64 on darwin

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-03-31 12:27:55 -07:00