Message ID | 87pmgqsss3.fsf@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | [bug#57365] gnu: guile-smc: Update to 0.5.0 | expand |
Context | Check | Description |
---|---|---|
cbaines/comparison | success | View comparision |
cbaines/git-branch | success | View Git branch |
cbaines/applying patch | success | View Laminar job |
cbaines/issue | success | View issue |
Hey Artyom, > - (string-append > - "(add-handler! %logger\n" > - " (make <rotating-log>\n" > - " #:file-name \"smc.log\"))\n"))) > - #t)) > + (("\\(add-handler! %logger %syslog\\)") > + (string-append > + "(add-handler! %logger\n" > + " (make <port-log/us>\n" > + " #:port (open-file \"/tmp/smc.log\" \"a+\")))\n"))))) What is this patch about? Can't it be upstreamed? > + (list autoconf automake pkg-config texinfo help2man)) You need to describe it in the commit message: [native-inputs]: Add help2man. > + (list bash-minimal > + guile-3.0 > + guile-lib > + inetutils)) Ditto: [inputs]: Use the new inputs style. Can you send an updated patch? Thanks, Mathieu
On 26-08-2022 15:34, Mathieu Othacehe wrote: > + (("\\(add-handler! %logger %syslog\\)") > + (string-append > + "(add-handler! %logger\n" > + " (make <port-log/us>\n" > + " #:port (open-file \"/tmp/smc.log\" \"a+\")))\n"))))) When is this /tmp/smc.log used? When compiling guile-smc or when running guile-smc? If the latter, an attacker on a multi-user system could use it to make you append to files the attacker ordinarily doesn't have access to -- consider guile-smc being in a process as root and the attacker creating /tmp/smc.log as a symlink to /etc/passwd first, depending on what was logged, there is now an additional entry in there or its corrupted, preventing booting. > Guile-SMC tries to log to the syslog by default but it seems that this > option is not working in Guix, so we need another way to log the > messages. Or it may be that I just overlooked something. I do think it works, at least there are plenty of mentions of 'syslog' in the Guix repository. However, possibly the build container forbids access (unverified), maybe for running tests you need a different logger. Greetings, Maxime.
From 048da8ec39829ed1e03c8256fb3e4b44d22ebd51 Mon Sep 17 00:00:00 2001 From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com> Date: Tue, 23 Aug 2022 21:10:13 +0300 Subject: [PATCH 1/2] gnu: guile-smc: Update to 0.5.0. * gnu/packages/guile-xyz.scm (guile-smc): Update to 0.5.0. --- gnu/packages/guile-xyz.scm | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index a85c7e0fc4..69f629638b 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -4796,7 +4796,7 @@ (define-public guile-gitlab (define-public guile-smc (package (name "guile-smc") - (version "0.3.0") + (version "0.5.0") (source (origin (method git-fetch) @@ -4806,7 +4806,7 @@ (define-public guile-smc (file-name (string-append name "-" version)) (sha256 (base32 - "0szkjmasi70m1vppck7nhdxg4lnxzjq6mihi6r1552s8sxm5z008")))) + "03imz9bfvvj8xnwxjaw7b26capvlwq921kqq5yzlzv15ngidky72")))) (build-system gnu-build-system) (arguments `(#:make-flags '("GUILE_AUTO_COMPILE=0") ;to prevent guild warnings @@ -4829,12 +4829,11 @@ (define-public guile-smc (format #f "#:init-value \"~a/bin/logger\"" (assoc-ref inputs "inetutils"))) - (("\\(add-handler! %logger %syslog\\)") - (string-append - "(add-handler! %logger\n" - " (make <rotating-log>\n" - " #:file-name \"smc.log\"))\n"))) - #t)) + (("\\(add-handler! %logger %syslog\\)") + (string-append + "(add-handler! %logger\n" + " (make <port-log/us>\n" + " #:port (open-file \"/tmp/smc.log\" \"a+\")))\n"))))) (add-after 'install 'wrap-program (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -4854,12 +4853,12 @@ (define-public guile-smc ,(string-append guile-lib go))))) #t))))) (native-inputs - (list autoconf automake pkg-config texinfo)) + (list autoconf automake pkg-config texinfo help2man)) (inputs - `(("bash" ,bash-minimal) - ("guile" ,guile-3.0) - ("guile-lib" ,guile-lib) - ("inetutils" ,inetutils))) + (list bash-minimal + guile-3.0 + guile-lib + inetutils)) (home-page "https://github.com/artyom-poptsov/guile-smc") (synopsis "GNU Guile state machine compiler") (description -- 2.34.1