diff options
-rw-r--r-- | doc/guix.texi | 38 | ||||
-rw-r--r-- | gnu/local.mk | 1 | ||||
-rw-r--r-- | gnu/packages/databases.scm | 5 | ||||
-rw-r--r-- | gnu/packages/freedesktop.scm | 4 | ||||
-rw-r--r-- | gnu/packages/geo.scm | 3 | ||||
-rw-r--r-- | gnu/packages/gl.scm | 8 | ||||
-rw-r--r-- | gnu/packages/patches/postgresql-disable-resolve_symlinks.patch | 25 | ||||
-rw-r--r-- | gnu/packages/ruby.scm | 25 | ||||
-rw-r--r-- | gnu/packages/vulkan.scm | 11 | ||||
-rw-r--r-- | gnu/packages/xdisorg.scm | 4 | ||||
-rw-r--r-- | gnu/services/databases.scm | 63 |
11 files changed, 150 insertions, 37 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index 7158a1d091..aeb6e385b3 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -14184,13 +14184,49 @@ The @code{(gnu services databases)} module provides the following services. @deffn {Scheme Procedure} postgresql-service [#:postgresql postgresql] @ [#:config-file] [#:data-directory ``/var/lib/postgresql/data''] @ - [#:port 5432] [#:locale ``en_US.utf8''] + [#:port 5432] [#:locale ``en_US.utf8''] [#:extension-packages '()] Return a service that runs @var{postgresql}, the PostgreSQL database server. The PostgreSQL daemon loads its runtime configuration from @var{config-file}, creates a database cluster with @var{locale} as the default locale, stored in @var{data-directory}. It then listens on @var{port}. + +@cindex postgresql extension-packages +Additional extensions are loaded from packages listed in +@var{extension-packages}. Extensions are available at runtime. For instance, +to create a geographic database using the @code{postgis} extension, a user can +configure the postgresql-service as in this example: + +@cindex postgis +@example +(use-package-modules databases geo) + +(operating-system + ... + ;; postgresql is required to run `psql' but postgis is not required for + ;; proper operation. + (packages (cons* postgresql %base-packages)) + (services + (cons* + (postgresql-service #:extension-packages (list postgis)) + %base-services))) +@end example + +Then the extension becomes visible and you can initialise an empty geographic +database in this way: + +@example +psql -U postgres +> create database postgistest; +> \connect postgistest; +> create extension postgis; +> create extension postgis_topology; +@end example + +There is no need to add this field for contrib extensions such as hstore or +dblink as they are already loadable by postgresql. This field is only +required to add extensions provided by other packages. @end deffn @deffn {Scheme Procedure} mysql-service [#:config (mysql-configuration)] diff --git a/gnu/local.mk b/gnu/local.mk index 847c9286cc..108ccdceda 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1066,6 +1066,7 @@ dist_patch_DATA = \ %D%/packages/patches/poppler-CVE-2018-19149.patch \ %D%/packages/patches/portaudio-audacity-compat.patch \ %D%/packages/patches/portmidi-modular-build.patch \ + %D%/packages/patches/postgresql-disable-resolve_symlinks.patch \ %D%/packages/patches/potrace-tests.patch \ %D%/packages/patches/procmail-ambiguous-getline-debian.patch \ %D%/packages/patches/procmail-CVE-2014-3618.patch \ diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index d7b35834fe..3067cf5364 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -18,7 +18,7 @@ ;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca> ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org> ;;; Copyright © 2016, 2017, 2018 Marius Bakke <mbakke@fastmail.com> -;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu> +;;; Copyright © 2017, 2018 Julien Lepiller <julien@lepiller.eu> ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be> ;;; Copyright © 2017 Jelle Licht <jlicht@fsfe.org> ;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com> @@ -811,7 +811,8 @@ as a drop-in replacement of MySQL.") version "/postgresql-" version ".tar.bz2")) (sha256 (base32 - "0jv26y3f10svrjxzsgqxg956c86b664azyk2wppzpa5x11pjga38")))) + "0jv26y3f10svrjxzsgqxg956c86b664azyk2wppzpa5x11pjga38")) + (patches (search-patches "postgresql-disable-resolve_symlinks.patch")))) (build-system gnu-build-system) (arguments `(#:configure-flags '("--with-uuid=e2fs") diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm index 293916c4d2..d07edcdb72 100644 --- a/gnu/packages/freedesktop.scm +++ b/gnu/packages/freedesktop.scm @@ -471,7 +471,7 @@ applications, X servers (rootless or fullscreen) or other display servers.") (define-public wayland-protocols (package (name "wayland-protocols") - (version "1.15") + (version "1.17") (source (origin (method url-fetch) (uri (string-append @@ -479,7 +479,7 @@ applications, X servers (rootless or fullscreen) or other display servers.") "wayland-protocols-" version ".tar.xz")) (sha256 (base32 - "1qlyf9cllr2p339xxplznh023qcwj5iisp02ikx7ps349dx75fys")))) + "0bw1sqixqk2a7mqw630cs4dlgcp5yib90vyikzm3lr05jz7ij4yz")))) (build-system gnu-build-system) (inputs `(("wayland" ,wayland))) diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm index fa2b259d7c..26f566a18b 100644 --- a/gnu/packages/geo.scm +++ b/gnu/packages/geo.scm @@ -753,7 +753,8 @@ utilities for data translation and processing.") (synopsis "Spatial database extender for PostgreSQL") (description "PostGIS is a spatial database extender for PostgreSQL object-relational database. It adds support for geographic objects allowing -location queries to be run in SQL.") +location queries to be run in SQL. This package provides a PostgreSQL +extension.") (license (list ;; General license license:gpl2+ diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index d7c112928f..9ae7e5613e 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -220,7 +220,7 @@ also known as DXTn or DXTC) for Mesa.") (define-public mesa (package (name "mesa") - (version "18.1.8") + (version "18.2.3") (source (origin (method url-fetch) @@ -232,7 +232,7 @@ also known as DXTn or DXTC) for Mesa.") version "/mesa-" version ".tar.xz"))) (sha256 (base32 - "06y28hpynb8w1qagznr85ml48hf8264w4ji6cmvm2fy7x5zyc6xx")) + "00rrg8i1ykwvrg94gcsvjy1l9ih8bqafkq9x122h3rkk5cvmnjcz")) (patches (search-patches "mesa-skip-disk-cache-test.patch")))) (build-system gnu-build-system) @@ -252,6 +252,7 @@ also known as DXTn or DXTC) for Mesa.") ("libva" ,(force libva-without-mesa)) ("libxml2" ,libxml2) ;; TODO: Add 'libxml2-python' for OpenGL ES 1.1 and 2.0 support + ("libxrandr" ,libxrandr) ("libxvmc" ,libxvmc) ,@(match (%current-system) ((or "x86_64-linux" "i686-linux") @@ -290,9 +291,6 @@ also known as DXTn or DXTC) for Mesa.") "--enable-gles2" "--enable-gbm" "--enable-shared-glapi" - ;; Without floating point texture support, drivers such as Nouveau - ;; are stuck at OpenGL 2.1 instead of OpenGL 3.0+. - "--enable-texture-float" ;; Enable Vulkan on i686-linux and x86-64-linux. ,@(match (%current-system) diff --git a/gnu/packages/patches/postgresql-disable-resolve_symlinks.patch b/gnu/packages/patches/postgresql-disable-resolve_symlinks.patch new file mode 100644 index 0000000000..97ef6928fe --- /dev/null +++ b/gnu/packages/patches/postgresql-disable-resolve_symlinks.patch @@ -0,0 +1,25 @@ +From 223c82d1d6ed1f29f26307249827ff679e09c780 Mon Sep 17 00:00:00 2001 +From: Julien Lepiller <julien@lepiller.eu> +Date: Sat, 28 Jul 2018 12:22:12 +0200 +Subject: [PATCH] disable resolve_symlink + +--- + src/common/exec.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/common/exec.c b/src/common/exec.c +index 878fc29..6b3e283 100644 +--- a/src/common/exec.c ++++ b/src/common/exec.c +@@ -218,6 +218,8 @@ find_my_exec(const char *argv0, char *retpath) + static int + resolve_symlinks(char *path) + { ++ // On GuixSD we *want* stuff relative to symlinks. ++ return 0; + #ifdef HAVE_READLINK + struct stat buf; + char orig_wd[MAXPGPATH], +-- +2.18.0 + diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 2fde016851..8f6693237f 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -55,7 +55,7 @@ (define-public ruby (package (name "ruby") - (version "2.4.3") + (version "2.5.1") (source (origin (method url-fetch) @@ -64,8 +64,7 @@ "/ruby-" version ".tar.xz")) (sha256 (base32 - "0l9bv67dgsphk42lmiskhrnh47hbyj6rfg2rcjx22xivpx07srr3")) - (patches (search-patches "ruby-rubygems-276-for-ruby24.patch")) + "0kbm3gkv689d1mb8fh261z8s79d6hw07p0xyk735yfqyskpcasl8")) (modules '((guix build utils))) (snippet `(begin ;; Remove bundled libffi @@ -107,6 +106,26 @@ a focus on simplicity and productivity.") (home-page "https://www.ruby-lang.org") (license license:ruby))) +(define-public ruby-2.4 + (package + (inherit ruby) + (version "2.4.3") + (source + (origin + (method url-fetch) + (uri (string-append "http://cache.ruby-lang.org/pub/ruby/" + (version-major+minor version) + "/ruby-" version ".tar.xz")) + (sha256 + (base32 + "0l9bv67dgsphk42lmiskhrnh47hbyj6rfg2rcjx22xivpx07srr3")) + (patches (search-patches "ruby-rubygems-276-for-ruby24.patch")) + (modules '((guix build utils))) + (snippet `(begin + ;; Remove bundled libffi + (delete-file-recursively "ext/fiddle/libffi-3.2.1") + #t)))))) + (define-public ruby-2.3 (package (inherit ruby) diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm index ff1088d2e1..3608196e5d 100644 --- a/gnu/packages/vulkan.scm +++ b/gnu/packages/vulkan.scm @@ -163,7 +163,7 @@ interpretation of the specifications for these languages.") (define-public vulkan-headers (package (name "vulkan-headers") - (version "1.1.85.0") + (version "1.1.92.0") (source (origin (method url-fetch) @@ -172,7 +172,7 @@ interpretation of the specifications for these languages.") "archive/sdk-" version ".tar.gz")) (sha256 (base32 - "166hqqb97kjg6h9vp8yxb1cq02i1kqaxvl693482gf8v21fl7ink")))) + "06bgiz1dnp57597vd26r2smsadpcnr425n9gfdbp6xm4wba4l5l9")))) (build-system cmake-build-system) (arguments `(#:tests? #f)) ; No tests. @@ -186,7 +186,8 @@ interpretation of the specifications for these languages.") (define-public vulkan-loader (package (name "vulkan-loader") - (version (package-version vulkan-headers)) + ;; TODO: Inherit from vulkan-headers when version numbers match again + (version "1.1.92.1") (source (origin (method url-fetch) @@ -195,7 +196,7 @@ interpretation of the specifications for these languages.") "archive/sdk-" version ".tar.gz")) (sha256 (base32 - "04d53ynlc0ww8r67hv4sxwg5sirjhpr1laaa9hc6j4niliw0166n")))) + "1kx07ypbwnmn6cxv9z0vbngq5l83f1sffzh7wmkzrl69y1cmazi0")))) (build-system cmake-build-system) (arguments `(#:tests? #f ;FIXME: 23/39 tests fail. Try "tests/run_all_tests.sh". @@ -251,7 +252,7 @@ and the ICD.") "archive/sdk-" version ".tar.gz")) (sha256 (base32 - "0r26px9rh09giddajlmafv21rx1la1y3bbnjgnpai8aw98wvq9mm")))) + "0yd9dgkyradlk9gx0ps65nans7b29jg5c67b4m34ghpmy933dwx6")))) (build-system cmake-build-system) (inputs `(("glslang" ,glslang) diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm index 82ed065a3f..fdbe19c059 100644 --- a/gnu/packages/xdisorg.scm +++ b/gnu/packages/xdisorg.scm @@ -318,7 +318,7 @@ rasterisation.") (define-public libdrm (package (name "libdrm") - (version "2.4.93") + (version "2.4.96") (source (origin (method url-fetch) @@ -328,7 +328,7 @@ rasterisation.") ".tar.bz2")) (sha256 (base32 - "0g6d9wsnb7lx8r1m4kq8js0wsc5jl20cz1csnlh6z9s8jpfd313f")) + "14xkip83qgljjaahzq40qgl60j54q7k00la1hbf5kk5lgg7ilmhd")) (patches (search-patches "libdrm-symbol-check.patch")))) (build-system gnu-build-system) (arguments diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm index aff78a0566..7113f1f2a1 100644 --- a/gnu/services/databases.scm +++ b/gnu/services/databases.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2016 Leo Famulari <leo@famulari.name> ;;; Copyright © 2017 Christopher Baines <mail@cbaines.net> ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org> +;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu> ;;; ;;; This file is part of GNU Guix. ;;; @@ -26,7 +27,10 @@ #:use-module (gnu system shadow) #:use-module (gnu packages admin) #:use-module (gnu packages databases) + #:use-module (guix build-system trivial) + #:use-module (guix build union) #:use-module (guix modules) + #:use-module (guix packages) #:use-module (guix records) #:use-module (guix gexp) #:use-module (srfi srfi-1) @@ -141,16 +145,18 @@ host all all ::1/128 trust")) (define-record-type* <postgresql-configuration> postgresql-configuration make-postgresql-configuration postgresql-configuration? - (postgresql postgresql-configuration-postgresql ;<package> - (default postgresql)) - (port postgresql-configuration-port - (default 5432)) - (locale postgresql-configuration-locale - (default "en_US.utf8")) - (config-file postgresql-configuration-file - (default (postgresql-config-file))) - (data-directory postgresql-configuration-data-directory - (default "/var/lib/postgresql/data"))) + (postgresql postgresql-configuration-postgresql ;<package> + (default postgresql)) + (port postgresql-configuration-port + (default 5432)) + (locale postgresql-configuration-locale + (default "en_US.utf8")) + (config-file postgresql-configuration-file + (default (postgresql-config-file))) + (data-directory postgresql-configuration-data-directory + (default "/var/lib/postgresql/data")) + (extension-packages postgresql-configuration-extension-packages + (default '()))) (define %postgresql-accounts (list (user-group (name "postgres") (system? #t)) @@ -162,15 +168,36 @@ host all all ::1/128 trust")) (home-directory "/var/empty") (shell (file-append shadow "/sbin/nologin"))))) +(define (final-postgresql postgresql extension-packages) + (if (null? extension-packages) + postgresql + (package + (inherit postgresql) + (source #f) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils) (guix build union)) + #:builder + (begin + (use-modules (guix build utils) (guix build union) (srfi srfi-26)) + (union-build (assoc-ref %outputs "out") (map (lambda (input) (cdr input)) %build-inputs)) + #t))) + (inputs + `(("postgresql" ,postgresql) + ,@(map (lambda (extension) (list "extension" extension)) + extension-packages)))))) + (define postgresql-activation (match-lambda - (($ <postgresql-configuration> postgresql port locale config-file data-directory) + (($ <postgresql-configuration> postgresql port locale config-file data-directory + extension-packages) #~(begin (use-modules (guix build utils) (ice-9 match)) (let ((user (getpwnam "postgres")) - (initdb (string-append #$postgresql "/bin/initdb")) + (initdb (string-append #$(final-postgresql postgresql extension-packages) + "/bin/initdb")) (initdb-args (append (if #$locale @@ -202,7 +229,8 @@ host all all ::1/128 trust")) (define postgresql-shepherd-service (match-lambda - (($ <postgresql-configuration> postgresql port locale config-file data-directory) + (($ <postgresql-configuration> postgresql port locale config-file data-directory + extension-packages) (let* ((pg_ctl-wrapper ;; Wrapper script that switches to the 'postgres' user before ;; launching daemon. @@ -214,7 +242,8 @@ host all all ::1/128 trust")) (match (command-line) ((_ mode) (let ((user (getpwnam "postgres")) - (pg_ctl #$(file-append postgresql "/bin/pg_ctl")) + (pg_ctl #$(file-append (final-postgresql postgresql extension-packages) + "/bin/pg_ctl")) (options (format #f "--config-file=~a -p ~d" #$config-file #$port))) (setgid (passwd:gid user)) @@ -253,7 +282,8 @@ host all all ::1/128 trust")) (port 5432) (locale "en_US.utf8") (config-file (postgresql-config-file)) - (data-directory "/var/lib/postgresql/data")) + (data-directory "/var/lib/postgresql/data") + (extension-packages '())) "Return a service that runs @var{postgresql}, the PostgreSQL database server. The PostgreSQL daemon loads its runtime configuration from @var{config-file} @@ -264,7 +294,8 @@ and stores the database cluster in @var{data-directory}." (port port) (locale locale) (config-file config-file) - (data-directory data-directory)))) + (data-directory data-directory) + (extension-packages extension-packages)))) ;;; |