Merge pull request #87 from jcvenegas/kata-1.1.0

Kata 1.1.0
This commit is contained in:
Julio Montes 2018-07-04 15:52:04 -05:00 committed by GitHub
commit ce470dc8af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
25 changed files with 75 additions and 73 deletions

View File

@ -17,6 +17,10 @@ make_target() {
target=$1 target=$1
dir=$2 dir=$2
if [ -n "${CI}" ] && [ "${target}" == "test-packaging-tools" ];then
echo "skip $target see https://github.com/kata-containers/packaging/issues/72"
return
fi
pushd "${script_dir}/.." >> /dev/null pushd "${script_dir}/.." >> /dev/null
if [ -n "${CI}" ] && ! git whatchanged origin/master..HEAD "${dir}" | grep "${dir}" >> /dev/null; then if [ -n "${CI}" ] && ! git whatchanged origin/master..HEAD "${dir}" | grep "${dir}" >> /dev/null; then
echo "Not changes in ${dir}" echo "Not changes in ${dir}"
@ -24,7 +28,7 @@ make_target() {
fi fi
popd >> /dev/null popd >> /dev/null
echo "Changes found in $dir" echo "Changes found in $dir"
make -f "${toplevel_mk}" ${target} make -f "${toplevel_mk}" "${target}"
} }
make_target test-release-tools "release/" make_target test-release-tools "release/"

View File

@ -18,4 +18,4 @@ test-static-build:
@make -f $(MK_DIR)/static-build/qemu/Makefile @make -f $(MK_DIR)/static-build/qemu/Makefile
test-packaging-tools: test-packaging-tools:
@$(MK_DIR)/build_from_docker.sh @$(MK_DIR)/obs-packaging/build_from_docker.sh

View File

@ -5,7 +5,7 @@ ARG SUSE_VERSION=${SUSE_VERSION:-42.3}
ARG GO_ARCH=${GO_ARCH:-amd64} ARG GO_ARCH=${GO_ARCH:-amd64}
# Get OBS client, plugins and dependencies # Get OBS client, plugins and dependencies
RUN zypper -n install osc-plugin-install vim curl bsdtar git sudo pcre-tools RUN zypper -v -n install osc-plugin-install vim curl bsdtar git sudo pcre-tools
RUN curl -OkL https://download.opensuse.org/repositories/openSUSE:Tools/openSUSE_${SUSE_VERSION}/openSUSE:Tools.repo RUN curl -OkL https://download.opensuse.org/repositories/openSUSE:Tools/openSUSE_${SUSE_VERSION}/openSUSE:Tools.repo
RUN zypper -n addrepo openSUSE:Tools.repo RUN zypper -n addrepo openSUSE:Tools.repo
RUN zypper --gpg-auto-import-keys refresh RUN zypper --gpg-auto-import-keys refresh

View File

@ -4,7 +4,7 @@
# #
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
# #
set -e set -e
script_dir=$(dirname "$0") script_dir=$(dirname "$0")
#Note:Lets update qemu and the kernel first, they take longer to build. #Note:Lets update qemu and the kernel first, they take longer to build.
@ -47,7 +47,7 @@ fi
if [ -n "${PUSH}" ]; then if [ -n "${PUSH}" ]; then
# push to obs # push to obs
PUSH_TO_OBS="-p" PUSH_TO_OBS="-p"
else elif [ -n "${LOCAL}" ]; then
# local build # local build
PUSH_TO_OBS="-l" PUSH_TO_OBS="-l"
fi fi

View File

@ -28,9 +28,9 @@ export GO_ARCH=$(go env GOARCH)
sudo docker build \ sudo docker build \
--build-arg http_proxy="${http_proxy}" \ --build-arg http_proxy="${http_proxy}" \
--build-arg https_proxy="${https_proxy}" \ --build-arg https_proxy="${https_proxy}" \
-t $obs_image . -t $obs_image ${script_dir}
pushd kata-containers-image/ >> /dev/null pushd "${script_dir}/kata-containers-image/" >> /dev/null
./build_image.sh ./build_image.sh
popd >> /dev/null popd >> /dev/null

View File

@ -57,5 +57,6 @@ verify
echo "Verify succeed." echo "Verify succeed."
get_git_info get_git_info
changelog_update "${VERSION}-${KATA_CONFIG_VERSION}" changelog_update "${VERSION}-${KATA_CONFIG_VERSION}"
ln -sfT "${SCRIPT_DIR}/../../kernel/patches" "${SCRIPT_DIR}/patches"
generate_files "$SCRIPT_DIR" "${replace_list[@]}" generate_files "$SCRIPT_DIR" "${replace_list[@]}"
build_pkg "${PROJECT_REPO}" build_pkg "${PROJECT_REPO}"

View File

@ -1,11 +1,11 @@
<!--- XML Structure defined here: https://en.opensuse.org/openSUSE:Build_Service_Concept_SourceService --> <!--- XML Structure defined here: https://en.opensuse.org/openSUSE:Build_Service_Concept_SourceService -->
<services> <services>
<service name="tar_scm"> <service name="tar_scm">
<param name="scm">git</param> <param name="scm">git</param>
<param name="url">https://github.com/kata-containers/ksm-throttler.git</param> <param name="url">https://github.com/kata-containers/ksm-throttler.git</param>
<param name="filename">kata-ksm-throttler</param> <param name="filename">kata-ksm-throttler</param>
<param name="versionformat">@VERSION@.git+%h</param> <param name="versionformat">@VERSION@.git+@HASH@</param>
<param name="revision">@REVISION@</param> <param name="revision">@HASH@</param>
</service> </service>
<service name="recompress"> <service name="recompress">
<param name="file">*.tar*</param> <param name="file">*.tar*</param>

View File

@ -23,13 +23,15 @@ override_dh_auto_build:
tar xzf /usr/src/packages/SOURCES/go$(GO_VERSION).linux-@GO_ARCH@.tar.gz -C /tmp/local tar xzf /usr/src/packages/SOURCES/go$(GO_VERSION).linux-@GO_ARCH@.tar.gz -C /tmp/local
ln -s /usr/src/packages/BUILD /usr/src/packages/BUILD/go/src/$(IMPORTNAME) ln -s /usr/src/packages/BUILD /usr/src/packages/BUILD/go/src/$(IMPORTNAME)
cd $(GOPATH)/src/$(IMPORTNAME); \ cd $(GOPATH)/src/$(IMPORTNAME); \
make TARGET=kata-ksm-throttler make \
COMMIT=@HASH@ \
TARGET=kata-ksm-throttler
override_dh_auto_install: override_dh_auto_install:
mkdir -p debian/$(PROJECT) mkdir -p debian/$(PROJECT)
cd $(GOPATH)/src/$(IMPORTNAME); \ cd $(GOPATH)/src/$(IMPORTNAME); \
make install \ make install \
COMMIT=@HASH@ \
DESTDIR=$(shell pwd)/debian/kata-ksm-throttler \ DESTDIR=$(shell pwd)/debian/kata-ksm-throttler \
TARGET=kata-ksm-throttler TARGET=kata-ksm-throttler

View File

@ -58,6 +58,7 @@ mkdir -p $HOME/rpmbuild/BUILD/go/src/%{DOMAIN}/%{ORG}
ln -s $HOME/rpmbuild/BUILD/kata-ksm-throttler-%{version} $HOME/rpmbuild/BUILD/go/src/%{IMPORTNAME} ln -s $HOME/rpmbuild/BUILD/kata-ksm-throttler-%{version} $HOME/rpmbuild/BUILD/go/src/%{IMPORTNAME}
cd $HOME/rpmbuild/BUILD/go/src/%{IMPORTNAME} cd $HOME/rpmbuild/BUILD/go/src/%{IMPORTNAME}
make \ make \
COMMIT=@HASH@ \
TARGET=kata-ksm-throttler \ TARGET=kata-ksm-throttler \
LIBEXECDIR=%{LIBEXECDIR} LIBEXECDIR=%{LIBEXECDIR}
@ -68,6 +69,7 @@ export GOPATH=$HOME/rpmbuild/BUILD/go/
cd $HOME/rpmbuild/BUILD/go/src/%{IMPORTNAME} cd $HOME/rpmbuild/BUILD/go/src/%{IMPORTNAME}
make install \ make install \
COMMIT=@HASH@ \
TARGET=kata-ksm-throttler \ TARGET=kata-ksm-throttler \
DESTDIR=%{buildroot} \ DESTDIR=%{buildroot} \
LIBEXECDIR=%{LIBEXECDIR} LIBEXECDIR=%{LIBEXECDIR}

View File

@ -19,8 +19,8 @@ source ../scripts/pkglib.sh
SCRIPT_NAME=$0 SCRIPT_NAME=$0
SCRIPT_DIR=$(dirname $0) SCRIPT_DIR=$(dirname $0)
PKG_NAME="kata-ksm-throttler" PKG_NAME="kata-ksm-throttler"
VERSION=$ksm_throttler_version VERSION="${kata_ksm_throttler_version}"
HASH=$ksm_throttler_hash HASH="${kata_ksm_throttler_hash}"
GENERATED_FILES=(_service kata-ksm-throttler.spec kata-ksm-throttler.dsc debian.control debian.rules) GENERATED_FILES=(_service kata-ksm-throttler.spec kata-ksm-throttler.dsc debian.control debian.rules)
STATIC_FILES=(debian.compat) STATIC_FILES=(debian.compat)
@ -34,16 +34,14 @@ RELEASE=$(get_obs_pkg_release "${PROJECT_REPO}")
((RELEASE++)) ((RELEASE++))
[ -n "$APIURL" ] && APIURL="-A ${APIURL}" [ -n "$APIURL" ] && APIURL="-A ${APIURL}"
set_versions "$kata_ksm_throttler_hash"
set_versions "$ksm_throttler_hash"
replace_list=( replace_list=(
"GO_CHECKSUM=$go_checksum" "GO_CHECKSUM=$go_checksum"
"GO_VERSION=$go_version" "GO_VERSION=$go_version"
"GO_ARCH=$GO_ARCH" "GO_ARCH=$GO_ARCH"
"HASH=${HASH:0:7}" "HASH=${short_hashtag}"
"RELEASE=$RELEASE" "RELEASE=$RELEASE"
"REVISION=$HASH"
"VERSION=$VERSION" "VERSION=$VERSION"
) )

View File

@ -4,8 +4,8 @@
<param name="scm">git</param> <param name="scm">git</param>
<param name="url">https://github.com/kata-containers/proxy.git</param> <param name="url">https://github.com/kata-containers/proxy.git</param>
<param name="filename">kata-proxy</param> <param name="filename">kata-proxy</param>
<param name="versionformat">@VERSION@+git.%h</param> <param name="versionformat">@VERSION@+git.@HASH@</param>
<param name="revision">@REVISION@</param> <param name="revision">@HASH@</param>
</service> </service>
<service name="recompress"> <service name="recompress">
<param name="file">*.tar*</param> <param name="file">*.tar*</param>

View File

@ -16,8 +16,8 @@ override_dh_auto_build:
mkdir -p /usr/src/packages/BUILD/go/src/github.com/kata-containers/ mkdir -p /usr/src/packages/BUILD/go/src/github.com/kata-containers/
tar xzf /usr/src/packages/SOURCES/go$(GO_VERSION).linux-@GO_ARCH@.tar.gz -C /usr/src/packages/BUILD/local/ tar xzf /usr/src/packages/SOURCES/go$(GO_VERSION).linux-@GO_ARCH@.tar.gz -C /usr/src/packages/BUILD/local/
ln -s /usr/src/packages/BUILD/ /usr/src/packages/BUILD/go/src/github.com/kata-containers/proxy ln -s /usr/src/packages/BUILD/ /usr/src/packages/BUILD/go/src/github.com/kata-containers/proxy
cd $(GOPATH)/src/github.com/kata-containers/proxy && make cd $(GOPATH)/src/github.com/kata-containers/proxy && make COMMIT=@HASH@
override_dh_auto_install: override_dh_auto_install:
mkdir debian/kata-proxy mkdir debian/kata-proxy
make install LIBEXECDIR=$(shell pwd)/debian/kata-proxy/usr/libexec make install LIBEXECDIR=$(shell pwd)/debian/kata-proxy/usr/libexec COMMIT=@HASH@

View File

@ -66,14 +66,14 @@ export GOPATH=$HOME/rpmbuild/BUILD/go/
mkdir -p $HOME/rpmbuild/BUILD/go/src/%{DOMAIN}/%{ORG} mkdir -p $HOME/rpmbuild/BUILD/go/src/%{DOMAIN}/%{ORG}
ln -s %{_builddir}/%{name}-%{version} $HOME/rpmbuild/BUILD/go/src/%{IMPORTNAME} ln -s %{_builddir}/%{name}-%{version} $HOME/rpmbuild/BUILD/go/src/%{IMPORTNAME}
cd $HOME/rpmbuild/BUILD/go/src/%{IMPORTNAME} cd $HOME/rpmbuild/BUILD/go/src/%{IMPORTNAME}
make make COMMIT=@HASH@
%clean %clean
echo "Clean build root" echo "Clean build root"
rm -rf %{buildroot} rm -rf %{buildroot}
%install %install
make install LIBEXECDIR=%{buildroot}%{LIBEXECDIR} make install LIBEXECDIR=%{buildroot}%{LIBEXECDIR} COMMIT=@HASH@
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)

View File

@ -38,7 +38,6 @@ replace_list=(
"GO_ARCH=$GO_ARCH" "GO_ARCH=$GO_ARCH"
"HASH=$short_hashtag" "HASH=$short_hashtag"
"RELEASE=$RELEASE" "RELEASE=$RELEASE"
"REVISION=$VERSION"
"VERSION=$VERSION" "VERSION=$VERSION"
) )

View File

@ -6,8 +6,8 @@
<param name="url">https://github.com/kata-containers/runtime.git</param> <param name="url">https://github.com/kata-containers/runtime.git</param>
<param name="filename">kata-runtime</param> <param name="filename">kata-runtime</param>
<!--- versionformat defines the name of the tarball. --> <!--- versionformat defines the name of the tarball. -->
<param name="versionformat">@VERSION@+git.%h</param> <param name="versionformat">@VERSION@+git.@HASH@</param>
<param name="revision">@REVISION@</param> <param name="revision">@HASH@</param>
</service> </service>
<service name="recompress"> <service name="recompress">
<param name="file">*.tar*</param> <param name="file">*.tar*</param>

View File

@ -27,17 +27,16 @@ override_dh_auto_build:
tar xzf /usr/src/packages/SOURCES/go$(GO_VERSION).linux-@GO_ARCH@.tar.gz -C /usr/src/packages/BUILD/local tar xzf /usr/src/packages/SOURCES/go$(GO_VERSION).linux-@GO_ARCH@.tar.gz -C /usr/src/packages/BUILD/local
ln -s /usr/src/packages/BUILD /usr/src/packages/BUILD/go/src/$(IMPORTNAME) ln -s /usr/src/packages/BUILD /usr/src/packages/BUILD/go/src/$(IMPORTNAME)
cd $(GOPATH)/src/$(IMPORTNAME)/; \ cd $(GOPATH)/src/$(IMPORTNAME)/; \
make QEMUPATH=/usr/bin/$(DEFAULT_QEMU) make QEMUPATH=/usr/bin/$(DEFAULT_QEMU) COMMIT=@HASH@
override_dh_auto_install: override_dh_auto_install:
mkdir -p debian/$(PKG_NAME) mkdir -p debian/$(PKG_NAME)
cd $(GOPATH)/src/$(IMPORTNAME)/; \ cd $(GOPATH)/src/$(IMPORTNAME)/; \
make install \ make install \
SCRIPTS_DIR=$(shell pwd)/debian/usr/bin \ DESTDIR=$(shell pwd)/debian/$(PKG_NAME)/ \
DESTTARGET=$(shell pwd)/debian/$(PKG_NAME)/usr/bin/kata-runtime \ PREFIX=/usr \
QEMUPATH=/usr/bin/$(DEFAULT_QEMU) \ COMMIT=@HASH@ \
DESTCONFIG=$(shell pwd)/debian/$(PKG_NAME)/usr/share/defaults/kata-containers/configuration.toml QEMUPATH=/usr/bin/$(DEFAULT_QEMU)
sed -i -e '/^initrd =/d' $(shell pwd)/debian/$(PKG_NAME)/usr/share/defaults/kata-containers/configuration.toml sed -i -e '/^initrd =/d' $(shell pwd)/debian/$(PKG_NAME)/usr/share/defaults/kata-containers/configuration.toml

View File

@ -71,7 +71,7 @@ export GOPATH=$HOME/rpmbuild/BUILD/go/
mkdir -p $HOME/rpmbuild/BUILD/go/src/%{DOMAIN}/%{ORG} mkdir -p $HOME/rpmbuild/BUILD/go/src/%{DOMAIN}/%{ORG}
ln -s $HOME/rpmbuild/BUILD/kata-runtime-%{version} $HOME/rpmbuild/BUILD/go/src/%{IMPORTNAME} ln -s $HOME/rpmbuild/BUILD/kata-runtime-%{version} $HOME/rpmbuild/BUILD/go/src/%{IMPORTNAME}
cd $HOME/rpmbuild/BUILD/go/src/%{IMPORTNAME} cd $HOME/rpmbuild/BUILD/go/src/%{IMPORTNAME}
make QEMUPATH=/usr/bin/%{DEFAULT_QEMU} make QEMUPATH=/usr/bin/%{DEFAULT_QEMU} COMMIT=@HASH@
%check %check
export http_proxy=http://127.0.0.1:9/ export http_proxy=http://127.0.0.1:9/
@ -86,11 +86,10 @@ export GOPATH=$HOME/rpmbuild/BUILD/go/
cd $HOME/rpmbuild/BUILD/go/src/%{IMPORTNAME} cd $HOME/rpmbuild/BUILD/go/src/%{IMPORTNAME}
make \ make \
DESTTARGET=%{buildroot}/usr/bin/kata-runtime \ DESTDIR=%{buildroot} \
DESTCONFIG=%{buildroot}/usr/share/defaults/kata-containers/configuration.toml \ PREFIX=/usr \
SCRIPTS_DIR=%{buildroot}/usr/bin \
BASH_COMPLETIONSDIR=%{buildroot}/usr/share/bash-completion/completions/kata-runtime \
QEMUPATH=/usr/bin/%{DEFAULT_QEMU} \ QEMUPATH=/usr/bin/%{DEFAULT_QEMU} \
COMMIT=@HASH@ \
install install
sed -i -e '/^initrd =/d' %{buildroot}/usr/share/defaults/kata-containers/configuration.toml sed -i -e '/^initrd =/d' %{buildroot}/usr/share/defaults/kata-containers/configuration.toml

View File

@ -55,7 +55,7 @@ KERNEL_REQUIRED_VERSION=$(pkg_version "${kernel_version}.${KERNEL_CONFIG_VERSION
info "kata-linux-container ${KERNEL_REQUIRED_VERSION}" info "kata-linux-container ${KERNEL_REQUIRED_VERSION}"
KSM_THROTTLER_RELEASE=$(get_obs_pkg_release "home:${OBS_PROJECT}:${OBS_SUBPROJECT}/ksm-throttler") KSM_THROTTLER_RELEASE=$(get_obs_pkg_release "home:${OBS_PROJECT}:${OBS_SUBPROJECT}/ksm-throttler")
KSM_THROTTLER_REQUIRED_VERSION=$(pkg_version "${ksm_throttler_version}" "${KSM_THROTTLER_RELEASE}" "${ksm_throttler_hash}") KSM_THROTTLER_REQUIRED_VERSION=$(pkg_version "${kata_ksm_throttler_version}" "${KSM_THROTTLER_RELEASE}" "${kata_ksm_throttler_hash}")
info "ksm-throttler ${KSM_THROTTLER_REQUIRED_VERSION}" info "ksm-throttler ${KSM_THROTTLER_REQUIRED_VERSION}"
KATA_CONTAINERS_IMAGE_RELEASE=$(get_obs_pkg_release "home:${OBS_PROJECT}:${OBS_SUBPROJECT}/kata-containers-image") KATA_CONTAINERS_IMAGE_RELEASE=$(get_obs_pkg_release "home:${OBS_PROJECT}:${OBS_SUBPROJECT}/kata-containers-image")
@ -84,7 +84,6 @@ replace_list=(
"GO_ARCH=$GO_ARCH" "GO_ARCH=$GO_ARCH"
"HASH=$short_hashtag" "HASH=$short_hashtag"
"RELEASE=$RELEASE" "RELEASE=$RELEASE"
"REVISION=$VERSION"
"VERSION=$VERSION" "VERSION=$VERSION"
"kata_osbuilder_version=${KATA_IMAGE_REQUIRED_VERSION}" "kata_osbuilder_version=${KATA_IMAGE_REQUIRED_VERSION}"
"kata_proxy_version=${PROXY_REQUIRED_VERESION}" "kata_proxy_version=${PROXY_REQUIRED_VERESION}"
@ -95,7 +94,6 @@ replace_list=(
"qemu_vanilla_version=${KATA_QEMU_VANILLA_REQUIRED_VERSION}" "qemu_vanilla_version=${KATA_QEMU_VANILLA_REQUIRED_VERSION}"
) )
verify verify
echo "Verify succeed." echo "Verify succeed."
get_git_info get_git_info

View File

@ -9,7 +9,7 @@ LOG_DIR=${PACKAGING_DIR}/build_logs
# OBS Project info # OBS Project info
OBS_PROJECT="${OBS_PROJECT:-katacontainers}" OBS_PROJECT="${OBS_PROJECT:-katacontainers}"
OBS_SUBPROJECT="${OBS_SUBPROJECT:-release}" OBS_SUBPROJECT="${OBS_SUBPROJECT:-alpha}"
# BUILD OPTIONS # BUILD OPTIONS
BUILD_DISTROS=${BUILD_DISTROS:-Fedora_27 xUbuntu_16.04 CentOS_7} BUILD_DISTROS=${BUILD_DISTROS:-Fedora_27 xUbuntu_16.04 CentOS_7}
@ -35,10 +35,10 @@ fi
function display_help() function display_help()
{ {
cat <<-EOL cat <<-EOL
$SCRIPT_NAME $SCRIPT_NAME
This script is intended to create Kata Containers 3.X packages for the OBS This script is intended to create Kata Containers packages for the OBS
(Open Build Service) platform. (Open Build Service) platform.
Usage: Usage:
@ -89,7 +89,7 @@ function verify()
# Make sure this script is called from ./ # Make sure this script is called from ./
[ "$SCRIPT_DIR" != "." ] && die "The script must be called from its base dir." [ "$SCRIPT_DIR" != "." ] && die "The script must be called from its base dir."
# Verify if osc is installed, exit otherwise. # Verify if osc is installed, exit otherwise.
[ ! -x "$(command -v osc)" ] && die "osc is not installed." [ ! -x "$(command -v osc)" ] && die "osc is not installed."
@ -131,7 +131,7 @@ function set_versions()
else else
hash_tag=$commit_hash hash_tag=$commit_hash
fi fi
short_hashtag="${hash_tag:0:7}" short_hashtag="${hash_tag:0:7}"
} }
function changelog_update { function changelog_update {
@ -185,12 +185,12 @@ function checkout_repo()
OBS_WORKDIR=$(mktemp -d -u -t ${temp}.XXXXXXXXXXX) || exit 1 OBS_WORKDIR=$(mktemp -d -u -t ${temp}.XXXXXXXXXXX) || exit 1
osc $APIURL co $REPO -o $OBS_WORKDIR osc $APIURL co $REPO -o $OBS_WORKDIR
fi fi
find ${OBS_WORKDIR} -maxdepth 1 -mindepth 1 ! -name '.osc' -prune -exec echo remove {} \; -exec rm -rf {} \;
mv ${GENERATED_FILES[@]} $OBS_WORKDIR mv ${GENERATED_FILES[@]} "$OBS_WORKDIR"
cp ${STATIC_FILES[@]} $OBS_WORKDIR cp ${STATIC_FILES[@]} "$OBS_WORKDIR"
} }
function obs_push() function obs_push()
{ {
pushd $OBS_WORKDIR pushd $OBS_WORKDIR
@ -258,7 +258,7 @@ function generate_files () {
replace_list+=("RPM_PATCH_LIST=$RPM_PATCH_LIST") replace_list+=("RPM_PATCH_LIST=$RPM_PATCH_LIST")
replace_list+=("RPM_APPLY_PATCHES=$RPM_APPLY_PATCHES") replace_list+=("RPM_APPLY_PATCHES=$RPM_APPLY_PATCHES")
# check replace list # check replace list
# key=val # key=val
for replace in "${replace_list[@]}" ; do for replace in "${replace_list[@]}" ; do
[[ "$replace" = *"="* ]] || die "invalid replace $replace" [[ "$replace" = *"="* ]] || die "invalid replace $replace"
@ -322,7 +322,6 @@ function get_obs_pkg_release() {
release=$(grep -oP '%define\s+release\s+[0-9]+' "${spec_file}" | grep -oP '[0-9]+') release=$(grep -oP '%define\s+release\s+[0-9]+' "${spec_file}" | grep -oP '[0-9]+')
fi fi
rm -r "${repo_dir}" rm -r "${repo_dir}"
echo "${release}" echo "${release}"
} }
@ -339,7 +338,7 @@ function find_patches() {
export RPM_APPLY_PATCHES="#Apply patches"$'\n' export RPM_APPLY_PATCHES="#Apply patches"$'\n'
[ ! -d patches ] && info "No patches found" && return [ ! -d patches ] && info "No patches found" && return
local patches local patches
patches=$(find patches -type f -name '*.patch' -exec basename {} \;) patches=$(find patches/ -type f -name '*.patch' -exec basename {} \;)
n="1" n="1"
rm -f debian.series rm -f debian.series
for p in ${patches} ; do for p in ${patches} ; do

View File

@ -4,8 +4,8 @@
<param name="scm">git</param> <param name="scm">git</param>
<param name="url">https://github.com/kata-containers/shim.git</param> <param name="url">https://github.com/kata-containers/shim.git</param>
<param name="filename">kata-shim</param> <param name="filename">kata-shim</param>
<param name="versionformat">@VERSION@+git.%h</param> <param name="versionformat">@VERSION@+git.@HASH@</param>
<param name="revision">@REVISION@</param> <param name="revision">@HASH@</param>
</service> </service>
<service name="recompress"> <service name="recompress">
<param name="file">*.tar*</param> <param name="file">*.tar*</param>

View File

@ -14,8 +14,8 @@ override_dh_auto_build:
mkdir -p /usr/src/packages/BUILD/go/src/github.com/kata-containers/ mkdir -p /usr/src/packages/BUILD/go/src/github.com/kata-containers/
tar xzf /usr/src/packages/SOURCES/go$(GO_VERSION).linux-@GO_ARCH@.tar.gz -C /usr/src/packages/BUILD/local/ tar xzf /usr/src/packages/SOURCES/go$(GO_VERSION).linux-@GO_ARCH@.tar.gz -C /usr/src/packages/BUILD/local/
ln -s /usr/src/packages/BUILD/ /usr/src/packages/BUILD/go/src/github.com/kata-containers/shim ln -s /usr/src/packages/BUILD/ /usr/src/packages/BUILD/go/src/github.com/kata-containers/shim
cd $(GOPATH)/src/github.com/kata-containers/shim && make cd $(GOPATH)/src/github.com/kata-containers/shim && make COMMIT=@HASH@
override_dh_auto_install: override_dh_auto_install:
mkdir -p debian/kata-shim mkdir -p debian/kata-shim
make install LIBEXECDIR=$(shell pwd)/debian/kata-shim/usr/libexec make install LIBEXECDIR=$(shell pwd)/debian/kata-shim/usr/libexec COMMIT=@HASH@

View File

@ -58,7 +58,7 @@ export GOPATH=$HOME/rpmbuild/BUILD/go/
mkdir -p $HOME/rpmbuild/BUILD/go/src/%{DOMAIN}/%{ORG} mkdir -p $HOME/rpmbuild/BUILD/go/src/%{DOMAIN}/%{ORG}
ln -s %{_builddir}/%{name}-%{version} $HOME/rpmbuild/BUILD/go/src/%{IMPORTNAME} ln -s %{_builddir}/%{name}-%{version} $HOME/rpmbuild/BUILD/go/src/%{IMPORTNAME}
cd $HOME/rpmbuild/BUILD/go/src/%{IMPORTNAME} cd $HOME/rpmbuild/BUILD/go/src/%{IMPORTNAME}
make make COMMIT=@HASH@
%check %check
export http_proxy=http://127.0.0.1:9/ export http_proxy=http://127.0.0.1:9/
@ -70,7 +70,7 @@ export GOROOT=$HOME/rpmbuild/BUILD/local/go
export PATH=$PATH:$HOME/rpmbuild/BUILD/local/go/bin export PATH=$PATH:$HOME/rpmbuild/BUILD/local/go/bin
export GOPATH=$HOME/rpmbuild/BUILD/go/ export GOPATH=$HOME/rpmbuild/BUILD/go/
make install LIBEXECDIR=%{buildroot}%{LIBEXECDIR} make install LIBEXECDIR=%{buildroot}%{LIBEXECDIR} COMMIT=@HASH@
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)

View File

@ -38,7 +38,6 @@ replace_list=(
"GO_ARCH=$GO_ARCH" "GO_ARCH=$GO_ARCH"
"HASH=$short_hashtag" "HASH=$short_hashtag"
"RELEASE=$RELEASE" "RELEASE=$RELEASE"
"REVISION=$VERSION"
"VERSION=$VERSION" "VERSION=$VERSION"
) )

View File

@ -1,20 +1,22 @@
kata_runtime_hash=086d197f2c60e733a1aa4b033841ec922273ecd5 kata_agent_hash=7b458b18ffcbb90a1aed1644d109ea438f39c9a0
kata_proxy_hash=a69326b63802952b14203ea9c1533d4edb8c1d64 kata_ksm_throttler_hash=1fecaffc98386fdb080979d38d5688566eec54a1
kata_shim_hash=74cbc1ee7645916a994b767790da4c6116d28270 kata_proxy_hash=8a305e5a61856c7510350b0ade5a5dc5e9255dbf
kata_agent_hash=a099747be287d30d7f1efcd6ba2bda88fc4a0f15 kata_runtime_hash=bf1cf684f5d48d3142665f98daf719faf94039e2
ksm_throttler_hash=422c7f7ea05400ecdb06e892235fa75854ba2b11 kata_shim_hash=de2d2a67659cab7928b81f836a8f64450c998453
# Dependencies
qemu_lite_hash=6ba2bfbee9a80bfd03605c5eb2ca743c8b68389e qemu_lite_hash=6ba2bfbee9a80bfd03605c5eb2ca743c8b68389e
qemu_vanilla_hash=e3050471ff1daa7fefe88388dfa4e1d97ba1f0bc qemu_vanilla_hash=e3050471ff1daa7fefe88388dfa4e1d97ba1f0bc
kata_runtime_version=1.0.0 kata_runtime_version=1.1.0
kata_proxy_version=1.0.0 kata_proxy_version=1.1.0
kata_shim_version=1.0.0 kata_shim_version=1.1.0
kata_agent_version=1.0.0 kata_agent_version=1.1.0
ksm_throttler_version=1.0.0 kata_ksm_throttler_version=1.1.0
kata_osbuilder_version=1.0.0 kata_osbuilder_version=1.1.0
qemu_lite_version=2.11.0 qemu_lite_version=2.11.0
qemu_vanilla_version=2.11 qemu_vanilla_version=2.11
kernel_version=4.14.22 kernel_version=4.14.51
# Default osbuilder image options # Default osbuilder image options
osbuilder_default_os=clearlinux osbuilder_default_os=clearlinux

View File

@ -308,7 +308,7 @@ main()
qemu_options+=(security:--disable-static) qemu_options+=(security:--disable-static)
fi fi
if [ -n ${static} ]; then if [ "${static}" == "true" ]; then
qemu_options+=(misc:--static) qemu_options+=(misc:--static)
fi fi