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