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