New package: spreed-webrtc-0.29.7

This commit is contained in:
Toyam Cox 2017-10-23 01:22:08 -04:00 committed by Toyam Cox
parent 1abb4d7dc9
commit 9c981ecd67
6 changed files with 92 additions and 0 deletions

View File

@ -0,0 +1,16 @@
case "${ACTION}" in
post)
# Do not be confused. This has no effect on whether or not the package is edited
# That honour rests on the <SESSION_SECRET> string and it's companions.
if [ "${UPDATE}" != "yes" ]; then
sessionSecret=$(tr -dc [:xdigit:] < /dev/urandom | tr [:upper:] [:lower:] | head -c128)
encryptionSecret=$(tr -dc [:xdigit:] < /dev/urandom | tr [:upper:] [:lower:] | head -c64)
# The following is a public value but randomness should be fine
serverToken=$(tr -dc [:xdigit:] < /dev/urandom | tr [:upper:] [:lower:] | head -c64)
sed -i etc/spreed/webrtc.conf \
-e "s!<SESSION_SECRET>!$sessionSecret!" \
-e "s!<ENCRYPTION_SECRET>!$encryptionSecret!" \
-e "s!<SERVER_TOKEN>!$serverToken!"
fi
;;
esac

View File

@ -0,0 +1,2 @@
#!/bin/sh
exec logger -t spreed-webrtc-server -p daemon.notice

View File

@ -0,0 +1,2 @@
#!/bin/sh
exec chpst -u _spreed_webrtc:_spreed_webrtc spreed-webrtc-server -c /etc/spreed/webrtc.conf

View File

@ -0,0 +1,27 @@
--- server.conf.in.orig 2017-10-24 17:32:49.929715267 -0400
+++ server.conf.in 2017-10-24 17:52:14.557079287 -0400
@@ -70,13 +70,13 @@
; Session secret to use for session id generator. 32 or 64 bytes of random data
; are recommented (hex encoded). A warning will be logged if hex decode fails.
; You can generate a secret easily with "xxd -ps -l 32 -c 32 /dev/random".
-sessionSecret = the-default-secret-do-not-keep-me
+sessionSecret = <SESSION_SECRET>
; Encryption secret protecting the data in generated server side tokens. Use
; 16, 24, or 32 bytes (hex encoded) to select AES-128, AES-192, or AES-256.
; When you change the encryption secret, stored authentications, sessions and
; contacts become invalid. A warning will be logged if hex decode fails. You
; can generate a secret easily with "xxd -ps -l 32 -c 32 /dev/random".
-encryptionSecret = tne-default-encryption-block-key
+encryptionSecret = <ENCRYPTION_SECRET>
; Full path to a text file containig client tokens which a user needs to enter
; when accessing the web client. Each line in this file represents a valid
; token.
@@ -109,7 +109,7 @@
; Server token is a public random string which is used to enhance security of
; server generated security tokens. When the serverToken is changed all existing
; nonces become invalid. Use 32 or 64 characters (eg. 16 or 32 byte hex).
-serverToken = i-did-not-change-the-public-token-boo
+serverToken = <SERVER_TOKEN>
; The server realm is part of the validation chain of tokens and nonces and is
; added as suffix to server created user ids if user creation is enabled. When
; the realm is changed, all existing tokens and nonces become invalid.

View File

@ -0,0 +1,11 @@
--- Makefile.am.bck 2017-10-21 16:58:49.133926179 -0400
+++ Makefile.am 2017-10-21 16:59:15.308887970 -0400
@@ -33,7 +33,7 @@
GOTESTFLAGS ?=
SYSTEM_GOPATH = /usr/share/gocode/src/
-BIN ?= @prefix@/sbin
+BIN ?= @bindir@
SHARE ?= @prefix@/share/spreed-webrtc-server
OUTPUT := $(CURDIR)/bin

View File

@ -0,0 +1,34 @@
# Template file for 'spreed-webrtc'
pkgname=spreed-webrtc
version=0.29.7
revision=1
build_style=go
go_import_path="github.com/strukturag/spreed-webrtc"
go_package="${go_import_path}/src/app/spreed-webrtc-server"
hostmakedepends="automake nodejs git"
conf_files="/etc/spreed/webrtc.conf"
short_desc="WebRTC audio/video call and conferencing server and web client"
maintainer="Toyam Cox <Vaelatern@voidlinux.eu>"
license="AGPL-3"
homepage="https://github.com/strukturag/spreed-webrtc"
distfiles="https://github.com/strukturag/spreed-webrtc/archive/v${version}.tar.gz"
checksum=d05b820fe3883840eadf8b96bda663397991849d9bda4750fc7c4e642c9c3268
system_accounts="_spreed_webrtc"
pre_build() {
./autogen.sh
./configure ${configure_args}
make assets
}
post_install() {
vsconf server.conf.in
vmkdir etc/spreed 755
vinstall server.conf.in 644 etc/spreed webrtc.conf # Match Ubuntu packaging and thus online docs
export SHARE=/usr/share/spreed-webrtc-server
make DESTDIR="${DESTDIR}" install-assets
vsv spreed-webrtc-server
}