Skip to content
This repository was archived by the owner on Mar 28, 2018. It is now read-only.

Commit 2c13fb1

Browse files
author
Erick Cardona
committed
OBS: add dependencies' versions
This commit adds new entries in the versions.txt for indicating the versions of the OBS packages in the stable repository. These are added to the spec/dsc files in the "Requires" section and in order to support the upgrade path when updating the runtime. Fixes #1043 Signed-off-by: Erick Cardona <[email protected]>
1 parent 19b0afa commit 2c13fb1

File tree

5 files changed

+36
-8
lines changed

5 files changed

+36
-8
lines changed

data/obs-packaging/cc-oci-runtime/cc-oci-runtime.dsc-template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ DEBTRANSFORM-RELEASE: 1
1111

1212
Package: cc-oci-runtime
1313
Architecture: amd64
14-
Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, qemu-lite, clear-containers-image, linux-container
14+
Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, qemu-lite (>=@qemu_lite_version@), clear-containers-image (>=@cc_image_version@), linux-container (>=@linux_container_version@)
1515
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.

data/obs-packaging/cc-oci-runtime/cc-oci-runtime.spec-template

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ BuildRequires : autoconf-archive
4040
BuildRequires : autoconf
4141
BuildRequires : automake
4242
%endif
43-
Requires: clear-containers-image
44-
Requires: clear-containers-selinux
45-
Requires: qemu-lite
46-
Requires: linux-container
43+
Requires: clear-containers-image >= @cc_image_version@
44+
Requires: clear-containers-selinux >= @cc_selinux_version@
45+
Requires: qemu-lite >= @qemu_lite_version@
46+
Requires: linux-container >= @linux_container_version@
4747
Patch1: update_commit_id.patch
4848

4949
%description

data/obs-packaging/cc-oci-runtime/update_runtime.sh

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ hash_tag=$(git log --oneline --pretty="%H %d" --decorate --tags --no-walk | grep
1616
# If there is no tag matching $VERSION we'll get $VERSION as the reference
1717
[ -z "$hash_tag" ] && hash_tag=$VERSION || :
1818

19+
# load versions
20+
source ../../../versions.txt
21+
1922
OBS_PUSH=${OBS_PUSH:-false}
2023
OBS_RUNTIME_REPO=${OBS_RUNTIME_REPO:-home:clearlinux:preview:clear-containers-staging/cc-oci-runtime}
2124

@@ -37,8 +40,22 @@ function changelog_update {
3740
}
3841
changelog_update $VERSION
3942

40-
sed "s/@VERSION@/$VERSION/g;" cc-oci-runtime.spec-template > cc-oci-runtime.spec
41-
sed "s/@VERSION@/$VERSION/g;" cc-oci-runtime.dsc-template > cc-oci-runtime.dsc
43+
sed -e "s/@VERSION@/$VERSION/" \
44+
-e "s/@qemu_lite_version@/$qemu_lite_fedora_obs_version/" \
45+
-e "s/@cc_image_version@/$cc_image_fedora_obs_version/" \
46+
-e "s/@cc_selinux_version@/$cc_selinux_fedora_obs_version/" \
47+
-e "s/@linux_container_version@/$linux_container_fedora_obs_version/" cc-oci-runtime.spec-template > cc-oci-runtime.spec
48+
49+
sed -e "s/@VERSION@/$VERSION/" \
50+
-e "s/@qemu_lite_version@/$qemu_lite_ubuntu_obs_version/" \
51+
-e "s/@cc_image_version@/$cc_image_ubuntu_obs_version/" \
52+
-e "s/@linux_container_version@/$linux_container_ubuntu_obs_version/" cc-oci-runtime.dsc-template > cc-oci-runtime.dsc
53+
54+
sed -e "s/@VERSION@/$VERSION/" \
55+
-e "s/@qemu_lite_version@/$qemu_lite_ubuntu_obs_version/" \
56+
-e "s/@cc_image_version@/$cc_image_ubuntu_obs_version/" \
57+
-e "s/@linux_container_version@/$linux_container_ubuntu_obs_version/" debian.control-template > debian.control
58+
4259
sed "s/@VERSION@/$VERSION/g;" _service-template > _service
4360
sed "s/@HASH_TAG@/$hash_tag/g;" update_commit_id.patch-template > update_commit_id.patch
4461

@@ -50,13 +67,13 @@ then
5067
osc co "$OBS_RUNTIME_REPO" -o $TMPDIR
5168
mv cc-oci-runtime.spec \
5269
cc-oci-runtime.dsc \
70+
debian.control \
5371
_service \
5472
$TMPDIR
5573
rm $TMPDIR/*.patch
5674
cp debian.changelog \
5775
debian.rules \
5876
debian.compat \
59-
debian.control \
6077
debian.postinst \
6178
debian.series \
6279
*.patch \

versions.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,14 @@ qemu_lite_version=741f430a960b5b67745670e8270db91aeb083c5f
1212
mpfr_version=3.1.4
1313
gmp_version=6.1.0
1414
mpc_version=1.0.3
15+
16+
# OBS Fedora package versions
17+
cc_image_fedora_obs_version=16180-29.1
18+
cc_selinux_fedora_obs_version=0.1-2.1
19+
linux_container_fedora_obs_version=4.9.35-65.1
20+
qemu_lite_fedora_obs_version=2.7.1+git.741f430-5.1
21+
22+
# OBS Ubuntu package versions
23+
cc_image_ubuntu_obs_version=16180-22
24+
linux_container_ubuntu_obs_version=4.9.35-62
25+
qemu_lite_ubuntu_obs_version=2.7.1+git.741f430-5.1

0 commit comments

Comments
 (0)