summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/gnome.scm146
-rw-r--r--gnu/packages/xml.scm33
-rw-r--r--gnu/system.scm4
-rw-r--r--gnu/system/examples/bare-bones.tmpl5
-rw-r--r--gnu/system/examples/desktop.tmpl5
-rw-r--r--gnu/system/shadow.scm46
6 files changed, 232 insertions, 7 deletions
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index eefe75de1e..35af94f4fc 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
 ;;; Copyright © 2015 Andy Wingo <wingo@igalia.com>
 ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
+;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -60,6 +61,7 @@
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages python)
   #:use-module (gnu packages scanner)
+  #:use-module (gnu packages ssh)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages compression)
@@ -181,6 +183,50 @@ Gnome project.  It includes xml2po tool which makes it easier to translate
 and keep up to date translations of documentation.")
     (license license:gpl2+))) ; xslt under lgpl
 
+(define-public gcr
+  (package
+    (name "gcr")
+    (version "3.16.0")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "mirror://gnome/sources/" name "/"
+                                 (version-major+minor version)  "/"
+                                 name "-" version ".tar.xz"))
+             (sha256
+              (base32
+               "0xfhi0w358lvca1jjx24x2gm67mif33dsnmi9cv5i0f83ks8vzpc"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:tests? #f ;25 of 598 tests fail because /var/lib/dbus/machine-id does
+                   ;not exist
+       #:phases (modify-phases %standard-phases
+                  (add-before
+                   'check 'pre-check
+                   (lambda* (#:key inputs #:allow-other-keys)
+                     (substitute* "build/tap-driver"
+                       (("/usr/bin/env python") (which "python"))))))))
+    (inputs
+     `(("dbus" ,dbus)
+       ("gnupg" ,gnupg) ;called as a child process during tests
+       ("libgcrypt" ,libgcrypt)))
+    (native-inputs
+     `(("python" ,python-2) ;for tests
+       ("pkg-config" ,pkg-config)
+       ("glib" ,glib "bin")
+       ("intltool" ,intltool)))
+    ;; mentioned in gck.pc, gcr.pc and gcr-ui.pc
+    (propagated-inputs
+     `(("p11-kit" ,p11-kit)
+       ("glib" ,glib)
+       ("gtk+" ,gtk+)))
+    (home-page "http://www.gnome.org")
+    (synopsis "Libraries for displaying certificates and accessing key stores")
+    (description
+     "The GCR package contains libraries used for displaying certificates and
+accessing key stores.  It also provides the viewer for crypto files on the
+GNOME Desktop.")
+    (license license:lgpl2.1+)))
+
 (define-public libgnome-keyring
   (package
     (name "libgnome-keyring")
@@ -212,6 +258,73 @@ and keep up to date translations of documentation.")
     ;; Though a couple of files are LGPLv2.1+.
     (license license:lgpl2.0+)))
 
+(define-public gnome-keyring
+  (package
+    (name "gnome-keyring")
+    (version "3.16.0")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "mirror://gnome/sources/" name "/"
+                                 (version-major+minor version)  "/"
+                                 name "-" version ".tar.xz"))
+             (sha256
+              (base32
+               "1xg1xha3x3hzlmvdq2zm90hc61pj7pnf9yxxvgq4ynl5af6bp8qm"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ;48 of 603 tests fail because /var/lib/dbus/machine-id does
+                   ;not exist
+       #:configure-flags
+       (list
+        (string-append "--with-pkcs11-config="
+                       (assoc-ref %outputs "out") "/share/p11-kit/modules/")
+        (string-append "--with-pkcs11-modules="
+                       (assoc-ref %outputs "out") "/share/p11-kit/modules/"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before
+          'check 'pre-check
+          (lambda* (#:key inputs #:allow-other-keys)
+            (substitute* "build/tap-driver"
+              (("/usr/bin/env python") (which "python")))))
+         (add-before
+          'configure 'fix-docbook
+          (lambda* (#:key inputs #:allow-other-keys)
+            (substitute* "docs/Makefile.am"
+              (("http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl")
+               (string-append (assoc-ref inputs "docbook-xsl")
+                              "/xml/xsl/docbook-xsl-"
+                              ,(package-version docbook-xsl)
+                              "/manpages/docbook.xsl")))
+            (setenv "XML_CATALOG_FILES"
+                    (string-append (assoc-ref inputs "docbook-xml")
+                                   "/xml/dtd/docbook/catalog.xml")))))))
+    (inputs
+     `(("libgcrypt" ,libgcrypt)
+       ("dbus" ,dbus)
+       ("gcr" ,gcr)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("glib" ,glib "bin")
+       ("python" ,python-2) ;for tests
+       ("intltool" ,intltool)
+       ("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libxslt" ,libxslt) ;for documentation
+       ("docbook-xml" ,docbook-xml-4.2)
+       ("docbook-xsl" ,docbook-xsl)))
+    (home-page "http://www.gnome.org")
+    (synopsis "Daemon to store passwords and encryption keys")
+    (description
+     "gnome-keyring is a program that keeps passwords and other secrets for
+users.  It is run as a daemon in the session, similar to ssh-agent, and other
+applications locate it via an environment variable or D-Bus.
+
+The program can manage several keyrings, each with its own master password,
+and there is also a session keyring which is never stored to disk, but
+forgotten when the session ends.")
+    (license license:lgpl2.1+)))
+
 (define-public evince
   (package
     (name "evince")
@@ -1412,6 +1525,39 @@ engineering.")
      "The default GNOME 3 themes (Adwaita and some accessibility themes).")
     (license license:lgpl2.1+)))
 
+(define-public seahorse
+  (package
+    (name "seahorse")
+    (version "3.16.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://gnome/sources/" name "/"
+                           (version-major+minor version) "/" name "-"
+                           version ".tar.xz"))
+       (sha256
+        (base32
+         "0cg1grgpwbfkiny5148n17rzpc8kswyr5yff0kpm8l3lp01my2kp"))))
+    (build-system glib-or-gtk-build-system)
+    (inputs
+     `(("gtk+" ,gtk+)
+       ("gcr" ,gcr)
+       ("gnupg" ,gnupg-1)
+       ("gpgme" ,gpgme)
+       ("openssh" ,openssh)
+       ("libsecret" ,libsecret)))
+    (native-inputs
+     `(("intltool" ,intltool)
+       ("glib:bin" ,glib "bin")
+       ("itstool" ,itstool)
+       ("pkg-config" ,pkg-config)))
+    (home-page "https://launchpad.net/gnome-themes-standard")
+    (synopsis "Manage encryption keys and passwords in the GNOME keyring")
+    (description
+     "Seahorse is a GNOME application for managing encryption keys and
+passwords in the GNOME keyring.")
+    (license license:gpl2+)))
+
 (define-public vala
   (package
     (name "vala")
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index d30c40ce1a..8a4d2fbb5b 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
+;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -20,8 +20,10 @@
 
 (define-module (gnu packages xml)
   #:use-module (gnu packages)
+  #:use-module (gnu packages autotools)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages gnupg)
+  #:use-module (gnu packages gnutls)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages python)
   #:use-module (gnu packages web)
@@ -387,3 +389,32 @@ that conforms to the API of the Document Object Model.")
 stylesheet for the conversion you want and applies it using an external
 XSL-T processor.  It also performs any necessary post-processing.")
     (license license:gpl2+)))
+
+(define-public xmlsec
+  (package
+    (name "xmlsec")
+    (version "1.2.20")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "https://www.aleksey.com/xmlsec/download/"
+                                 name "1-" version ".tar.gz"))
+             (sha256
+              (base32
+               "01bkbv2y3x8d1sf4dcln1x3y2jyj391s3208d9a2ndhglly5j89j"))))
+    (build-system gnu-build-system)
+    (propagated-inputs ; according to xmlsec1.pc
+     `(("libxml2" ,libxml2)
+       ("libxslt" ,libxslt)))
+    (inputs
+     `(("gnutls" ,gnutls)
+       ("libgcrypt" ,libgcrypt)
+       ("libltdl" ,libltdl)))
+    (home-page "http://www.libexpat.org/")
+    (synopsis "XML Security Library")
+    (description
+     "The XML Security Library is a C library based on Libxml2.  It
+supports XML security standards such as XML Signature, XML Encryption,
+Canonical XML (part of Libxml2) and Exclusive Canonical XML (part of
+Libxml2).")
+    (license (license:x11-style "file://COPYING"
+                                "See 'COPYING' in the distribution."))))
diff --git a/gnu/system.scm b/gnu/system.scm
index b8d0e62f60..c4a3bee0eb 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -119,7 +119,7 @@
                 (default '()))
 
   (users operating-system-users                   ; list of user accounts
-         (default '()))
+         (default %base-user-accounts))
   (groups operating-system-groups                 ; list of user groups
           (default %base-groups))
 
@@ -686,6 +686,8 @@ etc."
     (define group-specs
       (map user-group->gexp groups))
 
+    (assert-valid-users/groups accounts groups)
+
     (gexp->file "activate"
                 #~(begin
                     (eval-when (expand load eval)
diff --git a/gnu/system/examples/bare-bones.tmpl b/gnu/system/examples/bare-bones.tmpl
index 8f4faca2d3..dc5cfc81a4 100644
--- a/gnu/system/examples/bare-bones.tmpl
+++ b/gnu/system/examples/bare-bones.tmpl
@@ -23,7 +23,7 @@
   ;; This is where user accounts are specified.  The "root"
   ;; account is implicit, and is initially created with the
   ;; empty password.
-  (users (list (user-account
+  (users (cons (user-account
                 (name "alice")
                 (comment "Bob's sister")
                 (group "users")
@@ -34,7 +34,8 @@
                 ;; and access the webcam.
                 (supplementary-groups '("wheel"
                                         "audio" "video"))
-                (home-directory "/home/alice"))))
+                (home-directory "/home/alice"))
+               %base-user-accounts))
 
   ;; Globally-installed packages.
   (packages (cons tcpdump %base-packages))
diff --git a/gnu/system/examples/desktop.tmpl b/gnu/system/examples/desktop.tmpl
index c78188eb61..988b8f937f 100644
--- a/gnu/system/examples/desktop.tmpl
+++ b/gnu/system/examples/desktop.tmpl
@@ -20,13 +20,14 @@
                         (type "ext4"))
                       %base-file-systems))
 
-  (users (list (user-account
+  (users (cons (user-account
                 (name "bob")
                 (comment "Alice's brother")
                 (group "users")
                 (supplementary-groups '("wheel" "netdev"
                                         "audio" "video"))
-                (home-directory "/home/bob"))))
+                (home-directory "/home/bob"))
+               %base-user-accounts))
 
   ;; Add Xfce and Ratpoison; that allows us to choose
   ;; sessions using either of these at the log-in screen.
diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm
index 16b9e4b555..aa97652678 100644
--- a/gnu/system/shadow.scm
+++ b/gnu/system/shadow.scm
@@ -21,12 +21,17 @@
   #:use-module (guix gexp)
   #:use-module (guix store)
   #:use-module (guix monads)
+  #:use-module (guix sets)
+  #:use-module (guix ui)
   #:use-module ((gnu system file-systems)
                 #:select (%tty-gid))
   #:use-module ((gnu packages admin)
                 #:select (shadow))
   #:use-module (gnu packages bash)
   #:use-module (gnu packages guile-wm)
+  #:use-module (srfi srfi-26)
+  #:use-module (srfi srfi-34)
+  #:use-module (srfi srfi-35)
   #:export (user-account
             user-account?
             user-account-name
@@ -48,7 +53,9 @@
 
             default-skeletons
             skeleton-directory
-            %base-groups))
+            %base-groups
+            %base-user-accounts
+            assert-valid-users/groups))
 
 ;;; Commentary:
 ;;;
@@ -107,6 +114,16 @@
           (system-group (name "tape"))
           (system-group (name "kvm")))))             ; for /dev/kvm
 
+(define %base-user-accounts
+  ;; List of standard user accounts.  Note that "root" is a special case, so
+  ;; it's not listed here.
+  (list (user-account
+         (name "nobody")
+         (uid 65534)
+         (group "nogroup")
+         (home-directory "/var/empty")
+         (system? #t))))
+
 (define (default-skeletons)
   "Return the default skeleton files for /etc/skel.  These files are copied by
 'useradd' in the home directory of newly created user accounts."
@@ -176,4 +193,31 @@ set debug-file-directory ~/.guix-profile/lib/debug\n")))
                                   '#$skeletons)
                         #t)))
 
+(define (assert-valid-users/groups users groups)
+  "Raise an error if USERS refer to groups not listed in GROUPS."
+  (let ((groups (list->set (map user-group-name groups))))
+    (define (validate-supplementary-group user group)
+      (unless (set-contains? groups group)
+        (raise (condition
+                (&message
+                 (message
+                  (format #f (_ "supplementary group '~a' \
+of user '~a' is undeclared")
+                          group
+                          (user-account-name user))))))))
+
+    (for-each (lambda (user)
+                (unless (set-contains? groups (user-account-group user))
+                  (raise (condition
+                          (&message
+                           (message
+                            (format #f (_ "primary group '~a' \
+of user '~a' is undeclared")
+                                    (user-account-group user)
+                                    (user-account-name user)))))))
+
+                (for-each (cut validate-supplementary-group user <>)
+                          (user-account-supplementary-groups user)))
+              users)))
+
 ;;; shadow.scm ends here