]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3734] Remove unnecessary path_replacer.sh
authorAndrei Pavel <andrei@isc.org>
Tue, 13 May 2025 19:32:23 +0000 (22:32 +0300)
committerAndrei Pavel <andrei@isc.org>
Fri, 30 May 2025 07:57:39 +0000 (10:57 +0300)
meson.build
src/bin/keactrl/meson.build
tools/.gitignore
tools/meson.build
tools/path_replacer.sh.in [deleted file]

index 9bf35e07c08d6113190230321e2e17b5c057b635..a2dbd9d840c677ed959e910ab54b71f22fd609d5 100644 (file)
@@ -67,6 +67,8 @@ KEA_ADMIN_BUILT = TOP_BUILD_DIR / 'src/bin/admin/kea-admin'
 KEA_ADMIN_INSTALLED = PREFIX / SBINDIR / 'kea-admin'
 KEA_LFC_BUILT = TOP_BUILD_DIR / 'src/bin/lfc/kea-lfc'
 KEA_LFC_INSTALLED = PREFIX / SBINDIR / 'kea-lfc'
+LOCALSTATEDIR_INSTALLED = PREFIX / LOCALSTATEDIR
+LIBDIR_INSTALLED = PREFIX / LIBDIR
 LOGDIR = LOCALSTATEDIR / 'log/kea'
 LOGDIR_INSTALLED = PREFIX / LOGDIR
 RUNSTATEDIR = LOCALSTATEDIR / 'run/kea'
@@ -574,7 +576,7 @@ link_args = []
 # HOOK_RPATH = '$ORIGIN/../..'
 
 BUILD_RPATH = TOP_BUILD_DIR / 'src/lib'
-INSTALL_RPATH = PREFIX / LIBDIR
+INSTALL_RPATH = LIBDIR_INSTALLED
 
 # Add rpaths for NETCONF dependencies.
 if NETCONF_DEP.found()
index 9012825977a825cd3ecb5fb95ec922681b6c0532..0b5b860844643f00964288c3ebf83727129cc0a7 100644 (file)
@@ -1,9 +1,9 @@
 keactrl_conf_data = configuration_data()
-keactrl_conf_data.set('prefix', PREFIX)
-keactrl_conf_data.set('sysconfdir', '${prefix}/' + SYSCONFDIR)
 keactrl_conf_data.set('PACKAGE', 'kea')
 keactrl_conf_data.set('exec_prefix', '${prefix}')
+keactrl_conf_data.set('prefix', PREFIX)
 keactrl_conf_data.set('sbindir', '${prefix}/' + SBINDIR)
+keactrl_conf_data.set('sysconfdir', '${prefix}/' + SYSCONFDIR)
 if NETCONF_DEP.found()
     keactrl_conf_data.set('HAVE_NETCONF', 'yes')
 else
@@ -16,6 +16,11 @@ keactrl_conf_data.set(
 keactrl_conf_data.set('PACKAGE_VERSION', PROJECT_VERSION)
 keactrl_conf_data.set('runstatedir', '${prefix}/' + LOCALSTATEDIR + '/run')
 keactrl_conf_data.set('localstatedir', '${prefix}/' + LOCALSTATEDIR)
+
+kea_conf_data = configuration_data()
+kea_conf_data.set('libdir', LIBDIR_INSTALLED)
+kea_conf_data.set('localstatedir', LOCALSTATEDIR_INSTALLED)
+
 kea_configfiles_destdir = SYSCONFDIR / 'kea'
 configure_file(
     input: 'keactrl.conf.in',
@@ -32,35 +37,31 @@ configure_file(
 configure_file(
     input: 'kea-dhcp4.conf.pre',
     output: 'kea-dhcp4.conf',
-    command: [PATH_REPLACER, '@INPUT@', '@OUTPUT@'],
-    install: true,
+    configuration: kea_conf_data,
     install_dir: kea_configfiles_destdir,
 )
 configure_file(
     input: 'kea-dhcp6.conf.pre',
     output: 'kea-dhcp6.conf',
-    command: [PATH_REPLACER, '@INPUT@', '@OUTPUT@'],
-    install: true,
+    configuration: kea_conf_data,
     install_dir: kea_configfiles_destdir,
 )
 configure_file(
     input: 'kea-dhcp-ddns.conf.pre',
     output: 'kea-dhcp-ddns.conf',
-    command: [PATH_REPLACER, '@INPUT@', '@OUTPUT@'],
-    install: true,
+    configuration: kea_conf_data,
     install_dir: kea_configfiles_destdir,
 )
 configure_file(
     input: 'kea-ctrl-agent.conf.pre',
     output: 'kea-ctrl-agent.conf',
-    command: [PATH_REPLACER, '@INPUT@', '@OUTPUT@'],
-    install: true,
+    configuration: kea_conf_data,
     install_dir: kea_configfiles_destdir,
 )
 configure_file(
     input: 'kea-netconf.conf.pre',
     output: 'kea-netconf.conf',
-    command: [PATH_REPLACER, '@INPUT@', '@OUTPUT@'],
+    configuration: kea_conf_data,
     install: NETCONF_DEP.found(),
     install_dir: kea_configfiles_destdir,
 )
index 22040ce2d3a7ed0dafe2ebe6c0e14177685920bc..df41b5c14d3d81ab5a0712e09edd9c8fb2a1f2a1 100644 (file)
@@ -1,2 +1 @@
 /extract_bnf.sh
-/path_replacer.sh
index 64184d7312638aea03cbfde2b2fa64ecd53c9667..8095dffa009940e19d1da5e83880e744e777f0a9 100644 (file)
@@ -15,11 +15,6 @@ if AWK.found()
 else
     tools_conf_data.set('AWK', 'awk')
 endif
-PATH_REPLACER = configure_file(
-    input: 'path_replacer.sh.in',
-    output: 'path_replacer.sh',
-    configuration: tools_conf_data,
-)
 configure_file(
     input: 'extract_bnf.sh.in',
     output: 'extract_bnf.sh',
diff --git a/tools/path_replacer.sh.in b/tools/path_replacer.sh.in
deleted file mode 100755 (executable)
index 468f2b6..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/sh
-
-# Copyright (C) 2014-2025 Internet Systems Consortium, Inc. ("ISC")
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-# This script replaces @prefix@, @localstatedir@ and other automake/autoconf
-# variables with their actual content.
-#
-# Invocation:
-#
-# ./path_replacer.sh input-file.in output-file
-#
-# This script is initially used to generate configuration files, but it is
-# generic and can be used to generate any text files.
-
-# shellcheck disable=SC2034
-# SC2034: ... appears unused. Verify use (or export if used externally).
-
-# Exit with error if commands exit with non-zero and if undefined variables are
-# used.
-set -eu
-
-prefix="@prefix@"
-sysconfdir="@sysconfdir@"
-localstatedir="@localstatedir@"
-exec_prefix="@exec_prefix@"
-libdir="@libdir@"
-
-echo "Replacing \@prefix\@ with ${prefix}"
-echo "Replacing \@libdir\@ with ${libdir}"
-echo "Replacing \@sysconfdir\@ with ${sysconfdir}"
-echo "Replacing \@localstatedir\@ with ${localstatedir}"
-
-echo "Input file: $1"
-echo "Output file: $2"
-
-sed -e "s@SEP@\@libdir\@@SEP@${libdir}@SEP@g; s@SEP@\@localstatedir\@@SEP@${localstatedir}@SEP@g; s@SEP@\@prefix\@@SEP@${prefix}@SEP@g; s@SEP@\@sysconfdir\@@SEP@${sysconfdir}@SEP@g" "${1}" > "${2}"