Mail archive
alpine-devel

Re: [alpine-devel] [PATCH] testing/mumble: new aport

From: Natanael Copa <ncopa_at_alpinelinux.org>
Date: Wed, 8 Oct 2014 12:02:45 +0200

The updated patch you sent me built. I have some comments on the
install scripts though. see below.

On Thu, 2 Oct 2014 10:52:55 +0000
Johannes Matheis <jomat+alpinebuild_at_jmt.gr> wrote:

> http://mumble.sourceforge.net/
> Mumble is an open source, low-latency, high quality voice chat software primarily intended for use while gaming
...

> diff --git a/testing/mumble/murmur.initd b/testing/mumble/murmur.initd
> new file mode 100644
> index 0000000..154db89
> --- /dev/null
> +++ b/testing/mumble/murmur.initd
> _at_@ -0,0 +1,13 @@
> +#!/sbin/runscript
> +
> +depends() {
> + needs localmount
> +}
> +
> +description="Mumble VoIP Server"
> +command="/usr/bin/murmurd"
> +command_args="-ini /etc/murmur.ini"
> +pidfile="/var/run/murmur/murmur.pid"
> +
> +# uses the openrc templates for start()/stop()
> +
> diff --git a/testing/mumble/murmur.post-deinstall b/testing/mumble/murmur.post-deinstall
> new file mode 100755
> index 0000000..4088787
> --- /dev/null
> +++ b/testing/mumble/murmur.post-deinstall
> _at_@ -0,0 +1,4 @@
> +#!/bin/sh
> +delgroup murmur
> +deluser murmur
> +exit 0

We normally don't delete users on apk del.
Maybe we should start do so?


> diff --git a/testing/mumble/murmur.post-install b/testing/mumble/murmur.post-install
> new file mode 100755
> index 0000000..5098307
> --- /dev/null
> +++ b/testing/mumble/murmur.post-install
> _at_@ -0,0 +1,6 @@
> +#!/bin/sh
> +chown murmur /var/run/murmur/
> +chgrp murmur /var/run/murmur/

this should be done with:

start_pre() {
        checkpath --owner murmur:murmur --directory /var/run/murmur
}

in init.d script. /var/run might be mounted tmpfs after bootup so
anything under there must be created run time.

> +chown murmur /var/lib/murmur/
> +chgrp murmur /var/lib/murmur/

the dir permissions should be set in the apk. To do that you add:

pkgusers="murmur"
pkggroups="murmur"

in the apk build and in package() you do:

        chown murmur "$pkgdir"/var/lib/murmur/
        chgrp murmur "$pkgdir"/var/lib/murmur/

abuild should have given you warning about setting permissions from
post-install.

> +exit 0

> diff --git a/testing/mumble/murmur.pre-install b/testing/mumble/murmur.pre-install
> new file mode 100755
> index 0000000..cb0e0eb
> --- /dev/null
> +++ b/testing/mumble/murmur.pre-install
> _at_@ -0,0 +1,4 @@
> +#!/bin/sh
> +addgroup -S murmur
> +adduser -S -h /var/lib/murmur -s /sbin/nologin -G murmur -g "Mumble daemon" -H -D murmur
> +exit 0



---
Unsubscribe:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Wed Oct 08 2014 - 12:02:45 GMT