|
|
dc8c34 |
From dd6784cefeaf50f3e6456107d2e2766e98a0019e Mon Sep 17 00:00:00 2001
|
|
|
dc8c34 |
From: William Brown <firstyear@redhat.com>
|
|
|
dc8c34 |
Date: Mon, 12 Sep 2016 11:30:55 +1000
|
|
|
dc8c34 |
Subject: [PATCH] Ticket 48983 - generate install path info from autotools
|
|
|
dc8c34 |
scripts
|
|
|
dc8c34 |
|
|
|
dc8c34 |
Bug Description: At configure time, this is the only time we know all the
|
|
|
dc8c34 |
resolved paths of a ds installation. However, external tools such as lib389
|
|
|
dc8c34 |
need to be able to discover and use these paths.
|
|
|
dc8c34 |
|
|
|
dc8c34 |
Fix Description: Add a new file to share in a well-known location that well
|
|
|
dc8c34 |
provide all the paths of ds instance and install. This will allow discovery
|
|
|
dc8c34 |
of what settings should be used on the associated platform or installation.
|
|
|
dc8c34 |
|
|
|
dc8c34 |
https://fedorahosted.org/389/ticket/48983
|
|
|
dc8c34 |
|
|
|
dc8c34 |
Author: wibrown
|
|
|
dc8c34 |
|
|
|
dc8c34 |
Review by: mreynolds, tbordaz(Thanks)
|
|
|
dc8c34 |
|
|
|
dc8c34 |
(cherry picked from commit 90346683273ba64ce92582fd09edb838cf9d28f6)
|
|
|
dc8c34 |
---
|
|
|
dc8c34 |
Makefile.am | 10 ++++++---
|
|
|
dc8c34 |
configure.ac | 3 +++
|
|
|
dc8c34 |
ldap/admin/src/defaults.inf.in | 51 ++++++++++++++++++++++++++++++++++++++++++
|
|
|
dc8c34 |
3 files changed, 61 insertions(+), 3 deletions(-)
|
|
|
dc8c34 |
create mode 100644 ldap/admin/src/defaults.inf.in
|
|
|
dc8c34 |
|
|
|
dc8c34 |
diff --git a/Makefile.am b/Makefile.am
|
|
|
dc8c34 |
index bc40ea7..a808269 100644
|
|
|
dc8c34 |
--- a/Makefile.am
|
|
|
dc8c34 |
+++ b/Makefile.am
|
|
|
dc8c34 |
@@ -136,6 +136,7 @@ selinux-built/dirsrv.fc: selinux-built
|
|
|
dc8c34 |
#------------------------
|
|
|
dc8c34 |
# Install Paths
|
|
|
dc8c34 |
#------------------------
|
|
|
dc8c34 |
+prefixdir = @prefixdir@
|
|
|
dc8c34 |
configdir = $(sysconfdir)@configdir@
|
|
|
dc8c34 |
sampledatadir = $(datadir)@sampledatadir@
|
|
|
dc8c34 |
propertydir = $(datadir)@propertydir@
|
|
|
dc8c34 |
@@ -413,7 +414,8 @@ endif
|
|
|
dc8c34 |
inf_DATA = ldap/admin/src/slapd.inf \
|
|
|
dc8c34 |
ldap/admin/src/scripts/dscreate.map \
|
|
|
dc8c34 |
ldap/admin/src/scripts/dsupdate.map \
|
|
|
dc8c34 |
- ldap/admin/src/scripts/dsorgentries.map
|
|
|
dc8c34 |
+ ldap/admin/src/scripts/dsorgentries.map \
|
|
|
dc8c34 |
+ ldap/admin/src/defaults.inf
|
|
|
dc8c34 |
|
|
|
dc8c34 |
mib_DATA = ldap/servers/snmp/redhat-directory.mib
|
|
|
dc8c34 |
|
|
|
dc8c34 |
@@ -1475,7 +1477,8 @@ fixupcmd = sed \
|
|
|
dc8c34 |
-e 's,@ldaplib_defs\@,$(ldaplib_defs),g' \
|
|
|
dc8c34 |
-e 's,@systemdsystemunitdir\@,$(systemdsystemunitdir),g' \
|
|
|
dc8c34 |
-e 's,@systemdsystemconfdir\@,$(systemdsystemconfdir),g' \
|
|
|
dc8c34 |
- -e 's,@systemdgroupname\@,$(systemdgroupname),g'
|
|
|
dc8c34 |
+ -e 's,@systemdgroupname\@,$(systemdgroupname),g' \
|
|
|
dc8c34 |
+ -e 's,@prefixdir\@,$(prefixdir),g'
|
|
|
dc8c34 |
else
|
|
|
dc8c34 |
fixupcmd = sed \
|
|
|
dc8c34 |
-e 's,@bindir\@,$(bindir),g' \
|
|
|
dc8c34 |
@@ -1541,7 +1544,8 @@ fixupcmd = sed \
|
|
|
dc8c34 |
-e 's,@ldaplib_defs\@,$(ldaplib_defs),g' \
|
|
|
dc8c34 |
-e 's,@systemdsystemunitdir\@,$(systemdsystemunitdir),g' \
|
|
|
dc8c34 |
-e 's,@systemdsystemconfdir\@,$(systemdsystemconfdir),g' \
|
|
|
dc8c34 |
- -e 's,@systemdgroupname\@,$(systemdgroupname),g'
|
|
|
dc8c34 |
+ -e 's,@systemdgroupname\@,$(systemdgroupname),g' \
|
|
|
dc8c34 |
+ -e 's,@prefixdir\@,$(prefixdir),g'
|
|
|
dc8c34 |
endif
|
|
|
dc8c34 |
|
|
|
dc8c34 |
%: %.in
|
|
|
dc8c34 |
diff --git a/configure.ac b/configure.ac
|
|
|
dc8c34 |
index df02cff..2859c23 100644
|
|
|
dc8c34 |
--- a/configure.ac
|
|
|
dc8c34 |
+++ b/configure.ac
|
|
|
dc8c34 |
@@ -237,6 +237,7 @@ m4_include(m4/fhs.m4)
|
|
|
dc8c34 |
if test "$with_fhs_opt" = "yes"; then
|
|
|
dc8c34 |
# Override sysconfdir and localstatedir if FHS optional
|
|
|
dc8c34 |
# package was requested.
|
|
|
dc8c34 |
+ prefixdir=$prefix
|
|
|
dc8c34 |
sysconfdir='/etc/opt'
|
|
|
dc8c34 |
localstatedir='/var/opt'
|
|
|
dc8c34 |
# relative to datadir
|
|
|
dc8c34 |
@@ -269,6 +270,7 @@ else
|
|
|
dc8c34 |
dnl as opposed to the default /usr/var
|
|
|
dc8c34 |
localstatedir='/var'
|
|
|
dc8c34 |
fi
|
|
|
dc8c34 |
+ prefixdir=$prefix
|
|
|
dc8c34 |
# relative to datadir
|
|
|
dc8c34 |
sampledatadir=/$PACKAGE_NAME/data
|
|
|
dc8c34 |
# relative to datadir
|
|
|
dc8c34 |
@@ -388,6 +390,7 @@ if test -n "$with_systemdsystemunitdir" -o -n "$with_systemdsystemconfdir" ; the
|
|
|
dc8c34 |
AC_SUBST(with_systemdgroupname)
|
|
|
dc8c34 |
fi
|
|
|
dc8c34 |
|
|
|
dc8c34 |
+AC_SUBST(prefixdir)
|
|
|
dc8c34 |
AC_SUBST(configdir)
|
|
|
dc8c34 |
AC_SUBST(sampledatadir)
|
|
|
dc8c34 |
AC_SUBST(propertydir)
|
|
|
dc8c34 |
diff --git a/ldap/admin/src/defaults.inf.in b/ldap/admin/src/defaults.inf.in
|
|
|
dc8c34 |
new file mode 100644
|
|
|
dc8c34 |
index 0000000..e4ce74a
|
|
|
dc8c34 |
--- /dev/null
|
|
|
dc8c34 |
+++ b/ldap/admin/src/defaults.inf.in
|
|
|
dc8c34 |
@@ -0,0 +1,51 @@
|
|
|
dc8c34 |
+; --- BEGIN COPYRIGHT BLOCK ---
|
|
|
dc8c34 |
+; Copyright (C) 2016 Red Hat, Inc.
|
|
|
dc8c34 |
+; All rights reserved.
|
|
|
dc8c34 |
+;
|
|
|
dc8c34 |
+; License: GPL (version 3 or any later version).
|
|
|
dc8c34 |
+; See LICENSE for details.
|
|
|
dc8c34 |
+; --- END COPYRIGHT BLOCK ---
|
|
|
dc8c34 |
+
|
|
|
dc8c34 |
+; Author: firstyear at redhat.com
|
|
|
dc8c34 |
+
|
|
|
dc8c34 |
+; This is a set of default paths that tools consuming DS should search
|
|
|
dc8c34 |
+; for paths. This is the foundation of the version 2 ds setup inf
|
|
|
dc8c34 |
+;
|
|
|
dc8c34 |
+; All format strings should be in python syntax IE {key}
|
|
|
dc8c34 |
+
|
|
|
dc8c34 |
+[slapd]
|
|
|
dc8c34 |
+; These values should NOT be altered in an installation.
|
|
|
dc8c34 |
+; This is because the server itself depends on these locations and values
|
|
|
dc8c34 |
+; being known, and are set at compilation time.
|
|
|
dc8c34 |
+product = @capbrand@ Directory Server
|
|
|
dc8c34 |
+version = @PACKAGE_VERSION@
|
|
|
dc8c34 |
+; In 1.2.xx, this will never be true.
|
|
|
dc8c34 |
+asan_enabled = false
|
|
|
dc8c34 |
+prefix = @prefixdir@
|
|
|
dc8c34 |
+bin_dir = @bindir@
|
|
|
dc8c34 |
+sbin_dir = @sbindir@
|
|
|
dc8c34 |
+lib_dir = @libdir@
|
|
|
dc8c34 |
+data_dir = @datadir@
|
|
|
dc8c34 |
+tmp_dir = /tmp
|
|
|
dc8c34 |
+sysconf_dir = @sysconfdir@
|
|
|
dc8c34 |
+initconfig_dir = @initconfigdir@
|
|
|
dc8c34 |
+config_dir = @instconfigdir@/slapd-{instance_name}
|
|
|
dc8c34 |
+local_state_dir = @localstatedir@
|
|
|
dc8c34 |
+run_dir = @localstatedir@/run/dirsrv
|
|
|
dc8c34 |
+plugin_dir = @serverplugindir@
|
|
|
dc8c34 |
+
|
|
|
dc8c34 |
+; These values can be altered in an installation of ds
|
|
|
dc8c34 |
+user = dirsrv
|
|
|
dc8c34 |
+group = dirsrv
|
|
|
dc8c34 |
+root_dn = cn=Directory Manager
|
|
|
dc8c34 |
+
|
|
|
dc8c34 |
+schema_dir = @instconfigdir@/slapd-{instance_name}/schema
|
|
|
dc8c34 |
+cert_dir = @instconfigdir@/slapd-{instance_name}
|
|
|
dc8c34 |
+
|
|
|
dc8c34 |
+lock_dir = @localstatedir@/lock/dirsrv/slapd-{instance_name}
|
|
|
dc8c34 |
+log_dir = @localstatedir@/log/dirsrv/slapd-{instance_name}
|
|
|
dc8c34 |
+inst_dir = @localstatedir@/lib/dirsrv/slapd-{instance_name}
|
|
|
dc8c34 |
+db_dir = @localstatedir@/lib/dirsrv/slapd-{instance_name}/db
|
|
|
dc8c34 |
+backup_dir = @localstatedir@/lib/dirsrv/slapd-{instance_name}/bak
|
|
|
dc8c34 |
+ldif_dir = @localstatedir@/lib/dirsrv/slapd-{instance_name}/ldif
|
|
|
dc8c34 |
+
|
|
|
dc8c34 |
--
|
|
|
dc8c34 |
2.4.11
|
|
|
dc8c34 |
|