2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-26 11:57:52 +00:00

25 Commits

Author SHA1 Message Date
Andrei Vagin
aec9eb921f build: install libnet-dev
It will be used to generate tcp packets for restoring half-closed sockets.

travis-ci: success for series starting with [01/21] build: install libnet-dev
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-16 11:03:43 +03:00
Andrei Vagin
f5df0adac6 travis: build tests in docker containers
travis-ci: success for series starting with [1/3] zdtm: call test_init() before doing anything
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-12 18:30:05 +03:00
Kir Kolyshkin
2d99499a1c scripts/build aarch64-clang target: fix clang ver
Apparently, there's no clang-3.8 for Ubuntu Trusty arm64. The latest
available version is 3.6, let's try to use it.

https://travis-ci.org/kolyshkin/criu/builds/173168198
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-11-12 11:06:00 +03:00
Kir Kolyshkin
02340d167e Dockerfile.tmpl: merge apt-get lines
As recommended by [1], "Always combine RUN apt-get update with apt-get
install in the same RUN statement". Also, ditch "apt-get clean", as it
seems to be useless.

[1] https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/

https://travis-ci.org/kolyshkin/criu/builds/173168198
Cc: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-11-12 11:05:59 +03:00
Pavel Emelyanov
a1ba078830 make: Add .config file processing (v3)
In this file one can add options with which to build CRIU.
Each line is (for now) expanded into CONFIG_$(TEXT) macros
defined in config.h that can be tested later in the code.

v2: Add .config to .gitignore
v3: Don't check that make mrproper removes .config

https://github.com/xemul/criu/issues/235
travis-ci: success for Don't compile in binfmt_misc dumping code by default (rev3)
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Reviewed-by: Dmirty Safonov <dsafonov@virtuozzo.com>
2016-11-03 20:49:13 +03:00
Dmitry Safonov
48f680df95 Travis: add test for building some CRIU's object
As it should be built anyway - it will not increase build time
significally.

Cc: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-11-03 09:04:16 +03:00
Kir Kolyshkin
1ccc94ffc5 scripts/build: add clang targets
With this, one can do a CRUI build via QEMU+Docker using clang
as a compiler, for example:

	make -C scripts/build alpine-clang
	make -C scripts/build ppc64le-clang

For alpine, default clang version is used. For others, a version has
to be specified explicitly, as there is no package called "clang" in
Ubuntu Trusty (which is used as a base for most arches). Since
clang-3.8 appears to be available from Trusty, and this is the current
stable version of clang, let's use it.

travis-ci: success for QEMU+Dockerfile improvements + clang build
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Acked-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-11-02 20:35:57 +03:00
Kir Kolyshkin
3541b0d8f9 Dockerfile.x86_64: use Ubuntu Trusty
Let's use Ubuntu Trusty Tahr (aka 14.04) for x86_64 QEMU build, as
1. this is the version that is used for other QEMU arches;
2. Ubuntu Wily, used before, is EOL as of July 28, 2016.

travis-ci: success for QEMU+Dockerfile improvements + clang build
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Acked-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-11-02 20:35:57 +03:00
Kir Kolyshkin
f571f92b53 Dockerfile: do make mrproper before build
I just spent some considerable time trying to figure out the source
of errors like this:

	make -C scripts/build ppc64
	...
	  DEP      images/autofs.pb-c.d
	In file included from images/autofs.pb-c.c:9:0:
	images/autofs.pb-c.h:7:35: fatal error: protobuf-c/protobuf-c.h:
	No such	file or directory
	 #include <protobuf-c/protobuf-c.h>
					   ^
	compilation terminated.

It appears that we copy the complete tree to a docker container, and it
is not cleaned properly before the build. In particular, images/*.pb-c.{c,h}
are not removed/rebuilt. The problem is not noticeable until version of
protobuf-c differs between the host and container, and they use different
include paths (/usr/include/google/protobuf-c/ vs /usr/include/protobuf-c).

As I don't want anyone else to spend so much time figuring this out,
here is the patch.

travis-ci: success for QEMU+Dockerfile improvements + clang build
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Acked-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-11-02 20:35:56 +03:00
Kir Kolyshkin
d86a3a0e1c Dockerfile.alpine: add git and coretuils
git is needed as the top-level Makefile calls it. Strictly speaking
git is not required to build CRIU, but it's better to have it than
to see some error messages.

coreutils is needed for nproc utility which is called from Dockerfile:

	make -j $(nproc)

Before this patch, it was equivalent to "make -j" (plus an error
message) which is not the best thing to do.

travis-ci: success for QEMU+Dockerfile improvements + clang build
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Acked-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-11-02 20:35:56 +03:00
Dmitry Safonov
e38c37f05a Travis: check mrproper cleanings
Let there be more make-tests.

Cc: Adrian Reber <adrian@lisas.de>
Cc: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-27 17:06:00 +03:00
Andrew Vagin
8876c4bbb8 travis: add a docker file to build on Alpine Linux
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-08-01 16:51:05 +03:00
Dmitry Safonov
d2bb4ee446 Travis: fix yandex URL for packages
Cc: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-08-01 16:51:05 +03:00
Andrew Vagin
851290bfa1 travis: enable compilation for ppc64le
qemu-static from ubuntu/xenial contains a required fix
and now we can execute compilation for ppc64le in travis.

v2: rebase on criu-dev
v3: set QEMU_CPU=POWER8 to avoid segfaults of qemu-ppc64le-static

> > By default, both qemu and gcc5 produce code on ppc64el which will run on
> > POWER7 platform.  However, in debian gcc build instruction, gcc is explicitly
> > built to produce code for POWER8 platform, which, obviously has additional
> > instructions.

v4: use ubuntu:trusty. xenial and wily has a bug:
Processing triggers for libc-bin (2.21-0ubuntu4.1) ...
/sbin/ldconfig.real: 5: /sbin/ldconfig.real: Syntax error: ")" unexpected
/sbin/ldconfig.real: 5: /sbin/ldconfig.real: Syntax error: ")" unexpected

v5: arm, x86, aarch64 were removed by mistake

Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-05-06 14:38:29 +03:00
Kir Kolyshkin
2edc082e07 Makefiles: don't use the FORCE, Luke!
With GNU make, using .PHONY leads to the same result as using
the "FORCE" hack, but unlike FORCE is not a hack. Since we do not
plan to use any other make than GNU make, let's just mark phony
targets as such.

For more details about why PHONY is better than FORCE, see
http://www.gnu.org/software/make/manual/make.html#index-FORCE

[v2: rebased and splitted]

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-02-24 23:48:11 +03:00
Pavel Emelyanov
a55840d7fa build: Remove duplicate entries
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-02-24 13:31:17 +03:00
Kir Kolyshkin
4ab2237f46 Dockerfile: add more packages
These packages are needed for proper build:

* git-core: to get CRIU version (see Makefile)
* pkg-config, libselinux-dev: to check for selinux
  (see criu/Makefile.config)

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Acked-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-02-24 13:30:50 +03:00
Kir Kolyshkin
c38f6db0bc scripts/build/Makefile: brevity is the soul of wit
Make the Makefile leaner and cleaner.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Acked-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-02-24 13:27:57 +03:00
Tycho Andersen
cbf3a14ff2 travis: criu depends on libcap-dev too
https://travis-ci.org/xemul/criu/jobs/110616491

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-02-24 13:20:22 +03:00
Andrew Vagin
46f3869ff6 dockerfile: add libcap-dev
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-02-24 13:13:15 +03:00
Andrey Vagin
4322e4c35c dockerfile: add Dockerfile.tmpl
Fixes: afae962c668d ("dockerfile: extract a common part in one file")
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-02-20 19:17:20 +03:00
Andrew Vagin
afae962c66 dockerfile: extract a common part in one file
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-02-19 14:33:03 +03:00
Andrew Vagin
1621ba56ac dockerfile: download Packages.gz only once
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-02-19 14:32:55 +03:00
Andrei Vagin
2df0257f26 Dockerfile: don't fail if a binfmt-misc rule already exists
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-02-19 14:32:49 +03:00
Andrei Vagin
1c2c1f45f7 crtools: add Dockerfile to build criu on armv7hf, aarch64, ppc64le
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-02-15 15:32:57 +03:00