From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id wKYlHigY82BBvwAAgWs5BA (envelope-from ) for ; Sat, 17 Jul 2021 19:49:28 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id +NfZGSgY82BqNAAAB5/wlQ (envelope-from ) for ; Sat, 17 Jul 2021 17:49:28 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 01E661E0C9 for ; Sat, 17 Jul 2021 19:49:28 +0200 (CEST) Received: from localhost ([::1]:39862 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m4oRL-0003vt-1L for larch@yhetil.org; Sat, 17 Jul 2021 13:49:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56468) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m4oPy-0001eF-Bb for guix-patches@gnu.org; Sat, 17 Jul 2021 13:48:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43065) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m4oPx-00063J-Vg for guix-patches@gnu.org; Sat, 17 Jul 2021 13:48:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m4oPx-0001CE-M1 for guix-patches@gnu.org; Sat, 17 Jul 2021 13:48:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49601] [PATCH] services: transmission: Create downloads directory. Resent-From: Simon South Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 17 Jul 2021 17:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49601 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Morgan.J.Smith@outlook.com Cc: 49601@debbugs.gnu.org Received: via spool by 49601-submit@debbugs.gnu.org id=B49601.16265440674577 (code B ref 49601); Sat, 17 Jul 2021 17:48:01 +0000 Received: (at 49601) by debbugs.gnu.org; 17 Jul 2021 17:47:47 +0000 Received: from localhost ([127.0.0.1]:54611 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m4oPj-0001Bl-EV for submit@debbugs.gnu.org; Sat, 17 Jul 2021 13:47:47 -0400 Received: from mailout.easymail.ca ([64.68.200.34]:43236) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m4oPh-0001BW-Bv for 49601@debbugs.gnu.org; Sat, 17 Jul 2021 13:47:46 -0400 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 35D92A41DF; Sat, 17 Jul 2021 17:47:39 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo05-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo05-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dPL-wB33ER91; Sat, 17 Jul 2021 17:47:38 +0000 (UTC) Received: from laptop (unknown [108.162.141.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id B88E89FF68; Sat, 17 Jul 2021 17:47:36 +0000 (UTC) From: Simon South References: <87y2a5gnt6.fsf@simonsouth.net> Date: Sat, 17 Jul 2021 13:47:07 -0400 In-Reply-To: <87y2a5gnt6.fsf@simonsouth.net> (Simon South's message of "Sat, 17 Jul 2021 07:52:21 -0400") Message-ID: <87v958g7dw.fsf@simonsouth.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1626544168; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post; bh=OEzeOeaErccsYae/qfr7GB1KAeDN4rYUAwHfp5SSJBE=; b=WPUkjVoSv9wsAKHCEG3rZYcytbjVmJfEl1ZVOD7NSnFC77WvVbeae49wPvZQOToDmAGCJy /8nGz5Z8Qkd4vEwnSJoz3Ud/3WIK/F8WUGwFVFk4CoBv2Zlf5wygrrrOOaN+q/fsSCONvQ QsBuZ8UhjWRLYPS2GDDz+JlYT4CzGzM+JGAt8IAuN7w1BjmvOnK1OzdQEv5RA1lBkR7zRa VipUtXspwHnUoKW2dLcZji9Rf+O2ISuriQj362e88ZGsh4ML9BGhDLuvUXQKr3bOzt8iEf 42OBNaJhs9tdFgP+dQkgHdOKr4qQcNUKg8iWyHkZ/ZNKtI+lWT+i4tu4i1iZ4g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1626544168; a=rsa-sha256; cv=none; b=EzTeTHfPcxvAOHgNKtmzGtOavTN/VmV/PWep12gQZBWtx9j5SOY3NPl5pOUwEaohQgZZ+V EMGBXqgHUCcLx1xpX4W+1zOZEsdFJe0mi3Y8bZBc9M6KJLBYMZmcz4vYfj/0G/WdAfqTHv 6ukpr3TRfHOiYoMKmJTfzpdz6Y+vLoOWFjC/JTsbZa0sjbP8GDyS8z5qj1Lbr3uBrjH4dM LDD0gTFalzI5MSfdo5ukE4Zr6xOOq+rjUjvoJbQI5y+0nUBq2PWRB5QblZUSLEATmXH65D 96EeVX9PaaXC5ksVMu3ErYJPNs7yVMTndSv63UOZUxcY9uCBoZ7KzZpHuY0yIg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -2.41 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 01E661E0C9 X-Spam-Score: -2.41 X-Migadu-Scanner: scn0.migadu.com X-TUID: UQ96C6LXJevY Simon South writes: > Let me see if I can duplicate that... I haven't been able to duplicate whatever issue it was I saw originally. Likely it had to do with the download directory being placed on a separate volume and thus matching a mount point already declared in the operating-system declaration. Probably the system test should be expanded to check this kind of configuration works but a quick test on my end shows that at least for existing setups, it is not a problem. Morgan, just a few pieces of feedback then: > This fixes a bug where transmission doesn't have permission to create > it's download directory. This bug occurs when download-dir is "it's" should be "its" (no apostrophe) here, the possessive form. > + (,download-dir #o755)) Again, the permissions here should be "#o750". Finally, I recommend updating the system test (in gnu/tests/file-sharing.scm) to verify the download directory is created correctly, now that this functionality has been added. I've included a patch below that does this for you. To verify this works, apply the patch and run the test suite with make check-system TESTS="transmission-daemon" The Guix manual has more information[0]. Otherwise, looks good to me. Thanks for submitting this patch. [0] https://guix.gnu.org/en/manual/en/html_node/Running-the-Test-Suite.html -- Simon South simon@simonsouth.net diff --git a/gnu/tests/file-sharing.scm b/gnu/tests/file-sharing.scm index 9a8ee6a593..d27a206c4f 100644 --- a/gnu/tests/file-sharing.scm +++ b/gnu/tests/file-sharing.scm @@ -34,6 +34,8 @@ (define %transmission-daemon-group "transmission") (define %transmission-daemon-config-dir "/var/lib/transmission-daemon") +(define %transmission-daemon-download-dir + (string-append %transmission-daemon-config-dir "/downloads")) (define %transmission-daemon-watch-dir (string-append %transmission-daemon-config-dir "/watch")) (define %transmission-daemon-incomplete-dir @@ -110,8 +112,9 @@ #t) marionette)) - ;; Make sure Transmission Daemon's configuration directory has been - ;; created with the correct ownership and permissions. + ;; Make sure Transmission Daemon's configuration and download + ;; directories have been created with the correct ownership and + ;; permissions. (test-assert "configuration directory exists" (marionette-eval '(eq? (stat:type (stat #$%transmission-daemon-config-dir)) @@ -132,6 +135,26 @@ #o750) marionette)) + (test-assert "download directory exists" + (marionette-eval + '(eq? (stat:type (stat #$%transmission-daemon-download-dir)) + 'directory) + marionette)) + (test-assert "download directory has correct ownership" + (marionette-eval + '(let ((download-dir (stat #$%transmission-daemon-download-dir)) + (transmission-user (getpwnam #$%transmission-daemon-user))) + (and (eqv? (stat:uid download-dir) + (passwd:uid transmission-user)) + (eqv? (stat:gid download-dir) + (passwd:gid transmission-user)))) + marionette)) + (test-assert "download directory has expected permissions" + (marionette-eval + '(eqv? (stat:perms (stat #$%transmission-daemon-download-dir)) + #o750) + marionette)) + ;; Make sure the incomplete-downloads and watch directories have been ;; created with the correct ownership and permissions. (test-assert "incomplete-downloads directory exists"