From de7f03ce0a45cc82da856a11595e9132f78a0605 Mon Sep 17 00:00:00 2001 From: 宋文武 Date: Sun, 22 Apr 2018 19:30:08 +0800 Subject: gnu: Add runc. * gnu/packages/virtualization.scm (runc): New variable. --- gnu/packages/virtualization.scm | 61 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 60 insertions(+), 1 deletion(-) (limited to 'gnu/packages/virtualization.scm') diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 55ace5a56d..59b4c63293 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -8,6 +8,7 @@ ;;; Copyright © 2017 Rutger Helling ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice ;;; Copyright © 2018 Danny Milosavljevic +;;; Copyright © 2018 Sou Bunnbu ;;; ;;; This file is part of GNU Guix. ;;; @@ -41,6 +42,7 @@ #:use-module (gnu packages gl) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) + #:use-module (gnu packages golang) #:use-module (gnu packages gtk) #:use-module (gnu packages image) #:use-module (gnu packages libusb) @@ -63,9 +65,11 @@ #:use-module (gnu packages xdisorg) #:use-module (gnu packages xml) #:use-module (guix build-system gnu) + #:use-module (guix build-system go) #:use-module (guix build-system python) #:use-module (guix download) - #:use-module ((guix licenses) #:select (gpl2 gpl2+ gpl3+ lgpl2.1 lgpl2.1+)) + #:use-module ((guix licenses) #:select (gpl2 gpl2+ gpl3+ lgpl2.1 lgpl2.1+ + asl2.0)) #:use-module (guix packages) #:use-module (guix utils) #:use-module (srfi srfi-1)) @@ -772,3 +776,58 @@ monitor/GPU.") ;; This package requires SSE instructions. (supported-systems '("i686-linux" "x86_64-linux")) (license gpl2+))) + +(define-public runc + (package + (name "runc") + (version "1.0.0-rc5") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/opencontainers/runc/releases/" + "download/v" version "/runc.tar.xz")) + (sha256 + (base32 + "081avdzwnqpk368wbaihlzsypaxpj42d7699h7jgp0fks14x4103")))) + (build-system go-build-system) + (arguments + '(#:import-path "github.com/opencontainers/runc" + #:install-source? #f + #:tests? #f ; FIXME: 20/139 tests fail. + #:phases + (modify-phases %standard-phases + (replace 'unpack + (lambda* (#:key source import-path #:allow-other-keys) + ;; Unpack the tarball into 'runc' instead of 'runc-1.0.0-rc5'. + (let ((dest (string-append "src/" import-path))) + (mkdir-p dest) + (invoke "tar" "-C" (string-append "src/" import-path) + "--strip-components=1" + "-xvf" source)))) + (replace 'build + (lambda* (#:key import-path #:allow-other-keys) + (chdir (string-append "src/" import-path)) + ;; XXX: requires 'go-md2man'. + ;; (invoke "make" "man") + (invoke "make"))) + ;; (replace 'check + ;; (lambda _ + ;; (invoke "make" "localunittest"))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (invoke "make" "install" "install-bash" + (string-append "PREFIX=" out)))))))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("libseccomp" ,libseccomp))) + (synopsis "Open container initiative runtime") + (home-page "https://www.opencontainers.org/") + (description + "@command{runc} is a command line client for running applications +packaged according to the +@uref{https://github.com/opencontainers/runtime-spec/blob/master/spec.md, Open +Container Initiative (OCI) format} and is a compliant implementation of the +Open Container Initiative specification.") + (license asl2.0))) -- cgit 1.4.1 From 460292af30f08567833926f0ee8b49287ba9c9bc Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 24 Apr 2018 20:19:38 +0200 Subject: gnu: qemu: Update to 2.12.0. * gnu/packages/patches/qemu-CVE-2018-7550.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. * gnu/packages/virtualization.scm (qemu): Update to 2.12.0. [source](patches): Remove. --- gnu/local.mk | 1 - gnu/packages/patches/qemu-CVE-2018-7550.patch | 66 --------------------------- gnu/packages/virtualization.scm | 5 +- 3 files changed, 2 insertions(+), 70 deletions(-) delete mode 100644 gnu/packages/patches/qemu-CVE-2018-7550.patch (limited to 'gnu/packages/virtualization.scm') diff --git a/gnu/local.mk b/gnu/local.mk index 056a46cb79..639dd943d6 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1061,7 +1061,6 @@ dist_patch_DATA = \ %D%/packages/patches/python-unittest2-python3-compat.patch \ %D%/packages/patches/python-unittest2-remove-argparse.patch \ %D%/packages/patches/python-waitress-fix-tests.patch \ - %D%/packages/patches/qemu-CVE-2018-7550.patch \ %D%/packages/patches/qt4-ldflags.patch \ %D%/packages/patches/qtbase-use-TZDIR.patch \ %D%/packages/patches/qtscript-disable-tests.patch \ diff --git a/gnu/packages/patches/qemu-CVE-2018-7550.patch b/gnu/packages/patches/qemu-CVE-2018-7550.patch deleted file mode 100644 index 43f111e206..0000000000 --- a/gnu/packages/patches/qemu-CVE-2018-7550.patch +++ /dev/null @@ -1,66 +0,0 @@ -Fix CVE-2018-7550: - -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-7550 - -Patch copied from upstream source repository: - -https://git.qemu.org/?p=qemu.git;a=patch;h=2a8fcd119eb7c6bb3837fc3669eb1b2dfb31daf8 - -From 2a8fcd119eb7c6bb3837fc3669eb1b2dfb31daf8 Mon Sep 17 00:00:00 2001 -From: Jack Schwartz -Date: Thu, 21 Dec 2017 09:25:15 -0800 -Subject: [PATCH] multiboot: bss_end_addr can be zero - -The multiboot spec (https://www.gnu.org/software/grub/manual/multiboot/), -section 3.1.3, allows for bss_end_addr to be zero. - -A zero bss_end_addr signifies there is no .bss section. - -Suggested-by: Daniel Kiper -Signed-off-by: Jack Schwartz -Reviewed-by: Daniel Kiper -Reviewed-by: Prasad J Pandit -Signed-off-by: Kevin Wolf ---- - hw/i386/multiboot.c | 18 ++++++++++-------- - 1 file changed, 10 insertions(+), 8 deletions(-) - -diff --git a/hw/i386/multiboot.c b/hw/i386/multiboot.c -index 46d9c68bf5..bb8d8e4629 100644 ---- a/hw/i386/multiboot.c -+++ b/hw/i386/multiboot.c -@@ -233,12 +233,6 @@ int load_multiboot(FWCfgState *fw_cfg, - mh_entry_addr = ldl_p(header+i+28); - - if (mh_load_end_addr) { -- if (mh_bss_end_addr < mh_load_addr) { -- fprintf(stderr, "invalid mh_bss_end_addr address\n"); -- exit(1); -- } -- mb_kernel_size = mh_bss_end_addr - mh_load_addr; -- - if (mh_load_end_addr < mh_load_addr) { - fprintf(stderr, "invalid mh_load_end_addr address\n"); - exit(1); -@@ -249,8 +243,16 @@ int load_multiboot(FWCfgState *fw_cfg, - fprintf(stderr, "invalid kernel_file_size\n"); - exit(1); - } -- mb_kernel_size = kernel_file_size - mb_kernel_text_offset; -- mb_load_size = mb_kernel_size; -+ mb_load_size = kernel_file_size - mb_kernel_text_offset; -+ } -+ if (mh_bss_end_addr) { -+ if (mh_bss_end_addr < (mh_load_addr + mb_load_size)) { -+ fprintf(stderr, "invalid mh_bss_end_addr address\n"); -+ exit(1); -+ } -+ mb_kernel_size = mh_bss_end_addr - mh_load_addr; -+ } else { -+ mb_kernel_size = mb_load_size; - } - - /* Valid if mh_flags sets MULTIBOOT_HEADER_HAS_VBE. --- -2.17.0 - diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 59b4c63293..86f4d71364 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -87,15 +87,14 @@ (define-public qemu (package (name "qemu") - (version "2.11.1") + (version "2.12.0") (source (origin (method url-fetch) (uri (string-append "https://download.qemu.org/qemu-" version ".tar.xz")) - (patches (search-patches "qemu-CVE-2018-7550.patch")) (sha256 (base32 - "11l6cs6mib16rgdrnqrhkqs033fjik316gkgfz3asbmxz38lalca")))) + "1z66spkm1prvhbq7h5mfnp0i6mmamsb938fqmdfvyrgzc7rh34z6")))) (build-system gnu-build-system) (arguments '(;; Running tests in parallel can occasionally lead to failures, like: -- cgit 1.4.1 From 03e45891245a1951c347001d3c11883f2d86d709 Mon Sep 17 00:00:00 2001 From: 宋文武 Date: Thu, 26 Apr 2018 09:37:00 +0800 Subject: gnu: runc: Update comment about status of tests. * gnu/packages/virtualization.scm (runc)[arguments]: Update comment. --- gnu/packages/virtualization.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gnu/packages/virtualization.scm') diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 86f4d71364..5e39fb9b9a 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -792,7 +792,9 @@ monitor/GPU.") (arguments '(#:import-path "github.com/opencontainers/runc" #:install-source? #f - #:tests? #f ; FIXME: 20/139 tests fail. + ;; XXX: 20/139 tests fail due to missing /var, cgroups and apparmor in + ;; the build environment. + #:tests? #f #:phases (modify-phases %standard-phases (replace 'unpack -- cgit 1.4.1 From 27b52c1f6aa036ec99691a5c76ecf697e09cd62f Mon Sep 17 00:00:00 2001 From: Rutger Helling Date: Thu, 26 Apr 2018 08:14:50 +0200 Subject: gnu: qemu: Build with Python 3 and SDL2 support. * gnu/packages/bootloaders.scm (qemu-minimal-2.10): Remove variable. * gnu/packages/virtualization.scm (qemu)[inputs]: Use sdl2 instead of sdl. [native-inputs]: Use python-wrapper instead of python@2. * gnu/packages/virtualization.scm (qemu-minimal)[inputs]: Remove sdl2 instead of sdl from inherited packages. * gnu/packages/virtualization.scm (qemu-minimal-2.10): Add variable. [native-inputs]: Remove python-wrapper from inherited packages and use python@2 instead. * gnu/packages/debug.scm (american-fuzzy-lop): Inherit from moved hidden-package qemu-minimal-2.10. --- gnu/packages/bootloaders.scm | 16 ---------------- gnu/packages/debug.scm | 3 ++- gnu/packages/virtualization.scm | 29 +++++++++++++++++++++++++---- 3 files changed, 27 insertions(+), 21 deletions(-) (limited to 'gnu/packages/virtualization.scm') diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 281bb98fa9..4350ff3a50 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -72,22 +72,6 @@ (base32 "0p2vhnc18cnbmb39vq4m7hzv4mhnm2l0a2s7gx3ar277fwng3hys")))) -;; The GRUB test suite fails with later versions of Qemu, so we -;; keep it at 2.10 for now. See -;; . -;; TODO: When grub no longer needs this version, move to gnu/packages/debug.scm. -(define qemu-minimal-2.10 - (package - (inherit qemu-minimal) - (version "2.10.2") - (source (origin - (method url-fetch) - (uri (string-append "https://download.qemu.org/qemu-" - version ".tar.xz")) - (sha256 - (base32 - "17w21spvaxaidi2am5lpsln8yjpyp2zi3s3gc6nsxj5arlgamzgw")))))) - (define-public grub (package (name "grub") diff --git a/gnu/packages/debug.scm b/gnu/packages/debug.scm index 112c656ff8..c12baf4e2b 100644 --- a/gnu/packages/debug.scm +++ b/gnu/packages/debug.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2014, 2015, 2016, 2017 Eric Bavier ;;; Copyright © 2016, 2017, 2018 Efraim Flashner ;;; Copyright © 2018 Tobias Geerinckx-Rice +;;; Copyright © 2018 Rutger Helling ;;; ;;; This file is part of GNU Guix. ;;; @@ -169,7 +170,7 @@ tools that process C/C++ code.") (inputs `(("custom-qemu" ;; The afl-qemu tool builds qemu 2.10.0 with a few patches applied. - ,(package (inherit (@@ (gnu packages bootloaders) qemu-minimal-2.10)) + ,(package (inherit qemu-minimal-2.10) (name "afl-qemu") (inputs `(("afl-src" ,source) diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 5e39fb9b9a..079b55da57 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -5,7 +5,7 @@ ;;; Copyright © 2016, 2017 Ricardo Wurmus ;;; Copyright © 2017 Alex Vong ;;; Copyright © 2017 Andy Patterson -;;; Copyright © 2017 Rutger Helling +;;; Copyright © 2017, 2018 Rutger Helling ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice ;;; Copyright © 2018 Danny Milosavljevic ;;; Copyright © 2018 Sou Bunnbu @@ -187,7 +187,7 @@ exec smbd $@"))) ;; ("pciutils" ,pciutils) ("pixman" ,pixman) ("pulseaudio" ,pulseaudio) - ("sdl" ,sdl) + ("sdl2" ,sdl2) ("spice" ,spice) ("usbredir" ,usbredir) ("util-linux" ,util-linux) @@ -197,7 +197,7 @@ exec smbd $@"))) (native-inputs `(("glib:bin" ,glib "bin") ; gtester, etc. ("perl" ,perl) ("pkg-config" ,pkg-config) - ("python" ,python-2) ; incompatible with Python 3 according to error message + ("python-wrapper" ,python-wrapper) ("texinfo" ,texinfo))) (home-page "https://www.qemu.org") (synopsis "Machine emulator and virtualizer") @@ -233,9 +233,30 @@ server and embedded PowerPC, and S390 guests.") ;; Remove dependencies on optional libraries, notably GUI libraries. (inputs (fold alist-delete (package-inputs qemu) - '("libusb" "mesa" "sdl" "spice" "virglrenderer" + '("libusb" "mesa" "sdl2" "spice" "virglrenderer" "usbredir" "libdrm" "libepoxy" "pulseaudio"))))) +;; The GRUB test suite fails with later versions of Qemu, so we +;; keep it at 2.10 for now. See +;; . +;; This package is hidden since we do not backport updates to it. +(define-public qemu-minimal-2.10 + (hidden-package + (package + (inherit qemu-minimal) + (version "2.10.2") + (source (origin + (method url-fetch) + (uri (string-append "https://download.qemu.org/qemu-" + version ".tar.xz")) + (sha256 + (base32 + "17w21spvaxaidi2am5lpsln8yjpyp2zi3s3gc6nsxj5arlgamzgw")))) + ;; qemu-minimal-2.10 needs Python 2. Remove below once no longer necessary. + (native-inputs `(("python-2" ,python-2) + ,@(fold alist-delete (package-native-inputs qemu) + '("python-wrapper"))))))) + (define-public libosinfo (package (name "libosinfo") -- cgit 1.4.1 From 90a8ef8c4325f97da39d5326b1cd110b3f3984bf Mon Sep 17 00:00:00 2001 From: Rutger Helling Date: Thu, 26 Apr 2018 08:17:05 +0200 Subject: gnu: qemu: Enable GTK3 frontend. * gnu/packages/virtualization.scm (qemu)[native-inputs]: Add "gettext" to native-inputs. [inputs]: Add "gtk+" to inputs. * gnu/packages/virtualization.scm (qemu-minimal)[native-inputs]: Remove "gettext" from inherited inputs. [inputs]: Remove "gtk+" from inherited inputs. --- gnu/packages/virtualization.scm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'gnu/packages/virtualization.scm') diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 079b55da57..46f78b8b1e 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -39,6 +39,7 @@ #:use-module (gnu packages docbook) #:use-module (gnu packages documentation) #:use-module (gnu packages fontutils) + #:use-module (gnu packages gettext) #:use-module (gnu packages gl) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) @@ -173,6 +174,7 @@ exec smbd $@"))) `(("alsa-lib" ,alsa-lib) ("attr" ,attr) ("glib" ,glib) + ("gtk+" ,gtk+) ("libaio" ,libaio) ("libattr" ,attr) ("libcap" ,libcap) ; virtfs support requires libcap & libattr @@ -194,7 +196,8 @@ exec smbd $@"))) ;; ("vde2" ,vde2) ("virglrenderer" ,virglrenderer) ("zlib" ,zlib))) - (native-inputs `(("glib:bin" ,glib "bin") ; gtester, etc. + (native-inputs `(("gettext" ,gettext-minimal) + ("glib:bin" ,glib "bin") ; gtester, etc. ("perl" ,perl) ("pkg-config" ,pkg-config) ("python-wrapper" ,python-wrapper) @@ -232,8 +235,10 @@ server and embedded PowerPC, and S390 guests.") ''("--target-list=i386-softmmu,x86_64-softmmu,mips64el-softmmu,arm-softmmu,aarch64-softmmu")))) ;; Remove dependencies on optional libraries, notably GUI libraries. + (native-inputs (fold alist-delete (package-native-inputs qemu) + '("gettext"))) (inputs (fold alist-delete (package-inputs qemu) - '("libusb" "mesa" "sdl2" "spice" "virglrenderer" + '("libusb" "mesa" "sdl2" "spice" "virglrenderer" "gtk+" "usbredir" "libdrm" "libepoxy" "pulseaudio"))))) ;; The GRUB test suite fails with later versions of Qemu, so we -- cgit 1.4.1 From 21c566a3aa80ccf44c451141beb0557581d85ba4 Mon Sep 17 00:00:00 2001 From: Roel Janssen Date: Sat, 28 Apr 2018 10:14:47 +0200 Subject: gnu: virt-manager: Update to 1.5.1. * gnu/packages/virtualization.scm (virt-manager): Update to 1.5.1. --- gnu/packages/virtualization.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/virtualization.scm') diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 46f78b8b1e..b73287c826 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -548,7 +548,7 @@ virtualization library.") (define-public virt-manager (package (name "virt-manager") - (version "1.4.3") + (version "1.5.1") (source (origin (method url-fetch) (uri (string-append "https://virt-manager.org/download/sources" @@ -556,7 +556,7 @@ virtualization library.") version ".tar.gz")) (sha256 (base32 - "093azs8p4p7y4nf5j25xpsvdxww7gky1g0hs8mkcvmpxl2wjd0jj")))) + "1ardmd4sxdmd57y7qpka44gf09c1yq2g0xs074d3k1h925crv27f")))) (build-system python-build-system) (arguments `(#:python ,python-2 -- cgit 1.4.1