Accepting request 1039304 from home:vulyanov:branches:Virtualization
- 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 OBS-URL: https://build.opensuse.org/request/show/1039304 OBS-URL: https://build.opensuse.org/package/show/Virtualization/kubevirt?expand=0&rev=101
This commit is contained in:
parent
bc21667b55
commit
ccd8a8618a
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 1 09:16:49 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
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 14 05:16:27 UTC 2022 - Vasily Ulyanov <vasily.ulyanov@suse.com>
|
||||
|
||||
|
@ -171,11 +171,15 @@ case "${distro}" in
|
||||
labelprefix=com.suse.kubevirt
|
||||
registry=registry.suse.com
|
||||
;;
|
||||
*)
|
||||
*:1)
|
||||
tagprefix=kubevirt
|
||||
labelprefix=org.opensuse.kubevirt
|
||||
registry=registry.opensuse.org
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported distro: ${distro}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
%if "%{?kubevirt_registry_path}" == ""
|
||||
@ -190,6 +194,7 @@ sed -i"" \
|
||||
-e "s#_REGISTRY_#${registry}#g" \
|
||||
-e "s#_PKG_VERSION_#%{version}#g" \
|
||||
-e "s#_PKG_RELEASE_#%{release}#g" \
|
||||
-e "s#_DISTRO_#${distro}#g" \
|
||||
%{S:1}
|
||||
|
||||
mkdir -p go/src/kubevirt.io go/pkg
|
||||
|
@ -1,10 +1,16 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash -xe
|
||||
|
||||
TAGPREFIX=_TAGPREFIX_
|
||||
LABELPREFIX=_LABELPREFIX_
|
||||
REGISTRY=_REGISTRY_
|
||||
PKG_VERSION=_PKG_VERSION_
|
||||
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 rpm -q ${pkg}; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user