Browse Source

Sync debian/ folder with debian version 3.3.4+ds-3

pull/2672/head
Roger Shimizu 4 years ago
parent
commit
0d96da4471
22 changed files with 85 additions and 39 deletions
  1. 2
      debian/README.Debian
  2. 3
      debian/config.json
  3. 16
      debian/control
  4. 10
      debian/copyright
  5. 3
      debian/rules
  6. 2
      debian/shadowsocks-libev-local@.service
  7. 2
      debian/shadowsocks-libev-redir@.service
  8. 2
      debian/shadowsocks-libev-server@.service
  9. 2
      debian/shadowsocks-libev-tunnel@.service
  10. 20
      debian/shadowsocks-libev.NEWS
  11. 2
      debian/shadowsocks-libev.default
  12. 0
      debian/shadowsocks-libev.doc-base
  13. 1
      debian/shadowsocks-libev.docs
  14. 2
      debian/shadowsocks-libev.init
  15. 4
      debian/shadowsocks-libev.install
  16. 5
      debian/shadowsocks-libev.lintian-overrides
  17. 23
      debian/shadowsocks-libev.postinst
  18. 11
      debian/shadowsocks-libev.postrm
  19. 4
      debian/shadowsocks-libev.service
  20. 2
      debian/source.lintian-overrides
  21. 2
      debian/tests/control
  22. 6
      debian/upstream/metadata

2
debian/README.Debian

@ -12,4 +12,4 @@ if the user starts a service called "shadowsocks-libev-local@foobar.service",
This service instance will start the "ss-local" client and read
/etc/shadowsocks-libev/foobar.json as its configuration file.
-- Boyuan Yang <073plan@gmail.com> Thu, 08 Sep 2016 19:01:20 +0800
-- Boyuan Yang <byang@debian.org> Thu, 08 Sep 2016 19:01:20 +0800

3
debian/config.json

@ -1,5 +1,6 @@
{
"server":"127.0.0.1",
"server":["::1", "127.0.0.1"],
"mode":"tcp_and_udp",
"server_port":8388,
"local_port":1080,
"password":"barfoo!",

16
debian/control

@ -1,8 +1,11 @@
Source: shadowsocks-libev
Section: net
Priority: optional
Maintainer: Roger Shimizu <rogershimizu@gmail.com>
Uploaders: Max Lv <max.c.lv@gmail.com>, Boyuan Yang <073plan@gmail.com>
Maintainer: Debian Bridges Team <team+bridges@tracker.debian.org>
Uploaders:
Max Lv <max.c.lv@gmail.com>,
Boyuan Yang <byang@debian.org>,
Roger Shimizu <rosh@debian.org>
Build-Depends:
asciidoc-base | asciidoc,
debhelper (>= 10),
@ -14,6 +17,7 @@ Build-Depends:
pkg-config,
xmlto
Standards-Version: 4.1.1
Rules-Requires-Root: no
Homepage: https://www.shadowsocks.org
Vcs-Git: https://github.com/shadowsocks/shadowsocks-libev.git
Vcs-Browser: https://github.com/shadowsocks/shadowsocks-libev
@ -22,8 +26,8 @@ Package: shadowsocks-libev
Replaces: shadowsocks (<< 1.5.3-2)
Breaks: shadowsocks (<< 1.5.3-2)
Architecture: any
Pre-Depends: ${misc:Pre-Depends}
Depends:
apg | pwgen,
libcap2-bin [linux-any],
lsb-base (>= 3.0-6),
${misc:Depends},
@ -36,7 +40,7 @@ Description: lightweight and secure socks5 proxy
Shadowsocks-libev is a lightweight and secure socks5 proxy for
embedded devices and low end boxes.
.
Shadowsocks-libev was inspired by Shadowsock (in Python). It's rewritten
Shadowsocks-libev was inspired by Shadowsocks (in Python). It's rewritten
in pure C and only depends on libev, mbedTLS and a few other tiny
libraries.
@ -52,7 +56,7 @@ Description: lightweight and secure socks5 proxy (development files)
Shadowsocks-libev is a lightweight and secure socks5 proxy for
embedded devices and low end boxes.
.
Shadowsocks-libev was inspired by Shadowsock (in Python). It's rewritten
Shadowsocks-libev was inspired by Shadowsocks (in Python). It's rewritten
in pure C and only depends on libev, mbedTLS and a few other tiny
libraries.
.
@ -74,7 +78,7 @@ Description: lightweight and secure socks5 proxy (shared library)
Shadowsocks-libev is a lightweight and secure socks5 proxy for
embedded devices and low end boxes.
.
Shadowsocks-libev was inspired by Shadowsock (in Python). It's rewritten
Shadowsocks-libev was inspired by Shadowsocks (in Python). It's rewritten
in pure C and only depends on libev, mbedTLS and a few other tiny
libraries.
.

10
debian/copyright

@ -5,18 +5,18 @@ Source: https://github.com/shadowsocks/shadowsocks-libev
Files: *
Copyright: 2013-2015, Clow Windy <clowwindy42@gmail.com>
2013-2017, Max Lv <max.c.lv@gmail.com>
2013-2018, Max Lv <max.c.lv@gmail.com>
2014, Linus Yang <linusyang@gmail.com>
License: GPL-3+
Files: debian/*
Copyright: 2013-2015, Max Lv <max.c.lv@gmail.com>
2015-2017, Boyuan Yang <073plan@gmail.com>
2016-2017, Roger Shimizu <rogershimizu@gmail.com>
2015-2018, Boyuan Yang <073plan@gmail.com>
2016-2019, Roger Shimizu <rosh@debian.org>
License: GPL-3+
Files: doc/*
Copyright: 2012-2017, Max Lv <max.c.lv@gmail.com>
Copyright: 2012-2018, Max Lv <max.c.lv@gmail.com>
License: GFDL-1.1+
Files: m4/ax_pthread.m4
@ -38,7 +38,7 @@ Copyright: 2007 Google Inc.
License: Apache-2.0
Files: scripts/build_deb.sh
Copyright: 2017 Roger Shimizu <rogershimizu@gmail.com>
Copyright: 2018 Roger Shimizu <rosh@debian.org>
License: GPL-3+
Files: src/base64.c src/base64.h

3
debian/rules

@ -20,5 +20,8 @@ override_dh_auto_configure:
override_dh_installchangelogs:
dh_installchangelogs -XChanges
override_dh_missing:
dh_missing --fail-missing
%:
dh $@

2
debian/shadowsocks-libev-local@.service

@ -18,8 +18,8 @@ After=network-online.target
Type=simple
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_BIND_SERVICE
DynamicUser=true
ExecStart=/usr/bin/ss-local -c /etc/shadowsocks-libev/%i.json
[Install]
WantedBy=multi-user.target

2
debian/shadowsocks-libev-redir@.service

@ -18,8 +18,8 @@ After=network-online.target
Type=simple
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
DynamicUser=true
ExecStart=/usr/bin/ss-redir -c /etc/shadowsocks-libev/%i.json
[Install]
WantedBy=multi-user.target

2
debian/shadowsocks-libev-server@.service

@ -18,8 +18,8 @@ After=network-online.target
Type=simple
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_BIND_SERVICE
DynamicUser=true
ExecStart=/usr/bin/ss-server -c /etc/shadowsocks-libev/%i.json
[Install]
WantedBy=multi-user.target

2
debian/shadowsocks-libev-tunnel@.service

@ -18,8 +18,8 @@ After=network-online.target
Type=simple
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_BIND_SERVICE
DynamicUser=true
ExecStart=/usr/bin/ss-tunnel -c /etc/shadowsocks-libev/%i.json
[Install]
WantedBy=multi-user.target

20
debian/shadowsocks-libev.NEWS

@ -0,0 +1,20 @@
shadowsocks-libev (3.2.0+ds-5) unstable; urgency=medium
There is a mode setting to choose whether to enable both TCP and
UDP, or only one of them. This setting was set to "tcp_and_udp" in
/etc/default/shadowsocks-libev, /etc/init.d/shadowsocks-libev
(for init system only), and maybe also in config.json added by user,
which is quite confusing.
So we moved this setting to config.json. Since we won't update
config.json on package upgrade, please add the following to your
/etc/shadowsocks-libev/config.json.
"mode":"tcp_and_udp",
Otherwise you setting will be TCP only.
For more about TCP/UDP mode, please refer the ticket upstream:
- https://github.com/shadowsocks/shadowsocks-libev/issues/1870
-- Roger Shimizu <rosh@debian.org> Sun, 07 Oct 2018 00:48:07 +0900

2
debian/shadowsocks-libev.default

@ -15,7 +15,7 @@ START=yes
CONFFILE="/etc/shadowsocks-libev/config.json"
# Extra command line arguments
DAEMON_ARGS="-u"
DAEMON_ARGS=
# User and group to run the server as
USER=nobody

debian/doc-base → debian/shadowsocks-libev.doc-base

1
debian/shadowsocks-libev.docs

@ -2,3 +2,4 @@ AUTHORS
README.md
debian/copyright.original
scripts
doc/*.html

2
debian/shadowsocks-libev.init

@ -58,7 +58,7 @@ do_start()
start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid $USER:$GROUP --exec $DAEMON --test > /dev/null \
|| return 1
start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid $USER:$GROUP --exec $DAEMON -- \
-c "$CONFFILE" -u -f $PIDFILE $DAEMON_ARGS \
-c "$CONFFILE" -f $PIDFILE $DAEMON_ARGS \
|| return 2
}

4
debian/shadowsocks-libev.install

@ -1,5 +1,7 @@
completions/bash/* usr/share/bash-completion/completions/
completions/zsh/* usr/share/zsh/vendor-completions/
debian/config.json usr/share/shadowsocks-libev
debian/shadowsocks-libev-*.service lib/systemd/system
usr/bin/
usr/share/man/
completions/bash/* usr/share/bash-completion/completions/
usr/share/doc/shadowsocks-libev/

5
debian/shadowsocks-libev.lintian-overrides

@ -0,0 +1,5 @@
# False positive: systemd service templates cannot fallback to sysvinit script
package-supports-alternative-init-but-no-init.d-script lib/systemd/system/shadowsocks-libev-local@.service
package-supports-alternative-init-but-no-init.d-script lib/systemd/system/shadowsocks-libev-redir@.service
package-supports-alternative-init-but-no-init.d-script lib/systemd/system/shadowsocks-libev-server@.service
package-supports-alternative-init-but-no-init.d-script lib/systemd/system/shadowsocks-libev-tunnel@.service

23
debian/shadowsocks-libev.postinst

@ -20,19 +20,20 @@ pathfind() {
case "$1" in
configure|reconfigure)
pathfind setcap && setcap \
cap_net_bind_service+ep /usr/bin/ss-local \
cap_net_bind_service,cap_net_admin+ep /usr/bin/ss-redir \
cap_net_bind_service+ep /usr/bin/ss-server \
cap_net_bind_service+ep /usr/bin/ss-tunnel
if pathfind setcap; then
if ! setcap \
cap_net_bind_service+ep /usr/bin/ss-local \
cap_net_bind_service,cap_net_admin+ep /usr/bin/ss-redir \
cap_net_bind_service+ep /usr/bin/ss-server \
cap_net_bind_service+ep /usr/bin/ss-tunnel; then
echo "Failed to set capabilities; ss-* will only be runnable by root."
fi
else
echo "setcap not installed; ss-* will only be runnable by root."
fi
if [ ! -f /etc/shadowsocks-libev/config.json ]; then
set +e
pathfind apg
if [ $? -eq 0 ]; then
passwd=$(apg -n 1 -M ncl)
else
passwd=$(pwgen 12 1)
fi
passwd=$(perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..12)')
set -e
mkdir -p /etc/shadowsocks-libev
sed "s/barfoo!/$passwd/" /usr/share/shadowsocks-libev/config.json \

11
debian/shadowsocks-libev.postrm

@ -5,8 +5,15 @@ set -e
case "$1" in
purge)
rm -f /etc/shadowsocks-libev/config.json
test -f /etc/shadowsocks-libev/* \
|| rm -r /etc/shadowsocks-libev/
if test ! -e /etc/shadowsocks-libev ; then
# If the config directory does not exist, do nothing
:
else
if test -d /etc/shadowsocks-libev ; then
# If it is an empty directory, remove it
rmdir /etc/shadowsocks-libev || true
fi
fi
;;
remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
exit 0

4
debian/shadowsocks-libev.service

@ -17,12 +17,10 @@ After=network-online.target
Type=simple
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_BIND_SERVICE
DynamicUser=true
EnvironmentFile=/etc/default/shadowsocks-libev
User=nobody
Group=nogroup
LimitNOFILE=32768
ExecStart=/usr/bin/ss-server -c $CONFFILE $DAEMON_ARGS
[Install]
WantedBy=multi-user.target

2
debian/source.lintian-overrides

@ -1,2 +0,0 @@
# false positive: #765166
shadowsocks-libev source: license-problem-gfdl-invariants

2
debian/tests/control

@ -1,3 +1,3 @@
Test-Command: bash tests/test.sh
Depends: @, python, curl, dnsutils
Depends: @, python3, curl, dnsutils
Restrictions: allow-stderr

6
debian/upstream/metadata

@ -0,0 +1,6 @@
Name: shadowsocks-libev
Homepage: https://shadowsocks.org
Repository: https://github.com/shadowsocks/shadowsocks-libev.git
Repository-Browse: https://github.com/shadowsocks/shadowsocks-libev
Bug-Database: https://github.com/shadowsocks/shadowsocks-libev/issues
Contact: Max Lv <max.c.lv@gmail.com>
Loading…
Cancel
Save