diff options
Diffstat (limited to 'guix')
-rw-r--r-- | guix/git.scm | 22 | ||||
-rw-r--r-- | guix/gnu-maintenance.scm | 29 | ||||
-rw-r--r-- | guix/scripts/system.scm | 2 | ||||
-rw-r--r-- | guix/search-paths.scm | 11 | ||||
-rw-r--r-- | guix/self.scm | 31 | ||||
-rw-r--r-- | guix/transformations.scm | 5 | ||||
-rw-r--r-- | guix/upstream.scm | 5 |
7 files changed, 65 insertions, 40 deletions
diff --git a/guix/git.scm b/guix/git.scm index 1cb87a4560..1b3355109e 100644 --- a/guix/git.scm +++ b/guix/git.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2021 Marius Bakke <marius@gnu.org> ;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be> ;;; Copyright © 2023 Tobias Geerinckx-Rice <me@tobias.gr> +;;; Copyright © 2023 Simon Tournier <zimon.toutoune@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -360,21 +361,16 @@ dynamic extent of EXP." (define (reference-available? repository ref) "Return true if REF, a reference such as '(commit . \"cabba9e\"), is definitely available in REPOSITORY, false otherwise." - ;; Note: this must not rely on 'resolve-reference', as that procedure always - ;; resolves the references for branch names such as master. The semantic we - ;; want here is that unless the reference is exact (e.g. a commit), the - ;; reference should not be considered available, as it could have changed on - ;; the remote. (match ref - ((or ('commit . commit) - ('tag-or-commit . (? commit-id? commit))) - (let ((len (string-length commit)) - (oid (string->oid commit))) - (false-if-git-not-found - (->bool (if (< len 40) - (object-lookup-prefix repository oid len OBJ-COMMIT) - (commit-lookup repository oid)))))) + (('commit . (? commit-id? commit)) + (let ((oid (string->oid commit))) + (->bool (commit-lookup repository oid)))) + ((or ('tag . str) + ('tag-or-commit . str)) + (false-if-git-not-found + (->bool (resolve-reference repository ref)))) (_ + ;; For the others REF as branch or symref, the REF cannot be available #f))) (define (clone-from-swh url tag-or-commit output) diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm index 5a84fcb117..881e941fbf 100644 --- a/guix/gnu-maintenance.scm +++ b/guix/gnu-maintenance.scm @@ -975,17 +975,24 @@ updater." ((url-predicate http-url?) package))) (define* (import-html-updatable-release package #:key (version #f)) - "Return the latest release of PACKAGE. Do that by crawling the HTML page of -the directory containing its source tarball. Optionally include a VERSION -string to fetch a specific version." - (let* ((uri (string->uri - (match (origin-uri (package-source package)) - ((and (? string?) - (? (cut string-prefix? "mirror://" <>) url)) - ;; Retrieve the authoritative HTTP URL from a mirror. - (http-url? url)) - ((? string? url) url) - ((url _ ...) url)))) + "Return the latest release of PACKAGE else #f. Do that by crawling the HTML +page of the directory containing its source tarball. Optionally include a +VERSION string to fetch a specific version." + + (define (expand-uri uri) + (match uri + ((and (? string?) (? (cut string-prefix? "mirror://" <>) url)) + ;; Retrieve the authoritative HTTP URL from a mirror. + (http-url? url)) + ((? string? url) + url) + ((url _ ...) + ;; This case is for when the URI is a list of possibly + ;; mirror URLs as well as HTTP URLs. + (expand-uri url)))) + + (let* ((uri (string->uri + (expand-uri (origin-uri (package-source package))))) (custom (assoc-ref (package-properties package) 'release-monitoring-url)) (base (or custom diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index ec331809ef..547387d5e1 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -1169,7 +1169,7 @@ Some ACTIONS support additional ARGS.\n")) (debug . 0) (verbosity . #f) ;default (validate-reconfigure . ,ensure-forward-reconfigure) - (image-type . mbr-raw) + (image-type . mbr-hybrid-raw) (image-size . guess) (install-bootloader? . #t) (label . #f) diff --git a/guix/search-paths.scm b/guix/search-paths.scm index fcbe7b7953..8dc81861c9 100644 --- a/guix/search-paths.scm +++ b/guix/search-paths.scm @@ -37,6 +37,7 @@ $PKG_CONFIG_PATH $SSL_CERT_DIR $SSL_CERT_FILE + $TZDIR search-path-specification->sexp sexp->search-path-specification @@ -104,16 +105,22 @@ (define $SSL_CERT_DIR (search-path-specification (variable "SSL_CERT_DIR") - (separator #f) ;single entry + (separator #f) ;single entry (files '("etc/ssl/certs")))) (define $SSL_CERT_FILE (search-path-specification (variable "SSL_CERT_FILE") (file-type 'regular) - (separator #f) ;single entry + (separator #f) ;single entry (files '("etc/ssl/certs/ca-certificates.crt")))) +(define $TZDIR + (search-path-specification + (variable "TZDIR") + (files '("share/zoneinfo")) + (separator #f))) ;single entry + (define (search-path-specification->sexp spec) "Return an sexp representing SPEC, a <search-path-specification>. The sexp corresponds to the arguments expected by `set-path-environment-variable'." diff --git a/guix/self.scm b/guix/self.scm index 81a36e007f..b8b9b9fe37 100644 --- a/guix/self.scm +++ b/guix/self.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017-2023 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net> +;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -1210,7 +1211,8 @@ containing MODULE-FILES and possibly other files as well." '((guix build compile) (guix build utils))) #~(begin - (use-modules (srfi srfi-26) + (use-modules (srfi srfi-1) + (srfi srfi-26) (ice-9 match) (ice-9 format) (ice-9 threads) @@ -1243,13 +1245,23 @@ containing MODULE-FILES and possibly other files as well." (* 100. (/ completed total)) total) (force-output)) - (define (process-directory directory files output) - ;; Hide compilation warnings. - (parameterize ((current-warning-port (%make-void-port "w"))) - (compile-files directory #$output files - #:workers (parallel-job-count) - #:report-load report-load - #:report-compilation report-compilation))) + (define* (process-directory directory files output #:key (size 25)) + (let ((chunks (unfold + (lambda (seed) (< (length seed) size)) ;p + (cute take <> size) ;f + (cute drop <> size) ;g + files ;seed + list))) ;tail + (for-each + (lambda (chunk) + ;; Hide compilation warnings. + (parameterize ((current-warning-port (%make-void-port "w"))) + (compile-files directory output chunk + #:workers (parallel-job-count) + #:report-load report-load + #:report-compilation report-compilation) + (gc))) + chunks))) (setvbuf (current-output-port) 'line) (setvbuf (current-error-port) 'line) @@ -1277,7 +1289,8 @@ containing MODULE-FILES and possibly other files as well." (mkdir #$output) (chdir #+module-tree) - (process-directory "." '#+module-files #$output) + (let ((size (if (equal? #$name "guix-packages-base") 10 25))) + (process-directory "." '#+module-files #$output #:size size)) (newline)))) (computed-file name build diff --git a/guix/transformations.scm b/guix/transformations.scm index ede914456f..9cba6bedab 100644 --- a/guix/transformations.scm +++ b/guix/transformations.scm @@ -529,8 +529,9 @@ system that builds code for MICRO-ARCHITECTURE; otherwise raise an error." ;; leading to an obscure build error, check whether the compiler is known ;; to support MICRO-ARCHITECTURE. If not, bail out. (let* ((lowered (apply lower args)) - (architecture (match (string-tokenize (bag-system lowered) - %not-hyphen) + (target (or (bag-target lowered) + (bag-system lowered))) + (architecture (match (string-tokenize target %not-hyphen) ((arch _ ...) arch))) (compiler (any (match-lambda ((label (? package? p) . _) diff --git a/guix/upstream.scm b/guix/upstream.scm index 33248d645c..e28ae12f3f 100644 --- a/guix/upstream.scm +++ b/guix/upstream.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2010-2023 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2015 Alex Kost <alezost@gmail.com> -;;; Copyright © 2019, 2022 Ricardo Wurmus <rekado@elephly.net> +;;; Copyright © 2019, 2022, 2023 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev> ;;; Copyright © 2021, 2022 Maxime Devos <maximedevos@telenet.be> ;;; Copyright © 2022 Hartmut Goebel <h.goebel@crazy-compilers.com> @@ -534,7 +534,8 @@ specified in SOURCE, an <upstream-source>." (define old (match (package-inputs package) (((labels (? package? packages)) ...) - labels) + labels + (map string->symbol labels)) (_ '()))) |