Skip to content

Commit

Permalink
Merge pull request clearcontainers#46 from jcvenegas/kernel-config-ve…
Browse files Browse the repository at this point in the history
…rsion-pgs

pkg: kernel: Add kernel config version to pkg version.
  • Loading branch information
chavafg authored May 29, 2018
2 parents f73782b + 028f8e8 commit 456b7c2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion kernel/kata-linux-container.dsc-template
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Format: 3.0 (quilt)
Source: kata-linux-container
Version: @VERSION@-@RELEASE@
Version: @VERSION@.@CONFIG_VERSION@-@RELEASE@
Section: devel
Priority: optional
Maintainer: Kata containers team <https://github.com/kata-containers/>
Expand Down
2 changes: 1 addition & 1 deletion kernel/kata-linux-container.spec-template
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%define bzimage_arch x86

Name: kata-linux-container
Version: @VERSION@
Version: @VERSION@.@CONFIG_VERSION@
Release: @RELEASE@.<B_CNT>
License: GPL-2.0
Summary: The Linux kernel optimized for running inside a container
Expand Down
6 changes: 4 additions & 2 deletions kernel/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ SCRIPT_DIR=$(dirname $0)

PKG_NAME="kata-linux-container"
VERSION=$kernel_version
KATA_CONFIG_VERSION=$(cat "${SCRIPT_DIR}/kata_config_version")

KR_SERIES="$(echo $VERSION | cut -d "." -f 1).x"
KR_LTS=$(echo $VERSION | cut -d "." -f 1,2)
Expand All @@ -45,14 +46,15 @@ kernel_sha256=$(curl -L -s -f ${KR_SHA} | awk '/linux-'${VERSION}'.tar.xz/ {prin
cp "configs/x86_kata_kvm_${KR_LTS}.x" config

replace_list=(
"VERSION=$VERSION"
"VERSION=${VERSION}"
"CONFIG_VERSION=${KATA_CONFIG_VERSION}"
"RELEASE=$RELEASE"
"KERNEL_SHA256=$kernel_sha256"
)

verify
echo "Verify succeed."
get_git_info
changelog_update $VERSION
changelog_update "${VERSION}-${KATA_CONFIG_VERSION}"
generate_files "$SCRIPT_DIR" "${replace_list[@]}"
build_pkg "${PROJECT_REPO}"
3 changes: 2 additions & 1 deletion runtime/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ SHIM_REQUIRED_VERSION=$(pkg_version "${kata_shim_version}" "${SHIM_RELEASE}" "${
info "shim ${SHIM_REQUIRED_VERSION}"

KERNEL_RELEASE=$(get_obs_pkg_release "home:${OBS_PROJECT}:${OBS_SUBPROJECT}/linux-container")
KERNEL_REQUIRED_VERSION=$(pkg_version "${kernel_version}" "${KERNEL_RELEASE}")
KERNEL_CONFIG_VERSION=$(cat "${SCRIPT_DIR}/../kernel/kata_config_version")
KERNEL_REQUIRED_VERSION=$(pkg_version "${kernel_version}.${KERNEL_CONFIG_VERSION}" "${KERNEL_RELEASE}")
info "kata-linux-container ${KERNEL_REQUIRED_VERSION}"

KSM_THROTTLER_RELEASE=$(get_obs_pkg_release "home:${OBS_PROJECT}:${OBS_SUBPROJECT}/ksm-throttler")
Expand Down

0 comments on commit 456b7c2

Please sign in to comment.