Browse Source

Bug(s) fixed: 205456
Bug Description: Enable core DS build
Reviewed by: nkinder, nhosoi (Thanks!)
Fix Description: I turned off all of the other components in the build,
such as adminserver, setuputil, clients, etc. and enabled the packaging
step when building just the core DS. Now, when you build just the core
DS, you get a slapd.tar.gz which you unpack in the server root you
create e.g. mkdir /opt/rhds ; cd /opt/rhds ; tar xfz slapd.tar.gz
In order to create an instance, you have to use the ds_newinst.pl script
as described here -
http://directory.fedora.redhat.com/wiki/Install_Guide#Installing_just_the_core_directory_server
I also got rid of several references to adminutil that are not needed
anymore.
Platforms tested: RHEL4 64
Flag Day: Yes. In order to build the full setuputil/adminserver
package, you must specify USE_SETUPUTIL=1 USE_ADMINSERVER=1 etc. on the
make/gmake command line.
Doc impact: no
QA impact: should be covered by regular nightly and manual testing
New Tests integrated into TET: I need to change the acceptance tests to
be able to test just the core DS package.

Rich Megginson 19 years ago
parent
commit
1198d440e0
10 changed files with 65 additions and 54 deletions
  1. 26 14
      Makefile
  2. 2 0
      components.mk
  3. 5 11
      httpd/src/Makefile
  4. 2 1
      internal_comp_deps.mk
  5. 22 11
      ldap/cm/Makefile
  6. 0 3
      ldap/servers/plugins/acl/Makefile
  7. 1 3
      lib/base/Makefile
  8. 0 2
      lib/libaccess/Makefile
  9. 0 2
      lib/libadmin/Makefile
  10. 7 7
      nsconfig.mk

+ 26 - 14
Makefile

@@ -130,9 +130,23 @@ help:
 ###### End of implementation notes.
 
 ifeq ($(INTERNAL_BUILD), 1)
-  COMPONENT_DEPENDENCIES = $(ADMINUTIL_DEP) $(NSPR_DEP) $(ARLIB_DEP) $(SECURITY_DEP) $(SVRCORE_DEP) \
-	$(ICU_DEP) $(SETUPUTIL_DEP) $(LDAPSDK_DEP) $(DB_LIB_DEP) $(SASL_DEP) $(NETSNMP_DEP) \
-	$(AXIS_DEP) $(DSMLJAR_DEP) $(DSDOC_DEP) $(ADSYNC_DEP) $(NT4SYNC_DEP) $(PERLDAP_DEP)
+# first list core dependencies
+  COMPONENT_DEPENDENCIES = $(NSPR_DEP) $(SECURITY_DEP) $(SVRCORE_DEP) $(LDAPSDK_DEP) \
+	$(ICU_DEP) $(DB_LIB_DEP) $(SASL_DEP) $(NETSNMP_DEP)
+# these are only for packaging
+  COMPONENT_DEPENDENCIES += $(ADSYNC_DEP) $(NT4SYNC_DEP)
+ifeq ($(USE_PERLDAP), 1)
+  COMPONENT_DEPENDENCIES += $(PERLDAP_DEP)
+endif
+ifeq ($(USE_ADMINSERVER), 1)
+  COMPONENT_DEPENDENCIES += $(ADMINUTIL_DEP) $(DSDOC_DEP)
+endif
+ifeq ($(USE_SETUPUTIL), 1)
+  COMPONENT_DEPENDENCIES += $(SETUPUTIL_DEP)
+endif
+ifeq ($(USE_DSMLGW), 1)
+  COMPONENT_DEPENDENCIES += $(AXIS_DEP) $(DSMLJAR_DEP)
+endif
 endif
 
 components: $(COMPONENT_DEPENDENCIES)
@@ -221,18 +235,18 @@ endif
 	cd ldap; $(MAKE) $(MFLAGS) LDAP_NO_LIBLCACHE=1 BUILD_MODULE=DIRECTORY all
 	@echo ==== Finished LDAP Server ==========
 	@echo
-	@echo ==== Starting LDAP Server Console ==========
-	@echo
-	$(MAKE) $(MFLAGS) buildDirectoryConsole
-	@echo
-	@echo ==== Finished LDAP Server Console ==========
-	@echo
 	@echo ==== Starting LDAP Server Clients ==========
 	@echo
 	$(MAKE) $(MFLAGS) buildDirectoryClients
 	@echo
 	@echo ==== Finished LDAP Server Clients ==========
 	@echo
+	@echo ==== Starting LDAP Server Console ==========
+	@echo
+	$(MAKE) $(MFLAGS) buildDirectoryConsole
+	@echo
+	@echo ==== Finished LDAP Server Console ==========
+	@echo
 
 cleanDirectory:
 	@echo
@@ -258,14 +272,14 @@ ifeq ($(BUILD_JAVA_CODE),1)
 endif
 
 buildDirectoryClients: $(ANT_DEP) java_platform_check
+ifeq ($(USE_DSGW), 1)
+	cd ldap/clients; $(MAKE) _dsgw
+endif
 ifeq ($(BUILD_JAVA_CODE),1)
     ifeq ($(USE_DSMLGW), 1)
 		cd ldap/clients; $(MAKE) _dsmlgw
     endif
 endif
-ifeq ($(USE_DSGW), 1)
-	cd ldap/clients; $(MAKE) _dsgw
-endif
 
 $(OBJDIR):
 	if test ! -d $(OBJDIR); then mkdir -p $(OBJDIR); fi;
@@ -304,9 +318,7 @@ Longduration:
 
 setupDirectory:
 	cd ldap/cm; $(MAKE) $(MFLAGS) releaseDirectory;
-ifeq ($(USE_SETUPUTIL), 1)
 	cd ldap/cm; $(MAKE) $(MFLAGS) packageDirectory;
-endif
 
 pkgDirectoryJars:
 	cd ldap/cm; $(MAKE) $(MFLAGS) packageJars 

+ 2 - 0
components.mk

@@ -544,9 +544,11 @@ else
   ADMINUTIL_INCPATH = $(ADMINUTIL_BUILD_DIR)/include/adminutil-$(ADMINUTIL_DOT_VER)
 endif
 
+ifeq ($(USE_ADMINSERVER), 1)
 PACKAGE_SRC_DEST += $(ADMINUTIL_LIBPATH)/adminutil-properties bin/slapd/lib
 LIBS_TO_PKG += $(wildcard $(ADMINUTIL_LIBPATH)/*.$(DLL_SUFFIX))
 LIBS_TO_PKG_CLIENTS += $(wildcard $(ADMINUTIL_LIBPATH)/*.$(DLL_SUFFIX))
+endif
 
 ifeq ($(ARCH),WINNT)
 ADMINUTIL_LINK = /LIBPATH:$(ADMINUTIL_LIBPATH) libadminutil.$(LIB_SUFFIX)

+ 5 - 11
httpd/src/Makefile

@@ -54,8 +54,6 @@ OBJDEST=$(HTTPD_DIR)/obj
 
 include $(BUILD_ROOT)/nsconfig.mk
 
-MCC_INCLUDE += $(ADMINUTIL_INCLUDE)
-
 ifeq ($(ARCH), WINNT)
 DLLS=$(HTTPD_DIR)/$(HTTPDLL_NAME).dll
 HTTPD_LIB=$(HTTPD_DIR)/$(HTTPDLL_NAME).lib
@@ -154,13 +152,11 @@ ifeq ($(ARCH), WINNT)
 DEPLIBS = $(addsuffix .$(LIB_SUFFIX), $(addprefix $(OBJDIR)/lib/lib, $(LIBADMIN) $(LIBLDAPU) $(LIBACCESS) $(HTTPD_LIBS))) 
 DEPLIBS += $(LIBSECURITY) \
            $(LIBNSPR) \
-           $(LIBLDAP) \
-           $(LIBDBM) \
-	   $(ADMINUTIL_DEP)
+           $(LIBLDAP)
 
 DEPLINK = /LIBPATH:$(OBJDIR)/lib $(addsuffix .$(LIB_SUFFIX), $(addprefix lib, $(LIBADMIN) $(LIBLDAPU) $(LIBACCESS) $(HTTPD_LIBS))) \
-	$(ADMINUTIL_LINK) $(LDAPLINK) $(SECURITYLINK) \
-	$(NSPRLINK) $(DBMLINK)
+	$(LDAPLINK) $(SECURITYLINK) \
+	$(NSPRLINK)
 else
 # unixso.mk may define DEPLIBS
 ifndef DEPLIBS
@@ -171,8 +167,7 @@ DEPLIBS = $(addsuffix .$(LIB_SUFFIX), \
                     $(OBJDIR)/lib/libsi18n \
                     $(LIBSSLIO)
 DEPLIBS += $(SECURITY_DEP) \
-           $(NSPR_DEP) \
-	   $(ADMINUTIL_DEP)
+           $(NSPR_DEP)
 
 DEPLINK = $(addsuffix .$(LIB_SUFFIX), \
                     $(addprefix $(OBJDIR)/lib/lib,$(HTTPD_LIBS)) \
@@ -181,8 +176,7 @@ DEPLINK = $(addsuffix .$(LIB_SUFFIX), \
                     $(OBJDIR)/lib/libsi18n \
                     $(SECURITYLINK) \
                     $(NSPRLINK) \
-                    $(LIBSSLIO) \
-		    $(ADMINUTILLINK)
+                    $(LIBSSLIO)
 endif
 
 endif

+ 2 - 1
internal_comp_deps.mk

@@ -577,7 +577,7 @@ endif
 
 ###########################################################
 ### Admin Server package ##################################
-
+ifeq ($(USE_ADMINSERVER), 1)
 ADMIN_REL = $(ADM_VERSDIR)
 ADMIN_REL_DATE = $(ADM_VERSION)
 ADMIN_FILE := $(ADMINSERVER_PKG)
@@ -610,6 +610,7 @@ endif
 	then echo "Error: could not get component ADMINSERV file $@" ; \
 	exit 1 ; \
 	fi
+endif # USE_ADMINSERVER
 ### Admin Server END ######################################
 
 ### DOCS #################################

+ 22 - 11
ldap/cm/Makefile

@@ -54,7 +54,9 @@ BUILD_ROOT=../..
 TREE_ROOT=$(BUILD_ROOT)
 
 # make sure we pull the admin server component here
+ifeq ($(USE_ADMINSERVER), 1)
 ADMSERV_DEPS = 1
+endif
 
 include $(BUILD_ROOT)/nsconfig.mk
 include $(BUILD_ROOT)/ldap/nsldap.mk
@@ -197,7 +199,7 @@ ADMIN_IMPORTS_TARGZ=$(ADMIN_SERVER_TARGZ)
 ifeq ($(USE_SETUPUTIL), 1)
   LDAP_PACKAGE_FILES:=setup setup.inf setup.res silent.inf unzip_wrapper.pl svrcore dsktune LICENSE.txt README.txt slapd
 else
-  LDAP_PACKAGE_FILES:=setup dsktune slapd
+  LDAP_PACKAGE_FILES:=dsktune slapd
 endif
 
 # these are files we need to put in the command line/console only package
@@ -254,7 +256,7 @@ UNZIP=unzip -o
 UNZIPNOPATHS=$(UNZIP) -j
 ZIP=zip
 ZIP_FLAGS=-r -T
-EXCLUDED_FILES=-x lib/aolsnauth-plugin.*
+EXCLUDED_FILES=
 # Linux Zip has problems zipping gif file over NFS (??)
 ifeq ($(ARCH), Linux)
 ZIP_FLAGS=-r -T -n .gif
@@ -620,15 +622,20 @@ endif # BUILD_RPM
 # load in shared libs from slapd/lib after the setuid
 	chmod 711 $(RELDIR)/bin/slapd/server
 
+$(INSTDIR):
+	$(MKDIR) -p $@
+
 $(INSTDIR)/slapd:
+ifeq ($(USE_SETUPUTIL), 1)
 	$(MKDIR) -p $@
+endif
 
 # Packaging for UNIX is totally different than NT, so we conditionally execute here
 
 ifneq ($(ARCH), WINNT)
 
 # ---THE UNIX PACKAGE---
-packageDirectory: $(INSTDIR)/slapd \
+packageDirectory: $(INSTDIR) $(INSTDIR)/slapd \
 	$(ADMSERV_DEP)
 
 # this gets setup, setup.inf, silent.inf, the zip wrapper, and svrcore, among others
@@ -648,15 +655,10 @@ ifeq ($(DS_BRAND), redhat)
 endif
 endif
 
-ifeq ($(USE_PERLDAP), 1)
-	-@rm -rf $(INSTDIR)/perldap
-	mkdir $(INSTDIR)/perldap
-	cp -R $(PERLDAP_BUILT_DIR)/* $(INSTDIR)/perldap
-	$(PERL) genPerlDAPInf.pl $(INSTDIR)/perldap/perldap.inf 1.5 "Fedora Project"
-endif
-
+ifeq ($(USE_SETUPUTIL), 1)
 # copy in our product .inf files
 	$(INSTALL) -m 755 $(OBJDIR)/*.inf $(INSTDIR)/slapd
+endif
 
 # strip the executables in the optimized build
 ifeq ($(DEBUG), optimize)
@@ -712,6 +714,7 @@ endif # USE_CONSOLE
 #	do $(ZIP) $(ZIP_FLAGS) -g $(INSTDIR)/slapd/slapd-client.zip bin/slapd/server/$$file$(DOTEXE) ; \
 #	done
 
+ifeq ($(USE_SETUPUTIL), 1)
 # create the slapd zip file
 	rm -f $(INSTDIR)/slapd/ns$(DIR).zip
 # create installable package
@@ -734,7 +737,11 @@ endif
 	then $(INSTALL) -m 755 $$file $(INSTDIR)/slapd ; \
 	fi ; \
 	done
+else # !USE_SETUPUTIL
+	cd $(RELDIR); $(TAR) cf - * | gzip > $(ABS_INSTDIR)/slapd.tar.gz
+endif # USE_SETUPUTIL
 
+ifeq ($(USE_ADMINSERVER), 1)
 # if the untar directory is there, hooray; otherwise, we will have to unpack the
 # binaries ourselves . . .
 	if [ ! -d $(ADMSERV_DIR)/admin ] ; \
@@ -747,19 +754,20 @@ endif
 			cp -r $(ADMSERV_DIR)/$$file $(INSTDIR)/$$file ; \
 		done ; \
 	fi
+endif # USE_ADMINSERVER
 
 # make sure setup.inf has everything we need
 ifeq ($(USE_SETUPUTIL),1)
 	cp $(INSTDIR)/setup.inf $(INSTDIR)/setup.inf.tmp
 	$(PERL) -w $(FIX_SETUP_INF) $(INSTDIR)/setup.inf.tmp $(INSTDIR)/setup.inf $(USE_ADMINSERVER)
 	rm -f $(INSTDIR)/setup.inf.tmp
-endif
 
 # we must remove the nsbase.zip file - we package those files now
 	rm -f $(INSTDIR)/base/nsbase.zip
 # we also need to remove the Archive directive from the [base] section of the
 # base.inf file
 #	$(PERL) -w $(FIX_BASE_INF) $(INSTDIR)/base/base.inf
+endif
 
 # Install LDAP Readme and License files at root of Installation (dated pre-packaging) directory.
 # And, replace the License.txt file that is packaged in nssvrcore.zip.
@@ -771,6 +779,7 @@ endif
 # Install dsktune at root of Installation
 	cp $(RELDIR)/bin/slapd/server/dsktune $(INSTDIR)
 
+ifeq ($(USE_SETUPUTIL), 1)
 ifndef NO_INSTALLER_TAR_FILES
 # build the slapd package tar file
 	cd $(INSTDIR); $(TAR) cvf - slapd \
@@ -795,6 +804,8 @@ endif # BUILD_SHIP
 #cp $(INSTDIR)/all$(NS_BUILD_FLAVOR).tar.gz  $(BUILD_SHIP)
 # $(INSTDIR) is used to build international products.
 endif
+endif # USE_SETUPUTIL
+
 ifdef BUILD_RPM
 # make the .spec file - actually lives in OBJDIR
 	$(MAKE) $(MFLAGS) -C $(BUILD_ROOT) $(RPM_BASE_NAME)-ds.spec

+ 0 - 3
ldap/servers/plugins/acl/Makefile

@@ -54,9 +54,6 @@ LIBDIR = $(LIB_RELDIR)
 include $(BUILD_ROOT)/nsconfig.mk
 include $(LDAP_SRC)/nsldap.mk
 
-# ACL plugin depends on libadminutil
-#MCC_INCLUDE += $(ADMINUTIL_INCLUDE)
-
 ifeq ($(ARCH), WINNT)
 DEF_FILE:=./libacl.def
 endif

+ 1 - 3
lib/base/Makefile

@@ -58,9 +58,7 @@ else
 LIBS=$(OBJDIR)/lib/libbase.a
 endif
 
-MCC_INCLUDE += $(ADMINUTIL_INCLUDE)
-
-LOCAL_DEPS = $(NSPR_DEP) $(ADMINUTIL_DEP) $(SECURITY_DEP) $(DBM_DEP)
+LOCAL_DEPS = $(NSPR_DEP) $(SECURITY_DEP)
 
 all: $(LOCAL_DEPS) $(OBJDEST) $(LIBS) $(BSCS)
 

+ 0 - 2
lib/libaccess/Makefile

@@ -50,8 +50,6 @@ LEX=flex
 
 include $(BUILD_ROOT)/nsconfig.mk
 
-MCC_INCLUDE += $(ADMINUTIL_INCLUDE)
-
 ifeq ($(ARCH), WINNT)
 LIBS=$(OBJDIR)/lib/libaccess.lib
 CC=cl -nologo -MT

+ 0 - 2
lib/libadmin/Makefile

@@ -69,8 +69,6 @@ all: $(OBJDEST) $(LIBS)
 #$(LIBS): $(addprefix $(BUILD_ROOT)/include/libadmin/, \
 #                     hadm_msgs.i la_msgs.i)
 
-MCC_INCLUDE += $(ADMINUTIL_INCLUDE)
-
 #ifeq ($(ARCH), HPUX)
 #CC=$(CCC)
 #endif

+ 7 - 7
nsconfig.mk

@@ -60,13 +60,13 @@ MAKE=gmake $(BUILDOPT)
 
 # all of these things are on by default for internal builds
 ifdef INTERNAL_BUILD
-	USE_ADMINSERVER:=1
-	USE_CONSOLE:=1
-	USE_DSMLGW:=1
-	USE_ORGCHART:=1
-	USE_DSGW:=1
-	USE_JAVATOOLS:=1
-	USE_SETUPUTIL:=1
+	USE_ADMINSERVER:=0
+	USE_CONSOLE:=0
+	USE_DSMLGW:=0
+	USE_ORGCHART:=0
+	USE_DSGW:=0
+	USE_JAVATOOLS:=0
+	USE_SETUPUTIL:=0
 	USE_PERLDAP:=1
 else
 	USE_ADMINSERVER:=1