Commit Graph

5851 Commits

Author SHA1 Message Date
Ian Campbell
e8e28c27e9 Bump packages to new alpine w/ containerd v1.1.0-rc.2
Since we are building containerd v1.1.0 with go 1.10 (as it requires) to the
same for init and runc too for consistency. In the case of init it is actually
required since we use the containerd client library there.

The subreaper interfaces have been removed from containerd and replaced with a
similar interface in runc/libcontainer, update init to use that now.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-04-18 11:27:03 +01:00
Ian Campbell
6a4d0df63c alpine: Bump to containerd v1.1.0-rc.2
Requires libseccomp-dev and the go1.10 package

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-04-18 06:25:55 -04:00
Rolf Neugebauer
34e6bc3632
Merge pull request #3005 from rn/crosvm
contrib: Notes and build support for crosvm
2018-04-17 16:21:28 +01:00
Justin Cormack
5e9b5718aa
Merge pull request #3004 from justincormack/ima-prelim
Some kernel builds need openssl binary for key generation
2018-04-17 15:47:36 +01:00
Rolf Neugebauer
d2fab1f7cb contrib: Notes and build support for crosvm
crosvm is a VMM written on Rust which can run the device
backends in secomp isolated processes.

This adds build support for crosvm for x86 and arm64 as well
as some instructions on how to run LinuxKit built images on crosvm.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-17 14:51:20 +01:00
Justin Cormack
ccd9d711c0
Some kernel builds need openssl binary for key generation
For example kernel module signatures if you do not provide a key. So add
to the dependencies for kernel builds.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-04-17 14:16:13 +01:00
Rolf Neugebauer
0b5303cc66
Merge pull request #3003 from zx2c4-forks/wireguard-bump
wireguard: upgrade to 0.0.20180413
2018-04-17 08:17:29 +01:00
Jason A. Donenfeld
60fd3c062e wireguard: upgrade to 0.0.20180413
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-04-17 00:18:42 +02:00
Rolf Neugebauer
5778903cf1
Merge pull request #3002 from rn/squashfssupport
Support building and running with SquashFS root filesystem
2018-04-16 21:01:09 +01:00
Rolf Neugebauer
c1447193b3 tests: Add build/qemu/hyperkit tests for kernel+squashfs
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-16 18:39:32 +01:00
Rolf Neugebauer
59df6426e4 docs: Update qemu documentation
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-16 18:39:32 +01:00
Rolf Neugebauer
67a0664e50 docs: Update hyperkit documentation
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-16 18:39:32 +01:00
Rolf Neugebauer
0b5ea3fcc3 cmd: Add support for kernel+squashfs to the qemu runner
Unlike the hyperkit runner, the qemu runner already had better
support for auto-detecting the boot method so the changes
are less invasive (and backward compatible).

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-16 18:39:32 +01:00
Rolf Neugebauer
0e3c88d47c cmd: Add support for squashfs root filesystem to hyperkit runnner
Previous commits added support for building 'kernel+squashfs'.
This commit adds support for booting this build format on hyperkit.

The changes are a little bigger because some restructuring of the
code was required to support a third (after kernel+initrd and EFI
ISO) boot method.

To keep the code simpler this commit also removes some auto-detection
code for ISO booting. Users now have to specify '-iso -uefi' on the
command line to boot an EFI ISO. Previously, only '-uefi' was
required.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-16 18:39:31 +01:00
Rolf Neugebauer
c26a83011d vendor: Update hyperkit go bindings
This contains a small fix to the disk binadings and allows
booting with a kernel alone (no initrd).

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-16 18:39:31 +01:00
Rolf Neugebauer
ccb0007947 cmd: Register local mkimage- images with the vendored moby tool
This allows us to update tags for these locally without having
to re-vendor.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-16 18:39:31 +01:00
Rolf Neugebauer
69679d1db7 vendor: Update moby/tool vendoring
This includes two improvements:
- being able to specify the packages used for building images
- support for building squashfs images.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-16 18:39:31 +01:00
Rolf Neugebauer
c0377bf343 tools: Add mkimage-squashfs
This utility image takes a tarball as input and places the
contents into a read-only, compressed squashfs filesystem
which is produced on stdout.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-16 18:39:31 +01:00
Rolf Neugebauer
11db895b65
Merge pull request #3001 from rn/kup
Update to kernels to 4.9.94 and 4.4.128
2018-04-14 17:38:17 +01:00
Rolf Neugebauer
c675f1d214 Update YAMLs to latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-04-14 12:21:53 +01:00
Rolf Neugebauer
ae6a739ac0 kernel: Skip compiling perf for 4.9.x
4.9.93 broke the compile:

  tests/code-reading.c: In function 'read_object_code':
  tests/code-reading.c:228:19: error: 'KMOD_DECOMP_LEN' undeclared (first use in this function)
    char decomp_name[KMOD_DECOMP_LEN];
                     ^~~~~~~~~~~~~~~
  tests/code-reading.c:228:19: note: each undeclared identifier is reported only once for each function it appears in
  tests/code-reading.c:291:7: error: implicit declaration of function 'dso__decompress_kmodule_path' [-Werror=implicit-function-declaration]
    if (dso__decompress_kmodule_path(al.map->dso, objdump_name,
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  tests/code-reading.c:291:3: error: nested extern declaration of 'dso__decompress_kmodule_path' [-Werror=nested-externs]
    if (dso__decompress_kmodule_path(al.map->dso, objdump_name,
    ^~
  tests/code-reading.c:228:7: error: unused variable 'decomp_name' [-Werror=unused-variable]
    char decomp_name[KMOD_DECOMP_LEN];
         ^~~~~~~~~~~
  cc1: all warnings being treated as errors
  mv: can't rename '/build/perf/tests/.code-reading.o.tmp': No such file or directory
  make[3]: *** [/linux/tools/build/Makefile.build:101: /build/perf/tests/code-reading.o] Error 1
  make[3]: *** Waiting for unfinished jobs....
  make[2]: *** [/linux/tools/build/Makefile.build:144: tests] Error 2
  make[2]: *** Waiting for unfinished jobs....
  make[2]: *** [/linux/tools/build/Makefile.build:144: util] Error 2
  make[1]: *** [Makefile.perf:559: /build/perf/libperf-in.o] Error 2
  make[1]: *** Waiting for unfinished jobs....
  make[1]: *** [Makefile.perf:396: /build/perf/perf-in.o] Error 2
  make: *** [Makefile:69: all] Error 2
  make: Leaving directory '/linux/tools/perf'

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-04-14 12:21:53 +01:00
Rolf Neugebauer
054b9bb924 kernel: Update to 4.9.94/4.4.128
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-04-14 11:18:33 +01:00
Justin Cormack
8a11bf255d
Merge pull request #3000 from rn/kernel-up
Kenrel update to 4.16.2/4.15.17/4.14.34 plus MPLS_ROUTING/IPTUNNEL
2018-04-14 10:16:35 +01:00
Rolf Neugebauer
ed48e5adad Update YAML files to latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-13 17:13:08 +01:00
Rolf Neugebauer
4454c7b854 kernel: Enable MPLS_ROUTING and MPLS_IPTUNNEL as modules
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-13 15:21:57 +01:00
Rolf Neugebauer
d1b73f7cf3 kernel: Update to 4.16.2/4.15.17/4.14.34
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-13 14:53:19 +01:00
Rolf Neugebauer
78e0305666
Merge pull request #2996 from ijc/init-no-spurious-tty-files
Avoid writing to tty devices which don't actually exist.
2018-04-09 15:28:19 +01:00
Rolf Neugebauer
6576bd7355
Merge pull request #2995 from rn/kern-up
Update kernels to 4.15.16/4.14.33/4.9.93/4.4.127 and add 4.16.1
2018-04-09 15:27:50 +01:00
Ian Campbell
3301af529c Avoid writing to tty devices which don't actually exist.
$ git diff linuxkit.yml
    diff --git a/linuxkit.yml b/linuxkit.yml
    index e2ec829db..21b84e4ad 100644
    --- a/linuxkit.yml
    +++ b/linuxkit.yml
    @@ -1,6 +1,6 @@
     kernel:
       image: linuxkit/kernel:4.14.32
    -  cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
    +  cmdline: "console=ttyS0 console=foobar"
     init:
       - linuxkit/init:v0.3
       - linuxkit/runc:v0.3
    $ linuxkit  build linuxkit.yml
    [...]
    $ linuxkit run linuxkit
    [...]
    getty: cmdline has console=foobar but /dev/foobar is not a character device; not starting getty for foobar

    linuxkit-2ae2c420a11c login: root (automatic login)

    Welcome to LinuxKit!

    NOTE: This system is namespaced.
    The namespace you are currently in may not be the root.
    (ns: getty) linuxkit-2ae2c420a11c:~# ls -l /proc/1/root/dev/foobar
    -rw-r--r--    1 root     root           311 Apr  9 13:19 /proc/1/root/dev/foobar
    (ns: getty) linuxkit-2ae2c420a11c:~# cat /proc/1/root/dev/foobar

    Welcome to LinuxKit

                            ##         .
                      ## ## ##        ==
                   ## ## ## ## ##    ===
               /"""""""""""""""""\___/ ===
              {                       /  ===-
               \______ O           __/
                 \    \         __/
                  \____\_______/

Also added quotes around $tty for good measure.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-04-09 14:26:49 +01:00
Rolf Neugebauer
c45e747c81 Update YAMLs to the latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-09 14:09:11 +01:00
Rolf Neugebauer
05e52f4269 tests: Add kernel module test for 4.16.x
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-09 14:07:37 +01:00
Rolf Neugebauer
141262f7f8 tests: Add kernel config test for 4.16.x
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-09 14:07:37 +01:00
Rolf Neugebauer
8b403d618a tests: Update kernel-config package
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-09 14:07:05 +01:00
Rolf Neugebauer
dfeaf8b5f6 tests: Adjust check for CONFIG_CC_STACKPROTECTOR
This option was removed in 4.16.x in favour of
CONFIG_CC_STACKPROTECTOR_AUTO. We do not check for
this option as we also force CONFIG_CC_STACKPROTECTOR_STRONG.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-09 13:59:57 +01:00
Rolf Neugebauer
a5c039f7ad kernel: Add bison/flex to kconfig Dockerfile
These are required for the 4.16.x kernel configuration.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-09 11:21:13 +01:00
Rolf Neugebauer
b69fc45955 kernel: Add the 4.16.1 kernel
The kernel config is based on the 4.15.x kernel config
run through 'make defconfig && make oldconfig' and then
tweaked a little by hand.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-09 11:20:19 +01:00
Rolf Neugebauer
fa9452af09 kernel: Update to 4.15.16/4.14.33/4.9.93/4.4.127
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-09 10:35:34 +01:00
Ian Campbell
12c8195064
Merge pull request #2993 from ijc/pkg-build-no-release
pkg: build: do not infer a release if not pushing
2018-04-06 16:28:06 +01:00
Ian Campbell
3be156da13 pkg: build: do not infer a release if not pushing
If you happen to be exactly on a tag then:

    $ linuxkit pkg build --dev pkg/init
    Building "ijc/init:dev"
    Cannot release "v0.3" if not pushing

Do not try and infer a release if not pushing so this is possible again.

The subsequent check for `bo.release != "" && !bo.push` remains since the
caller could have used `WithRelease` but not `WithPush`. Our CLI never does
this, but a hypothetical other user of the library might.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-04-06 14:13:08 +01:00
Rolf Neugebauer
695a10489b
Merge pull request #2992 from rn/post-release
build: Bump version to v0.3+
2018-04-05 22:23:49 +01:00
Rolf Neugebauer
649598cf94 build: Bump version to v0.3+
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-04-05 21:19:31 +01:00
Rolf Neugebauer
37e29b45b3
Merge pull request #2990 from rn/pre-release
Final preparation for v0.3 release
2018-04-05 21:17:59 +01:00
Rolf Neugebauer
ba1b7a40cb build: Fix circle CI name for s390x build step
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-04-05 20:04:03 +01:00
Rolf Neugebauer
1cbe0db4a9 Add CHANGELOG
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-05 20:03:31 +01:00
Justin Cormack
110bded295
Merge pull request #2991 from justincormack/local-build-options
Add more local build options and make static non-pie the default
2018-04-05 17:50:13 +01:00
Justin Cormack
4daeb1e997
Add more local build options and make static non-pie the default
static pie only seems to work on Alpine currently, but static is
a good default. Give the user choices...

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-04-05 16:55:47 +01:00
Rolf Neugebauer
db663d30a6 Update YAMLs to released packages
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-05 15:23:20 +01:00
Rolf Neugebauer
2d00440351 pkg: Update to latest alpine base
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-05 14:05:39 +01:00
Rolf Neugebauer
1695dfa3db build: Bump the version to v0.3
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-05 14:00:43 +01:00
Rolf Neugebauer
c4f613e047 cmd: Update the moby tool vendoring
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-05 14:00:10 +01:00