diff --git a/configure b/configure index 3db2810d76..738659a57d 100755 --- a/configure +++ b/configure @@ -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") diff --git a/configure.in b/configure.in index 7b68ebc63a..d103ed9ea3 100644 --- a/configure.in +++ b/configure.in @@ -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") diff --git a/src/install/Makefile.in b/src/install/Makefile.in index a3a1c2245b..4e414fa8b3 100644 --- a/src/install/Makefile.in +++ b/src/install/Makefile.in @@ -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 diff --git a/src/install/arch-specific/linux/Makefile.in b/src/install/arch-specific/linux/Makefile.in index f370e5c691..cbde946e3a 100644 --- a/src/install/arch-specific/linux/Makefile.in +++ b/src/install/arch-specific/linux/Makefile.in @@ -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 +# +# 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 >> $@ + diff --git a/src/install/classic/CSTarInstall.sh b/src/install/classic/CSTarInstall.sh index c06da78bdb..f47d63a7fb 100755 --- a/src/install/classic/CSTarInstall.sh +++ b/src/install/classic/CSTarInstall.sh @@ -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) diff --git a/src/install/classic/CSinstall.sh b/src/install/classic/CSinstall.sh index a915abb714..6110c6bcf1 100755 --- a/src/install/classic/CSinstall.sh +++ b/src/install/classic/CSinstall.sh @@ -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` - diff --git a/src/install/classic/CSpostinstall.sh b/src/install/classic/CSpostinstall.sh index 2f56e2694e..086567ff57 100755 --- a/src/install/classic/CSpostinstall.sh +++ b/src/install/classic/CSpostinstall.sh @@ -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 < $DBAPasswordFile # chmod ga-rwx $DBAPasswordFile @@ -228,7 +228,7 @@ askUserForNewDBAPassword() { NewPasswd=$Answer if [ ! -z "$NewPasswd" ] then - $IBBin/gsec -user sysdba -password masterkey <