From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- net-dns/dnscrypt-proxy/Manifest | 8 +++ .../dnscrypt-proxy/dnscrypt-proxy-1.9.4-r1.ebuild | 62 ++++++++++++++++++++++ net-dns/dnscrypt-proxy/files/dnscrypt-proxy.confd | 7 +++ net-dns/dnscrypt-proxy/files/dnscrypt-proxy.initd | 47 ++++++++++++++++ .../dnscrypt-proxy/files/dnscrypt-proxy.service | 20 +++++++ net-dns/dnscrypt-proxy/metadata.xml | 17 ++++++ 6 files changed, 161 insertions(+) create mode 100644 net-dns/dnscrypt-proxy/Manifest create mode 100644 net-dns/dnscrypt-proxy/dnscrypt-proxy-1.9.4-r1.ebuild create mode 100644 net-dns/dnscrypt-proxy/files/dnscrypt-proxy.confd create mode 100644 net-dns/dnscrypt-proxy/files/dnscrypt-proxy.initd create mode 100644 net-dns/dnscrypt-proxy/files/dnscrypt-proxy.service create mode 100644 net-dns/dnscrypt-proxy/metadata.xml (limited to 'net-dns/dnscrypt-proxy') diff --git a/net-dns/dnscrypt-proxy/Manifest b/net-dns/dnscrypt-proxy/Manifest new file mode 100644 index 000000000000..bc4feecda92c --- /dev/null +++ b/net-dns/dnscrypt-proxy/Manifest @@ -0,0 +1,8 @@ +AUX dnscrypt-proxy.confd 286 SHA256 11d635f9a504899e450e8f742952b3a736a5fc7da61eeff83eba416f3618c304 SHA512 7135d5fccf3b61981a1d085460f256d23cc63a28acf327f3b87ffed2ee3eb55ecad7703c9d4e4825bf5639d7469366933ff120ef0e7914cc756db829ce0f3d9d WHIRLPOOL 5d1938a9fade6a7e5f8dc0993a3dce6c46f47fde27badbc05d5dbda0273aacdfc861d36f5d82c351cb4214670b2d8113c5d70e0add2caa6492f63b3ef4ef19ba +AUX dnscrypt-proxy.initd 1264 SHA256 48ea1cc31b5c13d3b4fd04cf1b16a8b6a565e5ec60a639a0290459874d3495a9 SHA512 c0aeb6410679ebd277c9c4788f244c8b0a3a8aa04603fb9ccec506fa324c16489cd9d25d8ebfa0aed7324abb018a19f126d8d57fb798cfedc55035dfc45c5d99 WHIRLPOOL fff54ab455eafa04774aa1302fcf2d93858dddc949adafc69c21c658add6158b7831f36f55554662bf71101afbbadd918ef4325ac438c8023e706d176ec526e3 +AUX dnscrypt-proxy.service 662 SHA256 85dc6e5dc60b2da75c891c0ea7670d9067886b9b71c6e310014d7676d7b5b453 SHA512 4e018ec5f586e60ad1b2c16719ad56dc63184122861032dcccbe599f2090869d7193ebe4e0c1845d6005627902a25bf13ab26b5ad0bdf2c3ef8ae7c57a187798 WHIRLPOOL cec5860a2dbed5be9b2c8f33d8094535207c0b93b7f49cbd29e50bf420ab0c6a90db055468ceeb44eb9a0087e304636f7395311b91a1a297a9f7010586076f73 +DIST dnscrypt-proxy-1.9.4.tar.gz 1660333 SHA256 40543efbcd56033ac03a1edf4581305e8c9bed4579ac55e6279644f07c315307 SHA512 b19103dc39655f199c85ec69daab949d07adc12e64411d2323308afb398e6ac6563bbc17f2e317bfe1e6c95c810487d8d62da3f4c7f7257bdcf837cd0390bfb0 WHIRLPOOL 4e9494c2765ecf9d625f7b44c0f58c40e491e1334a58552111730ecd3b95cba10667b2bfa2b29e291ccfa97a5678bbbc398dd14e888914bfddc6f7e61bac4a3a +EBUILD dnscrypt-proxy-1.9.4-r1.ebuild 1449 SHA256 839d603cc0d1901169d5d64413d73537fdc513fdbf87f5c131b5741231b927e2 SHA512 c17b1b23bd87deb1d6167ca01920d3cd5f9b804a70606af0dc23060e7e9b568b9539fe6d06a92efbf6665b8d4cbbd485827c2ccc3ba82b93e6e944c26f190aa7 WHIRLPOOL bdbc4ebd9346210cce61cdc935ff4b16238d348f90ac9b31e7895718b0b5d43e3a3f7b37067fb43b5ac283dbc459a775149a5cd93425725a92c4ba673c63a7af +MISC ChangeLog 4892 SHA256 a8bcfebf1b7b7a44dfeaeef7f9b72549c95c8161ade6eb5cc9926739177344b0 SHA512 2a2f487e3caffccfed8474d0ebcb743a67c05d1c014156c53dd30db8d46f9717c2f68d22e28abf456f37caa7326e76a7d0b9366a5edba7eee46e6acc41ddc174 WHIRLPOOL 8eed7a6671e7d5a96859e310efa37858b7ac96a732d29b4274f32fc3bc3a1530e5eaf062a034db3a70b41117eb089452d12a031b2d908adafa3ab4d46e1fe3c7 +MISC ChangeLog-2015 666 SHA256 2b0c5a63391baf5c07350fc1313eb7e63f1ced626d2a0e8b682a9d013639dba5 SHA512 c3f372befcfb26fd816fedf422e3d56237e4c3a0a4c21aac865fc170683c994b4d53092cb15cc1e136ecd556d7dca35301636758f27b59854857ba58c1a05bbd WHIRLPOOL c5ee0cb599a1cc2fb40dea031b2858a506cdd5ba40d4929a599e78e2b423ad97e9b7579847ce75ab74aa087a5d975bf8763bbe6ca68e356f129787eac60a4012 +MISC metadata.xml 660 SHA256 190935b21a48bd5b8ed03dbc8eaf05503026564b34316eb71d8ed06188859f12 SHA512 e067fbb9bf3872f4f58f42ce389d950e3972bfafcdc22257ebc6b09ce8ed2770a11e1389b0c5885a5f39515f96337bdf1fc3c893e02e51d1cb7c980db7a30b54 WHIRLPOOL 7f1c614a9174bdfdbed48be155c42affc84c624dcb477a62d731c4e6580d3f33bdb458c158b5b938a0a7851711f09f07e72139265b73e426e871e582ae02698d diff --git a/net-dns/dnscrypt-proxy/dnscrypt-proxy-1.9.4-r1.ebuild b/net-dns/dnscrypt-proxy/dnscrypt-proxy-1.9.4-r1.ebuild new file mode 100644 index 000000000000..b8069db8ab60 --- /dev/null +++ b/net-dns/dnscrypt-proxy/dnscrypt-proxy-1.9.4-r1.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit systemd user + +DESCRIPTION="A tool for securing communications between a client and a DNS resolver" +HOMEPAGE="https://dnscrypt.org" +SRC_URI="https://download.dnscrypt.org/${PN}/${P}.tar.gz" + +LICENSE="ISC" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="hardened libressl +plugins ssl systemd" + +RDEPEND=" + dev-libs/libsodium + net-libs/ldns + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + ) + systemd? ( sys-apps/systemd )" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +DOCS="AUTHORS ChangeLog NEWS README* THANKS *txt" + +pkg_setup() { + enewgroup dnscrypt + enewuser dnscrypt -1 -1 /var/empty dnscrypt +} + +src_configure() { + econf \ + $(use_enable hardened pie) \ + $(use_enable plugins) \ + $(use_enable ssl openssl) \ + $(use_with systemd) +} + +src_install() { + default + + newinitd "${FILESDIR}"/${PN}.initd ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${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 " + elog + elog "where 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 b/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.confd new file mode 100644 index 000000000000..ceedd454b5fb --- /dev/null +++ b/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.confd @@ -0,0 +1,7 @@ +DNSCRYPT_LOCALIP=127.0.0.1 +DNSCRYPT_LOCALPORT=53 +DNSCRYPT_USER=dnscrypt +DNSCRYPT_PROVIDER_NAME=2.dnscrypt-cert.opendns.com +DNSCRYPT_PROVIDER_KEY=B735:1140:206F:225D:3E2B:D822:D7FD:691E:A1C3:3CC8:D666:8D0C:BE04:BFAB:CA43:FB79 +DNSCRYPT_RESOLVERIP=208.67.220.220 +DNSCRYPT_RESOLVERPORT=443 diff --git a/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.initd b/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.initd new file mode 100644 index 000000000000..9b07d7d47d82 --- /dev/null +++ b/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.initd @@ -0,0 +1,47 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +DNSCRYPT_LOGFILE=${DNSCRYPT_LOGFILE:-/var/log/dnscrypt-proxy.log} + +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 + + ebegin "Starting dnscrypt-proxy" + start-stop-daemon --start --quiet \ + --exec /usr/sbin/dnscrypt-proxy \ + -- \ + --pidfile="${pidfile}" \ + --logfile="${DNSCRYPT_LOGFILE}" \ + --daemonize --user=${runas_user} \ + --local-address=${DNSCRYPT_LOCALIP}:${DNSCRYPT_LOCALPORT} \ + --resolver-address=${DNSCRYPT_RESOLVERIP}:${DNSCRYPT_RESOLVERPORT} \ + --provider-name=${DNSCRYPT_PROVIDER_NAME} \ + --provider-key=${DNSCRYPT_PROVIDER_KEY} + eend $? +} + +stop() { + ebegin "Stopping dnscrypt-proxy" + start-stop-daemon --stop --quiet --exec /usr/sbin/dnscrypt-proxy + eend $? +} diff --git a/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.service b/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.service new file mode 100644 index 000000000000..4403254280a2 --- /dev/null +++ b/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.service @@ -0,0 +1,20 @@ +[Unit] +Description=A tool for securing communications between a client and a DNS resolver + +[Service] +Type=simple +PIDFile=/var/run/dnscrypt-proxy.pid +EnvironmentFile=/etc/conf.d/dnscrypt-proxy +ExecStartPre=/bin/rm -f /var/run/dnscrypt-proxy.pid +ExecStart=/usr/sbin/dnscrypt-proxy \ + --pidfile=/var/run/dnscrypt-proxy.pid \ + --logfile=/var/log/dnscrypt-proxy.log \ + --local-address=${DNSCRYPT_LOCALIP}:${DNSCRYPT_LOCALPORT} \ + --resolver-address=${DNSCRYPT_RESOLVERIP}:${DNSCRYPT_RESOLVERPORT} \ + --provider-name=${DNSCRYPT_PROVIDER_NAME} \ + --provider-key=${DNSCRYPT_PROVIDER_KEY} \ + --user=${DNSCRYPT_USER} +Restart=on-abort + +[Install] +WantedBy=multi-user.target diff --git a/net-dns/dnscrypt-proxy/metadata.xml b/net-dns/dnscrypt-proxy/metadata.xml new file mode 100644 index 000000000000..c07b954026a6 --- /dev/null +++ b/net-dns/dnscrypt-proxy/metadata.xml @@ -0,0 +1,17 @@ + + + + + + dnscrypt-proxy provides local service which can be used directly as your + local resolver or as a DNS forwarder, encrypting and authenticating + requests using the DNSCrypt protocol and passing them to an upstream + server. + + + Enable plugin support to inspect and modify + queries and responses + Use systemd's socket activation instead of + creating the sockets itself + + -- cgit v1.2.3