]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
meson: enable root keys installation to keyfile_default location
authorTomas Krizek <tomas.krizek@nic.cz>
Thu, 24 Oct 2019 14:40:20 +0000 (16:40 +0200)
committerPetr Špaček <petr.spacek@nic.cz>
Wed, 20 Nov 2019 09:42:58 +0000 (10:42 +0100)
etc/meson.build
meson.build

index 04bd9b7f2c75c7f96e89810956d7eb4b8b961dc6..dadb9ef99e245177c46aa48f3f4faee68f785b25 100644 (file)
@@ -11,7 +11,19 @@ if managed_ta
 endif
 
 if install_root_keys
-  etc_files += 'root.keys'
+  root_keys_path = keyfile_default.split('/')
+  root_keys_filename = root_keys_path[-1]
+  root_keys_dir = []
+  foreach el : root_keys_path
+    if el != root_keys_filename
+      root_keys_dir += el
+    endif
+  endforeach
+  install_data(
+    sources: 'root.keys',
+    rename: root_keys_filename,
+    install_dir: '/'.join(root_keys_dir)
+  )
 endif
 
 
index 6431f2b3ee9509a0270f7045c77365411de428d9..05946d27037cdd0c4b271758f834105caf24feaf 100644 (file)
@@ -63,11 +63,7 @@ if keyfile_default == join_paths(etc_dir, 'root.keys')
   install_root_keys = true
   managed_ta = managed_ta or get_option('managed_ta') == 'auto'
 else
-  install_root_keys = false
-  if managed_ta
-    warning('Using managed_ta along with non-standard keyfile_default. ' +
-           'Ensure keyfile_default directory will be writable by kresd.')
-  endif
+  install_root_keys = managed_ta
 endif
 
 ## Root hints