tor-onion-service-configuration example in Guix Manual does not work

  • Open
  • quality assurance status badge
Details
One participant
  • raid5atemyhomework
Owner
unassigned
Submitted by
raid5atemyhomework
Severity
normal

Debbugs page

R
R
raid5atemyhomework wrote 41 hours ago
(name . bug-guix@gnu.org)(address . bug-guix@gnu.org)
_RvdQNewziiAa0eDz9sY0SkB5aYYI2d8atxY4aNcnGxrdRPm-DCXAuBNgLbevNypdpOjYYW7V6rUl4luPwE6tZsMplpBKNRXTOHl6lrrErQ=@protonmail.com
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.
Attachment: base.scm
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 75450@patchwise.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 75450
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch