Accepting request 904003 from Virtualization

OBS-URL: https://build.opensuse.org/request/show/904003
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kubevirt?expand=0&rev=25
This commit is contained in:
Dominique Leuenberger 2021-07-05 20:22:52 +00:00 committed by Git OBS Bridge
commit 130776329a
3 changed files with 35 additions and 24 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Jun 30 05:17:29 UTC 2021 - Vasily Ulyanov <vasily.ulyanov@suse.com>
- Generate meta info for containers during rpm build
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Jun 9 07:49:45 UTC 2021 - Vasily Ulyanov <vasily.ulyanov@suse.com> Wed Jun 9 07:49:45 UTC 2021 - Vasily Ulyanov <vasily.ulyanov@suse.com>

View File

@ -134,20 +134,39 @@ the Kubevirt container images.
# If 'kubevirt_registry_path' is not specified, the standard publish location # If 'kubevirt_registry_path' is not specified, the standard publish location
# for SLE and openSUSE-based containers is used. # for SLE and openSUSE-based containers is used.
# #
%if "%{?kubevirt_registry_path}" == "" distro='%{?sle_version}:%{?is_opensuse}%{!?is_opensuse:0}'
distro='%{?sle_version}:%{is_opensuse}'
case "${distro}" in case "${distro}" in
150200:0) 150200:0)
reg_path='registry.suse.com/suse/sles/15.2' ;; tagprefix=suse/sles/15.2
labelprefix=com.suse.kubevirt
registry=registry.suse.com
;;
150300:0) 150300:0)
reg_path='registry.suse.com/suse/sles/15.3' ;; tagprefix=suse/sles/15.3
labelprefix=com.suse.kubevirt
registry=registry.suse.com
;;
*) *)
reg_path='registry.opensuse.org/kubevirt' ;; tagprefix=kubevirt
labelprefix=org.opensuse.kubevirt
registry=registry.opensuse.org
;;
esac esac
%if "%{?kubevirt_registry_path}" == ""
reg_path="${registry}/${tagprefix}"
%else %else
reg_path='%{kubevirt_registry_path}' reg_path='%{kubevirt_registry_path}'
%endif %endif
sed -i"" \
-e "s#_TAGPREFIX_#${tagprefix}#g" \
-e "s#_LABELPREFIX_#${labelprefix}#g" \
-e "s#_REGISTRY_#${registry}#g" \
-e "s#_PKG_VERSION_#%{version}#g" \
-e "s#_PKG_RELEASE_#%{release}#g" \
%{S:2}
mkdir -p go/src/kubevirt.io go/pkg mkdir -p go/src/kubevirt.io go/pkg
ln -s ../../../ go/src/kubevirt.io/kubevirt ln -s ../../../ go/src/kubevirt.io/kubevirt
export GOPATH=${PWD}/go export GOPATH=${PWD}/go

View File

@ -1,23 +1,10 @@
#!/bin/bash #!/bin/bash
distro=$(rpm --eval '%{?sle_version}:%{?is_opensuse}%{!?is_opensuse:0}') TAGPREFIX=_TAGPREFIX_
case "${distro}" in LABELPREFIX=_LABELPREFIX_
150200:0) REGISTRY=_REGISTRY_
TAGPREFIX=suse/sles/15.2 PKG_VERSION=_PKG_VERSION_
LABELPREFIX=com.suse.kubevirt PKG_RELEASE=_PKG_RELEASE_
REGISTRY=registry.suse.com
;;
150300:0)
TAGPREFIX=suse/sles/15.3
LABELPREFIX=com.suse.kubevirt
REGISTRY=registry.suse.com
;;
*)
TAGPREFIX=kubevirt
LABELPREFIX=org.opensuse.kubevirt
REGISTRY=registry.opensuse.org
;;
esac
if [ -n "${pkg}" ]; then if [ -n "${pkg}" ]; then
if rpm -q ${pkg}; then if rpm -q ${pkg}; then