diff options
author | Rich Megginson <rmeggins@redhat.com> | 2005-10-21 19:21:19 +0000 |
---|---|---|
committer | Rich Megginson <rmeggins@redhat.com> | 2005-10-21 19:21:19 +0000 |
commit | 35f8ea348b5f4c08f8e09130db59abddd849d870 (patch) | |
tree | 4089978c5ec8c123e0c4c81bc8b7f06683bca8a7 /ldap/cm | |
parent | 8216af284bf01728074d474131ae781e6033055c (diff) | |
download | ds-35f8ea348b5f4c08f8e09130db59abddd849d870.tar.gz ds-35f8ea348b5f4c08f8e09130db59abddd849d870.tar.xz ds-35f8ea348b5f4c08f8e09130db59abddd849d870.zip |
Bug(s) fixed: 171066
Bug Description: Get rid of nsperl; use perldap with system perl
Reviewed by: Noriko, Rob, Nathan (Thanks!)
Branch: HEAD
Fix Description: All perl scripts are made executable by using the
#!/usr/bin/env perl *nix trick. This means that the correct version of
perl must be in the user's PATH e.g. 5.6.1 or later. This version is
either shipped with the OS or available on all platforms. On HP/ux, it
is available as a depot which is installed in /opt/perl. For CGI perl
scripts, the PATH can be set in the admserv.conf, so we may have to do
that for HP/ux. To make perldap work, some ugly hacks are involved.
Each perl script that uses perldap has a BEGIN section that figures out
where it is in the server root, sets a server root variable, and sets
LD_LIBRARY_PATH and SHLIB_PATH to point to serverroot/shared/lib.
Perldap will be installed under serverroot/lib/perl. This directory
will have 3 subdirectories: arch - containing the binary files; auto -
containing autoloaded perl modules; and Mozilla - containing the base
perldap .pm files. The BEGIN section also sets the perl INC path to
find those modules. The directory gets rid of nsperl plus a lot of old
crufty perl building code that we do not use anymore. Those are the
removed files. The admin server code also gets rid of the perl.c wrapper.
Noriko pointed out that this does not take care of upgrade install, so I
added several more files and diffs to take care of that case.
Basically, go through the tasks in o=netscaperoot and replace
perl?scriptname with just scriptname. Also, go through all of the
template generated scripts and replace the shebang line with
#!/usr/bin/env perl, and make sure they are chmod +x. I also found a
few more places that referenced nsperl and removed them.
Platforms tested: RHEL4
Flag Day: no
Doc impact: no
QA impact: should be covered by regular nightly and manual testing
New Tests integrated into TET: none
Diffstat (limited to 'ldap/cm')
-rw-r--r-- | ldap/cm/Makefile | 39 | ||||
-rw-r--r-- | ldap/cm/fixSetupInf.pl | 9 | ||||
-rwxr-xr-x | ldap/cm/newinst/ns-update | 18 | ||||
-rwxr-xr-x | ldap/cm/newinst/setup.sh | 6 | ||||
-rw-r--r-- | ldap/cm/newinst/slapd.inf | 3 | ||||
-rw-r--r-- | ldap/cm/newinstnt/slapd.inf | 3 |
6 files changed, 14 insertions, 64 deletions
diff --git a/ldap/cm/Makefile b/ldap/cm/Makefile index 70bb9f55..6764e876 100644 --- a/ldap/cm/Makefile +++ b/ldap/cm/Makefile @@ -185,6 +185,10 @@ DOTEXE = .exe PACKAGE_STAGE_DIR=$(OBJDIR)/package endif +ifdef INTERNAL_BUILD + PERLDAP := perldap +endif + # these are files and directories in the import adminsrv directory which we don't # make a local copy of, we just import directly into the tar file or create a # symlink to @@ -565,29 +569,6 @@ ifdef INTERNAL_BUILD $(PERL) -w fixPerlDAPInf.pl $(dir $@)/perldap.inf endif -# this is the rule to pull nsPerl -ifndef NSPERL_PULL_METHOD -NSPERL_PULL_METHOD = FTP -endif - -$(INSTDIR)/nsperl/$(NSPERL_ZIP_FILE): -ifdef INTERNAL_BUILD - $(RM) $@ - $(FTP_PULL) -method $(NSPERL_PULL_METHOD) \ - -objdir $(dir $@) \ - -componentdir $(NSPERL_COMPONENT_DIR) \ - -files $(notdir $@),nsperl.inf - @if [ ! -f $@ ] ; \ - then echo "Error: could not get component NSPERL file $@" ; \ - exit 1 ; \ - fi - $(PERL) -w fixNSPerlInf.pl $(dir $@)/nsperl.inf nsperl561 -# one more hack to nsperl - we must remove LDIF.pm because it -# conflicts with the one in perldap - bug 600138 -# SITEHACK is defined in nsperl.mk -# $(ZIP) -d $(dir $@)/$(NSPERL_ZIP_FILE) lib/nsPerl5.6.1/$(SITEHACK)/Mozilla/LDAP/LDIF.pm -endif - $(INSTDIR)/slapd: $(MKDIR) -p $@ @@ -597,7 +578,6 @@ ifneq ($(ARCH), WINNT) # ---THE UNIX PACKAGE--- packageDirectory: $(INSTDIR)/slapd \ - $(INSTDIR)/nsperl/$(NSPERL_ZIP_FILE) \ $(INSTDIR)/perldap/$(PERLDAP_ZIP_FILE) \ $(ADMSERV_DEP) @@ -712,15 +692,15 @@ ifndef NO_INSTALLER_TAR_FILES # build the combined packages tar file; use h flag to follow symlinks ifdef BUILD_SHIP ifndef BUILD_PATCH - cd $(INSTDIR); $(TAR) cvfh - setup.inf setup slapd nsperl \ - perldap dsktune $(ADMIN_IMPORTS) | gzip -f > $(BUILD_SHIP)/$(FTPNAMEGZ) + cd $(INSTDIR); $(TAR) cvfh - setup.inf setup slapd \ + $(PERLDAP) dsktune $(ADMIN_IMPORTS) | gzip -f > $(BUILD_SHIP)/$(FTPNAMEGZ) endif ifeq ($(DEBUG), optimize) # $(REMSH) "/u/svbld/bin/preRtm $(BUILD_SHIP) $(FTPNAMEGZ) svbld" endif else - cd $(INSTDIR); $(TAR) cvfh - setup.inf setup slapd nsperl \ - perldap dsktune $(ADMIN_IMPORTS) | gzip -f > ../all$(NS_BUILD_FLAVOR).tar.gz + cd $(INSTDIR); $(TAR) cvfh - setup.inf setup slapd \ + $(PERLDAP) dsktune $(ADMIN_IMPORTS) | gzip -f > ../all$(NS_BUILD_FLAVOR).tar.gz endif # BUILD_SHIP #cp $(INSTDIR).tar.gz $(BUILD_SHIP) #cp $(INSTDIR)/all$(NS_BUILD_FLAVOR).tar.gz $(BUILD_SHIP) @@ -891,8 +871,7 @@ ifeq ($(ARCH), WINNT) SLAPD_DIR=slapd -_perl: $(INSTDIR)/nsperl/$(NSPERL_ZIP_FILE) \ - $(INSTDIR)/perldap/$(PERLDAP_ZIP_FILE) +_perl: $(INSTDIR)/perldap/$(PERLDAP_ZIP_FILE) # ------------------------- all below this line is packageDirectory -------------------------- diff --git a/ldap/cm/fixSetupInf.pl b/ldap/cm/fixSetupInf.pl index 50ee87f8..ca9b990b 100644 --- a/ldap/cm/fixSetupInf.pl +++ b/ldap/cm/fixSetupInf.pl @@ -65,10 +65,6 @@ while ( <FILE> ) { $_ .= ", slapd"; $addedSlapd = 1; } - if (! /nsperl/) { - $_ .= ", nsperl"; - $addedNSperl = 1; - } if (! /perldap/) { $_ .= ", perldap"; $addedPerLDAP = 1; @@ -99,11 +95,6 @@ if ($addedSlapd) { print OUT "ComponentInfoFile = slapd/slapd.inf\n"; } -if ($addedNSperl) { - print OUT "\n[nsperl]\n"; - print OUT "ComponentInfoFile = nsperl/nsperl.inf\n"; -} - if ($addedPerLDAP) { print OUT "\n[perldap]\n"; print OUT "ComponentInfoFile = perldap/perldap.inf\n"; diff --git a/ldap/cm/newinst/ns-update b/ldap/cm/newinst/ns-update index 24676d6a..ba283995 100755 --- a/ldap/cm/newinst/ns-update +++ b/ldap/cm/newinst/ns-update @@ -44,7 +44,7 @@ # dependencies sroot=`echo $0 | sed s#/bin/slapd/admin/bin/.\*##g` -PERL=$sroot/bin/slapd/admin/bin/perl +PERL=perl # just use perl from PATH start_server() { @@ -60,18 +60,6 @@ start_server() cd $cwd } -install_nsperl() -{ - # the current version of nsPerl to use is defined in the slapd.inf - nsperlinst=`grep '^NSPerlPostInstall' setup/slapd/slapd.inf | cut -f2 -d= 2> /dev/null` - if [ "$nsperlinst" ]; then - # run the nsperl installer - $nsperlinst > setup/nsperl/install.log - # use nsperl as our local copy of perl - cp `dirname $nsperlinst`/nsperl $PERL - fi -} - wrap_security_tools() { cwd=`pwd` @@ -148,8 +136,6 @@ if [ "$iDSISolaris" = "" ]; then fi done fi - - install_nsperl fi if [ $reconfig ] ; then @@ -171,6 +157,8 @@ if [ $reconfig ] ; then start_server $sroot $dir echo "" done + # fix any non-instance specific files - omit server instance argument + $PERL $sroot/bin/slapd/admin/bin/upgradeServer $sroot fi wrap_security_tools $sroot diff --git a/ldap/cm/newinst/setup.sh b/ldap/cm/newinst/setup.sh index b5c9b6a3..640d416b 100755 --- a/ldap/cm/newinst/setup.sh +++ b/ldap/cm/newinst/setup.sh @@ -39,11 +39,5 @@ setupdir=`dirname $0` cd ${setupdir} -# Configure nsPerl -if [ ! -f "./tools/perl" ]; then - ./tools/nsPerl5.6.1/install > /dev/null - ln -s ./nsPerl5.6.1/nsperl ./tools/perl -fi - # Kick off setup script ./setup.pl $* diff --git a/ldap/cm/newinst/slapd.inf b/ldap/cm/newinst/slapd.inf index c3c826e3..863c8ab7 100644 --- a/ldap/cm/newinst/slapd.inf +++ b/ldap/cm/newinst/slapd.inf @@ -52,7 +52,7 @@ Expires= %%%PUMPKIN_HOUR%%% Security= %%%SECURITY%%% Vendor= Fedora Project Description= %%%SERVER_NAME%%% -Dependencies= base/4.5, svrcore/4.5, nsperl561/1.13, perldap14/1.01 +Dependencies= base/4.5, svrcore/4.5 ProductName=Directory Server IsDirLite=%%%IS_DIR_LITE%%% SourcePath=slapd @@ -65,7 +65,6 @@ PostUninstall= Checked=True Mandatory=False IsLdap=True -NSPerlPostInstall=lib/nsPerl5.6.1/install [slapd-client] Name= Fedora Directory Server Console diff --git a/ldap/cm/newinstnt/slapd.inf b/ldap/cm/newinstnt/slapd.inf index b3df80ae..fc2917a3 100644 --- a/ldap/cm/newinstnt/slapd.inf +++ b/ldap/cm/newinstnt/slapd.inf @@ -55,7 +55,7 @@ Security= %%%SECURITY%%% Vendor=Fedora Project Description=Fedora Directory Server DefaultAcceptLanguage=en -Dependencies=admin/4.5,nsperl561/1.10,perldap14/1.01 +Dependencies=admin/4.5 Revision= Checked=TRUE IsLdap=TRUE @@ -75,7 +75,6 @@ ReadGlobalCache=DSINST_ReadGlobalCache PostInstall=DSINST_PostInstall PreUninstall=DSINST_PreUnInstall PostUninstall=DSINST_PostUnInstall -NSPerlPostInstall=lib\nsPerl5.6.1\install.bat [slapd-client] NickName=slapd-client |