From patchwork Mon May 5 12:33:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 42327 Return-Path: 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 ; 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 ) 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 ) 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 ) 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 ) 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?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 05 May 2025 15:36:03 +0000 Resent-Message-ID: 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 Cc: 77023@debbugs.gnu.org, Maxim Cournoyer , Gabriel Wicki , Andrew Tropin , Hilton Chain , Tanguy Le Carrour , Janneke Nieuwenhuizen 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 ) 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 ) 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 ) 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?= In-Reply-To: (sughosha@disroot.org's message of "Sun, 4 May 2025 15:41:36 +0530") References: 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 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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 Sughosha writes: > * gnu/home/services/upnp.scm: New file. > * gnu/local.mk: Register it. > * gnu/services/upnp.scm: Export readymedia-activation and > readymedia-shepherd-service. > ()[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’. 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)))))))