Use containers/conmon

There were some build issues updating cri-o to cri-o/cri-o. Since the only thing we need cri-o for is conmon, we should just build using conmon.

Signed-off-by: Peter Hunt <pehunt@redhat.com>
This commit is contained in:
Peter Hunt
2019-05-17 12:48:11 -04:00
parent 38333970ba
commit cb0d89c56e
7 changed files with 28 additions and 32 deletions

View File

@ -16,4 +16,4 @@ build_binary:
clean: clean:
rm -fr rpms rm -fr rpms
rm -fr cri-o rm -fr conmon

View File

@ -28,5 +28,5 @@ fi
mkdir build/ mkdir build/
git archive --prefix "libpod-${COMMIT_SHORT}/" --format "tar.gz" HEAD -o "build/libpod-${COMMIT_SHORT}.tar.gz" git archive --prefix "libpod-${COMMIT_SHORT}/" --format "tar.gz" HEAD -o "build/libpod-${COMMIT_SHORT}.tar.gz"
git clone https://github.com/kubernetes-incubator/cri-o git clone https://github.com/containers/conmon
cd cri-o && git checkout 4cd5a7c60349be0678d9f1b0657683324c1a2726 && git archive --prefix "crio/" --format "tar.gz" HEAD -o "../build/crio.tar.gz" cd conmon && git checkout f02c053eb37010fc76d1e2966de7f2cb9f969ef2 && git archive --prefix "conmon/" --format "tar.gz" HEAD -o "../build/conmon.tar.gz"

View File

@ -56,13 +56,13 @@ RUN set -x \
&& rm -rf "$GOPATH" && rm -rf "$GOPATH"
# Install conmon # Install conmon
ENV CRIO_COMMIT 7a283c391abb7bd25086a8ff91dbb36ebdd24466 ENV CONMON_COMMIT f02c053eb37010fc76d1e2966de7f2cb9f969ef2
RUN set -x \ RUN set -x \
&& export GOPATH="$(mktemp -d)" \ && export GOPATH="$(mktemp -d)" \
&& git clone https://github.com/cri-o/cri-o.git "$GOPATH/src/github.com/cri-o/cri-o.git" \ && git clone https://github.com/containers/conmon.git "$GOPATH/src/github.com/containers/conmon.git" \
&& cd "$GOPATH/src/github.com/cri-o/cri-o.git" \ && cd "$GOPATH/src/github.com/containers/conmon.git" \
&& git fetch origin --tags \ && git fetch origin --tags \
&& git checkout -q "$CRIO_COMMIT" \ && git checkout -q "$CONMON_COMMIT" \
&& make \ && make \
&& install -D -m 755 bin/conmon /usr/libexec/podman/conmon \ && install -D -m 755 bin/conmon /usr/libexec/podman/conmon \
&& rm -rf "$GOPATH" && rm -rf "$GOPATH"

View File

@ -64,15 +64,14 @@ RUN set -x \
&& install -D -m 755 "$GOPATH"/bin/easyjson /usr/bin/ && install -D -m 755 "$GOPATH"/bin/easyjson /usr/bin/
# Install conmon # Install conmon
ENV CRIO_COMMIT 7a283c391abb7bd25086a8ff91dbb36ebdd24466 ENV CONMON_COMMIT f02c053eb37010fc76d1e2966de7f2cb9f969ef2
RUN set -x \ RUN set -x \
&& export GOPATH="$(mktemp -d)" \ && export GOPATH="$(mktemp -d)" \
&& git clone https://github.com/cri-o/cri-o.git "$GOPATH/src/github.com/cri-o/cri-o.git" \ && git clone https://github.com/containers/conmon.git "$GOPATH/src/github.com/containers/conmon.git" \
&& cd "$GOPATH/src/github.com/cri-o/cri-o.git" \ && cd "$GOPATH/src/github.com/containers/conmon.git" \
&& git fetch origin --tags \ && git fetch origin --tags \
&& git checkout -q "$CRIO_COMMIT" \ && git checkout -q "$CONMON_COMMIT" \
&& make \ && make \
&& make bin/conmon \
&& install -D -m 755 bin/conmon /usr/libexec/podman/conmon \ && install -D -m 755 bin/conmon /usr/libexec/podman/conmon \
&& rm -rf "$GOPATH" && rm -rf "$GOPATH"

View File

@ -68,15 +68,14 @@ RUN set -x \
&& install -D -m 755 "$GOPATH"/bin/easyjson /usr/bin/ && install -D -m 755 "$GOPATH"/bin/easyjson /usr/bin/
# Install conmon # Install conmon
ENV CRIO_COMMIT 7a283c391abb7bd25086a8ff91dbb36ebdd24466 ENV CONMON_COMMIT f02c053eb37010fc76d1e2966de7f2cb9f969ef2
RUN set -x \ RUN set -x \
&& export GOPATH="$(mktemp -d)" \ && export GOPATH="$(mktemp -d)" \
&& git clone https://github.com/cri-o/cri-o.git "$GOPATH/src/github.com/cri-o/cri-o.git" \ && git clone https://github.com/containers/conmon.git "$GOPATH/src/github.com/containers/conmon.git" \
&& cd "$GOPATH/src/github.com/cri-o/cri-o.git" \ && cd "$GOPATH/src/github.com/containers/conmon.git" \
&& git fetch origin --tags \ && git fetch origin --tags \
&& git checkout -q "$CRIO_COMMIT" \ && git checkout -q "$CONMON_COMMIT" \
&& make \ && make \
&& make bin/conmon \
&& install -D -m 755 bin/conmon /usr/libexec/podman/conmon \ && install -D -m 755 bin/conmon /usr/libexec/podman/conmon \
&& rm -rf "$GOPATH" && rm -rf "$GOPATH"

View File

@ -283,16 +283,16 @@ install_buildah() {
ooe.sh sudo make install ooe.sh sudo make install
} }
# Requires $GOPATH and $CRIO_COMMIT to be set # Requires $GOPATH and $CONMON_COMMIT to be set
install_conmon(){ install_conmon(){
echo "Installing conmon from commit $CRIO_COMMIT" echo "Installing conmon from commit $CONMON_COMMIT"
req_env_var GOPATH CRIO_COMMIT req_env_var GOPATH CONMON_COMMIT
DEST="$GOPATH/src/github.com/cri-o/cri-o.git" DEST="$GOPATH/src/github.com/containers/conmon.git"
rm -rf "$DEST" rm -rf "$DEST"
ooe.sh git clone https://github.com/cri-o/cri-o.git "$DEST" ooe.sh git clone https://github.com/containers/conmon.git "$DEST"
cd "$DEST" cd "$DEST"
ooe.sh git fetch origin --tags ooe.sh git fetch origin --tags
ooe.sh git checkout -q "$CRIO_COMMIT" ooe.sh git checkout -q "$CONMON_COMMIT"
ooe.sh make ooe.sh make
sudo install -D -m 755 bin/conmon /usr/libexec/podman/conmon sudo install -D -m 755 bin/conmon /usr/libexec/podman/conmon
} }

View File

@ -33,9 +33,9 @@
%global shortcommit0 %(c=%{commit0}; echo ${c:0:8}) %global shortcommit0 %(c=%{commit0}; echo ${c:0:8})
# People want conmon packaged with the copr rpm # People want conmon packaged with the copr rpm
%global import_path_conmon github.com/cri-o/cri-o %global import_path_conmon github.com/containers/conmon
%global git_conmon https://%{import_path_conmon} %global git_conmon https://%{import_path_conmon}
%global commit_conmon 4cd5a7c60349be0678d9f1b0657683324c1a2726 %global commit_conmon f02c053eb37010fc76d1e2966de7f2cb9f969ef2
%global shortcommit_conmon %(c=%{commit_conmon}; echo ${c:0:7}) %global shortcommit_conmon %(c=%{commit_conmon}; echo ${c:0:7})
Name: podman Name: podman
@ -45,7 +45,7 @@ Summary: Manage Pods, Containers and Container Images
License: ASL 2.0 License: ASL 2.0
URL: %{git_podman} URL: %{git_podman}
Source0: %{git0}/archive/%{commit0}/%{repo}-%{shortcommit0}.tar.gz Source0: %{git0}/archive/%{commit0}/%{repo}-%{shortcommit0}.tar.gz
Source1: crio.tar.gz Source1: 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}}
ExclusiveArch: aarch64 %{arm} ppc64le s390x x86_64 ExclusiveArch: aarch64 %{arm} ppc64le s390x x86_64
@ -371,18 +371,16 @@ GOPATH=$GOPATH go generate ./cmd/podman/varlink/...
BUILDTAGS=$BUILDTAGS make binaries docs BUILDTAGS=$BUILDTAGS make binaries docs
# build conmon # build conmon
pushd crio pushd conmon
mkdir _output mkdir _output
pushd _output pushd _output
mkdir -p src/%{provider}.%{provider_tld}/{cri-o,opencontainers} mkdir -p src/%{provider}.%{provider_tld}/{containers,opencontainers}
ln -s $(dirs +1 -l) src/%{import_path_conmon} ln -s $(dirs +1 -l) src/%{import_path_conmon}
popd 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" export BUILDTAGS="selinux seccomp $(hack/btrfs_installed_tag.sh) $(hack/btrfs_tag.sh) containers_image_ostree_stub"
BUILDTAGS=$BUILDTAGS make -C conmon BUILDTAGS=$BUILDTAGS make
popd popd
%install %install
@ -402,7 +400,7 @@ install -p -m 644 %{repo}.conf %{buildroot}%{_datadir}/containers
# install conmon # install conmon
install -dp %{buildroot}%{_libexecdir}/%{name} install -dp %{buildroot}%{_libexecdir}/%{name}
install -p -m 755 crio/bin/conmon %{buildroot}%{_libexecdir}/%{name} install -p -m 755 conmon/bin/conmon %{buildroot}%{_libexecdir}/%{name}
# source codes for building projects # source codes for building projects
%if 0%{?with_devel} %if 0%{?with_devel}