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