forked from acouzens/open5gs
Fix directory mix-up. @prefix@ vs. @sysconfdir@ vs @libdir@ vs @localstatedir@
Installing to @prefix@/etc is wrong, this will end up in /usr/etc on most linux distributions, where /etc (@sysconfdir@) would be correct. The same is true for /var (@localstatedir@), we don't want log files suddenly to be in /usr/var/log rather than /var/log However, this is further complicated by the fact that @libdir@ is not recursively resolved but could expand to "${prefix}/lib" which of course makes no sense inside a config file. So instead, let's introduce adl_RECURSIVE_EVAL and define @LIB_DIR@ and @SYSCONF_DIR@ with recursively-expanded versions of those variables.
This commit is contained in:
parent
cd8f29aa59
commit
ec91b9e8da
|
@ -37,7 +37,7 @@ AM_CPPFLAGS = \
|
|||
sysconf_DATA = \
|
||||
support/nextepc.conf
|
||||
|
||||
freeDiameterdir = ${prefix}/etc/freeDiameter
|
||||
freeDiameterdir = ${sysconfdir}/freeDiameter
|
||||
freeDiameter_DATA = \
|
||||
support/freeDiameter/mme.conf \
|
||||
support/freeDiameter/hss.conf \
|
||||
|
@ -55,7 +55,7 @@ dist_freeDiameter_DATA = \
|
|||
support/freeDiameter/pcrf.cert.pem
|
||||
|
||||
install-data-hook:
|
||||
$(MKDIR_P) $(DESTDIR)/$(prefix)/var/log
|
||||
$(MKDIR_P) $(DESTDIR)/$(localstatedir)/log
|
||||
|
||||
CLEANFILES = symtbl.c
|
||||
DISTCLEANFILES = $(DIST_ARCHIVES)
|
||||
|
|
23
configure.ac
23
configure.ac
|
@ -163,6 +163,29 @@ AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
|
|||
[`echo $PACKAGE_VERSION | $SED 's/^\([[^\.]]\+\)\.\([[^\.]]\+\)\.\([[^\.]]\+\).*/\3/'`],
|
||||
[Patch version of this package])
|
||||
|
||||
# adl_RECURSIVE_EVAL(VALUE, RESULT)
|
||||
# =================================
|
||||
# Interpolate the VALUE in loop until it doesn't change,
|
||||
# and set the result to $RESULT.
|
||||
# WARNING: It's easy to get an infinite loop with some unsane input.
|
||||
# For example ${datadir} becomes ${datarootdir}, and then ${prefix}/share, and
|
||||
# finally ${prefix} is replaced by the prefix.
|
||||
AC_DEFUN([adl_RECURSIVE_EVAL],
|
||||
[_lcl_receval="$1"
|
||||
$2=`(test "x$prefix" = xNONE && prefix="$ac_default_prefix"
|
||||
test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
|
||||
_lcl_receval_old=''
|
||||
while test "[$]_lcl_receval_old" != "[$]_lcl_receval"; do
|
||||
_lcl_receval_old="[$]_lcl_receval"
|
||||
eval _lcl_receval="\"[$]_lcl_receval\""
|
||||
done
|
||||
echo "[$]_lcl_receval")`])
|
||||
|
||||
adl_RECURSIVE_EVAL(["${libdir}"], [LIB_DIR])
|
||||
adl_RECURSIVE_EVAL(["${sysconfdir}"], [SYSCONF_DIR])
|
||||
AC_SUBST(LIB_DIR)
|
||||
AC_SUBST(SYSCONF_DIR)
|
||||
|
||||
##################################
|
||||
#### Checks for header files. ####
|
||||
##################################
|
||||
|
|
|
@ -12,4 +12,4 @@
|
|||
# This file simply consists in a list of XML dictionary files that must be parsed.
|
||||
# Example:
|
||||
# "/etc/freeDiameter/dictionary.xml";
|
||||
"@prefix@/etc/freeDiameter/dict_gx.xml";
|
||||
"@sysconfdir@/freeDiameter/dict_gx.xml";
|
||||
|
|
|
@ -107,8 +107,8 @@ ListenOn = "10.1.35.214";
|
|||
# Default : NO DEFAULT
|
||||
#TLS_Cred = "<x509 certif file.PEM>" , "<x509 private key file.PEM>";
|
||||
#TLS_Cred = "/etc/ssl/certs/freeDiameter.pem", "/etc/ssl/private/freeDiameter.key";
|
||||
TLS_Cred = "@prefix@/etc/freeDiameter/hss.cert.pem",
|
||||
"@prefix@/etc/freeDiameter/hss.key.pem";
|
||||
TLS_Cred = "@SYSCONF_DIR@/freeDiameter/hss.cert.pem",
|
||||
"@SYSCONF_DIR@/freeDiameter/hss.key.pem";
|
||||
|
||||
# Certificate authority / trust anchors
|
||||
# The file containing the list of trusted Certificate Authorities (PEM list)
|
||||
|
@ -116,7 +116,7 @@ TLS_Cred = "@prefix@/etc/freeDiameter/hss.cert.pem",
|
|||
# The directive can appear several times to specify several files.
|
||||
# Default : GNUTLS default behavior
|
||||
#TLS_CA = "<file.PEM>";
|
||||
TLS_CA = "@prefix@/etc/freeDiameter/cacert.pem";
|
||||
TLS_CA = "@SYSCONF_DIR@/freeDiameter/cacert.pem";
|
||||
|
||||
# Certificate Revocation List file
|
||||
# The information about revoked certificates.
|
||||
|
@ -224,14 +224,14 @@ TLS_CA = "@prefix@/etc/freeDiameter/cacert.pem";
|
|||
# 4 - full - display the complete information on a single long line
|
||||
# 8 - tree - display the complete information in an easier to read format spanning several lines.
|
||||
|
||||
LoadExtension = "@prefix@/lib/nextepc/dbg_msg_dumps.so" : "0x8888";
|
||||
LoadExtension = "@prefix@/lib/nextepc/dict_rfc5777.so";
|
||||
LoadExtension = "@prefix@/lib/nextepc/dict_mip6i.so";
|
||||
LoadExtension = "@prefix@/lib/nextepc/dict_nasreq.so";
|
||||
LoadExtension = "@prefix@/lib/nextepc/dict_nas_mipv6.so";
|
||||
LoadExtension = "@prefix@/lib/nextepc/dict_dcca.so";
|
||||
LoadExtension = "@prefix@/lib/nextepc/dict_dcca_3gpp.so";
|
||||
LoadExtension = "@prefix@/lib/nextepc/dict_s6a.so";
|
||||
LoadExtension = "@LIB_DIR@/nextepc/dbg_msg_dumps.so" : "0x8888";
|
||||
LoadExtension = "@LIB_DIR@/nextepc/dict_rfc5777.so";
|
||||
LoadExtension = "@LIB_DIR@/nextepc/dict_mip6i.so";
|
||||
LoadExtension = "@LIB_DIR@/nextepc/dict_nasreq.so";
|
||||
LoadExtension = "@LIB_DIR@/nextepc/dict_nas_mipv6.so";
|
||||
LoadExtension = "@LIB_DIR@/nextepc/dict_dcca.so";
|
||||
LoadExtension = "@LIB_DIR@/nextepc/dict_dcca_3gpp.so";
|
||||
LoadExtension = "@LIB_DIR@/nextepc/dict_s6a.so";
|
||||
|
||||
|
||||
##############################################################
|
||||
|
|
|
@ -107,8 +107,8 @@ ListenOn = "10.1.35.215";
|
|||
# Default : NO DEFAULT
|
||||
#TLS_Cred = "<x509 certif file.PEM>" , "<x509 private key file.PEM>";
|
||||
#TLS_Cred = "/etc/ssl/certs/freeDiameter.pem", "/etc/ssl/private/freeDiameter.key";
|
||||
TLS_Cred = "@prefix@/etc/freeDiameter/mme.cert.pem",
|
||||
"@prefix@/etc/freeDiameter/mme.key.pem";
|
||||
TLS_Cred = "@SYSCONF_DIR@/freeDiameter/mme.cert.pem",
|
||||
"@SYSCONF_DIR@/freeDiameter/mme.key.pem";
|
||||
|
||||
# Certificate authority / trust anchors
|
||||
# The file containing the list of trusted Certificate Authorities (PEM list)
|
||||
|
@ -116,7 +116,7 @@ TLS_Cred = "@prefix@/etc/freeDiameter/mme.cert.pem",
|
|||
# The directive can appear several times to specify several files.
|
||||
# Default : GNUTLS default behavior
|
||||
#TLS_CA = "<file.PEM>";
|
||||
TLS_CA = "@prefix@/etc/freeDiameter/cacert.pem";
|
||||
TLS_CA = "@SYSCONF_DIR@/freeDiameter/cacert.pem";
|
||||
|
||||
# Certificate Revocation List file
|
||||
# The information about revoked certificates.
|
||||
|
@ -224,14 +224,14 @@ TLS_CA = "@prefix@/etc/freeDiameter/cacert.pem";
|
|||
# 4 - full - display the complete information on a single long line
|
||||
# 8 - tree - display the complete information in an easier to read format spanning several lines.
|
||||
|
||||
LoadExtension = "@prefix@/lib/nextepc/dbg_msg_dumps.so" : "0x8888";
|
||||
LoadExtension = "@prefix@/lib/nextepc/dict_rfc5777.so";
|
||||
LoadExtension = "@prefix@/lib/nextepc/dict_mip6i.so";
|
||||
LoadExtension = "@prefix@/lib/nextepc/dict_nasreq.so";
|
||||
LoadExtension = "@prefix@/lib/nextepc/dict_nas_mipv6.so";
|
||||
LoadExtension = "@prefix@/lib/nextepc/dict_dcca.so";
|
||||
LoadExtension = "@prefix@/lib/nextepc/dict_dcca_3gpp.so";
|
||||
LoadExtension = "@prefix@/lib/nextepc/dict_s6a.so";
|
||||
LoadExtension = "@LIB_DIR@/nextepc/dbg_msg_dumps.so" : "0x8888";
|
||||
LoadExtension = "@LIB_DIR@/nextepc/dict_rfc5777.so";
|
||||
LoadExtension = "@LIB_DIR@/nextepc/dict_mip6i.so";
|
||||
LoadExtension = "@LIB_DIR@/nextepc/dict_nasreq.so";
|
||||
LoadExtension = "@LIB_DIR@/nextepc/dict_nas_mipv6.so";
|
||||
LoadExtension = "@LIB_DIR@/nextepc/dict_dcca.so";
|
||||
LoadExtension = "@LIB_DIR@/nextepc/dict_dcca_3gpp.so";
|
||||
LoadExtension = "@LIB_DIR@/nextepc/dict_s6a.so";
|
||||
|
||||
|
||||
##############################################################
|
||||
|
|
|
@ -107,7 +107,7 @@ ListenOn = "10.1.35.218";
|
|||
# Default : NO DEFAULT
|
||||
#TLS_Cred = "<x509 certif file.PEM>" , "<x509 private key file.PEM>";
|
||||
#TLS_Cred = "/etc/ssl/certs/freeDiameter.pem", "/etc/ssl/private/freeDiameter.key";
|
||||
TLS_Cred = "@prefix@/etc/freeDiameter/pcrf.cert.pem", "@prefix@/etc/freeDiameter/pcrf.key.pem";
|
||||
TLS_Cred = "@SYSCONF_DIR@/freeDiameter/pcrf.cert.pem", "@SYSCONF_DIR@/freeDiameter/pcrf.key.pem";
|
||||
|
||||
# Certificate authority / trust anchors
|
||||
# The file containing the list of trusted Certificate Authorities (PEM list)
|
||||
|
@ -115,7 +115,7 @@ TLS_Cred = "@prefix@/etc/freeDiameter/pcrf.cert.pem", "@prefix@/etc/freeDiameter
|
|||
# The directive can appear several times to specify several files.
|
||||
# Default : GNUTLS default behavior
|
||||
#TLS_CA = "<file.PEM>";
|
||||
TLS_CA = "@prefix@/etc/freeDiameter/cacert.pem";
|
||||
TLS_CA = "@SYSCONF_DIR@/freeDiameter/cacert.pem";
|
||||
|
||||
# Certificate Revocation List file
|
||||
# The information about revoked certificates.
|
||||
|
@ -223,14 +223,14 @@ TLS_CA = "@prefix@/etc/freeDiameter/cacert.pem";
|
|||
# 4 - full - display the complete information on a single long line
|
||||
# 8 - tree - display the complete information in an easier to read format spanning several lines.
|
||||
|
||||
LoadExtension = "@prefix@/lib/nextepc/dbg_msg_dumps.so" : "0x8888";
|
||||
LoadExtension = "@prefix@/lib/nextepc/dict_rfc5777.so";
|
||||
LoadExtension = "@prefix@/lib/nextepc/dict_mip6i.so";
|
||||
LoadExtension = "@prefix@/lib/nextepc/dict_nasreq.so";
|
||||
LoadExtension = "@prefix@/lib/nextepc/dict_nas_mipv6.so";
|
||||
LoadExtension = "@prefix@/lib/nextepc/dict_dcca.so";
|
||||
LoadExtension = "@prefix@/lib/nextepc/dict_dcca_3gpp.so";
|
||||
#LoadExtension = "@prefix@/lib/nextepc/dict_legacy_xml.so" : "@prefix@/etc/freeDiameter/dict_legacy_xml.conf";
|
||||
LoadExtension = "@LIB_DIR@/nextepc/dbg_msg_dumps.so" : "0x8888";
|
||||
LoadExtension = "@LIB_DIR@/nextepc/dict_rfc5777.so";
|
||||
LoadExtension = "@LIB_DIR@/nextepc/dict_mip6i.so";
|
||||
LoadExtension = "@LIB_DIR@/nextepc/dict_nasreq.so";
|
||||
LoadExtension = "@LIB_DIR@/nextepc/dict_nas_mipv6.so";
|
||||
LoadExtension = "@LIB_DIR@/nextepc/dict_dcca.so";
|
||||
LoadExtension = "@LIB_DIR@/nextepc/dict_dcca_3gpp.so";
|
||||
#LoadExtension = "@LIB_DIR@/nextepc/dict_legacy_xml.so" : "@SYSCONF_DIR@/freeDiameter/dict_legacy_xml.conf";
|
||||
|
||||
|
||||
##############################################################
|
||||
|
|
|
@ -107,7 +107,7 @@ ListenOn = "10.1.35.219";
|
|||
# Default : NO DEFAULT
|
||||
#TLS_Cred = "<x509 certif file.PEM>" , "<x509 private key file.PEM>";
|
||||
#TLS_Cred = "/etc/ssl/certs/freeDiameter.pem", "/etc/ssl/private/freeDiameter.key";
|
||||
TLS_Cred = "@prefix@/etc/freeDiameter/pgw.cert.pem", "@prefix@/etc/freeDiameter/pgw.key.pem";
|
||||
TLS_Cred = "@SYSCONF_DIR@/freeDiameter/pgw.cert.pem", "@SYSCONF_DIR@/freeDiameter/pgw.key.pem";
|
||||
|
||||
# Certificate authority / trust anchors
|
||||
# The file containing the list of trusted Certificate Authorities (PEM list)
|
||||
|
@ -115,7 +115,7 @@ TLS_Cred = "@prefix@/etc/freeDiameter/pgw.cert.pem", "@prefix@/etc/freeDiameter/
|
|||
# The directive can appear several times to specify several files.
|
||||
# Default : GNUTLS default behavior
|
||||
#TLS_CA = "<file.PEM>";
|
||||
TLS_CA = "@prefix@/etc/freeDiameter/cacert.pem";
|
||||
TLS_CA = "@SYSCONF_DIR@/freeDiameter/cacert.pem";
|
||||
|
||||
# Certificate Revocation List file
|
||||
# The information about revoked certificates.
|
||||
|
@ -223,14 +223,14 @@ TLS_CA = "@prefix@/etc/freeDiameter/cacert.pem";
|
|||
# 4 - full - display the complete information on a single long line
|
||||
# 8 - tree - display the complete information in an easier to read format spanning several lines.
|
||||
|
||||
LoadExtension = "@prefix@/lib/nextepc/dbg_msg_dumps.so" : "0x8888";
|
||||
LoadExtension = "@prefix@/lib/nextepc/dict_rfc5777.so";
|
||||
LoadExtension = "@prefix@/lib/nextepc/dict_mip6i.so";
|
||||
LoadExtension = "@prefix@/lib/nextepc/dict_nasreq.so";
|
||||
LoadExtension = "@prefix@/lib/nextepc/dict_nas_mipv6.so";
|
||||
LoadExtension = "@prefix@/lib/nextepc/dict_dcca.so";
|
||||
LoadExtension = "@prefix@/lib/nextepc/dict_dcca_3gpp.so";
|
||||
#LoadExtension = "@prefix@/lib/nextepc/dict_legacy_xml.so" : "@prefix@/etc/freeDiameter/dict_legacy_xml.conf";
|
||||
LoadExtension = "@LIB_DIR@/nextepc/dbg_msg_dumps.so" : "0x8888";
|
||||
LoadExtension = "@LIB_DIR@/nextepc/dict_rfc5777.so";
|
||||
LoadExtension = "@LIB_DIR@/nextepc/dict_mip6i.so";
|
||||
LoadExtension = "@LIB_DIR@/nextepc/dict_nasreq.so";
|
||||
LoadExtension = "@LIB_DIR@/nextepc/dict_nas_mipv6.so";
|
||||
LoadExtension = "@LIB_DIR@/nextepc/dict_dcca.so";
|
||||
LoadExtension = "@LIB_DIR@/nextepc/dict_dcca_3gpp.so";
|
||||
#LoadExtension = "@LIB_DIR@/nextepc/dict_legacy_xml.so" : "@SYSCONF_DIR@/freeDiameter/dict_legacy_xml.conf";
|
||||
|
||||
|
||||
##############################################################
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
DB_URI : "mongodb://localhost/nextepc",
|
||||
LOG_PATH : "@prefix@/var/log/nextepc.log",
|
||||
LOG_PATH : "@localstatedir@/log/nextepc.log",
|
||||
TRACE:
|
||||
{
|
||||
S1AP: 1,
|
||||
|
@ -12,7 +12,7 @@
|
|||
|
||||
MME :
|
||||
{
|
||||
FD_CONF_PATH : "@prefix@/etc/freeDiameter/mme.conf",
|
||||
FD_CONF_PATH : "@sysconfdir@/freeDiameter/mme.conf",
|
||||
|
||||
DEFAULT_PAGING_DRX : "v64",
|
||||
#RELATIVE_CAPACITY : 255,
|
||||
|
@ -50,7 +50,7 @@
|
|||
|
||||
HSS :
|
||||
{
|
||||
FD_CONF_PATH : "@prefix@/etc/freeDiameter/hss.conf",
|
||||
FD_CONF_PATH : "@sysconfdir@/freeDiameter/hss.conf",
|
||||
}
|
||||
|
||||
SGW :
|
||||
|
@ -69,7 +69,7 @@
|
|||
|
||||
PGW :
|
||||
{
|
||||
FD_CONF_PATH : "@prefix@/etc/freeDiameter/pgw.conf",
|
||||
FD_CONF_PATH : "@sysconfdir@/freeDiameter/pgw.conf",
|
||||
|
||||
NETWORK :
|
||||
{
|
||||
|
@ -96,7 +96,7 @@
|
|||
|
||||
PCRF :
|
||||
{
|
||||
FD_CONF_PATH : "@prefix@/etc/freeDiameter/pcrf.conf",
|
||||
FD_CONF_PATH : "@sysconfdir@/freeDiameter/pcrf.conf",
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue