use conmon from distro for rawhide

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
This commit is contained in:
Lokesh Mandvekar 2018-03-27 10:24:36 -04:00
parent 9fe2f8e4fd
commit 2fb85ab55e

View File

@ -40,23 +40,17 @@
# https://github.com/projectatomic/libpod
%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
%global import_path %{provider_prefix}
%global git_podman https://%{provider}.%{provider_tld}/%{project}/%{repo}
%global commit 57b403eda155d321d8aa29cfa0085aac8ce28a57
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global import_path_conmon github.com/kubernetes-incubator/cri-o
%global git_conmon https://%{import_path_conmon}
%global commit_conmon 712f3b8cf14cbbac298f3ccc020677ac2a65fa75
%global shortcommit_conmon %(c=%{commit_conmon}; echo ${c:0:7})
%global git0 https://%{provider}.%{provider_tld}/%{project}/%{repo}
%global commit0 57b403eda155d321d8aa29cfa0085aac8ce28a57
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
Name: podman
Version: 0.3.4
Release: 1.git%{shortcommit}%{?dist}
Release: 1.git%{shortcommit0}%{?dist}
Summary: Manage Pods, Containers and Container Images
License: ASL 2.0
URL: %{git_podman}
Source0: %{git_podman}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz
Source1: %{git_conmon}/archive/%{commit_conmon}/cri-o-%{shortcommit_conmon}.tar.gz
Source0: %{git0}/archive/%{commit0}/%{repo}-%{shortcommit0}.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}}
@ -78,10 +72,9 @@ BuildRequires: libselinux-devel
BuildRequires: pkgconfig
Requires: runc
Requires: skopeo-containers
# can't use default conmon right now, so we ship our own
#Requires: conmon
Requires: conmon >= 2:1.10.0-3.gitb0f6d98
Requires: buildah
Requires: containernetworking-cni > 0.6
Requires: containernetworking-cni >= 0.6.0-3
Requires: iptables
Requires: atomic-registries
@ -188,13 +181,14 @@ Provides: bundled(golang(gopkg.in/yaml.v2)) = v2
%description
%{summary}
libpod provides a library for applications looking to use
%{repo} provides a library for applications looking to use
the Container Pod concept popularized by Kubernetes.
%if 0%{?with_devel}
%package -n libpod-devel
%package devel
Summary: Library for applications looking to use Container Pods
BuildArch: noarch
Provides: %{repo}-devel = %{version}-%{release}
%if 0%{?with_check} && ! 0%{?with_bundled}
BuildRequires: golang(github.com/BurntSushi/toml)
@ -351,12 +345,9 @@ providing packages with %{import_path} prefix.
%endif
%prep
%autosetup -Sgit -n %{repo}-%{commit}
%autosetup -Sgit -n %{repo}-%{commit0}
sed -i '/\/bin\/bash/d' completions/bash/%{name}
# untar cri-o
tar zxf %{SOURCE1}
%build
mkdir _build
pushd _build
@ -370,21 +361,6 @@ export BUILDTAGS="selinux seccomp $(hack/btrfs_installed_tag.sh) $(hack/btrfs_ta
GOPATH=$GOPATH BUILDTAGS=$BUILDTAGS %gobuild -o bin/%{name} %{import_path}/cmd/%{name}
BUILDTAGS=$BUILDTAGS make docs
# 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
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 conmon
popd
%install
%make_install PREFIX=%{buildroot}%{_prefix} install install.completions
@ -392,10 +368,6 @@ popd
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}/
@ -469,7 +441,6 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath}
%{_bindir}/%{name}
%{_mandir}/man1/*.1*
%{_datadir}/bash-completion/completions/*
%{_libexecdir}/%{name}/conmon
%config(noreplace) %{_sysconfdir}/cni/net.d/87-%{name}-bridge.conflist
%{_datadir}/containers/%{repo}.conf
@ -487,7 +458,7 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath}
%endif
%changelog
* Fri Mar 23 2018 baude <bbaude@redhat.com> - 0.3.4-1.git57b403eda155d321d8aa29cfa0085aac8ce28a57
* Fri Mar 23 2018 baude <bbaude@redhat.com> - 0.3.4-1.git57b403e
- Upstream release 0.3.4
* Fri Mar 16 2018 baude <bbaude@redhat.com> - 0.3.3-2.dev.gitbc358eb