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
1=== removed file 'README'
2--- README 2011-11-28 22:33:36 +0000
3+++ README 1970-01-01 00:00:00 +0000
4@@ -1,5 +0,0 @@
5-Please read the TeamSpeak License Agreement file before deploying the charm.
6-
7-After deployed you can access the new service with the TeamSpeak client downloaded from <http://www.teamspeak.com/?page=downloads>.
8-
9-The default administration token is "admintoken" (no quote marks), you will be then able to create users and configure your new server.
10
11=== added file 'README.md'
12--- README.md 1970-01-01 00:00:00 +0000
13+++ README.md 2014-05-01 15:45:20 +0000
14@@ -0,0 +1,32 @@
15+# Overview
16+
17+Please read the TeamSpeak License Agreement file before deploying the charm.
18+
19+# Usage
20+
21+In order to deploy TeamSpeak 3, first bootstrap your environment:
22+
23+ juju bootstrap
24+
25+Then, deploy TeamSpeak 3:
26+
27+ juju deploy teamspeak3
28+
29+Finally, expose your service:
30+
31+ juju expose teamspeak3
32+
33+After deployed you can access the new service with the
34+[TeamSpeak client](http://www.teamspeak.com/?page=downloads). The public address
35+can be found by executing `juju status`.
36+
37+# Configuration
38+
39+The only configuration option this charm has is the port the server will be
40+running at. By default, this port is 9987.
41+
42+# Contact Information
43+
44+## Upstream Project Name
45+
46+- [TeamSpeak 3 website](http://teamspeak.com/?page=teamspeak3)
47
48=== modified file 'config.yaml'
49--- config.yaml 2012-01-28 01:11:44 +0000
50+++ config.yaml 2014-05-01 15:45:20 +0000
51@@ -1,17 +1,17 @@
52 options:
53+ port:
54+ default: 9987
55+ type: int
56+ description: Port to run server at.
57 administrator:
58- default: serveradmin
59+ default: ""
60 type: string
61 description: Username of the administrator of the server.
62 administrator-secret:
63- default: serveradmin
64+ default: ""
65 type: string
66 description: Default administrator login password.
67- port:
68- default: 9987
69- type: int
70- description: Port to run server at.
71 admin-token:
72- default: admintoken
73+ default: ""
74 type: string
75 description: Token necessary for the initial configuration of the server.
76
77=== modified file 'hooks/config-changed'
78--- hooks/config-changed 2011-11-29 21:08:14 +0000
79+++ hooks/config-changed 2014-05-01 15:45:20 +0000
80@@ -1,6 +1,6 @@
81 #!/bin/sh
82
83-set -ux
84+set -eux
85
86 LOCAL_DB_FILE="/opt/teamspeak3-server/ts3server.sqlitedb"
87 LOCAL_PID_FILE="/opt/teamspeak3-server/ts3server.pid"
88@@ -10,9 +10,16 @@
89 fi
90
91 PORT=`config-get port`
92-if [ ! -z "$PORT" ]; then
93- sqlite3 /opt/teamspeak3-server/ts3server.sqlitedb "UPDATE servers SET server_port='$PORT' WHERE server_id='1'"
94- open-port "$PORT"/TCP
95+if [ ! -f .port ] && [ "$PORT" != "9987" ]; then
96+ sqlite3 /opt/teamspeak3-server/ts3server.sqlitedb "UPDATE servers SET server_port='$PORT' WHERE server_id='1'"
97+ open-port "$PORT"/UDP
98+ echo "$PORT" > .port
99+elif [ -f .port ] && [ "$PORT" != `cat .port` ]; then
100+ CURPORT=`cat .port`
101+ sqlite3 /opt/teamspeak3-server/ts3server.sqlitedb "UPDATE servers SET server_port='$PORT' WHERE server_id='1'"
102+ close-port "$CURPORT"/UDP
103+ open-port "$PORT"/UDP
104+ echo "$PORT" > .port
105 fi
106
107 if [ -f "$LOCAL_PID_FILE" ]; then
108
109=== modified file 'hooks/install'
110--- hooks/install 2011-11-30 19:43:51 +0000
111+++ hooks/install 2014-05-01 15:45:20 +0000
112@@ -1,27 +1,28 @@
113 #!/bin/sh
114
115+set -eux
116+
117 juju-log "Installing dependencies"
118 apt-get install -y sqlite3 wget
119
120-if [ ! -d "charm-tools" ]; then
121- juju-log "Installing charm-helpers vis charm-tools"
122- bzr branch lp:charm-tools
123-fi
124+add-apt-repository -y ppa:charmers/charm-helpers
125+apt-get update
126+apt-get install -y charm-helper-sh
127
128-. "charm-tools/helpers/sh/net.sh"
129+. /usr/share/charm-helper/sh/net.sh
130
131
132 juju-log "Downloading latest teamspeak server..."
133
134 TYPE=$(uname -m)
135 if [ "$TYPE" = "x86_64" ]; then
136- DOWNLOAD=`ch_get_file "http://teamspeak.gameserver.gamed.de/ts3/releases/3.0.1/teamspeak3-server_linux-amd64-3.0.1.tar.gz" "0253fb6eabbd7e1c83414babb4b145be"`
137+ 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"`
138 if [ ! -f "$DOWNLOAD" ]; then
139 juju-log "Something went terribly wrong while getting the right file, aborting."
140 exit 1
141 fi
142 else
143- DOWNLOAD=`ch_get_file "http://teamspeak.gameserver.gamed.de/ts3/releases/3.0.1/teamspeak3-server_linux-x86-3.0.1.tar.gz" "a81c79b18185eb2bfa6e1b881a502a2a"`
144+ 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"`
145 if [ ! -f "$DOWNLOAD" ]; then
146 juju-log "Something went terribly wrong while getting the right file, aborting."
147 exit 1
148@@ -38,6 +39,6 @@
149
150 juju-log "Configuring server and starting database with default values"
151 service teamspeak3 init_db
152-open-port 9987/TCP
153+open-port 9987/UDP
154
155 juju-log "Installation complete!"
156
157=== modified file 'metadata.yaml'
158--- metadata.yaml 2011-11-28 22:33:36 +0000
159+++ metadata.yaml 2014-05-01 15:45:20 +0000
160@@ -11,3 +11,8 @@
161 small businesses cutting costs on long distance charges, or for
162 personal communication with friends and family. This package contains
163 the server daemon.
164+categories:
165+ - applications
166+provides:
167+ teamspeak3:
168+ interface: teamspeak3

Subscribers

People subscribed via source and target branches

to all changes: