GNU bug report logs -
#32771
[PATCH 0/2] Varnish service
Previous Next
Reported by: Marius Bakke <mbakke <at> fastmail.com>
Date: Wed, 19 Sep 2018 13:29:01 UTC
Severity: normal
Tags: patch
Done: Marius Bakke <mbakke <at> fastmail.com>
Bug is archived. No further changes may be made.
Full log
Message #25 received at 32771-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Marius Bakke <mbakke <at> fastmail.com> writes:
> Christopher Baines <mail <at> cbaines.net> writes:
>
>> Also, I wonder if you'd considered supporing running multiple instances
>> of varnishd, I guess the "name" might come in useful then.
>
> If you read the system test closely, you'll notice it does actually run
> multiple instances, one proxying the other, and testing different
> aspects of the service definition :-)
Huh, I made this comment based off the service itself. I didn't quite
realise you could just have multiple services of the same type without
handling that explicitly in the service type.
>>> +@c Varnish does not support HTTPS, so keep this URL to avoid confusion.
>>> +For example, to mirror @url{http://www.gnu.org,www.gnu.org} with VCL you
>>> +can do something along these lines:
>>
>> Does "@c" mean a comment?
>
> Yes.
Ah, I think I get it now. I was reading this comment as being the whole
block, but now I see it's only the line about the use of HTTP.
>>> +(define %varnish-accounts
>>> + (list (user-group
>>> + (name "varnish")
>>> + (system? #t))
>>> + (user-account
>>> + (name "varnish")
>>> + (group "varnish")
>>> + (system? #t)
>>> + (comment "Varnish Cache User")
>>> + (home-directory "/var/varnish")
>>> + (shell (file-append shadow "/sbin/nologin")))))
>>> +
>>> +(define %varnish-activation
>>> + #~(begin
>>> + (use-modules (guix build utils))
>>> + (let ((home-dir "/var/varnish")
>>> + (user (getpwnam "varnish")))
>>> + (mkdir-p home-dir)
>>> + (chown home-dir (passwd:uid user) (passwd:gid user))
>>> + (chmod home-dir #o755))))
>>
>> Is this necessary, as I think the users home directory might be
>> automatically created?
>
> You are correct! I removed the activation script.
Great :)
>> Anyway, this looks pretty much good to me.
>
> Thank you very much for reviewing :-)
>
> Pushed as 3b97a1779f3b65d582b8edc8c154b6414314b946.
Awesome :)
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 6 years and 296 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.