Date: Fri, 25 Oct 2013 13:13:22 GMT From: Xiaoding Liu <xiaoding+freebsd@xiaoding.org> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/183300: [maintainer update]update net/shadowsocks-libev from 1.4.0 to 1.4.0_1 Message-ID: <201310251313.r9PDDMhb047018@oldred.freebsd.org> Resent-Message-ID: <201310251320.r9PDK0qr013649@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 183300 >Category: ports >Synopsis: [maintainer update]update net/shadowsocks-libev from 1.4.0 to 1.4.0_1 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Fri Oct 25 13:20:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Xiaoding Liu >Release: >Organization: >Environment: >Description: update net/shadowsocks-libev from 1.4.0 to 1.4.0_1 added support for "config.json" config file >How-To-Repeat: >Fix: Apply the patch Patch attached with submission follows: diff -ruN /usr/ports/net/shadowsocks-libev/Makefile ./shadowsocks-libev/Makefile --- /usr/ports/net/shadowsocks-libev/Makefile 2013-10-24 17:44:00.000000000 +0000 +++ ./shadowsocks-libev/Makefile 2013-10-25 13:04:32.000000000 +0000 @@ -2,7 +2,7 @@ # $FreeBSD: net/shadowsocks-libev/Makefile 331506 2013-10-24 17:44:00Z delphij $ PORTNAME= shadowsocks-libev -PORTVERSION= 1.4.0 +PORTVERSION= 1.4.0_1 CATEGORIES= net MASTER_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/archive/${GH_TAGNAME}.tar.gz?dummy=/ @@ -22,4 +22,8 @@ USE_RC_SUBR= shadowsocks_libev +post-install: + ${MKDIR} ${STAGEDIR}${ETCDIR} + ${CP} ${WRKSRC}/debian/config.json ${STAGEDIR}${ETCDIR}/config.json.sample + .include <bsd.port.mk> diff -ruN /usr/ports/net/shadowsocks-libev/files/shadowsocks_libev.in ./shadowsocks-libev/files/shadowsocks_libev.in --- /usr/ports/net/shadowsocks-libev/files/shadowsocks_libev.in 2013-10-23 23:29:56.000000000 +0000 +++ ./shadowsocks-libev/files/shadowsocks_libev.in 2013-10-25 08:57:58.000000000 +0000 @@ -8,15 +8,8 @@ # Add the following lines to /etc/rc.conf to enable shadowsocks-libev: # shadowsocks_libev_enable (bool): Set to "NO" by default. # Set to "YES" to enable shadowsocks-libev. -# shadowsocks_libev_host (ip addr/hostname): Set to "0.0.0.0" by default. -# shadowsocks_libev_port (port number): Set to 8388 by default. -# shadowsocks_libev_localport (local port): Set to 1080 by default. -# shadowsocks_libev_password (password): Set to ""(null) by default. -# shadowsocks_libev_encrypt_method (encrypt method): Set to rc4 by default. -# Available methods: table, rc4, aes-128-cfb, aes-192-cfb, aes-256-cfb, -# bf-cfb, camellia-128-cfb, camellia-192-cfb, camellia-256-cfb, -# cast5-cfb, des-cfb, idea-cfb, rc2-cfb and seed-cfb -# shadowsocks_libev_timeout (time): Set to "300" seconds by default. +# shadowsocks_libev_config (path): Shadowsocks config file. +# Defaults to "%%PREFIX%%/etc/shadowsocks-libev/config.json" . /etc/rc.subr @@ -28,23 +21,12 @@ load_rc_config $name : ${shadowsocks_libev_enable:="NO"} -: ${shadowsocks_libev_host="0.0.0.0"} -: ${shadowsocks_libev_port=8388} -: ${shadowsocks_libev_localport=1080} -: ${shadowsocks_libev_password=""} -: ${shadowsocks_libev_encrypt_method="rc4"} -: ${shadowsocks_libev_timeout="300"} +: ${shadowsocks_libev_config="%%PREFIX%%/etc/shadowsocks-libev/config.json"} command="%%PREFIX%%/bin/ss-server" pidfile="/var/run/shadowsocks-libev.pid" +required_files="${shadowsocks_libev_config}" -: ${shadowsocks_libev_flags:="-s ${shadowsocks_libev_host} \ - -p ${shadowsocks_libev_port} \ - -l ${shadowsocks_libev_localport} \ - -k ${shadowsocks_libev_password} \ - -m ${shadowsocks_libev_encrypt_method} \ - -f ${pidfile} \ - -t ${shadowsocks_libev_timeout}"} - +command_args="-f $pidfile -c $shadowsocks_libev_config" run_rc_command "$1" diff -ruN /usr/ports/net/shadowsocks-libev/pkg-plist ./shadowsocks-libev/pkg-plist --- /usr/ports/net/shadowsocks-libev/pkg-plist 2013-10-23 23:29:56.000000000 +0000 +++ ./shadowsocks-libev/pkg-plist 2013-10-25 12:44:44.000000000 +0000 @@ -1,3 +1,7 @@ bin/ss-local bin/ss-server man/man8/shadowsocks.8.gz +@unexec if cmp -s %D/etc/shadowsocks-libev/config.json %D/etc/shadowsocks-libev/config.json.sample ; then rm -f %D/etc/shadowsocks-libev/config.json ; fi +etc/shadowsocks-libev/config.json.sample +@exec if [ ! -f %D/etc/shadowsocks-libev/config.json ]; then cp -p %D/%F %B/config.json ; fi +@dirrm etc/shadowsocks-libev >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310251313.r9PDDMhb047018>