From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id mFbFD+4vwGRoFQEASxT56A (envelope-from ) for ; Tue, 25 Jul 2023 22:26:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id OK3UDu4vwGTtDAEAG6o9tA (envelope-from ) for ; Tue, 25 Jul 2023 22:26:22 +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 B80775BA9E for ; Tue, 25 Jul 2023 22:26:21 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b="il8gh1/P"; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1690316782; 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:dkim-signature; bh=pyzaM8YjO23iMJBdjXb4V4291pXj4QrRArakrx6n9hs=; b=Bi1jJAABzVwffheaBvI7jpM5cNvFCojz/eJRp7K0ZA4kjQeVda3+CLlVRFbEuLJApWDJjG mVOCHCAqBSqD8HDkTrWaDOAapBdOSgfwyN0jATPAR9Dq+Fe3zdCWOdxuJ3IAKQ/5zpvoFd 3kR5w5ywmH6HgZjO4lrBfzRx/xjY6bsgwSWYWUDduYUHc1BgPjEPboZjVdw1BEJNnp1pAc o0RnQs7MoeryMlxf6952uPIY3dlidKs88yYeb1qUfmpZiAmBM/Zb1G01gBM+KksTOs3YpG j1VjjiqRZJu/FRtxduR3z5KFkGBQR7jO1HvWvNDsWcCSWOQndlLkmZ8I9Dfkzg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b="il8gh1/P"; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1690316782; a=rsa-sha256; cv=none; b=X14oTTNjYLzuK+AMuueYjY08c8X8QgcVBe1EppWMjfo06sX5R8XlxZdrJAKsM9sQ+mkpc1 lpvR+aXpJsx3sSAchSJBCcprLUt+sry5+g8dZZOodS5qEvDildJSkKK4cjBZ951Qvcm/cE jdesllOwq4C2ShAaovADZXMnB1LY9tE99+Js7YZE8iosTS4yHBKfijG5LqSUBUZB/CB2LY jJcKZotKBkgN+joC+wR4Zig3jUTHO1KKBuVVHDQBsTQgyhZcWWafn8UnSPpAaZ+0EGSW2t SaMg6tqlJeAdkl8gLud8/6caDtUa0y8fbiaZdaWAt22kwckTwey++mLrLFhu2w== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qOOKC-00070H-4L; Tue, 25 Jul 2023 16:08:04 -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 1qOOKA-0006zg-NT for bug-guix@gnu.org; Tue, 25 Jul 2023 16:08:02 -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 1qOOKA-0006S6-FU for bug-guix@gnu.org; Tue, 25 Jul 2023 16:08:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qOOKA-000344-9Y for bug-guix@gnu.org; Tue, 25 Jul 2023 16:08:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#63082: mpd defaul configuration does not work ('No database' error) Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 25 Jul 2023 20:08: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: Bruno Victal Cc: 63082@debbugs.gnu.org Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.169031567611767 (code B ref 63082); Tue, 25 Jul 2023 20:08:02 +0000 Received: (at 63082) by debbugs.gnu.org; 25 Jul 2023 20:07:56 +0000 Received: from localhost ([127.0.0.1]:47111 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOOJz-00033d-Iq for submit@debbugs.gnu.org; Tue, 25 Jul 2023 16:07:56 -0400 Received: from mail-ot1-x32f.google.com ([2607:f8b0:4864:20::32f]:50485) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOOJu-00033L-8l for 63082@debbugs.gnu.org; Tue, 25 Jul 2023 16:07:50 -0400 Received: by mail-ot1-x32f.google.com with SMTP id 46e09a7af769-6b9b89627c3so4623945a34.1 for <63082@debbugs.gnu.org>; Tue, 25 Jul 2023 13:07:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690315660; x=1690920460; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=pyzaM8YjO23iMJBdjXb4V4291pXj4QrRArakrx6n9hs=; b=il8gh1/P2cdWgyTcKy/GK7sZ793leQTWRjcSpV3qLo9Se7PEXw2Y3cbcOAZaCfpCEJ gUc4O9YU0rJuifkE7NKIMQd2ZxeAK/Cd8THE+Zn/quNqx5NEf9N0Hwxb7k+7927aGLk2 tXqyTSv4Upk2w+jdC/PE1p88+nE2rFcCnSTQZYIxHWuED/Csw9/FitkAes30x3tktA+C JU9ru12BfO8VU6uwl4bQ5OrJoN0Rj2AOUAihOc9TwbUbEcSQ61AApCaZj1Lw2PsxlJFQ dlecrHmsmixwqIfialk7QH7PoD1CSKJ+KqqJDM3PFxES3tyJ2YuTRZGiSfi7rCXOc+MR TYTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690315660; x=1690920460; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=pyzaM8YjO23iMJBdjXb4V4291pXj4QrRArakrx6n9hs=; b=cNlOD1yAiCSeohBcbFP6z1D04rQHjHHht1HVO98v+p8kabzJjx0hXdF/R4HKVzGJ+c 1Ijsl3bPT0MGpHvD5lHwq52vMaLudIZWydnmaLnPoFDEejLSq3YQCiv1OyvVi2p9Zwsf vzbyTghzXCBCoMVe6Hw7VUd578LNlbTvQbRsooh6j2mAEeAONG/wBJ5MuTZPMHktsoTr p2Mz0n4mc3DZ9xeI8Zy/t9wAGfCyZDeLk5fnrIy1Az1ufvCI2/3mHf1t1SaP5q/nMus4 qTG+7Cayuj+DS/3eCc+bbjdSoDD4j5z5Cdr0ZN3GaPG6oQ+11j6RhlAGvJipZlSeLU2R /nng== X-Gm-Message-State: ABy/qLbPzbjmiEXIUcOBxKFmOE7Cu1dKclsHG3f3dBTofJ0zGJLqraep sA9ww/JjuNvvXdW4AQ+dcsuyFVTcngc= X-Google-Smtp-Source: APBJJlGml6iz8DBlRQ0EcXBMzwpWzTBjsz0fO+JIFID41oykKao9yDT6HLp0rDS5aQDaqwK+H5Lzow== X-Received: by 2002:a05:6870:1cd:b0:1b7:4521:2f2 with SMTP id n13-20020a05687001cd00b001b7452102f2mr99912oad.32.1690315660081; Tue, 25 Jul 2023 13:07:40 -0700 (PDT) Received: from hurd (dsl-10-141-65.b2b2c.ca. [72.10.141.65]) by smtp.gmail.com with ESMTPSA id 26-20020a05620a079a00b007671cfe8a18sm3896296qka.13.2023.07.25.13.07.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jul 2023 13:07:39 -0700 (PDT) From: Maxim Cournoyer References: <8b2a56f3-266a-94b8-a07d-f8004ab1b401@makinata.eu> Date: Tue, 25 Jul 2023 16:07:37 -0400 In-Reply-To: <8b2a56f3-266a-94b8-a07d-f8004ab1b401@makinata.eu> (Bruno Victal's message of "Wed, 24 May 2023 17:26:43 +0100") Message-ID: <87h6pr21rq.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 X-Spam-Score: 4.35 X-Migadu-Queue-Id: B80775BA9E X-Migadu-Spam-Score: 4.35 X-Migadu-Scanner: mx0.migadu.com X-TUID: gcCVplPC2D0v Hi, Bruno Victal writes: > 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 u= se) I think that's something to discuss outside the scope of this series, which is already a bit unwieldy :-). I think originally they were put there because adding them to (guix build utils) would entail a world rebuild. >> + #~(begin >> + (use-modules (gnu build activation)) > > In general, rather than #~(begin (use-modules ...)), it's preferred to sp= ecify > additional modules using the 'modules' field e.g. I prefer to keep it the way it is, because the use-modules works in tandem with the with-imported-modules. I'd also have to wrap the stop procedure in a second with-imported-modules if I used the 'global' modules field, since it applies to both. > (modules (cons '(gnu build activation) > %default-modules)) > >> + >> + (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 =E2=80=9Csyslog=E2=80=9D 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 =E2=80=9Cspecially=E2=80=9D. > (this aligns with how mympd handles this) There no longer is a delete "syslog" in the code, reworked in "services: mpd: Log to syslog by default." --=20 Thanks, Maxim