diff --git a/knot-3.1.1.tar.xz b/knot-3.1.1.tar.xz deleted file mode 100644 index 3e54a86..0000000 --- a/knot-3.1.1.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:75bfb1acaca774ed3dd781dc74780298dc0fd51b54e4b61015e7487d6cd2067c -size 1402352 diff --git a/knot-3.1.1.tar.xz.asc b/knot-3.1.1.tar.xz.asc deleted file mode 100644 index e73ab5f..0000000 --- a/knot-3.1.1.tar.xz.asc +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIzBAABCgAdFiEEdC+k6VgptsXqxrhXELt69v671qsFAmESJ38ACgkQELt69v67 -1qsT4BAAjIMvbSnaBlT5JTSgsAJWfpMz103Ou/xPLRpRmOD4uuSkd5mFNb5Fwrid -Kxhzro9twEfKCP+tPLWvJrUvQFxGoYXb33uxwdA4wATQRP0zn1phYyAkAxALumAt -ApF5Yu9RAv3wzZsdfzqd1B9pwtJAus7yJOBKL+RjMeV1yKo7MzNQistzyiwuWNF1 -Wk3W24+paO4u7FqlPa9PuYrfF4ZKzp54ZWFkGQKcwJDM0UTh6NRxD2wRNmNdOhW6 -Fn9LLWHtYXVWyrCJi5JfGZ/TSvnyH05ZJ9nVDNZxkT9E+qkkchRBS0RDYxCzwRtK -q7bU3FY3w9pi/BwbxyulTPCPGSBMWjY++zazSMweRJdTaY7R3We3wGtL+sA+dpHb -U2GVMsGNYy0W5KNAA8WqtZm6+YkM5znoEa7PMRKCrT+lU7Vl4oS7bP5TXFh3bhzJ -+LsNBfP3fscNMXrrRPMPGy2X60KPEbV4OtUsx54n+NsaLVG8yaIHC+zwLKprwqU7 -Qt+9lIj5yMPOhLSFjUBNHk6yAGbKmUqMk96rj2Immt1+GZxNBNWpiAqg7g+PRdZj -FKG7SnNC3AnDIhgHiESMuqXZpcOTjIfvwj8s73uAxbWnQzdhozlBXKXxNSohce5g -atMwAsSxVAfO/KRuhr5zLB/2QGGgqs340aXf715C+swVoPqHyso= -=aLCI ------END PGP SIGNATURE----- diff --git a/knot-3.1.2.tar.xz b/knot-3.1.2.tar.xz new file mode 100644 index 0000000..28c8aa3 --- /dev/null +++ b/knot-3.1.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:580087695df350898b2da8a5c2bdf1dc5eb262ed5ff2cb1538cee480a50fa094 +size 1406684 diff --git a/knot-3.1.2.tar.xz.asc b/knot-3.1.2.tar.xz.asc new file mode 100644 index 0000000..3d52473 --- /dev/null +++ b/knot-3.1.2.tar.xz.asc @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCgAdFiEEdC+k6VgptsXqxrhXELt69v671qsFAmE4p/4ACgkQELt69v67 +1qvRAQ//fdqCOAgMb7WkCFBu/ud9gkLSb34X7iQsCRaCtCQO6K05+GvyNswRU3aF +yEt9vTMK1tb42nVXMfV6uD/YBGlfDF+h4gM/m9ABSGjygvhHB70slXqNrbRbtB1z +UOEwltzyKd1K5/zDXpKNGPbZ/HKe3lWjAoXmZq7jm6j2X+cJz3ub+6R8iI2vH85F +8M0C9ADgrzJ45socj4YevQj7XIaGSQnTbNQFQ9gYkFUx2WHQzK8u7m11FKYYoKoo +BSJyQO3zrDN3SS13zLFDkAzvvA2f5N39L5c0ZeNFsouojYrosamnqlA+8MtzQ+tb ++L+ZTB4VifiDDhRRiQlqvgoyMGX1HM/++GbPd9dYNYvrypPHshP/fOwXB328f2pr +mEfEI2xz43KafIC7KiB5jd9Dp+eZz9CdXwLAUuWGGt0mnc+0/P9hTnCtsYTXDibW +1YrIgTxvFiqkfLF3GQ1xzkrecM8iNwKeMhr1ulst4tIyDi3WIlGEDYH1ZdIk536Q +mK14GdFBGmI6TW1/syHFUMvBGwWeGnn2SBFLbVVESwnuerYxpnM6H6BdeuGa9HAz +qaQ+Dzs8CD2h3m7ld6iDQmDP4CUIrv06fBcgqpMSEazWss1eGyFTTova10ItST5r +I6ZBlF5Eps2RZ8FistPm0RJ7Q4qx4jGzI3Tuo9CRfop2OwhRk0Y= +=KhHl +-----END PGP SIGNATURE----- diff --git a/knot.changes b/knot.changes index 7d8c2a4..c31c33c 100644 --- a/knot.changes +++ b/knot.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Sep 17 19:15:39 UTC 2021 - Michal Hrusecky + +- migrate to user creation via sysuser-tools +- run spec-cleaner on spec file +- update to version 3.1.2, see: + https://www.knot-dns.cz/2021-09-08-version-312.html + ------------------------------------------------------------------- Thu Aug 12 07:51:04 UTC 2021 - Michal Hrusecky diff --git a/knot.spec b/knot.spec index 890fbc5..a3c5ab8 100644 --- a/knot.spec +++ b/knot.spec @@ -16,6 +16,10 @@ # +%define libdnssec libdnssec8 +%define libknot libknot12 +%define libzscanner libzscanner4 +%define pkg_name knot %if 0%{?suse_version} > 1320 %bcond_without dnstap %bcond_without lto @@ -33,50 +37,48 @@ %else %bcond_with maxminddb %endif - %if 0%{?suse_version} > 1140 && ( 0%{?suse_version} != 1315 || ( 0%{?suse_version} == 1315 && 0%{?is_opensuse} )) %bcond_without docs %else %bcond_with docs %endif - -%define libdnssec libdnssec8 -%define libknot libknot12 -%define libzscanner libzscanner4 - +%if %{with systemd} +%define has_systemd 1 +BuildRequires: systemd-devel +%{?systemd_requires} +%endif Name: knot -Version: 3.1.1 +Version: 3.1.2 Release: 0 -%define pkg_name knot Summary: An authoritative DNS daemon License: GPL-3.0-or-later Group: Productivity/Networking/DNS/Servers -URL: http://www.knot-dns.cz/ +URL: https://www.knot-dns.cz/ Source0: https://secure.nic.cz/files/knot-dns/%{pkg_name}-%{version}.tar.xz Source1: knot.service Source2: knot-tmp.conf Source3: https://secure.nic.cz/files/knot-dns/%{pkg_name}-%{version}.tar.xz.asc +Source4: system-user-knot.conf +BuildRequires: libcap-ng-devel BuildRequires: libedit-devel +BuildRequires: liburcu-devel +BuildRequires: lmdb-devel >= 0.9.15 +BuildRequires: openssl-devel +BuildRequires: pkgconfig +BuildRequires: sysuser-tools +BuildRequires: xz +BuildRequires: pkgconfig(gnutls) >= 3.3 +BuildRequires: pkgconfig(nettle) +Obsoletes: knot2 < %{version} +%sysusers_requires %if 0%{?suse_version} > 1320 || 0%{?leap_version} == 420300 BuildRequires: libidn2-devel %else BuildRequires: libidn-devel %endif -BuildRequires: liburcu-devel -BuildRequires: openssl-devel -BuildRequires: pkg-config -BuildRequires: pkgconfig(gnutls) >= 3.3 -BuildRequires: pkgconfig(nettle) %if %{with maxminddb} BuildRequires: pkgconfig(libmaxminddb) %endif -BuildRequires: libcap-ng-devel -BuildRequires: xz -Requires(pre): pwdutils -Requires(pre): shadow -Requires(pre): glibc -BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: lmdb-devel >= 0.9.15 %if %{with docs} BuildRequires: makeinfo BuildRequires: python3-Sphinx @@ -86,12 +88,6 @@ BuildRequires: libfstrm-devel BuildRequires: libprotobuf-c-devel >= 1.0.0 BuildRequires: protobuf-c >= 1.0.0 %endif -%if %{with systemd} -%define has_systemd 1 -BuildRequires: systemd-devel -%{?systemd_requires} -%endif -Obsoletes: knot2 < %{version} %description Knot DNS is a DNS server. It implements only the authoritative domain @@ -100,10 +96,10 @@ implementation and can operate non-stop during zone addition or removal. %package devel -Group: Development/Libraries/C and C++ -Requires: knot = %{version} # Summary: Development files for the knot libraries +Group: Development/Libraries/C and C++ +Requires: knot = %{version} %description devel Knot DNS is a DNS server. It implements only the authoritative domain @@ -114,9 +110,9 @@ removal. This package contains headers for knot. %package -n %{libdnssec} -Group: System/Libraries # Summary: DNSSEC support functions for Knot DNS +Group: System/Libraries %description -n %{libdnssec} Knot DNS is a DNS server. It implements only the authoritative domain @@ -127,9 +123,9 @@ removal. This package contains a library for DNSSEC support functions. %package -n %{libknot} -Group: System/Libraries # Summary: Knot DNS support library +Group: System/Libraries %description -n %{libknot} Knot DNS is a DNS server. It implements only the authoritative domain @@ -140,9 +136,9 @@ removal. This package contains the essential core library for Knot services. %package -n %{libzscanner} -Group: System/Libraries # Summary: Zone record parsing functions for Knot DNS +Group: System/Libraries %description -n %{libzscanner} Knot DNS is a DNS server. It implements only the authoritative domain @@ -186,9 +182,10 @@ This package contains a library for a zone record scanner. --with-module-stats=shared \ --with-module-synthrecord=shared \ --with-module-whoami=shared \ - --with-bash-completions=/etc/bash_completion.d \ + --with-bash-completions=%{_sysconfdir}/bash_completion.d \ --disable-silent-rules %make_build STRIP="/bin/true" +%sysusers_generate_pre %{SOURCE4} knot system-user-knot.conf %install %make_install STRIP="/bin/true" @@ -205,15 +202,14 @@ ln -s service %{buildroot}%{_sbindir}/rcknot install -p -m644 COPYING NEWS README.md %{buildroot}%{_docdir}/%{pkg_name} install -p -m644 samples/*.conf samples/*.zone* %{buildroot}%{_docdir}/%{pkg_name}/samples/ find %{buildroot} -type f -name "*.la" -delete -print -install -d -m 0750 %{buildroot}/var/lib/knot/ +install -d -m 0750 %{buildroot}%{_localstatedir}/lib/knot/ +mkdir -p %{buildroot}%{_sysusersdir} +install -m 0644 %{SOURCE4} %{buildroot}%{_sysusersdir}/ -%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 +%pre -f knot.pre %if %{with systemd} %service_add_pre %{pkg_name}.service + %preun %service_del_preun %{pkg_name}.service @@ -258,9 +254,10 @@ fi %if %{with systemd} %{_unitdir}/%{pkg_name}.service %{_tmpfilesdir}/knot.conf +%{_sysusersdir}/system-user-knot.conf %endif %{_libdir}/knot/ -%dir %attr(-,knot,knot) /var/lib/knot/ +%dir %attr(-,knot,knot) %{_localstatedir}/lib/knot/ %ghost %dir %(751,knot,knot) /run/knot %files -n %{libdnssec} diff --git a/system-user-knot.conf b/system-user-knot.conf new file mode 100644 index 0000000..a905d00 --- /dev/null +++ b/system-user-knot.conf @@ -0,0 +1 @@ + u knot - "Knot DNS server" /var/lib/knot