|
From: <ale...@us...> - 2011-01-17 17:38:33
|
Revision: 52151
http://firebird.svn.sourceforge.net/firebird/?rev=52151&view=rev
Author: alexpeshkoff
Date: 2011-01-17 17:38:25 +0000 (Mon, 17 Jan 2011)
Log Message:
-----------
Fixed binary packages build. No more CS/SS difference. No more linux RPMs on SF.
Modified Paths:
--------------
firebird/trunk/builds/install/arch-specific/linux/Makefile.in
firebird/trunk/builds/install/arch-specific/linux/misc/linuxLibrary.sh.in
firebird/trunk/builds/install/arch-specific/linux/misc/makeInstallImage.sh.in
firebird/trunk/builds/install/misc/posixLibrary.sh.in
firebird/trunk/builds/posix/Makefile.in
firebird/trunk/configure.in
Removed Paths:
-------------
firebird/trunk/builds/install/arch-specific/linux/classic/
firebird/trunk/builds/install/arch-specific/linux/super/
firebird/trunk/builds/install/misc/changeGdsLibraryCompatibleLink.sh.in
firebird/trunk/builds/install/misc/classicLibrary.sh.in
firebird/trunk/builds/install/misc/firebird.init.d.generic.in
firebird/trunk/builds/install/misc/firebird.init.d.mandrake.in
firebird/trunk/builds/install/misc/superLibrary.sh.in
Modified: firebird/trunk/builds/install/arch-specific/linux/Makefile.in
===================================================================
--- firebird/trunk/builds/install/arch-specific/linux/Makefile.in 2011-01-17 14:13:57 UTC (rev 52150)
+++ firebird/trunk/builds/install/arch-specific/linux/Makefile.in 2011-01-17 17:38:25 UTC (rev 52151)
@@ -33,7 +33,7 @@
@SET_MAKE@
-.PHONY: install dist packages tarfile rpmfile
+.PHONY: install dist packages tarfile
.PHONY: buildTarDir buildImageDir buildRoot buildDebugInfo
# Some of these targets are run from the root tree of the build.
@@ -55,41 +55,23 @@
TarDir= Firebird$(ArchPrefix)-$(Version).$(CpuType)
TarFile=Firebird$(ArchPrefix)-$(Version).$(CpuType).tar.gz
-RPMFile=Firebird$(ArchPrefix)-$(Version).$(CpuType).rpm
DebugDir=Firebird$(ArchPrefix)-debuginfo-$(Version).$(CpuType)
DebugFile=Firebird$(ArchPrefix)-debuginfo-$(Version).$(CpuType).tar.gz
-# Determine where the packages are built. Each distribution builds them in
-# their own spot.
-# This should be moved to configure.in file
-RedhatPackageDir=/usr/src/redhat/RPMS/$(CpuType)
-MandrakePackageDir=/usr/src/RPM/RPMS/$(CpuType)
-SuSEPackageDir=/usr/src/packages/RPMS/$(CpuType)
-
-PackageDir:=$(shell if [ -d $(RedhatPackageDir) ]; then echo $(RedhatPackageDir); \
- elif [ -d $(MandrakePackageDir) ]; then echo $(MandrakePackageDir); \
- elif [ -d $(SuSEPackageDir) ]; then echo $(SuSEPackageDir); \
- fi)
-
-
-
PkgSrcDir=$(InstallRoot)/$(ArchType)
ScriptDir=$(GEN_ROOT)/install/scripts/
-RPMSrcDir=$(GEN_ROOT)/install/scripts
TarInstallDir=$(GEN_ROOT)/install
-#Target for required libraries detection
-RpmRequiredVersionTarget=$(GEN_ROOT)/firebird/bin/isql
#Curses library
TermLib=@TERMLIB@.so
dist : packages
-packages: tarfile rpmfile debugfile
+packages: tarfile debugfile
tarfile: $(TarFile)
@@ -159,45 +141,3 @@
install: buildTarDir
(cd $(GEN_ROOT)/$(TarDir); FIREBIRD= ./install.sh)
cp -r $(GEN_ROOT)/$(DebugDir)/* /
-
-
-rpmfile: $(RPMFile)
-
-$(RPMFile) : $(GEN_ROOT)/install/rpmscript buildImageDir
- rpmbuild --define='_topdir @BUILD_ROOT_DIR@/gen/RPM' -bb --target @CPU_TYPE@ $(GEN_ROOT)/install/rpmscript
-# rpmbuild -bb --buildroot `pwd`/buildroot $(GEN_ROOT)/rpmscript
- cp @BUILD_ROOT_DIR@/gen/RPM/RPMS/@CPU_TYPE@/$(RPMFile) $(GEN_ROOT)
-
-
-.PHONY: $(GEN_ROOT)/install/rpmscript
-
-$(GEN_ROOT)/install/rpmscript :
- echo $@
- awk < $(RPMSrcDir)/rpmheader.txt 'BEGIN {fl=1;} ($$1 == "Requires:") {fl=0;} (fl) {print $$0;}' > $@
- echo -n "Requires: `ldd $(RpmRequiredVersionTarget) | grep $(TermLib) | awk '{print $$1;}'`" >> $@
- echo ", `ldd $(RpmRequiredVersionTarget) | grep libstdc++ | awk '{print $$1;}'`" >> $@
- awk < $(RPMSrcDir)/rpmheader.txt 'BEGIN {fl=0;} (fl) {print $$0;} ($$1 == "Requires:") {fl=1;}' >> $@
- echo "" >> $@
- echo "%prep" >> $@
-# cat $(ClassicSrcDir)/prepinstall.sh >> $@
- echo "" >> $@
- echo "%build" >> $@
-# cat $(ScriptDir)/buildinstall.sh >> $@
- echo "" >> $@
- echo "%install" >> $@
-# cat $(ScriptDir)/install.sh >> $@
- echo "" >> $@
- echo "%files" >> $@
- cat $(RPMSrcDir)/rpmfiles.txt >> $@
- echo "" >> $@
- echo "%pre" >> $@
- cat $(ScriptDir)/preinstall.sh >> $@
- echo "" >> $@
- echo "%post" >> $@
- cat $(ScriptDir)/postinstall.sh >> $@
- echo "" >> $@
- echo "%preun" >> $@
- cat $(ScriptDir)/preuninstall.sh >> $@
- echo "" >> $@
- echo "%postun" >> $@
- cat $(ScriptDir)/postuninstall.sh >> $@
Modified: firebird/trunk/builds/install/arch-specific/linux/misc/linuxLibrary.sh.in
===================================================================
--- firebird/trunk/builds/install/arch-specific/linux/misc/linuxLibrary.sh.in 2011-01-17 14:13:57 UTC (rev 52150)
+++ firebird/trunk/builds/install/arch-specific/linux/misc/linuxLibrary.sh.in 2011-01-17 17:38:25 UTC (rev 52151)
@@ -48,12 +48,12 @@
AdditionalParameter=$1
testStr=`grep firebird /etc/group`
-
+
if [ -z "$testStr" ]
then
groupadd $AdditionalParameter firebird
fi
-
+
}
@@ -61,11 +61,11 @@
AdditionalParameter=$1
testStr=`grep firebird /etc/passwd`
-
+
if [ -z "$testStr" ]
then
- useradd $AdditionalParameter -d @FB_CONFDIR@ -s /bin/false \
- -c "Firebird Database Owner" -g firebird firebird
+ useradd $AdditionalParameter -d @FB_CONFDIR@ -s /sbin/nologin \
+ -c "Firebird Database Owner" -g firebird firebird
fi
}
@@ -153,7 +153,7 @@
# stop super server if it is running
stopSuperServerIfRunning() {
- checkString=`ps -eaf | egrep "\b(fbserver|fbguard|fb_smp_server)\b" |grep -v grep`
+ checkString=`ps -eaf | egrep "\b(fbserver|fbguard|fb_smp_server|firebird)\b" |grep -v grep`
if [ ! -z "$checkString" ]
then
@@ -166,7 +166,7 @@
do
$init_d stop
sleep 1
- checkString=`ps -eaf | egrep "\b(fbserver|fbguard|fb_smp_server)\b" |grep -v grep`
+ checkString=`ps -eaf | egrep "\b(fbserver|fbguard|fb_smp_server|firebird)\b" |grep -v grep`
if [ -z "$checkString" ]
then
return
@@ -297,7 +297,7 @@
initScript=/etc/rc.d/init.d/firebird
fi
-
+
if [ "$initScript" ]
then
# Install the firebird init.d script
@@ -320,13 +320,13 @@
elif [ -x /sbin/insserv ]
then
/sbin/insserv /etc/init.d/firebird
-
+
# One more way to register service - used in Knoppix (& Debian ?)
elif [ -x /usr/sbin/update-rc.d ]
then
/usr/sbin/update-rc.d firebird start 14 2 3 5 . stop 20 0 1 6 .
fi
-
+
# More SuSE - rc.config fillup
if [ -f /etc/rc.config ]
then
@@ -338,7 +338,7 @@
then
cp @FB_MISCDIR@/rc.config.firebird /etc/sysconfig/firebird
fi
-
+
else
echo "Couldn't autodetect linux type. You must select"
echo "the most appropriate startup script in @FB_MISCDIR@"
@@ -369,15 +369,19 @@
then
"$InitFile" start
- checkString=`ps -eaf | egrep "\b(fbserver|fb_smp_server)\b" |grep -v grep`
+ checkString=`ps -eaf | egrep "\b(firebird)\b" |grep -v grep`
if [ -z "$checkString" ]
then
- # server didn't start - possible reason bad shell /bin/false for user "firebird"
- echo
- echo Fixing firebird\'s shell to /bin/sh
- echo
- usermod -s /bin/sh firebird
+ # server didn't start - wait a bit and recheck
+ sleep 2
"$InitFile" start
+
+ checkString=`ps -eaf | egrep "\b(firebird)\b" |grep -v grep`
+ if [ -z "$checkString" ]
+ then
+ echo "Looks like standalone server failed to start"
+ echo "Trying to continue anyway..."
+ fi
fi
fi
}
@@ -393,7 +397,7 @@
if [ -x /sbin/insserv ]; then
/sbin/insserv /etc/init.d/
fi
-
+
if [ -x /sbin/chkconfig ]; then
/sbin/chkconfig --del firebird
fi
@@ -407,15 +411,19 @@
then
rm -f /usr/sbin/rcfirebird
fi
-
+
# Remove initd script
- if [ -e /etc/init.d/firebird ]; then
- rm -f /etc/init.d/firebird
- fi
+ rm -f $InitFile
+ fi
+}
- if [ -e /etc/rc.d/init.d/firebird ]; then
- rm -f /etc/rc.d/init.d/firebird
- fi
+#------------------------------------------------------------------------
+# Returns TRUE if SA server is installed
+
+isStandaloneServerInstalled() {
+ InitFile=`getInitScriptLocation`
+ if [ -f "$InitFile" ]; then
+ return 0
fi
+ return 1
}
-
Modified: firebird/trunk/builds/install/arch-specific/linux/misc/makeInstallImage.sh.in
===================================================================
--- firebird/trunk/builds/install/arch-specific/linux/misc/makeInstallImage.sh.in 2011-01-17 14:13:57 UTC (rev 52150)
+++ firebird/trunk/builds/install/arch-specific/linux/misc/makeInstallImage.sh.in 2011-01-17 17:38:25 UTC (rev 52151)
@@ -35,9 +35,9 @@
# Making an assumption that this program is being run in the gen directory
BuildRootDir=..
-BuiltFBDir=./firebird # Where the just build fb exists.
+BuiltFBDir=Release/firebird # Where the just build fb exists.
TargetDir=buildroot # Where we want to build the install image
-SecurityDatabase=security2.fdb
+SecurityDatabase=security3.fdb
#------------------------------------------------------------------------
@@ -53,7 +53,7 @@
rm -f $libTarget
touch $libTarget
- for i in posixLibrary.sh @FIR...@Li... linuxLibrary.sh
+ for i in posixLibrary.sh linuxLibrary.sh
do
echo "# $i" >>$libTarget
cat $libSdir/$i >>$libTarget
@@ -161,17 +161,14 @@
chmod 0755 ${TargetDir}@FB_BINDIR@/*
#sbin
- copyIfExists $BuiltFBDir/bin/fb_smp_server ${TargetDir}@FB_SBINDIR@
- copyIfExists $BuiltFBDir/bin/fbserver ${TargetDir}@FB_SBINDIR@
+ cp -f $BuiltFBDir/bin/firebird ${TargetDir}@FB_SBINDIR@/firebird
cp -f $BuiltFBDir/bin/fbguard ${TargetDir}@FB_SBINDIR@
copyIfExists $BuiltFBDir/bin/fb_lock_print ${TargetDir}@FB_SBINDIR@
- copyIfExists $BuiltFBDir/bin/fbmgr.bin ${TargetDir}@FB_SBINDIR@
- addLibs $BuildRootDir/gen/firebird/bin changeRunUser.sh ${TargetDir}@FB_SBINDIR@
- addLibs $BuildRootDir/gen/firebird/bin restoreRootRunUser.sh ${TargetDir}@FB_SBINDIR@
- addLibs $BuildRootDir/gen/firebird/bin changeDBAPassword.sh ${TargetDir}@FB_SBINDIR@
- addLibs $BuildRootDir/gen/firebird/bin changeMultiConnectMode.sh ${TargetDir}@FB_SBINDIR@
- addLibs $BuiltFBDir/bin changeGdsLibraryCompatibleLink.sh ${TargetDir}@FB_SBINDIR@
+ addLibs $BuiltFBDir/bin changeRunUser.sh ${TargetDir}@FB_SBINDIR@
+ addLibs $BuiltFBDir/bin restoreRootRunUser.sh ${TargetDir}@FB_SBINDIR@
+ addLibs $BuiltFBDir/bin changeDBAPassword.sh ${TargetDir}@FB_SBINDIR@
+ addLibs $BuiltFBDir/bin changeMultiConnectMode.sh ${TargetDir}@FB_SBINDIR@
cp $BuiltFBDir/bin/createAliasDB.sh ${TargetDir}@FB_SBINDIR@
cp $BuiltFBDir/bin/fb_config ${TargetDir}@FB_SBINDIR@
@@ -180,14 +177,14 @@
chmod 0700 ${TargetDir}@FB_SBINDIR@/*.sh
#install scripts
- addLibs $BuildRootDir/gen/firebird/bin tarMainInstall.sh $BuildRootDir/gen/install/scripts
- addLibs $BuildRootDir/gen/firebird/bin tarinstall.sh $BuildRootDir/gen/install/scripts
- addLibs $BuildRootDir/gen/firebird/bin preinstall.sh $BuildRootDir/gen/install/scripts
- addLibs $BuildRootDir/gen/firebird/bin postinstall.sh $BuildRootDir/gen/install/scripts
- addLibs $BuildRootDir/gen/firebird/bin preuninstall.sh $BuildRootDir/gen/install/scripts
- addLibs $BuildRootDir/gen/firebird/bin postuninstall.sh $BuildRootDir/gen/install/scripts
- addLibs $BuildRootDir/gen/firebird/bin taruninstall.sh $BuildRootDir/gen/install/scripts
- addLibs $BuildRootDir/gen/firebird/bin tarMainUninstall.sh $BuildRootDir/gen/install/scripts
+ addLibs $BuiltFBDir/bin tarMainInstall.sh $BuildRootDir/gen/install/scripts
+ addLibs $BuiltFBDir/bin tarinstall.sh $BuildRootDir/gen/install/scripts
+ addLibs $BuiltFBDir/bin preinstall.sh $BuildRootDir/gen/install/scripts
+ addLibs $BuiltFBDir/bin postinstall.sh $BuildRootDir/gen/install/scripts
+ addLibs $BuiltFBDir/bin preuninstall.sh $BuildRootDir/gen/install/scripts
+ addLibs $BuiltFBDir/bin postuninstall.sh $BuildRootDir/gen/install/scripts
+ addLibs $BuiltFBDir/bin taruninstall.sh $BuildRootDir/gen/install/scripts
+ addLibs $BuiltFBDir/bin tarMainUninstall.sh $BuildRootDir/gen/install/scripts
#examples - copy only if we have them
exampleFiles=`find $BuiltFBDir/examples/README -type f -print`
@@ -247,10 +244,12 @@
chmod 0755 ${TargetDir}@FB_LIBDIR@/*.so*
#plugins
- cp -df $BuiltFBDir/plugins/* ${TargetDir}@FB_PLUGDIR@
+ (cd $BuiltFBDir/plugins;tar cf - .) | (cd ${TargetDir}@FB_PLUGDIR@; tar xvf -)
- chown root:root ${TargetDir}@FB_PLUGDIR@/*.so*
- chmod 0755 ${TargetDir}@FB_PLUGDIR@/*.so*
+ for file in `find ${TargetDir}@FB_PLUGDIR@ -name '*.so*' -print`; do
+ chown root:root ${file}
+ chmod 0755 ${file}
+ done
#intl
cp $BuiltFBDir/intl/libfbintl.so ${TargetDir}@FB_INTLDIR@/fbintl
@@ -306,6 +305,7 @@
cp $BuiltFBDir/firebird.conf ${TargetDir}@FB_CONFDIR@
cp $BuiltFBDir/aliases.conf ${TargetDir}@FB_CONFDIR@
cp $BuiltFBDir/fbtrace.conf ${TargetDir}@FB_CONFDIR@
+ cp $BuiltFBDir/plugins.conf ${TargetDir}@FB_CONFDIR@
chown root:root ${TargetDir}@FB_CONFDIR@/*.conf
chmod 0644 ${TargetDir}@FB_CONFDIR@/*.conf
Deleted: firebird/trunk/builds/install/misc/changeGdsLibraryCompatibleLink.sh.in
===================================================================
--- firebird/trunk/builds/install/misc/changeGdsLibraryCompatibleLink.sh.in 2011-01-17 14:13:57 UTC (rev 52150)
+++ firebird/trunk/builds/install/misc/changeGdsLibraryCompatibleLink.sh.in 2011-01-17 17:38:25 UTC (rev 52151)
@@ -1,105 +0,0 @@
-#!/bin/sh
-#
-# The contents of this file are subject to the Initial
-# Developer's Public License Version 1.0 (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.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl.
-#
-# Software distributed under the License is distributed AS IS,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied.
-# See the License for the specific language governing rights
-# and limitations under the License.
-#
-# The Original Code was created by Mark O'Donohue
-# for the Firebird Open Source RDBMS project.
-#
-# Copyright (c) Mark O'Donohue <mar...@lu...>
-# and all contributors signed below.
-#
-# All Rights Reserved.
-# Contributor(s): ______________________________________.
-# Alex Peshkoff
-#
-
-# This script allows the user to change the link on classic for the
-# client library from
-#
-# a) libfbembed.so original classic direct connection
-# b) libfbclient.so multithreaded client connection
-#
-
-#------------------------------------------------------------------------
-# quitIfRealFile
-# Quit if library is real file, not link somewhere
-
-quitIfRealFile() {
-
- fileToCheck=$1
-
- # Don't worry about symbolic links
- if [ -L $fileToCheck ]
- then
- return
- fi
-
- if [ -f $fileToCheck ]
- then
- echo "The file $fileToCheck is a real file not just a link to an "
- echo "existing file. It therefore may be from a"
- echo "previous firebird or InterBase(r) installation"
- echo "You will need to manually check the status of this file"
- echo "and remove it before running this script again"
- exit
- fi
-}
-
-
-#------------------------------------------------------------------------
-# printStatus
-
-printStatus() {
- printStatus=`ls -l @libdir@/libgds.so | sed 's@^.* /usr@/usr@'`
- echo $printStatus
-
-}
-
-
-#= Main ====================================================================
-
-
-cat <<EOF
-For classic server there are two optional backward compatible client libraries.
-These are libfbclient.so and libfbembed.so.
-
-libfbclient.so) enables your client to be multithreaded but must connect to a
- database via a server.
-libfbembed.so) allows the client to directly open the database file, but does
- not support multithreaded access
-
-Your current setting is:
-EOF
- printStatus
-
- echo ""
-
- quitIfRealFile @libdir@/libgds.so
- quitIfRealFile @libdir@/libgds.so.0
-
-
- AskQuestion "Which option would you like to choose (client|embed|remove) [client] " "client"
-
- case $Answer in
- embed)
- createLinksForBackCompatibility libfbembed.so
- ;;
- client)
- createLinksForBackCompatibility libfbclient.so
- ;;
- remove)
- removeLinksForBackCompatibility
- ;;
- *)
- echo "Unknown option $Answer chosen"
- ;;
- esac
Deleted: firebird/trunk/builds/install/misc/classicLibrary.sh.in
===================================================================
--- firebird/trunk/builds/install/misc/classicLibrary.sh.in 2011-01-17 14:13:57 UTC (rev 52150)
+++ firebird/trunk/builds/install/misc/classicLibrary.sh.in 2011-01-17 17:38:25 UTC (rev 52151)
@@ -1,108 +0,0 @@
-#!/bin/sh
-#
-# The contents of this file are subject to the Initial
-# Developer's Public License Version 1.0 (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.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl.
-#
-# Software distributed under the License is distributed AS IS,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied.
-# See the License for the specific language governing rights
-# and limitations under the License.
-#
-# The Original Code was created by Mark O'Donohue
-# for the Firebird Open Source RDBMS project.
-#
-# Copyright (c) Mark O'Donohue <mar...@lu...>
-# and all contributors signed below.
-#
-# All Rights Reserved.
-# Contributor(s): ______________________________________.
-# Alex Peshkoff
-#
-
-#------------------------------------------------------------------------
-# init defaults
-DefaultLibrary=libfbembed
-
-
-#------------------------------------------------------------------------
-# For security reasons most files in firebird installation are
-# root-owned and world-readable(executable) only (including firebird).
-
-# For some files RunUser and RunGroup (firebird)
-# must have write access - lock and log for example.
-
-MakeFileFirebirdWritable() {
- FileName=$1
- chown $RunUser:$RunGroup $FileName
-
- if [ "$RunUser" = "root" ]
- # In that case we must open databases, locks, etc. to the world...
- # That's a pity, but required if root RunUser choosen.
- then
- chmod a=rw $FileName
- else
- # This is good secure setting
- chmod ug=rw,o= $FileName
- fi
-}
-
-
-#------------------------------------------------------------------------
-# fixArcSpecificPermissions
-# Change the permissions specific for CS
-
-fixArcSpecificPermissions() {
- # Fix QLI help
- cd @FB_HELPDIR@
- chmod a=r help.fdb
-}
-
-
-#------------------------------------------------------------------------
-# changeXinetdServiceUser
-# Change the run user of the xinetd service
-
-changeXinetdServiceUser() {
- InitFile=/etc/xinetd.d/firebird
- if [ -f $InitFile ]
- then
- editFile $InitFile user "\tuser\t\t\t= $RunUser"
- fi
-}
-
-
-#------------------------------------------------------------------------
-# Update inetd service entry
-# This just adds/replaces the service entry line
-
-updateInetdEntry() {
- newLine="@FB_SERVICE_NAME@ stream tcp nowait.30000 $RunUser @FB_SBINDIR@/fb_smp_server fb_smp_server # Firebird Database Remote Server"
- replaceLineInFile /etc/inetd.conf "$newLine" "^@FB_SERVICE_NAME@"
-}
-
-
-#------------------------------------------------------------------------
-# Update xinetd service entry
-
-updateXinetdEntry() {
- cp @FB_MISCDIR@/firebird.xinetd /etc/xinetd.d/firebird
- changeXinetdServiceUser
-}
-
-
-#------------------------------------------------------------------------
-# Update inetd service entry
-# Check to see if we have xinetd installed or plain inetd.
-# Install differs for each of them.
-
-updateInetdServiceEntry() {
- if [ -d /etc/xinetd.d ]
- then
- updateXinetdEntry
- else
- updateInetdEntry
- fi
-}
Deleted: firebird/trunk/builds/install/misc/firebird.init.d.generic.in
===================================================================
--- firebird/trunk/builds/install/misc/firebird.init.d.generic.in 2011-01-17 14:13:57 UTC (rev 52150)
+++ firebird/trunk/builds/install/misc/firebird.init.d.generic.in 2011-01-17 17:38:25 UTC (rev 52151)
@@ -1,60 +0,0 @@
-#!/bin/sh
-
-# chkconfig: 345 20 80
-# description: Start/Stop firebird database server
-#
-# This file belongs in /etc/init.d where it will be run
-# on system startup and shutdown to start the background
-# Firebird database server daemon
-
-
-
-: ${FIREBIRD:=@prefix@}
-: ${ISC_USER:=SYSDBA}
-: ${ISC_PASSWORD:=masterkey}
-: ${FBRunUser:=root}
-# WARNING: in a real-world installation, you should not put the
-# SYSDBA password in a publicly-readable file.
-# Eventually this file should not need to contain any passwords.
-# as root user alone should be sufficient privledge to stop/start
-# the server.
-
-
-export FIREBIRD
-export ISC_USER
-export ISC_PASSWORD
-
-
-# Check the file is there and is executable.
-[ -x $FIREBIRD/bin/fbmgr ] || exit 0
-
-
-
-# See how we were called.
-case "$1" in
- start)
- echo -n "Starting Firebird server: "
- echo '$FIREBIRD/bin/fbmgr -start -forever' | su $FBRunUser
- RETVAL=$?
- ;;
- stop)
- echo -n "Stopping Firebird server: "
- $FIREBIRD/bin/fbmgr -shut
- RETVAL=$?
- [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/identd
- ;;
- status)
- RETVAL=0
- ;;
- restart|reload)
- $0 stop
- $0 start
- RETVAL=$?
- ;;
- *)
- echo "Usage: firebird {start|stop|status|restart|reload}"
- exit 1
-esac
-
-exit $RETVAL
-
Deleted: firebird/trunk/builds/install/misc/firebird.init.d.mandrake.in
===================================================================
--- firebird/trunk/builds/install/misc/firebird.init.d.mandrake.in 2011-01-17 14:13:57 UTC (rev 52150)
+++ firebird/trunk/builds/install/misc/firebird.init.d.mandrake.in 2011-01-17 17:38:25 UTC (rev 52151)
@@ -1,71 +0,0 @@
-#!/bin/sh
-
-# chkconfig: 345 20 80
-# description: Start/Stop firebird database server
-#
-# This file belongs in /etc/init.d where it will be run
-# on system startup and shutdown to start the background
-# Firebird database server daemon
-
-
-# This init script contains functions specific for redhat
-# and mandrake init scripts.
-
-# Source function library.
-. /etc/rc.d/init.d/functions
-
-
-: ${FIREBIRD:=@prefix@}
-: ${ISC_USER:=SYSDBA}
-: ${ISC_PASSWORD:=masterkey}
-: ${FBRunUser:=root}
-# WARNING: in a real-world installation, you should not put the
-# SYSDBA password in a publicly-readable file.
-# Eventually this file should not need to contain any passwords.
-# as root user alone should be sufficient privledge to stop/start
-# the server.
-
-
-export FIREBIRD
-export ISC_USER
-export ISC_PASSWORD
-
-
-# Check the file is there and is executable.
-[ -x $FIREBIRD/bin/fbmgr ] || exit 0
-
-
-
-# See how we were called.
-case "$1" in
- start)
- echo -n "Starting Firebird server: "
- daemon --user $FBRunUser $FIREBIRD/bin/fbmgr -start -forever
-# echo '$FIREBIRD/bin/ibmgr -start -forever' | su $FBRunUser
- RETVAL=$?
- echo
- ;;
- stop)
- echo -n "Stopping Firebird server: "
- $FIREBIRD/bin/fbmgr -shut
-# killproc ibserver
- RETVAL=$?
-# echo
-# [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/identd
- ;;
- status)
- status fbserver
- RETVAL=$?
- ;;
- restart|reload)
- $0 stop
- $0 start
- RETVAL=$?
- ;;
- *)
- echo "Usage: firebird {start|stop|status|restart|reload}"
- exit 1
-esac
-
-exit $RETVAL
-
Modified: firebird/trunk/builds/install/misc/posixLibrary.sh.in
===================================================================
--- firebird/trunk/builds/install/misc/posixLibrary.sh.in 2011-01-17 14:13:57 UTC (rev 52150)
+++ firebird/trunk/builds/install/misc/posixLibrary.sh.in 2011-01-17 17:38:25 UTC (rev 52151)
@@ -42,7 +42,8 @@
Answer=""
OrigPasswd=""
TmpFile=""
-SecurityDatabase=security2.fdb
+SecurityDatabase=security3.fdb
+DefaultLibrary=libfbclient
UninstallScript=FirebirdUninstall.sh
ArchiveDateTag=`date +"%Y%m%d_%H%M"`
export ArchiveDateTag
@@ -202,7 +203,7 @@
checkIfServerRunning() {
- checkString=`ps -ef$psOptions | egrep "\b(fbserver|fbguard|fb_smp_server)\b" |grep -v grep`
+ checkString=`ps -ef$psOptions | egrep "\b(fbserver|fbguard|fb_smp_server|firebird)\b" |grep -v grep`
if [ ! -z "$checkString" ]
then
serverMode=super
@@ -217,6 +218,14 @@
# Check is server is being actively used.
+ checkString=`ps -ef$psOptions | egrep "\b(firebird)\b" |grep -v grep`
+ if [ ! -z "$checkString" ]
+ then
+ echo "An instance of the Firebird server seems to be running."
+ echo "Please quit all Firebird applications and then proceed."
+ exit 1
+ fi
+
checkString=`ps -ef$psOptions | egrep "\b(fb_smp_server)\b" |grep -v grep`
if [ ! -z "$checkString" ]
then
@@ -233,7 +242,7 @@
exit 1
fi
- checkString=`ps -ef$psOptions | egrep "\b(fb_inet_server|fb_smp_server|gds_pipe)\b" |grep -v grep`
+ checkString=`ps -ef$psOptions | egrep "\b(fb_inet_server|gds_pipe)\b" |grep -v grep`
if [ ! -z "$checkString" ]
then
echo "An instance of the Firebird Classic server seems to be running."
@@ -487,20 +496,11 @@
# These two links are required for compatibility with existing ib programs
# If the program had been linked with libgds.so then this link is required
- # to ensure it loads the fb equivalent. Eventually these should be
- # optional and in a seperate rpm install. MOD 7-Nov-2002.
+ # to ensure it loads the fb equivalent. MOD 7-Nov-2002.
- if [ "$1" ]
- then
- # Use library name from parameter
- newLibrary=@FB_LIBDIR@/$1
- else
- # Use DefaultLibrary, set by appropriate install library
- newLibrary=@FB_LIBDIR@/$DefaultLibrary.so
- fi
-
- safeLink $newLibrary @libdir@/libgds.so
- safeLink $newLibrary @libdir@/libgds.so.0
+ newLibrary=@FB_LIBDIR@/$DefaultLibrary.@SHRLIB_EXT@
+ safeLink $newLibrary @libdir@/libgds.@SHRLIB_EXT@
+ safeLink $newLibrary @libdir@/libgds.@SHRLIB_EXT@.0
}
@@ -510,8 +510,8 @@
# linked systems.
removeLinksForBackCompatibility() {
- removeIfOnlyAlink @libdir@/libgds.so
- removeIfOnlyAlink @libdir@/libgds.so.0
+ removeIfOnlyAlink @libdir@/libgds.@SHRLIB_EXT@
+ removeIfOnlyAlink @libdir@/libgds.@SHRLIB_EXT@.0
}
@@ -609,7 +609,7 @@
fi
done
- for i in libib_util.so libfbclient.so*
+ for i in libib_util.@SHRLIB_EXT@ libfbclient.@SHRLIB_EXT@*
do
for DestFile in usr/lib/$i
do
@@ -630,7 +630,7 @@
fi
fi
done
-
+
if [ ! -z "$archiveFileList" ]
then
displayMessage "Archiving..."
@@ -723,6 +723,29 @@
#------------------------------------------------------------------------
+# For security reasons most files in firebird installation are
+# root-owned and world-readable(executable) only (including firebird).
+
+# For some files RunUser and RunGroup (firebird)
+# must have write access - lock and log for example.
+
+MakeFileFirebirdWritable() {
+ FileName=$1
+ chown $RunUser:$RunGroup $FileName
+
+ if [ "$RunUser" = "root" ]
+ # In that case we must open databases, locks, etc. to the world...
+ # That's a pity, but required if root RunUser choosen.
+ then
+ chmod a=rw $FileName
+ else
+ # This is good secure setting
+ chmod ug=rw,o= $FileName
+ fi
+}
+
+
+#------------------------------------------------------------------------
# fixFilePermissions
# Change the permissions to restrict access to server programs to
# firebird group only. This is MUCH better from a safety point of
@@ -742,7 +765,7 @@
cd @FB_LOGDIR@
touch firebird.log
MakeFileFirebirdWritable firebird.log
-
+
# Security database
cd @FB_SECDBDIR@
MakeFileFirebirdWritable $SecurityDatabase
@@ -753,7 +776,57 @@
MakeFileFirebirdWritable $i
done
- # Architecture (CS/SS) specific permissions
- fixArcSpecificPermissions
+ # Fix QLI help
+ cd @FB_HELPDIR@
+ chmod a=r help.fdb
}
+
+#------------------------------------------------------------------------
+# changeXinetdServiceUser
+# Change the run user of the xinetd service
+
+changeXinetdServiceUser() {
+ InitFile=/etc/xinetd.d/firebird
+ if [ -f $InitFile ]
+ then
+ editFile $InitFile user "\tuser\t\t\t= $RunUser"
+ fi
+}
+
+
+#------------------------------------------------------------------------
+# Update inetd service entry
+# This just adds/replaces the service entry line
+
+updateInetdEntry() {
+ newLine="@FB_SERVICE_NAME@ stream tcp nowait.30000 $RunUser @FB_SBINDIR@/firebird firebird # Firebird Database Remote Server"
+ replaceLineInFile /etc/inetd.conf "$newLine" "^@FB_SERVICE_NAME@"
+}
+
+
+#------------------------------------------------------------------------
+# Update xinetd service entry
+
+updateXinetdEntry() {
+ cp @FB_MISCDIR@/firebird.xinetd /etc/xinetd.d/firebird
+ changeXinetdServiceUser
+}
+
+
+#------------------------------------------------------------------------
+# Update inetd service entry
+# Check to see if we have xinetd installed or plain inetd.
+# Install differs for each of them.
+
+updateInetdServiceEntry() {
+ if ! isStandaloneServerInstalled
+ then
+ if [ -d /etc/xinetd.d ]
+ then
+ updateXinetdEntry
+ else
+ updateInetdEntry
+ fi
+ fi
+}
Deleted: firebird/trunk/builds/install/misc/superLibrary.sh.in
===================================================================
--- firebird/trunk/builds/install/misc/superLibrary.sh.in 2011-01-17 14:13:57 UTC (rev 52150)
+++ firebird/trunk/builds/install/misc/superLibrary.sh.in 2011-01-17 17:38:25 UTC (rev 52151)
@@ -1,62 +0,0 @@
-#!/bin/sh
-#
-# The contents of this file are subject to the Initial
-# Developer's Public License Version 1.0 (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.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl.
-#
-# Software distributed under the License is distributed AS IS,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied.
-# See the License for the specific language governing rights
-# and limitations under the License.
-#
-# The Original Code was created by Mark O'Donohue
-# for the Firebird Open Source RDBMS project.
-#
-# Copyright (c) Mark O'Donohue <mar...@lu...>
-# and all contributors signed below.
-#
-# All Rights Reserved.
-# Contributor(s): ______________________________________.
-# Alex Peshkoff
-#
-
-#------------------------------------------------------------------------
-# init defaults
-DefaultLibrary=libfbclient
-
-
-#------------------------------------------------------------------------
-# For security reasons most files in firebird installation are
-# root-owned and world-readable(executable) only (including firebird).
-
-# For some files RunUser (firebird)
-# must have write access - lock and log for examples.
-
-MakeFileFirebirdWritable() {
- FileName=$1
- chown $RunUser:$RunGroup $FileName
- chmod u=rw,go= $FileName
-}
-
-
-#------------------------------------------------------------------------
-# fixArcSpecificPermissions
-# Change the permissions specific for CS
-
-fixArcSpecificPermissions() {
- # No such permissions for SS
- return 0
-}
-
-
-#------------------------------------------------------------------------
-# Update inetd service entry
-# Check to see if we have xinetd installed or plain inetd.
-# Install differs for each of them.
-
-updateInetdServiceEntry() {
- # do nothing for SS
- return 0
-}
Modified: firebird/trunk/builds/posix/Makefile.in
===================================================================
--- firebird/trunk/builds/posix/Makefile.in 2011-01-17 14:13:57 UTC (rev 52150)
+++ firebird/trunk/builds/posix/Makefile.in 2011-01-17 17:38:25 UTC (rev 52151)
@@ -207,41 +207,41 @@
$(GPRE): $(GPRE_Objects) $(COMMON_LIB)
$(EXE_LINK) $(LINK_OPTS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS)
+HELP_FDB = $(FIREBIRD)/help/help.fdb
+SECURITY_FDB = $(FIREBIRD)/security3.fdb
+SECURITY_TMP = security.tmp
-databases: yachts.lnk help.fdb security.fdb msg.timestamp
+databases: yachts.lnk msg.timestamp $(HELP_FDB) $(SECURITY_FDB)
+export LD_LIBRARY_PATH += $(FIREBIRD)/lib
+
yachts.lnk: metadata.fdb
-$(RM) $@
$(LN) $^ $@
-export LD_LIBRARY_PATH += :$(FIREBIRD)/lib
-
metadata.fdb: $(BLD_ROOT)/misc/metadata.gbak
$(GBAK) -MODE read_only -R $< $@
- $(TOUCH) $@
$(CHMOD) 0444 $@
-help.fdb: $(FIREBIRD)/help/help.fdb
+$(HELP_FDB): help.fdb
-$(RM) $@
- $(LN) $^ $@
+ $(CP) $^ $@
+ $(CHMOD) 0444 $@
-$(FIREBIRD)/help/help.fdb: $(BLD_ROOT)/misc/help.gbak
+help.fdb: $(BLD_ROOT)/misc/help.gbak
$(GBAK) -MODE read_only -R $< $@
- $(TOUCH) $@
- $(CHMOD) 0444 $@
-security.fdb: $(SECURITY_FDB)
+$(SECURITY_FDB): security.fdb
-$(RM) $@
- $(LN) $(SECDB) $@
+ $(CP) $^ $@
-SECDB = security.tmp
-$(SECURITY_FDB): $(SRC_ROOT)/dbs/security.sql
+security.fdb: $(SRC_ROOT)/dbs/security.sql
-$(RM) $@
- -$(RM) $(SECDB)
- echo create database \'$(SECDB)\'\; | $(ISQL)
- $(ISQL) -i $^ $(SECDB)
- $(CHMOD) a=rw $(SECDB)
- $(CP) $(SECDB) $@
+ -$(RM) $(SECURITY_TMP)
+ echo create database \'$(SECURITY_TMP)\'\; | $(ISQL)
+ $(ISQL) -i $^ $(SECURITY_TMP)
+ $(CHMOD) a=rw $(SECURITY_TMP)
+ $(CP) $(SECURITY_TMP) $@
msg.timestamp: $(MSG_FILES)
-$(RM) msg.fdb
@@ -491,7 +491,16 @@
Dependencies = $(AllObjects:.o=.d)
-include $(Dependencies)
+
#___________________________________________________________________________
+# create binary packages
+#
+
+install install-embedded package packages dist:
+ $(MAKE) -f Makefile.install $@
+
+
+#___________________________________________________________________________
# various cleaning
#
.PHONY: clean clean_objects clean_dependancies clean_extern_objects clean_build \
Modified: firebird/trunk/configure.in
===================================================================
--- firebird/trunk/configure.in 2011-01-17 14:13:57 UTC (rev 52150)
+++ firebird/trunk/configure.in 2011-01-17 17:38:25 UTC (rev 52151)
@@ -66,7 +66,6 @@
dnl Should system editline be used
STD_EDITLINE=false
-RPM64=
dnl Test for special ar options?
AR_OPT_CHECK=false
@@ -196,7 +195,6 @@
libdir=/usr/lib64
fi
CPU_TYPE=amd64
- RPM64='()(64bit)'
;;
ia64*-*-linux*)
@@ -208,7 +206,6 @@
SHRLIB_EXT=so
libdir=/usr/lib
CPU_TYPE=ia64
- RPM64='()(64bit)'
;;
arm*-*-linux*)
@@ -426,7 +423,6 @@
AC_SUBST(PLATFORM)
AC_SUBST(SHRLIB_EXT)
AC_DEFINE(CASE_SENSITIVITY, true, [Define this if paths are case sensitive])
-AC_SUBST(RPM64)
dnl Some controllable options
@@ -1088,8 +1084,6 @@
gen/Release/firebird/plugins.conf:builds/install/misc/plugins.conf
gen/Release/firebird/bin/fb_config:builds/install/misc/fb_config.in
gen/Release/firebird/bin/posixLibrary.sh:builds/install/misc/posixLibrary.sh.in
-gen/Release/firebird/bin/classicLibrary.sh:builds/install/misc/classicLibrary.sh.in
-gen/Release/firebird/bin/superLibrary.sh:builds/install/misc/superLibrary.sh.in
gen/Release/firebird/bin/changeRunUser.sh:builds/install/misc/changeRunUser.sh.in
gen/Release/firebird/bin/restoreRootRunUser.sh:builds/install/misc/restoreRootRunUser.sh.in
gen/Release/firebird/bin/tarMainInstall.sh:builds/install/arch-specific/linux/misc/tarMainInstall.sh.in
@@ -1103,7 +1097,6 @@
gen/vers.sh:builds/posix/vers.sh.in
gen/Release/firebird/bin/changeDBAPassword.sh:builds/install/misc/changeDBAPassword.sh.in
gen/Release/firebird/bin/changeMultiConnectMode.sh:builds/install/misc/changeMultiConnectMode.sh.in
-gen/Release/firebird/bin/changeGdsLibraryCompatibleLink.sh:builds/install/misc/changeGdsLibraryCompatibleLink.sh.in
gen/Release/firebird/bin/createAliasDB.sh:builds/install/misc/createAliasDB.sh.in
],
[chmod a+x gen/install/scripts/*.sh gen/install/*sh 2>/dev/null])
@@ -1114,15 +1107,11 @@
LINUX|GENTOOFREEBSD)
AC_CONFIG_COMMANDS(,,[
mkdir -p gen/install/scripts
- mkdir -p gen/install/misc
- mkdir -p gen/RPM/RPMS/i686
- mkdir -p gen/RPM/BUILD])
+ mkdir -p gen/install/misc])
INSTALL_SRC_DIR=builds/install/arch-specific/linux/${FIREBIRD_ARCH_TYPE}
AC_CONFIG_FILES([
gen/install/makeInstallImage.sh:builds/install/arch-specific/linux/misc/makeInstallImage.sh.in
- gen/install/scripts/rpmheader.txt:${INSTALL_SRC_DIR}/rpmheader.txt.in
- gen/install/scripts/rpmfiles.txt:${INSTALL_SRC_DIR}/rpmfiles.txt.in
gen/install/misc/firebird.xinetd:builds/install/arch-specific/linux/misc/firebird.xinetd.in
gen/install/misc/firebird.init.d.generic:builds/install/arch-specific/linux/misc/firebird.init.d.generic.in
gen/install/misc/firebird.init.d.mandrake:builds/install/arch-specific/linux/misc/firebird.init.d.mandrake.in
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|