Accepting request 1039306 from Virtualization
OBS-URL: https://build.opensuse.org/request/show/1039306 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/containerized-data-importer?expand=0&rev=31
This commit is contained in:
commit
da4e089c47
@ -1,10 +1,16 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash -xe
|
||||||
|
|
||||||
TAGPREFIX=_TAGPREFIX_
|
TAGPREFIX=_TAGPREFIX_
|
||||||
LABELPREFIX=_LABELPREFIX_
|
LABELPREFIX=_LABELPREFIX_
|
||||||
REGISTRY=_REGISTRY_
|
REGISTRY=_REGISTRY_
|
||||||
PKG_VERSION=_PKG_VERSION_
|
PKG_VERSION=_PKG_VERSION_
|
||||||
PKG_RELEASE=_PKG_RELEASE_
|
PKG_RELEASE=_PKG_RELEASE_
|
||||||
|
DISTRO=_DISTRO_
|
||||||
|
|
||||||
|
# Set HOME=/root as a workaround for
|
||||||
|
# https://github.com/openSUSE/obs-build/issues/901
|
||||||
|
_distro=$(HOME=/root rpm --eval '%{?sle_version}:%{?is_opensuse}%{!?is_opensuse:0}')
|
||||||
|
[ "${DISTRO}" == "${_distro}" ] || exit 1
|
||||||
|
|
||||||
if [ -n "${pkg}" ]; then
|
if [ -n "${pkg}" ]; then
|
||||||
if rpm -q ${pkg}; then
|
if rpm -q ${pkg}; then
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Dec 1 09:58:30 UTC 2022 - Vasily Ulyanov <vasily.ulyanov@suse.com>
|
||||||
|
|
||||||
|
- Ensure RPMs and containers are built against the same distro
|
||||||
|
- Be more strict when discovering the registry path: error out if the
|
||||||
|
distro is unknown, instead of falling through to 'opensuse' by
|
||||||
|
default
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Oct 15 13:41:00 UTC 2022 - Vasily Ulyanov <vasily.ulyanov@suse.com>
|
Sat Oct 15 13:41:00 UTC 2022 - Vasily Ulyanov <vasily.ulyanov@suse.com>
|
||||||
|
|
||||||
|
@ -156,11 +156,15 @@ case "${distro}" in
|
|||||||
labelprefix=com.suse.kubevirt
|
labelprefix=com.suse.kubevirt
|
||||||
registry=registry.suse.com
|
registry=registry.suse.com
|
||||||
;;
|
;;
|
||||||
*)
|
*:1)
|
||||||
tagprefix=kubevirt
|
tagprefix=kubevirt
|
||||||
labelprefix=org.opensuse.kubevirt
|
labelprefix=org.opensuse.kubevirt
|
||||||
registry=registry.opensuse.org
|
registry=registry.opensuse.org
|
||||||
;;
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unsupported distro: ${distro}" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
%if "%{?kubevirt_registry_path}" == ""
|
%if "%{?kubevirt_registry_path}" == ""
|
||||||
@ -175,6 +179,7 @@ sed -i"" \
|
|||||||
-e "s#_REGISTRY_#${registry}#g" \
|
-e "s#_REGISTRY_#${registry}#g" \
|
||||||
-e "s#_PKG_VERSION_#%{version}#g" \
|
-e "s#_PKG_VERSION_#%{version}#g" \
|
||||||
-e "s#_PKG_RELEASE_#%{release}#g" \
|
-e "s#_PKG_RELEASE_#%{release}#g" \
|
||||||
|
-e "s#_DISTRO_#${distro}#g" \
|
||||||
%{S:1}
|
%{S:1}
|
||||||
|
|
||||||
export GOPATH=%{_builddir}/go
|
export GOPATH=%{_builddir}/go
|
||||||
|
Loading…
Reference in New Issue
Block a user