summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2020-10-19 00:17:48 +0200
committerMarius Bakke <marius@gnu.org>2020-10-19 00:17:48 +0200
commit1a8f7a0f584e5dd6e8f1a379b92f689b71902295 (patch)
tree8586450fc3068b217e60a7e942fa4c7d89ad74e7 /guix
parent19d42e0e23a7f90ac2dcc1c279bd23a967ff0314 (diff)
parent2a4f3c1711fdb947e615b5a89e285421b3bf0925 (diff)
downloadguix-patches-1a8f7a0f584e5dd6e8f1a379b92f689b71902295.tar
guix-patches-1a8f7a0f584e5dd6e8f1a379b92f689b71902295.tar.gz
Merge branch 'master' into staging
Diffstat (limited to 'guix')
-rw-r--r--guix/build/go-build-system.scm13
-rw-r--r--guix/gexp.scm18
-rw-r--r--guix/import/utils.scm14
-rw-r--r--guix/licenses.scm10
-rw-r--r--guix/openpgp.scm6
-rw-r--r--guix/scripts/system.scm2
-rw-r--r--guix/ui.scm3
7 files changed, 57 insertions, 9 deletions
diff --git a/guix/build/go-build-system.scm b/guix/build/go-build-system.scm
index b9cb2bfd7b..227df820db 100644
--- a/guix/build/go-build-system.scm
+++ b/guix/build/go-build-system.scm
@@ -4,6 +4,7 @@
;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2020 Jack Hill <jackhill@jackhill.us>
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
+;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -254,6 +255,17 @@ XXX We can't make use of compiled libraries (Go \"packages\")."
(copy-recursively source dest #:keep-mtime? #t)))
#t)
+(define* (install-license-files #:key unpack-path
+ import-path
+ #:allow-other-keys
+ #:rest args)
+ "Install license files matching LICENSE-FILE-REGEXP to 'share/doc'. Adjust
+the standard install-license-files phase to first enter the correct directory."
+ (with-directory-excursion (string-append "src/" (if (string-null? unpack-path)
+ import-path
+ unpack-path))
+ (apply (assoc-ref gnu:%standard-phases 'install-license-files) args)))
+
(define* (remove-store-reference file file-name
#:optional (store (%store-directory)))
"Remove from FILE occurrences of FILE-NAME in STORE; return #t when FILE-NAME
@@ -317,6 +329,7 @@ files in OUTPUTS."
(replace 'build build)
(replace 'check check)
(replace 'install install)
+ (replace 'install-license-files install-license-files)
(add-after 'install 'remove-go-references remove-go-references)))
(define* (go-build #:key inputs (phases %standard-phases)
diff --git a/guix/gexp.scm b/guix/gexp.scm
index 25e4881d21..9339b226b7 100644
--- a/guix/gexp.scm
+++ b/guix/gexp.scm
@@ -48,6 +48,7 @@
gexp-input-output
gexp-input-native?
+ assume-valid-file-name
local-file
local-file?
local-file-file
@@ -424,6 +425,12 @@ vicinity of DIRECTORY."
(string-append directory "/" file))
(else file))))
+(define-syntax-rule (assume-valid-file-name file)
+ "This is a syntactic keyword to tell 'local-file' that it can assume that
+the given file name is valid, even if it's not a string literal, and thus not
+warn about it."
+ file)
+
(define-syntax local-file
(lambda (s)
"Return an object representing local file FILE to add to the store; this
@@ -442,13 +449,20 @@ where FILE is the entry's absolute file name and STAT is the result of
This is the declarative counterpart of the 'interned-file' monadic procedure.
It is implemented as a macro to capture the current source directory where it
appears."
- (syntax-case s ()
+ (syntax-case s (assume-valid-file-name)
((_ file rest ...)
(string? (syntax->datum #'file))
;; FILE is a literal, so resolve it relative to the source directory.
#'(%local-file file
(delay (absolute-file-name file (current-source-directory)))
rest ...))
+ ((_ (assume-valid-file-name file) rest ...)
+ ;; FILE is not a literal, so resolve it relative to the current
+ ;; directory. Since the user declared FILE is valid, do not pass
+ ;; #:literal? #f so that we do not warn about it later on.
+ #'(%local-file file
+ (delay (absolute-file-name file (getcwd)))
+ rest ...))
((_ file rest ...)
;; Resolve FILE relative to the current directory.
(with-syntax ((location (datum->syntax s (syntax-source s))))
@@ -456,7 +470,7 @@ appears."
(delay (absolute-file-name file (getcwd)))
rest ...
#:location 'location
- #:literal? #f)))
+ #:literal? #f))) ;warn if FILE is relative
((_)
#'(syntax-error "missing file name"))
(id
diff --git a/guix/import/utils.scm b/guix/import/utils.scm
index 0cfa1f8321..145515c489 100644
--- a/guix/import/utils.scm
+++ b/guix/import/utils.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2017, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
;;; Copyright © 2019 Robert Vollmert <rob@vllmrt.net>
+;;; Copyright © 2020 Helio Machado <0x2b3bfa0+guix@googlemail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -124,9 +125,12 @@ of the string VERSION is replaced by the symbol 'version."
;; https://spdx.org/licenses/
;; The psfl, gfl1.0, nmap, repoze
;; licenses doesn't have SPDX identifiers
+ ;;
+ ;; Please update guix/licenses.scm when modifying
+ ;; this list to avoid mismatches.
(match str
- ("AGPL-1.0" 'license:agpl-1.0)
- ("AGPL-3.0" 'license:agpl-3.0)
+ ("AGPL-1.0" 'license:agpl1)
+ ("AGPL-3.0" 'license:agpl3)
("Apache-1.1" 'license:asl1.1)
("Apache-2.0" 'license:asl2.0)
("BSL-1.0" 'license:boost1.0)
@@ -166,8 +170,8 @@ of the string VERSION is replaced by the symbol 'version."
("LGPL-2.0+" 'license:lgpl2.0+)
("LGPL-2.1" 'license:lgpl2.1)
("LGPL-2.1+" 'license:lgpl2.1+)
- ("LGPL-3.0" 'license:lgpl3.0)
- ("LGPL-3.0+" 'license:lgpl3.0+)
+ ("LGPL-3.0" 'license:lgpl3)
+ ("LGPL-3.0+" 'license:lgpl3+)
("MPL-1.0" 'license:mpl1.0)
("MPL-1.1" 'license:mpl1.1)
("MPL-2.0" 'license:mpl2.0)
@@ -175,7 +179,7 @@ of the string VERSION is replaced by the symbol 'version."
("NCSA" 'license:ncsa)
("OpenSSL" 'license:openssl)
("OLDAP-2.8" 'license:openldap2.8)
- ("CUA-OPL-1.0" 'license:opl1.0)
+ ("CUA-OPL-1.0" 'license:cua-opl1.0)
("QPL-1.0" 'license:qpl)
("Ruby" 'license:ruby)
("SGI-B-2.0" 'license:sgifreeb2.0)
diff --git a/guix/licenses.scm b/guix/licenses.scm
index cd43386102..255b755e6c 100644
--- a/guix/licenses.scm
+++ b/guix/licenses.scm
@@ -15,6 +15,7 @@
;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
;;; Copyright © 2020 André Batista <nandre@riseup.net>
+;;; Copyright © 2020 Helio Machado <0x2b3bfa0+guix@googlemail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -49,6 +50,7 @@
artistic2.0 clarified-artistic
copyleft-next
cpl1.0
+ cua-opl1.0
edl1.0
epl1.0
epl2.0
@@ -117,6 +119,9 @@
;;; https://github.com/NixOS/nixpkgs/blob/master/lib/licenses.nix
;;; https://www.gnu.org/licenses/license-list
;;;
+;;; Please update spdx-string->license from guix/import/utils.scm
+;;; when modifying this list to avoid mismatches.
+;;;
;;; Code:
(define agpl1
@@ -269,6 +274,11 @@ at URI, which may be a file:// URI pointing the package's tree."
"http://directory.fsf.org/wiki/License:CPLv1.0"
"https://www.gnu.org/licenses/license-list#CommonPublicLicense10"))
+(define cua-opl1.0
+ (license "CUA Office Public License v1.0"
+ "https://spdx.org/licenses/CUA-OPL-1.0.html"
+ "https://opensource.org/licenses/CUA-OPL-1.0"))
+
(define edl1.0
(license "EDL 1.0"
"http://directory.fsf.org/wiki/License:EDLv1.0"
diff --git a/guix/openpgp.scm b/guix/openpgp.scm
index 153752ee73..648c359621 100644
--- a/guix/openpgp.scm
+++ b/guix/openpgp.scm
@@ -34,6 +34,7 @@
openpgp-error?
openpgp-unrecognized-packet-error?
openpgp-unrecognized-packet-error-port
+ openpgp-unrecognized-packet-error-type
openpgp-invalid-signature-error?
openpgp-invalid-signature-error-port
@@ -132,6 +133,7 @@
;; Error raised when reading an unsupported or unrecognized packet tag.
(define-condition-type &openpgp-unrecognized-packet-error &openpgp-error
openpgp-unrecognized-packet-error?
+ (type openpgp-unrecognized-packet-error-type)
(port openpgp-unrecognized-packet-error-port))
;; Error raised when reading an invalid signature packet.
@@ -477,7 +479,8 @@ hexadecimal format for fingerprints."
((= tag PACKET-ONE-PASS-SIGNATURE)
'one-pass-signature) ;TODO: implement
(else
- (raise (condition (&openpgp-unrecognized-packet-error (port p))))))))
+ (raise (condition (&openpgp-unrecognized-packet-error (type tag)
+ (port p))))))))
(define-record-type <openpgp-public-key>
(make-openpgp-public-key version subkey? time value fingerprint)
@@ -817,6 +820,7 @@ FINGERPRINT, a bytevector."
(if critical?
(raise (condition
(&openpgp-unrecognized-packet-error
+ (type type)
(port signature-port))))
(list 'unsupported-subpacket type data))))))
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 939559e719..9ed5c26483 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -384,6 +384,7 @@ STORE is an open connection to the store."
;; Make the specified system generation the default entry.
(params (first (profile-boot-parameters %system-profile
(list number))))
+ (locale (boot-parameters-locale params))
(old-generations
(delv number (reverse (generation-numbers %system-profile))))
(old-params (profile-boot-parameters
@@ -396,6 +397,7 @@ STORE is an open connection to the store."
((bootcfg (lower-object
((bootloader-configuration-file-generator bootloader)
bootloader-config entries
+ #:locale locale
#:old-entries old-entries)))
(drvs -> (list bootcfg)))
(mbegin %store-monad
diff --git a/guix/ui.scm b/guix/ui.scm
index 8213e8ebab..8d7bc238bc 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -297,7 +297,8 @@ VARIABLE and return it, or #f if none was found."
(hash-map->list (lambda (name module)
module)
(module-submodules head)))))
- (match (module-local-variable head variable)
+ (match (and=> (module-public-interface head)
+ (cut module-local-variable <> variable))
(#f (loop next suggestions visited))
(_
(match (module-name head)