diff --git a/data/obs-packaging/cc-oci-runtime/cc-oci-runtime.dsc-template b/data/obs-packaging/cc-oci-runtime/cc-oci-runtime.dsc-template index a3a98643..eb22bdf6 100644 --- a/data/obs-packaging/cc-oci-runtime/cc-oci-runtime.dsc-template +++ b/data/obs-packaging/cc-oci-runtime/cc-oci-runtime.dsc-template @@ -11,5 +11,5 @@ DEBTRANSFORM-RELEASE: 1 Package: cc-oci-runtime Architecture: amd64 -Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, qemu-lite, clear-containers-image, linux-container +Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, qemu-lite (>=@qemu_lite_version@), clear-containers-image (>=@cc_image_version@), linux-container (>=@linux_container_version@) Description: An Open Containers Initiative (OCI) "runtime" that launches an Intel VT-x secured Clear Containers 2.1 hypervisor, rather than a standard Linux container. diff --git a/data/obs-packaging/cc-oci-runtime/cc-oci-runtime.spec-template b/data/obs-packaging/cc-oci-runtime/cc-oci-runtime.spec-template index 9a571db4..c855cf4a 100644 --- a/data/obs-packaging/cc-oci-runtime/cc-oci-runtime.spec-template +++ b/data/obs-packaging/cc-oci-runtime/cc-oci-runtime.spec-template @@ -40,10 +40,10 @@ BuildRequires : autoconf-archive BuildRequires : autoconf BuildRequires : automake %endif -Requires: clear-containers-image -Requires: clear-containers-selinux -Requires: qemu-lite -Requires: linux-container +Requires: clear-containers-image >= @cc_image_version@ +Requires: clear-containers-selinux >= @cc_selinux_version@ +Requires: qemu-lite >= @qemu_lite_version@ +Requires: linux-container >= @linux_container_version@ Patch1: update_commit_id.patch %description diff --git a/data/obs-packaging/cc-oci-runtime/debian.control b/data/obs-packaging/cc-oci-runtime/debian.control-template similarity index 100% rename from data/obs-packaging/cc-oci-runtime/debian.control rename to data/obs-packaging/cc-oci-runtime/debian.control-template diff --git a/data/obs-packaging/cc-oci-runtime/update_runtime.sh b/data/obs-packaging/cc-oci-runtime/update_runtime.sh index f07c4811..a2a37498 100755 --- a/data/obs-packaging/cc-oci-runtime/update_runtime.sh +++ b/data/obs-packaging/cc-oci-runtime/update_runtime.sh @@ -16,6 +16,9 @@ hash_tag=$(git log --oneline --pretty="%H %d" --decorate --tags --no-walk | grep # If there is no tag matching $VERSION we'll get $VERSION as the reference [ -z "$hash_tag" ] && hash_tag=$VERSION || : +# load versions +source ../../../versions.txt + OBS_PUSH=${OBS_PUSH:-false} OBS_RUNTIME_REPO=${OBS_RUNTIME_REPO:-home:clearlinux:preview:clear-containers-staging/cc-oci-runtime} @@ -37,8 +40,22 @@ function changelog_update { } changelog_update $VERSION -sed "s/@VERSION@/$VERSION/g;" cc-oci-runtime.spec-template > cc-oci-runtime.spec -sed "s/@VERSION@/$VERSION/g;" cc-oci-runtime.dsc-template > cc-oci-runtime.dsc +sed -e "s/@VERSION@/$VERSION/" \ + -e "s/@qemu_lite_version@/$qemu_lite_fedora_obs_version/" \ + -e "s/@cc_image_version@/$cc_image_fedora_obs_version/" \ + -e "s/@cc_selinux_version@/$cc_selinux_fedora_obs_version/" \ + -e "s/@linux_container_version@/$linux_container_fedora_obs_version/" cc-oci-runtime.spec-template > cc-oci-runtime.spec + +sed -e "s/@VERSION@/$VERSION/" \ + -e "s/@qemu_lite_version@/$qemu_lite_ubuntu_obs_version/" \ + -e "s/@cc_image_version@/$cc_image_ubuntu_obs_version/" \ + -e "s/@linux_container_version@/$linux_container_ubuntu_obs_version/" cc-oci-runtime.dsc-template > cc-oci-runtime.dsc + +sed -e "s/@VERSION@/$VERSION/" \ + -e "s/@qemu_lite_version@/$qemu_lite_ubuntu_obs_version/" \ + -e "s/@cc_image_version@/$cc_image_ubuntu_obs_version/" \ + -e "s/@linux_container_version@/$linux_container_ubuntu_obs_version/" debian.control-template > debian.control + sed "s/@VERSION@/$VERSION/g;" _service-template > _service sed "s/@HASH_TAG@/$hash_tag/g;" update_commit_id.patch-template > update_commit_id.patch @@ -50,13 +67,13 @@ then osc co "$OBS_RUNTIME_REPO" -o $TMPDIR mv cc-oci-runtime.spec \ cc-oci-runtime.dsc \ + debian.control \ _service \ $TMPDIR rm $TMPDIR/*.patch cp debian.changelog \ debian.rules \ debian.compat \ - debian.control \ debian.postinst \ debian.series \ *.patch \ diff --git a/versions.txt b/versions.txt index 3465693f..6bc32a6c 100644 --- a/versions.txt +++ b/versions.txt @@ -12,3 +12,14 @@ qemu_lite_version=741f430a960b5b67745670e8270db91aeb083c5f mpfr_version=3.1.4 gmp_version=6.1.0 mpc_version=1.0.3 + +# OBS Fedora package versions +cc_image_fedora_obs_version=16180-29.1 +cc_selinux_fedora_obs_version=0.1-2.1 +linux_container_fedora_obs_version=4.9.35-65.1 +qemu_lite_fedora_obs_version=2.7.1+git.741f430-5.1 + +# OBS Ubuntu package versions +cc_image_ubuntu_obs_version=16180-22 +linux_container_ubuntu_obs_version=4.9.35-62 +qemu_lite_ubuntu_obs_version=2.7.1+git.741f430-5.1