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/admin/src/DSAdmin.mk | |
| parent | 8216af284bf01728074d474131ae781e6033055c (diff) | |
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/admin/src/DSAdmin.mk')
| -rw-r--r-- | ldap/admin/src/DSAdmin.mk | 163 |
1 files changed, 0 insertions, 163 deletions
diff --git a/ldap/admin/src/DSAdmin.mk b/ldap/admin/src/DSAdmin.mk deleted file mode 100644 index 0a1db8f2..00000000 --- a/ldap/admin/src/DSAdmin.mk +++ /dev/null @@ -1,163 +0,0 @@ -# -# 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. -# -# This Program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple -# Place, Suite 330, Boston, MA 02111-1307 USA. -# -# In addition, as a special exception, Red Hat, Inc. gives You the additional -# right to link the code of this Program with code not covered under the GNU -# General Public License ("Non-GPL Code") and to distribute linked combinations -# including the two, subject to the limitations in this paragraph. Non-GPL Code -# permitted under this exception must only link to the code of this Program -# through those well defined interfaces identified in the file named EXCEPTION -# found in the source code files (the "Approved Interfaces"). The files of -# Non-GPL Code may instantiate templates or use macros or inline functions from -# the Approved Interfaces without causing the resulting work to be covered by -# the GNU General Public License. Only Red Hat, Inc. may make changes or -# additions to the list of Approved Interfaces. You must obey the GNU General -# Public License in all respects for all of the Program code and other code used -# in conjunction with the Program except the Non-GPL Code covered by this -# exception. If you modify this file, you may extend this exception to your -# version of the file, but you are not obligated to do so. If you do not wish to -# provide this exception without modification, you must delete this exception -# statement from your version and license this file solely under the GPL without -# exception. -# -# -# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. -# Copyright (C) 2005 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK -# -# Makefile for the DSAdmin dynamic loaded perl module - -LDAP_SRC = ../.. -BUILD_ROOT = ../../.. - -NOSTDCLEAN=true # don't let nsconfig.mk define target clean -NOSTDSTRIP=true # don't let nsconfig.mk define target strip -NSPR20=true # probably should be defined somewhere else (not sure where) - -include $(BUILD_ROOT)/nsconfig.mk -include $(LDAP_SRC)/nsldap.mk - -BINDIR=$(LDAP_ADMIN_BIN_RELDIR) -OBJDEST=$(LDAP_ADMOBJDIR) - -INCLUDES += -I$(LDAP_SRC)/admin/include - -DS_SERVER_DEFS = -DNS_DS - -INFO = $(OBJDIR)/$(DIR) - -ifneq ($(ARCH), WINNT) -EXTRALDFLAGS += $(SSLLIBFLAG) -endif - -EXTRA_LIBS += $(LIBPERL_A) $(SETUPUTIL_S_LINK) $(LDAP_ADMLIB) \ - $(LDAPLINK) $(DEPLINK) $(ADMINUTIL_LINK) \ - $(NSPRLINK) $(NLSLINK) \ - $(NLSLINK_CONV_STATIC) - -# the security libs are statically linked into libds_admin.so; osf doesn't like -# to link against them again, it thinks they are multiply defined -ifneq ($(ARCH), OSF1) -EXTRA_LIBS += $(SECURITYLINK) $(DBMLINK) -else -#DLL_LDFLAGS=-shared -all -error_unresolved -taso -#EXTRA_LIBS += -lcxx -lcxxstd -lcurses -lc -endif - -ifeq ($(ARCH), WINNT) -PLATFORM_INCLUDE = -I$(BUILD_ROOT)/include/nt -SUBSYSTEM=console -EXTRA_LIBS+=comctl32.lib $(LDAP_SDK_LIBLDAP_DLL) $(LDAP_LIBUTIL) -EXTRA_LIBS_DEP+=$(LDAP_LIBUTIL_DEP) -DEF_FILE:=DSAdmin.def -LINK_DLL += /NODEFAULTLIB:msvcrtd.lib -endif - -ifeq ($(ARCH), AIX) -EXTRA_LIBS += $(DLL_EXTRA_LIBS) -lbsd -LD=ld -endif - -# absolutely do not try to build perl-stuff with warnings-as-errors. -# (duh.) -ifeq ($(ARCH), Linux) -CFLAGS := $(subst -Werror,,$(CFLAGS)) -endif - -DSADMIN_OBJS = DSAdmin.o -DSADMIN_BASENAME = DSAdmin$(DLL_PRESUFFIX).$(DLL_SUFFIX) - -OBJS= $(addprefix $(OBJDEST)/, $(DSADMIN_OBJS)) -DSADMIN_SO = $(addprefix $(BINDIR)/, $(DSADMIN_BASENAME)) - -EXTRA_LIBS_DEP = $(SETUPUTIL_DEP) - -# for Solaris, our most common unix build platform, we check for undefined -# symbols at link time so we don't catch them at run time. To do this, we -# set the -z defs flag. We also have to add explicitly link with the C and -# C++ runtime libraries (e.g., -lc) because, even though ld and CC link -# with them implicitly, -z defs will throw errors if we do not link with -# them explicitly. -ifeq ($(ARCH), SOLARIS) -LINK_DLL += -z defs -# removed -lcx from the following line -EXTRA_LIBS += -lCstd -lCrun -lm -lw -lc -# with the Forte 6 and later compilers, we must use CC to link -LD=CC -endif - -all: $(OBJDEST) $(BINDIR) $(DSADMIN_SO) - -dummy: - -@echo PERL_EXE = $(PERL_EXE) - -@echo PERL_EXENT = $(PERL_EXENT) - -@echo PERL_BASEDIR = $(PERL_BASEDIR) - -@echo PERL_ROOT = $(PERL_ROOT) - -@echo IS_ACTIVESTATE = $(IS_ACTIVESTATE) - -@echo PERL_CONFIG = $(PERL_CONFIG) - -@echo PERL_ROOT = $(PERL_ROOT) - -@echo PERL = $(PERL) - -@echo PERL_LIB = $(PERL_LIB) - -@echo PERL_ARCHLIB = $(PERL_ARCHLIB) - -@echo EXTRA_LIBS_DEP = $(EXTRA_LIBS_DEP) - abort - -ifeq ($(ARCH), WINNT) -$(DSADMIN_SO): $(OBJS) $(EXTRA_LIBS_DEP) $(DEF_FILE) - $(LINK_DLL) /DEF:$(DEF_FILE) -# linking this file causes a .exp and a .lib file to be generated which don't seem -# to be required while running, so I get rid of them - $(RM) $(subst .dll,.exp,$@) $(subst .dll,.lib,$@) -else -$(DSADMIN_SO): $(OBJS) - $(LINK_DLL) $(EXTRA_LIBS) -endif - -$(OBJDEST)/DSAdmin.o: $(OBJDEST)/DSAdmin.c -ifeq ($(ARCH), WINNT) - $(CC) -c $(CFLAGS) $(PERL_CFLAGS) $(MCC_INCLUDE) $(SETUPSDK_INCLUDE) $(PERL_INC) $< $(OFFLAG)$@ -else - $(CXX) $(EXCEPTIONS) -c $(CFLAGS) $(PERL_CFLAGS) $(MCC_INCLUDE) $(SETUPSDK_INCLUDE) $(PERL_INC) $< $(OFFLAG)$@ -endif - -$(OBJDEST)/DSAdmin.c: DSAdmin.xs - $(PERL) -w -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) $(XSPROTOARG) $(XSUBPPARGS) $< > $@ - -#MYCMD := "Mksymlists('NAME' => 'DSAdmin', 'DLBASE' => 'DSAdmin');" -#$(DEF_FILE): DSAdmin.xs -# $(PERL) -w "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -MExtUtils::Mksymlists -e "$(MYCMD)" - -clean: - -$(RM) $(OBJDEST)/DSAdmin.c $(OBJS) $(DSADMIN_SO) |
