On bundled platforms, you have to jump through hoops to set the correct
environment variables to run perldap scripts. Especially the setup scripts.
The user should not have to set PATH, PERL5LIB, and LD_LIBRARY_PATH to run these
Created attachment 160494 [details]
diffs for ldapserver
Created attachment 160495 [details]
diffs for adminserver
Your changes look good.
Created attachment 160525 [details]
cvs commit log (Comment #1)
Reviewed by: nkinder (Thanks!)
Files: see diff
Fix Description: Most platforms will just use perl from PATH. However, on
Solaris and HP-UX, we have to use special 64 bit versions to execute perldap,
since perldap is 64 bit on those platforms. Also, if bundling all of the
dependent components into the single package, we need to make sure the perl
library path is set correctly to find perldap.
The last step will be to build our version of perldap on the bundled platforms
to use rpath to point to the correct runtime library location.
Platforms tested: RHEL4, HP-UX 11.23 IPF 64 bit
Flag Day: no
Doc impact: no
Created attachment 160526 [details]
cvs commit log (Comment #2)
Verified that scripts that use PerLDAP, such as migrate-ds.pl, are able to find
all of their Perl modules properly on HP-UX. I also looked at the paths inside
of these scripts to make sure they look correct.
I found that the repl-monitor.pl script still has a problem however. If I run
it from the command line using it's wrapper, it is unable to find PerLDAP. It
isn't setting the perl libpath anywhere, so it's not looking in
/opt/dirsrv/lib/perl. I also see this problem if I invoke repl-monitor-cgi.pl
from the command line. If I add a "use lib" line as this bug added to the other
perl scripts, everything works fine.
There is also a problem on Solaris. We are using perl from the environment in
repl-monitor.pl, but we need to be using perl from RHATperlx
(/opt/perl5x/bin/perl) for PerLDAP to be found.
If we move repl-monitor.pl to repl-monitor.pl.in in the source tree and make the
following modification, it should solve both issues.
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/repl-monitor.pl,v
retrieving revision 1.2
diff -u -5 -t -r1.2 repl-monitor.pl
--- repl-monitor.pl 5 Sep 2007 16:35:28 -0000 1.2
+++ repl-monitor.pl 21 Dec 2007 21:44:57 -0000
@@ -1,6 +1,6 @@
# 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
# Foundation; version 2 of the License.
@@ -154,10 +154,12 @@
# 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.
+use lib qw(@perlpath@);
$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
use Mozilla::LDAP::Conn; # LDAP module for Perl
use Mozilla::LDAP::Utils qw(normalizeDN); # LULU, utilities.
(In reply to comment #8)
(In reply to comment #9)
> Looks good.
I'd like to get another ack since it's been a year since you last approved this...
Checked into ldapserver (HEAD). Thanks to Rich for his review(s)!
/cvs/dirsec/ldapserver/ldap/admin/src/scripts/repl-monitor.pl,v <-- repl-monitor.pl
new revision: delete; previous revision: 1.2
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/repl-monitor.pl.in,v
Checking in repl-monitor.pl.in;
/cvs/dirsec/ldapserver/ldap/admin/src/scripts/repl-monitor.pl.in,v <-- repl-monitor.pl.in
initial revision: 1.1
Is this something QE can verify? If so, please add steps to verify.
The fix is that you can run setup-ds-admin.pl and the other perl scripts without having to first set PATH or LD_LIBRARY_PATH or PERL5LIB to point to the right perl, libs, and perl modules directories. And this should work on linux, solaris, and hp-ux.
fix verified DS 8.1, no need to set PATH before executing setup-ds-admin.pl, also tested db2ldif, fixup-memberof
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.