Skip to content

Commit

Permalink
installation.md: simplify build-from-source for rpm distros
Browse files Browse the repository at this point in the history
RPM distros can simply run `dnf builddep` on `rpm/podman.spec` to fetch
build dependencies. That specfile already handles dependencies
for all supported versions of Fedora and CentOS Stream so it's
a lot simpler and easier to maintain than duplicating dependency
specification in the documentation.

Most of the runtime dependencies are handled in the
containers-common-extra package, which simplifies things further for the
user.

Resolves: containers#157

Signed-off-by: Lokesh Mandvekar <[email protected]>
  • Loading branch information
lsm5 committed Aug 22, 2023
1 parent edee8b8 commit e036e1a
Showing 1 changed file with 29 additions and 21 deletions.
50 changes: 29 additions & 21 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,38 +277,46 @@ sudo dnf copr enable rhcontainerbot/podman-next -y
sudo dnf install podman
```

## Building from scratch
## Building from Source

### Build and Run Dependencies

**Required**

Fedora, CentOS, RHEL, and related distributions you should try to run
`make package-install` which will install dependencies, build the source,
produce rpms for the current platform and install them in the end.
On Fedora:

```bash
sudo yum install -y \
btrfs-progs-devel \
# Install build dependencies
sudo dnf -y builddep rpm/podman.spec

# Install runtime dependencies
sudo dnf -y install catatonit conmon containers-common-extra
```

On CentOS Stream 8, enable the PowerTools repository.

On RHEL 8, enable the Appstream and CodeReady Builder (CRB) repositories.

On CentOS Stream 9 and RHEL 9, enable the CodeReady Builder (CRB) repository.

Once the appropriate repositories are enabled, follow the steps below.

```bash
# Install dnf-builddep
sudo dnf -y install 'dnf-command(builddep)'

# Install build dependencies
sudo dnf -y builddep rpm/podman.spec

# Install runtime dependencies
sudo dnf -y install \
conmon \
containernetworking-plugins \
containers-common \
crun \
device-mapper-devel \
git \
glib2-devel \
glibc-devel \
glibc-static \
go \
golang-github-cpuguy83-md2man \
gpgme-devel \
iptables \
libassuan-devel \
libgpg-error-devel \
libseccomp-devel \
libselinux-devel \
make \
pkgconfig
netavark \
nftables \
slirp4netns
```

Debian, Ubuntu, and related distributions:
Expand Down

0 comments on commit e036e1a

Please sign in to comment.