aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 David Craven <david@craven.ch>
;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu services spice)
  #:use-module (gnu packages spice)
  #:use-module (gnu services)
  #:use-module (gnu services shepherd)
  #:use-module (guix deprecation)
  #:use-module (guix gexp)
  #:use-module (guix records)
  #:export (spice-vdagent-configuration
            spice-vdagent-configuration?
            spice-vdagent-service-type
            spice-vdagent-service))  ; deprecated

(define-record-type* <spice-vdagent-configuration>
  spice-vdagent-configuration make-spice-vdagent-configuration
  spice-vdagent-configuration?
  (spice-vdagent spice-vdagent-configuration-spice-vdagent
                 (default spice-vdagent)))

(define (spice-vdagent-shepherd-service config)
  "Return a <shepherd-service> for spice-vdagentd with CONFIG."
  (define spice-vdagent (spice-vdagent-configuration-spice-vdagent config))

  (define spice-vdagentd-command
    (list
     (file-append spice-vdagent "/sbin/spice-vdagentd")
     "-x"))

  (list
   (shepherd-service
    (documentation "Spice vdagentd service")
    (requirement '(dbus-system))
    (provision '(spice-vdagentd))
    (start #~(lambda args
               ;; spice-vdagentd supports being activated upon the client
               ;; connecting to its socket; when not using such feature, the
               ;; socket should not exist before vdagentd creates it itself.
               (mkdir-p "/run/spice-vdagentd")
               (false-if-exception
                (delete-file "/run/spice-vdagentd/spice-vdagent-sock"))
               (fork+exec-command '#$spice-vdagentd-command)))
    (stop #~(make-kill-destructor)))))

(define spice-vdagent-profile
  (compose list spice-vdagent-configuration-spice-vdagent))

(define spice-vdagent-service-type
  (service-type
   (name 'spice-vdagent)
   (default-value (spice-vdagent-configuration))
   (extensions
    (list (service-extension shepherd-root-service-type
                             spice-vdagent-shepherd-service)
          (service-extension profile-service-type
                             spice-vdagent-profile)))
   (description "Start the @command{vdagentd} and @command{vdagent} daemons
from the @code{spice-vdagent} package to enable window resizing and clipboard
sharing for @acronym{VM, virtual machine} guests.")))

(define-deprecated (spice-vdagent-service
                    #:optional (config (spice-vdagent-configuration)))
  "Start the @command{vdagentd} and @command{vdagent} daemons
from @var{spice-vdagent} to enable guest window resizing and
clipboard sharing."
  (service spice-vdagent-service-type config))
'>2022-08-30tests: image: New test.Mathieu Othacehe Add a new image test module to validate the image creation itself. The images structures are validated using guile-parted. Checking the content of those images is out of scope and should be performed in other modules (installation for instance). * gnu/tests/image.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. 2022-08-30image: Remove an unused field.Mathieu Othacehe * gnu/image.scm (<partition>)[device]: Remove it. 2022-08-30image: Perform more sanitizing.Mathieu Othacehe * gnu/image.scm (validate-size, validate-partition-offset, validate-partition-flags): New macros. (<partition>)[size, offset, flags]: Sanitize those fields using the above procedures respectively. 2022-08-30build: image: Make partition uuid optional.Mathieu Othacehe The uuid field of <partition> defaults to #false. This should be reflected when creating the partition. * gnu/build/image.scm (make-ext-image): Make it optional. 2022-08-30build: image: Remove unused variable.Mathieu Othacehe * gnu/build/image.scm (make-ext-image): Remove the unused flags variable. 2022-08-30gnu: Introduce versioned 'openssl-1.1' variable.Marius Bakke ...and use it in packages that do not yet support 3.0. * gnu/packages/tls.scm (openssl): Rename to ... (openssl-1.1): ... this. (openssl/fixed): Inherit from OPENSSL-1.1. (openssl-3.0): Likewise. (openssl): Turn into alias for OPENSSL-1.1. * gnu/packages/ruby.scm (ruby-2.6)[inputs]: Change from OPENSSL to OPENSSL-1.1. (ruby-3.0)[inputs]: Change "openssl" input to OPENSSL. (ruby-3.1): Inherit from RUBY-3.0. * gnu/packages/python.scm (python-2.7)[inputs]: Change from OPENSSL to OPENSSL-1.1. (python-3.9)[inputs]: Replace "openssl" with OPENSSL. * gnu/packages/python-crypto.scm (python-cryptography)[inputs]: Change from OPENSSL to OPENSSL-1.1. * gnu/packages/databases.scm (mariadb)[inputs]: Likewise. * gnu/packages/node.scm (node)[native-inputs, inputs]: Likewise. (node-lts)[native-inputs]: Likewise. 2022-08-30services: gitolite: Relax permissions on service user home directory.David Thompson Fixes https://issues.guix.gnu.org/56444 * gnu/services/version-control.scm (gitolite-activation): Modify permissions on home directory so that git group has read access. Reported-by: Evgeny Pisemsky <evgeny@pisemsky.com> Experienced by David Thompson for years, wondering what was wrong. Thanks for finding the root cause, Evgeny! :) 2022-08-30gnu: Add python-grid5000.msimonin * gnu/packages/python-web.scm (python-grid5000): New variable. Signed-off-by: Marius Bakke <marius@gnu.org> 2022-08-30gnu: accountsservice: Actually run the test suite.Marius Bakke * gnu/packages/freedesktop.scm (accountsservice)[native-inputs]: Add PYTHON. 2022-08-30gnu: accountsservice: Don't reference the build-time coreutils.Marius Bakke * gnu/packages/freedesktop.scm (accountsservice)[inputs]: Add COREUTILS-MINIMAL. 2022-08-30gnu: accountsservice: Remove obsolete input.Marius Bakke * gnu/packages/freedesktop.scm (accountsservice)[native-inputs]: Remove INTLTOOL. Add GETTEXT-MINIMAL. 2022-08-30gnu: mercurial: Update to 6.2.1.Marius Bakke * gnu/packages/version-control.scm (mercurial): Update to 6.2.1. [source](patches): Add patch for compatibility with OpenSSL 3.0. [arguments]: Patch /usr/bin/env and /bin/sh unconditionally in all tests. Disable four more tests. [inputs]: Change from PYTHON to PYTHON-WRAPPER. * gnu/packages/patches/mercurial-openssl-compat.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. 2022-08-30gnu: babl: Update to 0.1.96.Marius Bakke * gnu/packages/gimp.scm (babl): Update to 0.1.96. 2022-08-30gnu: vim: Update to 9.0.0325.Efraim Flashner * gnu/packages/vim.scm (vim): Update to 9.0.0325. 2022-08-30gnu: wayland-protocols: Fix cross-compilationTobias Kortkamp * gnu/packages/freedesktop.scm (wayland-protocols): Fix cross-compilation [native-inputs]: Add pkg-config-for-build and wayland. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> 2022-08-30gnu: yt-dlp: Don't ask to run tests when cross-compiling.Maxime Devos * gnu/packages/video.scm (yt-dlp)[arguments]{#:tests?}: When cross-compiling, set to #false. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> 2022-08-30gnu: rust: Don't ask to run tests when cross-compiling.Maxime Devos * gnu/packages/rust.scm (rust-1.57)[arguments]{#:tests?}: When cross-compiling, set to #false. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> 2022-08-30gnu: ruby-rubocop: Don't ask to run tests when cross-compiling.Maxime Devos * gnu/packages/ruby.scm (ruby-rubocop)[arguments]{#:tests?}: When cross-compiling, set to #false. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> 2022-08-30gnu: python-jaraco-context: Don't ask to run tests when cross-compiling.Maxime Devos * gnu/packages/python-xyz.scm (python-jaraco-context)[arguments]{#:tests?}: When cross-compiling, set to #false. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> 2022-08-30gnu: python-jupyter-client: Don't ask to run tests when cross-compiling.Maxime Devos * gnu/packages/python-xyz.scm (python-jupyter-client)[arguments]{#:tests?}: When cross-compiling, set to #false. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> 2022-08-30gnu: python-pip-run: Don't ask to run tests when cross-compiling.Maxime Devos * gnu/packages/python-xyz.scm (python-pip-run)[arguments]{#:tests?}: When cross-compiling, set to #false. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> 2022-08-30gnu: python-jaraco-functools: Don't ask to run tests when cross-compiling.Maxime Devos * gnu/packages/python-xyz.scm (python-jaraco-functools)[arguments]{#:tests?}: When cross-compiling, set to #false. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> 2022-08-30gnu: python-path: Don't ask to run tests when cross-compiling.Maxime Devos * gnu/packages/python-xyz.scm (python-path)[arguments]{#:tests?}: When cross-compiling, set to #false. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> 2022-08-30gnu: python-fonttools-full: Don't ask to run tests when cross-compiling.Maxime Devos * gnu/packages/python-xyz.scm (python-fonttools-full)[arguments]{#:tests?}: When cross-compiling, set to #false. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> 2022-08-30gnu: proot: Don't ask to run tests when cross-compiling.Maxime Devos * gnu/packages/linux.scm (proot)[arguments]{#:tests?}: When cross-compiling, set to #false. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> 2022-08-30gnu: julia-interpolations: Don't ask to run tests when cross-compiling.Maxime Devos * gnu/packages/julia-xyz.scm (julia-interpolations)[arguments]{#:tests?}: When cross-compiling, set to #false. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> 2022-08-30gnu: julia-reversediff: Don't ask to run tests when cross-compiling.Maxime Devos * gnu/packages/julia-xyz.scm (julia-reversediff)[arguments]{#:tests?}: When cross-compiling, set to #false. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> 2022-08-30gnu: julia-forwarddiff: Don't ask to run tests when cross-compiling.Maxime Devos * gnu/packages/julia-xyz.scm (julia-forwarddiff)[arguments]{#:tests?}: When cross-compiling, set to #false. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> 2022-08-30gnu: julia-arrayinterface: Don't ask to run tests when cross-compiling.Maxime Devos * gnu/packages/julia-xyz.scm (julia-arrayinterface)[arguments]{#:tests?}: When cross-compiling, set to #false. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> 2022-08-30gnu: ghc-statistics: Properly enable tests.Maxime Devos The comment states there are test failures and hence it is implied that the intent was to disable tests, not enable them, but tests pass and the code below enabled tests instead of disabling them. Remove #:tests? #true to satisfy the tests-true linter. * gnu/packages/haskell-xyz.scm (ghc-statistics)[arguments]{#:tests?}: Remove. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> 2022-08-30bootloader: Wrap lines.Mathieu Othacehe * gnu/bootloader (<bootloader-configuration>): Wrap lines, no functional change. 2022-08-30bootloader: Add device-tree-support? option.Reza Alizadeh Majd In some specific cases where the device tree file is already loaded in RAM, it can be preferable that the bootloader does not try to use a device tree from the Linux kernel tree. * gnu/bootloader.scm (<bootloader-configuration>)[device-tree-support?]: New field. * gnu/bootloader/extlinux.scm (extlinux-configuration-file): Add FDTDIR line based on <device-tree-support?> field of <bootloader-configuration>. * doc/guix.texi (Bootloader Configuration)[device-tree-support?]: Add documentation for the new field. 2022-08-30gnu: Add hydrus-network.Tomasz Jeneralczyk * gnu/packages/image-viewers.scm (hydrus-network): Add variable. Co-authored-by: Ludovic Courtès <ludo@gnu.org> 2022-08-30gnu: python-cloudscraper: Update to 1.2.60.Tomasz Jeneralczyk * gnu/packages/python-web.scm (python-cloudscraper): Update to 1.2.60 [propagated-inputs]: Change python-pyparsing to its mainstream version. Co-authored-by: Ludovic Courtès <ludo@gnu.org> 2022-08-30gnu: opencv: Build Python bindings.Tomasz Jeneralczyk * gnu/packages/image-processing.scm (opencv)[arguments]: Change variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org> 2022-08-30gnu: Add python-mpv.Tomasz Jeneralczyk * gnu/packages/python-xyz.scm (python-mpv): Add variable. Co-authored-by: Ludovic Courtès <ludo@gnu.org> 2022-08-30gnu: Add python-xvfbwrapper.Tomasz Jeneralczyk * gnu/packages/python-check.scm (python-xvfbwrapper): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org> 2022-08-30gnu: Add swftools.Tomasz Jeneralczyk * gnu/packages/animation.scm (swftools): Add variable. Co-authored-by: Ludovic Courtès <ludo@gnu.org> 2022-08-30gnu: Add mmg.Paul A. Patience * gnu/packages/graphics.scm (mmg): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org> 2022-08-30services: provenance: Use 'current-channels' to obtain provenance data.Ludovic Courtès Previously, build-time metadata from (guix config) would be ignored when available--e.g., when running /run/current-system/profile/bin/guix. This is a followup to 316fc2acbb112bfa572ae30f95a93bcd56621234. * gnu/services.scm (provenance-entry): Use 'current-channels' instead of 'current-profile' + 'profile-channels'. 2022-08-29gnu: Add missing copyright line.Marius Bakke This is a follow-up to commit 3e0abde17be944153be57ab5faeefc645266d39d. * gnu/tests/virtualization.scm: Add copyright header for myself. 2022-08-29tests: libvirt: Ensure the default network can be started.Marius Bakke * gnu/tests/virtualization.scm (run-libvirt-test): Run commands to create and start the default network.