[Fedora-directory-commits] ldapserver component_versions.mk, 1.35.2.1, 1.35.2.2
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3692
Modified Files:
Tag: Directory71RtmBranch
component_versions.mk
Log Message:
[171306] Cleanup of admin server code
(component_versions.mk ldap/cm/Makefile ldap/cm/fedora-patch.inf ldap/cm/redhat-patch.inf ldap/cm/genRpmPatch.pl)
[171349] JRE,JSS files in DS 7.1 SP1 package appear changed due to stripping
(ldap/cm/Makefile)
Index: component_versions.mk
===================================================================
RCS file: /cvs/dirsec/ldapserver/component_versions.mk,v
retrieving revision 1.35.2.1
retrieving revision 1.35.2.2
diff -u -r1.35.2.1 -r1.35.2.2
--- component_versions.mk 13 Sep 2005 21:25:26 -0000 1.35.2.1
+++ component_versions.mk 22 Oct 2005 00:07:40 -0000 1.35.2.2
@@ -122,7 +122,7 @@
# admin server
ifndef ADM_RELDATE
- ADM_RELDATE = 20050512
+ ADM_RELDATE = 20051017
endif
ifndef ADM_VERSDIR
ADM_VERSDIR = adminserver/70$(BUILD_MODE)
@@ -250,7 +250,7 @@
endif
ifndef ADSYNC_VERSION
- ADSYNC_VERSION=20050912
+ ADSYNC_VERSION=20051017
endif
ifndef NT4SYNC_VERSION
18 years, 7 months
[Fedora-directory-commits] ldapserver/ldap/ldif commonTasks.ldif, 1.4, 1.5 tasks.ldif, 1.5, 1.6
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/ldif
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27230/ldapserver/ldap/ldif
Modified Files:
commonTasks.ldif tasks.ldif
Log Message:
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
Index: commonTasks.ldif
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/ldif/commonTasks.ldif,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- commonTasks.ldif 19 Apr 2005 22:07:26 -0000 1.4
+++ commonTasks.ldif 21 Oct 2005 19:21:19 -0000 1.5
@@ -56,7 +56,7 @@
objectclass: top
objectclass: nstask
objectclass: nsAdminObject
-nsexecref: perl?migrateInstance
+nsexecref: migrateInstance
dn: cn=Create, cn=Operation, cn=Tasks
objectclass: top
@@ -68,10 +68,10 @@
objectclass: top
objectclass: nstask
objectclass: nsAdminObject
-nsexecref: perl?getConfigInfo
+nsexecref: getConfigInfo
dn: cn=MigrateLocalDB, cn=Operation, cn=Tasks
objectclass: top
objectclass: nstask
objectclass: nsAdminObject
-nsexecref: perl?migrateLocalDB
+nsexecref: migrateLocalDB
Index: tasks.ldif
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/ldif/tasks.ldif,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- tasks.ldif 19 Apr 2005 22:07:26 -0000 1.5
+++ tasks.ldif 21 Oct 2005 19:21:19 -0000 1.6
@@ -133,7 +133,7 @@
objectclass: top
objectclass: nstask
objectclass: nsAdminObject
-nsexecref: perl?ds_viewlog.pl
+nsexecref: ds_viewlog.pl
dn: cn=ListBackups, cn=operation, cn=Tasks
objectclass: top
18 years, 7 months
[Fedora-directory-commits] ldapserver/ldap/cm/newinstnt slapd.inf, 1.6, 1.7
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/cm/newinstnt
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27230/ldapserver/ldap/cm/newinstnt
Modified Files:
slapd.inf
Log Message:
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
Index: slapd.inf
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/cm/newinstnt/slapd.inf,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- slapd.inf 19 Apr 2005 22:07:21 -0000 1.6
+++ slapd.inf 21 Oct 2005 19:21:18 -0000 1.7
@@ -55,7 +55,7 @@
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 @@
PostInstall=DSINST_PostInstall
PreUninstall=DSINST_PreUnInstall
PostUninstall=DSINST_PostUnInstall
-NSPerlPostInstall=lib\nsPerl5.6.1\install.bat
[slapd-client]
NickName=slapd-client
18 years, 7 months
[Fedora-directory-commits] ldapserver/ldap/cm/newinst ns-update, 1.7, 1.8 setup.sh, 1.5, 1.6 slapd.inf, 1.6, 1.7
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/cm/newinst
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27230/ldapserver/ldap/cm/newinst
Modified Files:
ns-update setup.sh slapd.inf
Log Message:
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
Index: ns-update
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/cm/newinst/ns-update,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ns-update 3 Oct 2005 19:53:54 -0000 1.7
+++ ns-update 21 Oct 2005 19:21:18 -0000 1.8
@@ -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 @@
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 @@
fi
done
fi
-
- install_nsperl
fi
if [ $reconfig ] ; then
@@ -171,6 +157,8 @@
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
Index: setup.sh
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/cm/newinst/setup.sh,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- setup.sh 3 May 2005 01:19:22 -0000 1.5
+++ setup.sh 21 Oct 2005 19:21:18 -0000 1.6
@@ -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 $*
Index: slapd.inf
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/cm/newinst/slapd.inf,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- slapd.inf 19 Apr 2005 22:07:20 -0000 1.6
+++ slapd.inf 21 Oct 2005 19:21:18 -0000 1.7
@@ -52,7 +52,7 @@
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 @@
Checked=True
Mandatory=False
IsLdap=True
-NSPerlPostInstall=lib/nsPerl5.6.1/install
[slapd-client]
Name= Fedora Directory Server Console
18 years, 7 months
[Fedora-directory-commits] ldapserver/ldap/cm Makefile, 1.35, 1.36 fixSetupInf.pl, 1.6, 1.7
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/cm
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27230/ldapserver/ldap/cm
Modified Files:
Makefile fixSetupInf.pl
Log Message:
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
Index: Makefile
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/cm/Makefile,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- Makefile 4 Oct 2005 17:03:43 -0000 1.35
+++ Makefile 21 Oct 2005 19:21:12 -0000 1.36
@@ -185,6 +185,10 @@
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 @@
$(PERL) -w fixPerlDAPInf.pl $(dir $(a))/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 $(a)),nsperl.inf
- @if [ ! -f $@ ] ; \
- then echo "Error: could not get component NSPERL file $@" ; \
- exit 1 ; \
- fi
- $(PERL) -w fixNSPerlInf.pl $(dir $(a))/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 @@
# ---THE UNIX PACKAGE---
packageDirectory: $(INSTDIR)/slapd \
- $(INSTDIR)/nsperl/$(NSPERL_ZIP_FILE) \
$(INSTDIR)/perldap/$(PERLDAP_ZIP_FILE) \
$(ADMSERV_DEP)
@@ -712,15 +692,15 @@
# 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 @@
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 --------------------------
Index: fixSetupInf.pl
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/cm/fixSetupInf.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- fixSetupInf.pl 19 Apr 2005 22:07:20 -0000 1.6
+++ fixSetupInf.pl 21 Oct 2005 19:21:12 -0000 1.7
@@ -65,10 +65,6 @@
$_ .= ", slapd";
$addedSlapd = 1;
}
- if (! /nsperl/) {
- $_ .= ", nsperl";
- $addedNSperl = 1;
- }
if (! /perldap/) {
$_ .= ", perldap";
$addedPerLDAP = 1;
@@ -99,11 +95,6 @@
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";
18 years, 7 months
[Fedora-directory-commits] ldapserver/ldap/clients/orgchart myorg.pl, 1.6, 1.7 org.pl, 1.6, 1.7
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/clients/orgchart
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27230/ldapserver/ldap/clients/orgchart
Modified Files:
myorg.pl org.pl
Log Message:
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
Index: myorg.pl
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/clients/orgchart/myorg.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- myorg.pl 19 Apr 2005 22:07:20 -0000 1.6
+++ myorg.pl 21 Oct 2005 19:21:12 -0000 1.7
@@ -1,4 +1,4 @@
-#!../../../bin/slapd/admin/bin/perl
+#!/usr/bin/env perl
#
# BEGIN COPYRIGHT BLOCK
# This Program is free software; you can redistribute it and/or modify it under
Index: org.pl
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/clients/orgchart/org.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- org.pl 19 Apr 2005 22:07:20 -0000 1.6
+++ org.pl 21 Oct 2005 19:21:12 -0000 1.7
@@ -1,4 +1,4 @@
-#!../../../bin/slapd/admin/bin/perl
+#!/usr/bin/env perl
#
# BEGIN COPYRIGHT BLOCK
# This Program is free software; you can redistribute it and/or modify it under
@@ -41,6 +41,29 @@
#
#set ts=4
+# enable the use of our bundled perldap with our bundled ldapsdk libraries
+# all of this nonsense can be omitted if the mozldapsdk and perldap are
+# installed in the operating system locations (e.g. /usr/lib /usr/lib/perl5)
+BEGIN {
+ my $savedir = `pwd`;
+ my $dirname = `dirname $0`;
+ chdir $dirname;
+ my $sroot = `pwd`;
+ $sroot =~ s@/clients/orgchart/bin*@@;
+ chomp($sroot);
+ chdir $savedir;
+ push @INC, "$sroot/lib/perl/arch", "$sroot/lib/perl";
+ if ($ENV{LD_LIBRARY_PATH}) {
+ $ENV{LD_LIBRARY_PATH} .= ":";
+ }
+ $ENV{LD_LIBRARY_PATH} .= "$sroot/shared/lib";
+ # this is only needed for HP/ux PA-RISC, but it doesn't hurt other platforms
+ if ($ENV{SHLIB_PATH}) {
+ $ENV{SHLIB_PATH} .= ":";
+ }
+ $ENV{SHLIB_PATH} .= "$sroot/shared/lib";
+}
+
# ------------
#
# Notes for anybody reading the code below:
18 years, 7 months
[Fedora-directory-commits] ldapserver/ldap/admin/src/scripts template-cl-dump.pl, 1.6, 1.7 template-migrate50to51, 1.5, 1.6 template-migrate5to6, 1.4, 1.5 template-migrate5to7, 1.4, 1.5 template-migrate6to7, 1.6, 1.7 template-migrateInstance5, 1.4, 1.5 template-migrateInstance6, 1.4, 1.5 template-migrateInstance7, 1.5, 1.6 template-migrateTo5, 1.5, 1.6 template-migrateTo6, 1.4, 1.5 template-migrateTo7, 1.5, 1.6 template-ns-newpwpolicy.pl, 1.4, 1.5 template-repl-monitor-cgi.pl, 1.4, 1.5 template-repl-monitor
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27230/ldapserver/ldap/admin/src/scripts
Modified Files:
template-cl-dump.pl template-migrate50to51
template-migrate5to6 template-migrate5to7 template-migrate6to7
template-migrateInstance5 template-migrateInstance6
template-migrateInstance7 template-migrateTo5
template-migrateTo6 template-migrateTo7
template-ns-newpwpolicy.pl template-repl-monitor-cgi.pl
template-repl-monitor.pl template-verify-db.pl
Log Message:
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
Index: template-cl-dump.pl
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-cl-dump.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- template-cl-dump.pl 19 Apr 2005 22:13:37 -0000 1.6
+++ template-cl-dump.pl 21 Oct 2005 19:21:11 -0000 1.7
@@ -96,6 +96,23 @@
# DSHOME/bin/slapd/admin/scripts
#
################################################################################
+# enable the use of our bundled perldap with our bundled ldapsdk libraries
+# all of this nonsense can be omitted if the mozldapsdk and perldap are
+# installed in the operating system locations (e.g. /usr/lib /usr/lib/perl5)
+BEGIN {
+ my $sroot = "{{DS-ROOT}}";
+ push @INC, "$sroot/lib/perl/arch", "$sroot/lib/perl";
+ if ($ENV{LD_LIBRARY_PATH}) {
+ $ENV{LD_LIBRARY_PATH} .= ":";
+ }
+ $ENV{LD_LIBRARY_PATH} .= "$sroot/shared/lib";
+ # this is only needed for HP/ux PA-RISC, but it doesn't hurt other platforms
+ if ($ENV{SHLIB_PATH}) {
+ $ENV{SHLIB_PATH} .= ":";
+ }
+ $ENV{SHLIB_PATH} .= "$sroot/shared/lib";
+}
+
$usage="Usage: $0 [-h host] [-p port] [-D bind-dn] [-w bind-password | -P bind-cert] [-r replica-roots] [-o output-file] [-c] [-v]\n\n $0 -i changelog-ldif-file-with-base64encoding [-o output-file] [-c]";
use Getopt::Std; # Parse command line arguments
Index: template-migrate50to51
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-migrate50to51,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- template-migrate50to51 19 Apr 2005 22:07:00 -0000 1.5
+++ template-migrate50to51 21 Oct 2005 19:21:11 -0000 1.6
@@ -39,6 +39,22 @@
# END COPYRIGHT BLOCK
#
+# enable the use of our bundled perldap with our bundled ldapsdk libraries
+# all of this nonsense can be omitted if the mozldapsdk and perldap are
+# installed in the operating system locations (e.g. /usr/lib /usr/lib/perl5)
+BEGIN {
+ my $sroot = "{{DS-ROOT}}";
+ push @INC, "$sroot/lib/perl/arch", "$sroot/lib/perl";
+ if ($ENV{LD_LIBRARY_PATH}) {
+ $ENV{LD_LIBRARY_PATH} .= ":";
+ }
+ $ENV{LD_LIBRARY_PATH} .= "$sroot/shared/lib";
+ # this is only needed for HP/ux PA-RISC, but it doesn't hurt other platforms
+ if ($ENV{SHLIB_PATH}) {
+ $ENV{SHLIB_PATH} .= ":";
+ }
+ $ENV{SHLIB_PATH} .= "$sroot/shared/lib";
+}
# Migrate a 5.0 directory server to a 5.1 directory server
#######################################################################################################
Index: template-migrate5to6
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-migrate5to6,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template-migrate5to6 19 Apr 2005 22:07:00 -0000 1.4
+++ template-migrate5to6 21 Oct 2005 19:21:11 -0000 1.5
@@ -39,6 +39,22 @@
# END COPYRIGHT BLOCK
#
+# enable the use of our bundled perldap with our bundled ldapsdk libraries
+# all of this nonsense can be omitted if the mozldapsdk and perldap are
+# installed in the operating system locations (e.g. /usr/lib /usr/lib/perl5)
+BEGIN {
+ my $sroot = "{{DS-ROOT}}";
+ push @INC, "$sroot/lib/perl/arch", "$sroot/lib/perl";
+ if ($ENV{LD_LIBRARY_PATH}) {
+ $ENV{LD_LIBRARY_PATH} .= ":";
+ }
+ $ENV{LD_LIBRARY_PATH} .= "$sroot/shared/lib";
+ # this is only needed for HP/ux PA-RISC, but it doesn't hurt other platforms
+ if ($ENV{SHLIB_PATH}) {
+ $ENV{SHLIB_PATH} .= ":";
+ }
+ $ENV{SHLIB_PATH} .= "$sroot/shared/lib";
+}
# Migrate a 5.x directory server to a 6.2 directory server
#######################################################################################################
Index: template-migrate5to7
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-migrate5to7,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template-migrate5to7 19 Apr 2005 22:07:00 -0000 1.4
+++ template-migrate5to7 21 Oct 2005 19:21:11 -0000 1.5
@@ -39,6 +39,22 @@
# END COPYRIGHT BLOCK
#
+# enable the use of our bundled perldap with our bundled ldapsdk libraries
+# all of this nonsense can be omitted if the mozldapsdk and perldap are
+# installed in the operating system locations (e.g. /usr/lib /usr/lib/perl5)
+BEGIN {
+ my $sroot = "{{DS-ROOT}}";
+ push @INC, "$sroot/lib/perl/arch", "$sroot/lib/perl";
+ if ($ENV{LD_LIBRARY_PATH}) {
+ $ENV{LD_LIBRARY_PATH} .= ":";
+ }
+ $ENV{LD_LIBRARY_PATH} .= "$sroot/shared/lib";
+ # this is only needed for HP/ux PA-RISC, but it doesn't hurt other platforms
+ if ($ENV{SHLIB_PATH}) {
+ $ENV{SHLIB_PATH} .= ":";
+ }
+ $ENV{SHLIB_PATH} .= "$sroot/shared/lib";
+}
# Migrate a 5.x directory server to a 7.0 directory server
#######################################################################################################
Index: template-migrate6to7
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-migrate6to7,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- template-migrate6to7 19 Apr 2005 22:07:00 -0000 1.6
+++ template-migrate6to7 21 Oct 2005 19:21:11 -0000 1.7
@@ -39,6 +39,22 @@
# END COPYRIGHT BLOCK
#
+# enable the use of our bundled perldap with our bundled ldapsdk libraries
+# all of this nonsense can be omitted if the mozldapsdk and perldap are
+# installed in the operating system locations (e.g. /usr/lib /usr/lib/perl5)
+BEGIN {
+ my $sroot = "{{DS-ROOT}}";
+ push @INC, "$sroot/lib/perl/arch", "$sroot/lib/perl";
+ if ($ENV{LD_LIBRARY_PATH}) {
+ $ENV{LD_LIBRARY_PATH} .= ":";
+ }
+ $ENV{LD_LIBRARY_PATH} .= "$sroot/shared/lib";
+ # this is only needed for HP/ux PA-RISC, but it doesn't hurt other platforms
+ if ($ENV{SHLIB_PATH}) {
+ $ENV{SHLIB_PATH} .= ":";
+ }
+ $ENV{SHLIB_PATH} .= "$sroot/shared/lib";
+}
# Migrate a 6.x directory server to a 7.0 directory server
#######################################################################################################
Index: template-migrateInstance5
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-migrateInstance5,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template-migrateInstance5 19 Apr 2005 22:07:00 -0000 1.4
+++ template-migrateInstance5 21 Oct 2005 19:21:11 -0000 1.5
@@ -140,16 +140,6 @@
exit(1);
}
$ENV{"$LIB_PATH"} = "$root${PATHSEP}lib${SEP}".$ENV{"$LIB_PATH"} ;
-if ($isSolaris9) {
- $ENV{"$LIB_PATH"} = "$root${PATHSEP}lib${PATHSEP}nsPerl5.005_03${PATHSEP}lib${PATHSEP}sun4-solaris${PATHSEP}CORE${SEP}".$ENV{"$LIB_PATH"} ;
-}
-
-if ($isNT) {
- $ENV{"PERL5LIB"} = "$root${PATHSEP}lib${PATHSEP}nsPerl5.005_03${PATHSEP}site${PATHSEP}lib${SEP}".$ENV{"PERL5LIB"} ;
-}
-else {
- $ENV{"PERL5LIB"} = "$root${PATHSEP}lib${PATHSEP}nsPerl5.005_03${PATHSEP}lib${PATHSEP}site${SEP}".$ENV{"PERL5LIB"} ;
-}
# get the version of the DS to migrate
($oldVersion, $oldMinor) = &getVersion($oldDir);
Index: template-migrateInstance6
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-migrateInstance6,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template-migrateInstance6 19 Apr 2005 22:07:00 -0000 1.4
+++ template-migrateInstance6 21 Oct 2005 19:21:11 -0000 1.5
@@ -144,16 +144,6 @@
exit(1);
}
$ENV{"$LIB_PATH"} = "$root${PATHSEP}lib${SEP}".$ENV{"$LIB_PATH"} ;
-if ($isSolaris9) {
- $ENV{"$LIB_PATH"} = "$root${PATHSEP}lib${PATHSEP}nsPerl5.6.1${PATHSEP}lib${PATHSEP}sun4-solaris${PATHSEP}CORE${SEP}".$ENV{"$LIB_PATH"} ;
-}
-
-if ($isNT) {
- $ENV{"PERL5LIB"} = "$root${PATHSEP}lib${PATHSEP}nsPerl5.6.1${PATHSEP}site${PATHSEP}lib${SEP}".$ENV{"PERL5LIB"} ;
-}
-else {
- $ENV{"PERL5LIB"} = "$root${PATHSEP}lib${PATHSEP}nsPerl5.6.1${PATHSEP}lib${PATHSEP}site${SEP}".$ENV{"PERL5LIB"} ;
-}
# get the version of the DS to migrate
($oldVersion, $oldMinor) = &getVersion($oldDir, $oldversionstr);
Index: template-migrateInstance7
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-migrateInstance7,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- template-migrateInstance7 19 Apr 2005 22:07:00 -0000 1.5
+++ template-migrateInstance7 21 Oct 2005 19:21:11 -0000 1.6
@@ -144,16 +144,6 @@
exit(1);
}
$ENV{"$LIB_PATH"} = "$root${PATHSEP}lib${SEP}".$ENV{"$LIB_PATH"} ;
-if ($isSolaris9) {
- $ENV{"$LIB_PATH"} = "$root${PATHSEP}lib${PATHSEP}nsPerl5.6.1${PATHSEP}lib${PATHSEP}sun4-solaris${PATHSEP}CORE${SEP}".$ENV{"$LIB_PATH"} ;
-}
-
-if ($isNT) {
- $ENV{"PERL5LIB"} = "$root${PATHSEP}lib${PATHSEP}nsPerl5.6.1${PATHSEP}site${PATHSEP}lib${SEP}".$ENV{"PERL5LIB"} ;
-}
-else {
- $ENV{"PERL5LIB"} = "$root${PATHSEP}lib${PATHSEP}nsPerl5.6.1${PATHSEP}lib${PATHSEP}site${SEP}".$ENV{"PERL5LIB"} ;
-}
# get the version of the DS to migrate
($oldVersion, $oldMinor) = &getVersion($oldDir, $oldversionstr);
Index: template-migrateTo5
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-migrateTo5,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- template-migrateTo5 19 Apr 2005 22:07:00 -0000 1.5
+++ template-migrateTo5 21 Oct 2005 19:21:11 -0000 1.6
@@ -39,6 +39,22 @@
# END COPYRIGHT BLOCK
#
+# enable the use of our bundled perldap with our bundled ldapsdk libraries
+# all of this nonsense can be omitted if the mozldapsdk and perldap are
+# installed in the operating system locations (e.g. /usr/lib /usr/lib/perl5)
+BEGIN {
+ my $sroot = "{{DS-ROOT}}";
+ push @INC, "$sroot/lib/perl/arch", "$sroot/lib/perl";
+ if ($ENV{LD_LIBRARY_PATH}) {
+ $ENV{LD_LIBRARY_PATH} .= ":";
+ }
+ $ENV{LD_LIBRARY_PATH} .= "$sroot/shared/lib";
+ # this is only needed for HP/ux PA-RISC, but it doesn't hurt other platforms
+ if ($ENV{SHLIB_PATH}) {
+ $ENV{SHLIB_PATH} .= ":";
+ }
+ $ENV{SHLIB_PATH} .= "$sroot/shared/lib";
+}
# Migrate a 4.0 directory server to a 5.x directory server
########################################################################################################
Index: template-migrateTo6
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-migrateTo6,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template-migrateTo6 19 Apr 2005 22:07:00 -0000 1.4
+++ template-migrateTo6 21 Oct 2005 19:21:11 -0000 1.5
@@ -39,6 +39,22 @@
# END COPYRIGHT BLOCK
#
+# enable the use of our bundled perldap with our bundled ldapsdk libraries
+# all of this nonsense can be omitted if the mozldapsdk and perldap are
+# installed in the operating system locations (e.g. /usr/lib /usr/lib/perl5)
+BEGIN {
+ my $sroot = "{{DS-ROOT}}";
+ push @INC, "$sroot/lib/perl/arch", "$sroot/lib/perl";
+ if ($ENV{LD_LIBRARY_PATH}) {
+ $ENV{LD_LIBRARY_PATH} .= ":";
+ }
+ $ENV{LD_LIBRARY_PATH} .= "$sroot/shared/lib";
+ # this is only needed for HP/ux PA-RISC, but it doesn't hurt other platforms
+ if ($ENV{SHLIB_PATH}) {
+ $ENV{SHLIB_PATH} .= ":";
+ }
+ $ENV{SHLIB_PATH} .= "$sroot/shared/lib";
+}
# Migrate a old directory server to a 6.2 directory server
########################################################################################################
Index: template-migrateTo7
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-migrateTo7,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- template-migrateTo7 19 Apr 2005 22:07:00 -0000 1.5
+++ template-migrateTo7 21 Oct 2005 19:21:11 -0000 1.6
@@ -39,6 +39,22 @@
# END COPYRIGHT BLOCK
#
+# enable the use of our bundled perldap with our bundled ldapsdk libraries
+# all of this nonsense can be omitted if the mozldapsdk and perldap are
+# installed in the operating system locations (e.g. /usr/lib /usr/lib/perl5)
+BEGIN {
+ my $sroot = "{{DS-ROOT}}";
+ push @INC, "$sroot/lib/perl/arch", "$sroot/lib/perl";
+ if ($ENV{LD_LIBRARY_PATH}) {
+ $ENV{LD_LIBRARY_PATH} .= ":";
+ }
+ $ENV{LD_LIBRARY_PATH} .= "$sroot/shared/lib";
+ # this is only needed for HP/ux PA-RISC, but it doesn't hurt other platforms
+ if ($ENV{SHLIB_PATH}) {
+ $ENV{SHLIB_PATH} .= ":";
+ }
+ $ENV{SHLIB_PATH} .= "$sroot/shared/lib";
+}
# Migrate a old directory server to a 7.0 directory server
########################################################################################################
Index: template-ns-newpwpolicy.pl
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-ns-newpwpolicy.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template-ns-newpwpolicy.pl 19 Apr 2005 22:07:00 -0000 1.4
+++ template-ns-newpwpolicy.pl 21 Oct 2005 19:21:11 -0000 1.5
@@ -39,6 +39,22 @@
# END COPYRIGHT BLOCK
#
+# enable the use of our bundled perldap with our bundled ldapsdk libraries
+# all of this nonsense can be omitted if the mozldapsdk and perldap are
+# installed in the operating system locations (e.g. /usr/lib /usr/lib/perl5)
+BEGIN {
+ my $sroot = "{{DS-ROOT}}";
+ push @INC, "$sroot/lib/perl/arch", "$sroot/lib/perl";
+ if ($ENV{LD_LIBRARY_PATH}) {
+ $ENV{LD_LIBRARY_PATH} .= ":";
+ }
+ $ENV{LD_LIBRARY_PATH} .= "$sroot/shared/lib";
+ # this is only needed for HP/ux PA-RISC, but it doesn't hurt other platforms
+ if ($ENV{SHLIB_PATH}) {
+ $ENV{SHLIB_PATH} .= ":";
+ }
+ $ENV{SHLIB_PATH} .= "$sroot/shared/lib";
+}
# Add new password policy specific entries
#############################################################################
Index: template-repl-monitor-cgi.pl
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-repl-monitor-cgi.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template-repl-monitor-cgi.pl 19 Apr 2005 22:07:00 -0000 1.4
+++ template-repl-monitor-cgi.pl 21 Oct 2005 19:21:11 -0000 1.5
@@ -56,8 +56,8 @@
$params .= " -u \"$admurl\"";
}
$siteroot = $cgiVars{'siteroot'};
-$perl = "$siteroot/bin/slapd/admin/bin/perl";
-$ENV{'LD_LIBRARY_PATH'} = "$siteroot/lib:$siteroot/lib/nsPerl5.005_03/lib";
+$ENV{'LD_LIBRARY_PATH'} = "$siteroot/shared/lib";
+$ENV{'SHLIB_PATH'} = "$siteroot/shared/lib";
# Save user-specified parameters as cookies in monreplication.properties.
# Sync up with the property file so that monreplication2 is interval, and
@@ -65,8 +65,8 @@
$propertyfile = "$siteroot/bin/admin/admin/bin/property/monreplication.properties";
$edit1 = "s#monreplication2=.*#monreplication2=$cgiVars{'refreshinterval'}#;";
$edit2 = "s#^monreplication3=.*#monreplication3=$cgiVars{'configfile'}#;";
-system("$perl -p -i.bak -e \"$edit1\" -e \"$edit2\" $propertyfile");
+system("perl -p -i.bak -e \"$edit1\" -e \"$edit2\" $propertyfile");
# Now the real work
$replmon = "$siteroot/bin/slapd/admin/scripts/template-repl-monitor.pl";
-system("$perl $replmon $params");
+system("perl -I$siteroot/lib/perl/arch -I$siteroot/lib/perl $replmon $params");
Index: template-repl-monitor.pl
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-repl-monitor.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- template-repl-monitor.pl 19 Apr 2005 22:13:37 -0000 1.6
+++ template-repl-monitor.pl 21 Oct 2005 19:21:11 -0000 1.7
@@ -146,16 +146,36 @@
# <DSHOME>/bin/slapd/admin/bin/perl repl-monitor.pl
#
# 3. Set environment variable PERL5LIB to your Perl lib dirs where
-# Mozilla::LDAP module can be located.
+# Mozilla::LDAP module can be located. This should be under serverroot/lib/perl
+# e.g. PERL5LIB="serverroot/lib/perl/arch:serverroot/lib/perl"
#
-# 4. Invoke the script as follows if <MYPERLDIR>/lib/site contains
-# Mozilla/LDAP:
-# <MYPERLDIR>/bin/perl -I <MYPERLDIR>/lib/site repl-monitor.pl
+# 4. Set LD_LIBRARY_PATH (or SHLIB_PATH) to point to the location of our
+# bundled shared libraries e.g. LD_LIBRARY_PATH="serverroot/shared/lib"
#
-# If you get error "Can't load ...", try to set environment variable
-# for library path to <DSHOME>/lib:<DSHOME>/lib/nsPerl5.005_03/lib
+# 5. Invoke the script as follows if <MYPERLDIR> (serverroot/lib/perl) contains
+# Mozilla/LDAP:
+# <MYPERLDIR>/bin/perl -I <MYPERLDIR>/arch -I <MYPERLDIR> repl-monitor.pl
#
#############################################################################
+# enable the use of our bundled perldap with our bundled ldapsdk libraries
+# all of this nonsense can be omitted if the mozldapsdk and perldap are
+# installed in the operating system locations (e.g. /usr/lib /usr/lib/perl5)
+# this script is always invoked by repl-monitor-cgi.pl, which sets all of these
+# If using this script standalone, be sure to set the shared lib path and
+# the path to the perldap modules.
+# BEGIN {
+# my $sroot = "{{DS-ROOT}}";
+# push @INC, "$sroot/lib/perl/arch", "$sroot/lib/perl";
+# if ($ENV{LD_LIBRARY_PATH}) {
+# $ENV{LD_LIBRARY_PATH} .= ":";
+# }
+# $ENV{LD_LIBRARY_PATH} .= "$sroot/shared/lib";
+# # this is only needed for HP/ux PA-RISC, but it doesn't hurt other platforms
+# if ($ENV{SHLIB_PATH}) {
+# $ENV{SHLIB_PATH} .= ":";
+# }
+# $ENV{SHLIB_PATH} .= "$sroot/shared/lib";
+# }
$usage = "\nusage: $0 -f configuration-file [-h host] [-p port] [-r] [-u refresh-url] [-t refresh-interval]\n\nor : $0 -v\n";
use Getopt::Std; # parse command line arguments
Index: template-verify-db.pl
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-verify-db.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template-verify-db.pl 19 Apr 2005 22:07:00 -0000 1.4
+++ template-verify-db.pl 21 Oct 2005 19:21:11 -0000 1.5
@@ -95,6 +95,13 @@
return \$logfile;
}
+$isWin = -d '\\';
+if ($isWin) {
+ $NULL = "nul";
+} else {
+ $NULL = "/dev/null";
+}
+
print("*****************************************************************\n");
print("verify-db: This tool should only be run if recovery start fails\n" .
"and the server is down. If you run this tool while the server is\n" .
@@ -109,7 +116,7 @@
{
# run ../bin/slapd/server/db_printlog -h <dbdir> for each <dbdir>
print "Verify log files in $$dbdirs[$i] ... ";
- open(PRINTLOG, "..{{SEP}}bin{{SEP}}slapd{{SEP}}server{{SEP}}db_printlog -h $$dbdirs[$i] 2>&1 1> nul |");
+ open(PRINTLOG, "..{{SEP}}bin{{SEP}}slapd{{SEP}}server{{SEP}}db_printlog -h $$dbdirs[$i] 2>&1 1> $NULL |");
sleep 1;
my $haserr = 0;
while ($l = <PRINTLOG>)
@@ -147,7 +154,7 @@
{
my $thisdb = $$dbdirs[$i] . "{{SEP}}" . $db;
print "Verify $thisdb ... ";
- open(DBVERIFY, "..{{SEP}}bin{{SEP}}slapd{{SEP}}server{{SEP}}db_verify $thisdb 2>&1 1> nul |");
+ open(DBVERIFY, "..{{SEP}}bin{{SEP}}slapd{{SEP}}server{{SEP}}db_verify $thisdb 2>&1 1> $NULL |");
sleep 1;
my $haserr = 0;
while ($l = <DBVERIFY>)
@@ -188,7 +195,7 @@
{
my $thisdb = $$instdirs[$j] . "{{SEP}}" . $db;
print "Verify $thisdb ... ";
- open(DBVERIFY, "..{{SEP}}bin{{SEP}}slapd{{SEP}}server{{SEP}}db_verify $thisdb 2>&1 1> null |");
+ open(DBVERIFY, "..{{SEP}}bin{{SEP}}slapd{{SEP}}server{{SEP}}db_verify $thisdb 2>&1 1> $NULL |");
sleep 1;
my $haserr = 0;
while ($l = <DBVERIFY>)
18 years, 7 months
[Fedora-directory-commits] ldapserver/ldap/admin/src Makefile, 1.13, 1.14 configure_instance.cpp, 1.7, 1.8 create_instance.c, 1.22, 1.23 ds_newinst.pl, 1.4, 1.5 ds_viewlog.pl, 1.4, 1.5 getConfigInfo, 1.4, 1.5 import2info, 1.4, 1.5 makemccvlvindexes, 1.4, 1.5 makevlvindex, 1.4, 1.5 makevlvsearch, 1.4, 1.5 migrateInstance, 1.4, 1.5 migrateLocalDB, 1.4, 1.5 migratePwdFile, 1.4, 1.5 migrateTo4, 1.5, 1.6 migratedsgw, 1.4, 1.5 ns-newpwpolicy.pl, 1.4, 1.5 updatedsgw, 1.6, 1.7 upgradeServer, 1.6, 1.7 AddPerlHeader
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/admin/src
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27230/ldapserver/ldap/admin/src
Modified Files:
Makefile configure_instance.cpp create_instance.c
ds_newinst.pl ds_viewlog.pl getConfigInfo import2info
makemccvlvindexes makevlvindex makevlvsearch migrateInstance
migrateLocalDB migratePwdFile migrateTo4 migratedsgw
ns-newpwpolicy.pl updatedsgw upgradeServer
Removed Files:
AddPerlHeader.pl Base.def Base.pm CreateInstall.pl DSAdmin.def
DSAdmin.mk DSAdmin.pm DSAdmin.xs Inf.pm
Log Message:
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
Index: Makefile
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/Makefile,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- Makefile 3 Oct 2005 19:53:52 -0000 1.13
+++ Makefile 21 Oct 2005 19:21:10 -0000 1.14
@@ -348,10 +348,12 @@
$(BINDIR)/%: %
-@$(RM) $@
$(CP) $< $@
+ chmod +x $@
$(LDAP_SERVER_RELDIR)/%: % $(LDAP_SERVER_RELDIR)
-@$(RM) $@
$(CP) $< $@
+ chmod +x $@
$(INST_INCLUDES): install_keywords.h
-@$(RM) $@
@@ -360,3 +362,4 @@
$(SCRIPTSDIR)/template-%: scripts/template-% $(SCRIPTSDIR)
-@$(RM) $@
$(CP) $< $@
+ chmod +x $@
Index: configure_instance.cpp
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/configure_instance.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- configure_instance.cpp 19 Apr 2005 22:06:55 -0000 1.7
+++ configure_instance.cpp 21 Oct 2005 19:21:10 -0000 1.8
@@ -1964,5 +1964,60 @@
}
while (ldapent.next() == OKAY);
+ // we no longer use nsperl - any CGIs which we used to invoke via perl?perlscript
+ // are now invoked directly by making the perl script executable - we need to
+ // search for all nsexecref: perl?perlscript and replace them with
+ // nsexecref: perlscript
+ filter = NSString("(nsexecref=perl*)");
+ scope = LDAP_SCOPE_SUBTREE;
+ baseDN = name_netscaperootDN;
+
+ ldapent.clear();
+ le = ldapent.retrieve(filter, scope, baseDN);
+ if (le != OKAY)
+ {
+ if (le == NOT_FOUND) {
+ dsLogMessage(SETUP_LOG_INFO, "Slapd",
+ "No old nsperl references found");
+ } else {
+ dsLogMessage(SETUP_LOG_FATAL, "Slapd",
+ "ERROR: Could not find old nsperl references\n"
+ "URL %s user id %s DN %s (%d:%s)",
+ installInfo->get(SLAPD_KEY_K_LDAP_URL),
+ installInfo->get(SLAPD_KEY_SERVER_ADMIN_ID),
+ (const char *)baseDN,
+ le.errorCode(), le.msg());
+ return le.errorCode();
+ }
+ } else {
+ do
+ {
+ LdapEntry repEntry(ldapent.ldap());
+ repEntry.retrieve(ldapent.entryDN());
+ char *val = repEntry.getAttribute("nsexecref");
+ const char *ptr = 0;
+ if (val && *val && (ptr = strstr(val, "perl?"))) {
+ ptr = strchr(ptr, '?');
+ ptr++;
+ NSString newscript = NSString(ptr);
+ repEntry.setAttribute("nsexecref", newscript);
+ }
+
+ le = repEntry.replace(repEntry.entryDN());
+ if (le != OKAY)
+ {
+ dsLogMessage(SETUP_LOG_FATAL, "Slapd",
+ "ERROR: Could not fix old nsperl reference\n"
+ "URL %s user id %s DN %s (%d:%s)" ,
+ installInfo->get(SLAPD_KEY_K_LDAP_URL),
+ installInfo->get(SLAPD_KEY_SERVER_ADMIN_ID),
+ (const char *)repEntry.entryDN(),
+ le.errorCode(), le.msg());
+ return le.errorCode();
+ }
+ }
+ while (ldapent.next() == OKAY);
+ }
+
return 0;
}
Index: create_instance.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/create_instance.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- create_instance.c 6 Sep 2005 21:15:14 -0000 1.22
+++ create_instance.c 21 Oct 2005 19:21:10 -0000 1.23
@@ -765,9 +765,13 @@
FILE_PATHSEP, FILE_PATHSEP, FILE_PATHSEP, FILE_PATHSEP,
FILE_PATHSEP, name);
PR_snprintf(fn, sizeof(fn), "%s%c%s", cs_path, FILE_PATHSEP, name);
+#ifdef USE_NSPERL
PR_snprintf(myperl, sizeof(myperl), "!%s%cbin%cslapd%cadmin%cbin%cperl",
s_root, FILE_PATHSEP, FILE_PATHSEP,
FILE_PATHSEP, FILE_PATHSEP, FILE_PATHSEP);
+#else
+ strcpy(myperl, "!/usr/bin/env perl");
+#endif
table[0][0] = "DS-ROOT";
table[0][1] = s_root;
@@ -812,9 +816,13 @@
FILE_PATHSEP, name);
PR_snprintf(fn, sizeof(fn), "%s%cbin%cslapd%cadmin%cbin%c%s", s_root, FILE_PATHSEP,
FILE_PATHSEP, FILE_PATHSEP, FILE_PATHSEP, FILE_PATHSEP, name);
+#ifdef USE_NSPERL
PR_snprintf(myperl, sizeof(myperl), "!%s%cbin%cslapd%cadmin%cbin%cperl",
s_root, FILE_PATHSEP, FILE_PATHSEP,
FILE_PATHSEP, FILE_PATHSEP, FILE_PATHSEP);
+#else
+ strcpy(myperl, "!/usr/bin/env perl");
+#endif
table[0][0] = "DS-ROOT";
table[0][1] = s_root;
Index: ds_newinst.pl
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/ds_newinst.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ds_newinst.pl 19 Apr 2005 22:06:55 -0000 1.4
+++ ds_newinst.pl 21 Oct 2005 19:21:10 -0000 1.5
@@ -1,3 +1,4 @@
+#!/usr/bin/env perl
# BEGIN COPYRIGHT BLOCK
# This Program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
Index: ds_viewlog.pl
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/ds_viewlog.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ds_viewlog.pl 19 Apr 2005 22:06:55 -0000 1.4
+++ ds_viewlog.pl 21 Oct 2005 19:21:10 -0000 1.5
@@ -1,4 +1,4 @@
-#!perl
+#!/usr/bin/env perl
#
# BEGIN COPYRIGHT BLOCK
# This Program is free software; you can redistribute it and/or modify it under
Index: getConfigInfo
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/getConfigInfo,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- getConfigInfo 19 Apr 2005 22:06:55 -0000 1.4
+++ getConfigInfo 21 Oct 2005 19:21:10 -0000 1.5
@@ -1,4 +1,4 @@
-#!perl
+#!/usr/bin/env perl
#
# BEGIN COPYRIGHT BLOCK
# This Program is free software; you can redistribute it and/or modify it under
Index: import2info
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/import2info,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- import2info 19 Apr 2005 22:06:55 -0000 1.4
+++ import2info 21 Oct 2005 19:21:10 -0000 1.5
@@ -1,4 +1,4 @@
-#!perl
+#!/usr/bin/env perl
#
# BEGIN COPYRIGHT BLOCK
# This Program is free software; you can redistribute it and/or modify it under
Index: makemccvlvindexes
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/makemccvlvindexes,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- makemccvlvindexes 19 Apr 2005 22:06:55 -0000 1.4
+++ makemccvlvindexes 21 Oct 2005 19:21:10 -0000 1.5
@@ -1,4 +1,4 @@
-#!perl
+#!/usr/bin/env perl
#
# BEGIN COPYRIGHT BLOCK
# This Program is free software; you can redistribute it and/or modify it under
Index: makevlvindex
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/makevlvindex,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- makevlvindex 19 Apr 2005 22:06:55 -0000 1.4
+++ makevlvindex 21 Oct 2005 19:21:10 -0000 1.5
@@ -1,4 +1,4 @@
-#!perl
+#!/usr/bin/env perl
#
# BEGIN COPYRIGHT BLOCK
# This Program is free software; you can redistribute it and/or modify it under
Index: makevlvsearch
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/makevlvsearch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- makevlvsearch 19 Apr 2005 22:06:55 -0000 1.4
+++ makevlvsearch 21 Oct 2005 19:21:10 -0000 1.5
@@ -1,4 +1,4 @@
-#!perl
+#!/usr/bin/env perl
#
# BEGIN COPYRIGHT BLOCK
# This Program is free software; you can redistribute it and/or modify it under
Index: migrateInstance
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/migrateInstance,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- migrateInstance 19 Apr 2005 22:06:55 -0000 1.4
+++ migrateInstance 21 Oct 2005 19:21:10 -0000 1.5
@@ -1,4 +1,4 @@
-#!perl
+#!/usr/bin/env perl
#
# BEGIN COPYRIGHT BLOCK
# This Program is free software; you can redistribute it and/or modify it under
Index: migrateLocalDB
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/migrateLocalDB,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- migrateLocalDB 19 Apr 2005 22:06:55 -0000 1.4
+++ migrateLocalDB 21 Oct 2005 19:21:10 -0000 1.5
@@ -1,4 +1,4 @@
-#!perl
+#!/usr/bin/env perl
#
# BEGIN COPYRIGHT BLOCK
# This Program is free software; you can redistribute it and/or modify it under
Index: migratePwdFile
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/migratePwdFile,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- migratePwdFile 19 Apr 2005 22:06:55 -0000 1.4
+++ migratePwdFile 21 Oct 2005 19:21:10 -0000 1.5
@@ -1,4 +1,4 @@
-#!perl
+#!/usr/bin/env perl
#
# BEGIN COPYRIGHT BLOCK
# This Program is free software; you can redistribute it and/or modify it under
Index: migrateTo4
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/migrateTo4,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- migrateTo4 19 Apr 2005 22:06:55 -0000 1.5
+++ migrateTo4 21 Oct 2005 19:21:10 -0000 1.6
@@ -1,4 +1,4 @@
-#!perl
+#!/usr/bin/env perl
#
# BEGIN COPYRIGHT BLOCK
# This Program is free software; you can redistribute it and/or modify it under
Index: migratedsgw
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/migratedsgw,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- migratedsgw 19 Apr 2005 22:06:55 -0000 1.4
+++ migratedsgw 21 Oct 2005 19:21:10 -0000 1.5
@@ -1,4 +1,4 @@
-#!perl
+#!/usr/bin/env perl
#
# BEGIN COPYRIGHT BLOCK
# This Program is free software; you can redistribute it and/or modify it under
Index: ns-newpwpolicy.pl
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/ns-newpwpolicy.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ns-newpwpolicy.pl 19 Apr 2005 22:06:55 -0000 1.4
+++ ns-newpwpolicy.pl 21 Oct 2005 19:21:10 -0000 1.5
@@ -1,4 +1,4 @@
-# perl script
+#!/usr/bin/env perl
#
# BEGIN COPYRIGHT BLOCK
# This Program is free software; you can redistribute it and/or modify it under
@@ -39,6 +39,28 @@
# END COPYRIGHT BLOCK
#
+# enable the use of our bundled perldap with our bundled ldapsdk libraries
+# all of this nonsense can be omitted if the mozldapsdk and perldap are
+# installed in the operating system locations (e.g. /usr/lib /usr/lib/perl5)
+BEGIN {
+ my $savedir = `pwd`;
+ my $dirname = `dirname $0`;
+ chdir $dirname;
+ my $sroot = `pwd`;
+ $sroot =~ s@/slapd-.*(a)@;
+ chomp($sroot);
+ chdir $savedir;
+ push @INC, "$sroot/lib/perl/arch", "$sroot/lib/perl";
+ if ($ENV{LD_LIBRARY_PATH}) {
+ $ENV{LD_LIBRARY_PATH} .= ":";
+ }
+ $ENV{LD_LIBRARY_PATH} .= "$sroot/shared/lib";
+ # this is only needed for HP/ux PA-RISC, but it doesn't hurt other platforms
+ if ($ENV{SHLIB_PATH}) {
+ $ENV{SHLIB_PATH} .= ":";
+ }
+ $ENV{SHLIB_PATH} .= "$sroot/shared/lib";
+}
# Add new password policy specific entries
#############################################################################
Index: updatedsgw
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/updatedsgw,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- updatedsgw 19 Apr 2005 22:06:55 -0000 1.6
+++ updatedsgw 21 Oct 2005 19:21:10 -0000 1.7
@@ -1,4 +1,4 @@
-#!perl
+#!/usr/bin/env perl
#
# BEGIN COPYRIGHT BLOCK
# This Program is free software; you can redistribute it and/or modify it under
Index: upgradeServer
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/upgradeServer,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- upgradeServer 7 Sep 2005 00:54:20 -0000 1.6
+++ upgradeServer 21 Oct 2005 19:21:10 -0000 1.7
@@ -1,4 +1,4 @@
-#!perl
+#!/usr/bin/env perl
#
# BEGIN COPYRIGHT BLOCK
# This Program is free software; you can redistribute it and/or modify it under
@@ -266,7 +266,7 @@
last; # not found, just abort
}
if ($inClEntry && /^nsslapd-changelogdir:\s*/i) {
- $clDir = $';
+ $clDir = $'; #'
chomp($clDir);
last;
}
@@ -407,6 +407,48 @@
return $version;
}
+sub instantiate_new_package_scripts {
+
+ my @newtemplates = (
+ "$sroot/bin/slapd/admin/scripts/template-cl-dump.pl",
+ "$sroot/bin/slapd/admin/scripts/template-migrate5to7",
+ "$sroot/bin/slapd/admin/scripts/template-migrate6to7",
+ "$sroot/bin/slapd/admin/scripts/template-migrateInstance7",
+ "$sroot/bin/slapd/admin/scripts/template-migrateTo4",
+ "$sroot/bin/slapd/admin/scripts/template-migrateTo7",
+ "$sroot/bin/slapd/admin/scripts/template-repl-monitor-cgi.pl",
+ );
+
+ foreach $src ( @newtemplates ) {
+ $dest = "$sroot/bin/slapd/admin/bin/$1" if $src =~ /.*template-(.*)$/;
+ # repl mon cgi script goes in bin/admin/admin/bin
+ if ($src =~ /repl-monitor-cgi.pl/) {
+ $dest =~ s@/bin/slapd/admin/bin/@/bin/admin/admin/bin/@;
+ }
+ unless ( open ( template, $src )) {
+ print "Can't open $src: $!\n";
+ next;
+ }
+ unless ( open ( target, ">$dest" )) {
+ print "Can't open $dest: $!\n";
+ close template;
+ next;
+ }
+ while ( <template> ) {
+ s#{{PERL-EXEC}}#!/usr/bin/env perl#g;
+ s#{{DS-ROOT}}#$sroot#g;
+ s#{{SEP}}#${PS}#g;
+ print target;
+ }
+ close template;
+ close target;
+
+ chmod 0755, $dest;
+ }
+
+ return 0;
+}
+
#
# Some scripts generated by create_instance may not
# get generated during in-place upgrade. This function
@@ -418,8 +460,18 @@
#
sub instantiate_new_scripts {
- @newtemplates = (
- "$sroot/bin/slapd/admin/scripts/template-db2index.pl"
+ my @newtemplates = (
+ "$sroot/bin/slapd/admin/scripts/template-verify-db.pl",
+ "$sroot/bin/slapd/admin/scripts/template-db2index.pl",
+ "$sroot/bin/slapd/admin/scripts/template-bak2db.pl",
+ "$sroot/bin/slapd/admin/scripts/template-db2bak.pl",
+ "$sroot/bin/slapd/admin/scripts/template-db2ldif.pl",
+ "$sroot/bin/slapd/admin/scripts/template-dsml-activate.pl",
+ "$sroot/bin/slapd/admin/scripts/template-ldif2db.pl",
+ "$sroot/bin/slapd/admin/scripts/template-ns-accountstatus.pl",
+ "$sroot/bin/slapd/admin/scripts/template-ns-activate.pl",
+ "$sroot/bin/slapd/admin/scripts/template-ns-inactivate.pl",
+ "$sroot/bin/slapd/admin/scripts/template-ns-newpwpolicy.pl"
);
$host = localhost;
@@ -444,7 +496,7 @@
next;
}
while ( <template> ) {
- s#{{PERL-EXEC}}#!$sroot/bin/slapd/admin/bin/perl#g;
+ s#{{PERL-EXEC}}#!/usr/bin/env perl#g;
s#{{DS-ROOT}}#$sroot#g;
s#{{SEP}}#${PS}#g;
s#{{ROOT-DN}}#$rootdn#g;
@@ -460,20 +512,28 @@
}
# copy schema is safe even if same version
-copy_schema_files;
+copy_schema_files if ($prefix);
# modify only if necessary
-modify_dse_ldif;
+modify_dse_ldif if ($prefix);
# fix changelog is safe even if same version - no op
-my $clDir = get_changelog_dir;
-if ($clDir && -d $clDir) {
- my $oldclversion = getChangelogVersion($clDir);
- my $clversion = "2.0"; # with DS 6.1
-
- if ($oldclversion < $clversion) {
- fix_changelog($clDir, $clversion);
- }
+if ($prefix) {
+ my $clDir = get_changelog_dir;
+ if ($clDir && -d $clDir) {
+ my $oldclversion = getChangelogVersion($clDir);
+ my $clversion = "2.0"; # with DS 6.1
+
+ if ($oldclversion < $clversion) {
+ fix_changelog($clDir, $clversion);
+ }
+ }
+}
+
+# fix instance specific scripts
+if ($prefix) {
+ instantiate_new_scripts ();
+} else {
+# fix non instance specific (package) scripts
+ instantiate_new_package_scripts ();
}
-
-instantiate_new_scripts ();
--- AddPerlHeader.pl DELETED ---
--- Base.def DELETED ---
--- Base.pm DELETED ---
--- CreateInstall.pl DELETED ---
--- DSAdmin.def DELETED ---
--- DSAdmin.mk DELETED ---
--- DSAdmin.pm DELETED ---
--- DSAdmin.xs DELETED ---
--- Inf.pm DELETED ---
18 years, 7 months
[Fedora-directory-commits] ldapserver/httpd/src Makefile,1.7,1.8
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver/httpd/src
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27230/ldapserver/httpd/src
Modified Files:
Makefile
Log Message:
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
Index: Makefile
===================================================================
RCS file: /cvs/dirsec/ldapserver/httpd/src/Makefile,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Makefile 19 Apr 2005 22:06:43 -0000 1.7
+++ Makefile 21 Oct 2005 19:21:04 -0000 1.8
@@ -147,8 +147,6 @@
#OBJS+=$(HTTPD_DIR)/httpd-lib/nspr20/uxwrap.o
endif
-DAEMONLIB=
-
ifeq ($(ARCH), WINNT)
# Don't define DEPLIBS for NT because standard macros like LINK_EXE
# and LINK_DLL automatically pick up DEPLIBS which we don't always wan't.
@@ -168,7 +166,6 @@
ifndef DEPLIBS
DEPLIBS = $(addsuffix .$(LIB_SUFFIX), \
$(addprefix $(OBJDIR)/lib/lib,$(HTTPD_LIBS)) \
- $(DAEMONLIB) \
$(OBJDIR)/lib/libaccess \
$(OBJDIR)/lib/libbase \
$(OBJDIR)/lib/libsi18n \
@@ -179,7 +176,6 @@
DEPLINK = $(addsuffix .$(LIB_SUFFIX), \
$(addprefix $(OBJDIR)/lib/lib,$(HTTPD_LIBS)) \
- $(DAEMONLIB) \
$(OBJDIR)/lib/libaccess \
$(OBJDIR)/lib/libbase \
$(OBJDIR)/lib/libsi18n \
18 years, 7 months
[Fedora-directory-commits] ldapserver buildpaths.mk, 1.5, 1.6 components.mk, 1.32, 1.33 nsperl.mk, 1.4, 1.5
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27230/ldapserver
Modified Files:
buildpaths.mk components.mk nsperl.mk
Log Message:
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
Index: buildpaths.mk
===================================================================
RCS file: /cvs/dirsec/ldapserver/buildpaths.mk,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- buildpaths.mk 3 Oct 2005 19:53:40 -0000 1.5
+++ buildpaths.mk 21 Oct 2005 19:21:04 -0000 1.6
@@ -135,3 +135,5 @@
# JAF - activation.jar - http://java.sun.com/products/javabeans/glasgow/jaf.html
# JWSDP - jaxrpc-api.jar,jaxrpc.jar,saaj.jar - http://java.sun.com/webservices/downloads/webservicespack.html
# Crimson - crimson.jar - http://xml.apache.org/crimson/
+
+PERLDAP_SOURCE_ROOT = $(MOZILLA_SOURCE_ROOT)
Index: components.mk
===================================================================
RCS file: /cvs/dirsec/ldapserver/components.mk,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- components.mk 3 Oct 2005 19:53:40 -0000 1.32
+++ components.mk 21 Oct 2005 19:21:04 -0000 1.33
@@ -741,3 +741,15 @@
-@echo "MAVEN is not required except on Windows."
endif #WINNT
+########### PerLDAP #############
+ifdef PERLDAP_SOURCE_ROOT
+ PERLDAP_BUILT_DIR = $(PERLDAP_SOURCE_ROOT)/directory/perldap/blib
+ PERLDAP_ARCHLIB_DIR = $(PERLDAP_BUILT_DIR)/arch
+ PERLDAP_LIB_DIR = $(PERLDAP_BUILT_DIR)/lib/Mozilla
+ PERLDAP_AUTOLIB_DIR = $(PERLDAP_BUILT_DIR)/lib/auto
+# under the serverroot/lib directory, we should have a perl directory which contains arch/, auto/, and Mozilla/
+ PACKAGE_SRC_DEST += $(PERLDAP_ARCHLIB_DIR) lib/perl
+ PACKAGE_SRC_DEST += $(PERLDAP_LIB_DIR) lib/perl
+ PACKAGE_SRC_DEST += $(PERLDAP_AUTOLIB_DIR) lib/perl
+# else we're using the pre-built zip file - see ldap/cm/Makefile
+endif
Index: nsperl.mk
===================================================================
RCS file: /cvs/dirsec/ldapserver/nsperl.mk,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- nsperl.mk 19 Apr 2005 22:06:42 -0000 1.4
+++ nsperl.mk 21 Oct 2005 19:21:04 -0000 1.5
@@ -39,8 +39,6 @@
#
NSPERL_RELDATE := 20020626
-NSPERL_VERSION := nsPerl5.6.1
-NSPERL_COMPONENT_DIR = $(COMPONENTS_DIR)/nsPerl/$(NSPERL_RELDATE)/$(NSOBJDIR_NAME_32)
# default; will be redefined below for specific platform
#PERL=$(NSPERL_COMPONENT_DIR)/lib/$(NSPERL_VERSION)/nsperl
PERL=/share/builds/sbstools/nsPerl/$(NSPERL_RELDATE)/$(NSOBJDIR_NAME_32)/nsperl
@@ -55,66 +53,3 @@
ifdef USE_PERL_FROM_PATH
PERL = $(shell perl -e 'print "$$\n"')
endif
-
-NSPERL_ZIP_FILE = nsperl561.zip
-
-# This makefile sets up the environment so that we can build and link
-# perl xsubs. It assumes that you have a perl base directory that has
-# a bin and lib subdir and that which perl yields base dir/bin/perl[.exe]
-# also, this is only really necessary for NT, since this usually just
-# works in the NFS world of unix
-# for unix, we derive the paths from the Config information
-ifdef USE_OLD_NTPERL
-PERL_EXE = $(shell $(PERL) -e '($$foo = $$) =~ s@\\@/@g ; print "$$foo\n"')
-PERL_EXENT = $(subst \,/,$(PERL_EXE))
-PERL_BASEDIR = $(dir $(PERL_EXENT))
-PERL_ROOT = $(subst /bin/,,$(PERL_BASEDIR))
-IS_ACTIVESTATE = $(shell $(PERL) -v | grep -i activestate)
-else
-PERL_CONFIG = $(shell $(PERL) -e 'use Config; foreach $$item (qw(installprivlib installarchlib installsitelib installsitearch prefixexp)) { ($$foo = $$Config{$$item}) =~ s@\\@/@g ; print "$$foo "; } print "\\\n"')
-PERL_LIB = $(word 1, $(PERL_CONFIG))
-PERL_ARCHLIB = $(word 2, $(PERL_CONFIG))
-SITELIB = $(word 3, $(PERL_CONFIG))
-SITEARCH = $(word 4, $(PERL_CONFIG))
-PERL_ROOT = $(word 5, $(PERL_CONFIG))
-endif
-
-ifdef USE_OLD_NTPERL
-PERL_LIB = $(PERL_ROOT)/lib
-PERL_ARCHLIB = $(PERL_LIB)
-PERL_SITE = site
-SITELIB = $(PERL_ROOT)/$(PERL_SITE)/lib
-SITEARCH = $(SITELIB)
-endif
-
-INSTALLSITEARCH = $(SITEARCH)
-INSTALLSITELIB = $(SITELIB)
-SITEARCHEXP = $(SITEARCH)
-SITELIBEXP = $(SITELIB)
-XSUBPPDIR = $(PERL_LIB)/ExtUtils
-XSUBPP = $(XSUBPPDIR)/xsubpp
-XSPROTOARG =
-XSUBPPDEPS = $(XSUBPPDIR)/typemap
-XSUBPPARGS = -typemap $(XSUBPPDIR)/typemap
-PERL_INC = -I$(PERL_ARCHLIB)/CORE
-
-SITEHACK = $(subst $(PERL_ROOT)/,,$(SITELIB))
-ARCHHACK = $(subst $(PERL_ROOT)/,,$(PERL_ARCHLIB))
-
-ifeq ($(ARCH), WINNT)
-ifdef IS_ACTIVESTATE
-# C compilation/linking does not work for activestate; force C++
-PERL_CFLAGS = -TP -D_CONSOLE -DNO_STRICT -DPERL_OBJECT
-ifeq ($(DEBUG), full)
-PERL_CFLAGS += -DNDEBUG
-endif
-LIBPERL_A = /LIBPATH:$(PERL_ARCHLIB)/CORE perlCAPI.lib perlcore.lib PerlCRT.lib
-else
-LIBPERL_A = /LIBPATH:$(PERL_ARCHLIB)/CORE perl56.lib
-endif
-else
-ifeq ($(DEBUG), full)
-PERL_CFLAGS = -UDEBUG
-endif
-LIBPERL_A = -L$(PERL_ARCHLIB)/CORE -lperl
-endif
18 years, 7 months