diff --git a/01-test_net-disable-udp-send-on-unconnected.patch b/01-test_net-disable-udp-send-on-unconnected.patch deleted file mode 100644 index 07a2f3a..0000000 --- a/01-test_net-disable-udp-send-on-unconnected.patch +++ /dev/null @@ -1,27 +0,0 @@ -commit 44b5e271a8564370efec3b9e95365aa039e0db61 -Author: Tomas Krizek -Date: 2019-02-28 14:26:56 +0100 - - test_net: disable UDP send on unconnected - - This test started to fail with 5.0 kernel in F30+ on aarch64 and s390x. - The functionality isn't used by Knot DNS, so disabling this test until - the issue is resolved should be safe. - - Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1675235 - -diff --git a/tests/contrib/test_net.c b/tests/contrib/test_net.c -index 99a9e3ee3..c8e5e0a25 100644 ---- a/tests/contrib/test_net.c -+++ b/tests/contrib/test_net.c -@@ -310,10 +310,6 @@ static void test_unconnected(void) - r = net_dgram_recv(sock, buffer, buffer_len, TIMEOUT_SHORT); - ok(r == KNOT_ETIMEOUT, "UDP, receive timeout on unconnected socket"); - -- struct sockaddr_storage server_addr = addr_from_socket(server); -- r = net_dgram_send(sock, buffer, buffer_len, &server_addr); -- ok(r == buffer_len, "UDP, send on defined address"); -- - close(sock); - - // TCP diff --git a/gpgkey-742FA4E95829B6C5EAC6B85710BB7AF6FEBBD6AB.gpg.asc b/gpgkey-742FA4E95829B6C5EAC6B85710BB7AF6FEBBD6AB.gpg.asc index 5e7bbef..be2545a 100644 --- a/gpgkey-742FA4E95829B6C5EAC6B85710BB7AF6FEBBD6AB.gpg.asc +++ b/gpgkey-742FA4E95829B6C5EAC6B85710BB7AF6FEBBD6AB.gpg.asc @@ -11,7 +11,19 @@ om9rg89Ih876PA53vUXBB+FWP9QOFDcOfz3nMjCrLbMzhTsAzrNFXxchzLq+66CL qsQQytDVFpLI+X++sKRTOHkq6vV1bAPjlljrannLnn1y/DvkOOkiHOdYyjmR7Dfk vxgcWh/3Gx4J9gipxZITOr7LamEYgHfElY/UWCtc1Vjt8Xvgt4dofDpvSwY9YzgR WxJKC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Z8QAIzWIN8OhaTyyeG451OGeu7+5xnY +muP7jTGlFuP4Q64Vt5WAc54dhILCy2pRImMl/0Mfjq3WOOdqSQViaoJpHFkgjy8z +9MFX/hZqLC57oDmNnI8X/bG/ApGMQD7UoeAH4recf7jmtqRyLUeDd2wOEsSRICty +czH/m43Uct4kShXP2ui1vqAP8p9UtfdImgyNWV91J35SjxSiFvp+YAuNn+jsnDiV +BzYJAlk/rdN1h6E+cDfp/GYaXDjVxLy8bipuEN5icZGMH20tkiVsvPQ5J++AOSre +I830E62IJBKU9kwQa9iSbWxtcnxJmOEVBGN2gJ+2WAd2uA9ZCCJafTXiVe57Icxd +2P5zRqrDn0bAmIyl04NKnVAnthQG+b6hEuuaKhTkj2TvhmXkH84BcAvKC82yNBc1 +zrzxfLI/WPZJrh2IVhXWVhW13Yd6eUmqUk8p0hQ5ZhdL9D6fQJSXxkdiauMJov1C +njR/++NOtERBSk+7hbTb921q/brMZXgJ971u31b0sRoefybbbjHSWjNVSP6ENn44 +eQfS06CUmc7oN18bGhHmlmhK4az9i5eQ4HlUE5K9f4z7yQRTM6XfIpzDrWOfFfaY +vYkcC6CbR8xnb+LOlqwKHzKVwoWGLSreeShqPfazQEjR3V52XdFmyVIrltj7JRxi +tW29kqO09AEalR9l +=t42C -----END PGP PUBLIC KEY BLOCK----- diff --git a/knot.spec b/knot.spec index 1339843..4b79d07 100644 --- a/knot.spec +++ b/knot.spec @@ -2,12 +2,19 @@ %{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}} %define GPG_CHECK 1 -%define VERSION 3.0.0 +%if 0%{?fedora} >= 40 || 0%{?rhel} >= 9 +# use modern %pyproject_* macros on distros which support them +%define PYPROJECT 1 +%else +# use older %py3_* macros on older/other distros +%define PYPROJECT 0 +%endif +%define BASE_VERSION %(echo "%{version}" | sed 's/^\\([^.]\\+\\.[^.]\\+\\).*/\\1/') %define repodir %{_builddir}/%{name}-%{version} Summary: High-performance authoritative DNS server Name: knot -Version: %{VERSION} +Version: 3.5.2 Release: 1%{?dist} License: GPL-3.0-or-later URL: https://www.knot-dns.cz @@ -22,62 +29,85 @@ Source100: gpgkey-742FA4E95829B6C5EAC6B85710BB7AF6FEBBD6AB.gpg.asc BuildRequires: gnupg2 %endif -# Test fails on F30+ aarch/s390x for unknown reason, but it is not neccassary for Knot DNS -Patch1: 01-test_net-disable-udp-send-on-unconnected.patch - # Required dependencies +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: make BuildRequires: gcc BuildRequires: pkgconfig(liburcu) -BuildRequires: pkgconfig(gnutls) >= 3.3 +BuildRequires: pkgconfig(gnutls) BuildRequires: pkgconfig(libedit) # Optional dependencies BuildRequires: pkgconfig(libcap-ng) -BuildRequires: pkgconfig(libfstrm) BuildRequires: pkgconfig(libidn2) -BuildRequires: pkgconfig(libmaxminddb) +BuildRequires: pkgconfig(libmnl) BuildRequires: pkgconfig(libnghttp2) -BuildRequires: pkgconfig(libprotobuf-c) BuildRequires: pkgconfig(libsystemd) BuildRequires: pkgconfig(systemd) +BuildRequires: pkgconfig(hiredis) +%if 0%{?fedora} || 0%{?rhel} +BuildRequires: softhsm +%endif +# dnstap dependencies +BuildRequires: pkgconfig(libfstrm) +BuildRequires: pkgconfig(libprotobuf-c) +# geoip dependencies +BuildRequires: pkgconfig(libmaxminddb) +# XDP dependencies +BuildRequires: pkgconfig(libbpf) +# Python modules (python3-libknot, knot-exporter) dependencies +BuildRequires: python3-devel +%if 0%{?PYPROJECT} +BuildRequires: pyproject-rpm-macros +BuildRequires: python3-pip +BuildRequires: python3-hatchling +%else +BuildRequires: python3-setuptools +%endif # Distro-dependent dependencies %if 0%{?suse_version} BuildRequires: python3-Sphinx BuildRequires: lmdb-devel BuildRequires: protobuf-c -Requires(pre): pwdutils +Requires(pre): pwdutils +%if 0%{?sle_version} != 150400 +BuildRequires: pkgconfig(libxdp) %endif -%if 0%{?rhel} && 0%{?rhel} <= 7 -BuildRequires: python-sphinx -BuildRequires: lmdb-devel %endif -%if 0%{?fedora} || 0%{?rhel} > 7 +%if 0%{?fedora} || 0%{?rhel} BuildRequires: python3-sphinx BuildRequires: pkgconfig(lmdb) +%if 0%{?fedora} || 0%{?rhel} >= 9 +BuildRequires: pkgconfig(libxdp) %endif -%if 0%{?rhel} >= 8 || 0%{?suse_version} -%define configure_xdp --enable-xdp=yes -BuildRequires: pkgconfig(libelf) %endif -%if 0%{?fedora} >= 31 -BuildRequires: pkgconfig(libbpf) >= 0.0.6 + +%if 0%{?rhel} >= 9 || 0%{?suse_version} || 0%{?fedora} +%define configure_quic --enable-quic=yes %endif Requires(post): systemd %{_sbindir}/runuser Requires(preun): systemd Requires(postun): systemd -# Knot DNS 2.7+ isn't compatible with earlier knot-resolver -Conflicts: knot-resolver < 3.0.0 - Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Recommends: %{name}-keymgr + +%if 0%{?suse_version} +Provides: group(knot) +%endif + %description Knot DNS is a high-performance authoritative DNS server implementation. %package libs Summary: Libraries used by the Knot DNS server and client applications +# Knot DNS 3.5+ isn't compatible with earlier knot-resolver +Conflicts: knot-resolver < 5.7.6-3 %description libs The package contains shared libraries used by the Knot DNS server and @@ -94,14 +124,68 @@ included in knot-libs package. %package utils Summary: DNS client utilities shipped with the Knot DNS server Requires: %{name}-libs%{?_isa} = %{version}-%{release} +# Debian package compat +Provides: %{name}-dnsutils = %{version}-%{release} %description utils The package contains DNS client utilities shipped with the Knot DNS server. +%package dnssecutils +Summary: DNSSEC tools shipped with the Knot DNS server +Requires: %{name}-libs%{?_isa} = %{version}-%{release} + +%description dnssecutils +The package contains DNSSEC tools shipped with the Knot DNS server. + +%package keymgr +Summary: Knot DNS key management utility +Requires: %{name}-libs%{?_isa} = %{version}-%{release} + +%description keymgr +The package contains keymgr program for Knot DNS key management. + +%package module-dnstap +Summary: dnstap module for Knot DNS +Requires: %{name} = %{version}-%{release} + +%description module-dnstap +The package contains dnstap Knot DNS module for logging DNS traffic. + +%package module-geoip +Summary: geoip module for Knot DNS +Requires: %{name} = %{version}-%{release} + +%description module-geoip +The package contains geoip Knot DNS module for geography-based responses. + +%package exporter +Summary: Prometheus exporter for Knot DNS +BuildArch: noarch +Requires: %{name}-libs = %{version}-%{release} + +%description exporter +The package provides Python Prometheus exporter for Knot DNS. + +%package -n python3-libknot +Summary: Python bindings for libknot +BuildArch: noarch +Requires: %{name}-libs = %{version}-%{release} +%{?python_provide:%python_provide python3-libknot} + +%description -n python3-libknot +The package provides Python bindings for the libknot shared library. + +%package -n valkey-module-knot +Summary: Valkey module for Knot DNS. +Requires: %{name}-libs = %{version}-%{release} + +%description -n valkey-module-knot +The package provides Valkey module for Knot DNS. + %package doc Summary: Documentation for the Knot DNS server BuildArch: noarch -Provides: bundled(jquery) = 3.1.0 +Provides: bundled(jquery) %description doc The package contains documentation for the Knot DNS server. @@ -115,8 +199,12 @@ mkdir --mode=700 ${GNUPGHOME} gpg2 --import %{SOURCE100} gpg2 --verify %{SOURCE1} %{SOURCE0} %endif -%setup -q -%patch1 -p1 +%autosetup -p1 + +# Create a sysusers.d config file +cat >knot.sysusers.conf < 7 +install -p -m 0644 -D %{repodir}/distro/common/cz.nic.knotd.conf %{buildroot}%{_datadir}/dbus-1/system.d/cz.nic.knotd.conf +%endif # install systemd files install -p -m 0644 -D %{repodir}/distro/common/%{name}.service %{buildroot}%{_unitdir}/%{name}.service -install -p -m 0644 -D %{repodir}/distro/common/%{name}.tmpfiles %{buildroot}%{_tmpfilesdir}/%{name}.conf %if 0%{?suse_version} ln -s service %{buildroot}/%{_sbindir}/rcknot %endif -# create storage dir and key dir +# create storage dir install -d %{buildroot}%{_sharedstatedir} -install -d -m 0775 -D %{buildroot}%{_sharedstatedir}/%{name} -install -d -m 0770 -D %{buildroot}%{_sharedstatedir}/%{name}/keys +install -d -m 0770 -D %{buildroot}%{_sharedstatedir}/knot # remove libarchive files find %{buildroot} -type f -name "*.la" -delete -print +install -m0644 -D knot.sysusers.conf %{buildroot}%{_sysusersdir}/knot.conf + %check -make check +V=1 make check %pre -getent group knot >/dev/null || groupadd -r knot -getent passwd knot >/dev/null || \ - useradd -r -g knot -d %{_sysconfdir}/knot -s /sbin/nologin \ - -c "Knot DNS server" knot %if 0%{?suse_version} %service_add_pre knot.service %endif %post -systemd-tmpfiles --create %{_tmpfilesdir}/knot.conf &>/dev/null || : %if 0%{?suse_version} %service_add_post knot.service %else @@ -215,50 +339,72 @@ systemd-tmpfiles --create %{_tmpfilesdir}/knot.conf &>/dev/null || : %files %license COPYING -%{_pkgdocdir}/NEWS -%{_pkgdocdir}/README.md -%{_pkgdocdir}/samples -%dir %attr(750,root,knot) %{_sysconfdir}/%{name} -%config(noreplace) %attr(640,root,knot) %{_sysconfdir}/%{name}/%{name}.conf -%dir %attr(775,root,knot) %{_sharedstatedir}/%{name} -%dir %attr(770,root,knot) %{_sharedstatedir}/%{name}/keys +%doc %{_pkgdocdir} +%exclude %{_pkgdocdir}/html +%attr(750,root,knot) %dir %{_sysconfdir}/knot +%config(noreplace) %attr(640,root,knot) %{_sysconfdir}/knot/knot.conf +%if 0%{?fedora} || 0%{?rhel} > 7 +%config(noreplace) %attr(644,root,root) %{_datadir}/dbus-1/system.d/cz.nic.knotd.conf +%endif +%attr(770,root,knot) %dir %{_sharedstatedir}/knot +%dir %{_libdir}/knot +%dir %{_libdir}/knot/modules-* %{_unitdir}/knot.service -%{_tmpfilesdir}/%{name}.conf -%{_bindir}/kzonecheck -%{_bindir}/kzonesign %{_sbindir}/kcatalogprint %{_sbindir}/kjournalprint -%{_sbindir}/keymgr %{_sbindir}/knotc %{_sbindir}/knotd %if 0%{?suse_version} %{_sbindir}/rcknot %endif -%{_mandir}/man1/kzonecheck.* -%{_mandir}/man1/kzonesign.* %{_mandir}/man5/knot.conf.* %{_mandir}/man8/kcatalogprint.* %{_mandir}/man8/kjournalprint.* -%{_mandir}/man8/keymgr.* %{_mandir}/man8/knotc.* %{_mandir}/man8/knotd.* -%{_mandir}/man8/knotd.* -%ghost /run/knot +%ghost %attr(770,root,knot) %dir %{_rundir}/knot +%{_sysusersdir}/knot.conf %files utils %{_bindir}/kdig %{_bindir}/khost -%{_bindir}/knsec3hash %{_bindir}/knsupdate -%if 0%{?rhel} >= 8 || 0%{?suse_version} || 0%{?fedora} >= 31 %{_sbindir}/kxdpgun %{_mandir}/man8/kxdpgun.* -%endif %{_mandir}/man1/kdig.* %{_mandir}/man1/khost.* -%{_mandir}/man1/knsec3hash.* %{_mandir}/man1/knsupdate.* +%files dnssecutils +%{_bindir}/knsec3hash +%{_bindir}/kzonecheck +%{_bindir}/kzonesign +%{_mandir}/man1/knsec3hash.* +%{_mandir}/man1/kzonecheck.* +%{_mandir}/man1/kzonesign.* + +%files keymgr +%{_sbindir}/keymgr +%{_mandir}/man8/keymgr.* + +%files module-dnstap +%{_libdir}/knot/modules-*/dnstap.so + +%files module-geoip +%{_libdir}/knot/modules-*/geoip.so + +%files exporter +%{_bindir}/knot-exporter +%{python3_sitelib}/knot_exporter +%{python3_sitelib}/knot_exporter-*-info + +%files -n python3-libknot +%{python3_sitelib}/libknot +%{python3_sitelib}/libknot-*-info + +%files -n valkey-module-knot +%attr(0755, root, root) %{_libdir}/valkey/modules/knot.so + %files libs %license COPYING %doc NEWS @@ -282,9 +428,248 @@ systemd-tmpfiles --create %{_tmpfilesdir}/knot.conf &>/dev/null || : %files doc %dir %{_pkgdocdir} -%{_pkgdocdir}/html +%doc %{_pkgdocdir}/html %changelog +* Fri Dec 19 2025 Jakub Ružička - 3.5.2-1 +- Update to 3.5.2 + +* Thu Oct 16 2025 Jakub Ružička - 3.5.1-1 +- Update to 3.5.1 +- Add new valkey-module-knot package +- Split keymgr into knot-keymgr package + +* Fri Sep 19 2025 Python Maint - 3.4.8-3 +- Rebuilt for Python 3.14.0rc3 bytecode + +* Fri Aug 15 2025 Python Maint - 3.4.8-2 +- Rebuilt for Python 3.14.0rc2 bytecode + +* Wed Jul 30 2025 Jakub Ružička - 3.4.8-1 +- Update to 3.4.8 + +* Thu Jul 24 2025 Fedora Release Engineering - 3.4.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Thu Jun 12 2025 Jakub Ružička - 3.4.7-1 +- Update to 3.4.7 +- Add new knot-exporter and python3-libknot packages + +* Thu Apr 10 2025 Jakub Ružička - 3.4.6-1 +- Update to 3.4.6 + +* Wed Mar 19 2025 Jakub Ružička - 3.4.5-1 +- Update to 3.4.5 + +* Thu Jan 23 2025 Zbigniew Jędrzejewski-Szmek - 3.4.4-2 +- Add sysusers.d config file to allow rpm to create users/groups automatically + +* Thu Jan 23 2025 Jakub Ružička - 3.4.4-1 +- Update to 3.4.4 + +* Fri Jan 17 2025 Fedora Release Engineering - 3.4.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Tue Dec 10 2024 Jakub Ružička - 3.4.3-1 +- Update to 3.4.3 + +* Mon Nov 25 2024 Jakub Ružička - 3.4.2-1 +- Update to 3.4.2 + +* Mon Aug 26 2024 Jakub Ružička - 3.3.9-1 +- Update to 3.3.9 + +* Mon Jul 22 2024 Jakub Ružička - 3.3.8-1 +- Update to 3.3.8 + +* Thu Jul 18 2024 Fedora Release Engineering - 3.3.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Tue Jun 25 2024 Jakub Ružička - 3.3.7-1 +- Update to 3.3.7 + +* Thu Jun 13 2024 Jakub Ružička - 3.3.6-1 +- Update to 3.3.6 + +* Thu Mar 07 2024 Jakub Ružička - 3.3.5-1 +- Update to 3.3.5 + +* Wed Jan 24 2024 Jakub Ružička - 3.3.4-1 +- Update to 3.3.4 + +* Sun Jan 21 2024 Fedora Release Engineering - 3.3.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Wed Dec 13 2023 Jakub Ružička - 3.3.3-1 +- Update to 3.3.3 + +* Fri Oct 20 2023 Jakub Ružička - 3.3.2-1 +- Update to 3.3.2 + +* Tue Sep 12 2023 Jakub Ružička - 3.3.1-1 +- Update to 3.3.1 + +* Mon Aug 28 2023 Jakub Ružička - 3.3.0-1 +- Update to 3.3.0 + +* Thu Jul 27 2023 Jakub Ružička - 3.2.9-1 +- Update to 3.2.9 + +* Thu Jul 20 2023 Fedora Release Engineering - 3.2.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Mon Jun 26 2023 Jakub Ružička - 3.2.8-1 +- Update to 3.2.8 + +* Tue Jun 06 2023 Jakub Ružička - 3.2.7-1 +- Update to 3.2.7 +- Remove unneeded tests patch +- Use _datadir for config + +* Fri May 12 2023 Michel Alexandre Salim - 3.2.6-2 +- Add BR on libxdp on RHEL >= 9 to use with libbpf-1.x + +* Thu Apr 06 2023 Jakub Ružička - 3.2.6-1 +- Update to 3.2.6 +- Sync upstream packaging improvements + +* Thu Feb 02 2023 Jakub Ružička - 3.2.5-1 +- Update to 3.2.5 + +* Thu Jan 19 2023 Fedora Release Engineering - 3.2.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Mon Dec 12 2022 Jakub Ružička - 3.2.4-1 +- Update to 3.2.4 + +* Mon Nov 28 2022 Jakub Ružička - 3.2.3-2 +- Rebuilt for libbpf 1.0 transition + +* Mon Nov 21 2022 Jakub Ružička - 3.2.3-1 +- Update to 3.2.3 + +* Fri Nov 04 2022 Jakub Ružička - 3.2.2-2 +- New BuildRequires: libxdp (needed for libbpf >= 1.0) + +* Tue Nov 01 2022 Jakub Ružička - 3.2.2-1 +- Update to 3.2.2 + +* Fri Sep 09 2022 Jakub Ružička - 3.2.1-1 +- Update to 3.2.1 +- Remove patches included upstream +- Update Conflicts and move to knot-libs + +* Mon Aug 22 2022 Jakub Ružička - 3.2.0-1 +- Update to 3.2.0 +- Patch: fix tests on 32-bit platforms +- Patch: revert problematic hardening of service file +- Enable QUIC +- New knot-dnssecutils subpackage +- Debian compat (knot-utils vs knot-dnsutils) +- Remove bundled(jquery) version as it differes between distros + +* Thu Jul 21 2022 Fedora Release Engineering - 3.1.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Thu Apr 28 2022 Jakub Ružička - 3.1.8-1 +- Update to 3.1.8 + +* Wed Mar 30 2022 Jakub Ružička - 3.1.7-1 +- Update to 3.1.7 + +* Thu Feb 10 2022 Jakub Ružička - 3.1.6-1 +- Update to 3.1.6 +- Add dbus config +- Use _sharedstatedir for home + +* Thu Jan 20 2022 Fedora Release Engineering - 3.1.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Wed Jan 05 2022 Jakub Ružička 3.1.5-1 +- Update to 3.1.5 + +* Sat Nov 06 2021 Adrian Reber - 3.1.4-2 +- Rebuilt for protobuf 3.19.0 + +* Thu Nov 04 2021 Jakub Ružička - 3.1.4-1 +- Update to 3.1.4 + +* Tue Oct 26 2021 Adrian Reber - 3.1.3-2 +- Rebuilt for protobuf 3.18.1 + +* Tue Oct 19 2021 Jakub Ružička - 3.1.3-1 +- Update to 3.1.3 + +* Thu Sep 09 2021 Jakub Ružička - 3.1.2-1 +- Update to 3.1.2 + +* Tue Aug 10 2021 Jakub Ružička - 3.1.1-1 +- Update to 3.1.1 +- Enable XDP on ARM and improve XDP config macros +- Remove patch included upstream + +* Wed Aug 04 2021 Jakub Ružička 3.1.0-2 +- Introduce a patch to fix tests on ppc64le +- Use autosetup macro to apply patches + +* Mon Aug 02 2021 Jakub Ružička - 3.1.0-1 +- Update to 3.1.0 +- Add missing BuildRequires including new libmnl for kxdpgun +- Temporarily disable XDP on ARM until issues are resolved + +* Thu Jul 22 2021 Fedora Release Engineering - 3.0.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri Jul 16 2021 Jakub Ružička - 3.0.8-1 +- Update to 3.0.8 +- Print failed tests during check + +* Thu Jun 17 2021 Jakub Ružička - 3.0.7-1 +- Update to 3.0.7 + +* Fri May 14 2021 Jakub Ružička - 3.0.6-1 +- Update to 3.0.6 + +* Tue Mar 30 2021 Jakub Ružička 3.0.5-1 +- Update to 3.0.5 +- Properly escape BASE_VERSION macro +- Include module dirs in main package + +* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 3.0.4-2 +- Rebuilt for updated systemd-rpm-macros + See https://pagure.io/fesco/issue/2583. + +* Mon Feb 01 2021 Jakub Ružička - 3.0.4-1 +- Update to 3.0.4 +- Move dnstap module to subpackage +- Move geoip module to subpackage +- Remove redundant VERSION macro + +* Tue Jan 26 2021 Fedora Release Engineering - 3.0.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Thu Jan 14 08:45:48 CET 2021 Adrian Reber - 3.0.3-2 +- Rebuilt for protobuf 3.14 + +* Thu Dec 17 2020 Jakub Ružička - 3.0.3-1 +- Update to 3.0.3 + +* Wed Nov 11 2020 Jakub Ružička - 3.0.2-2 +- Remove patch included in upstream release + +* Wed Nov 11 2020 Jakub Ružička - 3.0.2-1 +- Update to 3.0.2 + +* Thu Oct 29 2020 Jakub Ružička - 3.0.1-2 +- Respect GnuTLS insecure algorithms + +* Mon Oct 12 2020 Jakub Ružička - 3.0.1-1 +- Update to 3.0.1 +- Sync packaging from upstream + +* Thu Sep 24 2020 Adrian Reber - 3.0.0-2 +- Rebuilt for protobuf 3.13 + * Thu Sep 10 2020 Jakub Ružička 3.0.0-1 - New major upstream release 3.0.0 - Sync packaging from upstream diff --git a/sources b/sources index 46e6adf..b941cb1 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (knot-3.0.0.tar.xz) = 286861e4127f8c70eeba1e76f2de82e8f89d4c15d2dc3733902f8d19103f6a44b9da97a91bc99168fd4f6024d60b8bc53a78580ed04a6e9cbf8c6ad921780c81 -SHA512 (knot-3.0.0.tar.xz.asc) = c3320ce2daf8f84e00ea40e08d89d07ec40530bc860f30e4489d44bcfa296c2954bcb431db793121c0b1aa2ff1f71a343f58492df87893f5fcf85f2470d70d13 +SHA512 (knot-3.5.2.tar.xz) = 4dd8e42088f792459859da807427024ded926c2a8fb5b9fd4596b631a184269e3d84f0cd4be9192f2546977c598c418f8d44cabccbc393f9f7cf2f0dd5adc595 +SHA512 (knot-3.5.2.tar.xz.asc) = 5f6ee7fedc0d5b904572d2f6d47858065cdc4efa7217b4e9dcbb38ae63a1533646ba2b042bb0c1fe533a3caf6ba41c81010616393d2a0adcea77712608931b38 diff --git a/tests/README.md b/tests/README.md index c52e8a5..e1d6352 100644 --- a/tests/README.md +++ b/tests/README.md @@ -2,7 +2,7 @@ Package tests ============= These tests implement the standard test interface in Fedora CI. -See https://fedoraproject.org/wiki/CI/Tests for details. +See https://docs.fedoraproject.org/en-US/ci/tests/ for details. Manual execution ---------------- @@ -12,11 +12,3 @@ modifications to your system. It's best to run these on a clean, throw-away testing system or a VM. ansible-playbook tests/tests.yml -e subjects=/path/to/knot.rpm,/path/to/knot-libs.rpm -e artifacts=/path/to/artifacts - -Automatic execution -------------------- - -These tests should eventually be automatically executed by the Fedora CI -pipeline. As of 2018-01-10, it is not supported for packages that aren't part -of Fedora Atomic. Once it is implemented, the results of these tests should be -visible in dist-git commits on src.fedoraproject.org diff --git a/tests/scripts/test_basic_zone.sh b/tests/scripts/test_basic_zone.sh new file mode 100755 index 0000000..9c08f0e --- /dev/null +++ b/tests/scripts/test_basic_zone.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# test basic system-wide functionality of Knot DNS +set -ex + +# create zone file from examples +cp /usr/share/doc/knot/samples/example.com.zone /var/lib/knot/example.com.zone +# configure knot to serve example.com zone using dark sed magic +sed 's/^#\?\([ \t]*-[ \t]*domain:[ \t]\+example.com\)[ \t]*$/\1/' -i /etc/knot/knot.conf + +# (re)start knotd +systemctl stop knot.service +systemctl start knot.service || systemctl status knot.service + +# check valid query is answered +dig @127.0.0.1 example.com | grep NOERROR + +# check query for non-existent zone is refused +dig @127.0.0.1 bad-example.com | grep REFUSED diff --git a/tests/test_basic_zone.yml b/tests/test_basic_zone.yml deleted file mode 100644 index 0f75c94..0000000 --- a/tests/test_basic_zone.yml +++ /dev/null @@ -1,33 +0,0 @@ ---- -- block: - - name: create zone file - shell: cp /usr/share/doc/knot/samples/example.com.zone /var/lib/knot/example.com.zone - - - name: configure knot to serve example.com zone - lineinfile: - path: /etc/knot/knot.conf - regexp: '^#? - domain: example.com$' - state: present - line: ' - domain: example.com' - - - name: start knot.service - service: - name: knot.service - state: restarted - - - name: check if query is answered - shell: dig @127.0.0.1 example.com - register: res - failed_when: "'NOERROR' not in res.stdout" - - - name: check query for non-existent zone is refused - shell: dig @127.0.0.1 example2.com - register: res - failed_when: "'REFUSED' not in res.stdout" - - rescue: - - set_fact: - test_basic_zone_failed: true - always: - - name: collect journal - shell: journalctl --since -10m > {{ artifacts }}/test_basic_zone_journal.log diff --git a/tests/tests.yml b/tests/tests.yml index b86e45f..8cf0411 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -1,25 +1,15 @@ --- - hosts: localhost remote_user: root - pre_tasks: - - package: # Install additional dependecies - name: bind-utils - state: latest roles: - - role: standard-test-rpm + - role: standard-test-basic tags: - classic - tasks: - - include_tasks: test_basic_zone.yml - - - set_fact: - tests_passed: '{{ test_basic_zone_failed is undefined }}' - - name: report results - debug: - msg: | - test_basic_zone: {{ 'FAILED' if test_basic_zone_failed is defined else 'OK'}} - - - name: fail playbook if tests failed - debug: - msg: --- {{ 'PASSED' if tests_passed else 'FAILED' }} --- - failed_when: not tests_passed + required_packages: + - bind-utils + tests: + - knotd-show-version: + run: knotd --version + - basic-zone: + dir: scripts + run: ./test_basic_zone.sh