GNU bug report logs -
#54713
[PATCH] gnu: linux: Allow kconfig options to be strings
Previous Next
Reported by: antlers <autumnalantlers <at> gmail.com>
Date: Mon, 4 Apr 2022 18:54:01 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Tue, 05 Apr 2022 20:18:38 +0200
with message-id <87pmlvjsw1.fsf <at> gnu.org>
and subject line Re: bug#54713: [PATCH] gnu: linux: Allow kconfig options to be strings
has caused the debbugs.gnu.org bug report #54713,
regarding [PATCH] gnu: linux: Allow kconfig options to be strings
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
54713: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=54713
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
* gnu/packages/linux.scm (config->string): add a clause handling strings
Allows for the declarative configuration of kconfig options which accept
strings, such as CONFIG_MODULE_SIG_KEY.
I've enclosed the given string in quotes, but don't do any kind of
escaping. See the kernel mailing list for the current state of escaped
strings upstream:
https://patchwork.kernel.org/project/linux-kbuild/patch/1431003982-992-1-git-send-email-sr <at> denx.de/
Apologies to those with double-quotes or backslashes in their
CONFIG_SYSTEM_*_KEYS.
Signed-off-by: antlers <autumnalantlers <at> gmail.com>
---
gnu/packages/linux.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index ec68f5c57e..9a81fc4a3d 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -767,7 +767,9 @@ (define (config->string options)
((option . #t)
(string-append option "=y"))
((option . #f)
- (string-append option "=n")))
+ (string-append option "=n"))
+ ((option . string)
+ (string-append option "=\"" string "\"")))
options)
"\n"))
--
2.34.0
[Message part 3 (message/rfc822, inline)]
Hi,
antlers <autumnalantlers <at> gmail.com> skribis:
> * gnu/packages/linux.scm (config->string): add a clause handling strings
>
> Allows for the declarative configuration of kconfig options which accept
> strings, such as CONFIG_MODULE_SIG_KEY.
>
> I've enclosed the given string in quotes, but don't do any kind of
> escaping. See the kernel mailing list for the current state of escaped
> strings upstream:
>
> https://patchwork.kernel.org/project/linux-kbuild/patch/1431003982-992-1-git-send-email-sr <at> denx.de/
>
> Apologies to those with double-quotes or backslashes in their
> CONFIG_SYSTEM_*_KEYS.
Applied.
If needed, a cheap and often “good enough” way to escape strings is
‘object->string’:
(display (object->string "foo\"bar\"baz"))
=> "foo\"bar\"baz"
Would that help here?
Thanks,
Ludo’.
This bug report was last modified 3 years and 41 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.