Subject: Re: [bug#77023] [PATCH 0/3] home: services: Add readymedia.

From: Maxim Cournoyer <[email-masked]>
Date: Thu, 15 May 2025 13:52:25 +0900

Hi,

Sughosha <[email-masked]> writes:

[...]

>> --8<---------------cut here---------------start------------->8---
>> Test begin:
>>   test-name: "ReadyMedia service is listening for connections"
>>   source-file:
>> "/gnu/store/jp9x56qq0dalb01nh61l6zv1w8vss4rm-readymedia-test-builder"
>> source-line: 1
>>   source-form: (test-assert "ReadyMedia service is listening for
>> connections" (wait-for-tcp-port 8200 marionette)) 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) Group end: readymedia
>> # of expected passes      11
>> # of unexpected failures  1
>> --8<---------------cut here---------------end--------------->8---
>
> I don't know why you are getting this error. I tested it again and it passed. 
> The attatchment contains the log.

Actually, even before your change is applied, the test is failing.

It seems the least-authority-wrapper doesn't expose everything needed;
at first it was failing to start because it couldn't write to
/var/run/minidlna/minidlna.pid, so I exopsed /var/run like so:

--8<---------------cut here---------------start------------->8---
modified   gnu/services/upnp.scm
@@ -167,6 +167,10 @@ (define (readymedia-shepherd-service config)
                            (file-system-mapping
                             (source minidlna-conf)
                             (target source))
+                           (file-system-mapping
+                            (source "/var/run")
+                            (target source)
+                            (writable? #t))
                            (map (lambda (directory)
                                   (file-system-mapping
                                    (source (readymedia-media-directory-path directory))
--8<---------------cut here---------------end--------------->8---

Now, from the VM, I get:

--8<---------------cut here---------------start------------->8---
"/gnu/store/18d6ifs8j3ggb4zrkxchxn9pnk7795g4-minidlna" "-f" "/gnu/store/1b3szxs7ibivbv1bqmh5c0m5gk5ngv3b-minidlna.conf" "-S"

minidlna.c:520: warn: Unset locale
minidlna.c:1134: warn: Starting MiniDLNA version 1.3.3.
minidlna.c:331: fatal: ERROR: Failed to open sqlite database!  Exiting...
root@komputilo ~# echo $?
255
--8<---------------cut here---------------end--------------->8---

Any idea?  It should be reproducible on your side, as long as you rebase
your branch on current master, perhaps.  I tested with commit 7b73f02c38d.

-- 
Thanks,
Maxim