Merge lp:~jose/charms/precise/teamspeak3/1297650-fix into lp:charms/teamspeak3

Proposed by José Antonio Rey
Status: Merged
Merged at revision: 13
Proposed branch: lp:~jose/charms/precise/teamspeak3/1297650-fix
Merge into: lp:charms/teamspeak3
Diff against target: 168 lines (+64/-24)
6 files modified
README (+0/-5)
README.md (+32/-0)
config.yaml (+7/-7)
hooks/config-changed (+11/-4)
hooks/install (+9/-8)
metadata.yaml (+5/-0)
To merge this branch: bzr merge lp:~jose/charms/precise/teamspeak3/1297650-fix
Reviewer Review Type Date Requested Status
Charles Butler (community) Approve
charmers Pending
Review via email: mp+212775@code.launchpad.net

Commit message

Added categories, icon, reformatted README to Markdown

Description of the change

Charmworld reports the following errors:

    err: Charms need a maintainer (See RFC2822) - Name <email>
    warn: Metadata is missing categories.
    warn: No icon.svg file.

Fixed all of them and reformatted the README to Markdown

To post a comment you must log in.
Revision history for this message
Charles Butler (lazypower) wrote :

Thanks for the submission Jose!

While reviewing this merge proposal I have the following notes:

The readme is extremely light on details. There is an opportunity to improve what is here beyond moving the format to markdown. I suggest adding a boilerplate readme via charm-tools 'charm add readme' command and editing the template so you satisfy all the major subsections.

The default admin token to manage the server while grandfathered in also has an opportunity to be changed in default behavior so it's not an open attack vector. If you've got the time to invest in modifying the charm so it is more secure by default that would be a great addition here.

The icon does not conform to charm store guidelines unfortunately and should either be refactored or removed.

barring a few simple modifications, your merge is close to being landed into the charm store. Thanks again for this submission!

I'm going to mark this review as needs fixing, and when you are ready for another review be sure to click the 'request another review' button in the right hand corner.

If you have any questions about this review feel free to contact us in #juju on irc.freenode.net or email the list <email address hidden>

Thanks again!

review: Needs Fixing
Revision history for this message
José Antonio Rey (jose) wrote :

Ready for review!

Revision history for this message
Charles Butler (lazypower) wrote :

Jose,

Thanks for the quick turn around on this. There's a problem with this MP however. By deleting configuration values, this breaks backwords compatibility. They need to remain in the config.yaml, and be noted that they are deprecated in the description.

Thanks again for the submission. I'm going to change status of this MP to "needs work" and when you're ready for another review please click the "Request another review" button in the upper right hand corner of the commit message.

If you have any questions/comments/concerns about the review contact us in #juju on irc.freenode.net or email the mailing list <email address hidden>

review: Needs Fixing
Revision history for this message
José Antonio Rey (jose) wrote :

Fixed!

Revision history for this message
Charles Butler (lazypower) wrote :

+1 LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== removed file 'README'
--- README 2011-11-28 22:33:36 +0000
+++ README 1970-01-01 00:00:00 +0000
@@ -1,5 +0,0 @@
1Please read the TeamSpeak License Agreement file before deploying the charm.
2
3After deployed you can access the new service with the TeamSpeak client downloaded from <http://www.teamspeak.com/?page=downloads>.
4
5The default administration token is "admintoken" (no quote marks), you will be then able to create users and configure your new server.
60
=== added file 'README.md'
--- README.md 1970-01-01 00:00:00 +0000
+++ README.md 2014-05-01 15:45:20 +0000
@@ -0,0 +1,32 @@
1# Overview
2
3Please read the TeamSpeak License Agreement file before deploying the charm.
4
5# Usage
6
7In order to deploy TeamSpeak 3, first bootstrap your environment:
8
9 juju bootstrap
10
11Then, deploy TeamSpeak 3:
12
13 juju deploy teamspeak3
14
15Finally, expose your service:
16
17 juju expose teamspeak3
18
19After deployed you can access the new service with the
20[TeamSpeak client](http://www.teamspeak.com/?page=downloads). The public address
21can be found by executing `juju status`.
22
23# Configuration
24
25The only configuration option this charm has is the port the server will be
26running at. By default, this port is 9987.
27
28# Contact Information
29
30## Upstream Project Name
31
32- [TeamSpeak 3 website](http://teamspeak.com/?page=teamspeak3)
033
=== modified file 'config.yaml'
--- config.yaml 2012-01-28 01:11:44 +0000
+++ config.yaml 2014-05-01 15:45:20 +0000
@@ -1,17 +1,17 @@
1options:1options:
2 port:
3 default: 9987
4 type: int
5 description: Port to run server at.
2 administrator:6 administrator:
3 default: serveradmin7 default: ""
4 type: string8 type: string
5 description: Username of the administrator of the server.9 description: Username of the administrator of the server.
6 administrator-secret:10 administrator-secret:
7 default: serveradmin11 default: ""
8 type: string12 type: string
9 description: Default administrator login password.13 description: Default administrator login password.
10 port:
11 default: 9987
12 type: int
13 description: Port to run server at.
14 admin-token:14 admin-token:
15 default: admintoken15 default: ""
16 type: string16 type: string
17 description: Token necessary for the initial configuration of the server.17 description: Token necessary for the initial configuration of the server.
1818
=== modified file 'hooks/config-changed'
--- hooks/config-changed 2011-11-29 21:08:14 +0000
+++ hooks/config-changed 2014-05-01 15:45:20 +0000
@@ -1,6 +1,6 @@
1#!/bin/sh1#!/bin/sh
22
3set -ux3set -eux
44
5LOCAL_DB_FILE="/opt/teamspeak3-server/ts3server.sqlitedb"5LOCAL_DB_FILE="/opt/teamspeak3-server/ts3server.sqlitedb"
6LOCAL_PID_FILE="/opt/teamspeak3-server/ts3server.pid"6LOCAL_PID_FILE="/opt/teamspeak3-server/ts3server.pid"
@@ -10,9 +10,16 @@
10fi10fi
1111
12PORT=`config-get port`12PORT=`config-get port`
13if [ ! -z "$PORT" ]; then13if [ ! -f .port ] && [ "$PORT" != "9987" ]; then
14 sqlite3 /opt/teamspeak3-server/ts3server.sqlitedb "UPDATE servers SET server_port='$PORT' WHERE server_id='1'"14 sqlite3 /opt/teamspeak3-server/ts3server.sqlitedb "UPDATE servers SET server_port='$PORT' WHERE server_id='1'"
15 open-port "$PORT"/TCP15 open-port "$PORT"/UDP
16 echo "$PORT" > .port
17elif [ -f .port ] && [ "$PORT" != `cat .port` ]; then
18 CURPORT=`cat .port`
19 sqlite3 /opt/teamspeak3-server/ts3server.sqlitedb "UPDATE servers SET server_port='$PORT' WHERE server_id='1'"
20 close-port "$CURPORT"/UDP
21 open-port "$PORT"/UDP
22 echo "$PORT" > .port
16fi23fi
1724
18if [ -f "$LOCAL_PID_FILE" ]; then25if [ -f "$LOCAL_PID_FILE" ]; then
1926
=== modified file 'hooks/install'
--- hooks/install 2011-11-30 19:43:51 +0000
+++ hooks/install 2014-05-01 15:45:20 +0000
@@ -1,27 +1,28 @@
1#!/bin/sh1#!/bin/sh
22
3set -eux
4
3juju-log "Installing dependencies"5juju-log "Installing dependencies"
4apt-get install -y sqlite3 wget6apt-get install -y sqlite3 wget
57
6if [ ! -d "charm-tools" ]; then8add-apt-repository -y ppa:charmers/charm-helpers
7 juju-log "Installing charm-helpers vis charm-tools"9apt-get update
8 bzr branch lp:charm-tools10apt-get install -y charm-helper-sh
9fi
1011
11. "charm-tools/helpers/sh/net.sh"12. /usr/share/charm-helper/sh/net.sh
1213
1314
14juju-log "Downloading latest teamspeak server..."15juju-log "Downloading latest teamspeak server..."
1516
16TYPE=$(uname -m)17TYPE=$(uname -m)
17if [ "$TYPE" = "x86_64" ]; then18if [ "$TYPE" = "x86_64" ]; then
18 DOWNLOAD=`ch_get_file "http://teamspeak.gameserver.gamed.de/ts3/releases/3.0.1/teamspeak3-server_linux-amd64-3.0.1.tar.gz" "0253fb6eabbd7e1c83414babb4b145be"`19 DOWNLOAD=`ch_get_file "http://teamspeak.gameserver.gamed.de/ts3/releases/3.0.10.3/teamspeak3-server_linux-amd64-3.0.10.3.tar.gz" "dbc550a00be56a384f7e5768105cf334"`
19 if [ ! -f "$DOWNLOAD" ]; then20 if [ ! -f "$DOWNLOAD" ]; then
20 juju-log "Something went terribly wrong while getting the right file, aborting."21 juju-log "Something went terribly wrong while getting the right file, aborting."
21 exit 122 exit 1
22 fi23 fi
23else24else
24 DOWNLOAD=`ch_get_file "http://teamspeak.gameserver.gamed.de/ts3/releases/3.0.1/teamspeak3-server_linux-x86-3.0.1.tar.gz" "a81c79b18185eb2bfa6e1b881a502a2a"`25 DOWNLOAD=`ch_get_file "http://teamspeak.gameserver.gamed.de/ts3/releases/3.0.10.3/teamspeak3-server_linux-x86-3.0.10.3.tar.gz" "7555abaedb3d398b54d40e75da618871"`
25 if [ ! -f "$DOWNLOAD" ]; then26 if [ ! -f "$DOWNLOAD" ]; then
26 juju-log "Something went terribly wrong while getting the right file, aborting."27 juju-log "Something went terribly wrong while getting the right file, aborting."
27 exit 128 exit 1
@@ -38,6 +39,6 @@
3839
39juju-log "Configuring server and starting database with default values"40juju-log "Configuring server and starting database with default values"
40service teamspeak3 init_db41service teamspeak3 init_db
41open-port 9987/TCP42open-port 9987/UDP
4243
43juju-log "Installation complete!"44juju-log "Installation complete!"
4445
=== modified file 'metadata.yaml'
--- metadata.yaml 2011-11-28 22:33:36 +0000
+++ metadata.yaml 2014-05-01 15:45:20 +0000
@@ -11,3 +11,8 @@
11 small businesses cutting costs on long distance charges, or for11 small businesses cutting costs on long distance charges, or for
12 personal communication with friends and family. This package contains12 personal communication with friends and family. This package contains
13 the server daemon.13 the server daemon.
14categories:
15 - applications
16provides:
17 teamspeak3:
18 interface: teamspeak3

Subscribers

People subscribed via source and target branches

to all changes: