67 Commits

Author SHA1 Message Date
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
6c7179c652 rpm: require slirp4netns for podman-tests package
We have some tests that need it so we should test with it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-04-10 14:29:07 +02: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
2b813eef9d [skip-ci] RPM: Add riscv64 to ExclusiveArch-es
Signed-off-by: Yanko Kaneti <yaneti@declera.com>
2025-03-17 13:42:41 +02:00
84c56243a2 [skip-ci] Packit/RPM: Display upstream commit SHA in all rpm builds
Packit's `pre-sync` action allows modification of spec file prior to
dist-git PR creation. This is already being done on containers-common
rpm to update c/storage and c/image verions tags in spec.

This commit will allow `podman version` to show `Git Commit: $SHA` for
copr as well as koji builds.

Ref: https://raw.githubusercontent.com/containers/common/refs/heads/main/.packit.yaml

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2025-03-04 17:50:44 +05:30
f71067d710 Create quota before _data dir for volumes
This resolves an ordering issue that prevented quotas from being
applied. XFS quotas are applied recursively, but only for
subdirectories created after the quota is applied; if we create
`_data` before the quota, and then use `_data` for all data in
the volume, the quota will never be used by the volume.

Also, add a test that volume quotas are working as designed using
an XFS formatted loop device in the system tests. This should
prevent any further regressions on basic quota functionality,
such as quotas being shared between volumes.

Fixes #25368

Signed-off-by: Matt Heon <mheon@redhat.com>
2025-02-28 09:52:55 -05:00
7536620791 [skip-ci] Packit/Copr: Fix podman version in rpm
Additional rpm patching to show upstream short sha in `podman --version`
caused podman-machine-os tests to fail.

This commit gets rid of that patching and instead sets define.gitCommit
LDFLAG for Copr rpms.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2025-02-19 19:39:38 +05:30
8bb1768b72 Merge pull request #25235 from lsm5/main-build-origin
[skip-ci] RPM: set BUILD_ORIGIN
2025-02-10 17:03:03 +00:00
3c3baefa8c Update rpm/podman.spec
Co-authored-by: Paul Holzinger <git@holzinger.dev>
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2025-02-10 18:19:52 +05:30
b06c7d78d3 [skip-ci] RPM: set buildOrigin in LDFLAG
For Copr builds, it will mention the Copr info from where the rpm is
installed.

For non-copr builds, it will mention the value of the packager macro
if set, and skip this field altogether if not.

On local rpm builds, this shows:
```
Build Origin:  Lokesh Mandvekar <lsm5@fedoraproject.org>
```

On koji rpm builds, this shows:
```
Build Origin: Fedora Project
```

On copr rpm builds (for eg. rhcontainerbot/playground), this shows:
```
Build Origin: Copr: rhcontainerbot/playground
```

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2025-02-10 16:36:42 +05:30
1d220b99da [skip-ci] RPM: cleanup macro defs
The default `gobuild` macro on CentOS Stream 9 now includes support for
`BUILDTAGS`.

CentOS Stream envs now also define `_user_tmpfilesdir` macro by default.
Both these definitions are no longer needed here.

`libtrust_openssl` buildtag is also set in spec wherever relevant.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2025-02-07 16:31:19 +05:30
26b5864648 rpm: add attr as dependency for podman-tests
Since commit 06c103469d we are using getfattr in system tests, that
caused failures in gating tests[1] as getfattr was not installed. So add
attr as dependency.

[1] https://artifacts.dev.testing-farm.io/d93b6849-e526-46e9-a7c3-874bad4217a9/work-tests.yml8_p4nfkf/tests-n75vnz0u/test.podman-root.bats.log

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-02-03 17:41:35 +01:00
be6fa68296 [skip-ci] RPM: include empty check to silence rpmlint
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2025-01-31 17:15:17 +05:30
e2eb8e4a86 [skip-ci] RPM: adjust qemu dependencies
We only need qemu-system-[x86|aarch64]-core based on the architecture
along with qemu-img. So, there's no need to pull in all of qemu.

The qemu-system-[x86|aarch64]-core packages are not present on CentOS
Stream and RHEL, so we use qemu-kvm there instead.

Ref: https://github.com/containers/podman/pull/24369/files#r1883658262

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2025-01-31 17:14:07 +05:30
e7bbcbfbf7 Replace ExclusiveArch with ifarch
Signed-off-by: Jindrich Novy <jnovy@redhat.com>
2024-12-03 01:18:00 +01:00
9475ea8fb9 Package podman-machine on supported architectures only.
Signed-off-by: Jindrich Novy <jnovy@redhat.com>
2024-11-29 06:06:30 +01:00
cf124ee1bb [skip-ci] RPM: remove dup Provides
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2024-10-16 19:37:13 +05:30
b5e1863d1c rpm: do not load iptables modules on f41+
As we started to default to nftables on f41[1,2] we no longer have to
load legacy iptables modules.

[1] https://fedoraproject.org/wiki/Changes/NetavarkNftablesDefault
[2] https://github.com/containers/netavark/pull/1038

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-09-30 13:52:07 +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
1ecb68d92b [skip-ci] RPM: podman-iptables.conf only on Fedora
RHEL10 defaults to nftables and doesn't need
/usr/lib/modules-load.d/podman-iptables.conf so this should be Fedora
only.

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2024-07-25 12:33:13 -04:00
02b922ebfc [skip-ci] Remove conditionals from changelog
All our active envs except centos stream 9 support autochangelog and the
only place we're building rpms via packit on centos stream 9 is on COPR
where we don't really care about changelogs.

Commit also removes a couple of unnecessary slashes from install paths.

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2024-06-26 08:38:11 -04:00
180cc6f863 [skip-ci] RPM: create podman-machine subpackage
This subpackage will fetch dependencies for podman machine and create a
symlink /usr/libexecdir/podman/virtiofsd -> ../virtiofsd .

Co-authored-by: Colin Walters <walters@verbum.org>
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2024-06-25 12:08:37 -04:00
2e70d4201f System tests: add podman system check tests
Testing `podman system check` requires that we have a way to
intentionally introduce storage corruptions.  Add a hidden `podman
testing` command that provides the necessary internal logic in
subcommands.  Stub out the tunnel implementation for now.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2024-06-04 10:00:37 -04:00
36c05b5c6a [skip-ci] RPM: bats required only on Fedora
The `bats` package is not present on RHEL environments. It should be
conditionalized only for Fedora to avoid `installibility` test failures.

C9S Ref: https://gitlab.com/redhat/centos-stream/rpms/podman/-/blob/c9s/podman.spec?ref_type=heads#L130

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2024-05-07 08:49:23 -04:00
cd6ff71cc3 Remove unncessary lines at the end of specfile summary
Signed-off-by: joshua-stone <joshua.gage.stone@gmail.com>
2024-04-26 14:09:37 -04:00
333682132a [skip-ci] Packit/rpm: remove el8 jobs and spec conditionals
EL8 will go EOL soon and nothing on main will be shipped to el8.

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2024-04-22 11:54:19 -04:00
73a12b0c07 [skip-ci] rpm: use macro supported vendoring
This removes the need for any `Provides: bundled()` we needed in spec
files.

The updated Provides will be visible in the build logs and can also be
verified with `rpm -q --provides $RPM_FILE`.

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2024-03-18 16:56:38 +05:30
60a3eb8491 [skip-ci] rpm: update containers-common dep on f40+
This commit bumps containers-common dep such that passt and netavark become hard
deps for podman on fedora 40+.
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=2269148

With this commit, f40+ envs will use the min name-version-release for
containers-common-extra while other deps will use whatever's available.
This change can be reverted after a few releases to keep conditionals to
a minimum.

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2024-03-13 17:56:38 +05:30
835cfbc05f [CI:BUILD] rpm: Put the podmansh(1) manual in the podmansh sub-package
... and fix the style.

Currently, the podmansh(1) manual is shipped by the podman package.  It
makes one wonder where the binary is, since they can read the manual.

[NO NEW TESTS NEEDED]

Fixes: 3efaffae43cb1650 ("New command: podmansh")

Signed-off-by: Debarshi Ray <rishi@fedoraproject.org>
2024-03-05 17:14:33 +01:00
50a0c51763 [CI:BUILD] rpm: Add fallback for $SOURCE_DATE_EPOCH not being set
At least in all recent Fedora releases, SOURCE_DATE_EPOCH would be set. But the
build should work even if it not set, e.g. in copr builds on c8s. Add 'date +%s'
as a fallback.

From: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>

This is a copy-paste of commit eaa62a52 in podman fedora dist-git.

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2024-02-27 20:27:12 +05:30
5e387cd8af [CI:BUILD] rpm: Use $SOURCE_DATE_EPOCH instead of the current date
Use $SOURCE_DATE_EPOCH instead of the current date

Using the current timestamp makes every build slightly different, breaking build
reproducibility.

From: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>

This is a copy-paste of commit a87dd6f50 in podman fedora dist-git.

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2024-02-27 16:57:05 +05:30
cc7b19279a [CI:BUILD] rpm: Make BuildRequires independent of the environment
The spec file had
  %if %{defined rhel} && 0%{?rhel} < 10
  %define gobuild(o:) ...
  %endif
  ...
  %if !%{defined gobuild}
  BuildRequires: go-rpm-macros
  %endif

The intent apparently was to use BR:go-rpm-macros where available, and define
%gobuild as a fallback where they are not available. This was unreliable,
because the package may have been installed already, and then %gobuild would be
defined when the srpm was being built, and then the srpm would NOT have the BR.

Instead, use the same condition to wrap the definition of %gobuild and the BR
lines to that the BR is always emitted when appropriate.

From: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>

This is a copy-paste of commit be971d6fb in podman fedora dist-git.

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2024-02-27 16:43:32 +05:30
ad55ba6eb2 Handle DOCKER_HOST environment for podman-docker package
Rootless users should be defaulted to point DOCKER_HOST at
$XDG_RUNTIME_DIR/podman/podman.sock

When podman-docker package is installed.

[NO NEW TESTS NEEDED]

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-02-12 16:05:38 -05:00
4413e75f0b [CI:BUILD] rpm: bump podman module version
[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2024-02-09 19:27:10 +05:30
caee76ed57 Merge pull request #20790 from lsm5/rpm-remove-dnsname
[CI:BUILD] rpm: remove dnsname
2024-02-07 15:04:43 +00:00
01a8539ef0 Warn if cgroups-v1
Podman v5 will not support cgroups-v1. This commit will print a warning
if it detects a cgroups-v1 system. The warning can be hidden by setting
envvar `PODMAN_CGROUPSV1_WARNING`.

This warning is patched out for RHEL 9 builds as cgroups-v1 will still
be supported on RHEL 9 systems.

Resolves: https://issues.redhat.com/browse/RUN-1957

[NO NEW TESTS NEEDED]

Co-authored-by: Ed Santiago <santiago@redhat.com>
Co-authored-by: Sascha Grunert <sgrunert@redhat.com>
Co-authored-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2024-02-06 16:18:05 +05:30
505ed030e6 [CI:BUILD] rpm: use go-rpm-macros on RHEL 10
[NO NEW TESTS NEEDED]

The macros in ELN and c10s have the necessary support.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2024-01-25 06:19:36 -05:00
ac3d57016b [CI:BUILD] rpm: remove dnsname
With CNI going away in v5, there's no need for dnsname in the rpm.

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2023-11-27 20:43:42 +05:30
6fa4a975c6 [CI:BUILD] packit: handle builds for RC releases
The `version_no_tilde` rpm macro correctly handles both `vX.Y.Z` and
`vX.Y.Z-rcN` git tags. Using this macro instead of `version` will soon
allow Packit to handle RC builds correctly.

Accompanying change in Packit to land soon:
https://github.com/packit/packit/pull/2149

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2023-11-13 17:38:08 +05:30
81dc3f183d [CI:BUILD] rpm: disable GOPROXY
GOPROXY is currently causing build issues like so:
```
go: github.com/containernetworking/cni@v0.7.1: GOPROXY list is not the empty string, but contains no entries
```

This commit sets `GOPROXY=direct` in rpm spec file.

Ref: https://download.copr.fedorainfracloud.org/results/packit/containers-podman-20627/centos-stream+epel-next-9-aarch64/06611633-podman/builder-live.log.gz

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2023-11-08 19:06:08 +05:30
f622a2a54b [CI:BUILD] rpm/copr: gvforwarder recommends for RHEL
We don't have a successful rhel build of gvforwarder so far on the
podman-next copr, so any RHEL users of podman-next will have trouble
installing podman if it's a gvforwarder is a hard dep.

Switching gvforwarder to a Recommends until that's resolved.

The ELN environment is an exception as it gets dependencies updated a
lot quicker.

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-10-04 15:29:37 -04:00
e65874903c [CI:BUILD] Packit: show SHORT_SHA in podman --version for COPR builds
This change will allow `podman --version` from COPR rpm builds to be of
the form `X.Y.Z-dev-SHORT_SHA`.

Also specify a `copr_build` macro as it feels more intuitive
than `copr_username` or `copr_project`.

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-09-22 10:18:44 -04:00
649539519e [CI:BUILD] rpm: remove gvproxy subpackage
gvisor-tap-vsock is now a standalone package for Fedora 38 and higher so
we can simplify the rpm spec a lot by removing all subpackage
references.

If we need to bump podman on Fedora 37, that can be handled manually on
Fedora itself. The Packit config can be left unchanged. Any packit PRs created on
Fedora dist-git for Fedora 37 can simply be closed without merging.
Fedora 37 will go EOL soon so not much of a point to changing packit
config to exclude Fedora 37.

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-09-19 14:26:12 -04:00
8354be9cf6 Merge pull request #19683 from lsm5/main-spdx-license
[CI:BUILD] rpm: spdx compatible license field
2023-08-22 06:06:19 -02:30
ef8f4db81c [CI:BUILD] rpm: spdx compatible license field
The lowercase `and` in the License field isn't compatible with spdx
license format.

This commit replaces all `and` with `AND` in the License field in spec.

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-08-21 09:52:27 -04:00
50136ea866 [CI:BUILD] rpm: depend on man-db
Include dependencies in rpm/podman.spec to make it easy for end users to
build podman from source. This way users can install all build
dependencies by running `dnf -y builddep rpm/podman.spec`.

This is not usually noticeable except on container environments where
man-db often isn't installed by default.

Refs:
https://github.com/containers/podman.io/issues/157
https://github.com/containers/podman.io/pull/174

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-08-17 15:31:54 -04:00
803a49da46 [CI:BUILD] Makefile: rpm target generates correct version
`git describe` is lagging on main so this commit updates
`rpm/update-sepc-version.sh` to generate the expected version.

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-08-04 09:52:16 -04:00
e1114f03ce do not redefine gobuild for eln
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-07-31 14:55:52 -04:00
e973d15c35 [CI:BUILD] RPM: define gobuild macro for rhel/centos stream
The current gobuild macro doesn't account for build tags on both c9s and
c8s. This is currently causing copr build failures for c9s.

Ref: https://copr.fedorainfracloud.org/coprs/rhcontainerbot/podman-next/build/6220412/

This commit will define gobuild for all those envs until gobuild is
fixed by default.

Refs:
c9s bz: https://bugzilla.redhat.com/show_bug.cgi?id=2227328
c8s bz: https://bugzilla.redhat.com/show_bug.cgi?id=2227331

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-07-28 14:11:42 -04:00
b6a52f1f8b Merge pull request #19333 from lsm5/conditionalize-gvproxy
[CI:BUILD] RPM: separate out gvproxy for copr and rawhide
2023-07-28 19:58:19 +02:00