[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#60735] [PATCH v2 3/3] services: Add block-facebook-hosts-service-ty
From: |
Ludovic Courtès |
Subject: |
[bug#60735] [PATCH v2 3/3] services: Add block-facebook-hosts-service-type. |
Date: |
Mon, 23 Jan 2023 23:40:52 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Bruno Victal <mirai@makinata.eu> skribis:
> Deprecates %facebook-host-aliases in favour of using
> hosts-service-type service extensions.
>
> * gnu/services/networking.scm
> (block-facebook-hosts-service-type): New variable.
> (%facebook-host-aliases): Deprecate variable.
> * doc/guix.texi: Document it.
[...]
> -fe80::1%lo0 www.connect.facebook.net
> -fe80::1%lo0 apps.facebook.com\n")
> -
> + (let ((domains '("facebook.com" "www.facebook.com"
> + "login.facebook.com" "www.login.facebook.com"
> + "fbcdn.net" "www.fbcdn.net" "fbcdn.com" "www.fbcdn.com"
> + "static.ak.fbcdn.net" "static.ak.connect.facebook.com"
> + "connect.facebook.net" "www.connect.facebook.net"
> + "apps.facebook.com")))
> + (append-map (lambda (name)
> + (map (lambda (addr)
> + (host addr name))
> + (list "127.0.0.1" "::1"))) domains)))
The IPv6 address is different, but now I’m not sure whether fe80::1%lo0
made sense?
> +(define-deprecated %facebook-host-aliases
> + block-facebook-hosts-service-type
> + (let ((<host-entry> (@ (gnu services) <host-entry>)))
> + (string-join
> + (map (match-lambda
> + (($ <host-entry> address canonical-name)
Avoid matching on records, just use the accessors.
Otherwise LGTM, thanks!
Ludo’.
[bug#60735] [PATCH v2 1/3] services: Add etc-hosts-service-type., Ludovic Courtès, 2023/01/23
[bug#60735] [PATCH v2 1/3] services: Add etc-hosts-service-type., Ludovic Courtès, 2023/01/23
[bug#60735] [PATCH v3 1/3] services: Add hosts-service-type., Bruno Victal, 2023/01/27