commit:     91c56fb74d6419e4384f56a6dd514a33cdef5ca8
Author:     Matthew Smith <matthew <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 21 14:11:02 2024 +0000
Commit:     Matthew Smith <matthew <AT> gentoo <DOT> org>
CommitDate: Sun Jan 21 14:12:06 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91c56fb7

net-dns/knot-resolver: always install tmpfiles config

Closes: https://bugs.gentoo.org/921567
Signed-off-by: Matthew Smith <matthew <AT> gentoo.org>

 .../files/knot-resolver-5.7.0-tmpfiles.patch       | 47 ++++++++++++++++++++++
 ...-5.7.0.ebuild => knot-resolver-5.7.0-r1.ebuild} |  7 +++-
 2 files changed, 52 insertions(+), 2 deletions(-)

diff --git a/net-dns/knot-resolver/files/knot-resolver-5.7.0-tmpfiles.patch 
b/net-dns/knot-resolver/files/knot-resolver-5.7.0-tmpfiles.patch
new file mode 100644
index 000000000000..e199806972cb
--- /dev/null
+++ b/net-dns/knot-resolver/files/knot-resolver-5.7.0-tmpfiles.patch
@@ -0,0 +1,47 @@
+Always install tmpfiles config.
+
+Bug: https://bugs.gentoo.org/921567
+Bug: https://gitlab.nic.cz/knot/knot-resolver/-/issues/886
+--- a/systemd/meson.build
++++ b/systemd/meson.build
+@@ -12,6 +12,18 @@ systemd_config.set('etc_dir', etc_dir)
+ systemd_config.set('run_dir', run_dir)
+ systemd_config.set('lib_dir', lib_dir)
+ 
++## tmpfiles
++tmpfiles = configure_file(
++  input: 'tmpfiles.d/knot-resolver.conf.in',
++  output: 'knot-resolver.tmpfiles',
++  configuration: systemd_config,
++)
++install_data(
++  tmpfiles,
++  rename: ['knot-resolver.conf'],
++  install_dir: systemd_tmpfiles_dir,
++)
++
+ if systemd_files == 'enabled'
+   ## unit files
+   kresd_service = configure_file(
+@@ -39,18 +51,6 @@ if systemd_files == 'enabled'
+   )
+   install_man(kresd_systemd_man)
+ 
+-  ## tmpfiles
+-  tmpfiles = configure_file(
+-    input: 'tmpfiles.d/knot-resolver.conf.in',
+-    output: 'knot-resolver.tmpfiles',
+-    configuration: systemd_config,
+-  )
+-  install_data(
+-    tmpfiles,
+-    rename: ['knot-resolver.conf'],
+-    install_dir: systemd_tmpfiles_dir,
+-  )
+-
+   ## sysusers
+   sysusers = configure_file(
+     input: 'sysusers.d/knot-resolver.conf.in',
+-- 
+2.43.0
+

diff --git a/net-dns/knot-resolver/knot-resolver-5.7.0.ebuild 
b/net-dns/knot-resolver/knot-resolver-5.7.0-r1.ebuild
similarity index 93%
rename from net-dns/knot-resolver/knot-resolver-5.7.0.ebuild
rename to net-dns/knot-resolver/knot-resolver-5.7.0-r1.ebuild
index 7388f32ffb47..23e7e7d6f11e 100644
--- a/net-dns/knot-resolver/knot-resolver-5.7.0.ebuild
+++ b/net-dns/knot-resolver/knot-resolver-5.7.0-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2022-2023 Gentoo Authors
+# Copyright 2022-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -52,6 +52,9 @@ BDEPEND="
 PATCHES=(
        "${FILESDIR}"/${PN}-5.5.3-docdir.patch
        "${FILESDIR}"/${PN}-5.5.3-nghttp-openssl.patch
+
+       # Bug #921567
+       "${FILESDIR}"/${PN}-5.7.0-tmpfiles.patch
 )
 
 VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/${PN}.gpg
@@ -92,5 +95,5 @@ src_install() {
 }
 
 pkg_postinst() {
-       use systemd && tmpfiles_process knot-resolver.conf
+       tmpfiles_process knot-resolver.conf
 }

Reply via email to