Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

packages: Add spec files and update scripts #20

Merged
merged 1 commit into from
May 14, 2018
Merged

packages: Add spec files and update scripts #20

merged 1 commit into from
May 14, 2018

Conversation

erick0z
Copy link

@erick0z erick0z commented Apr 25, 2018

This commit adds the necessary spec files and scripts in order to be able to create
packages in OBS (Open Build System).

Fixes #15

Copy link
Member

@jcvenegas jcvenegas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As first review could you replace any 'Clear' reference to kata?

@@ -0,0 +1,2109 @@
=========================================================================
This package contains next projects with following licenses
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont know if this is really needed ?
IF that is the case the osbuilder should provde with the list of packages it added to the image?

Dockerfile Outdated
obs-service-download_url

# Set Go environment
RUN curl -OL https://dl.google.com/go/go1.9.5.linux-amd64.tar.gz
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you move the go version to a variable?

@@ -0,0 +1,32 @@
# Kata Containers image

This directory contains the sources to update rpm specfiles anddebian source
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/anddebian/and debian

# Kata Containers image

This directory contains the sources to update rpm specfiles anddebian source
control files to generate ``clear-containers-image`` the mini-os image needed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kata-containers-image

``./update_image.sh [VERSION]``

This script will generate and update sources to create
``clear-containers-image`` packages.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kata-containers-image

OSBUILDER_DIR="${SCRIPT_DIR}/osbuilder"

DISTRO="$osbuilder_default_os"
OS_VERSION="$clearlinux_version"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/clear/kata/


DISTRO="$osbuilder_default_os"
OS_VERSION="$clearlinux_version"
CLR_BASE_URL="https://download.clearlinux.org/releases/${clearlinux_version}/clear/x86_64/os/"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clear?

Version: @VERSION@-@RELEASE@
Section: devel
Priority: optional
Maintainer: clear containers team <cc-devel@lists.01.org>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kata?

Maintainer: clear containers team <cc-devel@lists.01.org>
Build-Depends: debhelper (>= 9), flex, bison
Standards-Version: 3.9.6
Homepage: https://clearlinux.org/features/clear-containers
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kata?

Release: %{release}.<B_CNT>
License: Artistic-1.0 BSD-3-Clause BSD-3-Clause-Kata BSD-4-Clause-UC GFDL-1.3 GPL-2.0 GPL-2.0+ GPL-3.0 GPL-3.0+ LGPL-2.0 LGPL-2.0+ LGPL-2.1 LGPL-3.0+ MIT MPL-2.0 Public-Domain
Summary: Kata Containers Image
Url: https://download.clearlinux.org/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kata?

Copy link
Contributor

@jodh-intel jodh-intel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @erick0z - wow, this is a big one! 😄

I appreciate this is WIP but thanks for pushing it anyway.

I've added a few comments but given the size of this PR, I think it's going to take a few rounds to review this fully.

* clear-containers-image_XXXX-XX.dsc
* clear-containers-image.spec

By default, the script will get VERSION specified in the ``versions.txt`` file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For bonus points, you could convert the versions.txt to a versions.yaml as we've done for the runtime:

to the [OBS website] (https://build.opensuse.org/).

* ``OBS_PUSH`` default ``false``
* ``OBS_CC_IMAGE_REPO`` default ``home:clearlinux:preview:clear-containers-staging/clear-containers-image``
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/OBS_CC_IMAGE_REPO/OBS_KATA_IMAGE_REPO/ too.

# else
# echo "Error getting the runtime's version"
# exit 1
# fi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented out code.

VERSION=$kata_osbuilder_version
RELEASE=$(cat release)

BUILD_DISTROS=(Fedora_26 xUbuntu_16.04)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to update these.

kernel/README.md Outdated
packages.

* linux-container.spec
* lnux-container_X.X.XX-XX.dsc
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: linux

dh $@

override_dh_auto_configure:
./configure \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


override_dh_auto_configure:
./configure \
--disable-bluez \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment - this should be calling https://github.com/kata-containers/packaging/blob/master/scripts/configure-hypervisor.sh so we can guarantee debs+rpms are consistent and using the same options as other repos that need to build the hypervisor.

%build
export LANG=C

./configure --disable-bluez \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sed -e "s/@VERSION@/$VERSION/g" \
-e "s/@RELEASE@/$RELEASE/g" \
-e "s/@HASH@/$short_hashtag/g" \
-e "s/@kata_proxy_version@/${kata_proxy_version}+git.${kata_proxy_hash:0:7}-$PROXY_RELEASE/" \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: inconsistent indent.

source ../versions.txt
PACKAGING_DIR=/var/packaging
LOG_DIR=${PACKAGING_DIR}/build_logs
BUILD_ARCH=x86_64
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hard-coded architecture.

@egernst
Copy link
Member

egernst commented Apr 30, 2018

@erick0z -- any updates here? Its been a few days, and really want to make sure we get this in good shape and merged ASAP.

@erick0z
Copy link
Author

erick0z commented Apr 30, 2018

@egernst this is a huge PR, @jcvenegas and I are fine tuning the scripts and preparing the CI. This PR is almost complete, it just need some minor changes.

Copy link
Member

@jcvenegas jcvenegas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the first fixes added new questions

kernel/README.md Outdated
./update_kernel.sh [VERSION]
```

## Update Sequence
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This flow is not valid any more we are building the kernel every PR.

@@ -0,0 +1,155 @@
#!/bin/bash
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not need it a moment, we build the kernel in CI.

<service name="download_url">
<param name="protocol">https</param>
<param name="host">storage.googleapis.com</param>
<param name="path">golang/go@GO_VERSION@.linux-amd64.tar.gz</param>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hard-coded arch

@@ -0,0 +1,24 @@
<services>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add a comment where is documented this xml structure.

<service name="tar_scm">
<param name="scm">git</param>
<param name="url">https://github.com/kata-containers/ksm-throttler.git</param>
<param name="exclude">.git</param>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why need to exclude .git?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't need it, I'll remove it


if [ "$LOCAL_BUILD" == "true" ] && [ "$OBS_PUSH" == "true" ]
then
die "--local-build and --push are mutually exclusive."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this lines are the same in all update files , this can be factorized

*)
echo "ERROR: unknown option $opt"
echo "Try '$0 --help' for more information"
- exit 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with the new script generate qemu options this is not needed

versions.txt Outdated
@@ -0,0 +1,27 @@
kata_runtime_hash=ea789dbab92d7ae55816c923dbedc4085121fde2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this has are needed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed in order to match the source tarball GitHub hash


function set_versions()
{
local commit_hash="$1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing check this variable

AUTHOR_EMAIL=${AUTHOR_EMAIL:-$(git config user.email)}
}

function set_versions()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this function is not clear to me can you add a comment why is needed?

# Parse arguments
cli "$@"

[ "$VERBOSE" == "true" ] && set -x || true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

|| true not needed


[ "$VERBOSE" == "true" ] && set -x || true
PROJECT_REPO=${PROJECT_REPO:-home:katacontainers:release/kata-containers-image}
[ -n "$APIURL" ] && APIURL="-A ${APIURL}" || true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

|| true not needed

kernel/update.sh Outdated
# Parse arguments
cli "$@"

[ "$VERBOSE" == "true" ] && set -x || true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

|| true not needed

kernel/update.sh Outdated

[ "$VERBOSE" == "true" ] && set -x || true
PROJECT_REPO=${PROJECT_REPO:-home:katacontainers:release/linux-container}
[ -n "$APIURL" ] && APIURL="-A ${APIURL}" || true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

|| true not needed

proxy/update.sh Outdated
# Parse arguments
cli "$@"

[ "$VERBOSE" == "true" ] && set -x || true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

|| true not needed

elif [ "$OBS_PUSH" == "true" ]
then
checkout_repo $PROJECT_REPO
obs_push "cc-runtime"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc-runtime?

Dockerfile Outdated
@@ -0,0 +1,22 @@
FROM opensuse:leap

ARG GO_VERSION=${GO_VERSION:-1.8.3}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

go 1.10


sed -e "s/@VERSION@/$VERSION/" \
-e "s/@HASH_TAG@/$short_hashtag/" \
-e "s/@cc_proxy_version@/$proxy_obs_ubuntu_version/" \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not replaced anywhere

-e "s/@HASH_TAG@/$short_hashtag/" \
-e "s/@cc_proxy_version@/$proxy_obs_ubuntu_version/" \
-e "s/@cc_shim_version@/$shim_obs_ubuntu_version/" \
-e "s/@cc_image_version@/$image_obs_ubuntu_version/" \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not in any template

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same that image_obs_ubuntu_version that is note declared in any other place

kata-runtime.dsc-template > kata-runtime.dsc

sed -e "s/@VERSION@/$VERSION/" \
-e "s/@HASH_TAG@/$short_hashtag/" \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HAST_TAG@ is not in any template

@jcvenegas
Copy link
Member

  • sed 's/@KERNEL_VERSION@/4.14.22-1.container/g' linux-container.install
    sed: can't read linux-container.install: No such file or directory

@jcvenegas
Copy link
Member

@erick0z

  • I commented some files that are not part of the kernel directory, add them if they are needed.
  • Could you please remove all the files that are not related with package creation including docs that mention them.


With these files we generated Fedora and Ubuntu packages for this component.

``./update_image.sh [VERSION]``
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove all references to this, not needed for packages

to the [OBS website] (https://build.opensuse.org/).

* ``OBS_PUSH`` default ``false``
* ``OBS_CC_IMAGE_REPO`` default ``home:clearlinux:preview:kata-containers-staging/kata-containers-image``
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CC clearlinux are references to Clear Containers

Debtransform-Tar: kata-containers.tar.gz

Package: kata-containers-image
Architecture: amd64
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question, how does obs handle this to build for multiples archs?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know actually, never done that before.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jcvenegas You can configure that on the OBS site to specify the architectures, or specify on the osc command line while building locally.

cli "$@"

[ "$VERBOSE" == "true" ] && set -x || true
PROJECT_REPO=${PROJECT_REPO:-home:katacontainers:release/ksm-throttler}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move to one variable:
home:
katacontainers -> obs_project?
release -> obs_subproject

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add move the definition to pkglib to avoid repetition

runtime/release Outdated
@@ -0,0 +1 @@
1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I run update.sh I dont see this is incremented could you increment it?

Options:

-l --local-build Build the runtime locally
-w --workdir Repository directory
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a tmp if not defined, could you set in the help this information?


-l --local-build Build the runtime locally
-w --workdir Repository directory
-c --commit-id Build with a given commit ID
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the commit id to the for the project to be packaged? If I change this will move to that commit but keep the version we define that should be the expected version of pkg generated?

-l --local-build Build the runtime locally
-w --workdir Repository directory
-c --commit-id Build with a given commit ID
-b --branch Build with a given branch name
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the difference with the previous flag?

-p --push Push changes to OBS
-a --api-url Especify an OBS API (e.g. custom private OBS)
-r --obs-repository An OBS repository to push the changes.
-w --workdir Directory of a working copy of the OBS runtime repo
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicated

-r --obs-repository An OBS repository to push the changes.
-w --workdir Directory of a working copy of the OBS runtime repo
-v --verbose Set the -x flag for verbosity
-C --clean Clean the repository
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what happend when a repository is cleaned

<param name="scm">git</param>
<param name="url">https://github.com/kata-containers/ksm-throttler.git</param>
<param name="exclude">.git</param>
<param name="filename">kata-ksm-throttler</param>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you add a comment why this is used

<param name="exclude">.git</param>
<param name="filename">kata-ksm-throttler</param>
<param name="versionformat">@VERSION@.git+%h</param>
<param name="revision">@REVISION@</param>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

document what this it

<param name="url">https://github.com/kata-containers/ksm-throttler.git</param>
<param name="exclude">.git</param>
<param name="filename">kata-ksm-throttler</param>
<param name="versionformat">@VERSION@.git+%h</param>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is '%h'?

@@ -0,0 +1,15 @@
Format: 3.0 (quilt)
Source: kata-runtime
Version: @VERSION@+git.@HASH@-@RELEASE@
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add comment what is the format expected by obs

Standards-Version: 3.9.6
Homepage: https://katacontainers.io
Build-Depends: dh-make, git, ca-certificates, execstack, devscripts, debhelper, build-essential, dh-autoreconf, make, dh-modaliases
Debtransform-Tar: cc-runtime-@VERSION@+git.@HASH@.tar.gz
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc-runtime , could you remove this if not needed

Standards-Version: 3.9.6
Homepage: https://katacontainers.io
Build-Depends: debhelper (>= 9), git, ca-certificates, dh-modaliases, execstack, devscripts, dh-make
Debtransform-Tar: kata-shim-@VERSION@+git.@HASH@.tar.gz
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debtransform

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed

KERNEL_RELEASE=$(cat ../kernel/release)
KSM_THROTTLER_RELEASE=$(cat ../ksm-throttler/release)
KATA_CONTAINERS_IMAGE_RELEASE=$(cat ../kata-containers-image/release)
APPORT_HOOK="source_cc-runtime.py"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is never used


[ "$VERBOSE" == "true" ] && set -x
PROJECT_REPO=${PROJECT_REPO:-home:${OBS_PROJECT}:${OBS_SUBPROJECT}/kata-containers-image}
[ -n "$APIURL" ] && APIURL="-A ${APIURL}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we refactor this ?


Name: linux-container
Version: @VERSION@
Release: @RELEASE@.<B_CNT>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

# Automation script to create specs to build clear containers kernel
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kata containers

@jcvenegas
Copy link
Member

Hi erick could I dont see qemu-vanilla as part of the alpha repositories could you enabled it?

@jcvenegas
Copy link
Member

@bergwolf @sboeuf @laijs @egernst what is the default qemu will provide qemu-vanilla or qemu-lite?
IMO we should use as default qemu-lite, but let me know.

@jcvenegas
Copy link
Member

@erick0z we need to change the package name of linux-container to kata-linux-container or kata-kernel
Is it enogh to change the package spec name or we need something else?

tar xzf /usr/src/packages/SOURCES/kata-containers.tar.gz -C /usr/src/packages/SOURCES/
install -D /usr/src/packages/SOURCES/kata-containers-image_@ROOTFS_OS@_agent_@AGENT_SHA@.img ./debian/kata-containers-image/usr/share/kata-containers/
ln -s /usr/share/kata-containers/kata-containers-image_@ROOTFS_OS@_agent_@AGENT_SHA@.img \
./debian/kata-containers-image/usr/share/kata-containers/kata-containers-img
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kata-containers-img wrong link name, kata-containers.img

@jcvenegas
Copy link
Member

@erick0z got

docker: Error response from daemon: OCI runtime create failed: qemu-vanilla-system-x86_64: warning: Number of hotpluggable cpus requested (240) exceeds the recommended cpus supported by KVM (160)
qemu-vanilla-system-x86_64: -device virtio-9p-pci,disable-modern=true,fsdev=extra-9p-kataShared,mount_tag=kataShared: 'virtio-9p-pci' is not a valid device model name: unknown.

in alpha repo using qemu-vanilla

@@ -0,0 +1,2740 @@
#
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we already have a configuration file [1], could you modify these scripts to use it?

[1] - https://github.com/kata-containers/packaging/tree/master/kernel/configs

Package: kata-runtime
Architecture: amd64
Description:
An Open Containers Initiative (OCI) "runtime" that launches an Intel VT-x secured Kata Containers 3.0 hypervisor, rather than a standard Linux container.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove 3.0

kata-proxy (>= @kata_proxy_version@), kata-shim (>= @kata_shim_version@),
kata-ksm-throttler(>= @ksm_throttler_version@)
Description:
An Open Containers Initiative (OCI) "runtime" that launches an Intel VT-x secured Kata Containers 3.0 hypervisor, rather than a standard Linux container.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove 3.0

Package: kata-shim
Architecture: amd64
Description:
kata-shim is a process spawned by the Intel VT-x secured Kata Containers 3.0 runtime per container workload.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove 3.0

Package: kata-shim
Architecture: amd64
Description:
kata-shim is a process spawned by the Intel VT-x secured Kata Containers 3.0 runtime per container workload.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove 3.0

proxy/README.md Outdated
# kata-proxy

This directory contains the sources to create rpm spec files and Debian* source
control files to create the Kata Containers proxy: ``cc-proxy``.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/cc-proxy/kata-proxy/

kernel/README.md Outdated

```bash
export OBS_PUSH=true
export OBS_CC_KERNEL_REPO=home:katacontainers:release/linux-container
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be OBS_KATA_KERNEL_REPO ?

kernel/update.sh Outdated
GENERATED_FILES=(linux-container.dsc linux-container.spec _service config)
STATIC_FILES=(debian.dirs debian.rules debian.compat debian.control debian.copyright debian.series)
STATIC_FILES+=($KR_PATCHES)
OBS_CC_KERNEL_REPO=${OBS_CC_KERNEL_REPO:-home:${OBS_PROJECT}:${OBS_SUBPROJECT}/$PKG_NAME}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OBS_KATA_KERNEL_REPO ?

Description:
kata-proxy works alongside the Kata Containers runtime and shim to provide a VM-based OCI runtime solution.
kata-proxy is a daemon offering access to the hyperstart VM agent to both the runtime and shim processes.
Only a single instance of cc-proxy per host is necessary as it can be used for several different VMs.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kata-proxy?

Description:
kata-proxy works alongside the Kata Containers runtime and shim to provide a VM-based OCI runtime solution.
kata-proxy is a daemon offering access to the hyperstart VM agent to both the runtime and shim processes.
Only a single instance of cc-proxy per host is necessary as it can be used for several different VMs.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kata-proxy?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, we now have a proxy process per VM.

Architecture: amd64
Description:
kata-proxy works alongside the Kata Containers runtime and shim to provide a VM-based OCI runtime solution.
kata-proxy is a daemon offering access to the hyperstart VM agent to both the runtime and shim processes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this say process instead of deamon?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. It used to be correct but now that we spawn a proxy per VM, process makes more sense I think.

proxy/update.sh Outdated
@@ -0,0 +1,79 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add license header

#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

license header missing

@@ -0,0 +1,47 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

license header missing

@@ -0,0 +1,349 @@
#!/bin/bash

# This is a helper library for the setup scripts of each package
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

license header missing

OBS_SUBPROJECT="release"

# BUILD OPTIONS
BUILD_DISTROS=${BUILD_DISTROS:-Fedora_27 xUbuntu_16.04 CentOS_7)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo closing }

Requires: linux-container >= @linux_container_version@
Requires: kata-proxy >= @kata_proxy_version@
Requires: kata-shim >= @kata_shim_version@
Requires: kata-ksm-throttler >= @ksm_throttler_version@
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing Requries: qemu-lite

@GabyCT
Copy link
Contributor

GabyCT commented May 7, 2018

<param name="path">golang/go@GO_VERSION@.linux-amd64.tar.gz</param>
</service>
<service name="verify_file">
<param name="file">_service:download_url:go@GO_VERSION@.linux-amd64.tar.gz</param>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And again here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This are a diffcult according to @erick0z , this is a URL that will download OBS, being a variable or not will be possible to just upload one go, OBS will try to use the go we provide in the tarball but depedning in the build target, it will be a x86_64 VM or other architecture. We may need to rework this to add an URL for each distro we support?

Dockerfile Outdated

# Get OBS client, plugins and dependencies
RUN zypper -n install osc-plugin-install vim curl bsdtar git sudo pcre-tools
RUN curl -OkL https://download.opensuse.org/repositories/openSUSE:Tools/openSUSE_42.3/openSUSE:Tools.repo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you define a variable at the top for this 42.3 version number?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure!

Dockerfile Outdated
obs-service-download_url

# Set Go environment
RUN curl -OL https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And another variable for the arch here and below.

build_all.sh Outdated

script_dir=$(dirname "$0")
projects=(
qemu-lite
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: would be nice if this list was sorted ;)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did it in that order because qemu and the kernel takes longer to build in OBS, so give it a bit more time to try the finish in a similar time. Added comments now.

AGENT_VERSION=$AGENT_SHA \
IMG_OS_VERSION=$IMG_OS_VERSION \
DISTRO_ROOTFS="${PWD}/rootfs-image" \
BASE_URL=$CLR_BASE_URL
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit difficult to see this, but I think that this will only work for clr since although DISTRO might not be clearlinux, the BASE_URL and IMG_OS_VERSION will only apply to clr?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this is true, Ideally this should come from data from versions.yaml from runtime. I'll open an issue for this.

override_dh_auto_build:
sed -i "s/^EXTRAVERSION.*/EXTRAVERSION = -$$(echo $(KernelVer) | cut -d'-' -f2)/" Makefile
cp /usr/src/packages/SOURCES/config .config
make -s ARCH=x86_64 oldconfig > /dev/null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hard-coded arch.

sed -i "s/^EXTRAVERSION.*/EXTRAVERSION = -$$(echo $(KernelVer) | cut -d'-' -f2)/" Makefile
cp /usr/src/packages/SOURCES/config .config
make -s ARCH=x86_64 oldconfig > /dev/null
make -s CONFIG_DEBUG_SECTION_MISMATCH=y ARCH=x86_64 -j4 all
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another hard-coded arch.

Architecture: amd64
Description:
kata-proxy works alongside the Kata Containers runtime and shim to provide a VM-based OCI runtime solution.
kata-proxy is a daemon offering access to the hyperstart VM agent to both the runtime and shim processes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. It used to be correct but now that we spawn a proxy per VM, process makes more sense I think.

%global IMPORTNAME %{DOMAIN}/%{ORG}/%{PROJECT}
%global GO_VERSION @GO_VERSION@

%global DEFAULT_QEMU qemu-lite-system-x86_64
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hard-coded arch.

local action="$2"
local action="$1"
local _array=("$@")
_array=("${_array[@]:1}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, black magic! 😄 Is this to overcome the centos bash version issue? Ah yes, I see from 88119f1 that it was. Could you therefore add a "Fixes #27" comment to that commit for clarity?

@jodh-intel
Copy link
Contributor

Hi @erick0z, @jcvenegas - this is looking good - just a few relatively minor and quick fixes remain I think?

Also, we could consider defer fixing the hard-coded architecutre in files like debian.control for the time being to allow us to have a workable system for a single arch atleast. wdyt @egernst?

[ ! -f "${SCRIPT_DIR}/kata-containers.tar.gz" ] && die "No kata-containers.tar.gz found!\nUse the build_image.sh script" || echo "Image: OK"
}

sed -i s/"kata_vm_image_version=${kata_vm_image_version}"/"kata_vm_image_version=${VERSION}"/ ${SCRIPT_DIR}/../versions.txt
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

before approve this PR, why is needed this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this used to be cc_vm_image_version and was used to record the latest Clear Linux release our clear-containers-image package was based on.

However, now that osbuilder supports different distros and different agent configurations, I don't think we actually need to do this any more. Particularly, since we now create a summary file inside the image:

... the details of which are recorded when the user runs kata-collect-data.sh:

@jcvenegas
Copy link
Member

@jodh-intel @egernst please take a new look, I still need to remove the arch hard-coded bits from the golang installation.

But after 100 commits, we now have 74 and not more than 130 :)

we probably could reduce even more the amount of files, but at this point makes me wonder if is easier rewrite it in go or keep refactoring.

One big missing thing is to try to use the yaml from runtime repository. But that could go in other PR. I am trying to reduce the complexity of this PR.

So for new PRs we should

  • Use yaml from runtime ( nice to not need to modify paste versions and hashes in versions.txt)
  • Fix build for fedora 28 and ubuntu 18 (both are broken due to gcc newer versions and qemu), just need to add a patch to qemu.
  • Fix Centos builds, recently all the centos builds fails due to linker errors.
  • Have a solution for qemu package for distros that had old gcc versions.

@jodh-intel
Copy link
Contributor

Hi @jcvenegas - thanks for continuing to refine this. It is a huge and complex PR, and yes, I think we could refactor some things later (like the arch issue).

However, I think that given:

  • it works for you
  • it is based on what we used for Clear Containers

... we can land this once you and @egernst are happy 😄

My only other thoughts:

  • I'd be tempted to merge all the commits into a single one tbh (we'll still have the comment/review history here on github but even 100 commits is pretty big ;)
  • Can we create a minimal README to explain how to actually use all this code? We had one for CC so we need something equivalent:
    https://github.com/clearcontainers/packaging/blob/master/README.rst
    Once we have this, we can update the release checklist with pointers to the relevant sections in the README.md.

versions.txt Outdated
ksm_throttler_hash=fd007eac8165b6f1d0d053984f7fd4d5d60f6210
qemu_lite_hash=6ba2bfbee9a80bfd03605c5eb2ca743c8b68389e
qemu_vanilla_hash=e3050471ff1daa7fefe88388dfa4e1d97ba1f0bc
kata_osbuilder_hash=2b2b68d6fad1daa387b4695c74b3a4a297d31d83
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not used in any script

Copy link
Member

@jcvenegas jcvenegas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets keep fixing with new PRs.

@jcvenegas jcvenegas changed the title WIP: packages: Add spec files and update scripts packages: Add spec files and update scripts May 14, 2018
This commit adds the necessary spec files and scripts in order to be able to create
packages in OBS (Open Build System) and locally.

Fixes #15

Signed-off-by: Erick Cardona <erick.cardona.ruiz@intel.com>
Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
@jcvenegas jcvenegas merged commit 3295f8a into kata-containers:master May 14, 2018
bergwolf added a commit that referenced this pull request Jan 3, 2019
Reverts #269

The added kernel patch doesn't apply and is causing all CI to fail. FYI, the current guest kernel version is 4.14.67. Please rebase and re-submit your PR cleanly @Pennyzct.

e.g., http://jenkins.katacontainers.io/job/kata-containers-runtime-centos-7-4-PR/995/console

NFO: Applying patch /tmp/jenkins/workspace/kata-containers-runtime-centos-7-4-PR/go/src/github.com/kata-containers/packaging/kernel/patches/0003-backport-Arm64-KVM-Dynamic-IPA-and-52bit-IPA-support.patch
patching file arch/arm/include/asm/kvm_arm.h
patching file arch/arm/include/asm/kvm_host.h
Hunk #1 succeeded at 266 (offset -7 lines).
Hunk #2 succeeded at 314 with fuzz 2 (offset -40 lines).
patching file arch/arm/include/asm/kvm_mmu.h
Hunk #1 FAILED at 35.
Hunk #2 succeeded at 47 with fuzz 2 (offset -5 lines).
Hunk #3 succeeded at 266 with fuzz 2 (offset -96 lines).
1 out of 3 hunks FAILED -- saving rejects to file arch/arm/include/asm/kvm_mmu.h.rej
patching file arch/arm/include/asm/stage2_pgtable.h
patching file arch/arm64/include/asm/cpufeature.h
Hunk #1 FAILED at 262.
Hunk #2 succeeded at 284 (offset -246 lines).
1 out of 2 hunks FAILED -- saving rejects to file arch/arm64/include/asm/cpufeature.h.rej
patching file arch/arm64/include/asm/kvm_arm.h
Hunk #1 succeeded at 102 (offset -5 lines).
Hunk #2 succeeded at 116 (offset -5 lines).
Hunk #3 succeeded at 305 (offset -7 lines).
patching file arch/arm64/include/asm/kvm_asm.h
Hunk #1 succeeded at 27 (offset -3 lines).
Hunk #2 FAILED at 73.
1 out of 2 hunks FAILED -- saving rejects to file arch/arm64/include/asm/kvm_asm.h.rej
patching file arch/arm64/include/asm/kvm_host.h
Hunk #1 succeeded at 48 (offset -5 lines).
Hunk #2 FAILED at 61.
Hunk #3 succeeded at 399 with fuzz 2 (offset -41 lines).
Hunk #4 FAILED at 503.
2 out of 4 hunks FAILED -- saving rejects to file arch/arm64/include/asm/kvm_host.h.rej
patching file arch/arm64/include/asm/kvm_hyp.h
patching file arch/arm64/include/asm/kvm_mmu.h
Hunk #1 succeeded at 154 (offset 13 lines).
Hunk #2 succeeded at 229 with fuzz 1 (offset -17 lines).
Hunk #3 succeeded at 409 with fuzz 2 (offset -110 lines).
patching file arch/arm64/include/asm/stage2_pgtable-nopmd.h
patching file arch/arm64/include/asm/stage2_pgtable-nopud.h
patching file arch/arm64/include/asm/stage2_pgtable.h
patching file arch/arm64/kvm/guest.c
Hunk #1 succeeded at 305 (offset -86 lines).
patching file arch/arm64/kvm/hyp-init.S
Hunk #1 FAILED at 65.
1 out of 1 hunk FAILED -- saving rejects to file arch/arm64/kvm/hyp-init.S.rej
patching file arch/arm64/kvm/hyp/Makefile
Hunk #1 succeeded at 18 (offset -1 lines).
patching file arch/arm64/kvm/hyp/s2-setup.c
Reversed (or previously applied) patch detected! Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file arch/arm64/kvm/hyp/s2-setup.c.rej
patching file arch/arm64/kvm/hyp/switch.c
Hunk #1 FAILED at 198.
Hunk #2 succeeded at 226 (offset -37 lines).
1 out of 2 hunks FAILED -- saving rejects to file arch/arm64/kvm/hyp/switch.c.rej
patching file arch/arm64/kvm/hyp/tlb.c
Hunk #1 succeeded at 29 (offset -1 lines).
Hunk #2 succeeded at 38 (offset -1 lines).
patching file arch/arm64/kvm/reset.c
Hunk #4 FAILED at 86.
Hunk #5 succeeded at 133 (offset -4 lines).
1 out of 5 hunks FAILED -- saving rejects to file arch/arm64/kvm/reset.c.rej
patching file include/linux/irqchip/arm-gic-v3.h
Hunk #1 succeeded at 374 (offset -14 lines).
patching file include/uapi/linux/kvm.h
Hunk #1 succeeded at 739 (offset -11 lines).
Hunk #2 FAILED at 962.
1 out of 2 hunks FAILED -- saving rejects to file include/uapi/linux/kvm.h.rej
patching file virt/kvm/arm/arm.c
Hunk #1 succeeded at 115 (offset -5 lines).
Hunk #2 succeeded at 207 (offset -6 lines).
Hunk #3 succeeded at 236 (offset -6 lines).
Hunk #4 succeeded at 463 (offset -35 lines).
Hunk #5 FAILED at 546.
Hunk #6 succeeded at 1164 with fuzz 2 (offset -145 lines).
Hunk #7 succeeded at 1261 (offset -147 lines).
1 out of 7 hunks FAILED -- saving rejects to file virt/kvm/arm/arm.c.rej
patching file virt/kvm/arm/mmu.c
Hunk #1 succeeded at 43 with fuzz 2 (offset -2 lines).
Hunk #2 succeeded at 147 (offset -2 lines).
Hunk #3 succeeded at 216 (offset -35 lines).
Hunk #4 succeeded at 226 (offset -35 lines).
Hunk #5 succeeded at 245 (offset -35 lines).
Hunk #6 succeeded at 255 (offset -35 lines).
Hunk #7 succeeded at 272 (offset -35 lines).
Hunk #8 succeeded at 371 with fuzz 2 (offset 40 lines).
Hunk #9 FAILED at 340.
Hunk #10 FAILED at 370.
Hunk #11 FAILED at 388.
Hunk #12 FAILED at 408.
Hunk #13 succeeded at 753 (offset -143 lines).
Hunk #14 succeeded at 842 (offset -143 lines).
Hunk #15 succeeded at 850 (offset -143 lines).
Hunk #16 succeeded at 859 (offset -143 lines).
Hunk #17 succeeded at 881 (offset -143 lines).
Hunk #18 succeeded at 1024 (offset -182 lines).
Hunk #19 succeeded at 1114 (offset -188 lines).
Hunk #20 succeeded at 1148 (offset -188 lines).
Hunk #21 succeeded at 1176 (offset -188 lines).
Hunk #22 succeeded at 1190 (offset -188 lines).
Hunk #23 succeeded at 1333 (offset -196 lines).
Hunk #24 succeeded at 1552 (offset -220 lines).
Hunk #25 succeeded at 1852 (offset -219 lines).
4 out of 25 hunks FAILED -- saving rejects to file virt/kvm/arm/mmu.c.rej
patching file virt/kvm/arm/vgic/vgic-its.c
Hunk #1 succeeded at 233 (offset -8 lines).
Hunk #2 succeeded at 696 (offset -56 lines).
Hunk #3 succeeded at 721 (offset -56 lines).
Hunk #4 succeeded at 736 (offset -56 lines).
Hunk #5 succeeded at 746 (offset -56 lines).
Hunk #6 succeeded at 1214 (offset -80 lines).
Hunk #7 succeeded at 1232 (offset -80 lines).
Hunk #8 succeeded at 1279 (offset -80 lines).
Hunk #9 succeeded at 2135 (offset -82 lines).
Hunk #10 succeeded at 2207 (offset -82 lines).
Hunk #11 succeeded at 2256 (offset -82 lines).
patching file virt/kvm/arm/vgic/vgic-mmio-v3.c
Hunk #1 succeeded at 326 (offset -38 lines).
Hunk #2 succeeded at 343 (offset -38 lines).
Build step 'Execute shell' marked build as failure
Performing Post build task...
Match found for :.* : True
Logical operation result is TRUE
Running script : #!/bin/bash

Fixes: #296
Signed-off-by: Peng Tao <bergwolf@gmail.com>
bergwolf added a commit that referenced this pull request Jan 4, 2019
Reverts #269

The added kernel patch doesn't apply and is causing all CI to fail. FYI, the current guest kernel version is 4.14.67. Please rebase and re-submit your PR cleanly @Pennyzct.

e.g., http://jenkins.katacontainers.io/job/kata-containers-runtime-centos-7-4-PR/995/console

NFO: Applying patch /tmp/jenkins/workspace/kata-containers-runtime-centos-7-4-PR/go/src/github.com/kata-containers/packaging/kernel/patches/0003-backport-Arm64-KVM-Dynamic-IPA-and-52bit-IPA-support.patch
patching file arch/arm/include/asm/kvm_arm.h
patching file arch/arm/include/asm/kvm_host.h
Hunk #1 succeeded at 266 (offset -7 lines).
Hunk #2 succeeded at 314 with fuzz 2 (offset -40 lines).
patching file arch/arm/include/asm/kvm_mmu.h
Hunk #1 FAILED at 35.
Hunk #2 succeeded at 47 with fuzz 2 (offset -5 lines).
Hunk #3 succeeded at 266 with fuzz 2 (offset -96 lines).
1 out of 3 hunks FAILED -- saving rejects to file arch/arm/include/asm/kvm_mmu.h.rej
patching file arch/arm/include/asm/stage2_pgtable.h
patching file arch/arm64/include/asm/cpufeature.h
Hunk #1 FAILED at 262.
Hunk #2 succeeded at 284 (offset -246 lines).
1 out of 2 hunks FAILED -- saving rejects to file arch/arm64/include/asm/cpufeature.h.rej
patching file arch/arm64/include/asm/kvm_arm.h
Hunk #1 succeeded at 102 (offset -5 lines).
Hunk #2 succeeded at 116 (offset -5 lines).
Hunk #3 succeeded at 305 (offset -7 lines).
patching file arch/arm64/include/asm/kvm_asm.h
Hunk #1 succeeded at 27 (offset -3 lines).
Hunk #2 FAILED at 73.
1 out of 2 hunks FAILED -- saving rejects to file arch/arm64/include/asm/kvm_asm.h.rej
patching file arch/arm64/include/asm/kvm_host.h
Hunk #1 succeeded at 48 (offset -5 lines).
Hunk #2 FAILED at 61.
Hunk #3 succeeded at 399 with fuzz 2 (offset -41 lines).
Hunk #4 FAILED at 503.
2 out of 4 hunks FAILED -- saving rejects to file arch/arm64/include/asm/kvm_host.h.rej
patching file arch/arm64/include/asm/kvm_hyp.h
patching file arch/arm64/include/asm/kvm_mmu.h
Hunk #1 succeeded at 154 (offset 13 lines).
Hunk #2 succeeded at 229 with fuzz 1 (offset -17 lines).
Hunk #3 succeeded at 409 with fuzz 2 (offset -110 lines).
patching file arch/arm64/include/asm/stage2_pgtable-nopmd.h
patching file arch/arm64/include/asm/stage2_pgtable-nopud.h
patching file arch/arm64/include/asm/stage2_pgtable.h
patching file arch/arm64/kvm/guest.c
Hunk #1 succeeded at 305 (offset -86 lines).
patching file arch/arm64/kvm/hyp-init.S
Hunk #1 FAILED at 65.
1 out of 1 hunk FAILED -- saving rejects to file arch/arm64/kvm/hyp-init.S.rej
patching file arch/arm64/kvm/hyp/Makefile
Hunk #1 succeeded at 18 (offset -1 lines).
patching file arch/arm64/kvm/hyp/s2-setup.c
Reversed (or previously applied) patch detected! Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file arch/arm64/kvm/hyp/s2-setup.c.rej
patching file arch/arm64/kvm/hyp/switch.c
Hunk #1 FAILED at 198.
Hunk #2 succeeded at 226 (offset -37 lines).
1 out of 2 hunks FAILED -- saving rejects to file arch/arm64/kvm/hyp/switch.c.rej
patching file arch/arm64/kvm/hyp/tlb.c
Hunk #1 succeeded at 29 (offset -1 lines).
Hunk #2 succeeded at 38 (offset -1 lines).
patching file arch/arm64/kvm/reset.c
Hunk #4 FAILED at 86.
Hunk #5 succeeded at 133 (offset -4 lines).
1 out of 5 hunks FAILED -- saving rejects to file arch/arm64/kvm/reset.c.rej
patching file include/linux/irqchip/arm-gic-v3.h
Hunk #1 succeeded at 374 (offset -14 lines).
patching file include/uapi/linux/kvm.h
Hunk #1 succeeded at 739 (offset -11 lines).
Hunk #2 FAILED at 962.
1 out of 2 hunks FAILED -- saving rejects to file include/uapi/linux/kvm.h.rej
patching file virt/kvm/arm/arm.c
Hunk #1 succeeded at 115 (offset -5 lines).
Hunk #2 succeeded at 207 (offset -6 lines).
Hunk #3 succeeded at 236 (offset -6 lines).
Hunk #4 succeeded at 463 (offset -35 lines).
Hunk #5 FAILED at 546.
Hunk #6 succeeded at 1164 with fuzz 2 (offset -145 lines).
Hunk #7 succeeded at 1261 (offset -147 lines).
1 out of 7 hunks FAILED -- saving rejects to file virt/kvm/arm/arm.c.rej
patching file virt/kvm/arm/mmu.c
Hunk #1 succeeded at 43 with fuzz 2 (offset -2 lines).
Hunk #2 succeeded at 147 (offset -2 lines).
Hunk #3 succeeded at 216 (offset -35 lines).
Hunk #4 succeeded at 226 (offset -35 lines).
Hunk #5 succeeded at 245 (offset -35 lines).
Hunk #6 succeeded at 255 (offset -35 lines).
Hunk #7 succeeded at 272 (offset -35 lines).
Hunk #8 succeeded at 371 with fuzz 2 (offset 40 lines).
Hunk #9 FAILED at 340.
Hunk #10 FAILED at 370.
Hunk #11 FAILED at 388.
Hunk #12 FAILED at 408.
Hunk #13 succeeded at 753 (offset -143 lines).
Hunk #14 succeeded at 842 (offset -143 lines).
Hunk #15 succeeded at 850 (offset -143 lines).
Hunk #16 succeeded at 859 (offset -143 lines).
Hunk #17 succeeded at 881 (offset -143 lines).
Hunk #18 succeeded at 1024 (offset -182 lines).
Hunk #19 succeeded at 1114 (offset -188 lines).
Hunk #20 succeeded at 1148 (offset -188 lines).
Hunk #21 succeeded at 1176 (offset -188 lines).
Hunk #22 succeeded at 1190 (offset -188 lines).
Hunk #23 succeeded at 1333 (offset -196 lines).
Hunk #24 succeeded at 1552 (offset -220 lines).
Hunk #25 succeeded at 1852 (offset -219 lines).
4 out of 25 hunks FAILED -- saving rejects to file virt/kvm/arm/mmu.c.rej
patching file virt/kvm/arm/vgic/vgic-its.c
Hunk #1 succeeded at 233 (offset -8 lines).
Hunk #2 succeeded at 696 (offset -56 lines).
Hunk #3 succeeded at 721 (offset -56 lines).
Hunk #4 succeeded at 736 (offset -56 lines).
Hunk #5 succeeded at 746 (offset -56 lines).
Hunk #6 succeeded at 1214 (offset -80 lines).
Hunk #7 succeeded at 1232 (offset -80 lines).
Hunk #8 succeeded at 1279 (offset -80 lines).
Hunk #9 succeeded at 2135 (offset -82 lines).
Hunk #10 succeeded at 2207 (offset -82 lines).
Hunk #11 succeeded at 2256 (offset -82 lines).
patching file virt/kvm/arm/vgic/vgic-mmio-v3.c
Hunk #1 succeeded at 326 (offset -38 lines).
Hunk #2 succeeded at 343 (offset -38 lines).
Build step 'Execute shell' marked build as failure
Performing Post build task...
Match found for :.* : True
Logical operation result is TRUE
Running script : #!/bin/bash

Fixes: #296
Signed-off-by: Peng Tao <bergwolf@gmail.com>
jcvenegas pushed a commit that referenced this pull request Jul 2, 2019
Changed the `rootfs.sh` script to exit with an error if `GOPATH` isn't set
in the environment.

Fixes #20.

Signed-off-by: Harshal Patil <harshal.patil@in.ibm.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants