GNU bug report logs - #75450
tor-onion-service-configuration example in Guix Manual does not work

Previous Next

Package: guix;

Reported by: raid5atemyhomework <raid5atemyhomework <at> protonmail.com>

Date: Thu, 9 Jan 2025 03:16:01 UTC

Severity: normal

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: raid5atemyhomework <raid5atemyhomework <at> protonmail.com>
To: "bug-guix <at> gnu.org" <bug-guix <at> gnu.org>
Subject: tor-onion-service-configuration example in Guix Manual does not work
Date: Thu, 09 Jan 2025 03:04:29 +0000
[Message part 1 (text/plain, inline)]
Guix has been pestering me about the deprecation of `tor-hidden-service` for a year now.  So I checked out the manual to see the correct official way that replaces `tor-hidden-service`:

```text
 -- Variable: tor-service-type
     Type for a service that runs the Tor (https://torproject.org)
     anonymous networking daemon.  The service is configured using a
     ‘<tor-configuration>’ record.  By default, the Tor daemon runs as
     the ‘tor’ unprivileged user, which is a member of the ‘tor’ group.

     Services of this type can be extended by other services to specify
     “onion services” (in addition to those already specified in
     ‘tor-configuration’) as in this example:

          (simple-service 'my-extra-onion-service tor-service-type
                          (list (tor-onion-service-configuration
                                  (name "extra-onion-service")
                                  (mapping '((80 . "127.0.0.1:8080"))))))
```

I created a simple `configuration.scm` that uses the above example verbatim in the `services` list, and got this error on `guix system build`:

```text
building /gnu/store/c3x922pfx3lcb8nzwcns6k43ncaj2asj-torrc.drv...
Backtrace: 
           4 (primitive-load "/gnu/store/1flyd8skq8cx6p8d7cpv5b99rxc?")
In ice-9/ports.scm:
   433:17  3 (call-with-output-file _ _ #:binary _ #:encoding _)
In ice-9/eval.scm:
    619:8  2 (_ #(#(#<directory (guile-user) 7ffff7812c80>) #<outp?>))
In ice-9/boot-9.scm:
   260:13  1 (for-each #<procedure 7ffff2d3fe00 at ice-9/eval.scm:3?> ?)
In ice-9/eval.scm:
    619:8  0 (_ #(#(#<directory (guile-user) 7ffff7812c80> ("e?" ?))))

ice-9/eval.scm:619:8: Throw to key `match-error' with args `("match" "no matching pattern" ("extra-onion-service" (80 . "127.0.0.1:8080")))'.
builder for `/gnu/store/c3x922pfx3lcb8nzwcns6k43ncaj2asj-torrc.drv' failed with exit code 1
build of /gnu/store/c3x922pfx3lcb8nzwcns6k43ncaj2asj-torrc.drv failed
```

Please do not deprecate `tor-hidden-service` until your replacement has actually been tested to ***actually work*** on some very simple use-case example.

I attached the simple example that fails.
[base.scm (application/vnd.lotus-screencam, attachment)]

This bug report was last modified 157 days ago.

Previous Next


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