diffstat for coturn-4.5.1.1 coturn-4.5.1.1 changelog | 9 +++++++++ control | 1 + coturn.install | 1 - coturn.postinst | 9 +++++++++ coturn.postrm | 2 ++ 5 files changed, 21 insertions(+), 1 deletion(-) diff -Nru coturn-4.5.1.1/debian/changelog coturn-4.5.1.1/debian/changelog --- coturn-4.5.1.1/debian/changelog 2019-03-02 23:38:30.000000000 +0000 +++ coturn-4.5.1.1/debian/changelog 2019-05-26 15:11:04.000000000 +0100 @@ -1,3 +1,12 @@ +coturn (4.5.1.1-1.1) unstable; urgency=medium + + * Non-maintainer upload. + * Don't ship the (empty) /var/lib/turn/turndb SQLite database and generate it + on-demand in the postinst instead, avoiding overwriting it on + upgrade/reinstall. (Closes: #929269) + + -- Chris Lamb Sun, 26 May 2019 15:11:04 +0100 + coturn (4.5.1.1-1) unstable; urgency=medium * [a13ba45] Fix: missing /etc/turnserver.conf diff -Nru coturn-4.5.1.1/debian/control coturn-4.5.1.1/debian/control --- coturn-4.5.1.1/debian/control 2019-03-02 23:38:30.000000000 +0000 +++ coturn-4.5.1.1/debian/control 2019-05-26 15:11:04.000000000 +0100 @@ -24,6 +24,7 @@ Package: coturn Architecture: any Depends: adduser, + sqlite3, lsb-base (>= 3.0-6), telnet | telnet-client, ${misc:Depends}, diff -Nru coturn-4.5.1.1/debian/coturn.install coturn-4.5.1.1/debian/coturn.install --- coturn-4.5.1.1/debian/coturn.install 2019-03-02 23:07:47.000000000 +0000 +++ coturn-4.5.1.1/debian/coturn.install 2019-05-26 15:11:04.000000000 +0100 @@ -15,7 +15,6 @@ include/turn/client/ns_turn_msg_defs_experimental.h usr/include/turn include/turn/ns_turn_defs.h usr/include/turn lib/libturnclient.a usr/lib -sqlite/turndb var/lib/turn turndb/schema.mongo.sh usr/share/coturn turndb/schema.mongo.sh usr/share/doc/coturn turndb/schema.sql usr/share/coturn diff -Nru coturn-4.5.1.1/debian/coturn.postinst coturn-4.5.1.1/debian/coturn.postinst --- coturn-4.5.1.1/debian/coturn.postinst 2019-03-02 23:07:47.000000000 +0000 +++ coturn-4.5.1.1/debian/coturn.postinst 2019-05-26 15:11:04.000000000 +0100 @@ -35,6 +35,15 @@ "$TURNSERVER_USER" || exit 1 fi + # Don't ship the empty database; generate it on-demand. (#929269) + TURNDB_SQLITE=/var/lib/turn/turndb + TURNDB_SCHEMA=/usr/share/doc/coturn/schema.sql + + if [ ! -e "$TURNDB_SQLITE" ] && [ -e "$TURNDB_SCHEMA" ]; then + echo "I: Creating $TURNDB_SQLITE from $TURNDB_SCHEMA" >&2 + mkdir -p "$(dirname "$TURNDB_SQLITE")" + sqlite3 "$TURNDB_SQLITE" < "$TURNDB_SCHEMA" + fi } case "$1" in diff -Nru coturn-4.5.1.1/debian/coturn.postrm coturn-4.5.1.1/debian/coturn.postrm --- coturn-4.5.1.1/debian/coturn.postrm 2019-03-02 23:07:47.000000000 +0000 +++ coturn-4.5.1.1/debian/coturn.postrm 2019-05-26 15:11:04.000000000 +0100 @@ -12,6 +12,8 @@ if getent group $TURNSERVER_GROUP >/dev/null; then groupdel $TURNSERVER_GROUP fi + + rm -f /var/lib/turn/turndb fi