GNU bug report logs -
#74955
[PATCH] services: rootless-podman-service-type: Allow not installing podman.
Previous Next
Reported by: Tomas Volf <~@wolfsden.cz>
Date: Thu, 19 Dec 2024 00:12:02 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 74955 in the body.
You can then email your comments to 74955 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
ludo <at> gnu.org, maxim.cournoyer <at> gmail.com, guix-patches <at> gnu.org
:
bug#74955
; Package
guix-patches
.
(Thu, 19 Dec 2024 00:12:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Tomas Volf <~@wolfsden.cz>
:
New bug report received and forwarded. Copy sent to
ludo <at> gnu.org, maxim.cournoyer <at> gmail.com, guix-patches <at> gnu.org
.
(Thu, 19 Dec 2024 00:12:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Sometimes you would want to skip on actually installing the podman package in
order to save disk space and bandwidth. Even without installing it globally,
podman can still be fetched via guix shell when required.
* gnu/services/containers.scm (package-or-#f?): New procedure.
(rootless-podman-configuration)<podman>: Change type to package-or-#f.
(rootless-podman-service-profile): Produce empty list if not podman package.
* doc/guix.texi (Miscellaneous Services): Document the change.
Change-Id: If533d913ea190558ce7e206d98ada4d805270594
---
doc/guix.texi | 3 ++-
gnu/services/containers.scm | 13 +++++++++----
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index f7b7569887..36bab360b4 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -41369,8 +41369,9 @@ Miscellaneous Services
Available @code{rootless-podman-configuration} fields are:
@table @asis
-@item @code{podman} (default: @code{podman}) (type: package)
+@item @code{podman} (default: @code{podman}) (type: package-of-#f)
The Podman package that will be installed in the system profile.
+@code{#f} can be passed to suppress the installation.
@item @code{group-name} (default: @code{"cgroup"}) (type: string)
The name of the group that will own /sys/fs/cgroup resources. Users that
diff --git a/gnu/services/containers.scm b/gnu/services/containers.scm
index 03f0649c0d..a3cdead0c3 100644
--- a/gnu/services/containers.scm
+++ b/gnu/services/containers.scm
@@ -63,10 +63,15 @@ (define list-of-pam-limits-entries?
(define list-of-subid-ranges?
(list-of subid-range?))
+(define (package-or-#f? val)
+ (or (not val)
+ (package? val)))
+
(define-configuration/no-serialization rootless-podman-configuration
(podman
- (package podman)
- "The Podman package that will be installed in the system profile.")
+ (package-or-#f podman)
+ "The Podman package that will be installed in the system profile.
+@code{#f} can be passed to suppress the installation.")
(group-name
(string "cgroup")
"The name of the group that will own /sys/fs/cgroup resources. Users that
@@ -106,8 +111,8 @@ (define-configuration/no-serialization rootless-podman-configuration
(define rootless-podman-service-profile
(lambda (config)
- (list
- (rootless-podman-configuration-podman config))))
+ (or (and=> (rootless-podman-configuration-podman config) list)
+ (list))))
(define rootless-podman-service-etc
(lambda (config)
--
2.46.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#74955
; Package
guix-patches
.
(Mon, 23 Dec 2024 11:13:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 74955 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi Tomas,
Did you consider using define-maybe from (gnu services configuration)?
It would be somewhat more consistent with the rest of system services imo.
Thank you for your work!
cheers
giacomo
[Message part 2 (text/html, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#74955
; Package
guix-patches
.
(Sat, 28 Dec 2024 01:10:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 74955 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Giacomo Leidi <leidigiacomo <at> outlook.com> writes:
> Hi Tomas,
>
> Did you consider using define-maybe from (gnu services configuration)? It would
> be somewhat more consistent with the rest of system services imo.
I did. However setting (package #f) feels more natural to me then
(package %unset-value). What do you think? If you insist on using
define-maybe, I will sent v2.
>
> Thank you for your work!
>
> cheers
>
> giacomo
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#74955
; Package
guix-patches
.
(Sat, 28 Dec 2024 15:23:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 74955 <at> debbugs.gnu.org (full text, mbox):
I somehow was convinced you changed also the default value of the
package field. I know understand why you made this choice, so please
feel free to disregard my last comment.
Thank you again for you work, I wish you an happy 2025!
giacomo
Information forwarded
to
guix-patches <at> gnu.org
:
bug#74955
; Package
guix-patches
.
(Sun, 29 Dec 2024 04:41:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 74955 <at> debbugs.gnu.org (full text, mbox):
Tomas Volf <~@wolfsden.cz> writes:
> Sometimes you would want to skip on actually installing the podman package in
> order to save disk space and bandwidth. Even without installing it globally,
> podman can still be fetched via guix shell when required.
>
> * gnu/services/containers.scm (package-or-#f?): New procedure.
> (rootless-podman-configuration)<podman>: Change type to package-or-#f.
> (rootless-podman-service-profile): Produce empty list if not podman package.
> * doc/guix.texi (Miscellaneous Services): Document the change.
>
> Change-Id: If533d913ea190558ce7e206d98ada4d805270594
Reviewed-by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
--
Thanks,
Maxim
Reply sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
You have taken responsibility.
(Mon, 06 Jan 2025 15:06:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Tomas Volf <~@wolfsden.cz>
:
bug acknowledged by developer.
(Mon, 06 Jan 2025 15:06:01 GMT)
Full text and
rfc822 format available.
Message #22 received at 74955-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Tomas Volf <~@wolfsden.cz> skribis:
> Sometimes you would want to skip on actually installing the podman package in
> order to save disk space and bandwidth. Even without installing it globally,
> podman can still be fetched via guix shell when required.
>
> * gnu/services/containers.scm (package-or-#f?): New procedure.
> (rootless-podman-configuration)<podman>: Change type to package-or-#f.
> (rootless-podman-service-profile): Produce empty list if not podman package.
> * doc/guix.texi (Miscellaneous Services): Document the change.
>
> Change-Id: If533d913ea190558ce7e206d98ada4d805270594
Applied with the change below.
Thanks everyone!
Ludo'.
[Message part 2 (text/x-patch, inline)]
diff --git a/doc/guix.texi b/doc/guix.texi
index 22cea4e5d2..caebe3b03c 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -41424,9 +41424,9 @@ Miscellaneous Services
Available @code{rootless-podman-configuration} fields are:
@table @asis
-@item @code{podman} (default: @code{podman}) (type: package-of-#f)
+@item @code{podman} (default: @code{podman}) (type: package-or-#f)
The Podman package that will be installed in the system profile.
-@code{#f} can be passed to suppress the installation.
+Pass @code{#f} to not install Podman.
@item @code{group-name} (default: @code{"cgroup"}) (type: string)
The name of the group that will own /sys/fs/cgroup resources. Users that
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 04 Feb 2025 12:24:10 GMT)
Full text and
rfc822 format available.
This bug report was last modified 37 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.