2018-02-19 13:00:31 +01:00
|
|
|
#
|
|
|
|
# spec file for package podman
|
|
|
|
#
|
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2018-08-28 09:24:39 +02:00
|
|
|
%define project github.com/containers/libpod
|
2018-02-19 13:00:31 +01:00
|
|
|
# Build with libostree-devel in Tumbleweed, Leap 15 and SLES 15
|
|
|
|
%if 0%{?suse_version} >= 1500
|
|
|
|
%define with_libostree 1
|
|
|
|
%endif
|
|
|
|
Name: podman
|
2020-05-28 09:10:33 +02:00
|
|
|
Version: 1.9.3
|
2018-02-19 13:00:31 +01:00
|
|
|
Release: 0
|
2019-01-08 12:26:59 +01:00
|
|
|
Summary: Daemon-less container engine for managing containers, pods and images
|
2018-02-19 13:00:31 +01:00
|
|
|
License: Apache-2.0
|
|
|
|
Group: System/Management
|
2018-08-28 09:24:39 +02:00
|
|
|
Url: https://github.com/containers/libpod
|
2018-03-22 12:02:26 +01:00
|
|
|
Source0: %{name}-%{version}.tar.xz
|
2020-03-08 22:23:55 +01:00
|
|
|
Source1: podman.conf
|
2018-08-28 09:24:39 +02:00
|
|
|
Source2: libpod.conf
|
|
|
|
Source3: %{name}-rpmlintrc
|
2020-03-08 22:23:55 +01:00
|
|
|
Source4: README.SUSE.SLES
|
2018-02-19 13:00:31 +01:00
|
|
|
BuildRequires: bash-completion
|
|
|
|
BuildRequires: cni
|
|
|
|
BuildRequires: device-mapper-devel
|
|
|
|
BuildRequires: fdupes
|
2018-08-28 09:24:39 +02:00
|
|
|
BuildRequires: git-core
|
2018-02-19 13:00:31 +01:00
|
|
|
BuildRequires: glib2-devel-static
|
|
|
|
BuildRequires: glibc-devel-static
|
|
|
|
BuildRequires: go-go-md2man
|
|
|
|
BuildRequires: golang-packaging
|
|
|
|
BuildRequires: libapparmor-devel
|
|
|
|
BuildRequires: libassuan-devel
|
|
|
|
BuildRequires: libbtrfs-devel
|
2018-03-22 12:02:26 +01:00
|
|
|
BuildRequires: libcontainers-common
|
2018-02-19 13:00:31 +01:00
|
|
|
BuildRequires: libgpgme-devel
|
|
|
|
BuildRequires: libseccomp-devel
|
2019-05-27 08:35:26 +02:00
|
|
|
BuildRequires: pkgconfig(libsystemd)
|
|
|
|
BuildRequires: golang(API) >= 1.12
|
2019-03-08 12:00:51 +01:00
|
|
|
# Build fails with PIE enabled on ppc64le due to boo#1098017
|
|
|
|
%ifarch ppc64le
|
|
|
|
#!BuildIgnore: gcc-PIE
|
|
|
|
%endif
|
2019-03-27 16:13:10 +01:00
|
|
|
Requires: apparmor-parser
|
2020-01-30 09:32:09 +01:00
|
|
|
Requires: apparmor-abstractions
|
2018-02-19 13:00:31 +01:00
|
|
|
Requires: cni
|
2018-03-22 12:02:26 +01:00
|
|
|
Requires: cni-plugins
|
2019-08-24 18:41:27 +02:00
|
|
|
Requires: conmon
|
2018-12-07 14:39:50 +01:00
|
|
|
Requires: iptables
|
2018-02-19 13:00:31 +01:00
|
|
|
Requires: libcontainers-common
|
|
|
|
Requires: libcontainers-image
|
|
|
|
Requires: libcontainers-storage
|
|
|
|
Requires: runc >= 1.0.0~rc4
|
2020-03-27 21:56:03 +01:00
|
|
|
Requires: slirp4netns >= 0.4.0
|
2019-01-21 10:59:17 +01:00
|
|
|
Requires: catatonit
|
2019-06-12 13:05:55 +02:00
|
|
|
Requires: fuse-overlayfs
|
2018-04-11 14:03:27 +02:00
|
|
|
Recommends: %{name}-cni-config = %{version}
|
2019-09-11 10:23:25 +02:00
|
|
|
Recommends: katacontainers
|
2018-02-19 13:00:31 +01:00
|
|
|
%{go_nostrip}
|
|
|
|
%if 0%{?with_libostree}
|
|
|
|
BuildRequires: libostree-devel
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%description
|
2019-05-27 08:35:26 +02:00
|
|
|
Podman is a container engine for managing pods, containers, and container
|
|
|
|
images.
|
|
|
|
It is a standalone tool and it directly manipulates containers without the need
|
2019-01-08 12:26:59 +01:00
|
|
|
of a container engine daemon.
|
2019-05-27 08:35:26 +02:00
|
|
|
Podman is able to interact with container images create in buildah, cri-o, and
|
2019-01-08 12:26:59 +01:00
|
|
|
skopeo, as they all share the same datastore backend.
|
2018-02-19 13:00:31 +01:00
|
|
|
|
|
|
|
%prep
|
2018-03-22 12:02:26 +01:00
|
|
|
%setup -q
|
2018-02-19 13:00:31 +01:00
|
|
|
|
2018-04-11 14:03:27 +02:00
|
|
|
%package cni-config
|
|
|
|
Summary: Basic CNI configuration for podman
|
|
|
|
Group: System/Management
|
|
|
|
Requires: %{name} = %{version}
|
2020-02-25 16:03:24 +01:00
|
|
|
# iproute2 is needed by the %triggerun scriplet
|
|
|
|
Requires: iproute2
|
2018-04-11 14:03:27 +02:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description cni-config
|
|
|
|
A "basic" CNI configuration for podman that makes networking usable for basic
|
|
|
|
setups. In more complicated setups, users are recommended to write their own
|
|
|
|
CNI configurations.
|
|
|
|
|
2018-02-19 13:00:31 +01:00
|
|
|
%build
|
|
|
|
# We can't use symlinks here because go-list gets confused by symlinks, so we
|
|
|
|
# have to copy the source to $HOME/go and then use that as the GOPATH.
|
|
|
|
export GOPATH=$HOME/go
|
|
|
|
mkdir -pv $HOME/go/src/%{project}
|
|
|
|
rm -rf $HOME/go/src/%{project}/*
|
|
|
|
cp -avr * $HOME/go/src/%{project}
|
|
|
|
cd $HOME/go/src/%{project}
|
|
|
|
|
|
|
|
# Build podman
|
2020-04-18 00:28:26 +02:00
|
|
|
make BUILDFLAGS=-buildmode=pie
|
2019-07-26 12:37:52 +02:00
|
|
|
|
2018-02-19 13:00:31 +01:00
|
|
|
# Build manpages
|
|
|
|
make %{?_smp_mflags} docs
|
|
|
|
|
|
|
|
%check
|
|
|
|
# Too many tests fail due to the restricted permissions in the build enviroment.
|
|
|
|
# Updates must be tested manually.
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
2018-08-28 09:24:39 +02:00
|
|
|
# libpod
|
|
|
|
cd $HOME/go/src/%{project}
|
|
|
|
install -D -m 0755 bin/podman %{buildroot}/%{_bindir}/podman
|
2019-07-26 12:37:52 +02:00
|
|
|
install -D -m 0755 bin/podman-remote %{buildroot}/%{_bindir}/podman-remote
|
2018-02-19 13:00:31 +01:00
|
|
|
install -d %{buildroot}/%{_mandir}/man1
|
2019-12-18 14:43:33 +01:00
|
|
|
install -m 0644 docs/build/man/podman*.1 %{buildroot}/%{_mandir}/man1
|
2018-05-04 11:30:52 +02:00
|
|
|
install -d %{buildroot}/%{_mandir}/man5
|
2019-12-18 14:43:33 +01:00
|
|
|
install -m 0644 docs/build/man/libpod*.5 %{buildroot}/%{_mandir}/man5
|
2018-02-19 13:00:31 +01:00
|
|
|
install -D -m 0644 cni/87-podman-bridge.conflist %{buildroot}/%{_sysconfdir}/cni/net.d/87-podman-bridge.conflist
|
2018-08-28 09:24:39 +02:00
|
|
|
install -D -m 0644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/containers/libpod.conf
|
|
|
|
install -D -m 0644 %{SOURCE2} %{buildroot}/%{_datadir}/containers/libpod.conf
|
2018-07-27 10:55:44 +02:00
|
|
|
install -D -m 0644 completions/bash/podman %{buildroot}/%{_datadir}/bash-completion/completions/podman
|
2019-09-02 13:18:57 +02:00
|
|
|
install -D -m 0644 completions/zsh/_podman %{buildroot}%{_sysconfdir}/zsh_completion.d/_podman
|
2018-02-19 13:00:31 +01:00
|
|
|
|
2019-03-08 12:00:51 +01:00
|
|
|
# podman varlink
|
|
|
|
install -D -m 0644 contrib/varlink/podman.conf %{buildroot}/%{_tmpfilesdir}/podman.conf
|
|
|
|
install -D -m 0644 contrib/varlink/io.podman.service %{buildroot}%{_unitdir}/io.podman.service
|
|
|
|
install -D -m 0644 contrib/varlink/io.podman.socket %{buildroot}%{_unitdir}/io.podman.socket
|
|
|
|
|
2020-03-08 22:23:55 +01:00
|
|
|
# Add podman modprobe.d drop-in config
|
|
|
|
mkdir -p %{buildroot}%{_libexecdir}/modules-load.d
|
|
|
|
install -m 0644 -t %{buildroot}%{_libexecdir}/modules-load.d/ %{SOURCE1}
|
|
|
|
|
|
|
|
# README.SUSE is SLES specifc currently
|
|
|
|
%if !0%{?is_opensuse}
|
|
|
|
install -D -m 0644 %{SOURCE4} %{buildroot}%{_docdir}/%{name}/README.SUSE
|
|
|
|
%endif
|
|
|
|
|
2018-02-19 13:00:31 +01:00
|
|
|
%fdupes %{buildroot}/%{_prefix}
|
|
|
|
|
|
|
|
%files
|
2020-03-08 22:23:55 +01:00
|
|
|
%if !0%{?is_opensuse}
|
|
|
|
%doc %{_docdir}/%{name}
|
|
|
|
%endif
|
2018-02-19 13:00:31 +01:00
|
|
|
# Binaries
|
|
|
|
%{_bindir}/podman
|
2019-07-26 12:37:52 +02:00
|
|
|
%{_bindir}/podman-remote
|
2018-02-19 13:00:31 +01:00
|
|
|
# Manpages
|
2018-07-27 10:55:44 +02:00
|
|
|
%{_mandir}/man1/podman*.1*
|
|
|
|
%{_mandir}/man5/libpod*.5*
|
2018-02-19 13:00:31 +01:00
|
|
|
# Configs
|
2018-03-22 12:02:26 +01:00
|
|
|
%config(noreplace) %{_sysconfdir}/containers/libpod.conf
|
|
|
|
%dir %{_datadir}/containers
|
|
|
|
%{_datadir}/containers/libpod.conf
|
2020-03-08 22:23:55 +01:00
|
|
|
%dir %{_libexecdir}/modules-load.d
|
|
|
|
%{_libexecdir}/modules-load.d/podman.conf
|
2018-02-19 13:00:31 +01:00
|
|
|
# Completion
|
2018-07-27 10:55:44 +02:00
|
|
|
%{_datadir}/bash-completion/completions/podman
|
2019-09-02 13:18:57 +02:00
|
|
|
%{_sysconfdir}/zsh_completion.d/_podman
|
2019-03-08 12:00:51 +01:00
|
|
|
# Varlink
|
|
|
|
%{_tmpfilesdir}/podman.conf
|
|
|
|
%{_unitdir}/io.podman.service
|
|
|
|
%{_unitdir}/io.podman.socket
|
|
|
|
%ghost /run/podman
|
2018-06-13 15:39:50 +02:00
|
|
|
%license LICENSE
|
2018-02-19 13:00:31 +01:00
|
|
|
|
2018-04-11 14:03:27 +02:00
|
|
|
%files cni-config
|
|
|
|
%config %{_sysconfdir}/cni/net.d/87-podman-bridge.conflist
|
2018-06-13 15:39:50 +02:00
|
|
|
%license LICENSE
|
2018-04-11 14:03:27 +02:00
|
|
|
|
2019-03-27 16:13:10 +01:00
|
|
|
%pre
|
2019-03-08 12:00:51 +01:00
|
|
|
%service_add_pre io.podman.service io.podman.socket
|
|
|
|
|
2019-03-27 16:13:10 +01:00
|
|
|
%post
|
2019-03-08 12:00:51 +01:00
|
|
|
%service_add_post io.podman.service io.podman.socket
|
|
|
|
%tmpfiles_create %{_tmpfilesdir}/podman.conf
|
|
|
|
|
2019-03-27 16:13:10 +01:00
|
|
|
%preun
|
2019-03-08 12:00:51 +01:00
|
|
|
%service_del_preun io.podman.service io.podman.socket
|
|
|
|
|
2019-03-27 16:13:10 +01:00
|
|
|
%postun
|
2019-03-08 12:00:51 +01:00
|
|
|
%service_del_postun io.podman.service io.podman.socket
|
|
|
|
|
2020-02-25 16:03:24 +01:00
|
|
|
%triggerun cni-config -- %{name}-cni-config < 1.6.0
|
|
|
|
# The name of the network bridge changed from cni0 to podman-cni0 with
|
|
|
|
# podman 1.6. We need to rename the existing bridge to the new name to
|
|
|
|
# to avoid network issues after upgrade
|
|
|
|
if ip link show dev cni0 > /dev/null 2>&1; then
|
|
|
|
ip link set dev cni0 down
|
|
|
|
ip link set dev cni0 name cni-podman0
|
|
|
|
ip link set dev cni-podman0 up
|
|
|
|
fi
|
|
|
|
|
2018-02-19 13:00:31 +01:00
|
|
|
%changelog
|