Accepting request 890394 from Virtualization
OBS-URL: https://build.opensuse.org/request/show/890394 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/containerized-data-importer?expand=0&rev=4
This commit is contained in:
commit
92b82ffa33
28
cdi_containers_meta
Normal file
28
cdi_containers_meta
Normal file
@ -0,0 +1,28 @@
|
||||
#!/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
|
||||
;;
|
||||
150300:0)
|
||||
TAGPREFIX=suse/sles/15.3
|
||||
LABELPREFIX=com.suse.kubevirt
|
||||
;;
|
||||
*)
|
||||
TAGPREFIX=kubevirt
|
||||
LABELPREFIX=org.opensuse.kubevirt
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -n "${pkg}" ]; then
|
||||
if rpm -q ${pkg}; then
|
||||
PKG_VERSION=$(rpm -q --queryformat=%{version} ${pkg})
|
||||
PKG_RELEASE=$(rpm -q --queryformat=%{release} ${pkg})
|
||||
else
|
||||
_pkg=$(find ./repos -name "${pkg}*.rpm")
|
||||
PKG_VERSION=$(rpm -qp --queryformat=%{version} ${_pkg})
|
||||
PKG_RELEASE=$(rpm -qp --queryformat=%{release} ${_pkg})
|
||||
fi
|
||||
fi
|
5
cdi_containers_meta.service
Normal file
5
cdi_containers_meta.service
Normal file
@ -0,0 +1,5 @@
|
||||
<service name="cdi_containers_meta">
|
||||
<summary>Containers meta information for CDI (build service)</summary>
|
||||
<description>Provides meta information that is used during the build of
|
||||
the CDI container images.</description>
|
||||
</service>
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 29 11:36:12 UTC 2021 - Vasily Ulyanov <vasily.ulyanov@suse.com>
|
||||
|
||||
- Include release number into docker tag
|
||||
- Add cdi_containers_meta build service
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 29 05:23:06 UTC 2021 - Vasily Ulyanov <vasily.ulyanov@suse.com>
|
||||
|
||||
|
@ -24,6 +24,8 @@ License: Apache-2.0
|
||||
Group: System/Packages
|
||||
URL: https://github.com/kubevirt/containerized-data-importer
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
Source1: cdi_containers_meta
|
||||
Source2: cdi_containers_meta.service
|
||||
BuildRequires: golang-packaging
|
||||
BuildRequires: libnbd-devel
|
||||
BuildRequires: pkgconfig
|
||||
@ -92,6 +94,14 @@ Group: System/Packages
|
||||
This contains the built YAML manifests used to install CDI into a
|
||||
kubernetes installation with kubectl apply.
|
||||
|
||||
%package -n obs-service-cdi_containers_meta
|
||||
Summary: CDI containers meta information (build service)
|
||||
Group: System/Packages
|
||||
|
||||
%description -n obs-service-cdi_containers_meta
|
||||
The package provides meta information that is used during the build of
|
||||
the CDI container images.
|
||||
|
||||
%prep
|
||||
# Unpack the sources respecting the GOPATH directory structure expected by the
|
||||
# go imports resolver. I.e. if DIR is in GOPATH then DIR/src/foo/bar can be
|
||||
@ -158,7 +168,7 @@ CDI_GIT_TREE_STATE="clean" \
|
||||
cmd/cdi-operator \
|
||||
%{nil}
|
||||
|
||||
env DOCKER_PREFIX=$reg_path DOCKER_TAG=%{version} ./hack/build/build-manifests.sh
|
||||
env DOCKER_PREFIX=$reg_path DOCKER_TAG=%{version}-%{release} ./hack/build/build-manifests.sh
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{_bindir}
|
||||
@ -181,6 +191,11 @@ install -p -m 0755 _out/cmd/cdi-uploadserver/cdi-uploadserver %{buildroot}%{_bin
|
||||
mkdir -p %{buildroot}%{_datadir}/cdi
|
||||
cp -r _out/manifests %{buildroot}%{_datadir}/cdi/
|
||||
|
||||
# Install cdi_containers_meta build service
|
||||
mkdir -p %{buildroot}%{_prefix}/lib/obs/service
|
||||
install -m 0755 %{S:1} %{buildroot}%{_prefix}/lib/obs/service
|
||||
install -m 0644 %{S:2} %{buildroot}%{_prefix}/lib/obs/service
|
||||
|
||||
%files api
|
||||
%license LICENSE
|
||||
%doc README.md
|
||||
@ -223,4 +238,10 @@ cp -r _out/manifests %{buildroot}%{_datadir}/cdi/
|
||||
%dir %{_datadir}/cdi
|
||||
%{_datadir}/cdi/manifests
|
||||
|
||||
%files -n obs-service-cdi_containers_meta
|
||||
%license LICENSE
|
||||
%doc README.md
|
||||
%dir %{_prefix}/lib/obs
|
||||
%{_prefix}/lib/obs/service
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user