From 86b3c3a2459c8d62100e9d5a392ddb178eceb7d0 Mon Sep 17 00:00:00 2001 From: Roger Shimizu Date: Sun, 10 Jul 2016 15:58:58 +0200 Subject: [PATCH] Sync debian/ folder with version 2.4.7+20160630+ds-2 (#710) Changes: - Add license of manpages to copyright - Change way to handle config file (config.json) - Add lintian-overrides - Rename/Update docs and install file --- debian/copyright | 13 +++++++++++++ debian/install | 1 - debian/rules | 2 +- debian/{docs => shadowsocks-libev.docs} | 1 + debian/shadowsocks-libev.install | 2 +- debian/shadowsocks-libev.postinst | 10 ++++++---- debian/shadowsocks-libev.postrm | 22 ++++++++++++++++++++++ debian/source.lintian-overrides | 4 ++++ 8 files changed, 48 insertions(+), 7 deletions(-) delete mode 100644 debian/install rename debian/{docs => shadowsocks-libev.docs} (81%) create mode 100644 debian/shadowsocks-libev.postrm create mode 100644 debian/source.lintian-overrides diff --git a/debian/copyright b/debian/copyright index 7f9b1d76..1644c086 100644 --- a/debian/copyright +++ b/debian/copyright @@ -46,6 +46,10 @@ License: BSD-3-clause (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Files: man/* +Copyright: 2012-2016, Max Lv +License: GFDL-1.1+ + Files: src/json.c src/json.h Copyright: 2012-2014, James McLaughlin et al. License: BSD-2-clause @@ -104,6 +108,15 @@ License: BSD-2-clause OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +License: GFDL-1.1+ + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.1 or + any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. + . + A copy of the license is included in the section entitled + "GNU Free Documentation License". + License: GPL-3+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/debian/install b/debian/install deleted file mode 100644 index 77e59fba..00000000 --- a/debian/install +++ /dev/null @@ -1 +0,0 @@ -debian/config.json /etc/shadowsocks-libev diff --git a/debian/rules b/debian/rules index 30fabbf4..36c54345 100755 --- a/debian/rules +++ b/debian/rules @@ -22,4 +22,4 @@ override_dh_installchangelogs: dh_installchangelogs -XChanges %: - dh $@ --with systemd + dh $@ --with systemd diff --git a/debian/docs b/debian/shadowsocks-libev.docs similarity index 81% rename from debian/docs rename to debian/shadowsocks-libev.docs index 92c80c5a..0d4e47d0 100644 --- a/debian/docs +++ b/debian/shadowsocks-libev.docs @@ -1,2 +1,3 @@ +AUTHORS README.md debian/copyright.original diff --git a/debian/shadowsocks-libev.install b/debian/shadowsocks-libev.install index 97e58119..68cdab23 100644 --- a/debian/shadowsocks-libev.install +++ b/debian/shadowsocks-libev.install @@ -1,4 +1,4 @@ usr/bin/ usr/share/man/ -debian/config.json etc/shadowsocks-libev +debian/config.json usr/share/shadowsocks-libev debian/shadowsocks-libev-*.service lib/systemd/system diff --git a/debian/shadowsocks-libev.postinst b/debian/shadowsocks-libev.postinst index 92b240e9..58451ed8 100755 --- a/debian/shadowsocks-libev.postinst +++ b/debian/shadowsocks-libev.postinst @@ -4,7 +4,12 @@ set -e case "$1" in configure|reconfigure) - # continue + if [ ! -f /etc/shadowsocks-libev/config.json ]; then + passwd=$(apg -n 1 -M ncl) + mkdir -p /etc/shadowsocks-libev + sed "s/barfoo!/$passwd/" /usr/share/shadowsocks-libev/config.json \ + > /etc/shadowsocks-libev/config.json + fi ;; abort-upgrade|abort-remove|abort-deconfigure) exit 0 @@ -15,9 +20,6 @@ case "$1" in ;; esac -passwd=$(apg -n 1 -M ncl) -sed -i "s/barfoo!/$passwd/" /etc/shadowsocks-libev/config.json - #DEBHELPER# exit 0 diff --git a/debian/shadowsocks-libev.postrm b/debian/shadowsocks-libev.postrm new file mode 100644 index 00000000..bccb360a --- /dev/null +++ b/debian/shadowsocks-libev.postrm @@ -0,0 +1,22 @@ +#!/bin/sh + +set -e + +case "$1" in + purge) + rm -f /etc/shadowsocks-libev/config.json + test -f /etc/shadowsocks-libev/* \ + || rm -r /etc/shadowsocks-libev/ + ;; + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + exit 0 + ;; + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/source.lintian-overrides b/debian/source.lintian-overrides new file mode 100644 index 00000000..f290882b --- /dev/null +++ b/debian/source.lintian-overrides @@ -0,0 +1,4 @@ +# false positive: #505857 +shadowsocks-libev source: debian-watch-file-should-mangle-version +# false positive: #765166 +shadowsocks-libev source: license-problem-gfdl-invariants