diff options
Diffstat (limited to 'gnu/packages/virtualization.scm')
-rw-r--r-- | gnu/packages/virtualization.scm | 115 |
1 files changed, 47 insertions, 68 deletions
diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 1817f6dc22..e3e8beab6d 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2020 Ludovic Courtès <[email protected]> +;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2020, 2021 Ludovic Courtès <[email protected]> ;;; Copyright © 2015, 2016, 2017, 2018 Mark H Weaver <[email protected]> ;;; Copyright © 2016, 2017, 2018. 2019, 2020, 2021 Efraim Flashner <[email protected]> ;;; Copyright © 2016, 2017 Ricardo Wurmus <[email protected]> @@ -174,7 +174,7 @@ `(#:tests? ,(or (%current-target-system) (not (string=? "i686-linux" (%current-system)))) #:configure-flags - (let ((gcc (string-append (assoc-ref %build-inputs "gcc") "/bin/gcc")) + (let ((gcc (search-input-file %build-inputs "/bin/gcc")) (out (assoc-ref %outputs "out"))) (list (string-append "--cc=" gcc) ;; Some architectures insist on using HOST_CC. @@ -250,7 +250,7 @@ ;; Configure, build and install QEMU user-emulation static binaries. (add-after 'configure 'configure-user-static (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((gcc (string-append (assoc-ref inputs "gcc") "/bin/gcc")) + (let* ((gcc (search-input-file inputs "/bin/gcc")) (static (assoc-ref outputs "static")) ;; This is the common set of configure flags; it is ;; duplicated here to isolate this phase from manipulations @@ -336,8 +336,7 @@ exec smbd $@"))) ("perl" ,perl) ("flex" ,flex) ("bison" ,bison) - ;; Using meson 0.57.1 enables reproducible QEMU builds. - ("meson" ,meson-next) + ("meson" ,meson) ("ninja" ,ninja) ("pkg-config" ,pkg-config) ("python-wrapper" ,python-wrapper) @@ -346,7 +345,7 @@ exec smbd $@"))) ("texinfo" ,texinfo) ;; The following static libraries are required to build ;; the static output of QEMU. - ("glib-static" ,glib-static) + ("glib:static" ,glib "static") ("pcre:static" ,pcre "static") ("zlib:static" ,zlib "static"))) (home-page "https://www.qemu.org") @@ -522,8 +521,7 @@ firmware blobs. You can "ganeti-sphinx-compat.patch" "ganeti-haskell-compat.patch" "ganeti-haskell-pythondir.patch" - "ganeti-disable-version-symlinks.patch" - "ganeti-preserve-PYTHONPATH.patch")))) + "ganeti-disable-version-symlinks.patch")))) (build-system gnu-build-system) (arguments `(#:imported-modules (,@%gnu-build-system-modules @@ -531,7 +529,6 @@ firmware blobs. You can (guix build python-build-system)) #:modules (,@%gnu-build-system-modules ((guix build haskell-build-system) #:prefix haskell:) - ((guix build python-build-system) #:select (python-version)) (srfi srfi-1) (srfi srfi-26) (ice-9 match) @@ -631,7 +628,8 @@ firmware blobs. You can ;; .sphinx-build-real executable name created by the Sphinx wrapper. (substitute* "configure" (("\\$SPHINX --version 2>&1") - "$SPHINX --version 2>&1 | sed 's/.sphinx-build-real/sphinx-build/g'")))) + "$SPHINX --version 2>&1 \ +| sed 's/.sphinx-build-real/sphinx-build/g'")))) ;; The build system invokes Cabal and GHC, which do not work with ;; GHC_PACKAGE_PATH: <https://github.com/haskell/cabal/issues/3728>. @@ -678,34 +676,16 @@ firmware blobs. You can "") ;; This test requires networking. (("test/py/import-export_unittest\\.bash") - "")) - - ;; Many of the Makefile targets reset PYTHONPATH before running - ;; the Python interpreter, which does not work very well for us. - (substitute* "Makefile" - (("PYTHONPATH=") - (string-append "PYTHONPATH=" (getenv "PYTHONPATH") ":"))))) + "")))) (add-after 'build 'build-bash-completions (lambda _ - (let ((orig-pythonpath (getenv "PYTHONPATH"))) - (setenv "PYTHONPATH" (string-append ".:" orig-pythonpath)) - (invoke "./autotools/build-bash-completion") - (setenv "PYTHONPATH" orig-pythonpath)))) + (setenv "PYTHONPATH" ".") + (invoke "./autotools/build-bash-completion") + (unsetenv "PYTHONPATH"))) (add-before 'check 'pre-check (lambda* (#:key inputs #:allow-other-keys) ;; Set TZDIR so that time zones are found. - (setenv "TZDIR" (string-append (assoc-ref inputs "tzdata") - "/share/zoneinfo")) - - ;; This test checks whether PYTHONPATH is untouched, and extends - ;; it to include test directories if so. Add an else branch for - ;; our modified PYTHONPATH, in order to prevent a confusing test - ;; failure where expired certificates are not cleaned because - ;; check-cert-expired is silently crashing. - (substitute* "test/py/ganeti-cleaner_unittest.bash" - (("then export PYTHONPATH=(.*)" all testpath) - (string-append all "else export PYTHONPATH=" - (getenv "PYTHONPATH") ":" testpath "\n"))) + (setenv "TZDIR" (search-input-directory inputs "share/zoneinfo")) (substitute* "test/py/ganeti.utils.process_unittest.py" ;; This test attempts to run an executable with @@ -758,19 +738,14 @@ firmware blobs. You can ((commands ... prog) (cons (basename prog) progs)))) (loop (read-line port) progs))))))))))) - ;; Wrap all executables with PYTHONPATH. We can't borrow the phase - ;; from python-build-system because we also need to wrap the scripts - ;; in $out/lib/ganeti such as "node-daemon-setup". + ;; Wrap all executables with GUIX_PYTHONPATH. We can't borrow + ;; the phase from python-build-system because we also need to wrap + ;; the scripts in $out/lib/ganeti such as "node-daemon-setup". (add-after 'install 'wrap - (lambda* (#:key inputs outputs #:allow-other-keys) + (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (sbin (string-append out "/sbin")) - (lib (string-append out "/lib")) - (python (assoc-ref inputs "python")) - (major+minor (python-version python)) - (PYTHONPATH (string-append lib "/python" major+minor - "/site-packages:" - (getenv "PYTHONPATH")))) + (lib (string-append out "/lib"))) (define (shell-script? file) (call-with-ascii-input-file file (lambda (port) @@ -791,7 +766,8 @@ firmware blobs. You can (for-each (lambda (file) (wrap-program file - `("PYTHONPATH" ":" prefix (,PYTHONPATH)))) + `("GUIX_PYTHONPATH" ":" prefix + (,(getenv "GUIX_PYTHONPATH"))))) (append-map (cut find-files <> wrap?) (list (string-append lib "/ganeti") sbin))))))))) @@ -1003,7 +979,7 @@ Debian or a derivative using @command{debootstrap}.") (define-public libosinfo (package (name "libosinfo") - (version "1.7.1") + (version "1.9.0") (source (origin (method url-fetch) @@ -1011,7 +987,7 @@ Debian or a derivative using @command{debootstrap}.") version ".tar.xz")) (sha256 (base32 - "1s97sv24bybggjx6hgqba2qdqz3ivfpd4cmkh4zm5y59sim109mv")))) + "0nd360c9ampw8hb6xh5g45q858df2r4jj9q88bcl6gzgaj0l3wxl")))) (build-system meson-build-system) (arguments `(#:configure-flags @@ -1026,10 +1002,9 @@ Debian or a derivative using @command{debootstrap}.") (substitute* "osinfo/osinfo_loader.c" (("path = DATA_DIR.*") (string-append "path = \"" (assoc-ref inputs "osinfo-db") - "/share/osinfo\";"))) - #t))))) + "/share/osinfo\";")))))))) (inputs - `(("libsoup" ,libsoup) + `(("libsoup" ,libsoup-minimal-2) ("libxml2" ,libxml2) ("libxslt" ,libxslt) ("osinfo-db" ,osinfo-db))) @@ -1257,14 +1232,14 @@ pretty simple, REST API.") (define-public libvirt (package (name "libvirt") - (version "7.6.0") + (version "7.9.0") (source (origin (method url-fetch) (uri (string-append "https://libvirt.org/sources/libvirt-" version ".tar.xz")) (sha256 - (base32 "0hb1fq0yx41n36c3n1a54b5p37n0m7abs917d76v7aqas03735lg")) + (base32 "131fyxb05rrcr9ih4mhhjyw3cgsxh5l12vj4y109q9vlynsz5742")) (patches (search-patches "libvirt-add-install-prefix.patch")))) (build-system meson-build-system) (arguments @@ -1285,7 +1260,6 @@ pretty simple, REST API.") (string-append "-Dinstall_prefix=" (assoc-ref %outputs "out")) "--sysconfdir=/etc" "--localstatedir=/var") - #:meson ,meson-0.55 #:phases (modify-phases %standard-phases (add-after 'unpack 'skip-directory-confusion @@ -1359,6 +1333,8 @@ to integrate other virtualization mechanisms if needed.") (base32 "1gdcvqz88qkp402zra9csc6391f2xki1270x683n6ixakl3gf8w4")))) (build-system meson-build-system) + (arguments + `(#:meson ,meson-0.59)) ;KeyError: 'install_dir' with meson 0.60 (inputs `(("openssl" ,openssl) ("cyrus-sasl" ,cyrus-sasl) @@ -1392,14 +1368,14 @@ three libraries: (define-public python-libvirt (package (name "python-libvirt") - (version "7.3.0") + (version "7.9.0") (source (origin (method url-fetch) (uri (string-append "https://libvirt.org/sources/python/libvirt-python-" version ".tar.gz")) (sha256 - (base32 "15pn8610ybf03xff3vbz3apz2ph42k2kh6k19r020l9nvc6jcv37")))) + (base32 "0nakisj2ady5a41k4zc95k0kp749f4ppmxgr91b1h1dzbzxcydc5")))) (build-system python-build-system) (arguments `(#:phases @@ -1462,8 +1438,8 @@ virtualization library.") (lambda* (#:key inputs #:allow-other-keys) ;; Xen is not available for now - so only patch qemu. (substitute* "virtManager/createconn.py" - (("/usr(/bin/qemu-system)" _ suffix) - (string-append (assoc-ref inputs "qemu") suffix))) + (("/usr(/bin/qemu-system-[a-zA-Z0-9_-]+)" _ suffix) + (search-input-file inputs suffix))) #t)) (add-before 'wrap 'wrap-with-GI_TYPELIB_PATH (lambda* (#:key inputs outputs #:allow-other-keys) @@ -1497,7 +1473,7 @@ virtualization library.") #t)) (add-after 'install 'glib-or-gtk-compile-schemas (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas)) - (add-after 'install 'glib-or-gtk-wrap + (add-after 'wrap 'glib-or-gtk-wrap (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))))) (inputs `(("dconf" ,dconf) @@ -1562,11 +1538,13 @@ domains, their live performance and resource utilization statistics.") (list (string-append "PREFIX=" (assoc-ref %outputs "out")) (string-append "LIBDIR=" (assoc-ref %outputs "out") "/lib") - (string-append "ASCIIDOC=" (assoc-ref %build-inputs "asciidoc") - "/bin/asciidoc") + (string-append "ASCIIDOC=" + (search-input-file %build-inputs + "/bin/asciidoc")) (string-append "PYTHON=python3") - (string-append "XMLTO=" (assoc-ref %build-inputs "xmlto") - "/bin/xmlto")) + (string-append "XMLTO=" + (search-input-file %build-input + "/bin/xmlto"))) #:phases (modify-phases %standard-phases (delete 'configure) ; no configure script @@ -1591,8 +1569,9 @@ domains, their live performance and resource utilization statistics.") ;; /usr/include/..., which obviously does not exist. (let* ((file "google/protobuf/descriptor.proto") (target (string-append "images/" file)) - (source (string-append (assoc-ref inputs "protobuf") - "/include/" file))) + (source (search-input-file + inputs + (string-append "include/" file)))) (delete-file target) (symlink source target)))) (add-after 'install 'wrap @@ -1603,9 +1582,9 @@ domains, their live performance and resource utilization statistics.") ,(version-major+minor (package-version python)) "/site-packages")) - (path (getenv "PYTHONPATH"))) + (path (getenv "GUIX_PYTHONPATH"))) (wrap-program (string-append out "/bin/crit") - `("PYTHONPATH" ":" prefix (,site ,path)))))) + `("GUIX_PYTHONPATH" ":" prefix (,site ,path)))))) (add-after 'install 'delete-static-libraries ;; Not building/installing these at all doesn't seem to be supported. (lambda* (#:key outputs #:allow-other-keys) @@ -2213,7 +2192,7 @@ which is a hypervisor.") (define-public osinfo-db-tools (package (name "osinfo-db-tools") - (version "1.8.0") + (version "1.9.0") (source (origin (method url-fetch) (uri (string-append "https://releases.pagure.org/libosinfo/osinfo-db-tools-" @@ -2221,10 +2200,10 @@ which is a hypervisor.") (sha256 (base32 - "038q3gzdbkfkhpicj0755mw1q4gbvn57pslpw8n2dp3lds9im0g9")))) + "1h23a8nzdxjyvw44dwh903563n3b1z5skx8g0b1p1v5cif3iqpr5")))) (build-system meson-build-system) (inputs - `(("libsoup" ,libsoup) + `(("libsoup" ,libsoup-minimal-2) ("libxml2" ,libxml2) ("libxslt" ,libxslt) ("json-glib" ,json-glib) |