Date: Wednesday, January 6, 2021 @ 21:07:15
  Author: dvzrv
Revision: 811378

upgpkg: dnscrypt-proxy 2.0.45-1: Upgrade to 2.0.45.

Switch to https://github.com/dnscrypt/dnscrypt-proxy as it is the current 
upstream.
Rebase the FHS patch on 2.0.45.
Change GOFLAGS to achieve full RELRO.
Add current configuration files to backup array.
Do not create any empty configuration files anymore, but rely on upstream 
examples.
Simplify installation of config files.
Fix installation for renamed files.
Add .install entry notifying users of changes to the config files.

Modified:
  dnscrypt-proxy/trunk/PKGBUILD
  dnscrypt-proxy/trunk/dnscrypt-proxy.install

------------------------+
 PKGBUILD               |   54 ++++++++++++++++++++---------------------------
 dnscrypt-proxy.install |    6 +++--
 2 files changed, 27 insertions(+), 33 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2021-01-06 20:10:44 UTC (rev 811377)
+++ PKGBUILD    2021-01-06 21:07:15 UTC (rev 811378)
@@ -4,73 +4,65 @@
 # Contributor: peace4all <markspost at rocketmail dot com>
 
 pkgname=dnscrypt-proxy
-pkgver=2.0.44
+pkgver=2.0.45
 pkgrel=1
-pkgdesc="DNS proxy, supporting encrypted DNS protocols such as DNSCrypt v2 and 
DNS-over-HTTPS"
+pkgdesc="A flexible DNS proxy, with support for encrypted DNS protocols"
 arch=('x86_64')
 url="https://github.com/DNSCrypt/dnscrypt-proxy";
 license=('ISC')
 depends=('glibc')
 makedepends=('git' 'go')
-optdepends=('python-urllib3: for generate-domains-blacklist')
+optdepends=('python-urllib3: for generate-domains-blocklist')
 install="${pkgname}.install"
 backup=("etc/${pkgname}/${pkgname}.toml"
-        "etc/${pkgname}/blacklist.txt"
+        "etc/${pkgname}/allowed-ips.txt"
+        "etc/${pkgname}/allowed-names.txt"
+        "etc/${pkgname}/blocked-ips.txt"
+        "etc/${pkgname}/blocked-names.txt"
         "etc/${pkgname}/cloaking-rules.txt"
         "etc/${pkgname}/forwarding-rules.txt"
-        "etc/${pkgname}/ip-blacklist.txt"
-        "etc/${pkgname}/whitelist.txt"
 )
-source=("git+https://github.com/jedisct1/${pkgname}#tag=${pkgver}?signed";
+source=("git+https://github.com/dnscrypt/${pkgname}#tag=${pkgver}?signed";
         "${pkgname}.service"
         "${pkgname}.socket"
-        
"${pkgname}-${pkgver}-configuration.patch::https://github.com/dvzrv/dnscrypt-proxy/commit/23baf327e249e2577e7e2f8c25b36fc579caa8c9.patch";)
+        
"${pkgname}-${pkgver}-configuration.patch::https://github.com/dvzrv/dnscrypt-proxy/commit/6dc7bcbcaf17bc56bb566f8b3b4fde12abc1d824.patch";)
 sha512sums=('SKIP'
             
'49a9e7ab55e3d5a61017ab2d3a9d8baa503a7737b3b23402d1685f3fda2b59c5e08810bb18be30b2f099da7fa8686ce1bb4052cdd705e9397fd40b663bef3f21'
             
'56a56e87032da9316b392b0613124b0743673041596c717005541ae9b3994c7fc16c02497ea773d321f45d8e0f9ea8fda00783062cef4d5c8277b5b6f7cb10d5'
-            
'b5d5cdd1391670a99f1817dc0a6f8b30300b43a1db49e1e646e09398deac79117036f1eb07f18cfb96a6718e7bddd3cb380acf1c270adce722de97b979d4d5f5')
+            
'980dd07cd68cf4b2ba41460d1946d1c71dc9e8e275556933fbc547961ba92b9e9d2f0409d3e2e97f285c049b1408d84d02a43036421874b6caf7e3be02f1f6c3')
 validpgpkeys=('54A2B8892CC3D6A597B92B6C210627AABA709FE1') # Frank Denis 
(Jedi/Sector One) <p...@pureftpd.org
 
 prepare() {
-  mv -v "${pkgname}" "${pkgname}-${pkgver}"
-  cd "$pkgname-$pkgver"
+  cd "${pkgname}"
   patch -Np1 -i "../${pkgname}-${pkgver}-configuration.patch"
-  # create empty ip-blacklist.txt
-  touch "${pkgname}/ip-blacklist.txt"
 }
 
 build() {
-  cd "$pkgname-$pkgver/${pkgname}"
+  cd "${pkgname}/${pkgname}"
   export CGO_CPPFLAGS="${CPPFLAGS}"
   export CGO_CFLAGS="${CFLAGS}"
   export CGO_CXXFLAGS="${CXXFLAGS}"
   export CGO_LDFLAGS="${LDFLAGS}"
-  export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
+  export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external 
-mod=readonly -modcacherw"
   go build
 }
 
 package() {
-  cd "$pkgname-$pkgver"
+  local _config
+  cd "${pkgname}"
   # executable
   install -vDm 755 "${pkgname}/${pkgname}" -t "${pkgdir}/usr/bin/"
-  # configuration
+  # config files
   install -vDm 644 "${pkgname}/example-${pkgname}.toml" \
     "${pkgdir}/etc/${pkgname}/${pkgname}.toml"
-  install -vDm 644 "${pkgname}/example-blacklist.txt" \
-    "${pkgdir}/etc/${pkgname}/blacklist.txt"
-  install -vDm 644 "${pkgname}/example-cloaking-rules.txt" \
-    "${pkgdir}/etc/${pkgname}/cloaking-rules.txt"
-  install -vDm 644 "${pkgname}/example-forwarding-rules.txt" \
-    "${pkgdir}/etc/${pkgname}/forwarding-rules.txt"
-  install -vDm 644 "${pkgname}/ip-blacklist.txt" \
-    "${pkgdir}/etc/${pkgname}/ip-blacklist.txt"
-  install -vDm 644 "${pkgname}/example-whitelist.txt" \
-    "${pkgdir}/etc/${pkgname}/whitelist.txt"
+  for _config in 
{{allowed,blocked}-{ips,names},{cloaking,forwarding}-rules,captive-portals}.txt;
 do
+    install -vDm 644 "${pkgname}/example-${_config}" 
"${pkgdir}/etc/${pkgname}/${_config}"
+  done
   # utils
-  install -vDm 644 utils/generate-domains-blacklists/*.{conf,txt} \
-    -t "${pkgdir}/usr/share/${pkgname}/utils/generate-domains-blacklists"
-  install -vDm 755 
utils/generate-domains-blacklists/generate-domains-blacklist.py \
-    "${pkgdir}/usr/bin/generate-domains-blacklist"
+  install -vDm 644 utils/generate-domains-blocklist/*.{conf,txt} \
+    -t "${pkgdir}/usr/share/${pkgname}/utils/generate-domains-blocklist"
+  install -vDm 755 
utils/generate-domains-blocklist/generate-domains-blocklist.py \
+    "${pkgdir}/usr/bin/generate-domains-blocklist"
   # systemd service/socket
   install -vDm 644 "../${pkgname}."{service,socket} \
     -t "${pkgdir}/usr/lib/systemd/system/"

Modified: dnscrypt-proxy.install
===================================================================
--- dnscrypt-proxy.install      2021-01-06 20:10:44 UTC (rev 811377)
+++ dnscrypt-proxy.install      2021-01-06 21:07:15 UTC (rev 811378)
@@ -1,7 +1,9 @@
 post_upgrade() {
-  if [ "$(vercmp $2 1.9.5-1)" -le 0 ]
-  then
+  if [ "$(vercmp "$2" '1.9.5-1')" -le 0 ]; then
     echo 'The configuration file(s) and setup of dnscrypt-proxy has changed 
considerably since version 1.x.'
     echo 'Please refer to the new upstream information for help!'
   fi
+  if [ "$(vercmp "$2" '2.0.45-1')" -le 0 ]; then
+    echo 'Some of the configuration files have been renamed. Read 
/usr/share/doc/dnscrypt-proxy/ChangeLog to merge files accordingly.'
+  fi
 }

Reply via email to