From: "Robin H. Johnson" <robbat2@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-dns/dnscrypt-proxy/, net-dns/dnscrypt-proxy/files/
Date: Sun, 27 Dec 2015 00:05:36 +0000 (UTC) [thread overview]
Message-ID: <1451174720.0b06988e696c9be3c361b61b632225bf0adb0d70.robbat2@gentoo> (raw)
commit: 0b06988e696c9be3c361b61b632225bf0adb0d70
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 26 23:57:05 2015 +0000
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Sun Dec 27 00:05:20 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b06988e
net-dns/dnscrypt-proxy: ease of use improvements.
Make it possible to select easily select resolver using the
upstream-provided CSV file, rather than having to manually specify
parameters. Keep the default as the same Cisco OpenDNS provider.
Also use ephemeral keys by default to improve security.
Package-Manager: portage-2.2.24
.../dnscrypt-proxy/dnscrypt-proxy-1.6.0-r1.ebuild | 58 +++++++++++++++++++++
.../files/dnscrypt-proxy.confd-1.6.0-r1 | 13 +++++
.../files/dnscrypt-proxy.initd-1.6.0-r1 | 60 ++++++++++++++++++++++
3 files changed, 131 insertions(+)
diff --git a/net-dns/dnscrypt-proxy/dnscrypt-proxy-1.6.0-r1.ebuild b/net-dns/dnscrypt-proxy/dnscrypt-proxy-1.6.0-r1.ebuild
new file mode 100644
index 0000000..5d52ce9
--- /dev/null
+++ b/net-dns/dnscrypt-proxy/dnscrypt-proxy-1.6.0-r1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit systemd user
+
+DESCRIPTION="A tool for securing communications between a client and a DNS resolver"
+HOMEPAGE="http://dnscrypt.org/"
+SRC_URI="http://download.dnscrypt.org/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+plugins systemd"
+
+CDEPEND="
+ dev-libs/libsodium
+ net-libs/ldns
+ systemd? ( sys-apps/systemd )"
+RDEPEND="${CDEPEND}"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+
+DOCS="AUTHORS ChangeLog NEWS README* TECHNOTES THANKS"
+
+pkg_setup() {
+ enewgroup dnscrypt
+ enewuser dnscrypt -1 -1 /var/empty dnscrypt
+}
+
+src_configure() {
+ econf \
+ $(use_enable plugins) \
+ $(use_with systemd)
+}
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}"/${PN}.initd-1.6.0-r1 ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd-1.6.0-r1 ${PN}
+ systemd_dounit "${FILESDIR}"/${PN}.service
+}
+
+pkg_postinst() {
+ elog "After starting the service you will need to update your"
+ elog "/etc/resolv.conf and replace your current set of resolvers"
+ elog "with:"
+ elog
+ elog "nameserver <DNSCRYPT_LOCALIP>"
+ elog
+ elog "where <DNSCRYPT_LOCALIP> is what you supplied in"
+ elog "/etc/conf.d/dnscrypt-proxy, default is \"127.0.0.1\"."
+ elog
+ elog "Also see https://github.com/jedisct1/dnscrypt-proxy#usage."
+}
diff --git a/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.confd-1.6.0-r1 b/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.confd-1.6.0-r1
new file mode 100644
index 0000000..5b1b28d
--- /dev/null
+++ b/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.confd-1.6.0-r1
@@ -0,0 +1,13 @@
+DNSCRYPT_LOCALIP=127.0.0.1
+DNSCRYPT_LOCALPORT=53
+DNSCRYPT_USER=dnscrypt
+DNSCRYPT_OPTIONS="--ephemeral-keys"
+# Pick exactly ONE of the following sets:
+# option 1) selection from CSV file, uses the first column as the key
+DNSCRYPT_RESOLVER_NAME=cisco # Cisco OpenDNS
+DNSCRYPT_RESOLVERS_LIST=/usr/share/dnscrypt-proxy/dnscrypt-resolvers.csv
+# option 2) manually specified parameters
+#DNSCRYPT_RESOLVERIP=203.0.133.53
+#DNSCRYPT_RESOLVERPORT=443
+#DNSCRYPT_PROVIDER_NAME=2.dnscrypt-cert.example.com
+#DNSCRYPT_PROVIDER_KEY=1234:5678:90AB:CDEF:DEAD:BEEF:CAFE:BEA7:1234:5678:90AB:CDEF:DEAD:BEEF:CAFE:BEA7
diff --git a/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.initd-1.6.0-r1 b/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.initd-1.6.0-r1
new file mode 100644
index 0000000..e79f8f9
--- /dev/null
+++ b/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.initd-1.6.0-r1
@@ -0,0 +1,60 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DNSCRYPT_LOGFILE=${DNSCRYPT_LOGFILE:-/var/log/dnscrypt-proxy.log}
+DNSCRYPT_RESOLVERS_LIST=${DNSCRYPT_RESOLVERS_LIST:-/usr/share/dnscrypt-proxy/dnscrypt-resolvers.csv}
+
+rundir=${rundir:-/var/run/dnscrypt-proxy}
+pidfile=${pidfile:-${rundir}/dnscrypt-proxy.pid}
+rundir=${rundir:-/var/run/dnscrypt-proxy}
+runas_user=${runas_user:-dnscrypt}
+runas_group=${runas_user:-dnscrypt}
+
+depend() {
+ use net
+ before dns
+ after logger
+}
+
+start() {
+ if [ ! -d "${rundir}" ]; then
+ mkdir "${rundir}"
+ if [ -n "${runas_user}" ]; then
+ touch "${DNSCRYPT_LOGFILE}"
+ chown ${runas_user}:${runas_group} "${DNSCRYPT_LOGFILE}"
+ chown -R ${runas_user}:${runas_group} "${rundir}"
+ fi
+ fi
+
+ if [ -n "$DNSCRYPT_RESOLVER_NAME" -a -n "$DNSCRYPT_RESOLVERIP" ]; then
+ eerror "You must set exactly one of DNSCRYPT_RESOLVER_NAME or DNSCRYPT_RESOLVERIP!"
+ return 1
+ elif [ -n "$DNSCRYPT_RESOLVER_NAME" ]; then
+ resolver_opts="--resolvers-list=${DNSCRYPT_RESOLVERS_LIST} --resolver-name=${DNSCRYPT_RESOLVER_NAME}"
+ elif [ -n "$DNSCRYPT_RESOLVERIP" ]; then
+ resolver_opts="--resolver-address=${DNSCRYPT_RESOLVERIP}:${DNSCRYPT_RESOLVERPORT} --provider-name=${DNSCRYPT_PROVIDER_NAME} --provider-key=${DNSCRYPT_PROVIDER_KEY}"
+ else
+ eerror "You must set exactly one of DNSCRYPT_RESOLVER_NAME or DNSCRYPT_RESOLVERIP!"
+ return 1
+ fi
+
+ ebegin "Starting dnscrypt-proxy"
+ start-stop-daemon --start --quiet \
+ --exec /usr/sbin/dnscrypt-proxy \
+ -- \
+ ${DNSCRYPT_OPTIONS} \
+ --pidfile="${pidfile}" \
+ --logfile="${DNSCRYPT_LOGFILE}" \
+ --daemonize --user=${runas_user} \
+ --local-address=${DNSCRYPT_LOCALIP}:${DNSCRYPT_LOCALPORT} \
+ $resolver_opts
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping dnscrypt-proxy"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/dnscrypt-proxy
+ eend $?
+}
next reply other threads:[~2015-12-27 0:05 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-27 0:05 Robin H. Johnson [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-02-20 0:19 [gentoo-commits] repo/gentoo:master commit in: net-dns/dnscrypt-proxy/, net-dns/dnscrypt-proxy/files/ Robin H. Johnson
2017-04-08 21:24 Patrice Clement
2017-04-08 21:24 Patrice Clement
2017-06-25 6:50 Michael Palimaka
2017-11-07 8:48 Lars Wendler
2018-03-04 8:06 Michał Górny
2018-04-20 7:32 Michał Górny
2018-05-11 9:36 Michał Górny
2018-06-07 11:12 Michał Górny
2018-06-07 11:12 Michał Górny
2018-06-07 18:05 Michał Górny
2019-06-20 9:02 Georgy Yakovlev
2019-07-30 1:23 Georgy Yakovlev
2019-11-04 21:32 Georgy Yakovlev
2020-03-25 20:50 Georgy Yakovlev
2020-04-29 10:16 Joonas Niilola
2021-01-03 23:10 Sam James
2022-01-01 9:38 Sam James
2025-01-20 23:47 Sam James
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1451174720.0b06988e696c9be3c361b61b632225bf0adb0d70.robbat2@gentoo \
--to=robbat2@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox