summaryrefslogtreecommitdiff
path: root/net-dns/dnscrypt-proxy
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-12-15 18:09:03 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-12-15 18:09:03 +0000
commit7bc9c63c9da678a7e6fceb095d56c634afd22c56 (patch)
tree4a67d50a439e9af63947e5f8b6ba3719af98b6c9 /net-dns/dnscrypt-proxy
parentb284a3168fa91a038925d2ecf5e4791011ea5e7d (diff)
gentoo resync : 15.12.2019
Diffstat (limited to 'net-dns/dnscrypt-proxy')
-rw-r--r--net-dns/dnscrypt-proxy/Manifest11
-rw-r--r--net-dns/dnscrypt-proxy/dnscrypt-proxy-2.0.33.ebuild (renamed from net-dns/dnscrypt-proxy/dnscrypt-proxy-2.0.19.ebuild)43
-rw-r--r--net-dns/dnscrypt-proxy/dnscrypt-proxy-2.0.34.ebuild99
-rw-r--r--net-dns/dnscrypt-proxy/dnscrypt-proxy-2.0.35.ebuild99
-rw-r--r--net-dns/dnscrypt-proxy/dnscrypt-proxy-9999.ebuild32
-rw-r--r--net-dns/dnscrypt-proxy/files/dnscrypt-proxy.initd19
6 files changed, 258 insertions, 45 deletions
diff --git a/net-dns/dnscrypt-proxy/Manifest b/net-dns/dnscrypt-proxy/Manifest
index a23fb4837197..5fd79fd3c6a3 100644
--- a/net-dns/dnscrypt-proxy/Manifest
+++ b/net-dns/dnscrypt-proxy/Manifest
@@ -1,21 +1,26 @@
AUX config-full-paths-r10.patch 2487 BLAKE2B a0c7ff420a9000903ec8fdf446c463ef367db2ec934147817f08c12277d5e1704db7c7ec89ec068a5cdc26f88eb794f8caf6d9eb318764783ad62e22ce9a2798 SHA512 15a8af5fff20d9f9d7931faf40d2f9ff1a960a764d7330287af65290e85e986892f0b94a6b311e8ae0be60be3b78caa10c71e438275f20d44706850c2a61d407
AUX dnscrypt-proxy.confd 162 BLAKE2B 4547fc4a4ec00a809bac7b55bd7a7c8efb54e526179a7e2103fdf716711912987961969619e6b6e6b2e201253e90f828ffa5eb011c0870c112a028c4cfd89ce5 SHA512 25ccbc09df7b51bc0fa4587f7a715429ba11517c64db53086dd09df24470da71b81dbacebe227bd41d1f9576b4560dc58729969eb7b33aa233ec6a6a07d573ab
+AUX dnscrypt-proxy.initd 629 BLAKE2B c16dae8cdf685faa6d99fc781c79508de261d861f63f540e5ad95a6dddf4230c0b0f49d07cd0c1531b94cd8021a9017c0ca3013c468fe512ea157fd22c04201a SHA512 a7c999e43809be69793aaf544e9ae6cdc01a61a17f142f6963242045f60fea049004310675cfb9c5f95de4d84d00342fee2504ab8480136c42620ef659c3c960
AUX dnscrypt-proxy.initd-r1 667 BLAKE2B fba1075bd738fc86b50f37bc25e3ef7f54416d5d85cf3e6d088be0707164007b1ff9c01ac2b0a583724f726cde41a96cd77c8beab11082dbc7b5c03a05c8cf95 SHA512 89677b8718c1a45a6d8b1a0501dc5c4ff8c02793181ac84316fe5488807726bc66b40849c2f91da817862997628b3456926f5efc6ede9c25bf3f5e6533fb88ee
AUX dnscrypt-proxy.logrotate 105 BLAKE2B 892cc2acb621bb2c653f4545ac1c58777cc048b9a2f954eac7d92fdf6109b529884d20e4bc14af6aa6cde4d6e0dcac33347216de33e915f5d1ba850fda361602 SHA512 ef5f9886d7c49334e642fa6b0abd748fcff05e171493998559539f7f48f0241607d4923c7b30ed81b2bae1037ae28e49072170000a5b4cbeb6fb77e9dc3a6546
AUX dnscrypt-proxy.service 1198 BLAKE2B 14db1a48f94b07622e0f52d8510e6c1634013e66ab5e5cdd7ddf7c0cde4441fd78b71134e4cfb6f122ba4a191ec032d54e92b1be97e4bd49af61a873431ea002 SHA512 c7dfe482a8ea17cb67681b92ac65a2d2d58d2be364351d131b0b689905d80390c5df794f6c7fb944bd508f69af72af96d36c1b7f7c5c70af7ee636423ab77e11
AUX dnscrypt-proxy.socket 517 BLAKE2B afa07d5a441b55de46059935a0fa9b7f61bcbfced925b24282be27978a507248303a43f32f2785d585e79c6a9f456a9c3118028014cb78cde5df4ea1be150b6c SHA512 9620307006642cd211b8032939b2e4f592f73d041c6a499f1c74160812853b03543ff84619e8060e064b99a3b7c44b794907722fe485233937e3804b49e29a36
-DIST dnscrypt-proxy-2.0.19.tar.gz 3339713 BLAKE2B e65b5ed8243aa6cf471700c6edba6e843fdf6482443335ec74201363657b23a7c6e432318e4de508120b6210cecd02666d97bb62a5f2968ce7d4813518eb3997 SHA512 4501a64717c0f2a9313e9328340e466c9ec325d09ef548f6af9a7855ff3497fb741269a17b397a36e2a120519820378e9f98a6a768a3678ea8144ee4690364f6
DIST dnscrypt-proxy-2.0.25.tar.gz 2596674 BLAKE2B 10947c9e496c47a565e62fb4ca6ad95679da0d237885fe09da367b501bf0dd228cb3d4af41b3527dca64665364527ec2db06afab2c209792409078debd7d3fc8 SHA512 74a47b013e15cbdcf8691bf3618cce40149f9832f6fc4c2cbfb6af2a72b4ecb52b068a150999771a77fcf4fdb49c64dabd127c5101ae29fb86723bc30c946133
DIST dnscrypt-proxy-2.0.27.tar.gz 2478887 BLAKE2B e9cabd6bdb330c3174cb904951f9e1a0a5482b642d458dd9fc7cba8d05333e7d91c37d43fbd360d8fbcda1c5febd2e5d577e0e612d9c2211047ba2a047b929ef SHA512 68cecec0228b3f03d5c50576c7dec32c7474a22bd1740d43b29514b5a00f27376ed5236302fa68c493f0c188134855b277fbbbb922222937fa726783af3f7246
DIST dnscrypt-proxy-2.0.28.tar.gz 2620245 BLAKE2B fe31dd6d8054c4ae3d5892aaef0c8362405e06dba6de32121d9dea5d64d396ec39b1cfa884d5587c21367bb1dc3c1a4b4f994c286d0b8cc2a8bdbd9d247d239e SHA512 45496a02bd19c94def17b621d0843cc93de4467e51ded4c20af91d9b5aa127529d85b8ff2473a88293c726611291a055d466a50258b7587da0e7d4ba7f0f366e
DIST dnscrypt-proxy-2.0.29.tar.gz 2621844 BLAKE2B 3ebd02b3c9df9dcb41d27d38a9d9f64c01d98f7b1afee7a7c3b1dd3ef26b2104aae650e34ff1b5651007461ee75d28bcfbfa3c7e82c32532f36553740e3dcb50 SHA512 f02abe56e017153e7fc8b4a26b34c90f68554a1b32a16558c05e8113327896dbf7f81aa69c76fa823a4a0a697b4bb2089bdeb1237ad4ef3587121c2d4cdfe78c
DIST dnscrypt-proxy-2.0.31.tar.gz 2640523 BLAKE2B cf2e2b5557e6fcf59d3d28978db6c5e46f6b7f58aa4c5ae423149ec2f557269e88846dc4f97c6f6f20ff013b14b61b20d2df750d6b07946606293778a31e0ca1 SHA512 500c800213b94bf8ecbea7493716de5fe41afd584c70844519f1f50827b94a28ec982f2c2b85f7a281dca58273ba968113beed6a965c62bb3dc47ab83d7a1629
-EBUILD dnscrypt-proxy-2.0.19.ebuild 3057 BLAKE2B f624c0a34f235f9ed5c7bfd93e4c3f3284387d56ae594e27a51e541bfd56a19ea81fff955df3eb2442bca093c42f56b75759ebd325a972c05023e4e27f2f793e SHA512 6bd9621a4902a3de52b912f4bd3a0653cf42d74538a36328f558ae4d62f734e577ab90041d119fc6587067aa36faf5f52f0447e9c84f84fee873d748180ecdcf
+DIST dnscrypt-proxy-2.0.33.tar.gz 2723092 BLAKE2B 26ed819f264c1a536b2e47d9ffa412097eba5c9597ad2a5e7ff7a485ad660aeb882c5ce527bb072a5f7b5782387ce1b72cc74400973f9cebd66a50bd2308d830 SHA512 5c6eb655aa70457889253cbf630e7e37011a461a7f181f0a667694d53146ad9dee88bbbf80c7db3187bba0054af2a63b7b5be1a229800b2566a9758e9d047429
+DIST dnscrypt-proxy-2.0.34.tar.gz 2741556 BLAKE2B 81e3c5b1de70cf81882725b1d1f9bfb0b687dbac6ce408c70178ac7107c6c4fc6fbee4a05deb775519aef82c2added5cec9e264a73af1b6eca1524ecd973c381 SHA512 b48bbedbd5fea5514669ff5593ecd0aee083979c3030fe775558441ee2c398206eba786b9497022c3fab08fe7ee49dcc5205303629834f8fe65d7246e3352381
+DIST dnscrypt-proxy-2.0.35.tar.gz 2740595 BLAKE2B a64d1771979179f6b2387473c6ac21705b30263572550efd4ffb8ef008e67a74878ab4e72bbb4f29528c4c13dfaf4654f7625671579cb90c3b784ab4299f7ec0 SHA512 41e3c0646e215da3ce00e9ff9f22a4d3468b6589c424343ce0649c5a47cdbce26c2d9ffc3abf61c35d85eda964c499877d6f13619ce2308fe045a0272b1ca0e9
EBUILD dnscrypt-proxy-2.0.25-r2.ebuild 2818 BLAKE2B 68b69f308ceda1969bbc53f098a1a3ae0a04fe3029e38653993fc4899fe5d84956730ef4cc923ce041cc98cbe15559daa367fe901e125f5d69603ff0e8a40836 SHA512 786ff205b146066fb9d2d97d0d3d4f589a1d9523cc554633a738906a2bda435891af3b421985483d1a0e56731dc803f39e5ae9c8074d4297fae713c3822e4661
EBUILD dnscrypt-proxy-2.0.25.ebuild 2760 BLAKE2B b5644b87589d113331e0d2bb902313481999e27d135df14ba0991c756eb4ecd3dc22e5d335ab794b980c540aa88c2ab92ad5fb9298e2fac18a397eb65d170065 SHA512 0ef7ddd2a4b6b33eed3bef91c9ef313c1e6d1f432f6d5de36fc4d908478b569e415c1eef4f5d53f3836bc337a8d93926f49526a5f964ae718b450ff17e6e01cc
EBUILD dnscrypt-proxy-2.0.27.ebuild 2818 BLAKE2B 68b69f308ceda1969bbc53f098a1a3ae0a04fe3029e38653993fc4899fe5d84956730ef4cc923ce041cc98cbe15559daa367fe901e125f5d69603ff0e8a40836 SHA512 786ff205b146066fb9d2d97d0d3d4f589a1d9523cc554633a738906a2bda435891af3b421985483d1a0e56731dc803f39e5ae9c8074d4297fae713c3822e4661
EBUILD dnscrypt-proxy-2.0.28.ebuild 2845 BLAKE2B 57585992fee08f503d3fb4398e4c57a1b4aec358b2cf7f2f1af28cf29b5b42298c58afcc19fe5dbc4cb255a28c9b56c1bda27e36384a02b17cd7ed8347c9dcf6 SHA512 d203cb7ff9229d75ded91322f86f7e2aa82090cd9a59f7ab18c17a848b092e184083793078e055aa1ce30a478c4e4d105ce587807fd78ec8d8f3723ab5f58d16
EBUILD dnscrypt-proxy-2.0.29.ebuild 2845 BLAKE2B 57585992fee08f503d3fb4398e4c57a1b4aec358b2cf7f2f1af28cf29b5b42298c58afcc19fe5dbc4cb255a28c9b56c1bda27e36384a02b17cd7ed8347c9dcf6 SHA512 d203cb7ff9229d75ded91322f86f7e2aa82090cd9a59f7ab18c17a848b092e184083793078e055aa1ce30a478c4e4d105ce587807fd78ec8d8f3723ab5f58d16
EBUILD dnscrypt-proxy-2.0.31.ebuild 2848 BLAKE2B 1d29b9ec5b3a6743dbc8e086fbbafd273948083c41b0ed25ff112bed749c7d4cca53386e5d432407d69d4ebf88afe6f5fb4b5f2df062f8d7d37f86d01952d2b7 SHA512 9e3884931614c326f6c4b23305f0669501e1b2c51f54a7981271f5c551c002227f43241ba05dfd3be754d76b0f8c5ed962606d6316e9ed3484b82d8c1a573c74
-EBUILD dnscrypt-proxy-9999.ebuild 2848 BLAKE2B 1d29b9ec5b3a6743dbc8e086fbbafd273948083c41b0ed25ff112bed749c7d4cca53386e5d432407d69d4ebf88afe6f5fb4b5f2df062f8d7d37f86d01952d2b7 SHA512 9e3884931614c326f6c4b23305f0669501e1b2c51f54a7981271f5c551c002227f43241ba05dfd3be754d76b0f8c5ed962606d6316e9ed3484b82d8c1a573c74
+EBUILD dnscrypt-proxy-2.0.33.ebuild 2847 BLAKE2B d1920acd8c142f7293a40af929b7a64f9028f387e818b05edc4e8f50f66890c2be4805ab1404862f6d3e36b83ea8b406e8936f75aeda6f995ab90b2949ed66fd SHA512 a07cb7e8b80569540158bd741a25eeb12674b365373c3a23c4e81674531a7bfa793c43857850e100bf861d82205423a375091f9261ad46208d307e5778100b2e
+EBUILD dnscrypt-proxy-2.0.34.ebuild 2686 BLAKE2B 45c7d034115b2511f00e057552cf536c39d4a8971936fe3030a0397090ba2868b9665724e9adebd2fa4d1d629a24d8c030bbb8d14518f7d234ae309acdd12529 SHA512 2d8bdd88e73858f1bbc5212355d119a2df481e5677709326e3a45fb1e5f5a2e7f2d0d398c2f9f785be052a0ac80fb73dbfe1fdc6667cc090e9e968021a045a5f
+EBUILD dnscrypt-proxy-2.0.35.ebuild 2686 BLAKE2B 45c7d034115b2511f00e057552cf536c39d4a8971936fe3030a0397090ba2868b9665724e9adebd2fa4d1d629a24d8c030bbb8d14518f7d234ae309acdd12529 SHA512 2d8bdd88e73858f1bbc5212355d119a2df481e5677709326e3a45fb1e5f5a2e7f2d0d398c2f9f785be052a0ac80fb73dbfe1fdc6667cc090e9e968021a045a5f
+EBUILD dnscrypt-proxy-9999.ebuild 2686 BLAKE2B 45c7d034115b2511f00e057552cf536c39d4a8971936fe3030a0397090ba2868b9665724e9adebd2fa4d1d629a24d8c030bbb8d14518f7d234ae309acdd12529 SHA512 2d8bdd88e73858f1bbc5212355d119a2df481e5677709326e3a45fb1e5f5a2e7f2d0d398c2f9f785be052a0ac80fb73dbfe1fdc6667cc090e9e968021a045a5f
MISC metadata.xml 630 BLAKE2B a20afc1f8db35b9833819322d9845519540f27864a21b743c364a14c70cabb23efca28fe4302a6d995846941ab41a92e3f811898c18281f613f2d44811249d4d SHA512 803fab528ee6776c5c101770a4fb93d021ac8bf4a71e341f99b067df8dceaa413d53604ba616b99cb695fefc25424035a2754fa033a0e62ec5fd7c3e24219d22
diff --git a/net-dns/dnscrypt-proxy/dnscrypt-proxy-2.0.19.ebuild b/net-dns/dnscrypt-proxy/dnscrypt-proxy-2.0.33.ebuild
index 2f732970bcdd..eac66d7f0824 100644
--- a/net-dns/dnscrypt-proxy/dnscrypt-proxy-2.0.19.ebuild
+++ b/net-dns/dnscrypt-proxy/dnscrypt-proxy-2.0.33.ebuild
@@ -1,39 +1,43 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
EGO_PN="github.com/jedisct1/${PN}"
-inherit fcaps golang-build systemd user
+inherit fcaps golang-build systemd
if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://${EGO_PN}.git"
else
SRC_URI="https://${EGO_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="amd64 ~arm ~x86"
+ KEYWORDS="amd64 ~arm ~ppc64 ~x86"
fi
DESCRIPTION="A flexible DNS proxy, with support for encrypted DNS protocols"
HOMEPAGE="https://github.com/jedisct1/dnscrypt-proxy"
-LICENSE="ISC"
+LICENSE="Apache-2.0 BSD ISC MIT MPL-2.0"
SLOT="0"
-IUSE="pie test"
+IUSE="pie"
+
+DEPEND=">=dev-lang/go-1.12"
+
+RDEPEND="
+ acct-group/dnscrypt-proxy
+ acct-user/dnscrypt-proxy
+"
FILECAPS=( cap_net_bind_service+ep usr/bin/dnscrypt-proxy )
PATCHES=( "${FILESDIR}"/config-full-paths-r10.patch )
-pkg_setup() {
- enewgroup dnscrypt-proxy
- enewuser dnscrypt-proxy -1 -1 /var/empty dnscrypt-proxy
-}
-
src_prepare() {
default
# Create directory structure suitable for building
mkdir -p "src/${EGO_PN%/*}" || die
+ # fixes $GOPATH/go.mod exists but should not
+ rm go.mod || die
mv "${PN}" "src/${EGO_PN}" || die
mv "vendor" "src/${EGO_PN}" || die
}
@@ -53,11 +57,14 @@ src_install() {
insinto /usr/share/dnscrypt-proxy
doins -r "utils/generate-domains-blacklists/."
- newinitd "${FILESDIR}"/dnscrypt-proxy.initd dnscrypt-proxy
+ newinitd "${FILESDIR}"/dnscrypt-proxy.initd-r1 dnscrypt-proxy
newconfd "${FILESDIR}"/dnscrypt-proxy.confd dnscrypt-proxy
systemd_newunit "${FILESDIR}"/dnscrypt-proxy.service dnscrypt-proxy.service
systemd_newunit "${FILESDIR}"/dnscrypt-proxy.socket dnscrypt-proxy.socket
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/dnscrypt-proxy.logrotate dnscrypt-proxy
+
einstalldocs
}
@@ -74,20 +81,6 @@ pkg_postinst() {
ewarn
fi
- local v
- for v in ${REPLACING_VERSIONS}; do
- if [[ ${v} == 1.* ]] ; then
- elog "Version 2 is a complete rewrite of ${PN}"
- elog "please clean up old config/log files"
- elog
- fi
- if [[ ${v} == 2.* ]] ; then
- elog "As of version 2.0.12 of ${PN} runs as an 'dnscrypt-proxy' user/group"
- elog "you can remove obsolete 'dnscrypt' accounts from the system"
- elog
- fi
- done
-
if systemd_is_booted || has_version sys-apps/systemd; then
elog "Using systemd socket activation may cause issues with speed"
elog "latency and reliability of ${PN} and is discouraged by upstream"
diff --git a/net-dns/dnscrypt-proxy/dnscrypt-proxy-2.0.34.ebuild b/net-dns/dnscrypt-proxy/dnscrypt-proxy-2.0.34.ebuild
new file mode 100644
index 000000000000..e3266982fa26
--- /dev/null
+++ b/net-dns/dnscrypt-proxy/dnscrypt-proxy-2.0.34.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+EGO_PN="github.com/jedisct1/${PN}"
+
+inherit fcaps go-module systemd
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://${EGO_PN}.git"
+else
+ SRC_URI="https://${EGO_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~ppc64 ~x86"
+fi
+
+DESCRIPTION="A flexible DNS proxy, with support for encrypted DNS protocols"
+HOMEPAGE="https://github.com/jedisct1/dnscrypt-proxy"
+
+LICENSE="Apache-2.0 BSD ISC MIT MPL-2.0"
+SLOT="0"
+IUSE="pie"
+
+BDEPEND=">=dev-lang/go-1.13"
+
+RDEPEND="
+ acct-group/dnscrypt-proxy
+ acct-user/dnscrypt-proxy
+"
+
+FILECAPS=( cap_net_bind_service+ep usr/bin/dnscrypt-proxy )
+PATCHES=( "${FILESDIR}"/config-full-paths-r10.patch )
+
+src_compile() {
+ pushd "${PN}" >/dev/null || die
+ go build -buildmode="$(usex pie pie default)" || die
+ popd >/dev/null || die
+}
+
+src_install() {
+ pushd "${PN}" >/dev/null || die
+
+ dobin dnscrypt-proxy
+
+ insinto /etc/dnscrypt-proxy
+ newins example-dnscrypt-proxy.toml dnscrypt-proxy.toml
+ doins example-{blacklist.txt,whitelist.txt}
+ doins example-{cloaking-rules.txt,forwarding-rules.txt}
+
+ popd >/dev/null || die
+
+ insinto /usr/share/dnscrypt-proxy
+ doins -r "utils/generate-domains-blacklists/."
+
+ newinitd "${FILESDIR}"/dnscrypt-proxy.initd-r1 dnscrypt-proxy
+ newconfd "${FILESDIR}"/dnscrypt-proxy.confd dnscrypt-proxy
+
+ systemd_newunit "${FILESDIR}"/dnscrypt-proxy.service dnscrypt-proxy.service
+ systemd_newunit "${FILESDIR}"/dnscrypt-proxy.socket dnscrypt-proxy.socket
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/dnscrypt-proxy.logrotate dnscrypt-proxy
+
+ einstalldocs
+}
+
+pkg_postinst() {
+ fcaps_pkg_postinst
+ go-module_pkg_postinst
+
+ if ! use filecaps; then
+ ewarn "'filecaps' USE flag is disabled"
+ ewarn "${PN} will fail to listen on port 53"
+ ewarn "please do one the following:"
+ ewarn "1) re-enable 'filecaps'"
+ ewarn "2) change port to > 1024"
+ ewarn "3) configure to run ${PN} as root (not recommended)"
+ ewarn
+ fi
+
+ if systemd_is_booted || has_version sys-apps/systemd; then
+ elog "Using systemd socket activation may cause issues with speed"
+ elog "latency and reliability of ${PN} and is discouraged by upstream"
+ elog "Existing installations advised to disable 'dnscrypt-proxy.socket'"
+ elog "It is disabled by default for new installations"
+ elog "check "$(systemd_get_systemunitdir)/${PN}.service" for details"
+ elog
+
+ fi
+
+ elog "After starting the service you will need to update your"
+ elog "/etc/resolv.conf and replace your current set of resolvers"
+ elog "with:"
+ elog
+ elog "nameserver 127.0.0.1"
+ elog
+ elog "Also see https://github.com/jedisct1/${PN}/wiki"
+}
diff --git a/net-dns/dnscrypt-proxy/dnscrypt-proxy-2.0.35.ebuild b/net-dns/dnscrypt-proxy/dnscrypt-proxy-2.0.35.ebuild
new file mode 100644
index 000000000000..e3266982fa26
--- /dev/null
+++ b/net-dns/dnscrypt-proxy/dnscrypt-proxy-2.0.35.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+EGO_PN="github.com/jedisct1/${PN}"
+
+inherit fcaps go-module systemd
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://${EGO_PN}.git"
+else
+ SRC_URI="https://${EGO_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~ppc64 ~x86"
+fi
+
+DESCRIPTION="A flexible DNS proxy, with support for encrypted DNS protocols"
+HOMEPAGE="https://github.com/jedisct1/dnscrypt-proxy"
+
+LICENSE="Apache-2.0 BSD ISC MIT MPL-2.0"
+SLOT="0"
+IUSE="pie"
+
+BDEPEND=">=dev-lang/go-1.13"
+
+RDEPEND="
+ acct-group/dnscrypt-proxy
+ acct-user/dnscrypt-proxy
+"
+
+FILECAPS=( cap_net_bind_service+ep usr/bin/dnscrypt-proxy )
+PATCHES=( "${FILESDIR}"/config-full-paths-r10.patch )
+
+src_compile() {
+ pushd "${PN}" >/dev/null || die
+ go build -buildmode="$(usex pie pie default)" || die
+ popd >/dev/null || die
+}
+
+src_install() {
+ pushd "${PN}" >/dev/null || die
+
+ dobin dnscrypt-proxy
+
+ insinto /etc/dnscrypt-proxy
+ newins example-dnscrypt-proxy.toml dnscrypt-proxy.toml
+ doins example-{blacklist.txt,whitelist.txt}
+ doins example-{cloaking-rules.txt,forwarding-rules.txt}
+
+ popd >/dev/null || die
+
+ insinto /usr/share/dnscrypt-proxy
+ doins -r "utils/generate-domains-blacklists/."
+
+ newinitd "${FILESDIR}"/dnscrypt-proxy.initd-r1 dnscrypt-proxy
+ newconfd "${FILESDIR}"/dnscrypt-proxy.confd dnscrypt-proxy
+
+ systemd_newunit "${FILESDIR}"/dnscrypt-proxy.service dnscrypt-proxy.service
+ systemd_newunit "${FILESDIR}"/dnscrypt-proxy.socket dnscrypt-proxy.socket
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/dnscrypt-proxy.logrotate dnscrypt-proxy
+
+ einstalldocs
+}
+
+pkg_postinst() {
+ fcaps_pkg_postinst
+ go-module_pkg_postinst
+
+ if ! use filecaps; then
+ ewarn "'filecaps' USE flag is disabled"
+ ewarn "${PN} will fail to listen on port 53"
+ ewarn "please do one the following:"
+ ewarn "1) re-enable 'filecaps'"
+ ewarn "2) change port to > 1024"
+ ewarn "3) configure to run ${PN} as root (not recommended)"
+ ewarn
+ fi
+
+ if systemd_is_booted || has_version sys-apps/systemd; then
+ elog "Using systemd socket activation may cause issues with speed"
+ elog "latency and reliability of ${PN} and is discouraged by upstream"
+ elog "Existing installations advised to disable 'dnscrypt-proxy.socket'"
+ elog "It is disabled by default for new installations"
+ elog "check "$(systemd_get_systemunitdir)/${PN}.service" for details"
+ elog
+
+ fi
+
+ elog "After starting the service you will need to update your"
+ elog "/etc/resolv.conf and replace your current set of resolvers"
+ elog "with:"
+ elog
+ elog "nameserver 127.0.0.1"
+ elog
+ elog "Also see https://github.com/jedisct1/${PN}/wiki"
+}
diff --git a/net-dns/dnscrypt-proxy/dnscrypt-proxy-9999.ebuild b/net-dns/dnscrypt-proxy/dnscrypt-proxy-9999.ebuild
index 215c07210b28..e3266982fa26 100644
--- a/net-dns/dnscrypt-proxy/dnscrypt-proxy-9999.ebuild
+++ b/net-dns/dnscrypt-proxy/dnscrypt-proxy-9999.ebuild
@@ -5,7 +5,7 @@ EAPI=7
EGO_PN="github.com/jedisct1/${PN}"
-inherit fcaps golang-build systemd
+inherit fcaps go-module systemd
if [[ ${PV} == 9999 ]]; then
inherit git-r3
@@ -22,7 +22,7 @@ LICENSE="Apache-2.0 BSD ISC MIT MPL-2.0"
SLOT="0"
IUSE="pie"
-DEPEND=">=dev-lang/go-1.12"
+BDEPEND=">=dev-lang/go-1.13"
RDEPEND="
acct-group/dnscrypt-proxy
@@ -32,33 +32,30 @@ RDEPEND="
FILECAPS=( cap_net_bind_service+ep usr/bin/dnscrypt-proxy )
PATCHES=( "${FILESDIR}"/config-full-paths-r10.patch )
-src_prepare() {
- default
- # Create directory structure suitable for building
- mkdir -p "src/${EGO_PN%/*}" || die
- # fixes $GOPATH/go.mod exists but should not
- rm go.mod || die
- mv "${PN}" "src/${EGO_PN}" || die
- mv "vendor" "src/${EGO_PN}" || die
-}
-
-src_configure() {
- EGO_BUILD_FLAGS="-buildmode=$(usex pie pie default)"
+src_compile() {
+ pushd "${PN}" >/dev/null || die
+ go build -buildmode="$(usex pie pie default)" || die
+ popd >/dev/null || die
}
src_install() {
+ pushd "${PN}" >/dev/null || die
+
dobin dnscrypt-proxy
insinto /etc/dnscrypt-proxy
- newins "src/${EGO_PN}"/example-dnscrypt-proxy.toml dnscrypt-proxy.toml
- doins "src/${EGO_PN}"/example-{blacklist.txt,whitelist.txt}
- doins "src/${EGO_PN}"/example-{cloaking-rules.txt,forwarding-rules.txt}
+ newins example-dnscrypt-proxy.toml dnscrypt-proxy.toml
+ doins example-{blacklist.txt,whitelist.txt}
+ doins example-{cloaking-rules.txt,forwarding-rules.txt}
+
+ popd >/dev/null || die
insinto /usr/share/dnscrypt-proxy
doins -r "utils/generate-domains-blacklists/."
newinitd "${FILESDIR}"/dnscrypt-proxy.initd-r1 dnscrypt-proxy
newconfd "${FILESDIR}"/dnscrypt-proxy.confd dnscrypt-proxy
+
systemd_newunit "${FILESDIR}"/dnscrypt-proxy.service dnscrypt-proxy.service
systemd_newunit "${FILESDIR}"/dnscrypt-proxy.socket dnscrypt-proxy.socket
@@ -70,6 +67,7 @@ src_install() {
pkg_postinst() {
fcaps_pkg_postinst
+ go-module_pkg_postinst
if ! use filecaps; then
ewarn "'filecaps' USE flag is disabled"
diff --git a/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.initd b/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.initd
new file mode 100644
index 000000000000..e0fc08ad6a0c
--- /dev/null
+++ b/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.initd
@@ -0,0 +1,19 @@
+#!/sbin/openrc-run
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+command="/usr/bin/dnscrypt-proxy"
+command_args="${DNSCRYPT_PROXY_OPTS:--config /etc/dnscrypt-proxy/dnscrypt-proxy.toml}"
+command_user="${DNSCRYPT_PROXY_USER:-dnscrypt-proxy}:${DNSCRYPT_PROXY_GROUP:-dnscrypt-proxy}"
+pidfile="/run/${RC_SVCNAME}.pid"
+start_stop_daemon_args="--background --make-pidfile"
+
+depend() {
+ use logger net
+ provide dns
+}
+
+start_pre() {
+ checkpath -q -d -m 0775 -o "${command_user}" /var/cache/"${RC_SVCNAME}"
+ checkpath -q -d -m 0775 -o "${command_user}" /var/log/"${RC_SVCNAME}"
+}