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: Tue, 10 Jul 2018 05:20:21
Message-Id: 1531200001.ea1baa4dded097aba56cd501761b8ac1d72d272d.gyakovlev@gentoo
1 commit: ea1baa4dded097aba56cd501761b8ac1d72d272d
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jul 10 05:19:30 2018 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Tue Jul 10 05:20:01 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ea1baa4d
7
8 net-dns/dnscrypt-proxy: version bump to 2.0.16
9
10 Package-Manager: Portage-2.3.41, Repoman-2.3.9
11
12 net-dns/dnscrypt-proxy/Manifest | 1 +
13 .../dnscrypt-proxy/dnscrypt-proxy-2.0.16.ebuild | 97 ++++++++++++++++++++++
14 2 files changed, 98 insertions(+)
15
16 diff --git a/net-dns/dnscrypt-proxy/Manifest b/net-dns/dnscrypt-proxy/Manifest
17 index 358bffe9a86..d8e1a9b4854 100644
18 --- a/net-dns/dnscrypt-proxy/Manifest
19 +++ b/net-dns/dnscrypt-proxy/Manifest
20 @@ -1,2 +1,3 @@
21 DIST dnscrypt-proxy-2.0.14.tar.gz 2876583 BLAKE2B f93b2ba8991668691d503a5c039c4bb8eee0f474893c99ebd68067faa2a530832434c08654f61482a9d5b876ecf10329117b76a20b837fde00d72521170a1d86 SHA512 2574f900b6e2f75eeeee2f634e22df41145243c23cd9a890fcfa73f13b7d032bc2b029cbb6498f5c2cd33e212392ca2298a1dce6bb369be5c9afccc21a706613
22 DIST dnscrypt-proxy-2.0.15.tar.gz 2887764 BLAKE2B 7c4dd36f8305494566cb8548e478d9b89eed799dab124e574c0840c606f6c51cafb73818a07b18928a6457756a122d7bceabc108b1114b2b546d3db707d2ef3a SHA512 4517ab7b7eb1474f8c9e133a289caf6c02f472b51b910f1fbe1e5ffd6d389943626c8878e68f7f27a47b00301a427dfe9c563bc82b67cafab32f4ab3bc4c84b9
23 +DIST dnscrypt-proxy-2.0.16.tar.gz 3770249 BLAKE2B e6dc40ec503cff11e4deec1a243875fff42ec7ecba8c7c3552b69322d405c762fa152e7e9417baf944e2a476715f00813a305c20db583970520d35acd378f1d4 SHA512 f138df20560dd440a2ed390c1468d630191ae7b0e50521b4dde3fa7ef4377c3ae6409e8c547858bace53216c84aeeea6794305546b9ff87832f704c160c6782f
24
25 diff --git a/net-dns/dnscrypt-proxy/dnscrypt-proxy-2.0.16.ebuild b/net-dns/dnscrypt-proxy/dnscrypt-proxy-2.0.16.ebuild
26 new file mode 100644
27 index 00000000000..130e5f6b6c7
28 --- /dev/null
29 +++ b/net-dns/dnscrypt-proxy/dnscrypt-proxy-2.0.16.ebuild
30 @@ -0,0 +1,97 @@
31 +# Copyright 1999-2018 Gentoo Foundation
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=6
35 +
36 +EGO_PN="github.com/jedisct1/${PN}"
37 +
38 +inherit fcaps golang-build systemd user
39 +
40 +DESCRIPTION="A flexible DNS proxy, with support for encrypted DNS protocols"
41 +HOMEPAGE="https://github.com/jedisct1/dnscrypt-proxy"
42 +SRC_URI="https://${EGO_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
43 +
44 +LICENSE="ISC"
45 +SLOT="0"
46 +KEYWORDS="~amd64 ~arm ~x86"
47 +
48 +FILECAPS=( cap_net_bind_service+ep usr/bin/dnscrypt-proxy )
49 +PATCHES=( "${FILESDIR}"/config-full-paths-r10.patch )
50 +
51 +pkg_setup() {
52 + enewgroup dnscrypt-proxy
53 + enewuser dnscrypt-proxy -1 -1 /var/empty dnscrypt-proxy
54 +}
55 +
56 +src_prepare() {
57 + default
58 + # Create directory structure suitable for building
59 + mkdir -p "src/${EGO_PN%/*}" || die
60 + mv "${PN}" "src/${EGO_PN}" || die
61 + mv "vendor" "src/" || die
62 +}
63 +
64 +src_install() {
65 + dobin dnscrypt-proxy
66 +
67 + insinto /etc/dnscrypt-proxy
68 + newins "src/${EGO_PN}"/example-dnscrypt-proxy.toml dnscrypt-proxy.toml
69 + doins "src/${EGO_PN}"/example-{blacklist.txt,whitelist.txt}
70 + doins "src/${EGO_PN}"/example-{cloaking-rules.txt,forwarding-rules.txt}
71 +
72 + insinto /usr/share/dnscrypt-proxy
73 + doins -r "utils/generate-domains-blacklists/."
74 +
75 + newinitd "${FILESDIR}"/dnscrypt-proxy.initd dnscrypt-proxy
76 + newconfd "${FILESDIR}"/dnscrypt-proxy.confd dnscrypt-proxy
77 + systemd_newunit "${FILESDIR}"/dnscrypt-proxy.service dnscrypt-proxy.service
78 + systemd_newunit "${FILESDIR}"/dnscrypt-proxy.socket dnscrypt-proxy.socket
79 +
80 + einstalldocs
81 +}
82 +
83 +pkg_postinst() {
84 + fcaps_pkg_postinst
85 +
86 + if ! use filecaps; then
87 + ewarn "'filecaps' USE flag is disabled"
88 + ewarn "${PN} will fail to listen on port 53"
89 + ewarn "please do one the following:"
90 + ewarn "1) re-enable 'filecaps'"
91 + ewarn "2) change port to > 1024"
92 + ewarn "3) configure to run ${PN} as root (not recommended)"
93 + ewarn
94 + fi
95 +
96 + local v
97 + for v in ${REPLACING_VERSIONS}; do
98 + if [[ ${v} == 1.* ]] ; then
99 + elog "Version 2 is a complete rewrite of ${PN}"
100 + elog "please clean up old config/log files"
101 + elog
102 + fi
103 + if [[ ${v} == 2.* ]] ; then
104 + elog "As of version 2.0.12 of ${PN} runs as an 'dnscrypt-proxy' user/group"
105 + elog "you can remove obsolete 'dnscrypt' accounts from the system"
106 + elog
107 + fi
108 + done
109 +
110 + if systemd_is_booted || has_version sys-apps/systemd; then
111 + elog "Using systemd socket activation may cause issues with speed"
112 + elog "latency and reliability of ${PN} and is discouraged by upstream"
113 + elog "Existing installations advised to disable 'dnscrypt-proxy.socket'"
114 + elog "It is disabled by default for new installations"
115 + elog "check "$(systemd_get_systemunitdir)/${PN}.service" for details"
116 + elog
117 +
118 + fi
119 +
120 + elog "After starting the service you will need to update your"
121 + elog "/etc/resolv.conf and replace your current set of resolvers"
122 + elog "with:"
123 + elog
124 + elog "nameserver 127.0.0.1"
125 + elog
126 + elog "Also see https://github.com/jedisct1/${PN}/wiki"
127 +}