24 Commits

Author SHA1 Message Date
ddeb9592c9 Add podman-clean-transient.service service
This is a unit that can be enabled when using transient store mode
to clean up potential leftovers from previous boots. All it does is
run "podman system prune --external" once each boot.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-12-20 10:24:25 +01:00
24ab178fb7 specfile: Drop user-add depedency from quadlet subpackage.
This is not needed since we dropped the quadlet user.

[NO NEW TESTS NEEDED] This just changes the build.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-12-19 10:16:00 +01:00
0521748911 [CI:BUILD] copr: enable podman-restart.service on rpm installation
Resolves: #16669

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-11-29 21:18:41 +05:30
285d6c9ba0 quadlet: Rework uid/gid remapping
Quadlet was doing some custom handling of uid/gid remapping, originating
from pre --userns=auto support, including its own user for getting subuids
which kinda conflicts with the "container" user used for that.

This drops all the old support for id remapping in favour of a new set
of keys that more directly map to the podman run options.

We have essentially 3 modes now:

```
RemapUsers=manual
RemapUid=0:10000:10
RemapUid=10:20000:10
RemapGid=0:10000:10
RemapGid=10:20000:10
```

This maps to --uidmap and --gidmap options.

```
RemapUsers=auto
```

This maps to --userns=auto. But you can additionally specify RemapUid,
RemapGid and RemapUidSize which gets applied as options to the
--userns podman option.

```
RemapUsers=keep-id
```
This maps to --userns=keep-id and only works for user units.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-11-21 18:02:19 +01:00
25502d53bc Merge pull request #16198 from lsm5/containers-common-extra
[CI:BUILD] copr: podman rpm should depend on containers-common-extra
2022-10-18 09:27:11 -04:00
cadb64d32d [CI:BUILD] copr: podman rpm should depend on containers-common-extra
containers-common now has a new `-extra` subpackage which handles
dependencies common to podman and buildah and also depends on
the main package `containers-common` itself.

The podman-next copr rebuilds containers-common from the rawhide branch
of dist-git so it will always have the latest version and will also
supersede the official containers-common packages (except on rawhide
where it will be equal).

Fixes: #16137

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-10-18 14:02:15 +05:30
62bb59d3b0 Initial quadlet version integrated in golang
Based on the initial port in https://github.com/containers/quadlet/pull/41

This contains the unit tests and the testcases from the C code as well
as modification to the podman spec file based on what the quadlet
spec file looks like, producing a podman-quadlet subpackage.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-10-17 15:56:03 +02:00
326d386ee7 [CI:BUILD] Copr: also define _user_tmpfilesdir for f35
Some users are still on f35, so we need to account for that for some
time.

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-09-22 15:21:44 -04:00
3e1dde10b8 [CI:BUILD] Copr: Define _user_tmpfilesdir for rhel
[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-09-02 13:47:30 -04:00
c3dc92a50a Fix rpm packaging error
Signed-off-by: SeongChan Lee <foriequal@gmail.com>
2022-08-24 18:00:35 +09:00
7ebaabb930 [CI:COPR] podman.spec.rpkg: add python3 dependency for el8
EL8 builds are failing because hack/markdown-preprocess needs python3
which AFAICT isn't included by default in EL8 build environments.

This commit also includes an additional `[CI:COPR]` mode which is
currently runs the same tests as `[CI:DOCS]` but could differ in future.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-08-05 16:11:17 -04:00
f649851350 rpkg: remove usage of pkg/hooks
Podman is using pkg/hooks from c/common and following man page is moved
to c/common

[NO NEW TESTS NEEDED]
[NO TESTS NEEDED]

Signed-off-by: Aditya R <arajan@redhat.com>
2022-07-20 21:57:57 +05:30
c6fb533ca6 podman-play-kube template: rename to podman-kube
With the upcoming plans of introducing a podman-kube command with
various subcommands, rename the podman-play-kube systemd template
to podman-kube before releasing it.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-06-30 17:09:51 +02:00
948c5e915a Merge pull request #13870 from kolyshkin/makefile-cleanups
Makefile: simplify for modern Go
2022-05-19 08:08:45 -04:00
11d3cf2697 Makefile, podman.spec.rpkg: rm GOBIN and GOPATH
Remove GOPATH setting as since Go 1.9 it defaults to $HOME/go (for
earlier versions it had to be specified explicitly).

Remove GOPATH-related code from the spec, using relative paths when
compiling packages, and enable Go modules, simplifying the spec.

Remove support for multiple paths in GOPATH (which is rarely used and
doesn't really work with modules).

Remove setting GOBIN, rely on $GOPATH/bin instead. In case GOBIN is
explicitly set (which is highly unlikely), forcefully ignore by
unsetting it.

Remove GOBIN from tools invocation since we added GOPATH/bin to PATH.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-05-17 13:41:07 -07:00
8684d41e38 k8systemd: run k8s workloads in systemd
Support running `podman play kube` in systemd by exploiting the
previously added "service containers".  During `play kube`, a service
container is started before all the pods and containers, and is stopped
last.  The service container communicates its conmon PID via sdnotify.

Add a new systemd template to dispatch such k8s workloads.  The argument
of the template is the path to the k8s file.  Note that the path must be
escaped for systemd not to bark:

Let's assume we have a `top.yaml` file in the home directory:
```
$ escaped=$(systemd-escape ~/top.yaml)
$ systemctl --user start podman-play-kube@$escaped.service
```

Closes: https://issues.redhat.com/browse/RUN-1287
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-05-17 10:18:58 +02:00
bf6430d18c Remove experimental warning from podman-remote rpm
podman-remote is considered stable and follows the same semver as
podman.

Fixes a question on the podman mailing list.
https://lists.podman.io/archives/list/podman@lists.podman.io/thread/2DVCU5Z54U4PI5ROTBQXHDBLQSAXAHFU/

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-24 10:56:16 +01:00
6e41d1f441 podman.spec.rpkg: enable rhel8 builds on copr
fix conditionals and buildtags to enable rhel8 builds

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-03-11 11:02:07 -05:00
988190db58 copr packaging: use generic macros for tmpfiles and modules load dirs
[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-02-25 13:56:19 -05:00
eab5a4cfb7 Load ip_tables modules at boot
Rootless users cannot load the ip_tables module, in fedora 36 this
module is no longer loaded by default so we have to add it manually.
This is needed because rootless network setup tries to use iptables
and if iptables-legacy is used instead of iptables-nft it will fail.

To provide a better user experience we will load the module at boot.

Note that this is not needed for RHEL because iptables-legacy is not
supported on RHEL 8 and newer.

[NO NEW TESTS NEEDED]

Fixes #12661

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-02-23 16:11:19 +01:00
cd8b302895 COPR: fix dependencies
containers-common rpm now `Recommends: netavark` and
`Provides: container-network-stack` which are
actually provided by both cni-plugins and netavark.

Netavark has a `Recommends: aardvark-dns` already.

So, we should only depend on the containers-common package and let it
handle everything.

Also, dnsname no longer needs to be recommended if we want new users to
use netavark / aardvark-dns.

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-02-01 14:22:26 -05:00
e4636ebdc8 Makefile: install targets independent of build
Building from source would involve separate `make` and `make install`
steps.

This removes a lot of unnecessary `-nobuild` targets which were
otherwise needed for packaging.

This commit also removes spec files for unused copr jobs.

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-01-25 08:27:44 -05:00
f23e8ca672 [NO NEW TESTS NEEDED] add builddeps to copr template
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-01-17 17:06:40 -05:00
350765e790 Add rpkg template for COPR autobuild
This commit removes .autocopr/podman.spec in favor of
podman.spec.rpkg to account for new recommendations for COPR builds.

The build process now enables debug packages and also uses
`%gobuild` instead of `make` or `go build` to
get the packages as close as possible to Fedora koji builds.

https://lists.fedoraproject.org/archives/list/copr-devel@lists.fedorahosted.org/message/3JORYRKDWFMJSR35Z4LIKDEXH2T5263H/

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-01-14 15:36:34 -05:00