|
From: <ale...@us...> - 2013-09-13 12:27:25
|
Revision: 58617
http://sourceforge.net/p/firebird/code/58617
Author: alexpeshkoff
Date: 2013-09-13 12:27:16 +0000 (Fri, 13 Sep 2013)
Log Message:
-----------
Added support for systemd
Removed scripts to change firebird runuser to root and back to firebird
Removed script changing SYSDBA password (nothing except gsec call left in it)
Reorganize posix/linux install files minimizing OS-specific part of .tgz install scripts
Related cleanup and bugfixing in posix install
Modified Paths:
--------------
firebird/trunk/configure.ac
Added Paths:
-----------
firebird/trunk/builds/install/arch-specific/linux/README
firebird/trunk/builds/install/arch-specific/linux/firebird-classic.service.in
firebird/trunk/builds/install/arch-specific/linux/firebird-classic.socket.in
firebird/trunk/builds/install/arch-specific/linux/firebird-superserver.service.in
firebird/trunk/builds/install/arch-specific/linux/firebird.init.d.debian.in
firebird/trunk/builds/install/arch-specific/linux/firebird.init.d.generic.in
firebird/trunk/builds/install/arch-specific/linux/firebird.init.d.gentoo.in
firebird/trunk/builds/install/arch-specific/linux/firebird.init.d.mandrake.in
firebird/trunk/builds/install/arch-specific/linux/firebird.init.d.slackware.in
firebird/trunk/builds/install/arch-specific/linux/firebird.init.d.suse.in
firebird/trunk/builds/install/arch-specific/linux/firebird.xinetd.in
firebird/trunk/builds/install/arch-specific/linux/linuxLibrary.sh.in
firebird/trunk/builds/install/arch-specific/linux/makeInstallImage.sh.in
firebird/trunk/builds/install/arch-specific/linux/rc.config.firebird.in
firebird/trunk/builds/install/posix-common/
firebird/trunk/builds/install/posix-common/changeServerMode.sh.in
firebird/trunk/builds/install/posix-common/fb_config.in
firebird/trunk/builds/install/posix-common/posixLibrary.sh.in
firebird/trunk/builds/install/posix-common/postinstall.sh.in
firebird/trunk/builds/install/posix-common/postuninstall.sh.in
firebird/trunk/builds/install/posix-common/preinstall.sh.in
firebird/trunk/builds/install/posix-common/preuninstall.sh.in
firebird/trunk/builds/install/posix-common/registerDatabase.sh.in
firebird/trunk/builds/install/posix-common/tarMainInstall.sh.in
firebird/trunk/builds/install/posix-common/tarMainUninstall.sh.in
firebird/trunk/builds/install/posix-common/tarinstall.sh.in
firebird/trunk/builds/install/posix-common/taruninstall.sh.in
Removed Paths:
-------------
firebird/trunk/builds/install/arch-specific/linux/misc/
firebird/trunk/builds/install/misc/changeDBAPassword.sh.in
firebird/trunk/builds/install/misc/changeRunUser.sh.in
firebird/trunk/builds/install/misc/changeServerMode.sh.in
firebird/trunk/builds/install/misc/createAliasDB.sh.in
firebird/trunk/builds/install/misc/fb_config.in
firebird/trunk/builds/install/misc/posixLibrary.sh.in
firebird/trunk/builds/install/misc/restoreRootRunUser.sh.in
Property Changed:
----------------
firebird/trunk/builds/install/arch-specific/linux/Makefile.in
firebird/trunk/builds/install/misc/IDPLicense.txt
firebird/trunk/builds/install/misc/IPLicense.txt
firebird/trunk/builds/install/misc/fbintl.conf
firebird/trunk/builds/install/misc/firebird.conf.in
firebird/trunk/builds/install/misc/firebird.init.d.Solaris.in
Index: firebird/trunk/builds/install/arch-specific/linux/Makefile.in
===================================================================
--- firebird/trunk/builds/install/arch-specific/linux/Makefile.in 2013-09-13 12:21:51 UTC (rev 58616)
+++ firebird/trunk/builds/install/arch-specific/linux/Makefile.in 2013-09-13 12:27:16 UTC (rev 58617)
Property changes on: firebird/trunk/builds/install/arch-specific/linux/Makefile.in
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Copied: firebird/trunk/builds/install/arch-specific/linux/README (from rev 58589, firebird/trunk/builds/install/arch-specific/linux/misc/README)
===================================================================
--- firebird/trunk/builds/install/arch-specific/linux/README (rev 0)
+++ firebird/trunk/builds/install/arch-specific/linux/README 2013-09-13 12:27:16 UTC (rev 58617)
@@ -0,0 +1,22 @@
+Firebird 2 Server for Linux
+
+
+More information can be found about the Firebird
+database engine from:
+http://www.firebirdsql.org/
+http://sourceforge.net/projects/firebird
+
+or affiliated sites:
+
+http://www.ibphoenix.com
+http://www.interbase2000.com
+
+
+
+The Firebird database engine is derived from the
+InterBase(tm) product currently owned by Inprise.
+The documentation for InterBase v 6.0 applies also to
+the current FireBird release. InterBase documentation
+is available in Adobe Acrobat format from
+http://www.interbase.com.
+
Property changes on: firebird/trunk/builds/install/arch-specific/linux/README
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: firebird/trunk/builds/install/arch-specific/linux/firebird-classic.service.in
===================================================================
--- firebird/trunk/builds/install/arch-specific/linux/firebird-classic.service.in (rev 0)
+++ firebird/trunk/builds/install/arch-specific/linux/firebird-classic.service.in 2013-09-13 12:27:16 UTC (rev 58617)
@@ -0,0 +1,10 @@
+[Unit]
+Description=Firebird Database Server ( Classic )
+After=local-fs.target
+
+[Service]
+User=firebird
+Group=firebird
+ExecStart=@FB_SBINDIR@/firebird
+StandardInput=socket
+StandardError=syslog
Property changes on: firebird/trunk/builds/install/arch-specific/linux/firebird-classic.service.in
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: firebird/trunk/builds/install/arch-specific/linux/firebird-classic.socket.in
===================================================================
--- firebird/trunk/builds/install/arch-specific/linux/firebird-classic.socket.in (rev 0)
+++ firebird/trunk/builds/install/arch-specific/linux/firebird-classic.socket.in 2013-09-13 12:27:16 UTC (rev 58617)
@@ -0,0 +1,10 @@
+[Unit]
+Description=Firebird Classic Activation Socket
+Conflicts=firebird-superserver.service
+
+[Socket]
+ListenStream=3050
+Accept=true
+
+[Install]
+WantedBy=sockets.target
Property changes on: firebird/trunk/builds/install/arch-specific/linux/firebird-classic.socket.in
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: firebird/trunk/builds/install/arch-specific/linux/firebird-superserver.service.in
===================================================================
--- firebird/trunk/builds/install/arch-specific/linux/firebird-superserver.service.in (rev 0)
+++ firebird/trunk/builds/install/arch-specific/linux/firebird-superserver.service.in 2013-09-13 12:27:16 UTC (rev 58617)
@@ -0,0 +1,15 @@
+[Unit]
+Description=Firebird Database Server ( SuperServer )
+After=syslog.target network.target
+Conflicts=firebird-classic.socket
+
+[Service]
+User=firebird
+Group=firebird
+Type=forking
+PIDFile=/var/run/firebird/default.pid
+ExecStart=@FB_SBINDIR@/fbguard -pidfile /var/run/firebird/default.pid -daemon -forever
+StandardError=syslog
+
+[Install]
+WantedBy=multi-user.target
Property changes on: firebird/trunk/builds/install/arch-specific/linux/firebird-superserver.service.in
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Copied: firebird/trunk/builds/install/arch-specific/linux/firebird.init.d.debian.in (from rev 58589, firebird/trunk/builds/install/arch-specific/linux/misc/firebird.init.d.debian.in)
===================================================================
--- firebird/trunk/builds/install/arch-specific/linux/firebird.init.d.debian.in (rev 0)
+++ firebird/trunk/builds/install/arch-specific/linux/firebird.init.d.debian.in 2013-09-13 12:27:16 UTC (rev 58617)
@@ -0,0 +1,94 @@
+#!/bin/sh
+
+# chkconfig: 345 80 20
+# 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
+
+### BEGIN INIT INFO
+# Provides: firebird
+# Required-Start: $remote_fs $syslog $named
+# Required-Stop: $remote_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Start firebird server
+# Description: Start the firebird guardian process (fbguard)
+# which starts the actual firebird server process
+# (firebird) and makes sure there is always firebird
+# running
+### END INIT INFO
+
+# This init script contains functions specific for debian
+# init scripts.
+
+# Source function library.
+#. /etc/rc.d/init.d/functions
+
+FIREBIRD=@FB_CONFDIR@
+FBRunUser=firebird
+
+makeFbDir() {
+ mDir=${1}
+ mode=${2}
+ if [ ! -d $mDir ]; then
+ rm -rf $mDir
+ mkdir $mDir
+ if [ "$mode" ]; then
+ chmod $mode $mDir
+ fi
+ fi
+ chown $FBRunUser:$FBRunUser $mDir
+}
+runDir=/var/run/firebird
+makeFbDir $runDir
+lockDir=/tmp/firebird
+makeFbDir $lockDir 0770
+
+pidfile="$runDir/`basename $0`.pid"
+FB_OPTS="-pidfile $pidfile -daemon -forever"
+export FIREBIRD
+
+ISC_USER=
+ISC_PASSWORD=
+export ISC_USER ISC_PASSWORD
+
+GUARDIAN=$FIREBIRD/bin/fbguard
+if [ ! -x $GUARDIAN ]; then
+ GUARDIAN=@FB_SBINDIR@/fbguard
+fi
+
+# See how we were called.
+case "$1" in
+ start)
+ echo -n "Starting Firebird server: "
+ start-stop-daemon --start --quiet --oknodo --chuid $FBRunUser --exec $GUARDIAN -- $FB_OPTS
+ RETVAL=$?
+ ;;
+ stop)
+ echo -n "Stopping Firebird server: "
+ if [ -f $pidfile ]
+ then
+ kill `cat $pidfile`
+ fi
+ RETVAL=$?
+ ;;
+ restart|reload)
+ $0 stop
+ $0 start
+ RETVAL=$?
+ ;;
+ shutdown)
+ echo -n "Forcibly killing Firebird server..."
+ killall fbguard
+ killall firebird
+ echo "done."
+ RETVAL=0
+ ;;
+ *)
+ echo "Usage: firebird {start|stop|shutdown|restart|reload}"
+ exit 1
+esac
+
+exit $RETVAL
Property changes on: firebird/trunk/builds/install/arch-specific/linux/firebird.init.d.debian.in
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Copied: firebird/trunk/builds/install/arch-specific/linux/firebird.init.d.generic.in (from rev 58589, firebird/trunk/builds/install/arch-specific/linux/misc/firebird.init.d.generic.in)
===================================================================
--- firebird/trunk/builds/install/arch-specific/linux/firebird.init.d.generic.in (rev 0)
+++ firebird/trunk/builds/install/arch-specific/linux/firebird.init.d.generic.in 2013-09-13 12:27:16 UTC (rev 58617)
@@ -0,0 +1,92 @@
+#!/bin/sh
+
+# description: Start/Stop firebird database server
+
+# To run more instances of firebird:
+# Copy @prefix@ somewhere
+# Copy this script under a new name
+# Change INSTANCE and FIREBIRD below (all instance names should be unique)
+# Edit the copied firebird.conf to change at least RemoteServicePort
+INSTANCE=default
+FIREBIRD=@FB_CONFDIR@
+
+# No changes needed below for multiple instances
+FBRunUser=firebird
+
+makeFbDir() {
+ mDir=${1}
+ mode=${2}
+ if [ ! -d $mDir ]; then
+ rm -rf $mDir
+ mkdir $mDir
+ if [ "$mode" ]; then
+ chmod $mode $mDir
+ fi
+ fi
+ chown $FBRunUser:$FBRunUser $mDir
+}
+runDir=/var/run/firebird
+makeFbDir $runDir
+lockDir=/tmp/firebird
+makeFbDir $lockDir 0770
+
+pidfile="$runDir/$INSTANCE.pid"
+FULLNAME="Firebird server [$INSTANCE]"
+LD_LIBRARY_PATH=$FIREBIRD/lib:$LD_LIBRARY_PATH
+
+export FIREBIRD LD_LIBRARY_PATH
+
+ISC_USER=
+ISC_PASSWORD=
+export ISC_USER ISC_PASSWORD
+
+GUARDIAN=$FIREBIRD/bin/fbguard
+if [ ! -x $GUARDIAN ]; then
+ GUARDIAN=@FB_SBINDIR@/fbguard
+fi
+
+# See how we were called.
+case "$1" in
+ start)
+ echo -n "Starting $FULLNAME: "
+ echo "$GUARDIAN -pidfile $pidfile -daemon -forever" | su $FBRunUser
+ RETVAL=$?
+ ;;
+ stop)
+ echo -n "Stopping $FULLNAME: "
+ if [ -f $pidfile ]
+ then
+ kill `cat $pidfile`
+ fi
+ echo "stopped."
+ RETVAL=$?
+ ;;
+ status)
+ if [ -f $pidfile ]
+ then
+ pid=`cat $pidfile`
+ ps -p $pid >/dev/null 2>&1
+ RETVAL=$?
+ else
+ RETVAL=1
+ fi
+ if [ $RETVAL -eq 0 ]
+ then
+ echo "$FULLNAME is running, pid $pid"
+ else
+ echo "$FULLNAME is stopped."
+ fi
+ ;;
+ restart|reload)
+ $0 stop
+ sleep 1
+ $0 start
+ RETVAL=$?
+ ;;
+ *)
+ echo "Usage: firebird {start|stop|status|restart|reload}"
+ exit 1
+esac
+
+exit $RETVAL
+
Property changes on: firebird/trunk/builds/install/arch-specific/linux/firebird.init.d.generic.in
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Copied: firebird/trunk/builds/install/arch-specific/linux/firebird.init.d.gentoo.in (from rev 58589, firebird/trunk/builds/install/arch-specific/linux/misc/firebird.init.d.gentoo.in)
===================================================================
--- firebird/trunk/builds/install/arch-specific/linux/firebird.init.d.gentoo.in (rev 0)
+++ firebird/trunk/builds/install/arch-specific/linux/firebird.init.d.gentoo.in 2013-09-13 12:27:16 UTC (rev 58617)
@@ -0,0 +1,69 @@
+#!/sbin/runscript
+#Gentoo Linux RC script
+# 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
+
+# To run more instances of firebird:
+# Copy @prefix@ somewhere
+# Copy this script under a new name
+# Change INSTANCE and FIREBIRD below (all instance names should be unique)
+# Edit the copied firebird.conf to change at least RemoteServicePort
+# Optionally run rc-update to autostart the new service
+INSTANCE=default
+FIREBIRD=@FB_CONFDIR@
+
+FBRunUser=firebird
+
+makeFbDir() {
+ mDir=${1}
+ mode=${2}
+ if [ ! -d $mDir ]; then
+ rm -rf $mDir
+ mkdir $mDir
+ if [ "$mode" ]; then
+ chmod $mode $mDir
+ fi
+ fi
+ chown $FBRunUser:$FBRunUser $mDir
+}
+runDir=/var/run/firebird
+makeFbDir $runDir
+lockDir=/tmp/firebird
+makeFbDir $lockDir 0770
+
+pidfile="$runDir/$INSTANCE.pid"
+FULLNAME="firebird server [$INSTANCE]"
+LD_LIBRARY_PATH=$FIREBIRD/lib:$LD_LIBRARY_PATH
+FB_OPTS="-pidfile $pidfile -daemon -forever"
+
+export FIREBIRD LD_LIBRARY_PATH
+
+ISC_USER=
+ISC_PASSWORD=
+export ISC_USER ISC_PASSWORD
+
+GUARDIAN=$FIREBIRD/bin/fbguard
+if [ ! -x $GUARDIAN ]; then
+ GUARDIAN=@FB_SBINDIR@/fbguard
+fi
+
+start(){
+ ebegin "Starting $FULLNAME"
+ start-stop-daemon --oknodo --start --pidfile $pidfile --chuid $FBRunUser --startas $GUARDIAN -- $FB_OPTS
+ eend $?
+}
+
+stop(){
+ ebegin "Stopping $FULLNAME"
+ start-stop-daemon --stop --pidfile $pidfile --oknodo
+ eend $?
+}
+
+restart(){
+ svc_stop
+ sleep 1
+ svc_start
+}
Property changes on: firebird/trunk/builds/install/arch-specific/linux/firebird.init.d.gentoo.in
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Copied: firebird/trunk/builds/install/arch-specific/linux/firebird.init.d.mandrake.in (from rev 58589, firebird/trunk/builds/install/arch-specific/linux/misc/firebird.init.d.mandrake.in)
===================================================================
--- firebird/trunk/builds/install/arch-specific/linux/firebird.init.d.mandrake.in (rev 0)
+++ firebird/trunk/builds/install/arch-specific/linux/firebird.init.d.mandrake.in 2013-09-13 12:27:16 UTC (rev 58617)
@@ -0,0 +1,116 @@
+#!/bin/sh
+
+# chkconfig: 345 80 20
+# 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
+### BEGIN INIT INFO
+# Provides: firebird
+# Required-Start: $local_fs $syslog
+# Required-Stop:
+# Default-Start: 3 4 5
+# Default-Stop: 0 1 2 6
+# Short-Description: Firebird server database
+# Description: Starts and stops the Firebird database server backend daemon.
+### END INIT INFO
+
+# Source function library - RedHat or Mandriva specific
+# functions actually used: checkpid killproc daemon
+. /etc/rc.d/init.d/functions
+
+# To run more instances of firebird:
+# Copy @prefix@ somewhere
+# Copy this script under a new name
+# Change at least INSTANCE and FIREBIRD below
+# Edit the copied firebird.conf to change at least RemoteServicePort
+# Optionally run chkconfig to autostart the new service
+INSTANCE=default
+FIREBIRD=@FB_CONFDIR@
+
+# No changes needed below for multiple instances
+name=$(basename `readlink -f $0`)
+FBRunUser=firebird
+
+makeFbDir() {
+ mDir=${1}
+ mode=${2}
+ if [ ! -d $mDir ]; then
+ rm -rf $mDir
+ mkdir $mDir
+ if [ "$mode" ]; then
+ chmod $mode $mDir
+ fi
+ fi
+ chown $FBRunUser:$FBRunUser $mDir
+}
+runDir=/var/run/firebird
+makeFbDir $runDir
+lockDir=/tmp/firebird
+makeFbDir $lockDir 0770
+
+pidfile="$runDir/$INSTANCE.pid"
+FULLNAME="Firebird server [$INSTANCE]"
+LD_LIBRARY_PATH=$FIREBIRD/lib:$LD_LIBRARY_PATH
+
+export FIREBIRD LD_LIBRARY_PATH
+
+ISC_USER=
+ISC_PASSWORD=
+export ISC_USER ISC_PASSWORD
+
+GUARDIAN=$FIREBIRD/bin/fbguard
+if [ ! -x $GUARDIAN ]; then
+ GUARDIAN=@FB_SBINDIR@/fbguard
+fi
+
+# initialize as "success"
+RETVAL=0
+
+# See how we were called.
+case "$1" in
+ start)
+ echo -n "Starting $FULLNAME "
+ daemon --user=$FBRunUser "export FIREBIRD LD_LIBRARY_PATH; $GUARDIAN -pidfile $pidfile -daemon -forever"
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$name
+ echo
+ ;;
+ stop)
+ if [ -f $pidfile ]
+ then
+ echo -n "Stopping $FULLNAME: "
+ killproc -p $pidfile $name
+ RETVAL=$?
+ echo
+ else
+ echo -n "$FULLNAME server is stopped"
+ echo
+ fi
+ [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$name
+ ;;
+ status)
+ if [ -f $pidfile ]
+ then
+ pid=`cat $pidfile`
+ checkpid $pid
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && echo "$FULLNAME is running (pid $pid)" || echo "$FULLNAME is dead but pid file exists"
+ else
+ echo "$FULLNAME is stopped"
+ RETVAL=3
+ fi
+ ;;
+ restart|reload)
+ $0 stop
+ sleep 1
+ $0 start
+ RETVAL=$?
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|status|restart|reload}"
+ exit 1
+esac
+
+exit $RETVAL
Property changes on: firebird/trunk/builds/install/arch-specific/linux/firebird.init.d.mandrake.in
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Copied: firebird/trunk/builds/install/arch-specific/linux/firebird.init.d.slackware.in (from rev 58589, firebird/trunk/builds/install/arch-specific/linux/misc/firebird.init.d.slackware.in)
===================================================================
--- firebird/trunk/builds/install/arch-specific/linux/firebird.init.d.slackware.in (rev 0)
+++ firebird/trunk/builds/install/arch-specific/linux/firebird.init.d.slackware.in 2013-09-13 12:27:16 UTC (rev 58617)
@@ -0,0 +1,59 @@
+#!/bin/sh
+#
+# /etc/rc.d/rc.firebirdss
+#
+# Start/stop/restart the firebird super server.
+#
+
+# To run more instances of firebird:
+# Copy @prefix@ somewhere
+# Copy this script under a new name
+# Change INSTANCE and FIREBIRD below (all instance names should be unique)
+# Edit the copied firebird.conf to change at least RemoteServicePort
+# Optionally run rc-update to autostart the new service
+INSTANCE=default
+FIREBIRD=@FB_CONFDIR@
+
+# No changes needed below for multiple instances
+FBRunUser=firebird
+
+makeFbDir() {
+ mDir=${1}
+ mode=${2}
+ if [ ! -d $mDir ]; then
+ rm -rf $mDir
+ mkdir $mDir
+ if [ "$mode" ]; then
+ chmod $mode $mDir
+ fi
+ fi
+ chown $FBRunUser:$FBRunUser $mDir
+}
+runDir=/var/run/firebird
+makeFbDir $runDir
+lockDir=/tmp/firebird
+makeFbDir $lockDir 0770
+
+pidfile="$runDir/$INSTANCE.pid"
+FULLNAME="Firebird server [$INSTANCE]"
+LD_LIBRARY_PATH=$FIREBIRD/lib:$LD_LIBRARY_PATH
+
+export FIREBIRD LD_LIBRARY_PATH
+
+ISC_USER=
+ISC_PASSWORD=
+export ISC_USER ISC_PASSWORD
+
+GUARDIAN=$FIREBIRD/bin/fbguard
+if [ ! -x $GUARDIAN ]; then
+ GUARDIAN=@FB_SBINDIR@/fbguard
+fi
+
+case "$1" in
+ 'start') echo -n "Starting $FULLNAME: "
+ echo $GUARDIAN -pidfile $pidfile -daemon -forever | su $FBRunUser ;;
+ 'stop') echo -n "Stopping $FULLNAME: "
+ if [ -f $pidfile ]; then kill `cat $pidfile`; echo "done."; else echo "error: no PID file."; fi ;;
+ 'restart') $0 stop ; sleep 1; $0 start ;;
+ *) echo "usage $0 start|stop|restart" ;;
+esac
Property changes on: firebird/trunk/builds/install/arch-specific/linux/firebird.init.d.slackware.in
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Copied: firebird/trunk/builds/install/arch-specific/linux/firebird.init.d.suse.in (from rev 58589, firebird/trunk/builds/install/arch-specific/linux/misc/firebird.init.d.suse.in)
===================================================================
--- firebird/trunk/builds/install/arch-specific/linux/firebird.init.d.suse.in (rev 0)
+++ firebird/trunk/builds/install/arch-specific/linux/firebird.init.d.suse.in 2013-09-13 12:27:16 UTC (rev 58617)
@@ -0,0 +1,183 @@
+#! /bin/sh
+# Copyright (c) 2001 IBPhoenix
+#
+# Author: Pavel Cisar <pc...@ib...>
+#
+# init.d/firebird
+#
+# and symbolic its link
+#
+# /usr/sbin/rcfirebird
+#
+# System startup script for the Firebird SuperServer
+#
+### BEGIN INIT INFO
+# Provides: firebird
+# Required-Start: $network $remote_fs
+# Required-Stop:
+# Default-Start: 2 3 5
+# Default-Stop: 0 1 6
+# Description: Start the Firebird database server.
+### END INIT INFO
+
+# Source SuSE config
+if [ -r /etc/rc.config ]
+ then
+ . /etc/rc.config
+fi
+
+if [ -r /etc/sysconfig/firebird ]
+ then
+ . /etc/sysconfig/firebird
+fi
+
+
+# Determine the base and follow a runlevel link name.
+base=${0##*/}
+link=${base#*[SK][0-9][0-9]}
+
+# Force execution if not called by a runlevel directory.
+test $link = $base && START_FIREBIRD="yes"
+test "$START_FIREBIRD" = yes || exit 0
+
+FIREBIRD=@FB_CONFDIR@
+FBRunUser=firebird
+INSTANCE=default
+
+makeFbDir() {
+ mDir=${1}
+ mode=${2}
+ if [ ! -d $mDir ]; then
+ rm -rf $mDir
+ mkdir $mDir
+ if [ "$mode" ]; then
+ chmod $mode $mDir
+ fi
+ fi
+ chown $FBRunUser:$FBRunUser $mDir
+}
+runDir=/var/run/firebird
+makeFbDir $runDir
+lockDir=/tmp/firebird
+makeFbDir $lockDir 0770
+
+pidfile="$runDir/$INSTANCE.pid"
+
+export FIREBIRD
+
+ISC_USER=
+ISC_PASSWORD=
+export ISC_USER ISC_PASSWORD
+
+# Check the files are there and are executable.
+FBSBIN=$FIREBIRD/bin
+if [ ! -x $FBSBIN/fbguard ]; then
+ FBSBIN=@FB_SBINDIR@
+fi
+
+[ -x $FBSBIN/fbguard ] || exit 5
+[ -x $FBSBIN/firebird ] || exit 5
+
+# Shell functions sourced from /etc/rc.status:
+# rc_check check and set local and overall rc status
+# rc_status check and set local and overall rc status
+# rc_status -v ditto but be verbose in local rc status
+# rc_status -v -r ditto and clear the local rc status
+# rc_failed set local and overall rc status to failed
+# rc_failed <num> set local and overall rc status to <num><num>
+# rc_reset clear local rc status (overall remains)
+# rc_exit exit appropriate to overall rc status
+. /etc/rc.status
+
+# First reset status of this service
+rc_reset
+
+# Return values acc. to LSB for all commands but status:
+# 0 - success
+# 1 - generic or unspecified error
+# 2 - invalid or excess argument(s)
+# 3 - unimplemented feature (e.g. "reload")
+# 4 - insufficient privilege
+# 5 - program is not installed
+# 6 - program is not configured
+# 7 - program is not running
+#
+# Note that starting an already running service, stopping
+# or restarting a not-running service as well as the restart
+# with force-reload (in case signalling is not supported) are
+# considered a success.
+
+case "$1" in
+ start)
+ echo -n "Starting Firebird"
+ ## Start daemon with startproc(8). If this fails
+ ## the echo return value is set appropriate.
+
+ # NOTE: startproc return 0, even if service is
+ # already running to match LSB spec.
+ startproc -u $FBRunUser $FBSBIN/fbguard -pidfile $pidfile -forever
+
+ # Remember status and be verbose
+ rc_status -v
+ ;;
+ stop)
+ echo -n "Shutting down Firebird"
+ ## Stop daemon with killproc(8) and if this fails
+ ## set echo the echo return value.
+
+ ## I had to use generic approach here - I can't test on suse. AP.
+ if [ -f $pidfile ]
+ then
+ kill `cat $pidfile`
+ sleep 1
+ fi
+
+
+ # Remember status and be verbose
+ rc_status -v
+ ;;
+ try-restart)
+ ## Stop the service and if this succeeds (i.e. the
+ ## service was running before), start it again.
+ ## Note: try-restart is not (yet) part of LSB (as of 0.7.5)
+ $0 status >/dev/null && $0 restart
+
+ # Remember status and be quiet
+ rc_status
+ ;;
+ restart|force-reload)
+ ## Stop the service and regardless of whether it was
+ ## running or not, start it again.
+ echo "Restarting service Firebird"
+ $0 stop
+ sleep 1
+ $0 start
+
+ # Remember status and be quiet
+ rc_status
+ ;;
+ reload)
+
+ ;;
+ status)
+ echo -n "Checking for Firebird: "
+ ## Check status with checkproc(8), if process is running
+ ## checkproc will return with exit status 0.
+
+ # Status has a slightly different for the status command:
+ # 0 - service running
+ # 1 - service dead, but /var/run/ pid file exists
+ # 2 - service dead, but /var/lock/ lock file exists
+ # 3 - service not running
+
+ # NOTE: checkproc returns LSB compliant status values.
+ checkproc $FBSBIN/fbguard
+ rc_status -v
+ ;;
+
+ *)
+ echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}"
+ exit 1
+ ;;
+esac
+rc_exit
Property changes on: firebird/trunk/builds/install/arch-specific/linux/firebird.init.d.suse.in
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Copied: firebird/trunk/builds/install/arch-specific/linux/firebird.xinetd.in (from rev 58589, firebird/trunk/builds/install/arch-specific/linux/misc/firebird.xinetd.in)
===================================================================
--- firebird/trunk/builds/install/arch-specific/linux/firebird.xinetd.in (rev 0)
+++ firebird/trunk/builds/install/arch-specific/linux/firebird.xinetd.in 2013-09-13 12:27:16 UTC (rev 58617)
@@ -0,0 +1,20 @@
+# default: on
+# description: FirebirdSQL server
+#
+# Be careful when commenting out entries in this file. Active key entry should
+# be the first as some scripts (CSchangeRunUser.sh in particular) use sed
+# scripting to modify it.
+
+service @FB_SERVICE_NAME@
+{
+ disable = no
+ flags = REUSE
+ socket_type = stream
+ wait = no
+ user = root
+# These lines cause problems with Windows XP SP2 clients
+# using default firewall configuration (SF#1065511)
+# log_on_success += USERID
+# log_on_failure += USERID
+ server = @FB_SBINDIR@/firebird
+}
Property changes on: firebird/trunk/builds/install/arch-specific/linux/firebird.xinetd.in
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Copied: firebird/trunk/builds/install/arch-specific/linux/linuxLibrary.sh.in (from rev 58589, firebird/trunk/builds/install/arch-specific/linux/misc/linuxLibrary.sh.in)
===================================================================
--- firebird/trunk/builds/install/arch-specific/linux/linuxLibrary.sh.in (rev 0)
+++ firebird/trunk/builds/install/arch-specific/linux/linuxLibrary.sh.in 2013-09-13 12:27:16 UTC (rev 58617)
@@ -0,0 +1,549 @@
+#!/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
+#
+
+RunUser=firebird
+export RunUser
+RunGroup=firebird
+export RunGroup
+PidDir=/var/run/firebird
+export PidDir
+
+# Additional OS settings
+OS_Has_Specific_Classic_Startup=yes
+
+#------------------------------------------------------------------------
+# Get correct options & misc.
+
+psOptions=-efaww
+export psOptions
+mktOptions=-q
+export mktOptions
+tarOptions=z
+export tarOptions
+tarExt=tar.gz
+export tarExt
+
+#------------------------------------------------------------------------
+# Add new user and group
+
+TryAddGroup() {
+
+ AdditionalParameter=$1
+ testStr=`grep firebird /etc/group`
+
+ if [ -z "$testStr" ]
+ then
+ groupadd $AdditionalParameter firebird
+ fi
+
+}
+
+
+TryAddUser() {
+
+ AdditionalParameter=$1
+ testStr=`grep firebird /etc/passwd`
+
+ if [ -z "$testStr" ]
+ then
+ useradd $AdditionalParameter -d @FB_CONFDIR@ -s /sbin/nologin \
+ -c "Firebird Database Owner" -g firebird firebird
+ fi
+
+}
+
+
+addFirebirdUser() {
+
+ TryAddGroup "-g 84 -r" >/dev/null 2>/dev/null
+ TryAddGroup "-g 84" >/dev/null 2>/dev/null
+ TryAddGroup "-r" >/dev/null 2>/dev/null
+ TryAddGroup " "
+
+ TryAddUser "-u 84 -r -M" >/dev/null 2>/dev/null
+ TryAddUser "-u 84 -M" >/dev/null 2>/dev/null
+ TryAddUser "-r -M" >/dev/null 2>/dev/null
+ TryAddUser "-M" >/dev/null 2>/dev/null
+ TryAddUser "-u 84 -r" >/dev/null 2>/dev/null
+ TryAddUser "-u 84" >/dev/null 2>/dev/null
+ TryAddUser "-r" >/dev/null 2>/dev/null
+ TryAddUser " "
+
+}
+
+
+#------------------------------------------------------------------------
+# Detect Distribution.
+# AP: very beautiful, but unused. Let's keep alive for a while. (2005)
+
+detectDistro() {
+
+ # it's not provided...
+ if [ -z "$linuxDistro" ]
+ then
+ if [ -e /etc/SuSE-release ]
+ then
+ # SuSE
+ linuxDistro="SuSE"
+ elif [ -e /etc/mandrake-release ]
+ then
+ # Mandrake
+ linuxDistro="MDK"
+ elif [ -e /etc/debian_version ]
+ then
+ # Debian
+ linuxDistro="Debian"
+ elif [ -e /etc/gentoo-release ]
+ then
+ # Debian
+ linuxDistro="Gentoo"
+ elif [ -e /etc/rc.d/init.d/functions ]
+ then
+ # very likely Red Hat
+ linuxDistro="RH"
+ elif [ -d /etc/rc.d/init.d ]
+ then
+ # generic Red Hat
+ linuxDistro="G-RH"
+ elif [ -d /etc/init.d ]
+ then
+ # generic SuSE
+ linuxDistro="G-SuSE"
+ fi
+ fi
+}
+
+
+#------------------------------------------------------------------------
+# print location of init script
+
+getInitScriptLocation() {
+ if [ -f /etc/rc.d/init.d/firebird ]
+ then
+ echo -n /etc/rc.d/init.d/firebird
+ elif [ -f /etc/rc.d/rc.firebird ]
+ then
+ echo -n /etc/rc.d/rc.firebird
+ elif [ -f /etc/init.d/firebird ]
+ then
+ echo -n /etc/init.d/firebird
+ fi
+}
+
+
+#------------------------------------------------------------------------
+# register/start/stop server using systemd
+
+SYSTEMCTL=systemctl
+CLASSIC_CTRL=firebird-classic.socket
+SUPER_CTRL=firebird-superserver.service
+SYSTEMD_DIR=/usr/lib/systemd/system
+TMPFILE_CONF=/usr/lib/tmpfiles.d/firebird.conf
+
+systemdPresent() {
+ proc1=`ps -p 1 -o comm=`
+
+ [ "${proc1}" = systemd ] && return 0
+ return 1
+}
+
+systemdError() {
+ echo Fatal systemctl error - exiting
+ exit 1
+}
+
+installSystemdCtrlFiles() {
+ if systemdPresent
+ then
+ cp @FB_MISCDIR@/*.service @FB_MISCDIR@/*.socket ${SYSTEMD_DIR}
+ tempdir=/var/run/firebird
+ mkdir -p ${tempdir}
+ chown firebird:firebird ${tempdir}
+ chmod 0775 ${tempdir}
+ echo "d ${tempdir} 0775 firebird firebird -" >${TMPFILE_CONF}
+ fi
+}
+
+osRemoveStartupFiles() {
+ rm -f ${SYSTEMD_DIR}/firebird-*
+ rm -f ${TMPFILE_CONF}
+}
+
+systemdSrv() {
+ op=${1}
+ ctrl=${2}
+
+ if [ "${op}" = "stop" -o "${op}" = "disable" ]
+ then
+ if [ ! -f ${SYSTEMD_DIR}/${ctrl} ]
+ then
+ return 0
+ fi
+ fi
+
+ if systemdPresent
+ then
+ ${SYSTEMCTL} --quiet ${op} ${ctrl} || systemdError
+ return 0
+ fi
+ return 1
+}
+
+classicSrv() {
+ op=${1}
+
+ systemdSrv ${op} ${CLASSIC_CTRL}
+}
+
+superSrv() {
+ op=${1}
+
+ systemdSrv ${op} ${SUPER_CTRL}
+}
+
+osRegisterClassicServer() {
+ installSystemdCtrlFiles
+ classicSrv enable
+}
+
+osUnregisterClassicServer() {
+ classicSrv disable
+}
+
+osStartClassicServer() {
+ classicSrv start
+}
+
+osStopClassicServer() {
+ classicSrv stop
+}
+
+registerSuperServer() {
+ installSystemdCtrlFiles
+ superSrv enable && return 0
+}
+
+unregisterSuperServer() {
+ superSrv disable && return 0
+}
+
+startSuperServer() {
+ superSrv start && return 0
+}
+
+stopSuperServer() {
+ superSrv stop && return 0
+
+ init_d=`getInitScriptLocation`
+ if [ -x "$init_d" ]
+ then
+ $init_d stop
+ return 0
+ fi
+
+ return 1
+}
+
+
+#------------------------------------------------------------------------
+# stop super server if it is running
+
+stopSuperServerIfRunning() {
+ checkString=`grepProcess "fbserver|fbguard|fb_smp_server|firebird"`
+
+ if [ ! -z "$checkString" ]
+ then
+ i=1
+ while [ $i -le 20 ]
+ do
+ stopSuperServer || return # silently giveup
+ sleep 1
+ checkString=`grepProcess "fbserver|fbguard|fb_smp_server|firebird"`
+ if [ -z "$checkString" ]
+ then
+ return
+ fi
+ i=$((i+1))
+ done
+ fi
+}
+
+#------------------------------------------------------------------------
+# Create new password string - this routine is used only in
+# silent mode of the install script.
+
+createNewPassword() {
+ # openssl generates random data.
+ openssl </dev/null >/dev/null 2>/dev/null
+ if [ $? -eq 0 ]
+ then
+ # We generate 40 random chars, strip any '/''s and get the first 20
+ NewPasswd=`openssl rand -base64 40 | tr -d '/' | cut -c1-20`
+ fi
+
+ # If openssl is missing...
+ if [ -z "$NewPasswd" ]
+ then
+ NewPasswd=`dd if=/dev/urandom bs=10 count=1 2>/dev/null | od -x | head -n 1 | tr -d ' ' | cut -c8-27`
+ fi
+
+ # On some systems even this routines may be missing. So if
+ # the specific one isn't available then keep the original password.
+ if [ -z "$NewPasswd" ]
+ then
+ NewPasswd="masterkey"
+ fi
+
+ echo "$NewPasswd"
+}
+
+#------------------------------------------------------------------------
+# installInitdScript
+# Everbody stores this one in a seperate location, so there is a bit of
+# running around to actually get it for each packager.
+# Update rcX.d with Firebird initd entries
+# initd script for SuSE >= 7.2 is a part of RPM package
+
+installInitdScript() {
+ # systemd case
+ registerSuperServer && return 0 # systemd's service file takes care about PidDir
+
+ srcScript=""
+ initScript=
+
+# This is for RH and MDK specific
+
+ if [ -e /etc/rc.d/init.d/functions ]
+ then
+ srcScript=firebird.init.d.mandrake
+ initScript=/etc/rc.d/init.d/firebird
+
+# SuSE specific
+
+ elif [ -r /etc/SuSE-release ]
+ then
+ srcScript=firebird.init.d.suse
+ initScript=/etc/init.d/firebird
+ rm -f /usr/sbin/rcfirebird
+ ln -s ../../etc/init.d/firebird /usr/sbin/rcfirebird
+
+# Debian specific
+
+ elif [ -r /etc/debian_version ]
+ then
+ srcScript=firebird.init.d.debian
+ initScript=/etc/init.d/firebird
+ rm -f /usr/sbin/rcfirebird
+ ln -s ../../etc/init.d/firebird /usr/sbin/rcfirebird
+
+# Slackware specific
+
+ elif [ -r /etc/slackware-version ]
+ then
+ srcScript=firebird.init.d.slackware
+ initScript=/etc/rc.d/rc.firebird
+ rclocal=/etc/rc.d/rc.local
+ if ! grep -q "$initScript" $rclocal
+ then
+ cat >>$rclocal <<EOF
+if [ -x $initScript ] ; then
+ $initScript start
+fi
+EOF
+ fi
+
+# Gentoo specific
+
+ elif [ -r /etc/gentoo-release ]
+ then
+ srcScript=firebird.init.d.gentoo
+ initScript=/etc/init.d/firebird
+
+# Generic...
+
+ elif [ -d /etc/rc.d/init.d ]
+ then
+ srcScript=firebird.init.d.generic
+ initScript=/etc/rc.d/init.d/firebird
+ fi
+
+
+ if [ "$initScript" ]
+ then
+ # Install the firebird init.d script
+ cp @FB_MISCDIR@/$srcScript $initScript
+ chown root:root $initScript
+ chmod ug=rx,o=r $initScript
+
+
+ # RedHat and Mandrake specific
+ if [ -x /sbin/chkconfig ]
+ then
+ /sbin/chkconfig --add firebird
+
+ # Gentoo specific
+ elif [ -x /sbin/rc-update ]
+ then
+ /sbin/rc-update add firebird default
+
+ # Suse (& Debian ?) specific
+ 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
+ if [ -x /bin/fillup ]
+ then
+ /bin/fillup -q -d = /etc/rc.config @FB_MISCDIR@/rc.config.firebird
+ fi
+ elif [ -d /etc/sysconfig ]
+ 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@"
+ echo "and manually register it in your OS."
+ fi
+
+ # Create directory to store pidfile
+ if [ ! -d $PidDir ]
+ then
+ [ -e $PidDir ] && rm -rf $PidDir
+ mkdir $PidDir
+ fi
+ chown $RunUser:$RunGroup $PidDir
+}
+
+
+#------------------------------------------------------------------------
+# start init.d service
+
+startService() {
+ # systemd case
+ startSuperServer && return 0
+
+ InitFile=`getInitScriptLocation`
+ if [ -f "$InitFile" ]; then
+ "$InitFile" start
+
+ checkString=`grepProcess "firebird"`
+ if [ -z "$checkString" ]
+ then
+ # server didn't start - wait a bit and recheck
+ sleep 2
+ "$InitFile" start
+
+ checkString=`grepProcess "firebird"`
+ if [ -z "$checkString" ]
+ then
+ echo "Looks like standalone server failed to start"
+ echo "Trying to continue anyway..."
+ fi
+ fi
+ fi
+}
+
+
+#------------------------------------------------------------------------
+# If we have right systems remove the service autostart stuff.
+
+removeServiceAutostart() {
+ if standaloneServerInstalled
+ then
+ # systemd case
+ unregisterSuperServer && return 0
+
+ # Unregister using OS command
+ if [ -x /sbin/insserv ]; then
+ /sbin/insserv /etc/init.d/
+ fi
+
+ if [ -x /sbin/chkconfig ]; then
+ /sbin/chkconfig --del firebird
+ fi
+
+ if [ -x /sbin/rc-update ]; then
+ /sbin/rc-update del firebird
+ fi
+
+ # Remove /usr/sbin/rcfirebird symlink
+ if [ -e /usr/sbin/rcfirebird ]
+ then
+ rm -f /usr/sbin/rcfirebird
+ fi
+
+ # Remove initd script
+ rm -f $InitFile
+ fi
+}
+
+
+#------------------------------------------------------------------------
+# Returns TRUE if SA server is installed
+
+standaloneServerInstalled() {
+ if systemdPresent; then
+ ${SYSTEMCTL} --quiet is-enabled ${SUPER_CTRL} && return 0
+ return 1
+ fi
+
+ InitFile=`getInitScriptLocation`
+ if [ -f "$InitFile" ]; then
+ return 0
+ fi
+ return 1
+}
+
+
+#------------------------------------------------------------------------
+# Corrects build-time "libdir" value
+
+CorrectLibDir() {
+ ld=${1}
+ l=/usr/lib
+ l64=/usr/lib64
+
+ if [ "$ld" = "$l64" ]
+ then
+ if [ -d "$l" ]
+ then
+ if [ ! -d "$l64" ]
+ then
+ ld="$l"
+ fi
+ fi
+ fi
+
+ echo "$ld"
+}
Property changes on: firebird/trunk/builds/install/arch-specific/linux/linuxLibrary.sh.in
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Copied: firebird/trunk/builds/install/arch-specific/linux/makeInstallImage.sh.in (from rev 58589, firebird/trunk/builds/install/arch-specific/linux/misc/makeInstallImage.sh.in)
===================================================================
--- firebird/trunk/builds/install/arch-specific/linux/makeInstallImage.sh.in (rev 0)
+++ firebird/trunk/builds/install/arch-specific/linux/makeInstallImage.sh.in 2013-09-13 12:27:16 UTC (rev 58617)
@@ -0,0 +1,328 @@
+#!/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
+#
+
+# Script to copy install files from the build/transport area
+
+
+# This script builds an image of the installed system into
+# the gen/buildroot directory.
+
+if [ "`whoami`" != "root" ]; then
+ echo 'You must be root to build package'
+ exit 1
+fi
+
+# Making an assumption that this program is being run in the gen directory
+BuildRootDir=..
+BuiltFBDir=Release/firebird # Where the just build fb exists.
+TargetDir=buildroot # Where we want to build the install image
+SecurityDatabase=security3.fdb
+
+
+#------------------------------------------------------------------------
+# addLibs
+# Add required libraries in the beginning of script.
+# Place it to target directory.
+
+addLibs() {
+ libSdir=$1
+ libScript=$2
+ libTdir=$3
+ libTarget=$libTdir/$libScript
+
+ rm -f $libTarget
+ touch $libTarget
+ echo "#!/bin/sh" >>$libTarget
+ echo >>$libTarget
+ for i in posixLibrary.sh linuxLibrary.sh
+ do
+ echo "# $i" >>$libTarget
+ cat $libSdir/$i >>$libTarget
+ echo "" >>$libTarget # avoid missing linefeed
+ done
+ cat $libSdir/$libScript >>$libTarget
+}
+
+
+#------------------------------------------------------------------------
+# copyIfExists
+# Copy file if it exists
+#
+
+copyIfExists() {
+ Files=""
+ while [ ${#} -gt 1 ]; do
+ Files="$Files ${1}"
+ shift
+ done
+ NewDir=${1}
+
+ for OldFile in $Files; do
+ if [ -f $OldFile ]; then
+ cp -df $OldFile $NewDir
+ fi
+ done
+}
+
+
+#------------------------------------------------------------------------
+# linkFiles
+# This function creates soft links
+
+linkFiles() {
+ From=$1
+ Files=$2
+ To=$3
+ Check=$4
+
+ if [ "$To" = "$Check" ]; then
+ return 0
+ fi
+
+ for file in $Files; do
+ ln -s $From/$file $To/$file
+ done
+}
+
+
+#------------------------------------------------------------------------
+# makeDirs
+# Make paths, passed as a list in 1st arg
+
+makeDirs() {
+ Dirs=$1
+ for d in $Dirs; do
+ Dir=${TargetDir}${d}
+ mkdir -p $Dir
+ chown root:root $Dir
+ chmod 0755 $Dir
+ done
+}
+
+
+#------------------------------------------------------------------------
+# copyFiles
+# This function copies all the files for a distribution into a
+# directory heirachy mirroring the installation.
+
+copyFiles() {
+# The guts of the tranfer of files and other directories
+
+#cleanup
+ if [ -d $TargetDir ]
+ then
+ rm -fr $TargetDir
+ fi
+
+ #directories
+ makeDirs "@FB_BINDIR@ @FB_SBINDIR@ @FB_CONFDIR@ @FB_LIBDIR@ @FB_INCDIR@/firebird @FB_DOCDIR@/sql.extensions @FB_UDFDIR@ \
+ @FB_SAMPLEDIR@ @FB_SAMPLEDBDIR@ @FB_HELPDIR@ @FB_INTLDIR@ @FB_MISCDIR@ @FB_SECDBDIR@ @FB_MSGDIR@ @FB_LOGDIR@ \
+ @FB_GUARDDIR@ @FB_PLUGDIR@"
+
+ for i in ib_udf metadata security; do
+ makeDirs @FB_MISCDIR@/upgrade/$i
+ done
+
+ makeDirs /usr/include
+
+ #bin
+ cp $BuiltFBDir/bin/gbak ${TargetDir}@FB_BINDIR@/gbak
+ cp $BuiltFBDir/bin/gfix ${TargetDir}@FB_BINDIR@/gfix
+ cp $BuiltFBDir/bin/gpre ${TargetDir}@FB_BINDIR@/gpre
+ cp $BuiltFBDir/bin/gsec ${TargetDir}@FB_BINDIR@/gsec
+ cp $BuiltFBDir/bin/nbackup ${TargetDir}@FB_BINDIR@/nbackup
+ copyIfExists $BuiltFBDir/bin/gsplit ${TargetDir}@FB_BINDIR@
+ cp $BuiltFBDir/bin/gstat ${TargetDir}@FB_BINDIR@/gstat
+ copyIfExists $BuiltFBDir/bin/fbsvcmgr ${TargetDir}@FB_BINDIR@
+ copyIfExists $BuiltFBDir/bin/fbtracemgr ${TargetDir}@FB_BINDIR@
+ cp $BuiltFBDir/bin/isql ${TargetDir}@FB_BINDIR@/isql
+ cp $BuiltFBDir/bin/qli ${TargetDir}@FB_BINDIR@/qli
+
+ chown root:root ${TargetDir}@FB_BINDIR@/*
+ chmod 0755 ${TargetDir}@FB_BINDIR@/*
+
+ #sbin
+ 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@
+
+ addLibs $BuiltFBDir/bin changeServerMode.sh ${TargetDir}@FB_SBINDIR@
+ cp $BuiltFBDir/bin/registerDatabase.sh ${TargetDir}@FB_SBINDIR@
+ cp $BuiltFBDir/bin/fb_config ${TargetDir}@FB_SBINDIR@
+
+ chown root:root ${TargetDir}@FB_SBINDIR@/*
+ chmod 0755 ${TargetDir}@FB_SBINDIR@/*
+ chmod 0700 ${TargetDir}@FB_SBINDIR@/*.sh
+
+ #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`
+ if [ -z "$exampleFiles" ]; then
+ echo "Example files have not been built!"
+ else
+ (cd $BuiltFBDir/examples; tar cf - .) | (cd ${TargetDir}@FB_SAMPLEDIR@; tar xf -)
+ rm -rf ${TargetDir}@FB_SAMPLEDIR@/empbuild
+
+ for i in `find ${TargetDir}@FB_SAMPLEDIR@ -type d -print`
+ do
+ chown root:root $i
+ chmod 0555 $i
+ done
+ for i in `find ${TargetDir}@FB_SAMPLEDIR@ -type f -print`
+ do
+ chown root:root $i
+ chmod 0444 $i
+ done
+
+ makeDirs @FB_SAMPLEDBDIR@
+ cp $BuiltFBDir/examples/empbuild/*.fdb ${TargetDir}@FB_SAMPLEDBDIR@
+
+ chown root:root ${TargetDir}@FB_SAMPLEDBDIR@/*.fdb
+ chmod 0444 ${TargetDir}@FB_SAMPLEDBDIR@/*.fdb
+ fi
+
+ #QLI help
+ copyIfExists $BuiltFBDir/help/help.gbak ${TargetDir}@FB_HELPDIR@
+ cp $BuiltFBDir/help/help.fdb ${TargetDir}@FB_HELPDIR@
+
+ chown root:root ${TargetDir}@FB_HELPDIR@/*.fdb
+ chmod 0444 ${TargetDir}@FB_HELPDIR@/*.fdb
+
+ #message file
+ cp $BuiltFBDir/*.msg ${TargetDir}@FB_MSGDIR@
+
+ chown root:root ${TargetDir}@FB_MSGDIR@/*.msg
+ chmod 0444 ${TargetDir}@FB_MSGDIR@/*.msg
+
+ #secureDB (access rights will be set at install time)
+ cp $BuiltFBDir/$SecurityDatabase ${TargetDir}@FB_SECDBDIR@
+
+ #include (.h files)
+ cp $BuiltFBDir/include/*.h ${TargetDir}@FB_INCDIR@
+ cp $BuildRootDir/src/include/firebird/*.h ${TargetDir}@FB_INCDIR@/firebird
+
+ chown root:root ${TargetDir}@FB_INCDIR@/*.h ${TargetDir}@FB_INCDIR@/firebird/*.h
+ chmod 0444 ${TargetDir}@FB_INCDIR@/*.h ${TargetDir}@FB_INCDIR@/firebird/*.h
+
+ #lib
+ copyIfExists $BuiltFBDir/lib/libfbembed.so* ${TargetDir}@FB_LIBDIR@
+ cp -df $BuiltFBDir/lib/libfbclient.so* ${TargetDir}@FB_LIBDIR@
+ cp -f $BuiltFBDir/lib/libib_util.so ${TargetDir}@FB_LIBDIR@/libib_util.so
+ copyIfExists $BuiltFBDir/lib/libicu*.so* ${TargetDir}@FB_LIBDIR@
+
+ chown root:root ${TargetDir}@FB_LIBDIR@/*.so*
+ chmod 0755 ${TargetDir}@FB_LIBDIR@/*.so*
+
+ #plugins
+ (cd $BuiltFBDir/plugins;tar cf - .) | (cd ${TargetDir}@FB_PLUGDIR@; tar xvf -)
+
+ 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
+ cp $BuiltFBDir/intl/fbintl.conf ${TargetDir}@FB_INTLDIR@
+
+ chown root:root ${TargetDir}@FB_INTLDIR@/fbintl*
+ chmod 0755 ${TargetDir}@FB_INTLDIR@/fbintl
+ chmod 0644 ${TargetDir}@FB_INTLDIR@/fbintl.conf
+
+ #UDF
+ cp $BuiltFBDir/UDF/ib_udf.so ${TargetDir}@FB_UDFDIR@
+ cp $BuiltFBDir/UDF/fbudf.so ${TargetDir}@FB_UDFDIR@
+# Note that the following items copy files from outside the build tree.
+# Copy the sql-declarations into the UDF-directory
+ cp $BuildRootDir/src/extlib/ib_udf.sql ${TargetDir}@FB_UDFDIR@
+ cp $BuildRootDir/src/extlib/ib_udf2.sql ${TargetDir}@FB_UDFDIR@
+ cp $BuildRootDir/src/extlib/fbudf/fbudf.sql ${TargetDir}@FB_UDFDIR@
+
+ chown root:root ${TargetDir}@FB_UDFDIR@/*.so ${TargetDir}@FB_UDFDIR@/*.sql
+ chmod 0755 ${TargetDir}@FB_UDFDIR@/*.so
+ chmod 0644 ${TargetDir}@FB_UDFDIR@/*.sql
+
+ #doc
+ cp $BuildRootDir/doc/*.pdf ${TargetDir}@FB_DOCDIR@
+ cp $BuildRootDir/doc/README.* ${TargetDir}@FB_DOCDIR@
+ cp $BuildRootDir/doc/sql.extensions/README* ${TargetDir}@FB_DOCDIR@/sql.extensions
+ cp $BuildRootDir/doc/WhatsNew ${TargetDir}@FB_CONFDIR@/WhatsNew
+ cp $BuildRootDir/doc/README.user ${TargetDir}@FB_CONFDIR@/README
+
+ chown -R root:root ${TargetDir}@FB_MISCDIR@
+ for i in `find ${TargetDir}@FB_MISCDIR@ -print`; do
+ chown root:root $i
+ if [ -d $i ]; then
+ chmod 0755 $i
+ else
+ chmod 0644 $i
+ fi
+ done
+
+ #misc
+ cp $BuildRootDir/src/misc/intl.sql ${TargetDir}@FB_MISCDIR@
+ cp $BuildRootDir/src/misc/upgrade/v2/ib_udf* ${TargetDir}@FB_MISCDIR@/upgrade/ib_udf
+ cp $BuildRootDir/src/misc/upgrade/v2/security_database* ${TargetDir}@FB_MISCDIR@/upgrade/security
+ cp $BuildRootDir/src/misc/upgrade/v2.1/metadata_charset* ${TargetDir}@FB_MISCDIR@/upgrade/metadata
+ cp $BuildRootDir/gen/install/misc/firebird.xinetd ${TargetDir}@FB_MISCDIR@
+ cp $BuildRootDir/gen/install/misc/firebird.init.d.* ${TargetDir}@FB_MISCDIR@
+ cp $BuildRootDir/gen/install/misc/rc.config.firebird ${TargetDir}@FB_MISCDIR@
+ cp $BuildRootDir/gen/install/misc/firebird-* ${TargetDir}@FB_MISCDIR@
+
+ chown -R root:root ${TargetDir}@FB_MISCDIR@
+ chmod -R go-rwx ${TargetDir}@FB_MISCDIR@
+
+ #conf
+ cp $BuiltFBDir/firebird.conf ${TargetDir}@FB_CONFDIR@
+ cp $BuiltFBDir/databases.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
+
+ #license
+ cp $BuildRootDir/builds/install/misc/*License.txt ${TargetDir}@FB_CONFDIR@
+
+ chown root:root ${TargetDir}@FB_CONFDIR@/*License.txt
+ chmod 0444 ${TargetDir}@FB_CONFDIR@/*License.txt
+
+# link include files to /usr/include
+ linkFiles "@FB_INCDIR@" "firebird iberror.h ibase.h ib_util.h" "${TargetDir}/usr/include" "${TargetDir}@FB_INCDIR@"
+
+}
+
+
+#=== MAIN ====================================================================
+
+copyFiles
Property changes on: firebird/trunk/builds/install/arch-specific/linux/makeInstallImage.sh.in
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Copied: firebird/trunk/builds/install/arch-specific/linux/rc.config.firebird.in (from rev 58589, firebird/trunk/builds/install/arch-specific/linux/misc/rc.config.firebird.in)
===================================================================
--- firebird/trunk/builds/install/arch-specific/linux/rc.config.firebird.in (rev 0)
+++ firebird/trunk/builds/install/arch-specific/linux/rc.config.firebird.in 2013-09-13 12:27:16 UTC (rev 58617)
@@ -0,0 +1,4 @@
+#
+# Start the Firebird RDBMS ?
+#
+START_FIREBIRD="yes"
Property changes on: firebird/trunk/builds/install/arch-specific/linux/rc.config.firebird.in
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: firebird/trunk/builds/install/misc/IDPLicense.txt
===================================================================
--- firebird/trunk/builds/install/misc/IDPLicense.txt 2013-09-13 12:21:51 UTC (rev 58616)
+++ firebird/trunk/builds/install/misc/IDPLicense.txt 2013-09-13 12:27:16 UTC (rev 58617)
Property changes on: firebird/trunk/builds/install/misc/IDPLicense.txt
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: firebird/trunk/builds/install/misc/IPLicense.txt
===================================================================
--- firebird/trunk/builds/install/misc/IPLicense.txt 2013-09-13 12:21:51 UTC (rev 58616)
+++ firebird/trunk/builds/install/misc/IPLicense.txt 2013-09-13 12:27:16 UTC (rev 58617)
Property changes on: firebird/trunk/builds/install/misc/IPLicense.txt
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Deleted: firebird/trunk/builds/install/misc/changeDBAPassword.sh.in
===================================================================
--- firebird/trunk/builds/install/misc/changeDBAPassword.sh.in 2013-09-13 12:21:51 UTC (rev 58616)
+++ firebird/trunk/builds/install/misc/changeDBAPassword.sh.in 2013-09-13 12:27:16 UTC (rev 58617)
@@ -1,7 +0,0 @@
-# This shell script changes both the SYSDBA user
-# Firebird install library should be inserted before this file
-
-echo "This script is deprecated and should be removed in newer FB versions."
-echo "Please use gsec utility directly to change SYSDBA password."
-
-askUserForNewDBAPassword
Deleted: firebird/trunk/builds/install/misc/changeRunUser.sh.in
===================================================================
--- firebird/trunk/builds/install/misc/changeRunUser.sh.in 2013-09-13 12:21:51 UTC (rev 58616)
+++ firebird/trunk/builds/install/misc/changeRunUser.sh.in 2013-09-13 12:27:16 UTC (rev 58617)
@@ -1,60 +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
-#
-
-# A routine to change the user that runs Firebird
-
-RunUser=firebird
-RunGroup=firebird
-
-checkInstallUser
-checkIfServerRunning
-
-
-# Get confirmation
-echo ""
-echo "Change Firebird install for @FB_CONFDIR@ to uid=$RunUser gid=$RunGroup"
-echo "(User or group options can be changed by editing this script)"
-echo ""
-AskQuestion "Press return to continue - or ^C to abort"
-
-
-# Add user and group, if missing
-if [ $RunUser != "root" ]
-then
- addFirebirdUser
-fi
-
-# Update the /etc/inetd.conf or xinetd entry or /etc/init.d/firebird
-echo "Updating /etc file(s)"
-updateInetdServiceEntry
-changeInitRunUser $RunUser
-
-# Update ownership and SUID bits for programs
-echo "Updating permissions"
-fixFilePermissions
-
-# Start server again
-startFirebird
-
-echo "Completed."
Deleted: firebird/trunk/builds/install/misc/changeServerMode.sh.in
===================================================================
--- firebird/trunk/builds/install/misc/changeServerMode.sh.in 2013-09-13 12:21:51 UTC (rev 58616)
+++ firebird/trunk/builds/install/misc/changeServerMode.sh.in 2013-09-13 12:27:16 UTC (rev 58617)
@@ -1,69 +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 Alex Peshkoff
-# for the Firebird Open Source RDBMS project.
-#
-# Copyright (c) 2008 Alex Peshkoff <pes...@ma...>
-# and all contributors signed below.
-#
-# All Rights Reserved.
-# Contributor(s): ______________________________________.
-#
-
-#= Main ====================================================================
-
-cat <<EOF
-Firebird server may run in 2 different modes - super and classic.
-Super server provides better performance, classic - better availability.
-
-*** Warning: runuser will be reset to firebird.
-
-EOF
-
-AskQuestion "Which option would you like to choose: (super|classic) [super] " "super"
-multiAnswer=$Answer
-
-case "$multiAnswer" in
-super)
- ;;
-classic)
- ;;
-*)
- echo "Unknown option $multiAnswer chosen"
- exit 1
- ;;
-esac
-
-echo "Stopping currently running engine..."
-checkIfServerRunning
-removeInetdServiceEntry
-removeServiceAutostart
-
-echo "Starting firebird in $multiAnswer server mode..."
-fbconf="@FB_CONFDIR@/firebird.conf"
-if [ $multiAnswer == classic ]; then
- replaceLineInFile $fbconf "SharedCache = false" "^SharedCache"
- replaceLineInFile $fbconf "SharedDatabase = true" "^SharedDatabase"
-
- updateInetdServiceEntry
- resetInetdServer
-else
- replaceLineInFile $fbconf "SharedCache = true" "^SharedCache"
- replaceLineInFile $fbconf "SharedDatabase = false" "^SharedDatabase"
-
- installInitdScript
- startService
-fi
-
-echo "Done."
Deleted: firebird/trunk/builds/install/misc/createAliasDB.sh.in
===================================================================
--- firebird/trunk/builds/install/misc/createAliasDB.sh.in 2013-09-13 12:21:51 UTC (rev 58616)
+++ firebird/trunk/builds/install/misc/createAliasDB.sh.in 2013-09-13 12:27:16 UTC (rev 58617)
@@ -1,140 +0,0 @@
-#! /bin/sh
-#
-# This library is part of the Firebird project
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Les...
[truncated message content] |