Add ## descriptions to commonly used targets so they appear in make help.
Replace the `wc -L` column-width approach (unavailable on macOS without coreutils)
with awk-based alignment.
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
Add some basic test checks for the new ci.yml to ensure all job
dependencies are set up right.
We can expand this with more checks later.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Move the Cirrus validate-source_task to a GitHub Actions workflow
(.github/workflows/ci.yml) running as a single job on the CNCF-hosted
runner. The job runs the same stages: make validate-source,
tests-included, and the conditional renovate config check.
golangci-lint for FreeBSD and macOS now runs cross-compiled (GOOS) on
the native Linux runner instead of on dedicated Cirrus VMs/workers, so
the lint steps are dropped from osx_alt_build and freebsd_alt_build.
The PR helper scripts are de-Cirrus'd: they read CI-neutral env vars
(PR_HEAD, PR_NUMBER, PR_BODY) and the "No New Tests" label override is
now handled natively in the workflow instead of via a GraphQL query.
The shared clone/setup/main YAML anchors are relocated into build_task,
and the dead _run_validate-source runner.sh function is removed.
The tests-of-tests (.t files) are fixed for new setup (mostly removing
test cases which are now obsoleted, like [CI:DOCS] and [NO NEW TESTS]
markers. NOTE we still don't run tests in CI (although we could), but
I ran them locally and fixed all the issues.
Finally, test-jira-links-included is removed as it is RHEL-branch
specific and have no place in the new repo.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Amend golangci-lint target to also run linters on all supported OSes
in addition to a native run.
Use CGO_ENABLED=0 because Makefile sets CGO_ENABLED=1, and
cross-compilation tools are probably not available.
Use GOARCH=arm64 for darwin because since commit f87cefc Mac builds are
arm64-only.
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Since commit def70012b9 git-validation is only used to check if the
commit subject is less than 90 characters.
Drop the vendored git-validation Go tool and the .gitvalidation make
target in favor of hack/commit-subject-check.sh.
This removes a Go build dependency and a vendored tree from
test/tools/ while keeping the same CI and local behavior.
Note the now-removed GIT_CHECK_EXCLUDE was not used by gitvalidation
since commit def70012b9 because it was not checking any specific
files, just the commit subject lengths.
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Hyper-V VMs require some specific Windows registry keys to allow the
communication between the host and the guest. Creating these registry
keys require elevated privileges.
These keys were created during the first Podman `machine init` and
removed when the last Podman machine is removed.
In this commit we skip the creation of the keys if they already exist in
the registry. So that admin privileges aren't required anymore, even for
the creation of the first Podman machine.
In other words, if the keys are pre-created by an administrator, user
will be able to create and remove machines without requiring to run any
elevated command. Even for the first podman machine.
Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
The podman module paths are moving from github.com/containers/podman to
go.podman.io/podman. This will help with future mobility.
Signed-off-by: Brent Baude <bbaude@redhat.com>
Building a darwin/amd64 binary fails deep in the Go toolchain with a
confusing "all Go files excluded by build constraints" error because
Podman 6 dropped Intel Mac support. This adds a check in the
podman-remote build target so the failure is immediate and obvious.
The check is scoped to the $(SRCBINDIR)/podman$(BINSFX) target and
uses GOOS/GOARCH, so an Intel Mac user can still cross-compile for
other platforms (e.g. GOOS=linux).
Also adds a note in CONTRIBUTING.md about the requirement.
Closes#28416
Signed-off-by: Amarendar Reddy Kanthala <amarendarkanthala@gmail.com>
The cni build tag for FreeBSD is no longer needed now that CNI
support has been removed from the codebase.
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
Apparently, prealloc got much smarter in this version, so let's disable
it for _test.go files as we're not really interested in
micro-optimizations for the test code.
The rest of its warnings is being fixed by the earlier commits.
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
By default something like a 404 will not make curl exit with an error
code. This is problematic for obvious reasons and instead of the file
you want you may now have some 404 html text instead.
I noticed this in #28003 which well just build fine installers except
the binary downloaded by the installer Makefile simply did not exist.
So to address that add --fail to most curl commands.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This speeds up the build a lot (10x), the second time.
Also add --init, so that it is possible to cancel it.
Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
This PR removes support for Intel Apple Macs. The removal includes
impacts to code, tests, Makefile, builds, release builds, and so forth.
Fixes Jira: RUN-3621
Signed-off-by: Brent Baude <bbaude@redhat.com>
Allows the validatepr container to fetch dependencies from GitHub
during validation by enabling host networking.
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
This variable is dead code as far as I can tell. I think it
got cargo culted from something similar in skopeo, where it *is*
used:
85598438ce/Makefile (L75)
etc.
(Instead it looks like there's a `PODMANCMD` here)
But I'm effectively using this PR as a way to suggest aligning
with what we're doing in bootc, where we have a core principle
that `Makefile` should *never* itself spawn containers (or VMs etc).
All the rules in Makefile are things that should work when e.g.
building RPMs or debs or the like.
Those tasks are things that are done via `Justfile`:
https://github.com/bootc-dev/bootc/blob/main/Justfile
So for example to align, we'd add a `Justfile` here and then
`make validatepr` would move to `just validatepr`.
Signed-off-by: Colin Walters <walters@verbum.org>
Tremendous amount of changes in here, but all should amount to
the same thing: changing Go import paths from v5 to v6.
Also bumped go.mod to github.com/containers/podman/v6 and updated
version to v6.0.0-dev.
Signed-off-by: Matt Heon <mheon@redhat.com>
* Added flags to point to TLS PEM files to use for exposing and connecting
to an encrypted remote API socket with server and client authentication.
* Added TLS fields for system connection ls templates.
* Added special "tls" format for system connection ls to list TLS fields
in human-readable table format.
* Updated remote integration and system tests to allow specifying a
"transport" to run the full suite against a unix, tcp, tls, or mtls
system service.
* Added system tests to verify basic operation of unix, tcp, tls, and mtls
services, clients, and connections.
Signed-off-by: Andrew Melnick <meln5674.5674@gmail.com>
This build tag replaces the backend for _verification_
of GPG signatures, to use Sequoia-PGP instead of GNUPG.
Do Rawhide builds with Sequoia; the podman-sequoia package exists
in F43 and later, so we can't do it in earlier versions.
This way we cover both variants (+ containers_image_openpgp
in the podman-remote client, at least that it builds).
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
We need to update the import path over the variable overwrite after the
monorepo move.
Fixes: #27029
Fixes: a98154a9 ("Switch common, storage and image to monorepo.")
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
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>
This reverts commit c45b27ffb0.
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>
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>
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>
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>
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>
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>
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>
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>