diff --git a/Dockerfile b/Dockerfile
index 507548d..c434c8f 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,23 +1,26 @@
# Defines the tag for OBS and build script builds:
-#!BuildTag: opensuse/tumbleweed/cdi-uploadproxy:%%PKG_VERSION%%
-#!BuildTag: opensuse/tumbleweed/cdi-uploadproxy:%%PKG_VERSION%%.%RELEASE%
+#!BuildTag: %%TAGPREFIX%%/cdi-uploadproxy:%%PKG_VERSION%%
+#!BuildTag: %%TAGPREFIX%%/cdi-uploadproxy:%%PKG_VERSION%%.%RELEASE%
# cdi-uploadproxy container image
-FROM opensuse/tumbleweed
+# KUBEVIRTFROM defined in prjconf, e.g.
+# BuildFlags: dockerarg:KUBEVIRTFROM=opensuse/tumbleweed
+ARG KUBEVIRTFROM
+FROM $KUBEVIRTFROM
-# labelprefix=org.opensuse.kubevirt
+# labelprefix=%%LABELPREFIX%%
PREFIXEDLABEL org.opencontainers.image.title="CDI uploadproxy container"
PREFIXEDLABEL org.opencontainers.image.description="Upload proxy for the data fetching service for VM container images"
PREFIXEDLABEL org.opencontainers.image.created="%BUILDTIME%"
PREFIXEDLABEL org.opencontainers.image.version="%%PKG_VERSION%%.%RELEASE%"
PREFIXEDLABEL org.openbuildservice.disturl="%DISTURL%"
-PREFIXEDLABEL org.opensuse.reference="opensuse/tumbleweed/cdi-uploadproxy:%%PKG_VERSION%%.%RELEASE%"
+PREFIXEDLABEL org.opensuse.reference="%%TAGPREFIX%%/cdi-uploadproxy:%%PKG_VERSION%%.%RELEASE%"
RUN zypper update -y && \
zypper install -y \
containerized-data-importer-uploadproxy \
shadow && \
- useradd -u 1001 --create-home -s /bin/bash cdi-uploadproxy
+ useradd -u 1001 --create-home -s /bin/bash cdi-uploadproxy
WORKDIR /home/cdi-uploadproxy
USER 1001
ENTRYPOINT [ "/usr/bin/virt-cdi-uploadproxy", "-alsologtostderr" ]
diff --git a/_service b/_service
index de3fb12..b664f37 100644
--- a/_service
+++ b/_service
@@ -6,5 +6,12 @@
patch
containerized-data-importer-uploadproxy
-
+
+ Dockerfile
+ TAGPREFIX
+ LABELPREFIX
+ source /usr/lib/obs/service/meta/virt-containers-meta
+ 1
+
+
diff --git a/cdi-uploadproxy-container.changes b/cdi-uploadproxy-container.changes
index ed6e003..577e012 100644
--- a/cdi-uploadproxy-container.changes
+++ b/cdi-uploadproxy-container.changes
@@ -1,3 +1,29 @@
+-------------------------------------------------------------------
+Tue Mar 16 08:40:50 UTC 2021 - Vasily Ulyanov
+
+- Use virt-containers-meta script to populate the env
+
+-------------------------------------------------------------------
+Tue Mar 16 08:00:10 UTC 2021 - Vasily Ulyanov
+
+- Fix is_opensuse macro expansion
+
+-------------------------------------------------------------------
+Tue Mar 16 07:07:23 UTC 2021 - Vasily Ulyanov
+
+- Remove debug print from _service script
+
+-------------------------------------------------------------------
+Mon Mar 15 06:20:49 UTC 2021 - Vasily Ulyanov
+
+- Use KUBEVIRTFROM to set the base image
+- Rename %%PREFIX%% placeholder to %%TAGPREFIX%%
+
+-------------------------------------------------------------------
+Mon Mar 15 06:10:58 UTC 2021 - Vasily Ulyanov
+
+- Add placeholder vars to be replaced during build
+
-------------------------------------------------------------------
Fri Mar 12 09:53:36 UTC 2021 - Vasily Ulyanov