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

@ -33,30 +33,24 @@
%define gobuild(o:) go build -tags="$BUILDTAGS selinux seccomp" -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x %{?**}; %define gobuild(o:) go build -tags="$BUILDTAGS selinux seccomp" -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x %{?**};
#% endif #% endif
%global provider github %global provider github
%global provider_tld com %global provider_tld com
%global project projectatomic %global project projectatomic
%global repo libpod %global repo libpod
# https://github.com/projectatomic/libpod # https://github.com/projectatomic/libpod
%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
%global import_path %{provider_prefix} %global import_path %{provider_prefix}
%global git_podman https://%{provider}.%{provider_tld}/%{project}/%{repo} %global git0 https://%{provider}.%{provider_tld}/%{project}/%{repo}
%global commit 57b403eda155d321d8aa29cfa0085aac8ce28a57 %global commit0 57b403eda155d321d8aa29cfa0085aac8ce28a57
%global shortcommit %(c=%{commit}; echo ${c:0:7}) %global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
%global import_path_conmon github.com/kubernetes-incubator/cri-o Name: podman
%global git_conmon https://%{import_path_conmon} Version: 0.3.4
%global commit_conmon 712f3b8cf14cbbac298f3ccc020677ac2a65fa75 Release: 1.git%{shortcommit0}%{?dist}
%global shortcommit_conmon %(c=%{commit_conmon}; echo ${c:0:7}) Summary: Manage Pods, Containers and Container Images
License: ASL 2.0
Name: podman URL: %{git_podman}
Version: 0.3.4 Source0: %{git0}/archive/%{commit0}/%{repo}-%{shortcommit0}.tar.gz
Release: 1.git%{shortcommit}%{?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
# e.g. el6 has ppc64 arch without gcc-go, so EA tag is required # 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: %%{?go_arches:%%{go_arches}}%%{!?go_arches:%%{ix86} x86_64 aarch64 %%{arm}}
@ -78,10 +72,9 @@ BuildRequires: libselinux-devel
BuildRequires: pkgconfig BuildRequires: pkgconfig
Requires: runc Requires: runc
Requires: skopeo-containers Requires: skopeo-containers
# can't use default conmon right now, so we ship our own Requires: conmon >= 2:1.10.0-3.gitb0f6d98
#Requires: conmon
Requires: buildah Requires: buildah
Requires: containernetworking-cni > 0.6 Requires: containernetworking-cni >= 0.6.0-3
Requires: iptables Requires: iptables
Requires: atomic-registries Requires: atomic-registries
@ -188,13 +181,14 @@ Provides: bundled(golang(gopkg.in/yaml.v2)) = v2
%description %description
%{summary} %{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. the Container Pod concept popularized by Kubernetes.
%if 0%{?with_devel} %if 0%{?with_devel}
%package -n libpod-devel %package devel
Summary: Library for applications looking to use Container Pods Summary: Library for applications looking to use Container Pods
BuildArch: noarch BuildArch: noarch
Provides: %{repo}-devel = %{version}-%{release}
%if 0%{?with_check} && ! 0%{?with_bundled} %if 0%{?with_check} && ! 0%{?with_bundled}
BuildRequires: golang(github.com/BurntSushi/toml) BuildRequires: golang(github.com/BurntSushi/toml)
@ -351,12 +345,9 @@ providing packages with %{import_path} prefix.
%endif %endif
%prep %prep
%autosetup -Sgit -n %{repo}-%{commit} %autosetup -Sgit -n %{repo}-%{commit0}
sed -i '/\/bin\/bash/d' completions/bash/%{name} sed -i '/\/bin\/bash/d' completions/bash/%{name}
# untar cri-o
tar zxf %{SOURCE1}
%build %build
mkdir _build mkdir _build
pushd _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} GOPATH=$GOPATH BUILDTAGS=$BUILDTAGS %gobuild -o bin/%{name} %{import_path}/cmd/%{name}
BUILDTAGS=$BUILDTAGS make docs 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 %install
%make_install PREFIX=%{buildroot}%{_prefix} install install.completions %make_install PREFIX=%{buildroot}%{_prefix} install install.completions
@ -392,10 +368,6 @@ popd
install -dp %{buildroot}%{_datadir}/containers install -dp %{buildroot}%{_datadir}/containers
install -p -m 644 %{repo}.conf %{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 # source codes for building projects
%if 0%{?with_devel} %if 0%{?with_devel}
install -d -p %{buildroot}/%{gopath}/src/%{import_path}/ install -d -p %{buildroot}/%{gopath}/src/%{import_path}/
@ -453,7 +425,7 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath}
%if ! 0%{?gotest:1} %if ! 0%{?gotest:1}
%global gotest go test %global gotest go test
%endif %endif
%gotest %{import_path}/cmd/%{name} %gotest %{import_path}/cmd/%{name}
%gotest %{import_path}/libkpod %gotest %{import_path}/libkpod
%gotest %{import_path}/libpod %gotest %{import_path}/libpod
@ -469,7 +441,6 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath}
%{_bindir}/%{name} %{_bindir}/%{name}
%{_mandir}/man1/*.1* %{_mandir}/man1/*.1*
%{_datadir}/bash-completion/completions/* %{_datadir}/bash-completion/completions/*
%{_libexecdir}/%{name}/conmon
%config(noreplace) %{_sysconfdir}/cni/net.d/87-%{name}-bridge.conflist %config(noreplace) %{_sysconfdir}/cni/net.d/87-%{name}-bridge.conflist
%{_datadir}/containers/%{repo}.conf %{_datadir}/containers/%{repo}.conf
@ -487,7 +458,7 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath}
%endif %endif
%changelog %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 - Upstream release 0.3.4
* Fri Mar 16 2018 baude <bbaude@redhat.com> - 0.3.3-2.dev.gitbc358eb * Fri Mar 16 2018 baude <bbaude@redhat.com> - 0.3.3-2.dev.gitbc358eb