summaryrefslogtreecommitdiff
path: root/gnu/packages/virtualization.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/virtualization.scm')
-rw-r--r--gnu/packages/virtualization.scm168
1 files changed, 141 insertions, 27 deletions
diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index 05d2ab0b87..ebc57dc369 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -45,13 +45,16 @@
#:use-module (gnu packages gl)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnome)
+ #:use-module (gnu packages gnupg)
#:use-module (gnu packages golang)
#:use-module (gnu packages gtk)
#:use-module (gnu packages image)
#:use-module (gnu packages libusb)
#:use-module (gnu packages linux)
#:use-module (gnu packages ncurses)
+ #:use-module (gnu packages nettle)
#:use-module (gnu packages networking)
+ #:use-module (gnu packages package-management)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages polkit)
@@ -63,6 +66,7 @@
#:use-module (gnu packages sdl)
#:use-module (gnu packages spice)
#:use-module (gnu packages texinfo)
+ #:use-module (gnu packages textutils)
#:use-module (gnu packages tls)
#:use-module (gnu packages web)
#:use-module (gnu packages xdisorg)
@@ -71,6 +75,7 @@
#:use-module (guix build-system go)
#:use-module (guix build-system python)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module ((guix licenses) #:select (gpl2 gpl2+ gpl3+ lgpl2.1 lgpl2.1+
asl2.0))
#:use-module (guix packages)
@@ -95,6 +100,7 @@
(method url-fetch)
(uri (string-append "https://download.qemu.org/qemu-"
version ".tar.xz"))
+ (patches (search-patches "qemu-CVE-2018-11806.patch"))
(sha256
(base32
"1z66spkm1prvhbq7h5mfnp0i6mmamsb938fqmdfvyrgzc7rh34z6"))))
@@ -124,28 +130,27 @@
;; The binaries need to be linked against -lrt.
(setenv "LDFLAGS" "-lrt")
- (zero?
- (apply system*
- `("./configure"
- ,(string-append "--cc=" (which "gcc"))
- ;; Some architectures insist on using HOST_CC
- ,(string-append "--host-cc=" (which "gcc"))
- "--disable-debug-info" ; save build space
- "--enable-virtfs" ; just to be sure
- ,(string-append "--prefix=" out)
- ,(string-append "--sysconfdir=/etc")
- ,@configure-flags))))))
+ (apply invoke
+ `("./configure"
+ ,(string-append "--cc=" (which "gcc"))
+ ;; Some architectures insist on using HOST_CC
+ ,(string-append "--host-cc=" (which "gcc"))
+ "--disable-debug-info" ; save build space
+ "--enable-virtfs" ; just to be sure
+ ,(string-append "--prefix=" out)
+ ,(string-append "--sysconfdir=/etc")
+ ,@configure-flags)))))
(add-after 'install 'install-info
(lambda* (#:key inputs outputs #:allow-other-keys)
;; Install the Info manual, unless Texinfo is missing.
- (or (not (assoc-ref inputs "texinfo"))
- (let ((out (assoc-ref outputs "out")))
- (and (zero? (system* "make" "info"))
- (let ((infodir (string-append out "/share/info")))
- (for-each (lambda (info)
- (install-file info infodir))
- (find-files "." "\\.info"))
- #t))))))
+ (when (assoc-ref inputs "texinfo")
+ (let* ((out (assoc-ref outputs "out"))
+ (dir (string-append out "/share/info")))
+ (invoke "make" "info")
+ (for-each (lambda (info)
+ (install-file info dir))
+ (find-files "." "\\.info"))))
+ #t))
;; Create a wrapper for Samba. This allows QEMU to use Samba without
;; pulling it in as an input. Note that you need to explicitly install
;; Samba in your Guix profile for Samba support.
@@ -337,7 +342,7 @@ all common programming languages. Vala bindings are also provided.")
(define-public lxc
(package
(name "lxc")
- (version "2.1.1")
+ (version "3.0.1")
(source (origin
(method url-fetch)
(uri (string-append
@@ -345,7 +350,7 @@ all common programming languages. Vala bindings are also provided.")
version ".tar.gz"))
(sha256
(base32
- "1xpghrinxhm2072fwmn42pxhjwh7qx6cbsipw4s6g38a8mkklrk8"))))
+ "1nyml98k28sc5sda0260cmby4irkpnhpwgmx4yhqy10wpr4nr625"))))
(build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)))
@@ -364,14 +369,13 @@ all common programming languages. Vala bindings are also provided.")
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bashcompdir (string-append out "/etc/bash_completion.d")))
- (zero? (system*
- "make" "install"
+ (invoke "make" "install"
(string-append "bashcompdir=" bashcompdir)
;; Don't install files into /var and /etc.
"LXCPATH=/tmp/var/lib/lxc"
"localstatedir=/tmp/var"
"sysconfdir=/tmp/etc"
- "sysconfigdir=/tmp/etc/default"))))))))
+ "sysconfigdir=/tmp/etc/default")))))))
(synopsis "Linux container tools")
(home-page "https://linuxcontainers.org/")
(description
@@ -766,7 +770,7 @@ Machine Protocol.")
(define-public lookingglass
(package
(name "lookingglass")
- (version "a10")
+ (version "a11")
(source
(origin
(method url-fetch)
@@ -775,7 +779,7 @@ Machine Protocol.")
(file-name (string-append name "-" version))
(sha256
(base32
- "0zlxg9ibzr0a598wr5nl1pb4l7mzsqn8ip72v4frph0vwsm5il6c"))))
+ "11qwyp332l66sqksqa0z9439yi4accmbq7wjc6kikc5fimdh9wk5"))))
(build-system gnu-build-system)
(inputs `(("fontconfig" ,fontconfig)
("glu" ,glu)
@@ -784,9 +788,12 @@ Machine Protocol.")
("sdl2" ,sdl2)
("sdl2-ttf" ,sdl2-ttf)
("spice-protocol" ,spice-protocol)))
- (native-inputs `(("pkg-config" ,pkg-config)))
+ (native-inputs `(("libconfig" ,libconfig)
+ ("nettle" ,nettle)
+ ("pkg-config" ,pkg-config)))
(arguments
`(#:tests? #f ;; No tests are available.
+ #:make-flags '("CC=gcc")
#:phases (modify-phases %standard-phases
(replace 'configure
(lambda* (#:key outputs #:allow-other-keys)
@@ -864,3 +871,110 @@ packaged according to the
Container Initiative (OCI) format} and is a compliant implementation of the
Open Container Initiative specification.")
(license asl2.0)))
+
+(define-public umoci
+ (package
+ (name "umoci")
+ (version "0.4.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/openSUSE/umoci/releases/download/v"
+ version "/umoci.tar.xz"))
+ (file-name (string-append "umoci-" version ".tar.xz"))
+ (sha256
+ (base32
+ "0hg7hs4dagj2fgymm4b4s68k1v2k2093s3jg0d94j0ixhfmyg9nd"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/openSUSE/umoci"
+ #:install-source? #f
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'unpack
+ (lambda* (#:key source import-path #:allow-other-keys)
+ ;; Unpack the tarball into 'umoci' instead of "runc-${version}".
+ (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))
+ ;; TODO: build manpages with 'go-md2man'.
+ (invoke "make" "SHELL=bash")))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bindir (string-append out "/bin")))
+ (install-file "umoci" bindir)
+ #t))))))
+ (home-page "https://umo.ci/")
+ (synopsis "Tool for modifying Open Container images")
+ (description
+ "@command{umoci} is a tool that allows for high-level modification of an
+Open Container Initiative (OCI) image layout and its tagged images.")
+ (license asl2.0)))
+
+(define-public skopeo
+ (package
+ (name "skopeo")
+ (version "0.1.28")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/projectatomic/skopeo")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "068nwrr3nr27alravcq1sxyhdd5jjr24213vdgn1dqva3885gbi0"))))
+ (build-system go-build-system)
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (inputs
+ `(("btrfs-progs" ,btrfs-progs)
+ ("eudev" ,eudev)
+ ("libassuan" ,libassuan)
+ ("libselinux" ,libselinux)
+ ("libostree" ,libostree)
+ ("lvm2" ,lvm2)
+ ("glib" ,glib)
+ ("gpgme" ,gpgme)))
+ (arguments
+ '(#:import-path "github.com/projectatomic/skopeo"
+ #:install-source? #f
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'build
+ (lambda* (#:key import-path #:allow-other-keys)
+ (chdir (string-append "src/" import-path))
+ ;; TODO: build manpages with 'go-md2man'.
+ (invoke "make" "binary-local")))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (invoke "make" "install-binary" "install-completions"
+ (string-append "PREFIX=" out))))))))
+ (home-page "https://github.com/projectatomic/skopeo")
+ (synopsis "Interact with container images and container image registries")
+ (description
+ "@command{skopeo} is a command line utility providing various operations
+with container images and container image registries. It can:
+@enumerate
+
+@item Copy container images between various containers image stores,
+converting them as necessary.
+
+@item Convert a Docker schema 2 or schema 1 container image to an OCI image.
+
+@item Inspect a repository on a container registry without needlessly pulling
+the image.
+
+@item Sign and verify container images.
+
+@item Delete container images from a remote container registry.
+
+@end enumerate")
+ (license asl2.0)))