Accepting request 904004 from Virtualization
OBS-URL: https://build.opensuse.org/request/show/904004 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/containerized-data-importer?expand=0&rev=8
This commit is contained in:
commit
37c2f251c6
@ -1,23 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
distro=$(rpm --eval '%{?sle_version}:%{?is_opensuse}%{!?is_opensuse:0}')
|
||||
case "${distro}" in
|
||||
150200:0)
|
||||
TAGPREFIX=suse/sles/15.2
|
||||
LABELPREFIX=com.suse.kubevirt
|
||||
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
|
||||
TAGPREFIX=_TAGPREFIX_
|
||||
LABELPREFIX=_LABELPREFIX_
|
||||
REGISTRY=_REGISTRY_
|
||||
PKG_VERSION=_PKG_VERSION_
|
||||
PKG_RELEASE=_PKG_RELEASE_
|
||||
|
||||
if [ -n "${pkg}" ]; then
|
||||
if rpm -q ${pkg}; then
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 30 05:36:37 UTC 2021 - Vasily Ulyanov <vasily.ulyanov@suse.com>
|
||||
|
||||
- Generate meta info for containers during rpm build
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 14 06:05:08 UTC 2021 - Vasily Ulyanov <vasily.ulyanov@suse.com>
|
||||
|
||||
|
@ -133,20 +133,39 @@ tar --strip-components=1 -xf %{S:0}
|
||||
# If 'kubevirt_registry_path' is not specified, the standard publish location for
|
||||
# SLE and openSUSE-based containers is used.
|
||||
#
|
||||
%if "%{?kubevirt_registry_path}" == ""
|
||||
distro='%{?sle_version}:%{is_opensuse}'
|
||||
distro='%{?sle_version}:%{?is_opensuse}%{!?is_opensuse:0}'
|
||||
case "${distro}" in
|
||||
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)
|
||||
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
|
||||
|
||||
%if "%{?kubevirt_registry_path}" == ""
|
||||
reg_path="${registry}/${tagprefix}"
|
||||
%else
|
||||
reg_path='%{kubevirt_registry_path}'
|
||||
reg_path='%{kubevirt_registry_path}'
|
||||
%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:1}
|
||||
|
||||
export GOPATH=%{_builddir}/go
|
||||
export GOFLAGS="-buildmode=pie -mod=vendor"
|
||||
env \
|
||||
|
Loading…
Reference in New Issue
Block a user