Commit Graph

43 Commits

Author SHA1 Message Date
joshua-stone 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
Lokesh Mandvekar 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
Lokesh Mandvekar 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
Lokesh Mandvekar 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
Debarshi Ray 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: 3efaffae43 ("New command: podmansh")

Signed-off-by: Debarshi Ray <rishi@fedoraproject.org>
2024-03-05 17:14:33 +01:00
Lokesh Mandvekar 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
Lokesh Mandvekar 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
Lokesh Mandvekar 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
Daniel J Walsh 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
Lokesh Mandvekar 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
openshift-merge-bot[bot] caee76ed57
Merge pull request #20790 from lsm5/rpm-remove-dnsname
[CI:BUILD] rpm: remove dnsname
2024-02-07 15:04:43 +00:00
Lokesh Mandvekar 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
Yaakov Selkowitz 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
Lokesh Mandvekar 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
Lokesh Mandvekar 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
Lokesh Mandvekar 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
Lokesh Mandvekar 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
Lokesh Mandvekar 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
Lokesh Mandvekar 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
OpenShift Merge Robot 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
Lokesh Mandvekar 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
Lokesh Mandvekar 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
Lokesh Mandvekar 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
Lokesh Mandvekar e1114f03ce do not redefine gobuild for eln
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-07-31 14:55:52 -04:00
Lokesh Mandvekar 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
OpenShift Merge Robot 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
Ed Santiago dfec510b41 go-md2man: use vendored-in version, not system
go-md2man is fragile, especially around tables (#18678, #19278).
Podman man pages are finely tuned to look OK using v2.02, which
is what we vendor in test/tools, so we should really use it
instead of whatever is installed on the system.

This fixes 'make docs' on RHEL8, broken as of #19278.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-07-26 09:07:21 -06:00
Dan Čermák cbc96a7b48
Remove LICENSE and general doc files that are installed by the main package
The tests & podmansh sub-package depend on podman which already pull in the
LICENSE & doc files. According to the packaging guidelines, these files need not
be added to the subpackages.

[NO NEW TESTS NEEDED]

Signed-off-by: Dan Čermák <dcermak@suse.com>
2023-07-24 22:47:01 +02:00
Dan Čermák 37f0e96200
Add missing `
[NO NEW TESTS NEEDED]

Signed-off-by: Dan Čermák <dcermak@suse.com>
2023-07-24 22:47:01 +02:00
Lokesh Mandvekar 49257a3c50
[CI:BUILD] RPM: separate out gvproxy for copr and rawhide
gvproxy doesn't currently build on rawhide because of go1.21.
It  can be included as a standalone package on copr.
It is currently open for review on bugzilla until which fedora releases can't
include it. Official rawhide should be able to fetch the last active build of
gvproxy, the min version requirement has been removed to allow it.
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=2224434

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-07-24 09:33:34 -04:00
Lokesh Mandvekar 4e4078dbbc
[CI:BUILD] Packit: remove pre-sync action
The pre-sync action constantly breaks and is currently not possible to
reliably test until the subsequent upstream release due to limitations
in packit.

The lines being added by the action script to the downstream Fedora spec
were only meant to keep Fedora happy. But given that they provide
no tangible benefit as github notifies us of security
issues in libraries mentioned in go.mod and go.sum, along with redhat
prodsec's own magic for creating security alerts, there's absolutely
no point to having the pre-sync action run and add a layer of uncertainty.

This commit removes the pre-sync action and
`rpm/update-spec-provides.sh`.

Ref: https://github.com/containers/podman/issues/19232

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-07-14 10:10:19 -04:00
OpenShift Merge Robot 285665f6f8
Merge pull request #19214 from lsm5/package-rpm-rename
Makefile: `package` -> `rpm`
2023-07-13 16:33:02 +02:00
Lokesh Mandvekar 315a7887a6 Makefile: `package` -> `rpm`
package and package-install targets have been renamed
to rpm and rpm-install respectively for clarity.

`make rpm` will now build rpm using HEAD.

Resolves: #18817

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-07-13 08:45:10 -04:00
Lokesh Mandvekar 12dc546fc1
[CI:BUILD] Packit: downstream task action fix
The downstream `pre-sync` task action script needs GOPATH to be
specified for the golist tool mentioned in the script to work.

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-07-12 15:20:29 -04:00
Lokesh Mandvekar 9e40457687
[CI:BUILD] Packit: fix pre-sync action for downstream tasks
One of the reasons the last propose-downstream task failed for Fedora
was the `golist` tool wasn't available in the Packit environment.

This commit adds golist to the environment by downloading and extracting
the golist rpm.

This dependency could've been added in packit's upstream config but
there were a few blockers, so it's easiest to add them in our action
script.

Ref: https://github.com/containers/podman/issues/19094

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-07-05 14:24:00 -04:00
Lokesh Mandvekar 448e015667
[CI:BUILD] RPM: Fix koji and ELN issues
- build dnsname the old way otherwise it fails on koji
- use the binary path for go-md2man for successful ELN builds

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-06-28 12:23:57 -04:00
Lokesh Mandvekar ec0924c6d1
[CI:BUILD] Packit: cleanups
- remove .packit.sh
- remove all bcond_with[out] conditionals in favor of easier to read
  alternatives
- simplify build process by removing GOPATH and related cruft

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-06-20 10:35:18 -04:00
Lokesh Mandvekar 3efaffae43
New command: podmansh
This commit creates a new command `podmansh` command which can be used by
administrators to provide a confined shell to their users.

The user will only have access to the volumes and capabilities for that
user.

Co-authored-by: Paul Holzinger <pholzing@redhat.com>
Co-authored-by: Daniel Walsh <dwalsh@redhat.com>
Co-authored-by: Petr Lautrbach <lautrbach@redhat.com>
Co-authored-by: Ed Santiago <santiago@redhat.com>

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-06-15 08:14:12 -04:00
Paul Holzinger f31466e747
Revert "rootlessport: exclude storage drivers via build tags"
This reverts commit ebf7474747.

With the c/storage change[1] we no longer need this workaround.

[1] https://github.com/containers/storage/pull/1637

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-06-13 17:51:34 +02:00
Paul Holzinger ebf7474747
rootlessport: exclude storage drivers via build tags
Because of a c/storage change[1] all we get a lot of new dependencies in
rootlessport despite not using them. Add build tags to exclude storage
drivers to make the binary smaller until it get addressed in c/storage.

This saves about 800 MB but the bloat due that change is still causing
us to gain over 2 MB. This is not ideal but we should get vendoring
going and not wait any longer.

[1] https://github.com/containers/storage/pull/1618

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-06-12 10:51:30 +02:00
Lokesh Mandvekar e6bfc81a8f
RPM: bump gvisor-tap-vsock subpackage and fix packit scripts
gvisor-tap-vsock:
- bump to v0.6.1
- installs /usr/libexecdir/podman/gvforwarder

packit:
- fix pre-sync action in propose-downstream
Ref: https://dashboard.packit.dev/results/propose-downstream/2581

cleanup:
- remove `contrib/spec/python-podman.spec.in`. No longer needed.

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-05-26 14:32:52 -04:00
Lokesh Mandvekar 85b4c896bd
[CI:BUILD] Packit: set propose-downstream action type to pre-sync
Also address review concerns in pr#18675.

[NO NEW TESTS NEEDED]

Co-authored-by: Chris Evich <cevich@redhat.com>
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-05-25 09:26:35 -04:00
Lokesh Mandvekar 6003dca9c7
[CI:BUILD] Packit: add jobs for downstream Fedora package builds
Get rid of `podman.spec.rpkg` in favour of
`rpm/podman.spec` which gets synced with fedora dist-git on every
upstream release. The version in the new spec file is set to `0` by
default and gets updated by packit automatically on every packit task.

For local manual rpm builds using the spec, the helper script in the
`rpm/` subdir will update the Version field with the latest version
found in the upstream repo.

Packit will automatically create a PR on fedora dist-git on every new
upstream release. A sample PR will look like:
https://src.fedoraproject.org/rpms/container-selinux/pull-request/10#

A dry run for this can be triggered using:
`$ packit propose-downstream --local-content`

To run this command locally, you would need to have your packit
user-configuration-file set.
Ref: https://packit.dev/docs/configuration/#user-configuration-file

along with a fedora api key created at:
https://src.fedoraproject.org/settings#nav-api-tab with sufficient ACLs.

Also includes a revised `package` Makefile target which will build rpms
using `rpm/podman.spec`. Fixes: #18421.

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-05-23 16:41:46 -04:00