mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 21:20:33 +02:00
services: oci: Fix oci-image value field handling.
* gnu/services/containers.scm (lower-oci-image-state, oci-lowerable-image?): Remove support for gexps and correctly lower file-like objects. * doc/guix.texi: Remove gexp from oci-image value field description. Fixes: guix/guix#3818 Change-Id: Ib812d65b32dd68f8572fcb371ab4521d22e5336c Signed-off-by: Ludovic Courtès <ludo@gnu.org> Merges: #3819
This commit is contained in:
committed by
Ludovic Courtès
parent
24d0c0a951
commit
94b26ff284
@@ -45481,7 +45481,7 @@ A string representing the OCI image tag. Defaults to @code{latest}.
|
||||
@item @code{value} (type: oci-lowerable-image)
|
||||
A @code{manifest} or @code{operating-system} record that will be lowered
|
||||
into an OCI compatible tarball. Otherwise this field's value can be a
|
||||
gexp or a file-like object that evaluates to an OCI compatible tarball.
|
||||
file-like object that evaluates to an OCI compatible tarball.
|
||||
|
||||
@item @code{pack-options} (default: @code{'()}) (type: list)
|
||||
An optional set of keyword arguments that will be passed to the
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2024, 2025 Giacomo Leidi <therewasa@fishinthecalculator.me>
|
||||
;;; Copyright © 2025 Owen T. Heisler <writer@owenh.net>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
@@ -523,7 +524,6 @@ but ~a was found") el))))
|
||||
(define (oci-lowerable-image? image)
|
||||
(or (manifest? image)
|
||||
(operating-system? image)
|
||||
(gexp? image)
|
||||
(file-like? image)))
|
||||
|
||||
(define (string-or-oci-image? image)
|
||||
@@ -558,8 +558,8 @@ the OCI image.")
|
||||
(value
|
||||
(oci-lowerable-image)
|
||||
"A @code{manifest} or @code{operating-system} record that will be lowered
|
||||
into an OCI compatible tarball. Otherwise this field's value can be a gexp
|
||||
or a file-like object that evaluates to an OCI compatible tarball.")
|
||||
into an OCI compatible tarball. Otherwise this field's value can be a
|
||||
file-like object that evaluates to an OCI compatible tarball.")
|
||||
(pack-options
|
||||
(list '())
|
||||
"An optional set of keyword arguments that will be passed to the
|
||||
@@ -1080,14 +1080,13 @@ for the OCI runtime volume create command."
|
||||
target system grafts?))
|
||||
((? operating-system? value)
|
||||
(lower-operating-system value target system))
|
||||
((or (? gexp? value)
|
||||
(? file-like? value))
|
||||
value)
|
||||
((? file-like? value)
|
||||
(lower-object value))
|
||||
(_
|
||||
(raise
|
||||
(formatted-message
|
||||
(G_ "oci-image value must contain only manifest,
|
||||
operating-system, gexp or file-like records but ~a was found")
|
||||
operating-system, or file-like records but ~a was found")
|
||||
value))))
|
||||
#:target target
|
||||
#:system system)))
|
||||
|
||||
Reference in New Issue
Block a user