Skip to content

Instantly share code, notes, and snippets.

@ganeshmaharaj
Created June 19, 2019 15:50
Show Gist options
  • Save ganeshmaharaj/46d80e27d35827f8c3daea69ca3cf4e9 to your computer and use it in GitHub Desktop.
Save ganeshmaharaj/46d80e27d35827f8c3daea69ca3cf4e9 to your computer and use it in GitHub Desktop.
ganeshma@ganeshma-desk <> packaging % git diff
diff --git a/obs-packaging/gen_versions_txt.sh b/obs-packaging/gen_versions_txt.sh
index 09d96ca..3fd888d 100755
--- a/obs-packaging/gen_versions_txt.sh
+++ b/obs-packaging/gen_versions_txt.sh
@@ -9,6 +9,7 @@ set -e
set -o errexit
set -o nounset
set -o pipefail
+set -o xtrace
readonly script_name="$(basename "${BASH_SOURCE[0]}")"
readonly script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
@@ -39,9 +40,9 @@ gen_version_file() {
qemu_lite_version=$(curl -s -L "https://raw.githubusercontent.com/${project}/qemu/${qemu_lite_branch}/VERSION")
qemu_lite_hash=$(git ls-remote https://github.com/${project}/qemu.git | grep "refs/heads/${qemu_lite_branch}" | awk '{print $1}')
- qemu_vanilla_branch=$(get_from_kata_deps "assets.hypervisor.qemu.version" "${kata_version}")
- qemu_vanilla_version=$(curl -s -L "https://raw.githubusercontent.com/qemu/qemu/${qemu_vanilla_branch}/VERSION")
- qemu_vanilla_hash=$(git ls-remote https://github.com/qemu/qemu.git | grep "refs/heads/${qemu_vanilla_branch}" | awk '{print $1}')
+ qemu_vanilla_tag=$(get_from_kata_deps "assets.hypervisor.qemu.tag" "${kata_version}")
+ qemu_vanilla_version=$(curl -s -L "https://raw.githubusercontent.com/qemu/qemu/${qemu_vanilla_tag}/VERSION")
+ qemu_vanilla_hash=$(git ls-remote --tags https://github.com/qemu/qemu.git | grep "refs/tags/${qemu_vanilla_tag}^{}" | awk '{print $1}')
kernel_version=$(get_from_kata_deps "assets.kernel.version" "${kata_version}")
#Remove extra 'v'
diff --git a/static-build/qemu/build-static-qemu.sh b/static-build/qemu/build-static-qemu.sh
index 2e41592..d4267dc 100755
--- a/static-build/qemu/build-static-qemu.sh
+++ b/static-build/qemu/build-static-qemu.sh
@@ -26,7 +26,7 @@ if [ -z "$qemu_repo" ]; then
fi
[ -n "$qemu_repo" ] || die "failed to get qemu repo"
-[ -n "$qemu_version" ] || qemu_version=$(get_from_kata_deps "assets.hypervisor.qemu.version")
+[ -n "$qemu_version" ] || qemu_version=$(get_from_kata_deps "assets.hypervisor.qemu.tag")
[ -n "$qemu_version" ] || die "failed to get qemu version"
info "Build ${qemu_repo} version: ${qemu_version}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment