From 7eaad9d812f7b56eadb0a4118eaa9c17b11c5650 Mon Sep 17 00:00:00 2001 From: Quanah Gibson-Mount Date: Wed, 9 Jun 2021 20:23:36 +0000 Subject: [PATCH] ITS#7832 - Correctly configure sysconfdir so that etcdir can be overridden. --- contrib/slapd-modules/ppm/INSTALL.md | 8 +++++--- contrib/slapd-modules/ppm/Makefile | 7 ++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/contrib/slapd-modules/ppm/INSTALL.md b/contrib/slapd-modules/ppm/INSTALL.md index c617478924..0ae238176a 100644 --- a/contrib/slapd-modules/ppm/INSTALL.md +++ b/contrib/slapd-modules/ppm/INSTALL.md @@ -13,9 +13,11 @@ Build Enter contrib/slapd-modules/ppm directory You can optionally customize some variables if you don't want the default ones: -- prefix: prefix of the path where ppm is to be installed (default to /usr/local) -- libdir: where the ppm library is to be deployed (default to /lib under prefix) -- etcdir: where the ppm example policy is to be deployed (default to /etc/openldap under prefix) +- prefix: prefix of the path where ppm is to be installed (defaults to /usr/local) +- ldap_subdir: OpenLDAP specific subdirectory for modules and configurations (defaults to openldap ) +- moduledir: where the ppm module is to be deployed (defaults to $prefix/$libexecdir/$ldap_subdir) +- etcdir: used to compose default sysconfdir location (defaults to $prefix/etc) +- sysconfdir: where the ppm example policy is to be deployed (defaults to $prefix/$etcdir/$ldap_subdir) - LDAP_SRC: path to OpenLDAP source directory - Options in OPTS variable: CONFIG_FILE: (DEPRECATED) path to a ppm configuration file (see PPM_READ_FILE in ppm.h) diff --git a/contrib/slapd-modules/ppm/Makefile b/contrib/slapd-modules/ppm/Makefile index 345fa96d4c..3d5d4ea583 100644 --- a/contrib/slapd-modules/ppm/Makefile +++ b/contrib/slapd-modules/ppm/Makefile @@ -33,7 +33,7 @@ CRACKLIB=$(CRACKLIB_$(CRACK)) DEFS = -DDEBUG $(CRACKDEF) # Define if using a config file: -# -DCONFIG_FILE="\"$(etcdir)/$(EXAMPLE)\"" +# -DCONFIG_FILE="\"$(sysconfdir)/$(EXAMPLE)\"" INCS = $(LDAP_INC) LIBS = $(LDAP_LIB) @@ -52,7 +52,8 @@ libexecdir=$(exec_prefix)/libexec moduledir = $(libexecdir)$(ldap_subdir) mandir = $(exec_prefix)/share/man man5dir = $(mandir)/man5 -etcdir = $(exec_prefix)/etc$(ldap_subdir) +etcdir = $(exec_prefix)/etc +sysconfdir = $(prefix)/$(etcdir)$(ldap_subdir) TEST=ppm_test EXAMPLE=ppm.example @@ -74,7 +75,7 @@ install: ppm for p in $(PROGRAMS); do \ $(LIBTOOL) --mode=install cp $$p $(DESTDIR)/$(moduledir) ; \ done - $(INSTALL) -m 644 $(EXAMPLE) $(DESTDIR)$(etcdir)/ + $(INSTALL) -m 644 $(EXAMPLE) $(DESTDIR)$(sysconfdir)/ # $(INSTALL) -m 755 $(TEST) $(libdir) .PHONY: clean