public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-proxy/shadowsocks-libev/, net-proxy/shadowsocks-libev/files/
@ 2019-06-24  9:27 Yixun Lan
  0 siblings, 0 replies; 3+ messages in thread
From: Yixun Lan @ 2019-06-24  9:27 UTC (permalink / raw
  To: gentoo-commits

commit:     7a4f60ea4e7e36a8ad3513e514223317c2bf030a
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 24 09:25:47 2019 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Mon Jun 24 09:27:15 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a4f60ea

net-proxy/shadowsocks-libev: version bump 3.3.0

Closes: https://bugs.gentoo.org/688180
Package-Manager: Portage-2.3.67, Repoman-2.3.13
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 net-proxy/shadowsocks-libev/Manifest               |  1 +
 .../shadowsocks-libev/files/shadowsocks.initd      |  2 +-
 .../shadowsocks-libev-3.3.0.ebuild                 | 84 ++++++++++++++++++++++
 3 files changed, 86 insertions(+), 1 deletion(-)

diff --git a/net-proxy/shadowsocks-libev/Manifest b/net-proxy/shadowsocks-libev/Manifest
index e6839557c35..560e73e6326 100644
--- a/net-proxy/shadowsocks-libev/Manifest
+++ b/net-proxy/shadowsocks-libev/Manifest
@@ -1,2 +1,3 @@
 DIST shadowsocks-libev-3.2.4.tar.gz 277679 BLAKE2B 32d4d48c22951894e9aa64cd6d34f7586c61ab5ae994b263b272c07a05a019f9c493909f50f3ec027af29681885a65f51afe97dc959c508f107a5010974c8e11 SHA512 f8bd19d4f3f70cedd0f34a6a16975c3694ef36e85b278d4a7bb10520a43d71c83f81ceebcf20530cdd04b5000a8c742e0789fdbefa70fef6b5d1dc799ce34528
 DIST shadowsocks-libev-3.2.5.tar.gz 278138 BLAKE2B 874471f134371d274ce274c096286dfe8a755e5423624df80df70321f017d9344516fd38f82df43033870588664dc626595157ab6c5022c9953bd9ce59dee2b8 SHA512 b4ca9f7c303c85a5bba9bf5d7a093c6dfde7a147d0335b449d4ee213cd3b9004c5220a099dcc78464a35c55f9cfe280d817daf934e2fda100f5e784f70091c0b
+DIST shadowsocks-libev-3.3.0.tar.gz 278818 BLAKE2B e2f00082d6fe697560dc282f31ed98368390e750a7be33fd3230f4d4635b4aa8a8ace3bd82da8000defee468ae167c2b4fa1e836e79580deeeff3a53dc7b793c SHA512 7c93bddef07af9e79a7c6757a89f301000a6137e0951ee622c66c2e8d3aa70e157cfdf7798a718074f956f7c22dde0af1073781cf0b36d7e185dfd45a87f354b

diff --git a/net-proxy/shadowsocks-libev/files/shadowsocks.initd b/net-proxy/shadowsocks-libev/files/shadowsocks.initd
index e980bb2636e..2ccd114485b 100644
--- a/net-proxy/shadowsocks-libev/files/shadowsocks.initd
+++ b/net-proxy/shadowsocks-libev/files/shadowsocks.initd
@@ -1,5 +1,5 @@
 #!/sbin/openrc-run
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 SS_CONFIG="/etc/shadowsocks-libev/shadowsocks.json"

diff --git a/net-proxy/shadowsocks-libev/shadowsocks-libev-3.3.0.ebuild b/net-proxy/shadowsocks-libev/shadowsocks-libev-3.3.0.ebuild
new file mode 100644
index 00000000000..65c0bfdfa56
--- /dev/null
+++ b/net-proxy/shadowsocks-libev/shadowsocks-libev-3.3.0.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MY_PV="v${PV}"
+inherit autotools eutils systemd
+
+DESCRIPTION="A lightweight secured SOCKS5 proxy for embedded devices and low end boxes"
+HOMEPAGE="https://github.com/shadowsocks/shadowsocks-libev"
+
+#repack with git submodule populated: libbloom, libcork, libipset
+#SRC_URI="https://dev.gentoo.org/~dlan/distfiles/${P}.tar.xz"
+
+SRC_URI="https://github.com/shadowsocks/${PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc"
+
+RDEPEND="net-libs/mbedtls:=
+	net-libs/libbloom
+	net-libs/libcork
+	net-libs/libcorkipset
+	>=dev-libs/libsodium-1.0.8:=
+	dev-libs/libev
+	net-dns/c-ares
+	dev-libs/libpcre
+	"
+DEPEND="${RDEPEND}
+	sys-kernel/linux-headers
+	doc? (
+		app-text/asciidoc
+		app-text/xmlto
+	)
+	"
+
+src_prepare() {
+	sed -i 's|AC_CONFIG_FILES(\[libbloom/Makefile libcork/Makefile libipset/Makefile\])||' \
+		configure.ac || die
+	default
+	eautoreconf
+}
+
+src_configure() {
+	local myconf="
+		$(use_enable debug assert)
+		--enable-system-shared-lib
+	"
+	use doc || myconf+="--disable-documentation"
+	econf ${myconf}
+}
+
+src_install() {
+	default
+
+	find "${D}" -name '*.la' -type f -delete || die
+
+	dodir "/etc/${PN}"
+	insinto "/etc/${PN}"
+	newins "${FILESDIR}/shadowsocks.json" shadowsocks.json
+
+	newinitd "${FILESDIR}/shadowsocks.initd" shadowsocks
+	dosym shadowsocks /etc/init.d/shadowsocks.server
+	dosym shadowsocks /etc/init.d/shadowsocks.client
+	dosym shadowsocks /etc/init.d/shadowsocks.redir
+	dosym shadowsocks /etc/init.d/shadowsocks.tunnel
+
+	dodoc -r acl
+
+	systemd_newunit "${FILESDIR}/${PN}-local_at.service" "${PN}-local@.service"
+	systemd_newunit "${FILESDIR}/${PN}-server_at.service" "${PN}-server@.service"
+	systemd_newunit "${FILESDIR}/${PN}-redir_at.service" "${PN}-redir@.service"
+	systemd_newunit "${FILESDIR}/${PN}-tunnel_at.service" "${PN}-tunnel@.service"
+}
+
+pkg_setup() {
+	elog "You need to choose the mode"
+	elog "  server: rc-update add shadowsocks.server default"
+	elog "  client: rc-update add shadowsocks.client default"
+	elog "  redir:  rc-update add shadowsocks.redir default"
+	elog "  tunnel: rc-update add shadowsocks.tunnel default"
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-proxy/shadowsocks-libev/, net-proxy/shadowsocks-libev/files/
@ 2020-06-01  2:38 Yixun Lan
  0 siblings, 0 replies; 3+ messages in thread
From: Yixun Lan @ 2020-06-01  2:38 UTC (permalink / raw
  To: gentoo-commits

commit:     2847306d107bc3dc5df5981de5295a24bd258bc0
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Mon Jun  1 02:36:55 2020 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Mon Jun  1 02:37:37 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2847306d

net-proxy/shadowsocks-libev: fix gcc10 compiling error

Closes: https://bugs.gentoo.org/708380
Package-Manager: Portage-2.3.100, Repoman-2.3.22
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 .../files/shadowsocks-libev-3.3.4-gcc10.patch      | 24 ++++++++++++++++++++++
 .../shadowsocks-libev-3.3.4.ebuild                 |  3 +++
 2 files changed, 27 insertions(+)

diff --git a/net-proxy/shadowsocks-libev/files/shadowsocks-libev-3.3.4-gcc10.patch b/net-proxy/shadowsocks-libev/files/shadowsocks-libev-3.3.4-gcc10.patch
new file mode 100644
index 00000000000..7a480f12b24
--- /dev/null
+++ b/net-proxy/shadowsocks-libev/files/shadowsocks-libev-3.3.4-gcc10.patch
@@ -0,0 +1,24 @@
+diff --git a/src/http.h b/src/http.h
+index 914815a..e312dd3 100644
+--- a/src/http.h
++++ b/src/http.h
+@@ -29,6 +29,6 @@
+ #include <stdio.h>
+ #include "protocol.h"
+ 
+-const protocol_t *const http_protocol;
++extern const protocol_t *const http_protocol;
+ 
+ #endif
+diff --git a/src/tls.h b/src/tls.h
+index 3998913..ddbee11 100644
+--- a/src/tls.h
++++ b/src/tls.h
+@@ -28,6 +28,6 @@
+ 
+ #include "protocol.h"
+ 
+-const protocol_t *const tls_protocol;
++extern const protocol_t *const tls_protocol;
+ 
+ #endif

diff --git a/net-proxy/shadowsocks-libev/shadowsocks-libev-3.3.4.ebuild b/net-proxy/shadowsocks-libev/shadowsocks-libev-3.3.4.ebuild
index be40495a1c0..353791fc263 100644
--- a/net-proxy/shadowsocks-libev/shadowsocks-libev-3.3.4.ebuild
+++ b/net-proxy/shadowsocks-libev/shadowsocks-libev-3.3.4.ebuild
@@ -36,6 +36,9 @@ DEPEND="${RDEPEND}
 	)
 	"
 
+PATCHES=(
+	"${FILESDIR}/${P}-gcc10.patch"
+)
 src_prepare() {
 	sed -i 's|AC_CONFIG_FILES(\[libbloom/Makefile libcork/Makefile libipset/Makefile\])||' \
 		configure.ac || die


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-proxy/shadowsocks-libev/, net-proxy/shadowsocks-libev/files/
@ 2020-09-27  8:23 Yixun Lan
  0 siblings, 0 replies; 3+ messages in thread
From: Yixun Lan @ 2020-09-27  8:23 UTC (permalink / raw
  To: gentoo-commits

commit:     34fde22d157226fb9bae167225265d6724588186
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 26 15:05:20 2020 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Sun Sep 27 08:14:10 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34fde22d

net-proxy/shadowsocks-libev: run as non-privilege user

* fix security issue, run as non-root user
* use systemd unit files from the package source

Bug: https://bugs.gentoo.org/731058
Package-Manager: Portage-3.0.0, Repoman-2.3.23
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 .../files/shadowsocks-libev-local_at.service                  | 11 -----------
 .../files/shadowsocks-libev-redir_at.service                  | 11 -----------
 .../files/shadowsocks-libev-server_at.service                 | 11 -----------
 .../files/shadowsocks-libev-tunnel_at.service                 | 11 -----------
 net-proxy/shadowsocks-libev/files/shadowsocks.initd           |  9 ++++++---
 ...s-libev-3.3.4.ebuild => shadowsocks-libev-3.3.4-r1.ebuild} | 11 ++++++-----
 6 files changed, 12 insertions(+), 52 deletions(-)

diff --git a/net-proxy/shadowsocks-libev/files/shadowsocks-libev-local_at.service b/net-proxy/shadowsocks-libev/files/shadowsocks-libev-local_at.service
deleted file mode 100644
index af137178380..00000000000
--- a/net-proxy/shadowsocks-libev/files/shadowsocks-libev-local_at.service
+++ /dev/null
@@ -1,11 +0,0 @@
-[Unit]
-Description=Shadowsocks-Libev Client Service for %I
-After=network.target
-
-[Service]
-Type=simple
-CapabilityBoundingSet=CAP_NET_BIND_SERVICE
-ExecStart=/usr/bin/ss-local -c /etc/shadowsocks-libev/%i.json
-
-[Install]
-WantedBy=multi-user.target

diff --git a/net-proxy/shadowsocks-libev/files/shadowsocks-libev-redir_at.service b/net-proxy/shadowsocks-libev/files/shadowsocks-libev-redir_at.service
deleted file mode 100644
index 1ced8f45440..00000000000
--- a/net-proxy/shadowsocks-libev/files/shadowsocks-libev-redir_at.service
+++ /dev/null
@@ -1,11 +0,0 @@
-[Unit]
-Description=Shadowsocks-Libev Client Service Redir Mode for %I
-After=network.target
-
-[Service]
-Type=simple
-CapabilityBoundingSet=CAP_NET_BIND_SERVICE
-ExecStart=/usr/bin/ss-redir -c /etc/shadowsocks-libev/%i.json
-
-[Install]
-WantedBy=multi-user.target

diff --git a/net-proxy/shadowsocks-libev/files/shadowsocks-libev-server_at.service b/net-proxy/shadowsocks-libev/files/shadowsocks-libev-server_at.service
deleted file mode 100644
index 58d934bdb1d..00000000000
--- a/net-proxy/shadowsocks-libev/files/shadowsocks-libev-server_at.service
+++ /dev/null
@@ -1,11 +0,0 @@
-[Unit]
-Description=Shadowsocks-Libev Server Service for %I
-After=network.target
-
-[Service]
-Type=simple
-CapabilityBoundingSet=CAP_NET_BIND_SERVICE
-ExecStart=/usr/bin/ss-server -c /etc/shadowsocks-libev/%i.json
-
-[Install]
-WantedBy=multi-user.target

diff --git a/net-proxy/shadowsocks-libev/files/shadowsocks-libev-tunnel_at.service b/net-proxy/shadowsocks-libev/files/shadowsocks-libev-tunnel_at.service
deleted file mode 100644
index 24b31d5a1cd..00000000000
--- a/net-proxy/shadowsocks-libev/files/shadowsocks-libev-tunnel_at.service
+++ /dev/null
@@ -1,11 +0,0 @@
-[Unit]
-Description=Shadowsocks-Libev Client Service Tunnel Mode for %I
-After=network.target
-
-[Service]
-Type=simple
-CapabilityBoundingSet=CAP_NET_BIND_SERVICE
-ExecStart=/usr/bin/ss-tunnel -c /etc/shadowsocks-libev/%i.json
-
-[Install]
-WantedBy=multi-user.target

diff --git a/net-proxy/shadowsocks-libev/files/shadowsocks.initd b/net-proxy/shadowsocks-libev/files/shadowsocks.initd
index 2ccd114485b..994ba23e3b8 100644
--- a/net-proxy/shadowsocks-libev/files/shadowsocks.initd
+++ b/net-proxy/shadowsocks-libev/files/shadowsocks.initd
@@ -1,5 +1,5 @@
 #!/sbin/openrc-run
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 SS_CONFIG="/etc/shadowsocks-libev/shadowsocks.json"
@@ -49,13 +49,16 @@ start() {
 
     ebegin "Starting Shadowsocks: ${SS_SVCNAME} mode"
     start-stop-daemon --start --exec ${SS_COMMAND} \
-    -- -c ${SS_CONFIG} -f ${SS_PIDFILE} >/dev/null 2>&1 &
+	--user nobody --group nobody \
+	-- -c ${SS_CONFIG} -f ${SS_PIDFILE} >/dev/null 2>&1 &
     eend $?
 }
 
 stop() {
     ebegin "Stopping Shadowsocks"
-    start-stop-daemon --stop --pidfile ${SS_PIDFILE}
+    start-stop-daemon --stop \
+	--user nobody --group nobody \
+	--pidfile ${SS_PIDFILE}
     eend $?
 }
 

diff --git a/net-proxy/shadowsocks-libev/shadowsocks-libev-3.3.4.ebuild b/net-proxy/shadowsocks-libev/shadowsocks-libev-3.3.4-r1.ebuild
similarity index 82%
rename from net-proxy/shadowsocks-libev/shadowsocks-libev-3.3.4.ebuild
rename to net-proxy/shadowsocks-libev/shadowsocks-libev-3.3.4-r1.ebuild
index 353791fc263..e10f0e72b1a 100644
--- a/net-proxy/shadowsocks-libev/shadowsocks-libev-3.3.4.ebuild
+++ b/net-proxy/shadowsocks-libev/shadowsocks-libev-3.3.4-r1.ebuild
@@ -40,8 +40,10 @@ PATCHES=(
 	"${FILESDIR}/${P}-gcc10.patch"
 )
 src_prepare() {
-	sed -i 's|AC_CONFIG_FILES(\[libbloom/Makefile libcork/Makefile libipset/Makefile\])||' \
+	sed -i -e 's|AC_CONFIG_FILES(\[libbloom/Makefile libcork/Makefile libipset/Makefile\])||' \
 		configure.ac || die
+	sed -i -e "/\[Service\]/a\\User=nobody" \
+		debian/shadowsocks-libev*.service || die
 	default
 	eautoreconf
 }
@@ -71,10 +73,9 @@ src_install() {
 
 	dodoc -r acl
 
-	systemd_newunit "${FILESDIR}/${PN}-local_at.service" "${PN}-local@.service"
-	systemd_newunit "${FILESDIR}/${PN}-server_at.service" "${PN}-server@.service"
-	systemd_newunit "${FILESDIR}/${PN}-redir_at.service" "${PN}-redir@.service"
-	systemd_newunit "${FILESDIR}/${PN}-tunnel_at.service" "${PN}-tunnel@.service"
+	for i in debian/${PN}*.service; do
+		systemd_newunit $i $(basename $i)
+	done
 }
 
 pkg_setup() {


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-09-27  8:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-24  9:27 [gentoo-commits] repo/gentoo:master commit in: net-proxy/shadowsocks-libev/, net-proxy/shadowsocks-libev/files/ Yixun Lan
  -- strict thread matches above, loose matches on Subject: below --
2020-06-01  2:38 Yixun Lan
2020-09-27  8:23 Yixun Lan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox