aboutsummaryrefslogtreecommitdiff
path: root/DISTRO_PACKAGE.md
blob: 133c62d238cfdfa7bc9cbde6298c2059c65e12e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# Podman Packaging

This document is currently written with Fedora as a reference, intended for use
by packagers of other distros as well as package users.

## Fedora Users
Podman v4 is available as an official Fedora package on Fedora 36 and rawhide.
This version of Podman brings with it a new container stack called
Netavark which serves as a replacement for CNI plugins
(containernetworking-plugins on Fedora), as well as Aardvark-dns, the
authoritative DNS server for container records.

Both Netavark and Aardvark-dns are available as official Fedora packages on
Fedora 35 and newer versions and form the default network stack for new
installations of Podman 4.0.

On Fedora 36 and newer, fresh installations of Podman v4 will
automatically install Aardvark-dns along with Netavark.

To install Podman v4:

```console
$ sudo dnf install podman
```

To update Podman from an older version to v4:

```console
$ sudo dnf update podman
```

**NOTE:** Fedora 35 users will not be able to install Podman v4 using the default yum
repositories and are recommended to use the COPR repo below:

```console
$ sudo dnf copr enable rhcontainerbot/podman4

# install or update per your needs
$ sudo dnf install podman
```

After installation, if you would like to migrate all your containers to use
Netavark, you will need to set `network_backend = "netavark"` under
the `[network]` section in your containers.conf, typically located at:
`/usr/share/containers/containers.conf`

### Testing the latest development version`

If you would like to test the latest unreleased upstream code, try the
podman-next COPR

```console
$ sudo dnf copr enable rhcontainerbot/podman-next

$ sudo dnf install podman
```

**CAUTION:** The podman-next COPR provides the latest unreleased sources of Podman,
Netavark and Aardvark-dns as rpms which would override the versions provided by
the official packages.

## Distro Packagers

The Fedora packaging sources for Podman are available at the [Podman
dist-git](https://src.fedoraproject.org/rpms/podman).

The main `podman` package no longer explicitly depends on
containernetworking-plugins. The network stack dependencies are now handled in
the [containers-common](https://src.fedoraproject.org/rpms/containers-common)
package which allows for a single point of dependency maintenance for Podman
and Buildah.

- containers-common
```
Requires: container-network-stack
Recommends: netavark
```

- netavark
```
Provides: container-network-stack = 2
```

- containernetworking-plugins
```
Provides: container-network-stack = 1
```

This configuration ensures:
- New installations of Podman will always install netavark by default.
- The containernetworking-plugins package will not conflict with netavark and
users can install them together.

## Listing bundled dependencies
If you need to list the bundled dependencies in your packaging sources, you can
process the `go.mod` file in the upstream source.
For example, Fedora's packaging source uses:

```
$ awk '{print "Provides: bundled(golang("$1")) = "$2}' go.mod | sort | uniq | sed -e 's/-/_/g' -e '/bundled(golang())/d' -e '/bundled(golang(go\|module\|replace\|require))/d'
```