GNU bug report logs -
#60735
[PATCH 0/2] Implement etc-hosts-service-type
Previous Next
Reported by: Bruno Victal <mirai <at> makinata.eu>
Date: Wed, 11 Jan 2023 17:27:02 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Bruno Victal <mirai <at> 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’.
This bug report was last modified 2 years and 99 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.