From f70a1bfc721336d4fc7dfb711c2f518a6b18cf16 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 30 Sep 2020 17:27:54 +0100 Subject: gentoo resync : 30.09.2020 --- net-proxy/trojan/Manifest | 6 ++-- net-proxy/trojan/files/trojan.initd | 15 +++++--- net-proxy/trojan/trojan-1.15.1.ebuild | 61 -------------------------------- net-proxy/trojan/trojan-1.16.0-r1.ebuild | 61 ++++++++++++++++++++++++++++++++ net-proxy/trojan/trojan-1.16.0.ebuild | 61 -------------------------------- 5 files changed, 74 insertions(+), 130 deletions(-) delete mode 100644 net-proxy/trojan/trojan-1.15.1.ebuild create mode 100644 net-proxy/trojan/trojan-1.16.0-r1.ebuild delete mode 100644 net-proxy/trojan/trojan-1.16.0.ebuild (limited to 'net-proxy/trojan') diff --git a/net-proxy/trojan/Manifest b/net-proxy/trojan/Manifest index 4fc038e5da07..362f7675b855 100644 --- a/net-proxy/trojan/Manifest +++ b/net-proxy/trojan/Manifest @@ -1,7 +1,5 @@ -AUX trojan.initd 753 BLAKE2B a0dab04f6abe08a00bfcf4e8eb2f7c2f1368e346c485d5ccec40f9aeb798ee9e3b838ac06b98d252a9823f3ad96d798fec193791c042c041b49999cd0e46fa08 SHA512 73e84faa009436215793a39e19f5664bc7b1ddcd9d82a205b98ff16378f13cfc1dfb4380ab58804cbae988b7796b51149c11c4cd227ee0e4b15a6ca68e888b7f -DIST trojan-1.15.1.tar.gz 48121 BLAKE2B 38f288d8b9a6c7a98ada85b6b2dd2448604f54068334380c2e6b49d6ee015a1fad2847747734ef1e670d201d9625e64859ccddde5b924ea09c4e87e206997431 SHA512 5e0dfb46116b9de54f5d4e6d0646ab5ba3746143c5ad0f275c894929ba7fc840cacb187e514bbfaa770f0651fc4d3ff9e662f648f515a972ddf72ad0e93d616f +AUX trojan.initd 981 BLAKE2B fd66aa23bed621362d28d27125388de413dc554180283337f49feacbab3f2bae8b28409b0c2e8d980ff79d1082ac0a56657bb7d089262c99658afba0f3d28eff SHA512 d6c79b5705da095173e6a590d128d77d68036e20916ce17144d6889d45ccb9cf5422665a22f192019e0624d60998dfd077587c2ebc2f7b0d4078e33113a8a462 DIST trojan-1.16.0.tar.gz 51669 BLAKE2B 9238f9886820ca3625a894ac8de1e199e238029593634436f3aa529d5c576f2636d5183b64a2e6155a888fe8f45629c94625f02119fbfb4ada01b1bd9e502fcf SHA512 60aa8539731eee6f15cbcb18b20b45435fc2dfe439a2f67fe9770257c3b6ffe219efe376cfd909f748d523a18645c96f6859b8487cacaba04ac7d93cf762f153 -EBUILD trojan-1.15.1.ebuild 1318 BLAKE2B 82970b3afbef707e54a9f4612a8632edff3ecbcece6658537e6930a65eee8aadee14e413436f123108949c50378a41f4e88dc718e272fb8157bd11e1df144adc SHA512 fb2938164b0be2248b0143d6d3b67ea434aa973e72bda6bdc1a0dbfc3edb7844ebdd05004183306c21c26336bf9187022283ccf9e6d13be2ef55fc3b9e7e958f -EBUILD trojan-1.16.0.ebuild 1318 BLAKE2B 82970b3afbef707e54a9f4612a8632edff3ecbcece6658537e6930a65eee8aadee14e413436f123108949c50378a41f4e88dc718e272fb8157bd11e1df144adc SHA512 fb2938164b0be2248b0143d6d3b67ea434aa973e72bda6bdc1a0dbfc3edb7844ebdd05004183306c21c26336bf9187022283ccf9e6d13be2ef55fc3b9e7e958f +EBUILD trojan-1.16.0-r1.ebuild 1318 BLAKE2B 82970b3afbef707e54a9f4612a8632edff3ecbcece6658537e6930a65eee8aadee14e413436f123108949c50378a41f4e88dc718e272fb8157bd11e1df144adc SHA512 fb2938164b0be2248b0143d6d3b67ea434aa973e72bda6bdc1a0dbfc3edb7844ebdd05004183306c21c26336bf9187022283ccf9e6d13be2ef55fc3b9e7e958f EBUILD trojan-9999.ebuild 1276 BLAKE2B b8163baf4c01ecbc56fe1f3c541b47d8f6c9c73a89fcb254a3411780bda12bfa9d3bf750f6929762f8cccb6956b20af2de262ba3220b7bf9a519e1202263c628 SHA512 76ec4e382c7def17b21715b4e9745c67998f88272418beef495c8c3351c0fcfbc57bda966ecb9ca1543823bcb8a9e650117ea8ac180a7b1d893ddaec568dcdfa MISC metadata.xml 1124 BLAKE2B 0d11d3625f824da33597ff489cb1170cac018279c80ce230c0b0233c7bc1e19a279adbea4f2aa9d83077ac8359d37714326dddb3c8f7f8503dbc9e17857a08d5 SHA512 2c912d390ff5483dc5458ff887958e259bdd6897754a3374d5d978729b692d0fc99768bd12975dc6c9e44b4080046914d9f55bc67045f68e792e2712cc513f30 diff --git a/net-proxy/trojan/files/trojan.initd b/net-proxy/trojan/files/trojan.initd index 2990245430db..348d307c5264 100644 --- a/net-proxy/trojan/files/trojan.initd +++ b/net-proxy/trojan/files/trojan.initd @@ -2,6 +2,9 @@ # Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +TJ_USER=nobody +TJ_GROUP=nobody + TJ_NAME=${SVCNAME##*.} if [ -n "${TJ_NAME}" -a "${SVCNAME}" != "trojan" ]; then TJ_PIDFILE="/run/trojan.${TJ_NAME}.pid" @@ -19,15 +22,19 @@ depend() { start() { ebegin "Starting Trojan, Log File: ${TJ_LOG}" - start-stop-daemon --start -b \ - -1 "${TJ_LOG}" -2 "${TJ_LOG}" \ - -m -p "${TJ_PIDFILE}" \ + checkpath -f -m 0600 -o ${TJ_USER}:${TJ_GROUP} "${TJ_LOG}" + start-stop-daemon --start --background \ + --user ${TJ_USER} --group ${TJ_GROUP} \ + --stdout "${TJ_LOG}" --stderr "${TJ_LOG}" \ + --make-pidfile --pidfile "${TJ_PIDFILE}" \ --exec /usr/bin/trojan -- "${TJ_CONFIG}" eend $? } stop() { ebegin "Stopping Trojan" - start-stop-daemon --stop -p "${TJ_PIDFILE}" + start-stop-daemon --stop \ + --user ${TJ_USER} --group ${TJ_GROUP} \ + --pidfile "${TJ_PIDFILE}" eend $? } diff --git a/net-proxy/trojan/trojan-1.15.1.ebuild b/net-proxy/trojan/trojan-1.15.1.ebuild deleted file mode 100644 index 21f494f1364d..000000000000 --- a/net-proxy/trojan/trojan-1.15.1.ebuild +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python{3_6,3_7} ) - -inherit cmake python-any-r1 systemd - -DESCRIPTION="An unidentifiable mechanism that helps you bypass GFW" -HOMEPAGE="https://github.com/trojan-gfw/trojan" -SRC_URI="https://github.com/trojan-gfw/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="GPL-3+" -SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~x86" -IUSE="mysql test" - -# Some hiccups setting up local network server. -RESTRICT="test" - -RDEPEND=" - >=dev-libs/boost-1.66.0:= - dev-libs/openssl:0= - mysql? ( dev-db/mysql-connector-c:= ) -" -DEPEND="${RDEPEND} - test? ( net-misc/curl ${PYTHON_DEPS} ) -" - -src_configure() { - local mycmakeargs=( - -DENABLE_MYSQL=$(usex mysql) - -DSYSTEMD_SERVICE=ON - -DSYSTEMD_SERVICE_PATH=$(systemd_get_systemunitdir) - ) - cmake_src_configure -} - -src_install() { - cmake_src_install - newinitd "${FILESDIR}/trojan.initd" trojan -} - -src_test() { - cmake_src_test -j1 -} - -pkg_postinst() { - elog "Running Trojan with multi instances" - elog "" - - elog "Prepare /etc/trojan/\${blah}.json first" - elog "Config with Openrc" - elog " ln -s /etc/init.d/trojan{,.\${blah}}" - elog " rc-update add trojan.\${blah} default" - elog "" - elog "Config with Systemd" - elog " systemctl enable trojan.\${blah}" - elog "" -} diff --git a/net-proxy/trojan/trojan-1.16.0-r1.ebuild b/net-proxy/trojan/trojan-1.16.0-r1.ebuild new file mode 100644 index 000000000000..21f494f1364d --- /dev/null +++ b/net-proxy/trojan/trojan-1.16.0-r1.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python{3_6,3_7} ) + +inherit cmake python-any-r1 systemd + +DESCRIPTION="An unidentifiable mechanism that helps you bypass GFW" +HOMEPAGE="https://github.com/trojan-gfw/trojan" +SRC_URI="https://github.com/trojan-gfw/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~x86" +IUSE="mysql test" + +# Some hiccups setting up local network server. +RESTRICT="test" + +RDEPEND=" + >=dev-libs/boost-1.66.0:= + dev-libs/openssl:0= + mysql? ( dev-db/mysql-connector-c:= ) +" +DEPEND="${RDEPEND} + test? ( net-misc/curl ${PYTHON_DEPS} ) +" + +src_configure() { + local mycmakeargs=( + -DENABLE_MYSQL=$(usex mysql) + -DSYSTEMD_SERVICE=ON + -DSYSTEMD_SERVICE_PATH=$(systemd_get_systemunitdir) + ) + cmake_src_configure +} + +src_install() { + cmake_src_install + newinitd "${FILESDIR}/trojan.initd" trojan +} + +src_test() { + cmake_src_test -j1 +} + +pkg_postinst() { + elog "Running Trojan with multi instances" + elog "" + + elog "Prepare /etc/trojan/\${blah}.json first" + elog "Config with Openrc" + elog " ln -s /etc/init.d/trojan{,.\${blah}}" + elog " rc-update add trojan.\${blah} default" + elog "" + elog "Config with Systemd" + elog " systemctl enable trojan.\${blah}" + elog "" +} diff --git a/net-proxy/trojan/trojan-1.16.0.ebuild b/net-proxy/trojan/trojan-1.16.0.ebuild deleted file mode 100644 index 21f494f1364d..000000000000 --- a/net-proxy/trojan/trojan-1.16.0.ebuild +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python{3_6,3_7} ) - -inherit cmake python-any-r1 systemd - -DESCRIPTION="An unidentifiable mechanism that helps you bypass GFW" -HOMEPAGE="https://github.com/trojan-gfw/trojan" -SRC_URI="https://github.com/trojan-gfw/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="GPL-3+" -SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~x86" -IUSE="mysql test" - -# Some hiccups setting up local network server. -RESTRICT="test" - -RDEPEND=" - >=dev-libs/boost-1.66.0:= - dev-libs/openssl:0= - mysql? ( dev-db/mysql-connector-c:= ) -" -DEPEND="${RDEPEND} - test? ( net-misc/curl ${PYTHON_DEPS} ) -" - -src_configure() { - local mycmakeargs=( - -DENABLE_MYSQL=$(usex mysql) - -DSYSTEMD_SERVICE=ON - -DSYSTEMD_SERVICE_PATH=$(systemd_get_systemunitdir) - ) - cmake_src_configure -} - -src_install() { - cmake_src_install - newinitd "${FILESDIR}/trojan.initd" trojan -} - -src_test() { - cmake_src_test -j1 -} - -pkg_postinst() { - elog "Running Trojan with multi instances" - elog "" - - elog "Prepare /etc/trojan/\${blah}.json first" - elog "Config with Openrc" - elog " ln -s /etc/init.d/trojan{,.\${blah}}" - elog " rc-update add trojan.\${blah} default" - elog "" - elog "Config with Systemd" - elog " systemctl enable trojan.\${blah}" - elog "" -} -- cgit v1.2.3