From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 2Ld+Geg6bmRACAAASxT56A (envelope-from ) for ; Wed, 24 May 2023 18:27:20 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id QAuXGOg6bmSwDgEAG6o9tA (envelope-from ) for ; Wed, 24 May 2023 18:27:20 +0200 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 11F0D13251 for ; Wed, 24 May 2023 18:27:20 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1rKN-0001JF-Dk; Wed, 24 May 2023 12:27:07 -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 1q1rKJ-0001Ix-0V for bug-guix@gnu.org; Wed, 24 May 2023 12:27:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1rKI-0006jf-Mz for bug-guix@gnu.org; Wed, 24 May 2023 12:27:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q1rKI-00075Y-E8 for bug-guix@gnu.org; Wed, 24 May 2023 12:27:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v3 07/16] services: mpd; Refactor start slot directory initialization. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 24 May 2023 16:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63082 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Maxim Cournoyer Cc: 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168494560927229 (code B ref 63082); Wed, 24 May 2023 16:27:02 +0000 Received: (at 63082) by debbugs.gnu.org; 24 May 2023 16:26:49 +0000 Received: from localhost ([127.0.0.1]:44540 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1rK4-000757-Kp for submit@debbugs.gnu.org; Wed, 24 May 2023 12:26:48 -0400 Received: from smtpm2.myservices.hosting ([185.26.105.233]:56824) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1rK3-00074z-2c for 63082@debbugs.gnu.org; Wed, 24 May 2023 12:26:47 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm2.myservices.hosting (Postfix) with ESMTP id 89C6C20E15; Wed, 24 May 2023 18:26:45 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id DE35F8009A; Wed, 24 May 2023 18:26:44 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id uGEJj2zPUTqP; Wed, 24 May 2023 18:26:44 +0200 (CEST) Received: from [192.168.1.239] (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 57AFC80098; Wed, 24 May 2023 18:26:44 +0200 (CEST) Message-ID: <8b2a56f3-266a-94b8-a07d-f8004ab1b401@makinata.eu> Date: Wed, 24 May 2023 17:26:43 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Content-Language: en-US References: From: Bruno Victal In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1684945640; a=rsa-sha256; cv=none; b=hJIwp6NbnG+D0AVlnHjDYcZKhUxsj4xP2ucfx6kRBGhjHs6O9X4yDF/drdizsZWmDKkwkE DSD0z7SVX8gV8yTq0UbvNDPSfEserGhO/p96+eZywVnrCInGnlSCAMnh7d29ot84mVOxuY /qJ7waZLc21ewTkp5RIUd/uPivE3t/mrHcehPTmWbdsbv+o6QGynXPCYqYjR0VYs/wLKrv Dl/goUWFs5CHtX7ahVh0YFZx22doL0qHvolm2zPgGBILmdkSKJiCSVwpxH9E855aDK1Tdm OkCdxGO1Fq0t9Wy1dygsNW8moMgq/yVjqgfpFOIAWTYAhnhgXSdgZb9vRYocUA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1684945640; 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: content-transfer-encoding:content-transfer-encoding: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=hwSxHIrbjxVUNRSGlc89wm6HsObhaY/ee/IT8bBjagk=; b=nKlyq+6OBpUlaAO3ghNCLIcteNg3+zDfHZgXLhQT4KnNohuAn+Zr+1Zn/qIMbe5R5aGKmO K7MDLsTQdxLEFSiyXVW094uwcSFX6FeaPTSPaiA4dltbvL4AKHaXp8F3oES9qy/+/FRtRI 5NLTJM8z+Z/GAMjIY++guQXA+SZG0zqRZ2drXoEqWtkMDbCBifnrYuklj7bZxwhKxKK55A t7651/rwztjfu6QSNI8VKeitNK4DeV8INVIIEaNRD+abK8B6DAVCTtVTIXUZTjNzXYeP6g bBNsbRZdiBWhtk8dKvEos9dKRpxKazFDUIUbQTZWaE5KsOIS4Eg3M0ZV9EiGjA== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.17 X-Spam-Score: -3.17 X-Migadu-Queue-Id: 11F0D13251 X-TUID: 2et9ZfhtFdm3 On 2023-05-05 19:29, Maxim Cournoyer wrote: > - (make-forkexec-constructor > - (list #$(file-append package "/bin/mpd") > - "--no-daemon" > - #$config-file) > - #:environment-variables '#$environment-variables))) > + (start > + (with-imported-modules (source-module-closure > + '((gnu build activation))) How about adding '(gnu build activation) into %default-imported-modules (and %default-modules) at gnu/services/shepherd.scm? Services should be using the start field to perform these kinds of tasks anyways. (rather than extend activation-service-type which is incorrect use) > + #~(begin > + (use-modules (gnu build activation)) In general, rather than #~(begin (use-modules ...)), it's preferred to specify additional modules using the 'modules' field e.g. --8<---------------cut here---------------start------------->8--- (modules (cons '(gnu build activation) %default-modules)) --8<---------------cut here---------------end--------------->8--- > + > + (let ((user (getpw #$username))) > + > + (define (init-directory directory) > + (unless (file-exists? directory) > + (mkdir-p/perms directory user #o755))) > + > + (for-each > + init-directory > + '#$(map dirname > + ;; XXX: Delete the potential "syslog" > + ;; log-file value, which is not a directory. > + (delete "syslog" > + (filter-map maybe-value > + (list db-file > + log-file > + state-file > + sticker-file)))))) Perhaps treat “syslog” as a symbol instead? Strings seem more adequate when the value is a path, with a symbol being a sign that the value is to be treated “specially”. (this aligns with how mympd handles this) -- Furthermore, I consider that nonfree software must be eradicated. Cheers, Bruno.