summaryrefslogtreecommitdiffstats
path: root/ldap/cm
diff options
context:
space:
mode:
authorNoriko Hosoi <nhosoi@redhat.com>2005-10-25 16:55:49 +0000
committerNoriko Hosoi <nhosoi@redhat.com>2005-10-25 16:55:49 +0000
commit899056900648423b9d6144a2a848bd0b8998e66f (patch)
treed9895d9faac74da75b4722f926d9d6aaa012b95e /ldap/cm
parent35f8ea348b5f4c08f8e09130db59abddd849d870 (diff)
downloadds-899056900648423b9d6144a2a848bd0b8998e66f.tar.gz
ds-899056900648423b9d6144a2a848bd0b8998e66f.tar.xz
ds-899056900648423b9d6144a2a848bd0b8998e66f.zip
[167982] Service Pack framework
Reporting the patch generation code to the trunk.
Diffstat (limited to 'ldap/cm')
-rw-r--r--ldap/cm/Makefile39
-rw-r--r--ldap/cm/fedora-patch.inf3
-rwxr-xr-xldap/cm/genRpmPatch.pl16
-rwxr-xr-xldap/cm/newinst/setup155
-rwxr-xr-xldap/cm/newinst/setup.patch307
-rw-r--r--ldap/cm/redhat-patch.inf3
6 files changed, 504 insertions, 19 deletions
diff --git a/ldap/cm/Makefile b/ldap/cm/Makefile
index 6764e876..bc55e012 100644
--- a/ldap/cm/Makefile
+++ b/ldap/cm/Makefile
@@ -208,8 +208,8 @@ ABSBUILD_ROOT = $(shell cd $(BUILD_ROOT); pwd)
ABSRELDIR = $(ABSBUILD_ROOT)/built/release
GENRPMPATCH = $(ABSBUILD_ROOT)/ldap/cm/genRpmPatch.pl
PATCHINF = $(ABSBUILD_ROOT)/ldap/cm/fedora-patch.inf
-DATETIME = $(shell date +%Y%m%d-%H%M%S)
-SPEXT = .SP.$(DATETIME)
+DATETIME := $(shell date +%Y%m%d-%H%M%S)
+SPEXT := .SP.$(DATETIME)
# This is the directory where we put what we're making: the files which go on the CD.
ifndef INSTDIR
@@ -220,6 +220,8 @@ INSTDIR = $(BUILD_DRIVE)$(BUILD_ROOT)/../$(MMDD)/$(NS_BUILD_FLAVOR)
endif
endif
ABS_INSTDIR = $(shell cd $(INSTDIR); pwd)
+ABS_DISTDIR = $(ABSBUILD_ROOT)/../dist
+ESCAPED_ABS_DISTDIR = $(shell echo $(ABS_DISTDIR) | sed -e 's/\//\\\//g')
ifdef BUILD_PATCH
PATCHINSTDIR = $(ABS_INSTDIR)-SP
@@ -581,15 +583,6 @@ packageDirectory: $(INSTDIR)/slapd \
$(INSTDIR)/perldap/$(PERLDAP_ZIP_FILE) \
$(ADMSERV_DEP)
-ifdef BUILD_PATCH
-ifdef BUILD_RPM
-# create a patch
- $(GENRPMPATCH) -i $(RPM_BASE_NAME) -o $(NS_BUILD_FLAVOR) -r $(ABSRELDIR) -e $(SPEXT) -f $(PATCHINF) -v
- mv $(ABSRELDIR)/slapd/$(NS_BUILD_FLAVOR) $(ABSRELDIR)/slapd/$(NS_BUILD_FLAVOR).original
- ln -s $(ABSRELDIR)/slapd/$(NS_BUILD_FLAVOR)$(SPEXT)/opt/$(RPM_BASE_NAME)-ds $(ABSRELDIR)/slapd/$(NS_BUILD_FLAVOR)
-endif
-endif
-
# this gets setup, setup.inf, silent.inf, the zip wrapper, and svrcore, among others
ifeq ($(USE_SETUPUTIL),1)
cp -R $(SETUPUTIL_BINPATH)/* $(INSTDIR)
@@ -616,6 +609,22 @@ endif
endif
endif
endif
+
+ifdef BUILD_PATCH
+# take care of files in components (e.g., a file in nsadmin.zip)
+ -@for pair in `grep "^compfile:" $(PATCHINF) | awk '{print $$3}'`; do \
+ zipfile=`echo $$pair | awk -F: '{print $$1}' | sed -e "s/%DISTDIR%/$(ESCAPED_ABS_DISTDIR)\/$(NSOBJDIR_NAME)/"` ; \
+ afile=`echo $$pair | awk -F: '{print $$2}'` ; \
+ cd $(ABSRELDIR)/$(NS_BUILD_FLAVOR); $(UNZIP) -o $$zipfile $$afile ; \
+ done
+ifdef BUILD_RPM
+# create a patch
+ $(GENRPMPATCH) -i $(RPM_BASE_NAME) -o $(NS_BUILD_FLAVOR) -r $(ABSRELDIR) -e $(SPEXT) -f $(PATCHINF) -v
+ mv $(ABSRELDIR)/$(NS_BUILD_FLAVOR) $(ABSRELDIR)/$(NS_BUILD_FLAVOR).original
+ ln -s $(ABSRELDIR)/$(NS_BUILD_FLAVOR)$(SPEXT)/opt/$(RPM_BASE_NAME)-ds $(ABSRELDIR)/$(NS_BUILD_FLAVOR)
+endif
+endif
+
ifeq ($(USE_CONSOLE),1)
# create the slapd-client.zip file, which only has the ds jar file for the console and
# the ldap client utility programs
@@ -740,7 +749,8 @@ ifdef BUILD_PATCH
echo "[$(SLAPDSP)]" >> $(PATCHINSTDIR)/setup.inf
echo "ComponentInfoFile = $(SLAPDSP)/$(SLAPDSP).inf" >> $(PATCHINSTDIR)/setup.inf
# create a zip file based upon the $(PATCHINF) file
- cd $(ABSRELDIR)/slapd/$(NS_BUILD_FLAVOR); zip -r $(PATCHINSTDIR)/$(SLAPDSP)/ns$(SLAPDSP).zip `egrep "^file:" $(PATCHINF) | awk -F: '{print $$3}'`
+ cd $(ABSRELDIR)/$(NS_BUILD_FLAVOR); zip -r $(PATCHINSTDIR)/$(SLAPDSP)/ns$(SLAPDSP).zip `grep "^file:" $(PATCHINF) | awk -F: '{print $$3}'`
+ cd $(ABSRELDIR)/$(NS_BUILD_FLAVOR); zip -r $(PATCHINSTDIR)/$(SLAPDSP)/ns$(SLAPDSP).zip -u `grep "^compfile:" $(PATCHINF) | awk -F: '{print $$4}'`
# put ns-config and needed libs in the $(PATCHINSTDIR)/$(SLAPDSP) directory
$(INSTALL) -m 755 $(RELDIR_32)/bin/slapd/admin/bin/ns-config $(PATCHINSTDIR)/$(SLAPDSP)
-@for file in $(PACKAGE_SETUP_LIBS_32) ; \
@@ -750,7 +760,8 @@ ifdef BUILD_PATCH
done
# create patch inf file: $(SLAPD).inf
cp $(OBJDIR)/slapd-patch.inf $(PATCHINSTDIR)/$(SLAPDSP)/$(SLAPDSP).inf
- cd $(ABSRELDIR)/slapd/$(NS_BUILD_FLAVOR); ls `egrep "^file:" $(PATCHINF) | egrep -v "setup/setup" | awk -F: '{print $$3}'` > $(PATCHINSTDIR)/$(SLAPDSP)/$(SLAPDSP).inf.tmp
+ cd $(ABSRELDIR)/$(NS_BUILD_FLAVOR); ls `grep "^file:" $(PATCHINF) | egrep -v "setup/setup" | awk -F: '{print $$3}'` > $(PATCHINSTDIR)/$(SLAPDSP)/$(SLAPDSP).inf.tmp
+ cd $(ABSRELDIR)/$(NS_BUILD_FLAVOR); ls `grep "^compfile:" $(PATCHINF) | awk -F: '{print $$4}'` >> $(PATCHINSTDIR)/$(SLAPDSP)/$(SLAPDSP).inf.tmp
echo `cat $(PATCHINSTDIR)/$(SLAPDSP)/$(SLAPDSP).inf.tmp` | sed -e "s/ /,/g" > $(PATCHINSTDIR)/$(SLAPDSP)/$(SLAPDSP).inf.tmp2
echo "BackupFiles="`cat $(PATCHINSTDIR)/$(SLAPDSP)/$(SLAPDSP).inf.tmp2`>> $(PATCHINSTDIR)/$(SLAPDSP)/$(SLAPDSP).inf
rm -f $(PATCHINSTDIR)/$(SLAPDSP)/$(SLAPDSP).inf.tmp $(PATCHINSTDIR)/$(SLAPDSP)/$(SLAPDSP).inf.tmp2
@@ -840,7 +851,7 @@ endif # BUILD_SHIP
cleanDirectory:
cd $(LDAPDIR); $(MAKE) clean
- rm -rf $(BUILD_ROOT)/../dist/$(NC_BUILD_FLAVOR)
+ rm -rf $(BUILD_ROOT)/../dist/$(NSOBJDIR_NAME)
rm -rf $(BUILD_ROOT)/built/$(NS_BUILD_FLAVOR)
diff --git a/ldap/cm/fedora-patch.inf b/ldap/cm/fedora-patch.inf
index 9cc6e2d8..2f823f14 100644
--- a/ldap/cm/fedora-patch.inf
+++ b/ldap/cm/fedora-patch.inf
@@ -39,9 +39,12 @@
# Sample Info file to generate service pack
# base: <builddir> containing the base package -- e.g., DS7.1
# file: <bugzilla number>: <patchfile>
+# compfile: bug#: <patch_zipfile>:<patchfile>
+# %DISTDIR% points <buildroot>/dist/<platform>
#
base: /share/dev4/fedora-ds/fds71/ships/20050526.1
file: 000001: README.txt
file: 000002: lib/libback-ldbm.*
+compfile: 000003: %DISTDIR%/adminserver/admin/nsadmin.zip:manual/help/help
diff --git a/ldap/cm/genRpmPatch.pl b/ldap/cm/genRpmPatch.pl
index d8750a96..2ea24090 100755
--- a/ldap/cm/genRpmPatch.pl
+++ b/ldap/cm/genRpmPatch.pl
@@ -129,7 +129,13 @@ while ($l = <INFFILE>) {
$pos = rindex($l, ":", $pos);
$pos++;
$file = substr($l, $pos);
- $file =~ s/[ ]//g;
+ $file =~ s/[ ]//g;
+ push(@newfiles, ($file));
+ } elsif ($l =~ /^compfile: /) {
+ $pos = rindex($l, ":", $pos);
+ $pos++;
+ $file = substr($l, $pos);
+ $file =~ s/[ ]//g;
push(@newfiles, ($file));
}
}
@@ -161,9 +167,9 @@ if ($builtdirname =~ /RHEL3/) {
}
$optordbg = "";
-if ($builtdirname =~ /full/) {
+if ($builtdirname =~ /_DBG/) {
$optordbg = "dbg";
-} elsif ($builtdirname =~ /optimize/) {
+} elsif ($builtdirname =~ /_OPT/) {
$optordbg = "opt";
} else {
print(STDERR "ERROR: $builtdirname has no opt/debug info\n");
@@ -205,7 +211,7 @@ if (1 == $verbose) {
}
# Expand the RPM file to the $releasedir
-$workdir = $releasedir . "/slapd/" . $builtdirname . $extension;
+$workdir = $releasedir . "/" . $builtdirname . $extension;
mkdir($workdir, 0700);
chdir($workdir);
if (1 == $verbose) {
@@ -216,7 +222,7 @@ close(RPM2CPIO);
# Copy new files onto the expanded files
foreach $afile (@newfiles) {
- $srcfile = $releasedir . "/slapd/" . $builtdirname . "/" . $afile;
+ $srcfile = $releasedir . "/" . $builtdirname . "/" . $afile;
$destfile = $workdir . "/opt/" . $iddir . "/" . $afile;
$destdir = substr($destfile, 0, rindex($destfile, "/", length($destfile)));
if (!(-d $destdir)) {
diff --git a/ldap/cm/newinst/setup b/ldap/cm/newinst/setup
index f71a6fdb..c3a13ad5 100755
--- a/ldap/cm/newinst/setup
+++ b/ldap/cm/newinst/setup
@@ -195,8 +195,161 @@ if ! [ $silent ]; then
askYN "Continue?"
fi
+isadminsslon=0
+sslparams=""
+
+adminSSLOff() {
+ conffile=$1
+ confparam=$2
+ tmpfile=$3
+ if [ -f $conffile ]; then
+ security=`grep -i "^$confparam" $conffile | awk '{print $1}'`
+ issecure=`grep -i "^$confparam" $conffile | awk '{print $2}'`
+ if [ "$issecure" = "on" -o "$issecure" = "ON" -o "$issecure" = "On" -o "$issecure" = "oN" ]
+ then
+ if [ $isadminsslon -eq 0 ]; then
+ $sroot/stop-admin
+ isadminsslon=1
+ fi
+ echo $conffile=$security >> $tmpfile
+ cat $conffile | sed -e "s/^\($security\) .*/\1 off/g" > $conffile.01
+ mv $conffile.01 $conffile
+ echo "$conffile: SSL off ..."
+ fi
+ fi
+}
+
+adminXmlSSLOff() {
+ conffile=$1
+ confparam=$2
+ tmpfile=$3
+ if [ -f $conffile ]; then
+ grep -i "\<security=\"on\"" $conffile > /dev/null 2>&1
+ rval=$?
+ if [ $rval -eq 0 ]
+ then
+ if [ $isadminsslon -eq 0 ]; then
+ $sroot/stop-admin
+ isadminsslon=1
+ fi
+ echo $conffile=$confparam >> $tmpfile
+ cat $conffile | sed -e "s/\([Ss][Ee][Cc][Uu][Rr][Ii][Tt][Yy]=\)\"[A-Za-z]*\"/\1\"off\"/g" > $conffile.0
+ mv $conffile.0 $conffile
+ echo "$conffile: SSL off ..."
+ fi
+ sslparams0=`grep -i "<.*SSLPARAMS " $conffile`
+ rval=$?
+ if [ $rval -eq 0 ]
+ then
+ if [ $isadminsslon -eq 0 ]; then
+ $sroot/stop-admin
+ isadminsslon=1
+ fi
+echo adminXmlSSLOff: SSLPARAMS off
+ sslparams1=`echo $sslparams0 | sed -e 's/\//\\\\\//g'`
+ sslparams=`echo $sslparams1 | sed -e 's/\"/\\\\\"/g'`
+ cat $conffile | sed -e "s/\($sslparams\)/\<\!-- \1 --\>/g" > $conffile.1
+ mv $conffile.1 $conffile
+ fi
+ fi
+}
+
+SSLOff() {
+ rm -f dssecure.txt assecure.txt > /dev/null 2>&1
+ touch dssecure.txt
+ touch assecure.txt
+
+ for dir in $sroot/slapd-* ; do
+ if [ -f $dir/config/dse.ldif ]; then
+ security=`grep -i "^nsslapd-security:" $dir/config/dse.ldif | awk '{print $1}'`
+ issecure=`grep -i "^nsslapd-security:" $dir/config/dse.ldif | awk '{print $2}'`
+ if [ "$issecure" = "on" -o "$issecure" = "ON" -o "$issecure" = "On" -o "$issecure" = "oN" ]
+ then
+ echo $dir >> dssecure.txt
+ $dir/stop-slapd
+ cat $dir/config/dse.ldif | sed -e "s/\($security\) .*/\1 off/g" > $dir/config/dse.ldif.0
+ mv $dir/config/dse.ldif.0 $dir/config/dse.ldif
+ echo "$dir/config/dse.ldif: SSL off ..."
+ fi
+ fi
+ done
+ if [ -d $sroot/admin-serv/config ]; then
+ adminSSLOff $sroot/admin-serv/config/adm.conf security: assecure.txt
+ adminSSLOff $sroot/admin-serv/config/local.conf configuration.nsServerSecurity: assecure.txt
+ adminSSLOff $sroot/admin-serv/config/magnus.conf Security assecure.txt
+ adminXmlSSLOff $sroot/admin-serv/config/server.xml security assecure.txt
+
+ if [ $isadminsslon -ne 0 ]; then
+ $sroot/start-admin
+ fi
+ fi
+}
+
+adminSSLOn() {
+ conffile=$1
+ confparam=$2
+ if [ -f $conffile ]; then
+ cat $conffile | sed -e "s/^\($confparam\) .*/\1 on/g" > $conffile.00
+ mv $conffile.00 $conffile
+ echo "$conffile $confparam: SSL on ..."
+ fi
+}
+
+adminXmlSSLOn() {
+ conffile=$1
+ if [ -f $conffile ]; then
+ cat $conffile | sed -e "s/\([Ss][Ee][Cc][Uu][Rr][Ii][Tt][Yy]=\)\"[A-Za-z]*\"/\1\"on\"/g" > $conffile.2
+ mv $conffile.2 $conffile
+ fi
+ grep -i "<.*SSLPARAMS " $conffile > /dev/null 2>&1
+ rval=$?
+ if [ $rval -eq 0 ]
+ then
+ cat $conffile | sed -e "s/<\!-- *$sslparams *-->/$sslparams/g" > $conffile.3
+ mv $conffile.3 $conffile
+ fi
+ echo "$conffile: SSL on ..."
+}
+
+SSLOn() {
+ for dir in `cat dssecure.txt` ; do
+ if [ -f $dir/config/dse.ldif ]; then
+ security=`grep -i "^nsslapd-security:" $dir/config/dse.ldif | awk '{print $1}'`
+ $dir/stop-slapd
+ cat $dir/config/dse.ldif | sed -e "s/\($security\) .*/\1 on/g" > $dir/config/dse.ldif.0
+ mv $dir/config/dse.ldif.0 $dir/config/dse.ldif
+ echo "$dir/config/dse.ldif: SSL on ..."
+ echo "Restarting Directory Server: $dir/start-slapd"
+ $dir/start-slapd
+ fi
+ done
+
+ if [ $isadminsslon -ne 0 ]; then
+ $sroot/stop-admin
+ fi
+ for confline in `cat assecure.txt` ; do
+ conffile=`echo $confline | awk -F= '{print $1}'`
+ confparam=`echo $confline | awk -F= '{print $2}'`
+ echo $conffile | grep "\.xml$" > /dev/null 2>&1
+ rval=$?
+ if [ $rval -eq 0 ]; then
+ adminXmlSSLOn $conffile $confparam
+ else
+ adminSSLOn $conffile $confparam
+ fi
+ done
+ if [ $isadminsslon -ne 0 ]; then
+ echo "Restarting Administration Server: $sroot/start-admin"
+ $sroot/start-admin
+ fi
+
+ rm -f dssecure.txt assecure.txt > /dev/null 2>&1
+}
+
# check whether it is an in-place installation
if [ -f $sroot/admin-serv/config/adm.conf ]; then
+ SSLOff
+
dsinst=`getValFromAdminConf "ldapStart:" "adm.conf" | awk -F/ '{print $1}'`
if [ -f $sroot/$dsinst/config/dse.ldif ]; then
# it is an in=place installation
@@ -339,6 +492,8 @@ fi
`pwd`/bin/admin/ns-update $doreconfig $silentarg $myargs -f $inffile | tee -a $logfile || doExit
+SSLOn
+
echo "INFO Finished with setup, logfile is setup/setup.log" | tee -a $logfile
if [ -f setup/setup.log ] ; then
cat $logfile >> setup/setup.log
diff --git a/ldap/cm/newinst/setup.patch b/ldap/cm/newinst/setup.patch
new file mode 100755
index 00000000..45004736
--- /dev/null
+++ b/ldap/cm/newinst/setup.patch
@@ -0,0 +1,307 @@
+#!/bin/sh
+#
+# 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) 2005 Red Hat, Inc.
+# All rights reserved.
+# END COPYRIGHT BLOCK
+#
+
+#
+# This script is a wrapper for dssetup used for inplace upgrade / patch
+# installation.
+#
+clear
+
+echo " Fedora Project"
+echo " Fedora Server Products Installation/Uninstallation"
+echo "-------------------------------------------------------------------------------"
+echo ""
+echo ""
+echo "BY INSTALLING THIS SOFTWARE YOU ARE CONSENTING TO BE BOUND BY"
+echo "AND ARE BECOMING A PARTY TO THE AGREEMENT FOUND IN THE"
+echo "LICENSE.TXT FILE. IF YOU DO NOT AGREE TO ALL OF THE TERMS"
+echo "OF THIS AGREEMENT, PLEASE DO NOT INSTALL OR USE THIS SOFTWARE."
+echo ""
+printf "Do you agree to the license terms? [No]: "
+read ans
+
+if [ "$ans" != "Y" -a "$ans" != "YES" -a "$ans" != "Yes" -a "$ans" != "y" -a "$ans" != "yes" ]; then
+ exit 1;
+fi
+
+clear
+
+echo " Fedora Project"
+echo " Fedora Server Products Installation/Uninstallation"
+echo "-------------------------------------------------------------------------------"
+echo ""
+echo ""
+echo "This program will extract the patch files and install them"
+echo "into a directory where the Directory Server is already installed."
+echo ""
+echo "To accept the default shown in brackets, press the Enter key."
+echo ""
+printf "Install location [/opt/fedora/servers]: "
+read serverroot
+
+if [ ! -d $serverroot ]; then
+ echo ""
+ echo "Directory $serverroot does not exist."
+ exit 1
+fi
+
+if [ ! -f $serverroot/admin-serv/config/adm.conf ]; then
+ echo ""
+ echo "Administration Server's configuration file $serverroot/admin-serv/config/adm.conf does not exist."
+ exit 1
+fi
+
+getValFromAdminConf() {
+ cattr=$1
+ cfile=$2
+ rval=`grep -i $cattr $serverroot/admin-serv/config/$cfile | awk '{print $2}'`
+ echo $rval
+}
+
+dsinst=`getValFromAdminConf "ldapStart:" "adm.conf" | awk -F/ '{print $1}'`
+dsconffile=$serverroot/$dsinst/config/dse.ldif
+if [ ! -f $dsconffile ]; then
+ echo ""
+ echo "Directory Server's configuration file $dsconffile does not exist."
+ exit 1
+fi
+
+clear
+
+isadminsslon=0
+sslparams=""
+
+adminSSLOff() {
+ conffile=$1
+ confparam=$2
+ tmpfile=$3
+ if [ -f $conffile ]; then
+ security=`grep -i "^$confparam" $conffile | awk '{print $1}'`
+ issecure=`grep -i "^$confparam" $conffile | awk '{print $2}'`
+ if [ "$issecure" = "on" -o "$issecure" = "ON" -o "$issecure" = "On" -o "$issecure" = "oN" ]
+ then
+ if [ $isadminsslon -eq 0 ]; then
+ $serverroot/stop-admin
+ isadminsslon=1
+ fi
+ echo $conffile=$security >> $tmpfile
+ cat $conffile | sed -e "s/^\($security\) .*/\1 off/g" > $conffile.0
+ mv $conffile.0 $conffile
+ echo "$conffile: SSL off ..."
+ fi
+ fi
+}
+
+adminXmlSSLOff() {
+ conffile=$1
+ confparam=$2
+ tmpfile=$3
+ if [ -f $conffile ]; then
+ grep -i "\<security=\"on\"" $conffile > /dev/null 2>&1
+ rval=$?
+ if [ $rval -eq 0 ]
+ then
+ if [ $isadminsslon -eq 0 ]; then
+ $serverroot/stop-admin
+ isadminsslon=1
+ fi
+ echo $conffile=$confparam >> $tmpfile
+ cat $conffile | sed -e "s/\([Ss][Ee][Cc][Uu][Rr][Ii][Tt][Yy]=\)\"[A-Za-z]*\"/\1\"off\"/g" > $conffile.0
+ mv $conffile.0 $conffile
+ echo "$conffile: SSL off ..."
+ fi
+ sslparams0=`grep -i "<.*SSLPARAMS " $conffile`
+ rval=$?
+ if [ $rval -eq 0 ]
+ then
+ if [ $isadminsslon -eq 0 ]; then
+ $serverroot/stop-admin
+ isadminsslon=1
+ fi
+ sslparams1=`echo $sslparams0 | sed -e 's/\//\\\\\//g'`
+ sslparams=`echo $sslparams1 | sed -e 's/\"/\\\\\"/g'`
+ cat $conffile | sed -e "s/\($sslparams\)/\<\!-- \1 --\>/g" > $conffile.0
+ mv $conffile.0 $conffile
+ echo "$conffile: SSL off ..."
+ fi
+ fi
+}
+
+rm -f dssecure.txt assecure.txt > /dev/null 2>&1
+touch dssecure.txt
+touch assecure.txt
+
+for dir in $serverroot/slapd-* ; do
+ if [ -f $dir/config/dse.ldif ]; then
+ security=`grep -i "^nsslapd-security:" $dir/config/dse.ldif | awk '{print $1}'`
+ issecure=`grep -i "^nsslapd-security:" $dir/config/dse.ldif | awk '{print $2}'`
+ if [ "$issecure" = "on" -o "$issecure" = "ON" -o "$issecure" = "On" -o "$issecure" = "oN" ]
+ then
+ echo $dir >> dssecure.txt
+ $dir/stop-slapd
+ cat $dir/config/dse.ldif | sed -e "s/\($security\) .*/\1 off/g" > $dir/config/dse.ldif.0
+ mv $dir/config/dse.ldif.0 $dir/config/dse.ldif
+ echo "$dir/config/dse.ldif: SSL off ..."
+ $dir/start-slapd
+ fi
+ fi
+done
+
+if [ -d $serverroot/admin-serv/config ]; then
+ adminSSLOff $serverroot/admin-serv/config/adm.conf security: assecure.txt
+ adminSSLOff $serverroot/admin-serv/config/local.conf configuration.nsServerSecurity: assecure.txt
+ adminSSLOff $serverroot/admin-serv/config/magnus.conf Security assecure.txt
+ adminXmlSSLOff $serverroot/admin-serv/config/server.xml security assecure.txt
+
+ if [ $isadminsslon -ne 0 ]; then
+ $serverroot/start-admin
+ fi
+fi
+
+ldaphost=`getValFromAdminConf "ldapHost:" "adm.conf"`
+ldapport=`getValFromAdminConf "ldapPort:" "adm.conf"`
+siepid=`getValFromAdminConf "siepid:" "adm.conf"`
+suitespotuser=`ls -l $dsconffile | awk '{print $3}'`
+suitespotgroup=`ls -l $dsconffile | awk '{print $4}'`
+admindomain=`echo $ldaphost | awk -F. '{if ($5) {print $2 "." $3 "." $4 "." $5} else if ($4) {print $2 "." $3 "." $4} else if ($3) {print $2 "." $3} else if ($2) {print $2} else {print ""}}'`
+if [ "$admindomain" = "" ]; then
+ admindomain=`domainname`
+fi
+
+clear
+
+echo " Fedora Project"
+echo " Directory Installation/Uninstallation"
+echo "-------------------------------------------------------------------------------"
+echo ""
+echo "In order to reconfigure your installation, the Configuration Directory"
+echo "Administrator password is required. Here is your current information:"
+echo ""
+echo "Configuration Directory: ldap://$ldaphost:$ldapport/o=NetscapeRoot"
+echo "Configuration Administrator ID: $siepid"
+echo ""
+echo "At the prompt, please enter the password for the Configuration Administrator."
+echo ""
+echo "administrator ID: $siepid"
+siepasswd=""
+while [ "$siepasswd" = "" ]; do
+ printf "Password: "
+ read siepasswd
+done
+
+inffile=./myinstall.inf
+
+echo "[General]" > $inffile
+echo "FullMachineName= $ldaphost" >> $inffile
+echo "SuiteSpotUserID= $suitespotuser" >> $inffile
+echo "SuitespotGroup= $suitespotgroup" >> $inffile
+echo "ServerRoot= $serverroot" >> $inffile
+echo "ConfigDirectoryLdapURL= ldap://$ldaphost:$ldapport/" >> $inffile
+echo "ConfigDirectoryAdminID= $siepid" >> $inffile
+echo "AdminDomain= $admindomain" >> $inffile
+echo "ConfigDirectoryAdminPwd= $siepasswd" >> $inffile
+echo "Components= slapd-71sp1" >> $inffile
+echo "" >> $inffile
+echo "[slapd-71sp1]" >> $inffile
+echo "Components= slapd-71sp1" >> $inffile
+
+clear
+
+./dssetup -s -f $inffile
+
+adminSSLOn() {
+ conffile=$1
+ confparam=$2
+ if [ -f $conffile ]; then
+ cat $conffile | sed -e "s/^\($confparam\) .*/\1 on/g" > $conffile.0
+ mv $conffile.0 $conffile
+ echo "$conffile $confparam: SSL on ..."
+ fi
+}
+
+adminXmlSSLOn() {
+ conffile=$1
+ if [ -f $conffile ]; then
+ cat $conffile | sed -e "s/\([Ss][Ee][Cc][Uu][Rr][Ii][Tt][Yy]=\)\"[A-Za-z]*\"/\1\"on\"/g" > $conffile.0
+ mv $conffile.0 $conffile
+ fi
+ grep -i "<.*SSLPARAMS " $conffile > /dev/null 2>&1
+ rval=$?
+ if [ $rval -eq 0 ]
+ then
+ cat $conffile | sed -e "s/<\!-- *$sslparams *-->/$sslparams/g" > $conffile.0
+ mv $conffile.0 $conffile
+ fi
+ echo "$conffile: SSL on ..."
+}
+
+for dir in `cat dssecure.txt` ; do
+ clear
+ if [ -f $dir/config/dse.ldif ]; then
+ security=`grep -i "^nsslapd-security:" $dir/config/dse.ldif | awk '{print $1}'`
+ $dir/stop-slapd
+ cat $dir/config/dse.ldif | sed -e "s/\($security\) .*/\1 on/g" > $dir/config/dse.ldif.0
+ mv $dir/config/dse.ldif.0 $dir/config/dse.ldif
+ echo "$dir/config/dse.ldif: SSL on ..."
+ echo "Restarting Directory Server: $dir/start-slapd"
+ $dir/start-slapd
+ fi
+done
+
+if [ $isadminsslon -ne 0 ]; then
+ $serverroot/stop-admin
+fi
+for confline in `cat assecure.txt` ; do
+ conffile=`echo $confline | awk -F= '{print $1}'`
+ confparam=`echo $confline | awk -F= '{print $2}'`
+ echo $conffile | grep "\.xml$" > /dev/null 2>&1
+ rval=$?
+ if [ $rval -eq 0 ]; then
+ adminXmlSSLOn $conffile $confparam
+ else
+ adminSSLOn $conffile $confparam
+ fi
+done
+if [ $isadminsslon -ne 0 ]; then
+ echo "Restarting Administration Server: $serverroot/start-admin"
+ $serverroot/start-admin
+fi
+
+rm -f dssecure.txt assecuire.txt
diff --git a/ldap/cm/redhat-patch.inf b/ldap/cm/redhat-patch.inf
index 5c48aa09..27a613ee 100644
--- a/ldap/cm/redhat-patch.inf
+++ b/ldap/cm/redhat-patch.inf
@@ -39,8 +39,11 @@
# Sample Info file to generate service pack
# base: <builddir> containing the base package -- e.g., DS7.1
# file: <bugzilla number>: <patchfile>
+# compfile: bug#: <patch_zipfile>:<patchfile>
+# %DISTDIR% points <buildroot>/dist/<platform>
#
base: /share/dev4/fedora-ds/fds71/ships/20050526.1
file: 000001: README.txt
file: 000002: lib/libback-ldbm.*
+compfile: 000003: %DISTDIR%/adminserver/admin/nsadmin.zip:manual/help/help