[PATCH RFC 1/3] meson: Add support to CRIU binary into meson

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch includes CRIU binary checks into meson files to support
checkpoint/restore for LXC driver.

Signed-off-by: Julio Faracco <jcfaracco@xxxxxxxxx>
---
 meson.build       | 10 ++++++++++
 meson_options.txt |  1 +
 2 files changed, 11 insertions(+)

diff --git a/meson.build b/meson.build
index 369548f127..115c903ab2 100644
--- a/meson.build
+++ b/meson.build
@@ -1639,6 +1639,15 @@ void main(void) {
   if cc.compiles(lxc_get_free_code)
     conf.set('WITH_DECL_LOOP_CTL_GET_FREE', 1)
   endif
+
+  if not get_option('criu').disabled()
+    criu_prog = find_program('criu')
+
+    if criu_prog.found()
+      conf.set('WITH_CRIU', 1)
+      conf.set_quoted('CRIU', criu_prog.path())
+    endif
+  endif
 elif get_option('driver_lxc').enabled()
   error('linux and remote_driver are required for LXC')
 endif
@@ -2411,6 +2420,7 @@ misc_summary = {
   'virt-login-shell': conf.has('WITH_LOGIN_SHELL'),
   'virt-host-validate': conf.has('WITH_HOST_VALIDATE'),
   'TLS priority': conf.get_unquoted('TLS_PRIORITY'),
+  'CRIU': conf.has('WITH_CRIU'),
 }
 summary(misc_summary, section: 'Miscellaneous', bool_yn: true, list_sep: ' ')
 
diff --git a/meson_options.txt b/meson_options.txt
index e5d79c2b6b..de977c8775 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -102,3 +102,4 @@ option('numad', type: 'feature', value: 'auto', description: 'use numad to manag
 option('pm_utils', type: 'feature', value: 'auto', description: 'use pm-utils for power management')
 option('sysctl_config', type: 'feature', value: 'auto', description: 'Whether to install sysctl configs')
 option('tls_priority', type: 'string', value: 'NORMAL', description: 'set the default TLS session priority string')
+option('criu', type: 'feature', value: 'auto', description: 'use CRIU to checkpoint/restore containers')
-- 
2.27.0




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux