Message ID | 87h61z5jae.fsf_-_@gnu.org |
---|---|
State | New |
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id DE2C027BC4A; Mon, 5 May 2025 16:36:29 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 382C827BC49 for <patchwork@mira.cbaines.net>; Mon, 5 May 2025 16:36:29 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces@gnu.org>) id 1uBxrb-0002bU-GY; Mon, 05 May 2025 11:36:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1uBxrQ-0002Z8-6V for guix-patches@gnu.org; Mon, 05 May 2025 11:36:05 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1uBxrP-00028y-93 for guix-patches@gnu.org; Mon, 05 May 2025 11:36:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=636GdfKms1lKSMFawAkGfgTI8PSXcR4/FKqBHCQm/e4=; b=msP2KhrHAIybfpHljbX9lLIP3JiEOUMIxl/4y9VwvBJOLhrmrzrJ3xyORcMccbfUPXVp7gyjRBPnVK366gdmALYF3nc4xSO7WbE14E+O4KMC8GN1Ag+s9ugdOBLVK9QnqPdkOfHwmqGCy9kQpHEDsSIWwUNVC240E5VUlyh8l9A0b4zKUpxObBl5SEFmVKCRtJrc4h3wKDB0n8Zuj+mScyehrya5+2nCkO4+xhgdrwhXqq8KIMxjP8BtHx/QWmIRzHtcXg41HktoHzNg04hcc44UQh+Yb8l/99w4VZ9yKrhZvd0I+i+buafynqxEu+aGNkh4k7/9fK+mKcihMG2BWw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1uBxrP-0005uB-4P for guix-patches@gnu.org; Mon, 05 May 2025 11:36:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77023] [PATCH 0/3] home: services: Add readymedia. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= <ludo@gnu.org> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 05 May 2025 15:36:03 +0000 Resent-Message-ID: <handler.77023.B77023.174645930922391@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77023 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Sughosha <sughosha@disroot.org> Cc: 77023@debbugs.gnu.org, Maxim Cournoyer <maxim.cournoyer@gmail.com>, Gabriel Wicki <gabriel@erlikon.ch>, Andrew Tropin <andrew@trop.in>, Hilton Chain <hako@ultrarare.space>, Tanguy Le Carrour <tanguy@bioneland.org>, Janneke Nieuwenhuizen <janneke@gnu.org> Received: via spool by 77023-submit@debbugs.gnu.org id=B77023.174645930922391 (code B ref 77023); Mon, 05 May 2025 15:36:03 +0000 Received: (at 77023) by debbugs.gnu.org; 5 May 2025 15:35:09 +0000 Received: from localhost ([127.0.0.1]:41773 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1uBxqW-0005ok-EQ for submit@debbugs.gnu.org; Mon, 05 May 2025 11:35:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59608) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <ludo@gnu.org>) id 1uBxqK-0005j4-0g for 77023@debbugs.gnu.org; Mon, 05 May 2025 11:34:56 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@gnu.org>) id 1uBxqE-0001qD-Ng; Mon, 05 May 2025 11:34:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=636GdfKms1lKSMFawAkGfgTI8PSXcR4/FKqBHCQm/e4=; b=AWax3qVjclCA8nMm/AdC rhY3v4icanm9pCRL8Bsxv8HBx7UJjfIJzcJwCn511wR5OzTIHuelPLJWLxCheUCJAiJpLcYuRqzPE kpUHTPzFiHpM9TAZdSgQNmrmcFjEAgRnm1tSR+HELomM14tn5EDSKMAxYsnzmJIAMUQwCg24egXOO Q89/c321zjK9r6JryfhhtRJoho9xCQZNvwF5aJttf1HMmzy+2We8VX1O37AgpAKiGrcEXN6Vr6lkV WqiBBxfHac1uAoAucbiMf5Oa/kvU/mUveBMDum8xKCu7/+mkimof7TUtUZ23/IjfwyAweGuzXKhcp IEkvYuU/ip5L6g==; From: Ludovic =?utf-8?q?Court=C3=A8s?= <ludo@gnu.org> In-Reply-To: <b0efea6dca48cfd9a493eabb9dcd0303052d5c2b.1746353496.git.sughosha@disroot.org> (sughosha@disroot.org's message of "Sun, 4 May 2025 15:41:36 +0530") References: <cover.1742003935.git.sughosha@disroot.org> <b0efea6dca48cfd9a493eabb9dcd0303052d5c2b.1746353496.git.sughosha@disroot.org> Date: Mon, 05 May 2025 14:33:29 +0200 Message-ID: <87h61z5jae.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches |
Commit Message
Ludovic Courtès
May 5, 2025, 12:33 p.m. UTC
Sughosha <sughosha@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’.
Comments
On Monday, May 5, 2025 6:03:29 PM GMT+5:30 Ludovic Courtès wrote: > Sughosha <sughosha@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’. I have sent the v5 patch, does it pass this test? I don't know how to run this test.
Hi, Sughosha <sughosha@disroot.org> writes: > I have sent the v5 patch, does it pass this test? I don't know how to run this > test. You can run “make check-system TESTS=readymedia”. See <https://guix.gnu.org/manual/devel/en/html_node/Running-the-Test-Suite.html>. Ludo’.
On Wednesday, May 14, 2025 3:19:35 PM GMT+5:30 Ludovic Courtès wrote: > Hi, > > Sughosha <sughosha@disroot.org> writes: > > I have sent the v5 patch, does it pass this test? I don't know how to run > > this test. > > You can run “make check-system TESTS=readymedia”. > > See > <https://guix.gnu.org/manual/devel/en/html_node/Running-the-Test-Suite.html> > . > > Ludo’. The test passed successfully, with the v5 patch that I sent above.
Hi, Sughosha <sughosha@disroot.org> writes: > On Wednesday, May 14, 2025 3:19:35 PM GMT+5:30 Ludovic Courtès wrote: >> Hi, >> >> Sughosha <sughosha@disroot.org> writes: >> > I have sent the v5 patch, does it pass this test? I don't know how to run >> > this test. >> >> You can run “make check-system TESTS=readymedia”. >> >> See >> <https://guix.gnu.org/manual/devel/en/html_node/Running-the-Test-Suite.html> >> . >> >> Ludo’. > > The test passed successfully, with the v5 patch that I sent above. It didn't for me, I got: --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---
On Wednesday, May 14, 2025 7:28:33 PM GMT+5:30 Maxim Cournoyer wrote: > Hi, > > Sughosha <sughosha@disroot.org> writes: > > On Wednesday, May 14, 2025 3:19:35 PM GMT+5:30 Ludovic Courtès wrote: > >> Hi, > >> > >> Sughosha <sughosha@disroot.org> writes: > >> > I have sent the v5 patch, does it pass this test? I don't know how to > >> > run > >> > this test. > >> > >> You can run “make check-system TESTS=readymedia”. > >> > >> See > >> <https://guix.gnu.org/manual/devel/en/html_node/Running-the-Test-Suite.ht > >> ml> . > >> > >> Ludo’. > > > > The test passed successfully, with the v5 patch that I sent above. > > It didn't for me, I got: > > --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.
Hi, Sughosha <sughosha@disroot.org> 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.
Hi, Actually, it seems the root issue may be related to bug#78356. When looking at /var/log/readymedia/minidlna.log we see: --8<---------------cut here---------------start------------->8--- 2025-05-15 08:22:27 In gnu/build/linux-container.scm: ...skipping... 2025-05-15 08:22:27 476:16 3 (_ "/tmp/guix-directory.w1REZ6") 2025-05-15 08:22:27 62:6 2 (call-with-clean-exit #<procedure 7fa0ff7c2e80 at gnu/b?>) 2025-05-15 08:22:27 321:20 1 (_) 2025-05-15 08:22:27 In guix/build/syscalls.scm: 2025-05-15 08:22:27 1231:10 0 (_ 268566528) 2025-05-15 08:22:27 2025-05-15 08:22:27 guix/build/syscalls.scm:1231:10: In procedure unshare: 268566528: Invalid argument 2025-05-15 08:22:28 Backtrace: 2025-05-15 08:22:28 4 (primitive-load "/gnu/store/4h68sswscz96wk47724bfqfrq9n?") 2025-05-15 08:22:28 In ice-9/eval.scm: 2025-05-15 08:22:28 191:35 3 (_ _) 2025-05-15 08:22:28 In gnu/build/linux-container.scm: 2025-05-15 08:22:28 368:8 2 (call-with-temporary-directory #<procedure 7fa0ff7df3f0?>) 2025-05-15 08:22:28 485:7 1 (_ "/tmp/guix-directory.w1REZ6") 2025-05-15 08:22:28 In unknown file: 2025-05-15 08:22:28 0 (waitpid #f #<undefined>) 2025-05-15 08:22:28 2025-05-15 08:22:28 ERROR: In procedure waitpid: 2025-05-15 08:22:28 Wrong type (expecting exact integer): #f --8<---------------cut here---------------end--------------->8--- Which appears to share the same `unshare' issue as seen in bug#78356.
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)))))))