8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 16:43:03 +01:00

Some changes to work on classic install, (it's not complete as yet

but it's getting there)
This commit is contained in:
skywalker 2001-08-15 18:10:36 +00:00
parent 5f393f65a4
commit 115a8cd074
11 changed files with 246 additions and 204 deletions

4
configure vendored
View File

@ -2261,10 +2261,12 @@ FIREBIRD_ARCH_TYPE=classic
#FIREBIRD_ARCH_TYPE=super
# THe following file defines the version number strings
# The following file defines the version number strings
source src/misc/writeBuildNum.sh
#AC_DEFINE_UNQUOTED(FB_BUILD_TYPE, "$BuildType")
#AC_DEFINE_UNQUOTED(FB_MAJOR_VER, "$MajorVer")
#AC_DEFINE_UNQUOTED(FB_MINOR_VER, "$MinorVer")

View File

@ -65,10 +65,12 @@ FIREBIRD_ARCH_TYPE=classic
#FIREBIRD_ARCH_TYPE=super
AC_SUBST(FIREBIRD_ARCH_TYPE)
# THe following file defines the version number strings
# The following file defines the version number strings
source src/misc/writeBuildNum.sh
AC_SUBST(FIREBIRD_VERSION)
#AC_DEFINE_UNQUOTED(FB_BUILD_TYPE, "$BuildType")
#AC_DEFINE_UNQUOTED(FB_MAJOR_VER, "$MajorVer")
#AC_DEFINE_UNQUOTED(FB_MINOR_VER, "$MinorVer")

View File

@ -26,7 +26,7 @@
# Contributor(s):
#
#
# $Id: Makefile.in,v 1.4 2001-08-14 17:41:39 skywalker Exp $
# $Id: Makefile.in,v 1.5 2001-08-15 18:10:35 skywalker Exp $
#
ROOT=../..
@ -38,7 +38,7 @@ include $(ROOT)/src/make.defaults
include $(ROOT)/src/make.platform
include $(ROOT)/src/make.shared.variables
INSTALLDIR=@prefix@
FirebirdInstallPrefix=@prefix@
@SET_MAKE@
@ -55,166 +55,68 @@ INSTALLDIR=@prefix@
BuildRoot=$(GEN_ROOT)
InstallRoot=$(SRC_ROOT)/install/linux
#RedhatPackageDir=/usr/src/redhat/RPMS/i386
RedhatPackageDir=/usr/src/RPM/RPMS/i386
Version=@FIREBIRD_VERSION@-1
InstallRoot=.
ClassicTarFile=FirebirdCS-$(Version).tar.gz
SuperTarFile=FirebirdSS-$(Version).tar.gz
FirebirdVersion=@FIREBIRD_VERSION@
ArchType=@FIREBIRD_ARCH_TYPE@
ClassicRPMFile=FirebirdCS-$(Version).i386.rpm
SuperRPMFile=FirebirdSS-$(Version).i386.rpm
PackageVersion=$(FirebirdVersion)-1
ClassicSrcDir=$(InstallRoot)/classic
SuperSrcDir=$(InstallRoot)/super
FirebirdBuildPrefix=$(GEN_ROOT)
LastClassicInstallFlg=.classicinstallflg
LastSuperInstallFlg=.superinstallflg
export FirebirdBuildPrefix
export FirebirdInstallPrefix
export PackageVersion
install: run@FIREBIRD_ARCH_TYPE@install
package : @FIREBIRD_ARCH_TYPE@packages
ifeq ($(ArchType),classic)
ArchPrefix=CS
else
ArchPrefix=SS
endif
runclassicinstall: $(LastClassicInstallFlg)
# This means something like: FirebirdCS-2.0.0-1.tar.gz
TarFile=Firebird$(ArchPrefix)-$(PackageVersion).tar.gz
PkgSrcDir=$(InstallRoot)/$(ArchType)
$(LastClassicInstallFlg) : $(BIN)/gsec
(cd $(ROOT); sh src/install/classic/CSTarInstall.sh)
LastInstallFlg=.lastinstallflg
install: runinstall
dist : packages
runinstall: $(LastInstallFlg)
$(LastInstallFlg) : $(BIN)/gsec
$(ArchType)/$(ArchPrefix)TarInstall.sh
# (cd $(ROOT); sh $(InstallRoot)/classic/CSTarInstall.sh)
touch $(LastClassicInstallFlg)
runsuperinstall: $(LastSuperInstallFlg)
$(LastSuperInstallFlg) : interbase/bin/gsec
sh $(InstallRoot)/super/SSTarInstall.sh
touch $(LastSuperInstallFlg)
# touch $(LastInstallFlg)
$(ClassicTarFile) : csinstall runclassicinstall
mv csinstall install
tar -czf $(ClassicTarFile) install
mv install csinstall
packages: tarfile
tarfile: $(TarFile)
$(TarFile) : buildInstallDir
(cd $(GEN_ROOT); tar -czf $(TarFile) install)
$(ClassicRPMFile): CSrpmscript
rpm -bb CSrpmscript
cp $(RedhatPackageDir)/$(ClassicRPMFile) .
TarInstallDir=$(GEN_ROOT)/install
#__ for ron ________
classicpackages: classictarfile classicrpmfile
classictarfile: runclassicinstall $(ClassicTarFile)
classicrpmfile: runclassicinstall $(ClassicRPMFile)
superpackages: supertarfile superrpmfile
supertarfile: runsuperinstall $(SuperTarFile)
superrpmfile: runsuperinstall $(SuperRPMFile)
$(SuperTarFile) : ssinstall runsuperinstall
mv ssinstall install
tar -czf $(SuperTarFile) install
mv install ssinstall
$(SuperRPMFile): SSrpmscript
rpm -bb SSrpmscript
cp $(RedhatPackageDir)/$(SuperRPMFile) .
CSrpmscript:
echo $@
cat $(ClassicSrcDir)/CSrpmheader.txt > $@
echo "" >> $@
echo "%prep" >> $@
# cat $(ClassicSrcDir)/CSprepinstall.sh >> $@
echo "" >> $@
echo "%build" >> $@
# cat $(ClassicSrcDir)/CSbuildinstall.sh >> $@
echo "" >> $@
echo "%install" >> $@
# cat $(ClassicSrcDir)/CSinstall.sh >> $@
echo "" >> $@
echo "%files" >> $@
cat $(ClassicSrcDir)/CSrpmfiles.txt >> $@
echo "" >> $@
echo "%pre" >> $@
cat $(ClassicSrcDir)/CSpreinstall.sh >> $@
echo "" >> $@
echo "%post" >> $@
cat $(ClassicSrcDir)/CSpostinstall.sh >> $@
echo "" >> $@
echo "%preun" >> $@
cat $(ClassicSrcDir)/CSpreuninstall.sh >> $@
echo "" >> $@
echo "%postun" >> $@
cat $(ClassicSrcDir)/CSpostuninstall.sh >> $@
SSrpmscript:
echo $@
cat $(SuperSrcDir)/SSrpmheader.txt > $@
echo "" >> $@
echo "%prep" >> $@
# cat $(SuperSrcDir)/SSprepinstall.sh >> $@
echo "" >> $@
echo "%build" >> $@
# cat $(SuperSrcDir)/SSbuildinstall.sh >> $@
echo "" >> $@
echo "%install" >> $@
# cat $(SuperSrcDir)/SSinstall.sh >> $@
echo "" >> $@
echo "%files" >> $@
cat $(SuperSrcDir)/SSrpmfiles.txt >> $@
echo "" >> $@
echo "%pre" >> $@
cat $(SuperSrcDir)/SSpreinstall.sh >> $@
echo "" >> $@
echo "%post" >> $@
cat $(SuperSrcDir)/SSpostinstall.sh >> $@
echo "" >> $@
echo "%preun" >> $@
cat $(SuperSrcDir)/SSpreuninstall.sh >> $@
echo "" >> $@
echo "%postun" >> $@
cat $(SuperSrcDir)/SSpostuninstall.sh >> $@
CSTarInstallDir=csinstall
csinstall:
mkdir -p $(CSTarInstallDir)/scripts
buildInstallDir:
mkdir -p $(TarInstallDir)/scripts
# (cd $(BuildRoot); tar -czf - interbase ) | cat > $(CSTarInstallDir)/interbase.tar.gz
cp $(ClassicSrcDir)/CSpreinstall.sh $(CSTarInstallDir)/scripts
cp $(ClassicSrcDir)/CSinstall.sh $(CSTarInstallDir)/scripts
cp $(ClassicSrcDir)/CSpostinstall.sh $(CSTarInstallDir)/scripts
cp $(ClassicSrcDir)/CSTarInstall.sh $(CSTarInstallDir)/install.sh
tar -czf $(CSTarInstallDir)/interbase.tar.gz interbase
cp $(PkgSrcDir)/??preinstall.sh $(TarInstallDir)/scripts
cp $(PkgSrcDir)/??install.sh $(TarInstallDir)/scripts
cp $(PkgSrcDir)/??postinstall.sh $(TarInstallDir)/scripts
cp $(PkgSrcDir)/??TarInstall.sh $(TarInstallDir)/install.sh
(cd $(GEN_ROOT); tar -czf install/firebird.tar.gz firebird)
SSTarInstallDir=ssinstall
ssinstall:
mkdir -p $(SSTarInstallDir)/scripts
cp $(SuperSrcDir)/SSpreinstall.sh $(SSTarInstallDir)/scripts
cp $(SuperSrcDir)/SSinstall.sh $(SSTarInstallDir)/scripts
cp $(SuperSrcDir)/SSpostinstall.sh $(SSTarInstallDir)/scripts
cp $(SuperSrcDir)/SSTarInstall.sh $(SSTarInstallDir)/install.sh
tar -czf $(SSTarInstallDir)/interbase.tar.gz interbase

View File

@ -1,3 +1,114 @@
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
# Alternatively, the contents of this file may be used under the
# terms of the GNU General Public License Version 2 or later (the
# "GPL"), in which case the provisions of the GPL are applicable
# instead of those above. You may obtain a copy of the Licence at
# http://www.gnu.org/copyleft/gpl.html
#
# 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
# Relevant for more details.
#
# This file was created by members of the firebird development team.
# All individual contributions remain the Copyright (C) of those
# individuals. Contributors to this file are either listed here or
# can be obtained from a CVS history command.
#
# All rights reserved.
#
# Created by: Mark O'Donohue <mark.odonohue@ludwig.edu.au>
#
# Contributor(s):
#
#
# $Id: Makefile.in,v 1.2 2001-08-15 18:10:35 skywalker Exp $
#
#RedhatPackageDir=/usr/src/redhat/RPMS/i386
RedhatPackageDir=/usr/src/RPM/RPMS/i386
# Hello 1
ClassicRPMFile=FirebirdCS-$(Version).i386.rpm
SuperRPMFile=FirebirdSS-$(Version).i386.rpm
classicpackages: classictarfile classicrpmfile
classicrpmfile: runclassicinstall $(ClassicRPMFile)
superrpmfile: runsuperinstall $(SuperRPMFile)
$(ClassicRPMFile): CSrpmscript
rpm -bb CSrpmscript
cp $(RedhatPackageDir)/$(ClassicRPMFile) .
$(SuperRPMFile): SSrpmscript
rpm -bb SSrpmscript
cp $(RedhatPackageDir)/$(SuperRPMFile) .
CSrpmscript:
echo $@
cat $(ClassicSrcDir)/CSrpmheader.txt > $@
echo "" >> $@
echo "%prep" >> $@
# cat $(ClassicSrcDir)/CSprepinstall.sh >> $@
echo "" >> $@
echo "%build" >> $@
# cat $(ClassicSrcDir)/CSbuildinstall.sh >> $@
echo "" >> $@
echo "%install" >> $@
# cat $(ClassicSrcDir)/CSinstall.sh >> $@
echo "" >> $@
echo "%files" >> $@
cat $(ClassicSrcDir)/CSrpmfiles.txt >> $@
echo "" >> $@
echo "%pre" >> $@
cat $(ClassicSrcDir)/CSpreinstall.sh >> $@
echo "" >> $@
echo "%post" >> $@
cat $(ClassicSrcDir)/CSpostinstall.sh >> $@
echo "" >> $@
echo "%preun" >> $@
cat $(ClassicSrcDir)/CSpreuninstall.sh >> $@
echo "" >> $@
echo "%postun" >> $@
cat $(ClassicSrcDir)/CSpostuninstall.sh >> $@
SSrpmscript:
echo $@
cat $(SuperSrcDir)/SSrpmheader.txt > $@
echo "" >> $@
echo "%prep" >> $@
# cat $(SuperSrcDir)/SSprepinstall.sh >> $@
echo "" >> $@
echo "%build" >> $@
# cat $(SuperSrcDir)/SSbuildinstall.sh >> $@
echo "" >> $@
echo "%install" >> $@
# cat $(SuperSrcDir)/SSinstall.sh >> $@
echo "" >> $@
echo "%files" >> $@
cat $(SuperSrcDir)/SSrpmfiles.txt >> $@
echo "" >> $@
echo "%pre" >> $@
cat $(SuperSrcDir)/SSpreinstall.sh >> $@
echo "" >> $@
echo "%post" >> $@
cat $(SuperSrcDir)/SSpostinstall.sh >> $@
echo "" >> $@
echo "%preun" >> $@
cat $(SuperSrcDir)/SSpreuninstall.sh >> $@
echo "" >> $@
echo "%postun" >> $@
cat $(SuperSrcDir)/SSpostuninstall.sh >> $@

View File

@ -83,13 +83,14 @@ export InteractiveInstall
checkInstallUser
# Ok, here we are installing from a CVS tree
# Ok, If the env variable exists then we are doing
# the install from the CVS tree
if [ -e gen ]
if [ ! -z "$FirebirdInstallPrefix" ]
then
ScriptsSrcDir=./src/install/
ScriptsSrcDir=.
( $ScriptsSrcDir/classic/CSpreinstall.sh )
($ScriptsSrcDir/classic/CSpreinstall.sh )
($ScriptsSrcDir/classic/CSinstall.sh)

View File

@ -10,15 +10,28 @@
# If this is a tar.gz install rather than the result of a build then
# We assume the files have already been copied here manually.
BuildDir=gen/firebird
DestDir=/opt/interbase
if [ -z "$InteractiveInstall" ]
then
ScriptsSrcDir=src/install/linux
cp $ScriptsSrcDir/misc/README $BuildDir
if [ -z "$FirebirdInstallPrefix" ]
then
FirebirdInstallPrefix=%prefix%
fi
if [ -z "$FirebirdBuildPrefix" ]
then
FirebirdBuildPrefix="."
fi
BuildDir=$FirebirdBuildPrefix/firebird
DestDir=$FirebirdInstallPrefix/firebird
# I think this is done as part of the build now.
# if [ -z "$InteractiveInstall" ]
# then
# ScriptsSrcDir=src/install/linux
# cp $ScriptsSrcDir/misc/README $BuildDir
# fi
# The guts of the tranfer of files to /opt and other directories
if [ -d $DestDir ]
@ -97,8 +110,3 @@
cp $BuildDir/misc/firebird.xinetd $DestDir/misc/firebird.xinetd
# June 23 2000, 6:00AM
#TIMESTAMP="200006230600.00"
#cd $DestDir/
#touch -t $TIMESTAMP `find . -print`

View File

@ -70,7 +70,7 @@ addFirebirdUser() {
testStr=`grep firebird /etc/passwd`
if [ -z "$testDir" ]
then
useradd -o -r -m -d $IBRootDir -s /bin/bash \
useradd -o -r -m -d $FBRootDir -s /bin/bash \
-c "Firebird Database Administrator" -g firebird -u 84 firebird
# >/dev/null 2>&1
@ -114,7 +114,7 @@ EOF
updateInetdEntry() {
FileName=/etc/inetd.conf
newLine="gds_db stream tcp nowait.30000 $RunUser $IBBin/gds_inet_server gds_inet_server # InterBase Database Remote Server"
newLine="gds_db stream tcp nowait.30000 $RunUser $FBBin/gds_inet_server gds_inet_server # InterBase Database Remote Server"
oldLine=`grep "^gds_db" $FileName`
replaceLineInFile "$FileName" "$newLine" "$oldLine"
@ -125,7 +125,7 @@ updateInetdEntry() {
updateXinetdEntry() {
cp $IBRootDir/misc/firebird.xinetd /etc/xinetd.d/firebird
cp $FBRootDir/misc/firebird.xinetd /etc/xinetd.d/firebird
changeXinetdServiceUser
}
@ -156,7 +156,7 @@ updateInetdServiceEntry() {
keepOrigDBAPassword() {
DBAPasswordFile=$IBRootDir/SYSDBA.password
DBAPasswordFile=$FBRootDir/SYSDBA.password
NewPasswd='masterkey'
echo "Firebird initial install password " > $DBAPasswordFile
@ -186,7 +186,7 @@ keepOrigDBAPassword() {
generateNewDBAPassword() {
DBAPasswordFile=$IBRootDir/SYSDBA.password
DBAPasswordFile=$FBRootDir/SYSDBA.password
NewPasswd=`/usr/bin/mkpasswd -l 8`
@ -201,7 +201,7 @@ generateNewDBAPassword() {
echo "" >> $DBAPasswordFile
chmod u=r,go= $DBAPasswordFile
$IBBin/gsec -user sysdba -password masterkey <<EOF
$FBBin/gsec -user sysdba -password masterkey <<EOF
modify sysdba -pw $NewPasswd
EOF
@ -219,7 +219,7 @@ askUserForNewDBAPassword() {
while [ -z "$NewPasswd" ]
do
# If using a generated password
# DBAPasswordFile=$IBRootDir/SYSDBA.password
# DBAPasswordFile=$FBRootDir/SYSDBA.password
# NewPasswd=`mkpasswd -l 8`
# echo "Password for SYSDBA on `hostname` is : $NewPasswd" > $DBAPasswordFile
# chmod ga-rwx $DBAPasswordFile
@ -228,7 +228,7 @@ askUserForNewDBAPassword() {
NewPasswd=$Answer
if [ ! -z "$NewPasswd" ]
then
$IBBin/gsec -user sysdba -password masterkey <<EOF
$FBBin/gsec -user sysdba -password masterkey <<EOF
modify sysdba -pw $NewPasswd
EOF
echo ""
@ -274,13 +274,13 @@ changeDBAPassword() {
fixFilePermissions() {
# Turn other access off.
chmod -R o= $IBRootDir
chmod -R o= $FBRootDir
# Now fix up the mess.
# fix up directories
for i in `find $IBRootDir -print`
for i in `find $FBRootDir -print`
do
FileName=$i
if [ -d $FileName ]
@ -290,7 +290,7 @@ fixFilePermissions() {
done
cd $IBBin
cd $FBBin
# set up the defaults for bin
@ -315,7 +315,7 @@ fixFilePermissions() {
done
cd $IBRootDir
cd $FBRootDir
# Fix lock files
for i in isc_init1 isc_lock1 isc_event1
@ -380,12 +380,12 @@ fixFilePermissions() {
fixFilePermissionsRoot() {
# Turn other access off.
chmod -R o= $IBRootDir
chmod -R o= $FBRootDir
# Now fix up the mess.
# fix up directories
for i in `find $IBRootDir -print`
for i in `find $FBRootDir -print`
do
FileName=$i
if [ -d $FileName ]
@ -395,7 +395,7 @@ fixFilePermissionsRoot() {
done
cd $IBBin
cd $FBBin
# set up the defaults for bin
@ -413,7 +413,7 @@ fixFilePermissionsRoot() {
done
cd $IBRootDir
cd $FBRootDir
# Fix lock files
for i in isc_init1 isc_lock1 isc_event1
@ -486,15 +486,21 @@ resetInetdServer() {
#= Main Post ===============================================================
# Make sure the links are in place
if [ ! -L /opt/interbase -a ! -d /opt/interbase ]
then
# Main link and...
ln -s $RPM_INSTALL_PREFIX/interbase /opt/interbase
fi
if [ -z "$FirebirdInstallPrefix" ]
then
FirebirdInstallPrefix=%prefix%
fi
# Hopefully we are done with this link.
# if [ ! -L /opt/interbase -a ! -d /opt/interbase ]
# then
# # Main link and...
# ln -s $RPM_INSTALL_PREFIX/interbase /opt/interbase
# fi
IBRootDir=/opt/interbase
IBBin=$IBRootDir/bin
FBRootDir=$FirebirdInstallPrefix/firebird
FBBin=$FBRootDir/bin
RunUser=root
# RunUser=firebird
@ -516,7 +522,7 @@ resetInetdServer() {
# Create Lock files
cd $IBRootDir
cd $FBRootDir
for i in isc_init1 isc_lock1 isc_event1
do
@ -529,7 +535,7 @@ resetInetdServer() {
# Update ownership and SUID bits for programs.
chown -R $RunUser.$RunUser $IBRootDir
chown -R $RunUser.$RunUser $FBRootDir
if [ "$RunUser" = "root" ]
then
fixFilePermissionsRoot
@ -545,7 +551,7 @@ resetInetdServer() {
resetInetdServer
cd $IBRootDir
cd $FBRootDir
# Change sysdba password
changeDBAPassword

View File

@ -126,14 +126,14 @@ archivePriorInstallSystemFiles() {
cd /
DestFile="opt/interbase"
DestFile="$FBRootDir"
if [ -e "$DestFile" ]
then
echo ""
echo ""
echo ""
echo "--- Warning ----------------------------------------------"
echo " The installation target directory: $IBRootDir"
echo " The installation target directory: $FBRootDir"
echo " Already contains a prior installation of InterBase/Firebird."
echo " This and files found in /usr/include and /usr/lib will be"
echo " archived in the file : ${ArchiveMainFile}"
@ -215,11 +215,15 @@ checkForRPMInstall() {
#= Main Pre ================================================================
INSTALLDIR=%prefix%
IBRootDir=$INSTALLDIR/firebird
IBBin=$IBRootDir/bin
if [ -z "$FirebirdInstallPrefix" ]
then
FirebirdInstallPrefix=%prefix%
fi
FBRootDir=$FirebirdInstallPrefix/firebird
FBBin=$FBRootDir/bin
ArchiveDateTag=`date +"%Y%m%d_%H%M"`
ArchiveMainFile="${IBRootDir}_${ArchiveDateTag}.tar.gz"
ArchiveMainFile="${FBRootDir}_${ArchiveDateTag}.tar.gz"

View File

@ -35,12 +35,18 @@ checkIfServerRunning() {
# This is a bit simple, but should work for now.
# cron will remove files in /tmp after a while.
IBRootDir=/opt/interbase
IBBin=$IBRootDir/bin
if [ -z "$FirebirdInstallPrefix" ]
then
FirebirdInstallPrefix=%prefix%
fi
FBRootDir=$FirebirdInstallPrefix/firebird
FBBin=$FBRootDir/bin
checkIfServerRunning
cd $IBRootDir
cd $FBRootDir
if [ -f isc4.gdb ]
then

View File

@ -26,7 +26,7 @@
# Contributor(s):
#
#
# $Id: Makefile.in.firebird,v 1.6 2001-08-15 05:37:55 skywalker Exp $
# $Id: Makefile.in.firebird,v 1.7 2001-08-15 18:10:36 skywalker Exp $
#
ROOT=..
@ -362,9 +362,9 @@ $(BIN)/% :: $(SRC_ROOT)/install/misc/%
#___________________________________________________________________________
#
.PHONY: install
installx:
install:
$(MAKE) -C install $@
installclassic:
@ -372,7 +372,7 @@ installclassic:
# $(SRC_ROOT)/install/classic/CSinstall.sh
# $(SRC_ROOT)/install/classic/CSpostinstall.sh
builddist:
dist:
$(MAKE) -C install $@

View File

@ -3,7 +3,7 @@
/*********** Preprocessed module -- do not edit ***************/
/*********** Preprocessed module -- do not edit ***************/
/*********** Preprocessed module -- do not edit ***************/
/***************** gpre version LI-T0.9.4.34 Firebird Test1 **********************/
/***************** gpre version LI-T2.0.0.35 Firebird2 Dev1 **********************/
/*
* The contents of this file are subject to the Interbase Public
* License Version 1.0 (the "License"); you may not use this file