X-Original-To: alpine-aports@lists.alpinelinux.org Received: from mail-vk0-f46.google.com (mail-vk0-f46.google.com [209.85.213.46]) by lists.alpinelinux.org (Postfix) with ESMTP id 8AC7C5C5EF1 for ; Tue, 17 Jul 2018 13:22:55 +0000 (GMT) Received: by mail-vk0-f46.google.com with SMTP id y70-v6so551796vkc.0 for ; Tue, 17 Jul 2018 06:22:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Cs3boUA3ovcPhZEIo60qSLOGntnx365YhUxJ6h57c6k=; b=HbqxRNQ+W5kY1VDWA71zTX5ufxZpEeBITMI86ngMukAESM8cSBj7BTLGWkIwab8SK6 akgFw13by4z1/TZRpKJmdFrT0TDFbVg/K7S5brO7nlXCl+F1CPI5+EFl61QiItGaGrcw Ciwm1YiHtJxiQ76OwHoOO+SXzCW7xaau1tHbAhnYzOioASrPFBzJppKrJ6XCVKvtnK0x m15dTl9TuzxRKvYHdx3CcEz/B19Ni1xIHgB5P70m/7/Nq3M5kfkQaoR3MNJKGLbCtaN+ Jo0SBfws7tfsJRg2KZ8Ij/vr6SMs4sxo2g9n4JCK47ubJwxwTMMfz1OuHGLVv7b5d+qj luaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Cs3boUA3ovcPhZEIo60qSLOGntnx365YhUxJ6h57c6k=; b=HLcmM3TAGd8Nqe1h+GP1ykepJMkXnm47CPiyNf5pvivAXVlV+URV5kwY/F9MR5JpuM mPKHfoIIr0mqPy66LIOtz82suQdezoB6JPxYXqF9TC48qnYmPpJ2KKcgeyOxI1lowWA9 veOBn+dToosiC1uCj+fPf6/UDxoIs2DbpA4xZWBBoTdSXtvXvl/KES1J6OeFQmtDKwLa KLKnP0xGrZ8tVi7ixZi1pjdn1gek+R6R4BY6ezHG3AELqiuMnPJH9rDvRDQa6jaGT5ae /ToTuObrE+tY9XVqmzRH5Cf0PP/44NhfumpuxXLA0sIgka8MPxekLWJBx6CLzil6CWFX 0Dag== X-Gm-Message-State: AOUpUlE5FcNB+mZVYjjW5viW/HZ641dkgjfbt/RqK0ZfC5lRA0LSODZB giU/VnsB/dMn+sUoVM59tUaDzifPNEVAP6omMjU= X-Google-Smtp-Source: AAOMgpcgdYQLeJ8SRZ3DBi+IElkrHGk+JYJxUil9B8iGQ/IfrK7nhCSJGyMBy6fHm/KfQfThtTJhtPf9OHAm5MGltU0= X-Received: by 2002:a1f:bd2:: with SMTP id 201-v6mr796996vkl.165.1531833774802; Tue, 17 Jul 2018 06:22:54 -0700 (PDT) X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Received: by 2002:ab0:6152:0:0:0:0:0 with HTTP; Tue, 17 Jul 2018 06:22:54 -0700 (PDT) In-Reply-To: <20180412113635.27251-1-taner76@gmail.com> References: <20180412113635.27251-1-taner76@gmail.com> From: Leonardo Arena Date: Tue, 17 Jul 2018 15:22:54 +0200 Message-ID: Subject: Re: [alpine-aports] [PATCH] community/dnscrypt-proxy: Fix launch as service To: Taner Tas Cc: alpine-aports , Francesco Colista Content-Type: multipart/alternative; boundary="000000000000008a30057131d810" --000000000000008a30057131d810 Content-Type: text/plain; charset="UTF-8" Hi, not sure if it's still needed, but needs be rebased against latest version. Thanks On Thu, Apr 12, 2018 at 1:36 PM, Taner Tas wrote: > * To able to bind on port 53, capabilities of binary file has to be > changed via post-install script > * Clarify license (ISC), thus removed -doc subpackage > * Dynamically fetched server list file moved to /var/cache instead of /etc > * Example configuration files moved to /usr/share instead of /etc > * Configuration file patch added to ensure logs to be stored in /var/log > --- > community/dnscrypt-proxy/APKBUILD | 64 ++++++-------- > .../dnscrypt-proxy/config-full-paths.patch | 86 +++++++++++++++++++ > community/dnscrypt-proxy/dnscrypt-proxy.confd | 2 +- > community/dnscrypt-proxy/dnscrypt-proxy.initd | 4 +- > .../dnscrypt-proxy.post-install | 2 + > 5 files changed, 116 insertions(+), 42 deletions(-) > create mode 100644 community/dnscrypt-proxy/config-full-paths.patch > create mode 100644 community/dnscrypt-proxy/dnscrypt-proxy.post-install > > diff --git a/community/dnscrypt-proxy/APKBUILD b/community/dnscrypt-proxy/ > APKBUILD > index 7f375af8..bf60f917 100644 > --- a/community/dnscrypt-proxy/APKBUILD > +++ b/community/dnscrypt-proxy/APKBUILD > @@ -2,71 +2,57 @@ > # Maintainer: Francesco Colista > pkgname=dnscrypt-proxy > pkgver=2.0.9b2 > -pkgrel=2 > +pkgrel=3 > pkgdesc="A tool for securing communications between a client and a DNS > resolver" > url="https://dnscrypt.info" > arch="all" > -license="custom" > -makedepends="$depends_dev libsodium-dev ldns-dev go" > -install="$pkgname.pre-install" > -options="!check" #upstream does not provide check/test > +license="ISC" > +depends="libcap" > +makedepends="go" > +install="$pkgname.pre-install $pkgname.post-install" > pkgusers=dnscrypt > pkggroups=dnscrypt > -subpackages="$pkgname-doc $pkgname-setup::noarch" > -source="$pkgname-$pkgver.tar.gz::https://github.com/ > jedisct1/$pkgname/archive/$pkgver.tar.gz > +subpackages="$pkgname-setup::noarch" > +source="${pkgname}-${pkgver}.tar.gz::https://github.com/ > jedisct1/${pkgname}/archive/${pkgver}.tar.gz > $pkgname.initd > $pkgname.confd > $pkgname.setup > + config-full-paths.patch > " > -builddir="$srcdir"/$pkgname-$pkgver > +options="!check" > > prepare() { > - default_prepare > cd "$builddir" > - export GOPATH=$(pwd) > - ln -sfv vendor src > + ln -sf vendor src > + default_prepare > } > > build() { > - cd "$builddir"/$pkgname > - go build -ldflags="-s -w" -v > + cd "$builddir"/"$pkgname" > + GOPATH="$builddir" go build -ldflags="-s -w" -v > } > > package() { > cd "$builddir"/$pkgname > + mkdir -p "$pkgdir"/etc/$pkgname > mkdir -p "$pkgdir"/var/log/$pkgname > - mkdir -p "$pkgdir"/var/run/$pkgname > - mkdir -p "$pkgdir"/var/empty > - mkdir -p $pkgdir/usr/share/licenses/$pkgname > - install -m755 -D "$srcdir"/$pkgname.initd > "$pkgdir"/etc/init.d/$pkgname > + mkdir -p "$pkgdir"/usr/share/$pkgname > + install -m755 -D dnscrypt-proxy "$pkgdir"/usr/bin/dnscrypt-proxy > + install -m644 -D example-dnscrypt-proxy.toml > "$pkgdir"/etc/$pkgname/dnscrypt-proxy.toml > + install -m755 -D "$srcdir"/$pkgname.initd > "$pkgdir"/etc/init.d/$pkgname > install -m644 -D "$srcdir"/$pkgname.confd > "$pkgdir"/etc/conf.d/$pkgname > - install -m755 -D $pkgname "$pkgdir"/usr/bin/$pkgname > - install -vDm 644 "example-${pkgname}.toml" \ > - "${pkgdir}/etc/${pkgname}/${pkgname}.toml" > - install -vDm 644 "example-blacklist.txt" \ > - "${pkgdir}/etc/${pkgname}/example-blacklist.txt" > - install -vDm 644 "example-cloaking-rules.txt" \ > - "${pkgdir}/etc/${pkgname}/example-cloaking-rules.txt" > - install -vDm 644 "example-forwarding-rules.txt" \ > - "${pkgdir}/etc/${pkgname}/example-forwarding-rules.txt" > - install -vDm 644 "example-whitelist.txt" \ > - "${pkgdir}/etc/${pkgname}/example-whitelist.txt" > chown dnscrypt "$pkgdir"/var/log/$pkgname > - chown dnscrypt "$pkgdir"/var/run/$pkgname > - chown dnscrypt "$pkgdir"/var/empty > - chown dnscrypt "$pkgdir"/etc/$pkgname > - install -m 644 ../LICENSE $pkgdir/usr/share/licenses/$pkgname > + for i in example-*; do install -m644 -D "$i" > "$pkgdir"/usr/share/$pkgname/"$i"; done > } > > setup() { > - pkgdesc="Script for setting up DNSCrypt Proxy" > + pkgdesc="Script for setting up dnscrypt-proxy" > depends="sed wget $pkgname" > - > - mkdir -p "$subpkgdir"/sbin > - install -m755 -D "$srcdir"/$pkgname.setup "$subpkgdir"/sbin/setup- > dnscrypt > + install -m755 -D "$srcdir"/$pkgname.setup > "$subpkgdir"/usr/sbin/setup-dnscrypt > } > > sha512sums="d64cc8e0b61e1e548b63531dc4c733af1605ccda89a9f905227e97cb966a > 3488104ac9af229521909ca88bde283dce224e712326b4d1717af70be2d04821c6c2 > dnscrypt-proxy-2.0.9b2.tar.gz > -c38095ee38054fb0d3b51c002b5038cb073b8b9ec0ababf975e70d27e4c1 > bd90c0c3f846863e052f30ff2ac6d4ce84c5d4192ebae0eebfa013eb08edf840f8bf > dnscrypt-proxy.initd > -44a2d792aa80a048ea6bdb4a79c1e436bcad3610a28a963ebed5c0e77a8b > 2a733c45311a66268fc4026d1c4c9b1f222813aeeea9c619832bbcb7c227542b65a8 > dnscrypt-proxy.confd > -66dd43d84117a0151ae41f34d82b716760382a5a491424bf6418228ffd21 > f0dfbc88e34cc5074e11f97f006335d97b85367bb9ab1d96747a48e893c022ad52d0 > dnscrypt-proxy.setup" > +b4913fada4172a12521d1beb731cc63e12fd45380a3973bedcefff394b24 > 4401c15ec74108b5e18c0aa34f0803b4e5abe90d33c1342b32bb9137aa598a7daf4a > dnscrypt-proxy.initd > +c001ae39da1b2db71764cab568f9ed18e4de0cea3d1a4e7bd6dd01a5668b > 81a888ea9eef99de6beac08857ad7f8eb1a32d730e946ac3563e4dcfa27147e35052 > dnscrypt-proxy.confd > +66dd43d84117a0151ae41f34d82b716760382a5a491424bf6418228ffd21 > f0dfbc88e34cc5074e11f97f006335d97b85367bb9ab1d96747a48e893c022ad52d0 > dnscrypt-proxy.setup > +898d71dfba3d2af78ee5b26455073cc6d6ecd4ae2bb08b6f04537e9f3098 > 9da5053f364dc504a5c2f78e3da3b27b6f92ef301ed860abd4aa23b062043d317b64 > config-full-paths.patch" > diff --git a/community/dnscrypt-proxy/config-full-paths.patch > b/community/dnscrypt-proxy/config-full-paths.patch > new file mode 100644 > index 00000000..5e22153f > --- /dev/null > +++ b/community/dnscrypt-proxy/config-full-paths.patch > @@ -0,0 +1,86 @@ > +--- a/dnscrypt-proxy/example-dnscrypt-proxy.toml > ++++ b/dnscrypt-proxy/example-dnscrypt-proxy.toml > +@@ -96,7 +96,7 @@ > + > + ## log file for the application > + > +-# log_file = 'dnscrypt-proxy.log' > ++ log_file = '/var/log/dnscrypt-proxy/dnscrypt-proxy.log' > + > + > + ## Use the system logger (syslog on Unix, Event Log on Windows) > +@@ -255,7 +255,7 @@ > + > + ## Path to the query log file (absolute, or relative to the same > directory as the executable file) > + > +- # file = 'query.log' > ++ # file = '/var/log/dnscrypt-proxy/query.log' > + > + > + ## Query log format (currently supported: tsv and ltsv) > +@@ -281,7 +281,7 @@ > + > + ## Path to the query log file (absolute, or relative to the same > directory as the executable file) > + > +- # file = 'nx.log' > ++ # file = '/var/log/dnscrypt-proxy/nx.log' > + > + > + ## Query log format (currently supported: tsv and ltsv) > +@@ -311,12 +311,12 @@ > + > + ## Path to the file of blocking rules (absolute, or relative to the > same directory as the executable file) > + > +- # blacklist_file = 'blacklist.txt' > ++ # blacklist_file = '/etc/dnscrypt-proxy/blacklist.txt' > + > + > + ## Optional path to a file logging blocked queries > + > +- # log_file = 'blocked.log' > ++ # log_file = '/var/log/dnscrypt-proxy/blocked.log' > + > + > + ## Optional log format: tsv or ltsv (default: tsv) > +@@ -344,7 +344,7 @@ > + > + ## Optional path to a file logging blocked queries > + > +- # log_file = 'ip-blocked.log' > ++ # log_file = '/var/log/dnscrypt-proxy/ip-blocked.log' > + > + > + ## Optional log format: tsv or ltsv (default: tsv) > +@@ -367,12 +367,12 @@ > + > + ## Path to the file of whitelisting rules (absolute, or relative to > the same directory as the executable file) > + > +- # whitelist_file = 'whitelist.txt' > ++ # whitelist_file = '/etc/dnscrypt-proxy/whitelist.txt' > + > + > + ## Optional path to a file logging whitelisted queries > + > +- # log_file = 'whitelisted.log' > ++ # log_file = '/var/log/dnscrypt-proxy/whitelisted.log' > + > + > + ## Optional log format: tsv or ltsv (default: tsv) > +@@ -442,7 +442,7 @@ > + > + [sources.'public-resolvers'] > + urls = ['https://raw.githubusercontent.com/ > DNSCrypt/dnscrypt-resolvers/master/v2/public-resolvers.md', ' > https://download.dnscrypt.info/resolvers-list/v2/public-resolvers.md'] > +- cache_file = 'public-resolvers.md' > ++ cache_file = '/var/cache/dnscrypt-proxy/public-resolvers.md' > + minisign_key = 'RWQf6LRCGA9i53mlYecO4IzT51TGPp > vWucNSCh1CBM0QTaLn73Y7GFO3' > + refresh_delay = 72 > + prefix = '' > +@@ -452,7 +452,7 @@ > + > + # [sources.'parental-control'] > + # urls = ['https://raw.githubusercontent.com/ > DNSCrypt/dnscrypt-resolvers/master/v2/parental-control.md', ' > https://download.dnscrypt.info/resolvers-list/v2/parental-control.md'] > +- # cache_file = 'parental-control.md' > ++ # cache_file = '/var/cache/dnscrypt-proxy/parental-control.md' > + # minisign_key = 'RWQf6LRCGA9i53mlYecO4IzT51TGPp > vWucNSCh1CBM0QTaLn73Y7GFO3' > + > + > diff --git a/community/dnscrypt-proxy/dnscrypt-proxy.confd > b/community/dnscrypt-proxy/dnscrypt-proxy.confd > index 070ba95d..a1dc6a69 100644 > --- a/community/dnscrypt-proxy/dnscrypt-proxy.confd > +++ b/community/dnscrypt-proxy/dnscrypt-proxy.confd > @@ -1,4 +1,4 @@ > -#DNSCRYPT_OPTS="--config /etc/dnscrypt-proxy/dnscrypt-proxy.toml" > +#DNSCRYPT_OPTS="-config /etc/dnscrypt-proxy/dnscrypt-proxy.toml" > #DNSCRYPT_USER="dnscrypt" > #DNSCRYPT_GROUP="dnscrypt" > > diff --git a/community/dnscrypt-proxy/dnscrypt-proxy.initd > b/community/dnscrypt-proxy/dnscrypt-proxy.initd > index e24085f1..c52ba746 100644 > --- a/community/dnscrypt-proxy/dnscrypt-proxy.initd > +++ b/community/dnscrypt-proxy/dnscrypt-proxy.initd > @@ -3,9 +3,9 @@ > # Distributed under the terms of the GNU General Public License v2 > > command="/usr/bin/dnscrypt-proxy" > -command_args="${DNSCRYPT_OPTS:---config /etc/dnscrypt-proxy/dnscrypt- > proxy.toml}" > +command_args="${DNSCRYPT_OPTS:--config /etc/dnscrypt-proxy/dnscrypt- > proxy.toml}" > command_user="${DNSCRYPT_USER:-dnscrypt}:${DNSCRYPT_GROUP:-dnscrypt}" > -pidfile="/run/dnscrypt-proxy/${SVCNAME}.pid" > +pidfile="/run/${SVCNAME}.pid" > start_stop_daemon_args="--background --make-pidfile" > > depend() { > diff --git a/community/dnscrypt-proxy/dnscrypt-proxy.post-install > b/community/dnscrypt-proxy/dnscrypt-proxy.post-install > new file mode 100644 > index 00000000..7a7f4af3 > --- /dev/null > +++ b/community/dnscrypt-proxy/dnscrypt-proxy.post-install > @@ -0,0 +1,2 @@ > +#!/bin/sh > +/usr/sbin/setcap cap_net_bind_service=+pe /usr/bin/dnscrypt-proxy > -- > 2.17.0 > > > > --- > Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org > Help: alpine-aports+help@lists.alpinelinux.org > --- > > --000000000000008a30057131d810 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

not sure if it's sti= ll needed, but needs be rebased against latest version.

Thanks

On Thu, Apr 12, 2018 at 1:36 PM, Taner Tas <= ;taner76@gmail.com> wrote:
* To able to bind on= port 53, capabilities of binary file has to be changed via post-install sc= ript
* Clarify license (ISC), thus removed -doc subpackage
* Dynamically fetched server list file moved to /var/cache instead of /etc<= br> * Example configuration files moved to /usr/share instead of /etc
* Configuration file patch added to ensure logs to be stored in /var/log ---
=C2=A0community/dnscrypt-proxy/APKBUILD=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0| 64 ++++++--------
=C2=A0.../dnscrypt-proxy/config-full-paths.patch=C2=A0 =C2=A0 | 86 +++= ++++++++++++++++
=C2=A0community/dnscrypt-proxy/dnscrypt-proxy.confd |=C2=A0 2 +-
=C2=A0community/dnscrypt-proxy/dnscrypt-proxy.initd |=C2=A0 4 +-
=C2=A0.../dnscrypt-proxy.post-install=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 2 +
=C2=A05 files changed, 116 insertions(+), 42 deletions(-)
=C2=A0create mode 100644 community/dnscrypt-proxy/config-full-paths.pa= tch
=C2=A0create mode 100644 community/dnscrypt-proxy/dnscrypt-proxy.post-= install

diff --git a/community/dnscrypt-proxy/APKBUILD b/community/dnscrypt-pr= oxy/APKBUILD
index 7f375af8..bf60f917 100644
--- a/community/dnscrypt-proxy/APKBUILD
+++ b/community/dnscrypt-proxy/APKBUILD
@@ -2,71 +2,57 @@
=C2=A0# Maintainer: Francesco Colista <
fcolista@alpinelinux.org>
=C2=A0pkgname=3Ddnscrypt-proxy
=C2=A0pkgver=3D2.0.9b2
-pkgrel=3D2
+pkgrel=3D3
=C2=A0pkgdesc=3D"A tool for securing communications between a client a= nd a DNS resolver"
=C2=A0url=3D"https://dnscrypt.info"
=C2=A0arch=3D"all"
-license=3D"custom"
-makedepends=3D"$depends_dev libsodium-dev ldns-dev go"
-install=3D"$pkgname.pre-install"
-options=3D"!check" #upstream does not provide check/test
+license=3D"ISC"
+depends=3D"libcap"
+makedepends=3D"go"
+install=3D"$pkgname.pre-install $pkgname.post-install"
=C2=A0pkgusers=3Ddnscrypt
=C2=A0pkggroups=3Ddnscrypt
-subpackages=3D"$pkgname-doc $pkgname-setup::noarch"
-source=3D"$pkgname-$pkgver.tar.gz::https://github.com/jedisct1/$pkgname/archive/$pkgver.tar.gz<= /a>
+subpackages=3D"$pkgname-setup::noarch"
+source=3D"${pkgname}-${pkgver}.tar.gz::
https://github.com/jedisct1/${pkgname}/archive/${pkg= ver}.tar.gz
=C2=A0 =C2=A0 =C2=A0 =C2=A0 $pkgname.initd
=C2=A0 =C2=A0 =C2=A0 =C2=A0 $pkgname.confd
=C2=A0 =C2=A0 =C2=A0 =C2=A0 $pkgname.setup
+=C2=A0 =C2=A0 =C2=A0 =C2=A0config-full-paths.patch
=C2=A0 =C2=A0 =C2=A0 =C2=A0 "
-builddir=3D"$srcdir"/$pkgname-$pkgver
+options=3D"!check"

=C2=A0prepare() {
-=C2=A0 =C2=A0 =C2=A0 =C2=A0default_prepare
=C2=A0 =C2=A0 =C2=A0 =C2=A0 cd "$builddir"
-=C2=A0 =C2=A0 =C2=A0 =C2=A0export GOPATH=3D$(pwd)
-=C2=A0 =C2=A0 =C2=A0 =C2=A0ln -sfv vendor src
+=C2=A0 =C2=A0 =C2=A0 =C2=A0ln -sf vendor src
+=C2=A0 =C2=A0 =C2=A0 =C2=A0default_prepare
=C2=A0}

=C2=A0build() {
-=C2=A0 =C2=A0 =C2=A0 =C2=A0cd "$builddir"/$pkgname
-=C2=A0 =C2=A0 =C2=A0 =C2=A0go build -ldflags=3D"-s -w" -v
+=C2=A0 =C2=A0 =C2=A0 =C2=A0cd "$builddir"/"$pkgname" +=C2=A0 =C2=A0 =C2=A0 =C2=A0GOPATH=3D"$builddir" go build -ldflag= s=3D"-s -w" -v
=C2=A0}

=C2=A0package() {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 cd "$builddir"/$pkgname
+=C2=A0 =C2=A0 =C2=A0 =C2=A0mkdir -p "$pkgdir"/etc/$pkgname
=C2=A0 =C2=A0 =C2=A0 =C2=A0 mkdir -p "$pkgdir"/var/log/$pkgname -=C2=A0 =C2=A0 =C2=A0 =C2=A0mkdir -p "$pkgdir"/var/run/$pkgname -=C2=A0 =C2=A0 =C2=A0 =C2=A0mkdir -p "$pkgdir"/var/empty
-=C2=A0 =C2=A0 =C2=A0 =C2=A0mkdir -p $pkgdir/usr/share/licenses/$pkgna= me
-=C2=A0 =C2=A0 install -m755 -D "$srcdir"/$pkgname.initd "$p= kgdir"/etc/init.d/$pkgname
+=C2=A0 =C2=A0 =C2=A0 =C2=A0mkdir -p "$pkgdir"/usr/share/$pkgname=
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 install -m755 -D dnscrypt-proxy "$pkgdir&= quot;/usr/bin/dnscrypt-proxy
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 install -m644 -D example-dnscrypt-proxy.toml &= quot;$pkgdir"/etc/$pkgname/dnscrypt-proxy.toml
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 install -m755 -D "$srcdir"/$pkgname.= initd "$pkgdir"/etc/init.d/$pkgname
=C2=A0 =C2=A0 =C2=A0 =C2=A0 install -m644 -D "$srcdir"/$pkgname.c= onfd "$pkgdir"/etc/conf.d/$pkgname
-=C2=A0 =C2=A0 =C2=A0 =C2=A0install -m755 -D $pkgname "$pkgdir"/u= sr/bin/$pkgname
-=C2=A0 =C2=A0 =C2=A0 =C2=A0install -vDm 644 "example-${pkgname}.toml&= quot; \
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"${pkgdir}/etc= /${pkgname}/${pkgname}.toml"
-=C2=A0 =C2=A0 =C2=A0 =C2=A0install -vDm 644 "example-blacklist.txt&qu= ot; \
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"${pkgdir}/etc= /${pkgname}/example-blacklist.txt"
-=C2=A0 =C2=A0 =C2=A0 =C2=A0install -vDm 644 "example-cloaking-rules.t= xt" \
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"${pkgdir}/etc= /${pkgname}/example-cloaking-rules.txt"
-=C2=A0 =C2=A0 =C2=A0 =C2=A0install -vDm 644 "example-forwarding-rules= .txt" \
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"${pkgdir}/etc= /${pkgname}/example-forwarding-rules.txt"
-=C2=A0 =C2=A0 =C2=A0 =C2=A0install -vDm 644 "example-whitelist.txt&qu= ot; \
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"${pkgdir}/etc= /${pkgname}/example-whitelist.txt"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 chown dnscrypt "$pkgdir"/var/log/$pkg= name
-=C2=A0 =C2=A0 =C2=A0 =C2=A0chown dnscrypt "$pkgdir"/var/run/$pkg= name
-=C2=A0 =C2=A0 =C2=A0 =C2=A0chown dnscrypt "$pkgdir"/var/empty -=C2=A0 =C2=A0 =C2=A0 =C2=A0chown dnscrypt "$pkgdir"/etc/$pkgname=
-=C2=A0 =C2=A0 =C2=A0 =C2=A0install -m 644 ../LICENSE $pkgdir/usr/share/lic= enses/$pkgname
+=C2=A0 =C2=A0 =C2=A0 =C2=A0for i in example-*; do install -m644 -D "$= i" "$pkgdir"/usr/share/$pkgname/"$i"; done =C2=A0}

=C2=A0setup() {
-=C2=A0 =C2=A0 =C2=A0 =C2=A0pkgdesc=3D"Script for setting up DNSCrypt = Proxy"
+=C2=A0 =C2=A0 =C2=A0 =C2=A0pkgdesc=3D"Script for setting up dnscrypt-= proxy"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 depends=3D"sed wget $pkgname"
-
-=C2=A0 =C2=A0 =C2=A0 =C2=A0mkdir -p "$subpkgdir"/sbin
-=C2=A0 =C2=A0 =C2=A0 =C2=A0install -m755 -D "$srcdir"/$pkgname.s= etup "$subpkgdir"/sbin/setup-dnscrypt
+=C2=A0 =C2=A0 =C2=A0 =C2=A0install -m755 -D "$srcdir"/$pkgname.s= etup "$subpkgdir"/usr/sbin/setup-dnscrypt
=C2=A0}

=C2=A0sha512sums=3D"d64cc8e0b61e1e548b63531dc4c733af1605ccda= 89a9f905227e97cb966a3488104ac9af229521909ca88bde283dce224e712326b= 4d1717af70be2d04821c6c2=C2=A0 dnscrypt-proxy-2.0.9b2.tar.gz
-c38095ee38054fb0d3b51c002b5038cb073b8b9ec0ababf975e70d27e4c1bd90c0c3f846863e052f30ff2ac6d4ce84c5d4192ebae0eebfa013eb08edf840= f8bf=C2=A0 dnscrypt-proxy.initd
-44a2d792aa80a048ea6bdb4a79c1e436bcad3610a28a963ebed5c0e77a8b2a733c45311a66268fc4026d1c4c9b1f222813aeeea9c619832bbcb7c227542b= 65a8=C2=A0 dnscrypt-proxy.confd
-66dd43d84117a0151ae41f34d82b716760382a5a491424bf6418228ffd21f0dfbc88e34cc5074e11f97f006335d97b85367bb9ab1d96747a48e893c022ad= 52d0=C2=A0 dnscrypt-proxy.setup"
+b4913fada4172a12521d1beb731cc63e12fd45380a3973bedcefff394b244401c15ec74108b5e18c0aa34f0803b4e5abe90d33c1342b32bb9137aa598a7d= af4a=C2=A0 dnscrypt-proxy.initd
+c001ae39da1b2db71764cab568f9ed18e4de0cea3d1a4e7bd6dd01a5668b81a888ea9eef99de6beac08857ad7f8eb1a32d730e946ac3563e4dcfa27147e3= 5052=C2=A0 dnscrypt-proxy.confd
+66dd43d84117a0151ae41f34d82b716760382a5a491424bf6418228ffd21f0dfbc88e34cc5074e11f97f006335d97b85367bb9ab1d96747a48e893c022ad= 52d0=C2=A0 dnscrypt-proxy.setup
+898d71dfba3d2af78ee5b26455073cc6d6ecd4ae2bb08b6f04537e9f30989da5053f364dc504a5c2f78e3da3b27b6f92ef301ed860abd4aa23b062043d31= 7b64=C2=A0 config-full-paths.patch"
diff --git a/community/dnscrypt-proxy/config-full-paths.patch b/commun= ity/dnscrypt-proxy/config-full-paths.patch
new file mode 100644
index 00000000..5e22153f
--- /dev/null
+++ b/community/dnscrypt-proxy/config-full-paths.patch
@@ -0,0 +1,86 @@
+--- a/dnscrypt-proxy/example-dnscrypt-proxy.toml
++++ b/dnscrypt-proxy/example-dnscrypt-proxy.toml
+@@ -96,7 +96,7 @@
+
+ ## log file for the application
+
+-# log_file =3D 'dnscrypt-proxy.log'
++ log_file =3D '/var/log/dnscrypt-proxy/dnscrypt-proxy.log' +
+
+ ## Use the system logger (syslog on Unix, Event Log on Windows)
+@@ -255,7 +255,7 @@
+
+=C2=A0 =C2=A0## Path to the query log file (absolute, or relative to the s= ame directory as the executable file)
+
+-=C2=A0 # file =3D 'query.log'
++=C2=A0 # file =3D '/var/log/dnscrypt-proxy/query.log'
+
+
+=C2=A0 =C2=A0## Query log format (currently supported: tsv and ltsv)
+@@ -281,7 +281,7 @@
+
+=C2=A0 =C2=A0## Path to the query log file (absolute, or relative to the s= ame directory as the executable file)
+
+-=C2=A0 # file =3D 'nx.log'
++=C2=A0 # file =3D '/var/log/dnscrypt-proxy/nx.log'
+
+
+=C2=A0 =C2=A0## Query log format (currently supported: tsv and ltsv)
+@@ -311,12 +311,12 @@
+
+=C2=A0 =C2=A0## Path to the file of blocking rules (absolute, or relative = to the same directory as the executable file)
+
+-=C2=A0 # blacklist_file =3D 'blacklist.txt'
++=C2=A0 # blacklist_file =3D '/etc/dnscrypt-proxy/blacklist.txt&#= 39;
+
+
+=C2=A0 =C2=A0## Optional path to a file logging blocked queries
+
+-=C2=A0 # log_file =3D 'blocked.log'
++=C2=A0 # log_file =3D '/var/log/dnscrypt-proxy/blocked.log'<= br> +
+
+=C2=A0 =C2=A0## Optional log format: tsv or ltsv (default: tsv)
+@@ -344,7 +344,7 @@
+
+=C2=A0 =C2=A0## Optional path to a file logging blocked queries
+
+-=C2=A0 # log_file =3D 'ip-blocked.log'
++=C2=A0 # log_file =3D '/var/log/dnscrypt-proxy/ip-blocked.log= 9;
+
+
+=C2=A0 =C2=A0## Optional log format: tsv or ltsv (default: tsv)
+@@ -367,12 +367,12 @@
+
+=C2=A0 =C2=A0## Path to the file of whitelisting rules (absolute, or relat= ive to the same directory as the executable file)
+
+-=C2=A0 # whitelist_file =3D 'whitelist.txt'
++=C2=A0 # whitelist_file =3D '/etc/dnscrypt-proxy/whitelist.txt&#= 39;
+
+
+=C2=A0 =C2=A0## Optional path to a file logging whitelisted queries
+
+-=C2=A0 # log_file =3D 'whitelisted.log'
++=C2=A0 # log_file =3D '/var/log/dnscrypt-proxy/whitelisted.log&#= 39;
+
+
+=C2=A0 =C2=A0## Optional log format: tsv or ltsv (default: tsv)
+@@ -442,7 +442,7 @@
+
+=C2=A0 =C2=A0[sources.'public-resolvers']
+=C2=A0 =C2=A0urls =3D ['https://raw.githubusercontent.com/DNSCrypt/dn= scrypt-resolvers/master/v2/public-resolvers.md', 'https://download.dnscrypt.info= /resolvers-list/v2/public-resolvers.md']
+-=C2=A0 cache_file =3D 'public-resolvers.md'
++=C2=A0 cache_file =3D '/var/cache/dnscrypt-proxy/public-resolver= s.md'
+=C2=A0 =C2=A0minisign_key =3D 'RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3'
+=C2=A0 =C2=A0refresh_delay =3D 72
+=C2=A0 =C2=A0prefix =3D ''
+@@ -452,7 +452,7 @@
+
+=C2=A0 =C2=A0#=C2=A0 [sources.'parental-control']
+=C2=A0 =C2=A0#=C2=A0 urls =3D ['https://raw.githubusercontent.com/DNS= Crypt/dnscrypt-resolvers/master/v2/parental-control.md', = 'https://download.dnscrypt.<= wbr>info/resolvers-list/v2/parental-control.md']
+-=C2=A0 #=C2=A0 cache_file =3D 'parental-control.md'
++=C2=A0 #=C2=A0 cache_file =3D '/var/cache/dnscrypt-proxy/parenta= l-control.md'
+=C2=A0 =C2=A0#=C2=A0 minisign_key =3D 'RWQf6LRCGA9i53mlYecO4IzT51= TGPpvWucNSCh1CBM0QTaLn73Y7GFO3'
+
+
diff --git a/community/dnscrypt-proxy/dnscrypt-proxy.confd b/community= /dnscrypt-proxy/dnscrypt-proxy.confd
index 070ba95d..a1dc6a69 100644
--- a/community/dnscrypt-proxy/dnscrypt-proxy.confd
+++ b/community/dnscrypt-proxy/dnscrypt-proxy.confd
@@ -1,4 +1,4 @@
-#DNSCRYPT_OPTS=3D"--config /etc/dnscrypt-proxy/dnscrypt-proxy.to= ml"
+#DNSCRYPT_OPTS=3D"-config /etc/dnscrypt-proxy/dnscrypt-proxy.tom= l"
=C2=A0#DNSCRYPT_USER=3D"dnscrypt"
=C2=A0#DNSCRYPT_GROUP=3D"dnscrypt"

diff --git a/community/dnscrypt-proxy/dnscrypt-proxy.initd b/community= /dnscrypt-proxy/dnscrypt-proxy.initd
index e24085f1..c52ba746 100644
--- a/community/dnscrypt-proxy/dnscrypt-proxy.initd
+++ b/community/dnscrypt-proxy/dnscrypt-proxy.initd
@@ -3,9 +3,9 @@
=C2=A0# Distributed under the terms of the GNU General Public License v2
=C2=A0command=3D"/usr/bin/dnscrypt-proxy"
-command_args=3D"${DNSCRYPT_OPTS:---config /etc/dnscrypt-proxy/dn= scrypt-proxy.toml}"
+command_args=3D"${DNSCRYPT_OPTS:--config /etc/dnscrypt-proxy/dns= crypt-proxy.toml}"
=C2=A0command_user=3D"${DNSCRYPT_USER:-dnscrypt}:${DNSCRYPT_GROUP= :-dnscrypt}"
-pidfile=3D"/run/dnscrypt-proxy/${SVCNAME}.pid"
+pidfile=3D"/run/${SVCNAME}.pid"
=C2=A0start_stop_daemon_args=3D"--background --make-pidfile"=

=C2=A0depend() {
diff --git a/community/dnscrypt-proxy/dnscrypt-proxy.post-install b/co= mmunity/dnscrypt-proxy/dnscrypt-proxy.post-install
new file mode 100644
index 00000000..7a7f4af3
--- /dev/null
+++ b/community/dnscrypt-proxy/dnscrypt-proxy.post-install
@@ -0,0 +1,2 @@
+#!/bin/sh
+/usr/sbin/setcap cap_net_bind_service=3D+pe /usr/bin/dnscrypt-proxy
--
2.17.0



---
Unsubscribe:=C2=A0 alpine-aports+unsubscribe@lists.alpinelinux.org
Help:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0alpine-aports+help@lists.alpinelinux.org=
---


--000000000000008a30057131d810-- --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---