X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=rpmbuild.spec;h=7618b4beca595f61075ae77c753de21f737358f3;hb=fba8297f85315ba9293061c3acb3adb3c8b61490;hp=0d757386917f4bc1804db601a733f6e309b9746e;hpb=491cc9200405931de807234cb0dc299bff76e3ea;p=ta%2Fcaas-cpupooler.git diff --git a/rpmbuild.spec b/rpmbuild.spec index 0d75738..7618b4b 100644 --- a/rpmbuild.spec +++ b/rpmbuild.spec @@ -15,12 +15,14 @@ %define COMPONENT cpupooler %define COMPONENT_PART process-starter %define RPM_NAME caas-%{COMPONENT} -%define RPM_MAJOR_VERSION 0.2.0 -%define RPM_MINOR_VERSION 3 -%define CPUPOOLER_VERSION 808b717165c10b0752bbafd4e2898d4e20c2fae8 -%define DEPENDENCY_MANAGER_VERSION 0.5.0 +%define RPM_MAJOR_VERSION 0.3.0 +%define RPM_MINOR_VERSION 7 +%define go_version 1.12.10 +%define CPUPOOLER_VERSION 603d1128aa982493d50d682b2edb37fe17b73031 +%define DEP_MAN_VERSION 0.5.4 %define IMAGE_TAG %{RPM_MAJOR_VERSION}-%{RPM_MINOR_VERSION} %define PROCESS_STARTER_INSTALL_PATH /opt/bin/ +%define centos_build 191001 Name: %{RPM_NAME} Version: %{RPM_MAJOR_VERSION} @@ -28,12 +30,12 @@ Release: %{RPM_MINOR_VERSION}%{?dist} Summary: Containers as a Service cpu-pooler component License: %{_platform_license} and BSD 3-Clause License URL: https://github.com/nokia/CPU-Pooler -BuildArch: x86_64 +BuildArch: %{_arch} Vendor: %{_platform_vendor} and Nokia Source0: %{name}-%{version}.tar.gz -Requires: docker-ce >= 18.09.2 -BuildRequires: docker-ce >= 18.09.2 +Requires: docker-ce >= 18.09.2, rsync +BuildRequires: docker-ce-cli >= 18.09.2, xz, wget # I was able to pack an executable via this. # more info at https://fedoraproject.org/wiki/Packaging:Debuginfo @@ -46,6 +48,7 @@ This RPM contains the cpu-pooler container image, process-starter binary and rel %autosetup %build +wget --progress=dot:giga http://artifacts.ci.centos.org/sig-cloudinstance/centos-7-%{centos_build}/%{_arch}/centos-7-%{_arch}-docker.tar.xz -O %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/docker-build/%{COMPONENT_PART}/centos-7-docker.tar.xz # build the process-starter binary inside a builder conatiner docker build \ --network=host \ @@ -57,8 +60,9 @@ docker build \ --build-arg http_proxy="${http_proxy}" \ --build-arg https_proxy="${https_proxy}" \ --build-arg no_proxy="${no_proxy}" \ - --build-arg DEPENDENCY_MANAGER="%{DEPENDENCY_MANAGER_VERSION}" \ - --build-arg CPUPOOLER="%{CPUPOOLER_VERSION}" \ + --build-arg go_version="%{go_version}" \ + --build-arg DEP_MAN_VERSION="%{DEP_MAN_VERSION}" \ + --build-arg CPUPOOLER_VERSION="%{CPUPOOLER_VERSION}" \ --tag %{COMPONENT_PART}:builder \ %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/docker-build/%{COMPONENT_PART}/ @@ -103,8 +107,9 @@ docker build \ --build-arg http_proxy="${http_proxy}" \ --build-arg https_proxy="${https_proxy}" \ --build-arg no_proxy="${no_proxy}" \ - --build-arg DEPENDENCY_MANAGER="%{DEPENDENCY_MANAGER_VERSION}" \ - --build-arg CPUPOOLER="%{CPUPOOLER_VERSION}" \ + --build-arg DEP_MAN_VERSION="%{DEP_MAN_VERSION}" \ + --build-arg CPUPOOLER_VERSION="%{CPUPOOLER_VERSION}" \ + --build-arg go_version="%{go_version}" \ --tag %{COMPONENT}:%{IMAGE_TAG} \ %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/docker-build/%{COMPONENT}/ @@ -112,7 +117,7 @@ docker build \ mkdir -p %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/docker-save/ # save the cpu poooler container -docker save %{COMPONENT}:%{IMAGE_TAG} | gzip -c > %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/docker-save/%{COMPONENT}:%{IMAGE_TAG}.tar +docker save %{COMPONENT}:%{IMAGE_TAG} | xz -z -T2 > %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/docker-save/%{COMPONENT}:%{IMAGE_TAG}.tar # remove docker image docker rmi -f %{COMPONENT}:%{IMAGE_TAG}