GNU logs - #61500, boring messages


Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#61500: Default cache directory of cat-avatar-generator-service
Resent-From: Evgeny Pisemsky <evgeny@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Tue, 14 Feb 2023 03:11:02 +0000
Resent-Message-ID: <handler.61500.B.16763442554402 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 61500
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: 
To: 61500 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-guix@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.16763442554402
          (code B ref -1); Tue, 14 Feb 2023 03:11:02 +0000
Received: (at submit) by debbugs.gnu.org; 14 Feb 2023 03:10:55 +0000
Received: from localhost ([127.0.0.1]:52152 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pRliY-00018w-Kz
	for submit <at> debbugs.gnu.org; Mon, 13 Feb 2023 22:10:54 -0500
Received: from lists.gnu.org ([209.51.188.17]:54666)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <evgeny@HIDDEN>) id 1pRliW-00018o-7O
 for submit <at> debbugs.gnu.org; Mon, 13 Feb 2023 22:10:53 -0500
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 <evgeny@HIDDEN>)
 id 1pRliV-0006ST-Tp
 for bug-guix@HIDDEN; Mon, 13 Feb 2023 22:10:51 -0500
Received: from sofi-shared.hosting.energy ([2001:41d0:602:1f56::]
 helo=sofi.hosting.energy)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <evgeny@HIDDEN>)
 id 1pRliT-0005kk-Tm
 for bug-guix@HIDDEN; Mon, 13 Feb 2023 22:10:51 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
 d=pisemsky.com; s=dkim; h=Content-Type:MIME-Version:Message-ID:Date:Subject:
 To:From:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=2jLQEyznA4R4QwMiSlDEzkeaNbP60NeK9b2yctt3GDY=; b=Q/8H8Sk1vNXPLF7kkhODrCgJ0O
 LpRfLee7fP5DV+PyP97XSi8F2rzkUpiQ4sDwMe2nRF/G9EBOdG4pRDUyvaLn1eFmKp2AvXOa81T0k
 4zfdB2jIy7fq+Eez2e9igXeTgXjApFqc7NJi4HUufsV9wlleRH2vkAtm1QKtxqK/FHOw=;
Received: from node-189-185-35-212.domolink.tula.net ([212.35.185.189]
 helo=portable) by sofi.hosting.energy with esmtpsa (TLS1.2) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94)
 (envelope-from <evgeny@HIDDEN>) id 1pRliQ-0003bO-Sa
 for bug-guix@HIDDEN; Tue, 14 Feb 2023 06:10:47 +0300
From: Evgeny Pisemsky <evgeny@HIDDEN>
Date: Tue, 14 Feb 2023 06:10:45 +0300
Message-ID: <87wn4llz62.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Scanned-By: ClamAV 0.103.0; Tue, 14 Feb 2023 06:10:47 +0300
Received-SPF: pass client-ip=2001:41d0:602:1f56::;
 envelope-from=evgeny@HIDDEN; helo=sofi.hosting.energy
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_PASS=-0.001,
 T_SPF_HELO_PERMERROR=0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

Hello!

The cache directory must:

1. End with a slash (due to implementation of the php script).
2. Exist or be created manually.
3. Be writeable by php-fpm.

The current default value doesn't meet these requirements and leads to
broken caching and errors in php-fpm log.

The simplest solution is to change it to /tmp/, but for obvious
reasons it is not suitable for production use.

However, since this service is described as demonstration, I would
prefer unsafe default over broken (for now).

Also the requirements above should probably be mentioned in the
documentation of the service.




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Evgeny Pisemsky <evgeny@HIDDEN>
Subject: bug#61500: Acknowledgement (Default cache directory of
 cat-avatar-generator-service)
Message-ID: <handler.61500.B.16763442554402.ack <at> debbugs.gnu.org>
References: <87wn4llz62.fsf@HIDDEN>
X-Gnu-PR-Message: ack 61500
X-Gnu-PR-Package: guix
Reply-To: 61500 <at> debbugs.gnu.org
Date: Tue, 14 Feb 2023 03:11:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-guix@HIDDEN

If you wish to submit further information on this problem, please
send it to 61500 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
61500: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D61500
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#61500: [PATCH] services: cat-http-server: Fix cat-avatar-generator-service.
References: <87wn4llz62.fsf@HIDDEN>
In-Reply-To: <87wn4llz62.fsf@HIDDEN>
Resent-From: Evgeny Pisemsky <evgeny@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Thu, 30 Nov 2023 16:40:01 +0000
Resent-Message-ID: <handler.61500.B61500.170136235113873 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 61500
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: 
To: 61500 <at> debbugs.gnu.org
Received: via spool by 61500-submit <at> debbugs.gnu.org id=B61500.170136235113873
          (code B ref 61500); Thu, 30 Nov 2023 16:40:01 +0000
Received: (at 61500) by debbugs.gnu.org; 30 Nov 2023 16:39:11 +0000
Received: from localhost ([127.0.0.1]:54413 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1r8k4E-0003bg-KT
	for submit <at> debbugs.gnu.org; Thu, 30 Nov 2023 11:39:11 -0500
Received: from sofi-shared.hosting.energy ([2001:41d0:602:1f56::]:38888
 helo=sofi.hosting.energy) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <evgeny@HIDDEN>) id 1r8k4C-0003bG-Ae
 for 61500 <at> debbugs.gnu.org; Thu, 30 Nov 2023 11:39:09 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
 d=pisemsky.com; s=dkim; h=Content-Type:MIME-Version:Message-ID:Date:Subject:
 To:From:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=bXC26CifMpmN2hOAv8qy7XxS+f+/oHaepEp37KjuZSo=; b=b4EtcKxxmO+9Ers9CrxpPYbTiB
 MWi6aisS3bXz+b39ESH4sZJ2ioL0AQ0YgKCOIRNEoSn32DAHYmjkGrD+DJVSfr/l1dfhPBoWp7tLU
 nVmS5uErxg755lzUd9kPhYmxoUv1zglwIv1zom+KVVsOrQsb2qpmWjHsFtbPN6eHx1Ng=;
Received: from [185.211.158.69] (helo=laptop)
 by sofi.hosting.energy with esmtpsa (TLS1.2) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94)
 (envelope-from <evgeny@HIDDEN>) id 1r8k3w-0002mz-MS
 for 61500 <at> debbugs.gnu.org; Thu, 30 Nov 2023 19:38:52 +0300
From: Evgeny Pisemsky <evgeny@HIDDEN>
Date: Thu, 30 Nov 2023 19:38:50 +0300
Message-ID: <8734wnqjqd.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Scanned-By: ClamAV 0.103.0; Thu, 30 Nov 2023 19:38:52 +0300
X-Spam-Score: -0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain

Here is the simplest patch that changes cache directory to /tmp/ and
makes this service work with the recently added monsterid package.

--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0001-services-cat-http-server-Fix-cat-avatar-generator-se.patch

From d6778a511cd5c41755a8ba9853d0e9db8dd47997 Mon Sep 17 00:00:00 2001
Message-ID: <d6778a511cd5c41755a8ba9853d0e9db8dd47997.1701362094.git.evgeny@HIDDEN>
From: Evgeny Pisemsky <evgeny@HIDDEN>
Date: Thu, 30 Nov 2023 19:30:50 +0300
Subject: [PATCH] services: cat-http-server: Fix cat-avatar-generator-service.

* gnu/services/web.scm (cat-avatar-generator-service): Change default cache
directory of the service and make it compatible with the monsterid package.

Change-Id: I94b4b2d8b01e8502222e4fd2a6aea247d6480312
---
 doc/guix.texi        | 3 ++-
 gnu/services/web.scm | 5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 1fd2e21608..95a2f05633 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -31752,7 +31752,7 @@ Web Services
 the hash of a user's email address.
 
 @deffn {Procedure} cat-avatar-generator-service @
-       [#:cache-dir "/var/cache/cat-avatar-generator"] @
+       [#:cache-dir "/tmp/"] @
        [#:package cat-avatar-generator] @
        [#:configuration (nginx-server-configuration)]
 Returns an nginx-server-configuration that inherits @code{configuration}.  It
@@ -31764,6 +31764,7 @@ Web Services
 A simple setup for cat-avatar-generator can look like this:
 @lisp
 (services (cons* (cat-avatar-generator-service
+                  #:package monsterid
                   #:configuration
                   (nginx-server-configuration
                     (server-name '("example.com"))))
diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index 818226a4f7..47ca1e6968 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -1158,7 +1158,7 @@ (define* (nginx-php-location
 
 (define* (cat-avatar-generator-service
           #:key
-          (cache-dir "/var/cache/cat-avatar-generator")
+          (cache-dir "/tmp/")
           (package cat-avatar-generator)
           (configuration (nginx-server-configuration)))
   (simple-service
@@ -1175,7 +1175,8 @@ (define* (cat-avatar-generator-service
                                 (nginx-location-configuration-body base)))))
                 (nginx-server-configuration-locations configuration)))
             (root #~(string-append #$package
-                                   "/share/web/cat-avatar-generator"))))))
+                                   "/share/web/"
+                                   #$(package-name package)))))))
 
 
 (define-record-type* <hpcguix-web-configuration>

base-commit: c12cf2fb63bc2a5b0c5419a372ff6fff76a28a3b
-- 
2.41.0


--=-=-=--




Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#61500: Default cache directory of cat-avatar-generator-service
References: <87wn4llz62.fsf@HIDDEN>
In-Reply-To: <87wn4llz62.fsf@HIDDEN>
Resent-From: Evgeny Pisemsky <mail@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Sat, 14 Dec 2024 18:30:02 +0000
Resent-Message-ID: <handler.61500.B61500.173420095331778 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 61500
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: 
To: 61500 <at> debbugs.gnu.org
Received: via spool by 61500-submit <at> debbugs.gnu.org id=B61500.173420095331778
          (code B ref 61500); Sat, 14 Dec 2024 18:30:02 +0000
Received: (at 61500) by debbugs.gnu.org; 14 Dec 2024 18:29:13 +0000
Received: from localhost ([127.0.0.1]:48292 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tMWt7-0008GT-0u
	for submit <at> debbugs.gnu.org; Sat, 14 Dec 2024 13:29:13 -0500
Received: from roxy-shared.hosting.energy ([193.70.16.70]:49561
 helo=roxy.hosting.energy) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1tMWt5-0008GF-8E
 for 61500 <at> debbugs.gnu.org; Sat, 14 Dec 2024 13:29:12 -0500
Received: from [176.59.46.48] (helo=laptop)
 by roxy.hosting.energy with esmtpsa (TLS1.2) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.97.1)
 (envelope-from <mail@HIDDEN>) id 1tMWsh-000000001MD-3FoP
 for 61500 <at> debbugs.gnu.org; Sat, 14 Dec 2024 21:28:48 +0300
From: Evgeny Pisemsky <mail@HIDDEN>
Date: Sat, 14 Dec 2024 21:28:47 +0300
Message-ID: <87y10ijezk.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Scanned-By: ClamAV 0.101.4; Sat, 14 Dec 2024 21:28:48 +0300
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> However, since this service is described as demonstration, I would prefer unsafe default over broken (for now).

I realized that this may look like an attempt to introduce vulnerabity, while in fact I was just silly. Shame on me.

The right thing to do here is to write a normal service instead of simple and create cache directory using activation service.

Or at least to update documentation of the existing service.

If someone at guix reads and wants this, please let me know.





Last modified: Sun, 12 Jan 2025 05:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.