Gentoo Archives: gentoo-commits

From: Georgy Yakovlev <gyakovlev@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-dns/dnscrypt-proxy/
Date: Mon, 01 Apr 2019 07:25:29
Message-Id: 1554103501.7c4a6a14b930ba3e1dd8f3322d798509d9413f73.gyakovlev@gentoo
1 commit: 7c4a6a14b930ba3e1dd8f3322d798509d9413f73
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Mon Apr 1 07:24:42 2019 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Mon Apr 1 07:25:01 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c4a6a14
7
8 net-dns/dnscrypt-proxy: bump to 2.0.22
9
10 Package-Manager: Portage-2.3.62, Repoman-2.3.12
11 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
12
13 net-dns/dnscrypt-proxy/Manifest | 1 +
14 .../dnscrypt-proxy/dnscrypt-proxy-2.0.22.ebuild | 98 ++++++++++++++++++++++
15 2 files changed, 99 insertions(+)
16
17 diff --git a/net-dns/dnscrypt-proxy/Manifest b/net-dns/dnscrypt-proxy/Manifest
18 index 47320fa65b4..846626f53a0 100644
19 --- a/net-dns/dnscrypt-proxy/Manifest
20 +++ b/net-dns/dnscrypt-proxy/Manifest
21 @@ -1,2 +1,3 @@
22 DIST dnscrypt-proxy-2.0.19.tar.gz 3339713 BLAKE2B e65b5ed8243aa6cf471700c6edba6e843fdf6482443335ec74201363657b23a7c6e432318e4de508120b6210cecd02666d97bb62a5f2968ce7d4813518eb3997 SHA512 4501a64717c0f2a9313e9328340e466c9ec325d09ef548f6af9a7855ff3497fb741269a17b397a36e2a120519820378e9f98a6a768a3678ea8144ee4690364f6
23 DIST dnscrypt-proxy-2.0.21.tar.gz 2189155 BLAKE2B 3cab3ec4208e93733cefad49732c3fde644aac5401191d53a8c5962a1173456c09e12eaadeba6e086c078968b9467743cba7167ff0c84af2cf2f1d2209edd49f SHA512 e01869b963ef7454f9136d8ececc4e541dae489524e03cc2906fc3b661281bd6ebf5ef8b6dc29a6bcc1dabb638b9e74200b3ed48ebcd69cd3306e8bab5dd248a
24 +DIST dnscrypt-proxy-2.0.22.tar.gz 2192330 BLAKE2B 7688354d50a9c80368881be622ca8ef9cebd901a7023e071bb7eba603c876bf496f017a0abb5d9c6591fd4c31aad748c574a34ff47c5462c7417124282aaa37e SHA512 ea2641e79739e75e8a7e6bc24a788488537ffa823e18a3585f95ca1ae90bef9890c65eaf7feb80cc5ad09165cef9513d4025e96367ca87fc59333534f8856102
25
26 diff --git a/net-dns/dnscrypt-proxy/dnscrypt-proxy-2.0.22.ebuild b/net-dns/dnscrypt-proxy/dnscrypt-proxy-2.0.22.ebuild
27 new file mode 100644
28 index 00000000000..419d40281c6
29 --- /dev/null
30 +++ b/net-dns/dnscrypt-proxy/dnscrypt-proxy-2.0.22.ebuild
31 @@ -0,0 +1,98 @@
32 +# Copyright 1999-2019 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +EGO_PN="github.com/jedisct1/${PN}"
38 +
39 +inherit fcaps golang-build systemd user
40 +
41 +if [[ ${PV} == 9999 ]]; then
42 + inherit git-r3
43 + EGIT_REPO_URI="https://${EGO_PN}.git"
44 +else
45 + SRC_URI="https://${EGO_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
46 + KEYWORDS="~amd64 ~arm ~x86"
47 +fi
48 +
49 +DESCRIPTION="A flexible DNS proxy, with support for encrypted DNS protocols"
50 +HOMEPAGE="https://github.com/jedisct1/dnscrypt-proxy"
51 +
52 +LICENSE="ISC"
53 +SLOT="0"
54 +IUSE="pie"
55 +
56 +DEPEND=">=dev-lang/go-1.12"
57 +
58 +FILECAPS=( cap_net_bind_service+ep usr/bin/dnscrypt-proxy )
59 +PATCHES=( "${FILESDIR}"/config-full-paths-r10.patch )
60 +
61 +pkg_setup() {
62 + enewgroup dnscrypt-proxy
63 + enewuser dnscrypt-proxy -1 -1 /var/empty dnscrypt-proxy
64 +}
65 +
66 +src_prepare() {
67 + default
68 + # Create directory structure suitable for building
69 + mkdir -p "src/${EGO_PN%/*}" || die
70 + # fixes $GOPATH/go.mod exists but should not
71 + rm go.mod || die
72 + mv "${PN}" "src/${EGO_PN}" || die
73 + mv "vendor" "src/" || die
74 +}
75 +
76 +src_configure() {
77 + EGO_BUILD_FLAGS="-buildmode=$(usex pie pie default)"
78 +}
79 +
80 +src_install() {
81 + dobin dnscrypt-proxy
82 +
83 + insinto /etc/dnscrypt-proxy
84 + newins "src/${EGO_PN}"/example-dnscrypt-proxy.toml dnscrypt-proxy.toml
85 + doins "src/${EGO_PN}"/example-{blacklist.txt,whitelist.txt}
86 + doins "src/${EGO_PN}"/example-{cloaking-rules.txt,forwarding-rules.txt}
87 +
88 + insinto /usr/share/dnscrypt-proxy
89 + doins -r "utils/generate-domains-blacklists/."
90 +
91 + newinitd "${FILESDIR}"/dnscrypt-proxy.initd dnscrypt-proxy
92 + newconfd "${FILESDIR}"/dnscrypt-proxy.confd dnscrypt-proxy
93 + systemd_newunit "${FILESDIR}"/dnscrypt-proxy.service dnscrypt-proxy.service
94 + systemd_newunit "${FILESDIR}"/dnscrypt-proxy.socket dnscrypt-proxy.socket
95 +
96 + einstalldocs
97 +}
98 +
99 +pkg_postinst() {
100 + fcaps_pkg_postinst
101 +
102 + if ! use filecaps; then
103 + ewarn "'filecaps' USE flag is disabled"
104 + ewarn "${PN} will fail to listen on port 53"
105 + ewarn "please do one the following:"
106 + ewarn "1) re-enable 'filecaps'"
107 + ewarn "2) change port to > 1024"
108 + ewarn "3) configure to run ${PN} as root (not recommended)"
109 + ewarn
110 + fi
111 +
112 + if systemd_is_booted || has_version sys-apps/systemd; then
113 + elog "Using systemd socket activation may cause issues with speed"
114 + elog "latency and reliability of ${PN} and is discouraged by upstream"
115 + elog "Existing installations advised to disable 'dnscrypt-proxy.socket'"
116 + elog "It is disabled by default for new installations"
117 + elog "check "$(systemd_get_systemunitdir)/${PN}.service" for details"
118 + elog
119 +
120 + fi
121 +
122 + elog "After starting the service you will need to update your"
123 + elog "/etc/resolv.conf and replace your current set of resolvers"
124 + elog "with:"
125 + elog
126 + elog "nameserver 127.0.0.1"
127 + elog
128 + elog "Also see https://github.com/jedisct1/${PN}/wiki"
129 +}