public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-sound/teamspeak-server-bin/files/, media-sound/teamspeak-server-bin/
@ 2018-04-20 11:53 Michał Górny
  0 siblings, 0 replies; only message in thread
From: Michał Górny @ 2018-04-20 11:53 UTC (permalink / raw
  To: gentoo-commits

commit:     4071d90b25bd3b193866ab37eec6a7a84f72eba6
Author:     Conrad Kostecki <conrad <AT> kostecki <DOT> com>
AuthorDate: Fri Apr 20 09:21:29 2018 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Apr 20 11:51:32 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4071d90b

media-sound/teamspeak-server-bin: Bump to version 3.1.1

Closes: https://bugs.gentoo.org/648476
Package-Manager: Portage-2.3.30, Repoman-2.3.9

 media-sound/teamspeak-server-bin/Manifest          |   2 +
 .../teamspeak-server-bin/files/teamspeak.initd     |  45 +++++++
 .../teamspeak-server-bin/files/teamspeak.service   |  16 +++
 .../teamspeak-server-bin/files/teamspeak.tmpfiles  |   4 +
 .../files/ts3db_mariadb.ini.sample                 |   7 ++
 .../teamspeak-server-bin/files/ts3server-bin       |  10 ++
 .../teamspeak-server-bin/files/ts3server.ini       |  23 ++++
 .../files/ts3server_mariadb.ini.sample             |  23 ++++
 media-sound/teamspeak-server-bin/metadata.xml      |   4 +-
 .../teamspeak-server-bin-3.1.1.ebuild              | 133 +++++++++++++++++++++
 10 files changed, 266 insertions(+), 1 deletion(-)

diff --git a/media-sound/teamspeak-server-bin/Manifest b/media-sound/teamspeak-server-bin/Manifest
index 3117877e238..c36d7bee331 100644
--- a/media-sound/teamspeak-server-bin/Manifest
+++ b/media-sound/teamspeak-server-bin/Manifest
@@ -1,4 +1,6 @@
 DIST teamspeak3-server_linux_amd64-3.0.13.6.tar.bz2 6492488 BLAKE2B 4cad8545968423c2e65853d73f99a46cbccce628982c0a4418eaf34802d6a171f7e89a4ffc2fbd9fd82afdd9ffcd58d214c894ad88862c2927f1aec72f2d3087 SHA512 95271e5a44c7a14b8fbe134b855973c1af53ac76e6ba01089116b1f63c03bae25f5abfd176f9e26207aa4da8501d646298128078ab5b475458a7ccaba2a48e9c
 DIST teamspeak3-server_linux_amd64-3.0.13.8.tar.bz2 6916065 BLAKE2B 0ff4d86a03c910739f27b624d023ba3a5f323f4d56bca6a29a5ce8a737901372ff22cf18f2cc589af07b373fd17f952896ae2aa623571fc004a653125772aa0b SHA512 d8985f5850602660a6c037c1768a97c79b5842640d618ad00d242035a12820b52ba959545f3e668eb3d6079b1a228ff648c569e7d1fc64be6743ee77995ab0be
+DIST teamspeak3-server_linux_amd64-3.1.1.tar.bz2 7798155 BLAKE2B 4962968b33eaaa07043cfaa23d020d3d7dcff19b9e380f797196d382a4d004fb0ca2a56246eedf246f796e1bea8f719e80e715b2eda67e5340b7042dd1111a57 SHA512 8561cbeb16a44889ddaa6ab054b47abaaa6a5c942f39c308f6afd2687110bc9e142a8711afe557fa22fe92d1395b844a0eff8c8043921aee4e8070571bee6e44
 DIST teamspeak3-server_linux_x86-3.0.13.6.tar.bz2 6367104 BLAKE2B eeeefe664018e6072e1832d1fc22c24604cf230166269ac63a73cde02fc3e78cbdc3cf6e28dca37d8152e146bbb53489af1e3706fc98047c2389ad97053116f3 SHA512 a35e0fffe320206f2ca19153bd46a910bd1690541c83ec3c784fe1f4aaf8dbe430556990f6ebe0efbe71e52d3887b725da4e659db9d1e3c96fd6fd46e6dcd40d
 DIST teamspeak3-server_linux_x86-3.0.13.8.tar.bz2 6772664 BLAKE2B bde804a069a2700981656860f10d70a45511793370c978c0fc0c3926f039df367d61536657db987c6cc57e8aef543210527e9ff6e8316a5e78319dbd2f874c56 SHA512 7ef5d5d0fa2a1244011c2a68662481e4859aa1660e967b203a508497a4fd3c54db44a9f33116ed4932745942df4b5e4c646658346f288ce6191e3e5629d9638f
+DIST teamspeak3-server_linux_x86-3.1.1.tar.bz2 7658201 BLAKE2B 1625200a625ad7615241341846e992de8567c7fa7f6fbeb5234953ab696d60809591f870157e947b06953cb421019c7d0cf920bd0ba65968c4178284b0154206 SHA512 952e2e5d467f68b6f5f0bfc0e4f5a71917c2c14809aeccc64038679e6fd7a20f0794e0662f7a2fec1827a5a99249d1df3a673fb53e324524b4320c64083608c6

diff --git a/media-sound/teamspeak-server-bin/files/teamspeak.initd b/media-sound/teamspeak-server-bin/files/teamspeak.initd
new file mode 100644
index 00000000000..cc8393b58db
--- /dev/null
+++ b/media-sound/teamspeak-server-bin/files/teamspeak.initd
@@ -0,0 +1,45 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command="/opt/bin/ts3server"
+command_background="true"
+group="teamspeak"
+inifile="/etc/teamspeak3-server/ts3server.ini"
+name="TeamSpeak Server"
+pidfile="/run/teamspeak3-server/server.pid"
+user="teamspeak"
+
+depend() {
+	need net
+	use mysql
+}
+
+start_pre() {
+	# ensure, that the TS3-server finds all custom supplied shared objects on startup.
+	LD_LIBRARY_PATH="/opt/teamspeak3-server:$LD_LIBRARY_PATH"
+	export LD_LIBRARY_PATH
+
+	# temporay fix for EPERM bug (we still leave it here to make sure it is *really* not there)
+	rm -f /dev/shm/7gbhujb54g8z9hu43jre8
+
+	checkpath -d --owner ${user}:${group} --mode 0700 /run/teamspeak3-server
+}
+
+start() {
+	ebegin "Starting ${name}"
+
+	start-stop-daemon --start --quiet --background --env "TS3SERVER_LICENSE=accept" \
+		--pidfile "${pidfile}" --make-pidfile \
+		--user "${user}" --group "${group}" --chdir "/opt/teamspeak3-server" \
+		--exec "${command}" -- \
+		inifile="${inifile}"
+
+	eend $?
+}
+
+restart() {
+	stop
+	sleep 3
+	start
+}

diff --git a/media-sound/teamspeak-server-bin/files/teamspeak.service b/media-sound/teamspeak-server-bin/files/teamspeak.service
new file mode 100644
index 00000000000..0c77e4cbe75
--- /dev/null
+++ b/media-sound/teamspeak-server-bin/files/teamspeak.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=TeamSpeak3 Server
+After=network-online.target
+
+[Service]
+Type=simple
+User=teamspeak
+Group=teamspeak
+WorkingDirectory=/opt/teamspeak3-server
+Environment="LD_LIBRARY_PATH=/opt/teamspeak3-server"
+Environment="TS3SERVER_LICENSE=accept"
+ExecStartPre=/bin/rm -f /dev/shm/7gbhujb54g8z9hu43jre8
+ExecStart=/opt/bin/ts3server inifile=/etc/teamspeak3-server/ts3server.ini
+
+[Install]
+WantedBy=multi-user.target

diff --git a/media-sound/teamspeak-server-bin/files/teamspeak.tmpfiles b/media-sound/teamspeak-server-bin/files/teamspeak.tmpfiles
new file mode 100644
index 00000000000..1b1d7f0e990
--- /dev/null
+++ b/media-sound/teamspeak-server-bin/files/teamspeak.tmpfiles
@@ -0,0 +1,4 @@
+# systemd tmpfile settings for teamspeak3-server
+# See tmpfiles.d(5) for details
+
+d /var/run/teamspeak3 0755 teamspeak teamspeak -

diff --git a/media-sound/teamspeak-server-bin/files/ts3db_mariadb.ini.sample b/media-sound/teamspeak-server-bin/files/ts3db_mariadb.ini.sample
new file mode 100644
index 00000000000..0a8ebc47df1
--- /dev/null
+++ b/media-sound/teamspeak-server-bin/files/ts3db_mariadb.ini.sample
@@ -0,0 +1,7 @@
+[config]
+host=localhost
+port=3306
+username=teamspeak
+password=teamspeak
+database=teamspeak
+socket=

diff --git a/media-sound/teamspeak-server-bin/files/ts3server-bin b/media-sound/teamspeak-server-bin/files/ts3server-bin
new file mode 100644
index 00000000000..3deb9dd87e5
--- /dev/null
+++ b/media-sound/teamspeak-server-bin/files/ts3server-bin
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+# Sets BASEDIR for teamspeak3-server
+BASEDIR="/opt/teamspeak3-server"
+
+# Work around DT_RPATH (.) security issue by chdir'ing into expected $LD_LIBRARY_PATH
+export LD_LIBRARY_PATH="${BASEDIR}${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}"
+
+# Launch teamspeak3-server
+cd "${BASEDIR}" && exec "${BASEDIR}/ts3server" $*

diff --git a/media-sound/teamspeak-server-bin/files/ts3server.ini b/media-sound/teamspeak-server-bin/files/ts3server.ini
new file mode 100644
index 00000000000..962c8b80f0a
--- /dev/null
+++ b/media-sound/teamspeak-server-bin/files/ts3server.ini
@@ -0,0 +1,23 @@
+machine_id=
+default_voice_port=9987
+voice_ip=
+licensepath=/opt/teamspeak3-server/
+filetransfer_port=30033
+filetransfer_ip=
+query_port=10011
+query_ip=0.0.0.0, ::
+query_ip_whitelist=query_ip_whitelist.txt
+query_ip_blacklist=query_ip_blacklist.txt
+dbplugin=ts3db_sqlite3
+dbpluginparameter=
+dbsqlpath=/opt/teamspeak3-server/sql/
+dbsqlcreatepath=create_sqlite/
+dbconnections=10
+logpath=/var/log/teamspeak3-server/
+logquerycommands=0
+dbclientkeepdays=30
+logappend=0
+query_skipbruteforcecheck=0
+query_buffer_mb=20
+http_proxy=
+license_accepted=1

diff --git a/media-sound/teamspeak-server-bin/files/ts3server_mariadb.ini.sample b/media-sound/teamspeak-server-bin/files/ts3server_mariadb.ini.sample
new file mode 100644
index 00000000000..94cea8bbe9d
--- /dev/null
+++ b/media-sound/teamspeak-server-bin/files/ts3server_mariadb.ini.sample
@@ -0,0 +1,23 @@
+machine_id=
+default_voice_port=9987
+voice_ip=
+licensepath=/opt/teamspeak3-server/
+filetransfer_port=30033
+filetransfer_ip=
+query_port=10011
+query_ip=0.0.0.0, ::
+query_ip_whitelist=query_ip_whitelist.txt
+query_ip_blacklist=query_ip_blacklist.txt
+dbplugin=ts3db_mariadb
+dbpluginparameter=ts3db_mariadb.ini
+dbsqlpath=/opt/teamspeak3-server/sql/
+dbsqlcreatepath=create_mariadb/
+dbconnections=10
+logpath=/var/log/teamspeak3-server/
+logquerycommands=0
+dbclientkeepdays=30
+logappend=0
+query_skipbruteforcecheck=0
+query_buffer_mb=20
+http_proxy=
+license_accepted=1

diff --git a/media-sound/teamspeak-server-bin/metadata.xml b/media-sound/teamspeak-server-bin/metadata.xml
index bde7c6989fa..67ae94b5f92 100644
--- a/media-sound/teamspeak-server-bin/metadata.xml
+++ b/media-sound/teamspeak-server-bin/metadata.xml
@@ -11,6 +11,8 @@
 	</maintainer>
 	<longdescription>TeamSpeak Server (Voice Communication Software)</longdescription>
 	<use>
-		<flag name="tsdns">Make use of TeamSpeak DNS.</flag>
+		<flag name="doc">Install TeamSpeak complete documentation.</flag>
+		<!-- <flag name="mysql">Install TeamSpeak MariaDB support.</flag> -->
+		<flag name="tsdns">Install TeamSpeak DNS.</flag>
 	</use>
 </pkgmetadata>

diff --git a/media-sound/teamspeak-server-bin/teamspeak-server-bin-3.1.1.ebuild b/media-sound/teamspeak-server-bin/teamspeak-server-bin-3.1.1.ebuild
new file mode 100644
index 00000000000..17379ce410c
--- /dev/null
+++ b/media-sound/teamspeak-server-bin/teamspeak-server-bin-3.1.1.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils systemd user
+
+DESCRIPTION="TeamSpeak is software for quality voice communication via the Internet"
+HOMEPAGE="https://www.teamspeak.com/"
+SRC_URI="amd64? ( http://ftp.4players.de/pub/hosted/ts3/releases/${PV}/teamspeak3-server_linux_amd64-${PV}.tar.bz2 )
+	x86? ( http://ftp.4players.de/pub/hosted/ts3/releases/${PV}/teamspeak3-server_linux_x86-${PV}.tar.bz2 )"
+
+LICENSE="LGPL-2.1 teamspeak3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc tsdns"
+# IUSE="doc mysql tsdns"
+
+# RDEPEND="mysql? ( dev-db/mariadb-connector-c:0=
+#		<dev-libs/openssl-1.1:0=
+#		sys-libs/zlib )"
+
+RESTRICT="mirror strip"
+
+S="${WORKDIR}/teamspeak3-server_linux"
+
+pkg_setup() {
+	enewuser teamspeak
+}
+
+src_unpack() {
+	unpack ${A}
+
+	if use amd64; then
+		mv "teamspeak3-server_linux_amd64" "teamspeak3-server_linux" || die
+	else
+		mv "teamspeak3-server_linux_x86" "teamspeak3-server_linux" || die
+	fi
+}
+
+src_install() {
+	# Accept license
+	touch "${T%/}"/.ts3server_license_accepted || die
+	insinto "/opt/teamspeak3-server"
+	doins "${T}"/.ts3server_license_accepted
+
+	# Install binary and wrapper
+	exeinto "/opt/teamspeak3-server"
+	doexe "ts3server"
+	doexe "${FILESDIR}/ts3server-bin"
+	dodir "/opt/bin"
+	dosym "../teamspeak3-server/ts3server-bin" "/opt/bin/ts3server"
+
+	# Install libs
+	exeinto "/opt/teamspeak3-server"
+	doexe "libts3db_sqlite3.so"
+
+	# Install sql
+	insinto "/opt/teamspeak3-server/sql"
+	doins "sql"/*.sql
+	doins -r "sql/create_sqlite"
+
+	# Install config
+	insinto "/etc/teamspeak3-server"
+	doins "${FILESDIR}/ts3server.ini"
+
+	# Install init script and systemd unit
+	newinitd "${FILESDIR}/teamspeak.initd" teamspeak3-server
+	systemd_newunit "${FILESDIR}/teamspeak.service" teamspeak3-server.service
+	systemd_newtmpfilesd "${FILESDIR}/teamspeak.tmpfiles" teamspeak3-server.conf
+
+	# Install optional mysql
+	# if use mysql; then
+	#	insinto "/etc/teamspeak3-server"
+	#	doins "${FILESDIR}/ts3server_mariadb.ini.sample"
+	#	doins "${FILESDIR}/ts3db_mariadb.ini.sample"
+	#
+	#	exeinto "/opt/teamspeak3-server"
+	#	doexe "libts3db_mariadb.so"
+	#
+	#	insinto "/opt/teamspeak3-server/sql"
+	#	doins -r "sql/create_mariadb"
+	#	doins -r "sql/updates_and_fixes"
+	# fi
+
+	# Install optional docs
+	if use doc; then
+		local HTML_DOCS=( "doc/serverquery/." )
+
+		docinto "serverquery"
+		dodoc "serverquerydocs"/*.txt
+
+		docinto "ts3server"
+		dodoc "doc"/*.txt
+	fi
+
+	# Install tsdns
+	if use tsdns; then
+		exeinto "/opt/teamspeak3-server"
+		doexe "tsdns/tsdnsserver"
+		dodir "/opt/bin"
+		dosym "../teamspeak3-server/tsdnsserver" "/opt/bin/tsdnsserver"
+
+		insinto "/etc/teamspeak3-server"
+		doins "tsdns/tsdns_settings.ini.sample"
+
+		docinto "tsdns"
+		dodoc "tsdns/README" "tsdns/USAGE"
+	fi
+
+	# Install docs
+	einstalldocs
+
+	# Keep directories
+	keepdir "/etc/teamspeak3-server"
+	keepdir "/var/log/teamspeak3-server"
+
+	# Protect config
+	# if use mysql; then
+	#	echo "CONFIG_PROTECT=\"/etc/teamspeak3-server/ts3server.ini /etc/teamspeak3-server/ts3server_mariadb.ini\"" > "${T}"/99teamspeak3-server || die
+	# else
+	echo "CONFIG_PROTECT=\"/etc/teamspeak3-server/ts3server.ini\"" > "${T}"/99teamspeak3-server || die
+	# fi
+	doenvd "${T}"/99teamspeak3-server
+
+	# Set permissions
+	fowners -R teamspeak:teamspeak "/etc/teamspeak3-server" "/opt/teamspeak3-server" "/var/log/teamspeak3-server"
+}
+
+pkg_postinst() {
+	elog "If you have a Non-Profit License (NPL),"
+	elog "place it in /opt/teamspeak3-server as licensekey.dat."
+}


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-04-20 11:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-20 11:53 [gentoo-commits] repo/gentoo:master commit in: media-sound/teamspeak-server-bin/files/, media-sound/teamspeak-server-bin/ Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox