all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: nee <nee@cock.li>
Cc: 28960@debbugs.gnu.org
Subject: [bug#28960] [PATCH] services: Add murmur.
Date: Mon, 23 Oct 2017 22:04:17 -0700	[thread overview]
Message-ID: <873769qgq6.fsf@gnu.org> (raw)
In-Reply-To: <750375c6-8bc2-3e63-05d3-fd94635aa88c@cock.li> (nee@cock.li's message of "Mon, 23 Oct 2017 23:34:22 +0200")

Hi nee,

nee <nee@cock.li> skribis:

> Hello, this patch adds a murmur service.
> Murmur is the biggest implementation of a mumble voice chat server. The
> murmur executable is already packaged in the mumble package.

Neat!

> From 74618e5a39198077327f14362d8d98538f4d39ab Mon Sep 17 00:00:00 2001
> From: nee <nee.git@cock.li>
> Date: Sat, 14 Oct 2017 11:27:50 +0200
> Subject: [PATCH] services: Add murmur.
>
> * gnu/services/telephony.scm: New file.
> * gnu/local.mk: Add it.
> * doc/guix.texi: Document it.

You can write:

  * doc/guix.texi (Telephony Services): New node.

> +@deftp {Data Type} murmur-configuration
> +The service type for the murmur server. An example configuration can look like this:
> +@example
> +(service murmur-service-type
> +         (murmur-configuration
> +	  (welcome-text "Welcome to this mumble server running on GuixSD!")
> +          (cert-required #t) ; disallow text password logins
> +          (ssl-cert "/etc/letsencrypt/live/mumble.example.com/fullchain.pem")
> +          (ssl-key "/etc/letsencrypt/live/mumble.example.com/privkey.pem")))
> +@end example

Please don’t use tabs.

> +After reconfiguring your system, you have to manually set the
> +SuperUser password with the command that is printed during the activation phase.

That sounds quite unusual.  Perhaps you need @code{SuperUser}, if you
literally mean the “SuperUser” account in Mumble?

> +Then you can use the @code{mumble} client to
> +login as new user, register, and logout.
> +For the next step login with the name "SuperUser" and the SuperUser password

Same here.

> +(define-record-type* <murmur-configuration> murmur-configuration
> +  make-murmur-configuration
> +  murmur-configuration?
> +  (package               murmur-configuration-package ;<package>
> +                         (default mumble))
> +  (user                  murmur-configuration-user
> +                         (default "murmur"))
> +  (group                 murmur-configuration-group
> +                         (default "murmur"))
> +  (port                  murmur-configuration-port
> +                         (default 64738))

[...]

> +  (allow-html            murmur-configuration-allow-html
> +                         (default #f))
> +  (allow-ping            murmur-configuration-allow-ping
> +                         (default #f))

Add a question mark since these are Boolean options.  So ‘allow-html?’
and ‘allow-ping?’.

> +(define (default-murmur-config
> +          package user group port welcome-text server-password
> +          max-users max-user-bandwidth database-file log-file pid-file
> +          autoban-attempts autoban-timeframe autoban-time
> +          opus-threshold channel-nesting-limit channelname-regex username-regex
> +          text-message-length image-message-length cert-required
> +          remember-channel allow-html allow-ping bonjour send-version log-days
> +          obfuscate-ips ssl-cert ssl-key ssl-dh-params ssl-ciphers
> +          public-registration)

This many positional parameters is not reasonable.  :-)  Just pass a
<murmur-configuration> directly, and use the accessor procedures.

> +(define murmur-activation
> +  (match-lambda
> +    (($ <murmur-configuration>
> +        package user group port welcome-text server-password
> +        max-users max-user-bandwidth database-file log-file pid-file
> +        autoban-attempts autoban-timeframe autoban-time
> +        opus-threshold channel-nesting-limit channelname-regex username-regex
> +        text-message-length image-message-length cert-required remember-channel
> +        allow-html allow-ping bonjour send-version log-days obfuscate-ips
> +        ssl-cert ssl-key ssl-dh-params ssl-ciphers public-registration file)

Likewise: use the accessor procedures instead of this.

> +(define murmur-accounts
> +  (match-lambda
> +    (($ <murmur-configuration> _ user group)
> +     (filter identity
> +             (list
> +              (and (equal? group "murmur")
> +                   (user-group
> +                    (name "murmur")
> +                    (system? #t)))
> +              (and (equal? user "murmur")
> +                   (user-account
> +                    (name "murmur")
> +                    (group group)
> +                    (system? #t)
> +                    (comment "Murmur Daemon")
> +                    (home-directory "/var/empty")
> +                    (shell (file-append shadow "/sbin/nologin")))))))))


Why not just

  (match-lambda
     (($ <murmur-configuration> _ user group)
      (list (user-group (name group) (system? #t))
            (user-account
              (name user)
              (group group)
              (system? #t)
              …
              ))))

?

> +(define murmur-shepherd-service
> +  (match-lambda
> +    (($ <murmur-configuration>
> +        package user group port welcome-text server-password
> +        max-users max-user-bandwidth database-file log-file pid-file
> +        autoban-attempts autoban-timeframe autoban-time
> +        opus-threshold channel-nesting-limit channelname-regex username-regex
> +        text-message-length image-message-length cert-required remember-channel
> +        allow-html allow-ping bonjour send-version log-days obfuscate-ips
> +        ssl-cert ssl-key ssl-dh-params ssl-ciphers public-registration file)

Use the accessors instead.

Could you send an updated patch?

Thanks,
Ludo’.’

  parent reply	other threads:[~2017-10-24  5:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-23 21:34 [bug#28960] [PATCH] services: Add murmur nee
2017-10-24  4:32 ` ng0
2017-10-24  5:04 ` Ludovic Courtès [this message]
2017-10-24 17:19   ` nee
2017-10-24 21:34     ` Ludovic Courtès
2017-10-30 22:38       ` nee
2017-10-31  0:02         ` Ludovic Courtès
2017-11-05 10:42         ` bug#28960: " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=873769qgq6.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=28960@debbugs.gnu.org \
    --cc=nee@cock.li \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.