GNU bug report logs - #77023
[PATCH 0/3] home: services: Add readymedia.

Previous Next

Package: guix-patches;

Reported by: Sughosha <sughosha <at> disroot.org>

Date: Sat, 15 Mar 2025 02:03:01 UTC

Severity: normal

Tags: moreinfo, 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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Sughosha <sughosha <at> disroot.org>
Cc: 77023 <at> debbugs.gnu.org, Maxim Cournoyer <maxim.cournoyer <at> gmail.com>, Gabriel Wicki <gabriel <at> erlikon.ch>, Andrew Tropin <andrew <at> trop.in>, Hilton Chain <hako <at> ultrarare.space>, Tanguy Le Carrour <tanguy <at> bioneland.org>, Janneke Nieuwenhuizen <janneke <at> gnu.org>
Subject: [bug#77023] [PATCH 0/3] home: services: Add readymedia.
Date: Mon, 05 May 2025 14:33:29 +0200
[Message part 1 (text/plain, inline)]
Sughosha <sughosha <at> disroot.org> writes:

> * gnu/home/services/upnp.scm: New file.
> * gnu/local.mk: Register it.
> * gnu/services/upnp.scm: Export readymedia-activation and
> readymedia-shepherd-service.
> (<readymedia-configuration>)[home-service?]: New field.
> [cache-directory]: Adjust value depending on 'for-home?'.
> [log-directory]: Ditto.
> (readymedia-shepherd-service): Adjust 'requirement' and 'start' according to
> 'home-service?'.
> (readymedia-activation): Adjust creating 'media-directories' with permissions
> according to 'home-service?'.
> * doc/guix.texi (Miscellaneous Home Services): Document Readymedia Service.
> (Miscellaneous Services): Add cross-reference.
>
> Change-Id: Id0c7ac2e1c4e17f1efb2d49d98883129d90afc38

Hello!  We’re almost there.  While running the system test, I noticed
that something had broken; I also noticed that we were calling ‘getpid’
at build time rather than at run time in the Home case, hence this
patch.

However, there’s still a test failure:

--8<---------------cut here---------------start------------->8---
Test begin:
  test-name: "ReadyMedia service is listening for connections"
  source-file: "/gnu/store/scyy0hybjm1qifpwlmzjhvs1ry28lvnk-readymedia-test-builder"
  source-line: 1
  source-form: (test-assert "ReadyMedia service is listening for connections" (wait-for-tcp-por)
Test end:
  result-kind: fail
  actual-value: #f
  actual-error: (misc-error #f "nobody's listening on port ~S" (("127.0.0.1" 8200)) #f)
--8<---------------cut here---------------end--------------->8---

Could you take a look?

Thanks,
Ludo’.

[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/services/upnp.scm b/gnu/services/upnp.scm
index 579378b94a..363da005f1 100644
--- a/gnu/services/upnp.scm
+++ b/gnu/services/upnp.scm
@@ -33,7 +33,6 @@ (define-module (gnu services upnp)
   #:use-module (ice-9 match)
   #:export (%readymedia-default-cache-directory
             %readymedia-default-log-directory
-            %readymedia-default-port
             %readymedia-log-file
             %readymedia-user-account
             %readymedia-user-group
@@ -206,16 +205,16 @@ (define (readymedia-activation config)
                       (unless (file-exists? directory)
                         (mkdir-p/perms directory
                                        (getpw #$(if home-service?
-                                                    (getuid)
+                                                    #~(getuid)
                                                     %readymedia-user-account))
-                                       (if home-service? #o755 #o775))))
+                                       #$(if home-service? #o755 #o775))))
                     (list #$@(map readymedia-media-directory-path
                                   media-directories)))
           (for-each (lambda (directory)
                       (unless (file-exists? directory)
                         (mkdir-p/perms directory
                                        (getpw #$(if home-service?
-                                                    (getuid)
+                                                    #~(getuid)
                                                     %readymedia-user-account))
                                        #o755)))
                     (list #$cache-directory #$log-directory))))))
diff --git a/gnu/tests/upnp.scm b/gnu/tests/upnp.scm
index e4bce30d89..0224557f40 100644
--- a/gnu/tests/upnp.scm
+++ b/gnu/tests/upnp.scm
@@ -38,6 +38,7 @@ (define %readymedia-default-port 8200)
 (define %readymedia-media-directory "/media")
 (define %readymedia-configuration-test
   (readymedia-configuration
+   (port %readymedia-default-port)
    (media-directories
     (list (readymedia-media-directory (path %readymedia-media-directory)
                                       (types '(A V)))))))

This bug report was last modified 2 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.