2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-26 20:07:28 +00:00

283 Commits

Author SHA1 Message Date
Cyrill Gorcunov
796a34d1a2 make: config -- Drop unneeded code from tests
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Tested-by: Ruslan Kuprieiv <kupruser@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2014-03-24 20:15:27 +04:00
Ruslan Kuprieiev
bf288e27a2 install: install criu-service logrotate config
Thank Vladimir Davydov <vdavidov@parallels.com> for help and config.

Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
Acked-by: Vladimir Davydov <vdavydov@parallels.com>
Acked-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2014-02-18 12:39:50 +04:00
Ruslan Kuprieiev
3d940b0f18 systemd: start criu-service with log at /var/log
Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
Acked-by: Vladimir Davydov <vdavydov@parallels.com>
Acked-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2014-02-18 12:39:49 +04:00
Christopher Covington
2c90bb0ce5 Remove \u and \U GNU-isms from sed command
This allows building with busybox sed, for example.

Signed-off-by: Christopher Covington <cov@codeaurora.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2014-02-11 09:18:32 +04:00
Pavel Emelyanov
1e837af193 scripts: Add script to abort restore at the end
Usefult to test restore time, for example.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2014-02-05 19:40:47 +04:00
Andrey Vagin
0ad373ba6c make: config add test for ptrace_peeksiginfo_args
Currently we check PTRACE_PEEKSIGINFO and if it's defined in a system
header, we suppose that ptrace_peeksiginfo_args is defined there too.

But due to a bug in glibc, this check doesn't work. Now we have F20,
where ptrace_peeksiginfo_args is defined in sys/ptrace and F21 where
it isn't defined.

commit 9341dde4d56ca71b61b47c8b87a06e6d5813ed0e
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Sun Jan 5 16:07:13 2014 -0500

    ptrace.h: add __ prefix to ptrace_peeksiginfo_args

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2014-02-03 23:36:12 +04:00
Pavel Emelyanov
e4a2618724 pb: Number PB_ constants
For easier logs-to-constant eyes mapping.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2014-02-02 01:20:49 +04:00
Kir Kolyshkin
fe0a9670f3 simplify dummy rules
Use true instead of echo >/dev/null -- same effect, less bytes.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2014-01-11 09:14:18 +04:00
Ruslan Kuprieiev
33993eaf5b make: add ldflags-so variable to make engine
We need it to use other dynamic libraries in libcriu.

Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-12-18 14:26:07 +04:00
Cyrill Gorcunov
b7529fe814 make: Makefile.build -- Improve autocleanup target
Currently we clean up with wildchar mask. This actually
not that correct. Lets remove only the files were generated
by our make engine.

This as well allows to clean up objects generated as $obj-e
target even if the directory $obj-e is laying in doesn't have
own Makefile.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-12-13 15:58:33 +04:00
Kir Kolyshkin
26fda7a319 space-before-tab whitespace cleanup
Remove space before tab characters.

Found by git grep ' 	' (Space, Ctrl-V, Tab in shell).

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-12-12 10:00:53 +04:00
Shawn Landden
2e15e4da92 systemd socket activation support
Makes the criu RPC socket socket-activated with
systemd [1], meaning that systemd will create and listen to
the UNIX socket /var/run/criu-srvice.socket
on behalf of criu until a connection comes in, when it will
then pass control of the socket, along with the first connection
over to a newly spawned criu daemon.

This is similar to inetd, but criu stays around after getting
started, listening itsself on the socket.

[1] http://0pointer.de/blog/projects/socket-activation.html

v2: stripped down sd-daemon.[ch]
    moved units to scripts/sd

v3: stripped down further by removing unneeded includes

Signed-off-by: Shawn Landden <shawn@churchofgit.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-12-12 09:58:50 +04:00
Cyrill Gorcunov
b4266c7e67 string: Add strlcat helper
We will need it for btrfs subvolumes handling.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-11-29 15:36:07 +04:00
Pavel Emelyanov
32adef6f98 build: Move pie/gen-offsets.sh into scripts/
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-10-15 11:30:41 +04:00
Pavel Emelyanov
68475dd013 build: Move protobuf-desc-gen.sh into scripts/
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-10-15 11:26:45 +04:00
Cyrill Gorcunov
551cd03290 version: Print git id if present
If criu is built from git repo print git commit id, convenient for debug.

For example

 | $ ./criu -V
 | Version: 0.7
 | GitID: 7985251

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-09-14 15:01:32 +04:00
Cyrill Gorcunov
5006ed5f7c version: Define version as a macro
Defining it as static char is a bad idea especially
if it get included and never used -- we will get
"unused" variable error.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-09-14 15:00:17 +04:00
Cyrill Gorcunov
dee617dc85 make: Clean up build *.so if requested only
In OpenVZ -> CRIU converter I use same build engine
as in criu. But converter has own specifics such as
shipping precompiled vdso.so libraries. So when I
call for "make clean" these precompiled files get
automatically deleted, which in turn cause converter
to fail on next build attempt.

Thus lets delete only *.so targets which are declared
in makefiles.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-09-10 12:01:57 +04:00
Cyrill Gorcunov
f879284bb8 make: Allow to compile sources from external directories
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-09-04 16:16:40 +04:00
Cyrill Gorcunov
764f078179 make: Extend rules macros to pick sources from variable
This will allow us to generate rules where source
for object file is laying in some extenal directory
but compiled one is to be kept in some other directory.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-09-04 16:16:34 +04:00
Cyrill Gorcunov
63f89f83b8 make: Add library building helpers
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-09-02 16:17:10 +04:00
Cyrill Gorcunov
5033068a90 build: Don't forget to use LDFLAGS when ld invoked
It's not a problem now but in future we might need
some special flags to be passed here.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-08-29 14:48:08 +04:00
Cyrill Gorcunov
bc002e8537 Add strlcpy helper
Same as kernel provides, adopted from Linux sources.

strlcpy is similar to strncpy but _always_ adds \0
at the end of string even if destination is shorter.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-08-28 19:06:43 +04:00
Cyrill Gorcunov
fc7c13ded0 make: config -- Add test for prlimit call
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-05-23 15:12:56 +04:00
Cyrill Gorcunov
66cc9b6657 make: Introduce compile time include/config.h generation
It's being reported that some systems (as Ubuntu 13.04) already
have struct tcp_repair_opt definition in their system headers.

| sk-tcp.c:25:8: error: redefinition of struct tcp_repair_opt
| sk-tcp.c:31:2: error: redeclaration of enumerator TCP_NO_QUEUE

So add a facility for compile time testing for reported entities
to be present on a system. For this we generate include/config.h
where all tested entries will lay and source code need to include
it only in places where really needed.

Reported-by: Vasily Averin <vvs@parallels.com>
Acked-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-05-20 16:02:14 +04:00
Cyrill Gorcunov
234dce785f make: Add scripts/utilities.mak
Some features need to be tested on the system
where the project is compiled, so instead of
drowning into autoconf hell lets try to handle
all this with make facility.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-05-20 16:02:07 +04:00
Cyrill Gorcunov
f7066d7dca make: Provide mandatory options in cflags-y variable
In case if CFLAGS is overriden from command line we don't
see our headers anymore. So provide mandatory options in
ccflags-y variable to fix that.

https://bugzilla.openvz.org/show_bug.cgi?id=2521

Reported-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Tested-by: Alexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-02-23 00:36:36 +04:00
Pavel Emelyanov
47eac37e8b make: Move criu version constants from scripts/ to root Makefile
It's nicer to have them there.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-02-19 18:14:26 +04:00
Cyrill Gorcunov
379a5d311d make: scripts/Makefile.build -- Add $deps-after variable to order deps creation
Since we generate some headers the deps creation may
need to be ordered, thus add deps-after variable
for this case.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Tested-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-02-19 15:46:12 +04:00
Cyrill Gorcunov
60455da825 make: Add scripts/Makefile.build
This script is engine for simplified Makefiles.
I tried to make it somewhat close to what is used
to build linux kernel.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-02-18 18:10:41 +04:00
Cyrill Gorcunov
77af03686d make: Add scripts/Makefile.rules
This helpers will be used in rules generation
for new make infrastructure.

At moment only a few helpers here -- to compile
*.c and *.S files, and generate *.d,*.s,*.i files.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-02-18 18:10:40 +04:00
Cyrill Gorcunov
ad4f28cad1 make: Define dummy target for scripts/Makefile.version
At moment built-in .SUFFIXES variable is not cleaned
which slows down the building procedure. Add a dummy
rule thus the make won't try to lookup rules for
scripts/Makefile.version (this happens when last
resort rule is used).

Note that this is rather a stub for future convenience
which doesn't affect much current build procedure.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-02-18 18:10:38 +04:00
Cyrill Gorcunov
90fbbabb34 make: Generate crtools version from Makefile definition
This allows us to have a unique place where version lives
and what is more important other subsystems (such as docs
generation) may reuse version definitions.

At moment EXTRA (which corresponds kernels -rc tag) and
NAME is not yet used, but I desided to put them in place
for future needs.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-02-11 19:24:06 +04:00