unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Evgeny Pisemsky <evgeny@pisemsky.com>
To: 61500@debbugs.gnu.org
Subject: bug#61500: [PATCH] services: cat-http-server: Fix cat-avatar-generator-service.
Date: Thu, 30 Nov 2023 19:38:50 +0300	[thread overview]
Message-ID: <8734wnqjqd.fsf@pisemsky.com> (raw)
In-Reply-To: <87wn4llz62.fsf@pisemsky.com>

[-- Attachment #1: Type: text/plain, Size: 136 bytes --]

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-services-cat-http-server-Fix-cat-avatar-generator-se.patch --]
[-- Type: text/x-patch, Size: 2521 bytes --]

From d6778a511cd5c41755a8ba9853d0e9db8dd47997 Mon Sep 17 00:00:00 2001
Message-ID: <d6778a511cd5c41755a8ba9853d0e9db8dd47997.1701362094.git.evgeny@pisemsky.com>
From: Evgeny Pisemsky <evgeny@pisemsky.com>
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)))))))
 
 \f
 (define-record-type* <hpcguix-web-configuration>

base-commit: c12cf2fb63bc2a5b0c5419a372ff6fff76a28a3b
-- 
2.41.0


      reply	other threads:[~2023-11-30 16:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-14  3:10 bug#61500: Default cache directory of cat-avatar-generator-service Evgeny Pisemsky
2023-11-30 16:38 ` Evgeny Pisemsky [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8734wnqjqd.fsf@pisemsky.com \
    --to=evgeny@pisemsky.com \
    --cc=61500@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).