#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create:
#	upgrade-7.0
# This archive created: Wed Aug 21 15:52:16 1991
export PATH; PATH=/bin:/usr/bin:$PATH
if test ! -d 'upgrade-7.0'
then
	mkdir 'upgrade-7.0'
fi
cd 'upgrade-7.0'
if test ! -d 'patches'
then
	mkdir 'patches'
fi
cd 'patches'
cd ..
if test -f 'Makefile'
then
	echo shar: "will not over-write existing file 'Makefile'"
else
cat << \SHAR_EOF > 'Makefile'
###########################################################################
#
# Makefile to upgrade ISODE, QUIPU and FTAM from 6.0 or 6.1 to ISODE-7.0
#
# (c) Copyright X-Tel Services Ltd. 1991
# All rights reserved.
#
# CJR - 12/7/91
#
# Version 2.0 - ISODE-7.0 upgrade
#
# Assumes a Sun4 with SUN-X.25, with UK Directory Pilot standard config
#
############################################################################

# Local site definitions

# Your DSAs quiputailor file 
QUIPUTAILOR=	$(ETCDIR)quiputailor

# Location on disk of the previous version of ISODE under $(ISODEDIR)
# If are not running ISODE-6.8, then this should be changed to 
# OLDISODE=       isode-6.[01]
OLDISODE=	isode-6.8

# Version number of this ISODE release
VERSION =	7.0

# The tar file of the new source code
TARFILE=	isode-7.tar.Z

# Where to put the new version of ISODE
NEWISODE=	isode-$(VERSION)

# Directory containing patches
PATCHDIR=	patches/

# File to read patches from (override from command line!)
PATCHFILE=

# New ISODE source directory
SOURCE=		$(ISODEDIR)/$(NEWISODE)
RSOURCE=	`cat home`

#########################################
# Don't touch this parameter unless you have read 
# the installation guide.
#########################################
TAILORREMOVE=IXI
#TAILORREMOVE=

#########################################
#
# Default actions
#
#########################################

all:		.notice compile-it
		@echo
		@echo Compilation phase complete - now install

.notice:	NOTICE
		@echo
		@echo "******************************************************"
		@echo
		@cat NOTICE
		@echo
		@echo "******************************************************"
		@echo
		@touch $@

install:	install-it 
		@echo
		@echo Installation phase complete - now reboot

configure:	dotmake configure-it 
		@echo
		@echo Phew\! You are now running ISODE-7.0.
		@echo

inst-all:	install

#########################################
#
# Compilation Actions
#
#########################################

compile-it:	dotmake home space unwrap tailoring 
		@echo -n "Starting to compile at "
		@date +%H:%M
		@echo "This takes about 45 minutes..."
		cd $(SOURCE); ./make all all-quipu all-ftam > make.log 2>&1
		cd $(SOURCE)/others/quipu/uips/dish; ./make >/dev/null 2>&1
		@echo -n "... finished at "
		@date +%H:%M
		@date > compiled-isode

complied-isode:
		@echo "You must compile before installing!"
		exit 3

unwrap:		$(ISODEDIR)/$(TARFILE)
		@echo "Unwraping the new ISODE (it takes about 10 minutes)..."
		cd $(ISODEDIR) ; zcat < $(TARFILE) | tar xf -
#		@ln -s $(ISODEDIR)/isode-interim $(ISODEDIR)/$(NEWISODE)
		@date > $@

ftam-isode: .notice dotmake $(ISODEDIR)/$(TARFILE)

$(ISODEDIR)/$(TARFILE):
		@./doftam $(ISODEDIR) $(TARFILE)

tailoring:	unwrap 
		cp $(ISODEDIR)/$(OLDISODE)/support/*.local $(SOURCE)/support/
		@rm -f $(SOURCE)/support/version.local
		cp $(ISODEDIR)/$(OLDISODE)/dsap/*.local $(SOURCE)/dsap/
		@rm -f $(SOURCE)/dsap/version.local
		cp ukdir.h    $(SOURCE)/h/config.h
		sed "s#@(LOCALETC)#$(ETCDIR)#" < ukdir.make \
			> $(SOURCE)/config/CONFIG.make 
		-@if ( egrep -s -i "SunOS Release 4.1" /etc/motd ) ; then \
			echo Using shared libraries ;\
			ex - $(SOURCE)/config/CONFIG.make < shared.ed;\
			ex - $(SOURCE)/h/config.h < h.ed;\
		fi
		-grep IXI $(SOURCE)/support/macros.local > IXI.gone
		@-grep -v IXI $(SOURCE)/support/macros.local > /tmp/newmacros
		@cp /tmp/newmacros $(SOURCE)/support/macros.local
		@rm -f /tmp/newmacros
		@date > $@

home:;		@if [ "X$(ISODEDIR)" = "X/" ] ; then \
		    echo "ISODEDIR undefined" ;\
		    echo "type \"./make home\" as isode" ;\
		    exit 1; \
		fi
		echo "$(SOURCE)" > home
		

cleanold:;	@echo Cleaning the old ISODE to make room...
		-cd $(ISODEDIR)/$(OLDISODE) ; ./make clean >/dev/null 2>&1
		@date > $@

space:		cleanold # save-patch
		@./freespace $(ISODEDIR)
		@date > $@		

dotmake:;	@if [ "X$(ISODEDIR)" = "X" ] ; then \
			echo "Did you run \"./make\" ?" ;\
			echo "(ISODEDIR undefined)" ;\
			exit 1; \
		fi
		@if [ "X$(ETCDIR)" = "X" ] ; then \
			echo "Did you run \"./make\" ?" ;\
			echo "(ETCDIR undefined)" ;\
			exit 1; \
		fi
			
#########################################
#
# Installation Actions
#
# You must be root to do these.
#
#########################################

install-it:	dotmake compiled-isode save-tailor inst-isode redo-tailor

inst-isode:	compiled-isode root home
		@echo "Installing - takes about 10 minutes..."
		cd $(RSOURCE); ./make inst-all inst-quipu \
			install-ftam > make-inst.log 2>&1
		@-cp $(ETCDIR)dishinit    archive
		cd $(RSOURCE)/others/quipu/uips/dish; \
			./make inst-all >/dev/null 2>&1

save-tailor:
		-mkdir archive
		-cp $(ETCDIR)isotailor   archive
		cp $(ETCDIR)dsaptailor   archive
		cp $(QUIPUTAILOR)        archive
		cp $(ETCDIR)oidtable.*   archive
		cp $(ETCDIR)isoaliases   archive
		cp $(ETCDIR)isoservices  archive
		cp $(ETCDIR)isobjects    archive
		cp $(ETCDIR)isoentities  archive
		-cp $(ETCDIR)fredrc	 archive
		@date > $@

redo-tailor:;	-@if [ "X$(OLDISODE)" = "Xisode-6.8" ] ; then \
			./make redo-tailor8 ; \
		else \
			./make redo-tailor1 ; \
		fi
		@date > $@
		

redo-tailor8:	root isotailor-$(TAILORREMOVE) 
		cp archive/dsaptailor $(ETCDIR)
		cp archive/quiputailor $(QUIPUTAILOR)
		-cp archive/dishinit $(ETCDIR)
		@date > $@
		
redo-tailor1:	root isotailor-$(TAILORREMOVE) 
		cp archive/dsaptailor $(ETCDIR)
		sed 's#^\(treedir.*[^/ ]\) *$$#\1/#' \
			< archive/quiputailor > quiputailor.new
		-ex - $(ETCDIR)dsaptailor < dsap.ed >/dev/null >&1
		./doqt quiputailor.new $(ETCDIR)dsaptailor
		cp quiputailor.new $(QUIPUTAILOR)
		-cp archive/dishinit $(ETCDIR)
		@date > $@
		
isotailor-:;

isotailor-IXI:	root
		-sed "/^ts_interim/s/[Ii][Xx][Ii]//" \
			< archive/isotailor > $(ETCDIR)isotailor
		@date > $@
		
root:;		@if [ `whoami` != "root" ] ; then \
			echo "You must be root to install ISODE!"; \
			exit 2; \
		fi


#########################################
#
# Configuration Actions (for 6.1 only)
#
#########################################

configure-it:;	@./doversion $(QUIPUTAILOR)
		@date > $@

#########################################
#
# Patch QUIPU
#
#########################################

patch:		dotmake patch-apply patch-compile

patch-apply:	home
		@./dopatch $(RSOURCE) $(PATCHDIR) $(PATCHFILE) 

patch-compile:	dotmake home
		echo "Re-compiling (may take a while)..."
		cd $(RSOURCE); ./make all all-quipu \
			>> patch.log 2>&1
		cd $(RSOURCE)/others/quipu/uips/dish; ./make \
		   	>> patch.log 2>&1
		

patch-install:	dotmake root home
		cd $(RSOURCE); ./make inst-all inst-quipu >> patch.log 2>&1
		cd $(RSOURCE)/others/quipu/uips/dish; \
			./make inst-all >> patch.log 2>&1

save-patch:;	-mkdir patch-$(OLDISODE)
		-cp -r $(PATCHDIR)* patch-$(OLDISODE)
		date > $@

#########################################
#
# oidtables
#
#########################################

get-tables:;	@./dotables

install-tables: dotmake root home
		cp $(ETCDIR)oidtable.* archive
		cp oidtable.at  $(RSOURCE)/dsap
		cp oidtable.oc  $(RSOURCE)/dsap
		cp oidtable.gen $(RSOURCE)/dsap
		cd $(RSOURCE)/dsap ; ./make inst-oidtable

#########################################
#
# Document
#
#########################################

doc:;		tbl -ms upgrade.ms | nroff > upgrade.txt

preview:;	tbl -ms upgrade.ms | nroff | more

print:;		tbl -ms upgrade.ms | psroff

spell:;		deroff	upgrade.ms | spell -b | more

READ-ME:	upgrade.ms
		tbl -ms upgrade.ms | nroff | col > $@

#########################################
#
# Wrap for distribution
#
#########################################

dist:       	distribute

distribute:     really-clean READ-ME
		rm -f patches/*
	        csh -c "cd .. ; shar upgrade-$(VERSION) \
			> ~ftp/quipu/upgrade-$(VERSION).shar"
		csh -c "compress < ~ftp/quipu/upgrade-$(VERSION).shar \
			> ~ftp/quipu/upgrade-$(VERSION).shar.Z"
			
really-clean:	clean
		rm -rf archive .notice home
		rm -f oidtable.at oidtable.oc oidtable.gen

clean:;	        rm -f upgrade.txt cleanold tailoring quiputailor.new
	        rm -f inst-tailor configure-it IXI.gone isotailor-IXI
	    	rm -f save-tailor redo-tailor* compiled-isode save-patch
	    	rm -f *~ #*# core space unwrap 
		rm -f $(SOURCE)/patch.log
		rm -f $(SOURCE)/make.log
		rm -f $(SOURCE)/make-inst.log
		rm -f $(SOURCE)/others/quipu/uips/dish/patch.log
		rm -f $(SOURCE)/others/quipu/uips/dish/make.log
		rm -f $(SOURCE)/others/quipu/uips/dish/make-inst.log
SHAR_EOF
fi
if test -f 'upgrade.ms'
then
	echo shar: "will not over-write existing file 'upgrade.ms'"
else
cat << \SHAR_EOF > 'upgrade.ms'
./" tbl -ms | nroff
./" (c) Copyright X-Tel Services Ltd. 1991
./" All rights reserved.
./"
./" CJR - 12/7/91
.hy 0
.nh
.TL
QUIPU-7.0
.AU 
Colin Robbins
.DA 22 July 1991
.AI
X-Tel Services Ltd
.AB
ISODE and QUIPU version 7.0 have now been released.  
This is a note to explain the
X\-Tel position regarding support QUIPU-7.0 in terms of the JNT 
Directory Pilot and how to upgrade
from your current version of QUIPU to QUIPU\-7.0.
.AE
.NH 
Support
.LP
ISODE\-7.0 which contains QUIPU\-7.0 has just been announced on
various mail lists.
.LP
You should currently be running QUIPU\-6.1 or QUIPU\-6.8.  
.LP
We no longer support the QUIPU\-6.0.
We will stop supporting the QUIPU\-6.1 version on 1st October 1991.
If you are running with QUIPU\-6.1 you should upgrade to QUIPU\-7.0 by then.
.LP
Some sites have taken intermediate beta test versions of QUIPU, these
are not supported.
.LP
.NH 2 
Support Summary
.R
.TS
box tab (#);
n | l | l
-#-#-
n | l | l.
ISODE Version # Support # Comments
6.0 # None # Upgrade to 7.0 
6.1 # Will stop on Oct 1st # Upgrade to 7.0 
6.8 # Yes # 
7.0 # Yes # 
.TE
.R
Versions of the ISODE not listed above are NOT supported, you should
upgrade to 7.0.
.bp
.NH
Upgrading to ISODE-7.0
.LP
There is a script from X\-Tel to upgrade your ISODE version to
version 7.0.
This is available from X-Tel via ftam
in a file called 
.B
upgrade-7.0.shar
.R
in the 
.B
quipu
.R
directory (there is also a compressed version upgrade-7.0.shar.Z).
Recover this shell archive file
and place it in the top level of the isode home directory, and unwrap it:
.DS
.B
 cd ~isode
.br
 ftam -h -u anon 00002100102999 get quipu/upgrade-7.0.shar upgrade-7.0.shar
.br
 sh < upgrade-7.0.shar
.R
.DE
.LP
This will create a directory called "upgrade-7.0".  
Go into this directory:
.DS
.B
 cd upgrade-7.0
.R
.DE
(In this directory you will find the source of this note!)
.NH 2
Getting ISODE-7.0
.LP
The first step is to get the new ISODE tar file onto the directory machine!
The FTAM and NIFTP access information is given in the announcement.
You should place the file in the top level of the isode home directory
in a file called 
.B
isode\-7.tar.Z.
.R
.LP
Alternatively, you can ftam the file from X-Tel by entering the
.DS
.B
 ./make ftam-isode
.R
.DE
command in the upgrade-7.0 directory.
.NH 2
Disk Space
.LP
The amount of disk needed to build this version of the ISODE depends on
the operating system you are using.  Under SunOS4.1 or greater,
about 45\ Mbyte is needed.  With an earlier version of SunOS,
approximately 55\ Mbyte is needed (shared libraries make a big difference!).
.LP
The script will "clean" the old ISODE source and check there is
sufficient space (there should be!).  If there is not sufficient
space, you could consider removing the ISODE 6.0, 6.1 and 6.8 trees completely.
If you upgraded to ISODE-6.8 using the X\-Tel scripts, the directory
upgrade-6.8 can also be removed.
.LP
If you have kept the 
tar files from previous versions of ISODE you can remove them, they are
obsoleted by this version of the ISODE.
.NH 2
Compiling
.LP
If you are
.I not
currently running version 6.8 of the ISODE you will need to edit the 
.B Makefile
in the
.B upgrade-7.0 
directory.
Find the line
.DS
.B
 OLDISODE=	isode-6.8
.R
.DE
and change it to
.DS
.B
 OLDISODE=	isode-6.[01]
.R
.DE
.LP
If your system is a default ISODE installation (it will be unless you
have altered parameters in the CONFIG.make and config.h files) you can
now type:
.DS
.B
 ./make
.R
.DE
in the upgrade-7.0 directory.
.LP
This will unwrap the new ISODE, ensure there is sufficient disk space
and compile the new
ISODE.  This may take an hour or so!
.LP
If you changed any of the configuration options in the CONFIG.make
file or the config.h file of the previous ISODE release, you should
make similar changes to the files 
.B ukdir.make
and
.B ukdir.h
in the upgrade-7.0 directory before running make.
If you are running SunOS-4.1, you should NOT put the shared library 
options in the ukdir.make file.  This installation will make the
necessary shared library changes for you.
.LP
If your quiputailor file is NOT 
.B quiputailor
in the ISODE's etc directory (usually /usr/etc or /usr/local/etc),
you will need to edit the 
.DS
.B
 QUIPUTAILOR=	$(ETCDIR)quiputailor
.R
.DE
line in the upgrade-7.0/Makefile to show the absolute path 
name of the quiputailor file your DSA uses.
.NH 2
Installing
.LP
The next step is to install QUIPU.  If you have PP installed you will
need to configure a few things (see the Section\ 3 BEFORE
installing). To install (you will need to be root), type:
.DS
.B
 su
.br
 ./make install
.R
.DE
in the upgrade-7.0 directory.
.LP
Please note, normally the ISODE installation process overwrites your
dsaptailor and quiputailor files with new ones.  You then have to go
and restore the old ones.  This Makefile knows about this problem, and
restores the old ones after the installation!
In case of problems, all the original ISODE tailor and configuration
files are copied into an "archive" directory.  If you need to restore
any of these files, you are advised to contact X\-Tel first, as it is
likely you have something configured incorrectly.
.LP
This process will install the ISODE, QUIPU and FTAM.  If you want
other parts of the ISODE (vt, POD, SD, DE etc)\(dg
.FS 
\(dg OR your own programs which WILL need re-compiling.
.FE
you will have to do this yourself.  The
process is described in the isode\-7.0/READ\-ME file.
.NH 2
Configuring
.LP
If you are upgrading from ISODE-6.0 or ISODE-6.1 to ISODE-7.0 you need to
tell the GB master DSA you have upgraded.  The command
.DS
.B
 ./make configure
.R
.DE
will do this.  You do not need to perform this step if you are
upgrading from ISODE-6.8 to ISODE-7.0.
.LP
The final step is to reboot the machine, perhaps using something like
.DS
.B
 shutdown -r +5 "to install ISODE-7.0"
.R
.DE
.LP
When the machine comes back up, you should check that the ros.quipu process
has started using the "ps" command.
.LP
Having installed the standard ISODE and QUIPU, your attention is drawn
to the READ\-ME and QUIPU\-READ\-ME files in the isode\-7.0 directory
which describe the new features.  In particular notice the sections
describing how to replace to static isoentities and isoservices files
with a directory lookup should be noted. It is recommended that sites
register their OSI services in the directory. The READ-ME files
describe a tool to register and maintain these entries.
For an example set of registered services, you might consider looking at
.DS
 c=GB @ o=X-Tel Services Ltd @ cn=lancaster
.DE
in the DIT.
.NH
PP and ISODE-7.0
.LP
The PP\-5.0 release relies on ISODE\-6.0.  DO NOT try to re-compile
with this version of the ISODE.
The old binaries will work with this new version with one exception,
the definition of IXI.
.LP
If your isotailor file has a line of the following form
.DS
.B
 ts_interim: LOCAL-ETHER IXI
.R
.DE
you have a minor problem.
The "make install" option will remove the IXI definition from this
line of the  tailor file
as ISODE\-7.0 does not need it, but PP does.
.LP
To prevent this option from being removed
you should find the lines:
.DS
.B
 TAILORREMOVE=IXI
.br
 #TAILORREMOVE=
.R
.DE
In the upgrade-7.0/Makefile, swap the hash mark so that the line looks like
.DS
.B
 #TAILORREMOVE=IXI
.br
 TAILORREMOVE=
.R
.DE
Then you can install as described.
.LP
When you run any of the ISODE or QUIPU programs they will print the
warning:
.DS
.B
duplicate prefixes for communities "IXI" and "IXI"
.R
.DE
You can IGNORE this - it is annoying but harmless.
.NH
Patching
.LP
If it becomes necessary to patch this version of the ISODE, there are a
few tools to help you.
First of all, you should copy the patch into the 
.B
upgrade-7.0/patches
.R
directory, for example, create a new file called 
.DS
.B
 upgrade-7.0/patches/patch.1
.R
.DE
Each new patch should be given a different name, typically this will be the
name given to the patch when released.
.LP
Then in the 
.B upgrade-7.0
directory, issue the command
.DS
.B
 ./make patch 
.R
.DE
This will prompt you for the name of the
patchfile relative to the patches directory (if following 
the example above enter the name 
.B patch.1).
This will apply the patch and re-compile the default ISODE and QUIPU.
If you have compiled other interfaces, these may need recompiling.
.LP
./"As a short cut, you can set the patch file name 
./"from the make command line using the 
./".B PATCHFILE
./"variable, for example
./".DS
./".B
./" ./make PATCHFILE=patch.1 patch 
./".R
./".DE
./".LP
To install the patched ISODE and QUIPU, you will need to become
.B root,
then type
.DS
.B
 ./make patch-install
.R
.DE
.NH
OID Tables
.LP
From time to time it is worth checking that you have an up to date set
of oidtables. The option 
.DS
.B
 ./make get-tables
.R
.DE
will FTAM the latest tables from X-Tel. As root
.DS
.B
 ./make install-tables 
.R
.DE
will install them.
.NH
Problems
.LP
Any problems should be reported to 
.B jnt-quipu@uk.co.xtel
or you can telephone the "hotline" on 0602\ 412648.
.LP

.ZZ



SHAR_EOF
fi
if test -f 'make'
then
	echo shar: "will not over-write existing file 'make'"
else
cat << \SHAR_EOF > 'make'
: run this script through /bin/sh
M=/bin/make
if [ -f /usr/bin/make ]; then
    M=/usr/bin/make
fi
if [ -r /usr/local/etc/dsaptailor ]; then
    etc=/usr/local/etc/
elif [ -r /usr/etc/dsaptailor ]; then
    etc=/usr/etc/
elif [ -r /etc/dsaptailor ]; then
    etc=/etc/
elif [ -r /u1/etc/dsaptailor ]; then 
    etc=/u1/etc/
else
    echo -n "Where is your ISODE ETCDIR ? "
    read etc
fi
exec $M ETCDIR=$etc ISODEDIR=${HOME} ${1+"$@"}
SHAR_EOF
chmod +x 'make'
fi
if test -f 'quipu.ed'
then
	echo shar: "will not over-write existing file 'quipu.ed'"
else
cat << \SHAR_EOF > 'quipu.ed'
/^# ROOT MASTER/d
.c
# ROOT MASTER at University of London Computer Centre
parent	"cn=Giant Tortoise"	Internet=128.86.8.55+17003|IXI=20433450400255|X121+23421920014855|Janet=000040010550
.
w
q
SHAR_EOF
fi
if test -f 'doqt'
then
	echo shar: "will not over-write existing file 'doqt'"
else
cat << \SHAR_EOF > 'doqt'
#!/bin/sh 
#
# (c) Copyright X-Tel Services Ltd. 1991
# All rights reserved.
#
# CJR - 25/2/91
#
# Update your quiputailor file to include to 6.8 stuff
#
# doqt [quiputailor [dsaptailor]]
#
######################################################
#
# Find quiputailor and extract DSA name...
#
qt=${1-/usr/etc/quiputailor}
dt=${2-/usr/etc/dsaptailor}
if [ ! -r $qt ]; then
	echo Can not open quiputailor file: $qt
	exit 1
fi
ex - $qt < quipu.ed >/dev/null 2>&1
cat << EOF_QT >> $qt
#
# Tailoring for 6.8 features...
#
# shadow alias entries
# You may want to extend this to other DN attribute Types
shadow		aliasedObjectName

# select which attributes you want to index 
optimize_attr	commonName
optimize_attr	surName

# select which part of the DIT to index
EOF_QT
if [ -r $dt ]; then
    	site=` egrep -i "^local_DIT" $dt | \
		awk '{for (i=2;i<=NF;i++) printf "%s ",$i}'`
	if [ "X$site" != "X" ]; then 
		echo "index_subtree $site" >> $qt
	fi
fi
SHAR_EOF
chmod +x 'doqt'
fi
if test -f 'doftam'
then
	echo shar: "will not over-write existing file 'doftam'"
else
cat << \SHAR_EOF > 'doftam'
#!/bin/sh 
#
# (c) Copyright X-Tel Services Ltd. 1991
# All rights reserved.
#
# CJR - 25/2/91
#
# Ftam new ISODE from X-Tel
#
# doftam destination file
#
# version 1.1 18/3/91
#
######################################################
tf=$1
iv=$2
if [ ! -d $tf ]; then
  	echo Invalid directory $tf
	exit 1
fi
if [ -r $tf/$iv ]; then
  	echo Got it already...
	ls -l $tf/$iv
	exit
fi
echo -n "Recover file $iv from X-Tel (y/n)? "
read YN
if test "$YN" = "y" -o "$YN" = "yes" -o "$YN" = "Y" -o "$YN" = "YES" 
then
	echo YES...
	if ( ftam -h -f -u anon 00002100102999 get isode/$iv /tmp/$iv ) ; then
		if ( cp /tmp/$iv $tf/$iv ) ; then
			rm -f /tmp/$iv
		else 
		      	echo Copy failed file is...
			ls -l $tf/$iv
			exit 2
		fi
	else
		echo Ftam failed
		exit 3
	fi
else
	echo NO
	exit 4
fi
SHAR_EOF
chmod +x 'doftam'
fi
if test -f 'READ-ME'
then
	echo shar: "will not over-write existing file 'READ-ME'"
else
cat << \SHAR_EOF > 'READ-ME'









                         QUIPU-7.0


                       Colin Robbins

                     X-Tel Services Ltd


                          _A_B_S_T_R_A_C_T

          ISODE and QUIPU version  7.0  have  now  been
     released.  This  is  a  note  to explain the X-Tel
     position regarding support QUIPU-7.0 in  terms  of
     the  JNT  Directory  Pilot and how to upgrade from
     your current version of QUIPU to QUIPU-7.0.



_1.  _S_u_p_p_o_r_t

ISODE-7.0 which contains QUIPU-7.0 has just  been  announced
on various mail lists.

You should currently be running QUIPU-6.1 or QUIPU-6.8.

We no longer support the QUIPU-6.0.  We will stop supporting
the  QUIPU-6.1 version on 1st October 1991.  If you are run-
ning with QUIPU-6.1 you should upgrade to QUIPU-7.0 by then.

Some sites have taken intermediate  beta  test  versions  of
QUIPU, these are not supported.


_1._1.  _S_u_p_p_o_r_t _S_u_m_m_a_r_y

____________________________________________________________
_|I_S_O_D_E__V_e_r_s_i_o_n____|__S_u_p_p_o_r_t_________________|__C_o_m_m_e_n_t_s_________|
|     6.0       |  None                  |  Upgrade to 7.0  |
|     6.1       |  Will stop on Oct 1st  |  Upgrade to 7.0  |
|     6.8       |  Yes                   |                  |
|     7.0       |  Yes                   |                  |
_|________________|_________________________|__________________|

Versions of the ISODE not listed above  are  NOT  supported,
you should upgrade to 7.0.









                       22 July 1991





                           - 2 -


_2.  _U_p_g_r_a_d_i_n_g _t_o _I_S_O_D_E-_7._0

There is a script from X-Tel to upgrade your  ISODE  version
to  version 7.0.  This is available from X-Tel via ftam in a
file called _u_p_g_r_a_d_e-_7._0._s_h_a_r in the _q_u_i_p_u  directory  (there
is  also  a compressed version upgrade-7.0.shar.Z).  Recover
this shell archive file and place it in the top level of the
isode home directory, and unwrap it:

         _c_d ~_i_s_o_d_e
         _f_t_a_m -_h -_u _a_n_o_n _0_0_0_0_2_1_0_0_1_0_2_9_9_9 _g_e_t _q_u_i_p_u/_u_p_g_r_a_d_e-_7._0._s_h_a_r _u_p_g_r_a_d_e-_7._0._s_h_a_r
         _s_h < _u_p_g_r_a_d_e-_7._0._s_h_a_r


This will create a directory called "upgrade-7.0".  Go  into
this directory:

         _c_d _u_p_g_r_a_d_e-_7._0

(In this directory you will find the source of this note!)

_2._1.  _G_e_t_t_i_n_g _I_S_O_D_E-_7._0

The first step is to get the new ISODE  tar  file  onto  the
directory machine!  The FTAM and NIFTP access information is
given in the announcement.  You should place the file in the
top  level  of  the  isode  home  directory in a file called
_i_s_o_d_e-_7._t_a_r._Z.

Alternatively, you can ftam the file from X-Tel by  entering
the

         ./_m_a_k_e _f_t_a_m-_i_s_o_d_e

command in the upgrade-7.0 directory.

_2._2.  _D_i_s_k _S_p_a_c_e

The amount of disk needed to build this version of the ISODE
depends  on  the  operating  system  you  are  using.  Under
SunOS4.1 or greater, about 45 Mbyte is needed.  With an ear-
lier  version  of  SunOS,  approximately  55 Mbyte is needed
(shared libraries make a big difference!).

The script will "clean" the old ISODE source and check there
is  sufficient  space  (there  should be!).  If there is not
sufficient space, you could consider removing the ISODE 6.0,
6.1  and 6.8 trees completely.  If you upgraded to ISODE-6.8
using the X-Tel scripts, the directory upgrade-6.8 can  also
be removed.

If you have kept the tar files  from  previous  versions  of
ISODE  you  can remove them, they are obsoleted by this ver-
sion of the ISODE.



                       22 July 1991





                           - 3 -


_2._3.  _C_o_m_p_i_l_i_n_g

If you are _n_o_t currently running version 6.8  of  the  ISODE
you will need to edit the _M_a_k_e_f_i_l_e in the _u_p_g_r_a_d_e-_7._0 direc-
tory.  Find the line

         _O_L_D_I_S_O_D_E=      _i_s_o_d_e-_6._8

and change it to

         _O_L_D_I_S_O_D_E=      _i_s_o_d_e-_6.[_0_1]


If your system is a default ISODE installation (it  will  be
unless  you  have  altered parameters in the CONFIG.make and
config.h files) you can now type:

         ./_m_a_k_e

in the upgrade-7.0 directory.

This will unwrap the new ISODE, ensure there  is  sufficient
disk space and compile the new ISODE.  This may take an hour
or so!

If you changed any  of  the  configuration  options  in  the
CONFIG.make  file or the config.h file of the previous ISODE
release, you  should  make  similar  changes  to  the  files
_u_k_d_i_r._m_a_k_e  and  _u_k_d_i_r._h in the upgrade-7.0 directory before
running make.  If you are running SunOS-4.1, you should  NOT
put the shared library options in the ukdir.make file.  This
installation will make the necessary shared library  changes
for you.

If your quiputailor file is NOT _q_u_i_p_u_t_a_i_l_o_r in  the  ISODE's
etc directory (usually /usr/etc or /usr/local/etc), you will
need to edit the

         _Q_U_I_P_U_T_A_I_L_O_R=   $(_E_T_C_D_I_R)_q_u_i_p_u_t_a_i_l_o_r

line in the upgrade-7.0/Makefile to show the  absolute  path
name of the quiputailor file your DSA uses.

_2._4.  _I_n_s_t_a_l_l_i_n_g

The next step is to install QUIPU.  If you have PP installed
you  will  need to configure a few things (see the Section 3
BEFORE installing). To install (you will need to  be  root),
type:

         _s_u
         ./_m_a_k_e _i_n_s_t_a_l_l

in the upgrade-7.0 directory.



                       22 July 1991





                           - 4 -


Please  note,  normally  the  ISODE   installation   process
overwrites  your  dsaptailor  and quiputailor files with new
ones.  You then have to go and restore the old  ones.   This
Makefile knows about this problem, and restores the old ones
after the installation!  In case of problems, all the origi-
nal  ISODE tailor and configuration files are copied into an
"archive" directory.  If you need to restore  any  of  these
files,  you  are  advised  to  contact X-Tel first, as it is
likely you have something configured incorrectly.

This process will install the ISODE, QUIPU and FTAM.  If you
want other parts of the ISODE (vt, POD,  SD,  DE  etc)|-  you
will  have to do this yourself.  The process is described in
the isode-7.0/READ-ME file.

_2._5.  _C_o_n_f_i_g_u_r_i_n_g

If you are upgrading from ISODE-6.0 or ISODE-6.1  to  ISODE-
7.0  you  need  to tell the GB master DSA you have upgraded.
The command

         ./_m_a_k_e _c_o_n_f_i_g_u_r_e

will do this.  You do not need to perform this step  if  you
are upgrading from ISODE-6.8 to ISODE-7.0.

The final step is to reboot the machine, perhaps using some-
thing like

         _s_h_u_t_d_o_w_n -_r +_5 "_t_o _i_n_s_t_a_l_l _I_S_O_D_E-_7._0"


When the machine comes back up, you should  check  that  the
ros.quipu process has started using the "ps" command.

Having installed the standard ISODE and QUIPU,  your  atten-
tion  is drawn to the READ-ME and QUIPU-READ-ME files in the
isode-7.0 directory which describe  the  new  features.   In
particular  notice the sections describing how to replace to
static isoentities and isoservices files  with  a  directory
lookup  should be noted. It is recommended that sites regis-
ter their OSI services in the directory. The  READ-ME  files
describe a tool to register and maintain these entries.  For
an example set of registered services,  you  might  consider
looking at

         c=GB @ o=X-Tel Services Ltd @ cn=lancaster

in the DIT.


_________________________
|- OR your own programs which WILL need re-compiling.




                       22 July 1991





                           - 5 -


_3.  _P_P _a_n_d _I_S_O_D_E-_7._0

The PP-5.0 release relies on ISODE-6.0.  DO NOT try  to  re-
compile  with  this  version of the ISODE.  The old binaries
will work with this new  version  with  one  exception,  the
definition of IXI.

If your isotailor file has a line of the following form

         _t_s__i_n_t_e_r_i_m: _L_O_C_A_L-_E_T_H_E_R _I_X_I

you have a minor problem.  The "make  install"  option  will
remove the IXI definition from this line of the  tailor file
as ISODE-7.0 does not need it, but PP does.

To prevent this option from being removed  you  should  find
the lines:

         _T_A_I_L_O_R_R_E_M_O_V_E=_I_X_I
         #_T_A_I_L_O_R_R_E_M_O_V_E=

In the upgrade-7.0/Makefile, swap the hash mark so that  the
line looks like

         #_T_A_I_L_O_R_R_E_M_O_V_E=_I_X_I
         _T_A_I_L_O_R_R_E_M_O_V_E=

Then you can install as described.

When you run any of the ISODE or QUIPU  programs  they  will
print the warning:

        _d_u_p_l_i_c_a_t_e _p_r_e_f_i_x_e_s _f_o_r _c_o_m_m_u_n_i_t_i_e_s "_I_X_I" _a_n_d "_I_X_I"

You can IGNORE this - it is annoying but harmless.

_4.  _P_a_t_c_h_i_n_g

If it becomes necessary to patch this version of the  ISODE,
there are a few tools to help you.  First of all, you should
copy the patch into the _u_p_g_r_a_d_e-_7._0/_p_a_t_c_h_e_s  directory,  for
example, create a new file called

         _u_p_g_r_a_d_e-_7._0/_p_a_t_c_h_e_s/_p_a_t_c_h._1

Each new patch should be given a different  name,  typically
this will be the name given to the patch when released.

Then in the _u_p_g_r_a_d_e-_7._0 directory, issue the command

         ./_m_a_k_e _p_a_t_c_h

This will prompt you for the name of the patchfile  relative
to  the  patches  directory  (if following the example above



                       22 July 1991





                           - 6 -


enter the name _p_a_t_c_h._1).  This will apply the patch and  re-
compile  the  default ISODE and QUIPU.  If you have compiled
other interfaces, these may need recompiling.

To install the patched ISODE and QUIPU,  you  will  need  to
become _r_o_o_t, then type

         ./_m_a_k_e _p_a_t_c_h-_i_n_s_t_a_l_l


_5.  _O_I_D _T_a_b_l_e_s

From time to time it is worth checking that you have  an  up
to date set of oidtables. The option

         ./_m_a_k_e _g_e_t-_t_a_b_l_e_s

will FTAM the latest tables from X-Tel. As root

         ./_m_a_k_e _i_n_s_t_a_l_l-_t_a_b_l_e_s

will install them.

_6.  _P_r_o_b_l_e_m_s

Any problems should be reported to  _j_n_t-_q_u_i_p_u@_u_k._c_o._x_t_e_l  or
you can telephone the "hotline" on 0602 412648.






























                       22 July 1991


SHAR_EOF
fi
if test -f 'NOTICE'
then
	echo shar: "will not over-write existing file 'NOTICE'"
else
cat << \SHAR_EOF > 'NOTICE'
These scripts have been written for the UK JNT
Directory Pilot.  They are for use on JNT
supported Directory Pilot machines ONLY.

If you would like to use them elsewhere you
should contact X-Tel Services Ltd:

	telephone +44 602 412648, or 
	e-mail    support@xtel.co.uk
SHAR_EOF
fi
if test -f 'dopatch'
then
	echo shar: "will not over-write existing file 'dopatch'"
else
cat << \SHAR_EOF > 'dopatch'
#!/bin/sh 
#
# (c) Copyright X-Tel Services Ltd. 1991
# All rights reserved.
#
# CJR - 25/2/91
#
# Apply a patch to ISODE
#
# dopatch [source [patchdir [patch]]]
#
######################################################
isode=${1-/u1/home/isode/isode-6.8}
patchdir=${2-patches}
if [ ! -d $isode ]; then
	echo "Can not find ISODE tree to patch: $isode"
	exit 1
fi
if [ ! -d $patchdir ]; then
	echo "Can not find patches directory: $patchdir"
	exit 2
fi
if [ $# -lt 3 ]; then
	echo -n "Enter name of patchfile $patchdir"
	read patchfile
else
	patchfile=$3
fi
if [ -r $patchdir$patchfile ]; then
  	cp $patchdir$patchfile /tmp/patch$$
else
	echo "Can not open patch file $patchdir$patchfile"
	exit 3
fi
if [ -r $patchdir"patches_applied" ]; then
	if `grep $patchfile $patchdir"patches_applied" >/dev/null 2>&1` ; then
		echo "Patch already applied"
		echo "type \"./make patch-compile\" to re-compile"
		exit 5
	fi
		
fi
here=$cwd
cd $isode
echo "Patching..."
if ( patch -p -s < /tmp/patch$$ ) ; then
rm -f /tmp/patchout$$
	echo Patch applied
	rm -f /tmp/patch$$
else
	echo Patch failed
	rm -f /tmp/patch$$
	exit 4
fi
cd $here
cd $patchdir
echo -n "$patchfile " >> patches_applied
date "+%d %h %y @ %H:%M:%S" >> patches_applied
SHAR_EOF
chmod +x 'dopatch'
fi
if test -f 'ukdir.h'
then
	echo shar: "will not over-write existing file 'ukdir.h'"
else
cat << \SHAR_EOF > 'ukdir.h'
/* ukdir.h - UK Pilot machines config. */

/* CJR @ X-Tel   25/2/91	       */

/*
 *				  NOTICE
 *
 *    Acquisition, use, and distribution of this module and related
 *    materials are subject to the restrictions of a license agreement.
 *    Consult the Preface in the User's Manual for the full terms of
 *    this agreement.
 *
 */


#ifndef	_CONFIG_
#define	_CONFIG_

#define	BSD42			/* Berkeley UNIX */
#define	SUNOS4			/*   with Sun's enhancements */
#define	WRITEV			/*   (sort of) real Berkeley UNIX */
#define	BSD43			/*   4.3BSD or later */

#define	VSPRINTF		/* has vprintf(3s) routines */

#define	TCP			/* has TCP/IP (of course) */
#define	SOCKETS			/*   provided by sockets */

#define X25
#define SUN_X25

#define NOGOSSIP

#define	GETDENTS		/* has getdirent(2) call */
#define	NFS			/* network filesystem -- has getdirentries */

#endif
SHAR_EOF
fi
if test -f 'dotables'
then
	echo shar: "will not over-write existing file 'dotables'"
else
cat << \SHAR_EOF > 'dotables'
#!/bin/sh 
#
# (c) Copyright X-Tel Services Ltd. 1991
# All rights reserved.
#
# CJR - 25/2/91
#
# Ftam new oidtables
#
#
######################################################
if ( ftam -h -f -u anon 00002100102999 get quipu/oidtable.at oidtable.at ) 
then
	echo got oidtable.at
else
	echo Ftam failed
	exit 1
fi
if ( ftam -h -f -u anon 00002100102999 get quipu/oidtable.oc oidtable.oc ) 
then
	echo got oidtable.oc
else
	echo Ftam failed
	exit 2
fi
if ( ftam -h -f -u anon 00002100102999 get quipu/oidtable.gen oidtable.gen ) 
then
	echo got oidtable.gen
else
	echo Ftam failed
	exit 3
fi
SHAR_EOF
chmod +x 'dotables'
fi
if test -f 'h.ed'
then
	echo shar: "will not over-write existing file 'h.ed'"
else
cat << \SHAR_EOF > 'h.ed'
/#define[ 	]*BSD43/a
#define SUNOS4_1		/*   4.1sun stuff */
.
w
q
SHAR_EOF
fi
if test -f 'dsap.ed'
then
	echo shar: "will not over-write existing file 'dsap.ed'"
else
cat << \SHAR_EOF > 'dsap.ed'
/^# ROOT\/GB MASTER/d
.,.+2c
# ROOT/GB MASTER at University of London Computer Centre
dsa_address "Giant"		Internet=128.86.8.55+17003|IXI=20433450400255|X121+23421920014855|Janet=000040010550

dsa_address "Giant Tortoise"	Internet=128.86.8.55+17003|IXI=20433450400255|X121+23421920014855|Janet=000040010550
.
w
q

SHAR_EOF
fi
if test -f 'shared.ed'
then
	echo shar: "will not over-write existing file 'shared.ed'"
else
cat << \SHAR_EOF > 'shared.ed'
/^LIBISODE/s/^/#
/^LIBDSAP/s/^/#
a
#Used shared libs on SunOS4.1...
SHAREDLIB=	shared
LIBISODE=	-L$(TOPDIR) -lisode
LIBDSAP=        -L$(TOPDIR) -ldsap
.
/^LIBCFLAGS/s/$/ -PIC
w
q
SHAR_EOF
fi
if test -f 'doversion'
then
	echo shar: "will not over-write existing file 'doversion'"
else
cat << \SHAR_EOF > 'doversion'
#!/bin/sh 
#
# (c) Copyright X-Tel Services Ltd. 1991
# All rights reserved.
#
# CJR - 25/2/91
#
# Update your quipu version number to 6.8
#
# Assumes ~/.quipurc is set up to bind as DSA manager
#
# doversion [quiputailor]
#
######################################################
#
# Find quiputailor and extract DSA name...
#
if [ $# -lt 1 ]; then
   qt="/usr/etc/quiputailor"
else
   qt=$1
fi
if [ -r $qt ]; then
    	dsaname=` egrep -i '^mydsa' $qt | \
		awk '{for (i=2;i<=NF;i++) printf "%s ",$i}'`
	if [ "X$dsaname" = "X" ]; then
		echo "Can not find DSA name in $qt"
		exit 1
	fi
else
	echo "Can not open tailor file: $qt"
	exit 2
fi
#
# Bind to Giant...
#
ppid=$$
if [ "$DISHPROC" = "" ]; then
	if ( test $ppid-lt10000 )
	then
		ppid=`expr $ppid + 10000`
	fi
	DISHPROC="127.0.0.1 $ppid"
	export DISHPROC
fi
# Give an unauth DN
echo Trying to connect to Giant Tortoise...
if ( bind -c giant -u "c=GB@o=X-Tel Services Ltd@cn=Camayoc" -noa )
then 
	echo Connected, getting managers name...
else
	echo Can not connect to Giant Tortoise
	exit 3
fi
#
# Bind as local Manager
#
moveto @
moveto $dsaname -nocheck
manager='"'`showentry -edb -nokey -type manager | sed "s/&.*//"`'"'
if [ "X$manager" = "X" ]; then 
     	echo "Look up on manager failed"
	exit 4
fi
#
# Is 'giant' REALLY Giant Tortoise - take no chances,
# look in the directory an see!
#
echo Checking Giants address...
address='"'`showentry -edb -nokey -type presentationaddress '@cn=Giant Tortoise'`'"'
if [ "X$address" = "X" ]; then 
     	echo "Look up of Giant Tortoise address failed - assuming no change"
	address="giant"
fi
#
# Force passwd prompt - quipurc may be the wrong DN.
#
echo Binding to Giant as local manager...
if ( bind -u $manager -c $address -simple )
then 
	echo Modifying version...
else
	exit 5
fi
#
# Read DSAs entry...
#
if ( showentry -edb -all > /tmp/dsa$$ 2>/dev/null )
then
	sed "s/quipuVersion=.*/quipuVersion= quipu 6.8 (X-Tel) of `date`/" \
		 < /tmp/dsa$$ > /tmp/dsanew$$
	rm -f /tmp/dsa$$
else
	echo Can not read your DSAs entry from Giant Tortoise
	unbind
	exit 6
fi
#
# Modify it
#
if ( modify -draft /tmp/dsanew$$ -noedit ); then
     	echo -n
else
	exit 7
fi

rm -f /tmp/dsa$$
unbind
SHAR_EOF
chmod +x 'doversion'
fi
if test -f 'freespace'
then
	echo shar: "will not over-write existing file 'freespace'"
else
cat << \SHAR_EOF > 'freespace'
#!/bin/sh 
#
# (c) Copyright X-Tel Services Ltd. 1991
# All rights reserved.
#
# CJR - 25/2/91
#
# Check there is room on disk.
#
# freespace [directory]
#
######################################################
fd=${1-.}
if ( egrep -s -i "SunOS Release 4.1" /etc/motd ) ; then  
	sr=45000
else 
     	sr=55000
fi
fs=`df $fd | awk '{if (NR==2) printf $4}'`
if [ "X$fs" = "X" ]; then
	fs=`df $fd | awk '{if (NR==3) printf $3}'`
	if [ "X$fs" = "X" ]; then
		echo "Can't check free disk - assuming OK"
		exit 0
	fi
fi
if [ $fs -gt $sr ]; then
	echo -n
else
	echo "Only $fs KBytes free - not enough!"
	exit 1
fi
SHAR_EOF
chmod +x 'freespace'
fi
if test -f 'ukdir.make'
then
	echo shar: "will not over-write existing file 'ukdir.make'"
else
cat << \SHAR_EOF > 'ukdir.make'
###############################################################################
#   Instructions to Make, for compilation of ISODE processes for 
#	UK Directory Pilot
###############################################################################

# CJR @ X-Tel   25/2/91

###############################################################################
#
#				 NOTICE
#
#    Acquisition, use, and distribution of this module and related
#    materials are subject to the restrictions of a license agreement.
#    Consult the Preface in the User's Manual for the full terms of
#    this agreement.
#
###############################################################################


###############################################################################
# Options
###############################################################################

OPTIONS	=	-I. -I$(TOPDIR)h $(PEPYPATH) $(KRBOPT)

HDIR	=	$(TOPDIR)h/
UTILDIR	=	$(TOPDIR)util/
BINDIR	=	/usr/local/bin/
SBINDIR	=	@(LOCALETC)
ETCDIR	=	@(LOCALETC)
LOGDIR	=	/usr/tmp/
INCDIRM	=	/usr/include/isode
INCDIR	=	$(INCDIRM)/
PEPYDIRM=	$(INCDIR)pepy
PEPYDIR	=	$(PEPYDIRM)/
PEPSYDIRM=	$(INCDIR)pepsy
PEPSYDIR=	$(PEPSYDIRM)/
LIBDIR	=	/usr/lib/
LINTDIR	=	/usr/lib/lint/

LIBISODE=	$(TOPDIR)libisode.a
LIBDSAP	=	$(TOPDIR)libdsap.a

SYSTEM	=	-bsd42
MANDIR	=	/usr/man/
MANOPTS	=	-bsd42

###############################################################################
# Programs and Libraries
###############################################################################

MAKE	=	./make DESTDIR=$(DESTDIR) $(MFLAGS) -k
SHELL	=	/bin/sh

CC      =	cc
# -O loses...
CFLAGS  =	      $(OPTIONS)
LIBCFLAGS=	      $(CFLAGS)
LINT    =	lint
LFLAGS  =	-bhuz $(OPTIONS)
LD	=	ld
LDCC	=	$(CC)
LDFLAGS =	# -s
ARFLAGS	=

LN	=	ln

LSOCKET	=	$(KRBLIB)


###############################################################################
# Generation Rules for library modules
###############################################################################

.c.o:;		$(CC) $(LIBCFLAGS) -c $*.c
SHAR_EOF
fi
cd ..
exit 0
#	End of shell archive
