Wednesday, September 14, 2016

[389-commits] 2 commits - configure configure.ac ldap/admin Makefile.am Makefile.in

Makefile.am | 10 ++++++---
Makefile.in | 18 ++++++++++-------
configure | 4 +++
configure.ac | 3 ++
ldap/admin/src/defaults.inf.in | 43 +++++++++++++++++++++++++++++++++++++++++
5 files changed, 68 insertions(+), 10 deletions(-)

New commits:
commit bb3937ab86febf7ce896788ca0ccf722ac7304f6
Author: William Brown <firstyear@redhat.com>
Date: Wed Sep 14 13:02:03 2016 +1000

Ticket 48983 - Configure and Makefile.in from new default paths work.

Bug Description: At configure time, this is the only time we know all the
resolved paths of a ds installation. However, external tools such as lib389
need to be able to discover and use these paths.

Fix Description: This updates the configure and makefile based on the changes
to create the defaults.inf.

https://fedorahosted.org/389/ticket/48983

Author: wibrown

Review by: tbordaz, mreynolds (Thanks!)

diff --git a/Makefile.in b/Makefile.in
index 17b8d73..cd07f40 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1392,10 +1392,6 @@ build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
capbrand = @capbrand@
-
-#------------------------
-# Install Paths
-#------------------------
configdir = $(sysconfdir)@configdir@
datadir = @datadir@
datarootdir = @datarootdir@
@@ -1473,6 +1469,11 @@ perldir = $(libdir)@perldir@
perlexec = @perlexec@
plainldif_opts = @plainldif_opts@
prefix = @prefix@
+
+#------------------------
+# Install Paths
+#------------------------
+prefixdir = @prefixdir@
program_transform_name = @program_transform_name@
propertydir = $(datadir)@propertydir@
psdir = @psdir@
@@ -2142,7 +2143,8 @@ task_SCRIPTS = ldap/admin/src/scripts/template-bak2db \
inf_DATA = ldap/admin/src/slapd.inf \
ldap/admin/src/scripts/dscreate.map \
ldap/admin/src/scripts/dsupdate.map \
- ldap/admin/src/scripts/dsorgentries.map
+ ldap/admin/src/scripts/dsorgentries.map \
+ ldap/admin/src/defaults.inf

mib_DATA = ldap/servers/snmp/redhat-directory.mib
pkgconfig_DATA = $(PACKAGE_NAME).pc
@@ -3157,7 +3159,8 @@ rsearch_bin_LDADD = $(NSPR_LINK) $(NSS_LINK) $(LDAPSDK_LINK) $(SASL_LINK) $(LIBS
@BUNDLE_FALSE@ -e 's,@ldaplib_defs\@,$(ldaplib_defs),g' \
@BUNDLE_FALSE@ -e 's,@systemdsystemunitdir\@,$(systemdsystemunitdir),g' \
@BUNDLE_FALSE@ -e 's,@systemdsystemconfdir\@,$(systemdsystemconfdir),g' \
-@BUNDLE_FALSE@ -e 's,@systemdgroupname\@,$(systemdgroupname),g'
+@BUNDLE_FALSE@ -e 's,@systemdgroupname\@,$(systemdgroupname),g' \
+@BUNDLE_FALSE@ -e 's,@prefixdir\@,$(prefixdir),g'


# these are for the config files and scripts that we need to generate and replace
@@ -3236,7 +3239,8 @@ rsearch_bin_LDADD = $(NSPR_LINK) $(NSS_LINK) $(LDAPSDK_LINK) $(SASL_LINK) $(LIBS
@BUNDLE_TRUE@ -e 's,@ldaplib_defs\@,$(ldaplib_defs),g' \
@BUNDLE_TRUE@ -e 's,@systemdsystemunitdir\@,$(systemdsystemunitdir),g' \
@BUNDLE_TRUE@ -e 's,@systemdsystemconfdir\@,$(systemdsystemconfdir),g' \
-@BUNDLE_TRUE@ -e 's,@systemdgroupname\@,$(systemdgroupname),g'
+@BUNDLE_TRUE@ -e 's,@systemdgroupname\@,$(systemdgroupname),g' \
+@BUNDLE_TRUE@ -e 's,@prefixdir\@,$(prefixdir),g'

all: $(BUILT_SOURCES) config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
diff --git a/configure b/configure
index a456450..8fbd530 100755
--- a/configure
+++ b/configure
@@ -745,6 +745,7 @@ schemadir
propertydir
sampledatadir
configdir
+prefixdir
with_tmpfiles_d
with_fhs_opt
enable_nunc_stans_FALSE
@@ -18146,6 +18147,7 @@ localrundir='/run'
if test "$with_fhs_opt" = "yes"; then
# Override sysconfdir and localstatedir if FHS optional
# package was requested.
+ prefixdir=$prefix
sysconfdir='/etc/opt'
localstatedir='/var/opt'
localrundir='/var/opt/run'
@@ -18180,6 +18182,7 @@ else
localstatedir='/var'
localrundir='/run'
fi
+ prefixdir=$prefix
# relative to datadir
sampledatadir=/$PACKAGE_NAME/data
# relative to datadir
@@ -18303,6 +18306,7 @@ fi



+
# check for --with-instconfigdir
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-instconfigdir" >&5
$as_echo_n "checking for --with-instconfigdir... " >&6; }


commit 2d48aab2152a0396c957d716cde80f154a2cc975
Author: William Brown <firstyear@redhat.com>
Date: Mon Sep 12 11:30:55 2016 +1000

Ticket 48983 - generate install path info from autotools scripts

Bug Description: At configure time, this is the only time we know all the
resolved paths of a ds installation. However, external tools such as lib389
need to be able to discover and use these paths.

Fix Description: Add a new file to share in a well-known location that well
provide all the paths of ds instance and install. This will allow discovery
of what settings should be used on the associated platform or installation.

https://fedorahosted.org/389/ticket/48983

Author: wibrown

Review by: tbordaz, mreynolds (Thanks!)

diff --git a/Makefile.am b/Makefile.am
index a2f834e..7458ab7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -175,6 +175,7 @@ selinux-built/dirsrv.fc: selinux-built
#------------------------
# Install Paths
#------------------------
+prefixdir = @prefixdir@
configdir = $(sysconfdir)@configdir@
sampledatadir = $(datadir)@sampledatadir@
propertydir = $(datadir)@propertydir@
@@ -724,7 +725,8 @@ endif
inf_DATA = ldap/admin/src/slapd.inf \
ldap/admin/src/scripts/dscreate.map \
ldap/admin/src/scripts/dsupdate.map \
- ldap/admin/src/scripts/dsorgentries.map
+ ldap/admin/src/scripts/dsorgentries.map \
+ ldap/admin/src/defaults.inf

mib_DATA = ldap/servers/snmp/redhat-directory.mib

@@ -1837,7 +1839,8 @@ fixupcmd = sed \
-e 's,@ldaplib_defs\@,$(ldaplib_defs),g' \
-e 's,@systemdsystemunitdir\@,$(systemdsystemunitdir),g' \
-e 's,@systemdsystemconfdir\@,$(systemdsystemconfdir),g' \
- -e 's,@systemdgroupname\@,$(systemdgroupname),g'
+ -e 's,@systemdgroupname\@,$(systemdgroupname),g' \
+ -e 's,@prefixdir\@,$(prefixdir),g'
else
fixupcmd = sed \
-e 's,@bindir\@,$(bindir),g' \
@@ -1906,7 +1909,8 @@ fixupcmd = sed \
-e 's,@ldaplib_defs\@,$(ldaplib_defs),g' \
-e 's,@systemdsystemunitdir\@,$(systemdsystemunitdir),g' \
-e 's,@systemdsystemconfdir\@,$(systemdsystemconfdir),g' \
- -e 's,@systemdgroupname\@,$(systemdgroupname),g'
+ -e 's,@systemdgroupname\@,$(systemdgroupname),g' \
+ -e 's,@prefixdir\@,$(prefixdir),g'
endif

%: %.in
diff --git a/configure.ac b/configure.ac
index c18d2d9..3e0f8aa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -285,6 +285,7 @@ localrundir='/run'
if test "$with_fhs_opt" = "yes"; then
# Override sysconfdir and localstatedir if FHS optional
# package was requested.
+ prefixdir=$prefix
sysconfdir='/etc/opt'
localstatedir='/var/opt'
localrundir='/var/opt/run'
@@ -321,6 +322,7 @@ else
localstatedir='/var'
localrundir='/run'
fi
+ prefixdir=$prefix
# relative to datadir
sampledatadir=/$PACKAGE_NAME/data
# relative to datadir
@@ -414,6 +416,7 @@ else
with_pythonexec=/usr/bin/python2
fi

+AC_SUBST(prefixdir)
AC_SUBST(configdir)
AC_SUBST(sampledatadir)
AC_SUBST(propertydir)
diff --git a/ldap/admin/src/defaults.inf.in b/ldap/admin/src/defaults.inf.in
new file mode 100644
index 0000000..9b02542
--- /dev/null
+++ b/ldap/admin/src/defaults.inf.in
@@ -0,0 +1,43 @@
+; --- BEGIN COPYRIGHT BLOCK ---
+; Copyright (C) 2016 Red Hat, Inc.
+; All rights reserved.
+;
+; License: GPL (version 3 or any later version).
+; See LICENSE for details.
+; --- END COPYRIGHT BLOCK ---
+
+; Author: firstyear at redhat.com
+
+; This is a set of default paths that tools consuming DS should search
+; for paths. This is the foundation of the version 2 ds setup inf
+;
+; All format strings should be in python syntax IE {key}
+
+[slapd]
+product = @capbrand@ Directory Server
+version = @PACKAGE_VERSION@
+user = dirsrv
+group = dirsrv
+root_dn = cn=Directory Manager
+prefix = @prefixdir@
+bin_dir = @bindir@
+sbin_dir = @sbindir@
+lib_dir = @libdir@
+data_dir = @datadir@
+tmp_dir = /tmp
+
+sysconf_dir = @sysconfdir@
+initconfigdir = @initconfigdir@
+config_dir = @instconfigdir@/slapd-{instance_name}
+schema_dir = @instconfigdir@/slapd-{instance_name}/schema
+cert_dir = @instconfigdir@/slapd-{instance_name}
+
+local_state_dir = @localstatedir@
+run_dir = @localstatedir@/run/dirsrv
+lock_dir = @localstatedir@/lock/dirsrv/slapd-{instance_name}
+log_dir = @localstatedir@/log/dirsrv/slapd-{instance_name}
+inst_dir = @localstatedir@/lib/dirsrv/slapd-{instance_name}
+db_dir = @localstatedir@/lib/dirsrv/slapd-{instance_name}/db
+backup_dir = @localstatedir@/lib/dirsrv/slapd-{instance_name}/bak
+ldif_dir = @localstatedir@/lib/dirsrv/slapd-{instance_name}/ldif
+

_______________________________________________
389-commits mailing list -- 389-commits@lists.fedoraproject.org
To unsubscribe send an email to 389-commits-leave@lists.fedoraproject.org

No comments:

Post a Comment