From b0a75f072f37e1c032d7ba3016aeb0e6124996c9 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Aug 26 2018 11:51:42 +0000 Subject: Resolves: #1619411 - python3-podman should require python3-psutil podman-docker should conflict with moby-engine require nftables recommend slirp4netns and fuse-overlayfs (latter only for kernel >= 4.18) --- diff --git a/podman.spec b/podman.spec index 94f9f6a..65e5946 100644 --- a/podman.spec +++ b/podman.spec @@ -20,28 +20,33 @@ %global provider github %global provider_tld com -%global project projectatomic +%global project containers %global repo libpod -# https://github.com/projectatomic/libpod +# https://github.com/containers/libpod %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} %global import_path %{provider_prefix} %global git0 https://%{provider}.%{provider_tld}/%{project}/%{repo} -%global commit0 3d55721fc4879cba166a9afb5acfeb8e1cdd6272 +%global commit0 9f9b8cffe5231e828a26b5bbec93bd474370c9d9 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) +%global import_path_conmon github.com/kubernetes-incubator/cri-o +%global git_conmon https://%{import_path_conmon} +%global commit_conmon 4e7f71b714932dafc6a70e9b6dc09112da478be1 +%global shortcommit_conmon %(c=%{commit_conmon}; echo ${c:0:7}) + Name: podman # Version string is wrong but only written as such to avoid epoch bumps # Will be fixed once upstream moves to 0.8.11-dev %if 0%{?fedora} > 28 Epoch: 1 %endif -Version: 0.8.3 -Release: 4.dev.git%{shortcommit0}%{?dist} +Version: 0.8.4 +Release: 1.git%{shortcommit0}%{?dist} Summary: Manage Pods, Containers and Container Images License: ASL 2.0 URL: %{git_podman} Source0: %{git0}/archive/%{commit0}/%{repo}-%{shortcommit0}.tar.gz -Patch: rootless.patch +Source1: %{git_conmon}/archive/%{commit_conmon}/cri-o-%{shortcommit_conmon}.tar.gz # e.g. el6 has ppc64 arch without gcc-go, so EA tag is required #ExclusiveArch: %%{?go_arches:%%{go_arches}}%%{!?go_arches:%%{ix86} x86_64 aarch64 %%{arm}} ExclusiveArch: aarch64 %{arm} ppc64le s390x x86_64 @@ -69,7 +74,7 @@ Requires: iptables Requires: nftables Requires: atomic-registries Requires: oci-systemd-hook -Requires: conmon +#Requires: conmon Recommends: container-selinux Recommends: slirp4netns %if 0%{?fedora} > 28 @@ -229,6 +234,10 @@ This package installs a script named docker that emulates the Docker CLI by executes podman commands, it also creates links between all Docker CLI man pages and podman. +%files docker +%{_bindir}/docker +%{_mandir}/man1/docker*.1* + %if 0%{?with_devel} %package devel Summary: Library for applications looking to use Container Pods @@ -364,7 +373,7 @@ building other packages which use import path with %if 0%{?with_unit_test} && 0%{?with_devel} %package unit-test-devel -Summary: Unit tests for %{name} package +Summary: Unit tests for %{name} package %if 0%{?with_check} #Here comes all BuildRequires: PACKAGE the unit tests #in %%check section need for running @@ -396,6 +405,9 @@ sed -i 's/0.0.0/%{version}/' contrib/python/%{name}/setup.py sed -i 's/0.0.0/%{version}/' contrib/python/py%{name}/setup.py mv pkg/hooks/README.md pkg/hooks/README-hooks.md +# untar cri-o +tar zxf %{SOURCE1} + %build mkdir _build pushd _build @@ -406,20 +418,23 @@ ln -s vendor src export GOPATH=$(pwd)/_build:$(pwd):$(pwd):%{gopath} export BUILDTAGS="varlink selinux seccomp $(hack/btrfs_installed_tag.sh) $(hack/btrfs_tag.sh) $(hack/libdm_tag.sh)" %gogenerate ./cmd/%{name}/varlink/... -%gobuild -o bin/%{name} %{import_path}/cmd/%{name} +BUILDTAGS=$BUILDTAGS make binaries docs -%if %{with varlink} -#install python-podman -pushd contrib/python/podman -%py3_build +# build conmon +pushd cri-o-%{commit_conmon} + +mkdir _output +pushd _output +mkdir -p src/%{provider}.%{provider_tld}/{kubernetes-incubator,opencontainers} +ln -s $(dirs +1 -l) src/%{import_path_conmon} popd -#install python-pypodman -pushd contrib/python/pypodman -%py3_build +ln -s vendor src +export GOPATH=$(pwd)/_output:$(pwd):%{gopath} +export BUILDTAGS="selinux seccomp $(hack/btrfs_installed_tag.sh) $(hack/btrfs_tag.sh) containers_image_ostree_stub" +BUILDTAGS=$BUILDTAGS make -C conmon popd -%endif # varlink %install install -dp %{buildroot}%{_unitdir} %{__make} PREFIX=%{buildroot}%{_prefix} ETCDIR=%{buildroot}%{_sysconfdir} \ @@ -438,6 +453,10 @@ install -dp %{buildroot}%{_unitdir} install -dp %{buildroot}%{_datadir}/containers install -p -m 644 %{repo}.conf %{buildroot}%{_datadir}/containers +# install conmon +install -dp %{buildroot}%{_libexecdir}/%{name} +install -p -m 755 cri-o-%{commit_conmon}/bin/conmon %{buildroot}%{_libexecdir}/%{name} + # source codes for building projects %if 0%{?with_devel} install -d -p %{buildroot}/%{gopath}/src/%{import_path}/ @@ -512,6 +531,7 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath} %{_mandir}/man1/podman*.1* %{_mandir}/man5/*.5* %{_datadir}/bash-completion/completions/* +%{_libexecdir}/%{name}/conmon %config(noreplace) %{_sysconfdir}/cni/net.d/87-%{name}-bridge.conflist %{_datadir}/containers/%{repo}.conf %{_unitdir}/io.%{name}.service @@ -535,10 +555,6 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath} %{_bindir}/py%{name} %endif # varlink -%files docker -%{_bindir}/docker -%{_mandir}/man1/docker*.1* - %if 0%{?with_devel} %files -n libpod-devel -f devel.file-list %license LICENSE