# Generated by go2rpm 1 %bcond_without check %define gobuild(o:) %{expand: # https://bugzilla.redhat.com/show_bug.cgi?id=995136#c12 %global _dwz_low_mem_die_limit 0 %ifnarch ppc64 go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-}%{?currentgoldflags} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags %{?__golang_extldflags}' -compressdwarf=false" -a -v -x %{?**}; %else go build -compiler gc -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-}%{?currentgoldflags} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags %{?__golang_extldflags}' -compressdwarf=false" -a -v -x %{?**}; %endif } # https://github.com/jedisct1/dnscrypt-proxy %global goipath github.com/jedisct1/dnscrypt-proxy Version: 2.1.1 %global tag 2.1.1 %global common_description %{expand: A flexible DNS proxy, with support for modern encrypted DNS protocols such as DNSCrypt v2 and DNS-over-HTTP/2. Features: - DNS traffic encryption and authentication. Supports DNS-over-HTTPS (DoH) and DNSCrypt. - DNSSEC compatible - DNS query monitoring, with separate log files for regular and suspicious queries - Pattern-based local blocking of DNS names and IP addresses - Time-based filtering, with a flexible weekly schedule - Transparent redirection of specific domains to specific resolvers - DNS caching, to reduce latency and improve privacy - Local IPv6 blocking to reduce latency on IPv4-only networks - Load balancing: pick a set of resolvers, dnscrypt-proxy will automatically measure and keep track of their speed, and balance the traffic across the fastest available ones. - Cloaking: like a HOSTS file on steroids, that can return preconfigured addresses for specific names, or resolve and return the IP address of other names. This can be used for local development as well as to enforce safe search results on Google, Yahoo and Bing. - Automatic background updates of resolvers lists - Can force outgoing connections to use TCP; useful with tunnels such as Tor.} Name: dnscrypt-proxy Release: 1%{?dist} Summary: Flexible DNS proxy, with support for encrypted DNS protocols License: ISC URL: https://github.com/jedisct1/dnscrypt-proxy Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz # Largely inspired by Arch packaging Patch0: dnscrypt-proxy-2.1.1-custom_config.patch # e.g. el6 has ppc64 arch without gcc-go, so EA tag is required ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 aarch64 %{arm}} # If go_compiler is not set to 1, there is no virtual provide. Use golang instead. BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang} %description %{common_description} %prep %autosetup -p1 -n %{name}-%{version} %build export GO111MODULE=on export GOFLAGS=-mod=vendor ln -s $(pwd) vendor/github.com/jedisct1/dnscrypt-proxy %gobuild -o _bin/dnscrypt-proxy %{goipath}/dnscrypt-proxy %install install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp _bin/dnscrypt-proxy %{buildroot}%{_bindir}/ install -Dpm 0644 dnscrypt-proxy/example-dnscrypt-proxy.toml %{buildroot}%{_sysconfdir}/%{name}/dnscrypt-proxy.toml install -Dpm 0644 dnscrypt-proxy/example-allowed-ips.txt %{buildroot}%{_sysconfdir}/%{name}/allowed-ips.txt install -Dpm 0644 dnscrypt-proxy/example-allowed-names.txt %{buildroot}%{_sysconfdir}/%{name}/allowed-names.txt install -Dpm 0644 dnscrypt-proxy/example-blocked-ips.txt %{buildroot}%{_sysconfdir}/%{name}/blocked-ips.txt install -Dpm 0644 dnscrypt-proxy/example-blocked-names.txt %{buildroot}%{_sysconfdir}/%{name}/blocked-names.txt install -Dpm 0644 dnscrypt-proxy/example-captive-portals.txt %{buildroot}%{_sysconfdir}/%{name}/captive-portals.txt install -Dpm 0644 dnscrypt-proxy/example-cloaking-rules.txt %{buildroot}%{_sysconfdir}/%{name}/cloaking-rules.txt install -Dpm 0644 dnscrypt-proxy/example-forwarding-rules.txt %{buildroot}%{_sysconfdir}/%{name}/forwarding-rules.txt %post if [ "$1" -le "1" ] ; then # First install dnscrypt-proxy -service install --config %{_sysconfdir}/dnscrypt-proxy/dnscrypt-proxy.toml fi if [ "$1" -ge "2" ] ; then # Remove in F36 rm -rf %{_unitdir}/dnscrypt-proxy.service %{_unitdir}/dnscrypt-proxy.socket fi %preun if [ "$1" -lt "1" ] ; then # Final removal dnscrypt-proxy -service uninstall fi %postun if [ "$1" -ge "1" ] ; then # Upgrade dnscrypt-proxy -service install --config %{_sysconfdir}/dnscrypt-proxy/dnscrypt-proxy.toml fi %files %license LICENSE %doc README.md ChangeLog %doc utils/generate-domains-blocklist/ %{_bindir}/%{name} %dir %{_sysconfdir}/%{name}/ %config(noreplace) %{_sysconfdir}/%{name}/%{name}.toml %config(noreplace) %{_sysconfdir}/%{name}/*.txt %ghost %config(noreplace) %{_sysconfdir}/%{name}/blacklist.txt %ghost %config(noreplace) %{_sysconfdir}/%{name}/whitelist.txt %ghost %{_sysconfdir}/systemd/system/dnscrypt-proxy.service %changelog * Sat Oct 23 2021 Robert-André Mauchin - 2.1.1-1 - Update to 2.1.1 - Close: rhbz#1969330 * Tue Mar 30 18:29:49 CEST 2021 Robert-André Mauchin - 2.0.45-1 - Since version 2.0.45, some of the configuration files have been renamed. Please merge your config to /etc/dnscrypt-proxy/dnscrypt-proxy.toml.rpmnew then replace dnscrypt-proxy.toml with that file. Read /usr/share/doc/dnscrypt-proxy/ChangeLog to know more about this change. - generate-domains-blocklist is now provided in /usr/share/doc/dnscrypt-proxy/ - Fix: rhbz#1943749 - Update to 2.0.45 - Close: rhbz#1912171 * Mon Dec 28 10:46:59 CET 2020 Robert-André Mauchin - 2.0.44-8 - Reorder scriptlets * Mon Dec 28 09:59:16 CET 2020 Robert-André Mauchin - 2.0.44-7 - Install service with link toward correct config file * Mon Dec 28 09:41:32 CET 2020 Robert-André Mauchin - 2.0.44-6 - Force removal of previous service file * Wed Dec 16 13:35:53 CET 2020 Robert-André Mauchin - 2.0.44-4 - Fix config patch * Wed Dec 16 11:26:23 CET 2020 Robert-André Mauchin - 2.0.44-3 - Fallback to recommended installation * Mon Dec 14 07:25:20 CET 2020 Robert-André Mauchin - 2.0.44-2 - Keep config(noreplace) for %{_unitdir}/%{name}.socket * Wed Jun 17 22:28:35 CEST 2020 Robert-André Mauchin - 2.0.44-1 - Release 2.0.44 * Sun Dec 29 18:05:03 CET 2019 Robert-André Mauchin - 2.0.36-2 - Mark socket file as config (#1786867) * Sun Dec 22 23:34:05 CET 2019 Robert-André Mauchin - 2.0.36-1 - Release 2.0.36 (#1784844) * Tue Dec 03 23:16:24 CET 2019 Robert-André Mauchin - 2.0.35-1 - Release 2.0.35 (#1782348) * Tue Dec 03 23:16:24 CET 2019 Robert-André Mauchin - 2.0.34-1 - Release 2.0.34 (#1768912) * Wed Nov 20 19:59:18 CET 2019 Robert-André Mauchin - 2.0.33-1 - Release 2.0.33 * Sun Oct 13 23:39:06 CEST 2019 Robert-André Mauchin - 2.0.28-1 - Release 2.0.28 * Thu Sep 12 15:41:34 CEST 2019 Robert-André Mauchin - 2.0.27-2 - Fix custom config patch * Thu Sep 12 00:14:59 CEST 2019 Robert-André Mauchin - 2.0.27-1 - Release 2.0.27 (#1716575) * Wed Jul 24 2019 Fedora Release Engineering - 2.0.23-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Mon Apr 29 00:37:56 CET 2019 Robert-André Mauchin - 2.0.23-1 - Release 2.0.23 * Mon Apr 01 16:13:44 CET 2019 Robert-André Mauchin - 2.0.22-1 - Release 2.0.22 * Thu Mar 14 2019 Robert-André Mauchin - 2.0.20-1 - Release 2.0.20 * Wed Feb 20 2019 Robert-André Mauchin - 2.0.19-3 - Add a policy for SELinux /var/cache creation - Removed ProtectHome from the SystemD service to use with GNU Stow * Thu Jan 31 2019 Fedora Release Engineering - 2.0.19-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Thu Nov 22 2018 Robert-André Mauchin - 2.0.19-1 - Release 2.0.19 * Thu Nov 15 2018 Robert-André Mauchin - 2.0.18-1 - Release 2.0.18 * Wed Oct 03 2018 Robert-André Mauchin - 2.0.17-1 - Update to 2.0.17 * Mon Aug 13 2018 Robert-André Mauchin - 2.0.16-2 - Add a policy for SELinux DynamicUser failures * Tue Jul 17 2018 Robert-André Mauchin - 2.0.16-1 - Update to 2.0.16 * Thu Jul 12 2018 Fedora Release Engineering - 1.9.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Wed Feb 07 2018 Fedora Release Engineering - 1.9.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Mon Oct 02 2017 Remi Collet - 1.9.0-5 - rebuild for libsodium * Wed Aug 02 2017 Fedora Release Engineering - 1.9.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild * Wed Jul 26 2017 Fedora Release Engineering - 1.9.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Fri Feb 10 2017 Fedora Release Engineering - 1.9.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Sun Jan 01 2017 Nikos Roussos 1.9.0-1 - Update to 1.9.0 * Tue Jul 05 2016 Nikos Roussos 1.6.1-4 - Add systemd support * Mon Jun 06 2016 Nikos Roussos 1.6.1-3 - Fix license * Mon Jun 06 2016 Nikos Roussos 1.6.1-2 - Add hardened flag - Fix obsolete m4 macro * Fri Apr 22 2016 Nikos Roussos 1.6.1-1 - Update to 1.6.1 * Sat Oct 24 2015 Nikos Roussos 1.6.0-1 - Initial package