Allow to override build date with SOURCE_DATE_EPOCH
in order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.
Also use UTC to be independent of timezone.
This date call only works with GNU date.
Without this patch, kata-containers-initrd.img contained
varying var/lib/osbuilder/osbuilder.yaml with
version: "1.9.0-alpha0"
-rootfs-creation-time: "2019-08-06T18:40:27.402493939+0000Z"
+rootfs-creation-time: "2034-09-08T07:57:34.386990704+0000Z"
Fixes#340
Signed-off-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
kata-agent is moved to /sbin/init when AGENT_INIT is yes. Check
/sbin/init exists and it's not systemd
fixes#322
Signed-off-by: Julio Montes <julio.montes@intel.com>
Use .ci/setup.sh from tests repo, to make sure spell check packages are
correctly installed for the OS under test.
Signed-off-by: Marco Vedovati <mvedovati@suse.com>
While calculating directory size in imagebuild script, we shoul use
`df -BM` instead of `df -h` to keep Mb format.
Fixes#336
image-builder: get mount directory size with Mb format
Signed-off-by: ClarkLee <clarklee1992@hotmail.com>
Add the option to build image and initrd using dracut.
Fixes: #311
Suggested-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Marco Vedovati <mvedovati@suse.com>
For some reason, busybox image crashed on fedora 30 rootfs on aarch64.
For now, we will switch back to use fedora 28.
Fixes: #334
Signed-off-by: Penny Zheng <penny.zheng@arm.com>
Move some of the functions in rootfs.sh (generate_dockerfile,
detect_go_version) in scripts/lib.sh, to make those functions reusable
outside of rootfs.sh.
Signed-off-by: Marco Vedovati <mvedovati@suse.com>
- rootfs: upgrade docker images for fedora
- rootfs: Make sure etc exists.
edb770e rootfs: upgrade docker images for fedora
27dddf0 rootfs: Make sure etc exists.
Signed-off-by: Eric Ernst <eric.ernst@intel.com>
Add the use case of provisioning an existing rootfs directory with the
components / configurations needed to generate a Kata compatible images.
This supports use cases such as using a rootfs built outside of
osbuilder, and providing a overlay for dracut built initrds.
Signed-off-by: Marco Vedovati <mvedovati@suse.com>
When the rootfs creation is used for PRs there is
not a match with a kata runtime version, in this
case lets clone the runtime repository and checkout
to the kata branch target. If is already cloned
this mean this was set by depens-on script or the user.
Fixes: #326
Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
We are seeing sporadic failures in the rootfs creation as listed here:
https://github.com/kata-containers/tests/issues/1744
While this cannot be reproduced locally, there is no reason
for the failure to write to $ROOTFS_DIR/etc/chrony.conf unless the upper
directories are missing as this file should be created if it did not
exist earier.
So just create the etc directory to test out if we see these sporadic
failures in the CI.
Fixes#328
Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
- rootfs: configure chronyc service with makestep
- agent: detect required Go version from versions.yaml
- rootfs-builder: exclude unsupported archs from euleros and clearlinux
- tests: reduce the amount of log displayed
- chrony: Configure chrony to start only when /dev/ptp0 exists.
- rootfs: install systemd tmp.mount if needed
5a5ffa4 rootfs-builder: exclude unsupported archs from euleros
7dc15c2 rootfs-builder: exclude unsupported archs from clearlinux
d2e80f5 chrony: Configure chrony to start only when /dev/ptp0 exists.
6969c7f rootfs: install systemd tmp.mount if needed
add0d44 rootfs: configure chronyc service with makestep
cc5df05 travis: do not set -x when running test
25d75e5 tests: reduce the amount of log displayed
acc9c7f tests: identify the distros with build failures
68f2090 make: add ability to silent recipe commands with chronic
cbb8c01 make: add print-% target printing variable value
e770e2a rootfs: enforce minimum Go version when building locally
92b42c7 agent: detect required Go version from versions.yaml
Signed-off-by: katacontainersbot <katacontainersbot@gmail.com>
For euleros, it has supported aarch64 starting from v2.3,
but here is the sad part, there existed bugs in their 2.3.x image,
this bug existed in both x86_64 and aarch64 image.
related issue euleros/euleros-docker-images/#13
(https://github.com/euleros/euleros-docker-images/issues/13) has been raised.
Fixes: #320
Signed-off-by: Penny Zheng <penny.zheng@arm.com>
Hypercall to implement virtual PTP was introduced in kernel 4.10
Have chrony run only if the device created by kvm-ptp exists.
Add this as a ConditionExists in the systemd service file.
This service if named as chrony.service in deb based distributions
rather than chronyd.service, although a systemd alias exists.
However it is not possible to come up with a generic `PATH` systemd
unit relying on the alias.
Fixes#308
Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
On some distros (Debian, Ubuntu, openSUSE), tmp.mount is not
installed by default in /[etc|usr/lib]/systemd/system, but
just in /usr/shared/systemd, so it needs to be manually copied
there to have /tmp mounted as tmpfs.
Fixes: #317
Signed-off-by: Marco Vedovati <mvedovati@suse.com>
The current chrony service does not step the system clock,
so add the modification to do this if the adjustment is
larger than one second
Fixes: #316
Signed-off-by: Yang, Wei <wei.yang1@linux.alibaba.com>
Do not `set -x` when running tests with Travis: tests are alreadyu doing
it, and with chronic logs are shown only if the commands executed fails.
Signed-off-by: Marco Vedovati <mvedovati@suse.com>
Reduce the amount of logs displayed when running test. This is achieved
calling commands using chronic, and printing extra information about
the Kata / Docker configuration only if a test fails to start a
container.
Fixes: #145
Signed-off-by: Marco Vedovati <mvedovati@suse.com>
Make more obvious what distros failed to build printing out for each
distro the success / failure build state.
Signed-off-by: Marco Vedovati <mvedovati@suse.com>
Add the ability to silent recipe commands with chronic.
When OSBUILDER_USE_CHRONIC is set, the target recipe command is run
using chronic, and the output is muted unless the command fails.
Signed-off-by: Marco Vedovati <mvedovati@suse.com>
Add a print-% make target, to be able to retrieve the value of make
variables.
E.g. "make print-MY_MAKE_VAR MY_MAKE_VAR=1" will print "1"
Signed-off-by: Marco Vedovati <mvedovati@suse.com>