From unknown Fri Aug 15 14:46:46 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#61500 <61500@debbugs.gnu.org> To: bug#61500 <61500@debbugs.gnu.org> Subject: Status: Default cache directory of cat-avatar-generator-service Reply-To: bug#61500 <61500@debbugs.gnu.org> Date: Fri, 15 Aug 2025 21:46:46 +0000 retitle 61500 Default cache directory of cat-avatar-generator-service reassign 61500 guix submitter 61500 Evgeny Pisemsky severity 61500 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 13 22:10:54 2023 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 ) id 1pRliY-00018w-Kz for submit@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 ) id 1pRliW-00018o-7O for submit@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 ) id 1pRliV-0006ST-Tp for bug-guix@gnu.org; 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 ) id 1pRliT-0005kk-Tm for bug-guix@gnu.org; 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 ) id 1pRliQ-0003bO-Sa for bug-guix@gnu.org; Tue, 14 Feb 2023 06:10:47 +0300 From: Evgeny Pisemsky To: bug-guix@gnu.org Subject: Default cache directory of cat-avatar-generator-service Date: Tue, 14 Feb 2023 06:10:45 +0300 Message-ID: <87wn4llz62.fsf@pisemsky.com> 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@pisemsky.com; 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-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 30 11:39:11 2023 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 ) id 1r8k4E-0003bg-KT for submit@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 ) id 1r8k4C-0003bG-Ae for 61500@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 ) id 1r8k3w-0002mz-MS for 61500@debbugs.gnu.org; Thu, 30 Nov 2023 19:38:52 +0300 From: Evgeny Pisemsky To: 61500@debbugs.gnu.org Subject: [PATCH] services: cat-http-server: Fix cat-avatar-generator-service. Date: Thu, 30 Nov 2023 19:38:50 +0300 Message-ID: <8734wnqjqd.fsf@pisemsky.com> 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-Debbugs-Envelope-To: 61500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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: From: Evgeny Pisemsky 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* base-commit: c12cf2fb63bc2a5b0c5419a372ff6fff76a28a3b -- 2.41.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 14 13:29:13 2024 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 ) id 1tMWt7-0008GT-0u for submit@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 ) id 1tMWt5-0008GF-8E for 61500@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 ) id 1tMWsh-000000001MD-3FoP for 61500@debbugs.gnu.org; Sat, 14 Dec 2024 21:28:48 +0300 From: Evgeny Pisemsky To: 61500@debbugs.gnu.org Subject: Re: Default cache directory of cat-avatar-generator-service Date: Sat, 14 Dec 2024 21:28:47 +0300 Message-ID: <87y10ijezk.fsf@pisemsky.site> 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-Debbugs-Envelope-To: 61500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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. From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 27 12:26:05 2025 Received: (at control) by debbugs.gnu.org; 27 Jul 2025 16:26:05 +0000 Received: from localhost ([127.0.0.1]:51395 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ug4CL-00056M-1n for submit@debbugs.gnu.org; Sun, 27 Jul 2025 12:26:05 -0400 Received: from pisemsky.site ([103.54.19.55]:57036) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ug4CJ-00056D-9q for control@debbugs.gnu.org; Sun, 27 Jul 2025 12:26:03 -0400 Received: from laptop ( [212.233.87.173]) by pisemsky.site (OpenSMTPD) with ESMTPSA id f7693560 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Sun, 27 Jul 2025 16:25:57 +0000 (UTC) From: Evgeny Pisemsky To: control@debbugs.gnu.org Subject: close 61500 Date: Sun, 27 Jul 2025 19:25:58 +0300 Message-ID: <87tt2x38ix.fsf@pisemsky.site> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) close 61500