8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 21:23:04 +01:00

Add the Readme.txt, allow package upgrade of aliases.conf and UDF files, so existing installations get upgraded properly.

This commit is contained in:
paulbeach 2008-02-18 12:05:59 +00:00
parent 4dac499e02
commit 03b2501b5b
4 changed files with 60 additions and 39 deletions

View File

@ -4,4 +4,11 @@ All the standard command line executables are installed in /Library/Frameworks/F
Please note that every MacOS X user you want to have access to your database MUST have read/write permissions on the .fdb file.
The release notes can be found in the doc directory Generic documentation for Firebird can be found on the IBPhoenix web site at www.ibphoenix.com, as well as at the Firebird website. There is also a yahoo group named "ib-support" if you have any problems with firebird.
The release notes can be found in the doc directory Generic documentation for Firebird can be found on the IBPhoenix web site at www.ibphoenix.com, as well as at the Firebird website. There is also a yahoo group named "ib-support" if you have any problems with Firebird.
Thanks to:
John Bellardo (Original MacOSX port for Firebird)
David Pugh (Firebird 1.5.3 Port)
Paul Beach & Alex Peshkov (Firebird 1.5.x & 2.x Ports)
Daniel Puckett (Firebird 2.x Launch Daemon for MacOSX 10.5+)
Craig Altenburg (Improvements to the install scripts)

View File

@ -20,23 +20,10 @@ echo $OSVERSION
FB_FW="/Library/Frameworks/Firebird.framework"
FB_RES="$FB_FW/Versions/A/Resources"
INST_RES="$FB_RES/installer_files"
# Install and start sysv semaphores
echo "Install and start sysv semaphores"
if test `uname -r | sed -e 's/\.[0-9]*//g'` -lt 6; then
if [ -e "SysV Semaphores" ]; then
mkdir -p /Library/StartupItems
if [ ! -e "/Library/StartupItems/SysV Semaphores" ]; then
cp -r "$INST_RES/SysV Semaphores" /Library/StartupItems
"/Library/StartupItems/SysV Semaphores/SysV Semaphores" start
fi
fi
fi
if test $OSVERSION -lt 5; then
# Setup our services entry
echo "Setup the service entry pre 10.5"
echo "Setup the service entry 10.4-"
if niutil -list . /services/gds_db 2&>1 /dev/null ; then
echo -n
else
@ -46,15 +33,12 @@ else
fi
fi
# No niutil on 10.5
# Setup our services entry
echo "Setup the service entry 10.5+"
if test $OSVERSION -lt 5; then
# niutil works pre 10.5
# Now for the group. If the firebird group already exists, remember the
# id if we need it to create the firebird user
echo "Create the Firebird group pre 10.5"
echo "Create the Firebird group 10.4-"
if niutil -list . /groups/firebird 2&>1 /dev/null; then
NEW_GID=`niutil -readprop . /groups/firebird gid`
else
@ -64,10 +48,11 @@ else
niutil -createprop . /groups/firebird gid $NEW_GID
niutil -createprop . /groups/firebird users firebird
fi
fi
else
# No niutil on 10.5
# Now create the firebird group
echo "Create the Firebird group 10.5+"
if dscl localhost -read /Local/Default/Groups/firebird 2&>1 /dev/null; then
echo "Group Found"
else
@ -77,17 +62,17 @@ while [ "$?" = "0" ]; do
let "gid =$gid+1"
dscl localhost -search /Local/Default/Groups PrimaryGroupID $gid | grep $gid
done
echo "Create the Firebird group 10.5+"
dscl localhost -create /Local/Default/Groups/firebird
dscl localhost -create /Local/Default/Groups/firebird Password "*"
dscl localhost -create /Local/Default/Groups/firebird PrimaryGroupID $gid
dscl localhost -create /Local/Default/Groups/firebird RecordName firebird
fi
fi
if test $OSVERSION -lt 5; then
# niutil works pre 10.5
# Now create the firebird user
echo "Create the Firebird user pre 10.5"
echo "Create the Firebird user 10.4-"
if niutil -list . /users/firebird 2&>1 /dev/null; then
echo -n
else
@ -102,10 +87,11 @@ else
niutil -createprop . /users/firebird gid $NEW_GID
niutil -createprop . /users/firebird realname "Firebird Database"
fi
fi
else
# no niutil on 10.5 use dscl
# Now create the firebird user
echo "Create the Firebird user 10.5+"
if dscl localhost -read /Local/Default/Users/firebird 2&>1 /dev/null; then
echo "User Found"
else
@ -125,6 +111,7 @@ echo "create the firebird user 10.5+"
dscl localhost -create /Local/Default/Users/firebird UniqueID $ugid
dscl localhost -create /Local/Default/Users/firebird RealName "Firebird Database"
fi
fi
# Shutdown any existing servers
echo "Shutdown any existing servers"
@ -153,16 +140,6 @@ else
chmod a+s "$FB_FW/Resources/bin/fb_inet_server"
fi
# Install the startup item
echo "Re-install the SuperServer startup item - if it already exists"
if [ -f "$FB_FW/Versions/A/Resources/.SuperServer" ]; then
if [ -e "$INST_RES/Firebird.startup" ]; then
rm -rf /Library/StartupItems/Firebird
cp -r "$INST_RES/Firebird" /Library/StartupItems/Firebird
fi
else
rm -rf /Library/StartupItems/Firebird
fi
# Remove all traces of Classic first
echo "Remove all traces of Classic first"
@ -189,7 +166,10 @@ fi
# Install ourselves in the correct place - SuperServer
echo "Install StartupItem in the correct place SuperServer"
if [ -f "$FB_FW/Versions/A/Resources/.SuperServer" ]; then
cp -r $1/Contents/Resources/StartupItem /Library/StartupItems/Firebird
rm -fr /Library/StartupItems/Firebird
cp -r "$1/Contents/Resources/StartupItem" /Library/StartupItems/Firebird
else
rm -fr /Library/StartupItems/Firebird
fi
# Install ourselves in the correct place - Classic
@ -261,6 +241,21 @@ if test -f /tmp/fb-security-database-update2.fdb; then
rm -f /tmp/fb-security-database-update2.fdb
fi
#Install the saved aliases.conf, if any
echo "Install the saved aliases.conf file"
if test -f /tmp/fb-aliases.conf; then
mv -f /tmp/fb-aliases.conf "$FB_RES/English.lproj/var/aliases.conf"
rm -f /temp/fb-aliases.conf
fi
#Install the saved UDF libraries, if any
echo "Install the saved UDF libraries"
for file in /tmp/*UDF_save_*; do
new=`echo $file | sed -e 's/UDF_save_//g'`
return=`basename $new`
cp $file "$FB_RES/English.lproj/var/UDF/$return"
rm $file
done
# Tell inetd/xinetd to reload their configuration files.
echo "Tell inetd/xinetd to reload configuration files"
if [ "$HUPNEEDED" = 'y' ]

View File

@ -12,23 +12,38 @@ FB_FW="/Library/Frameworks/Firebird.framework"
if test -f "$FB_FW/Versions/A/Resources/English.lproj/var/isc4.gdb"; then
mv -f "$FB_FW/Versions/A/Resources/English.lproj/var/isc4.gdb" /tmp/fb-security-database-update.fdb
fi
if test -f "$FB_FW/Versions/A/Resources/English.lproj/var/isc4.fdb"; then
mv -f "$FB_FW/Versions/A/Resources/English.lproj/var/isc4.fdb" /tmp/fb-security-database-update.fdb
fi
if test -f "$FB_FW/Versions/A/Resources/English.lproj/var/security.fdb"; then
mv -f "$FB_FW/Versions/A/Resources/English.lproj/var/security.fdb" /tmp/fb-security-database-update.fdb
fi
if test -f "$FB_FW/Versions/A/Resources/English.lproj/var/security2.fdb"; then
mv -f "$FB_FW/Versions/A/Resources/English.lproj/var/security2.fdb" /tmp/fb-security-database-update2.fdb
fi
if test -f "$FB_FW/Versions/A/Resources/English.lproj/var/aliases.conf"; then
mv -f "$FB_FW/Versions/A/Resources/English.lproj/var/aliases.conf" /tmp/fb-aliases.conf
fi
for i in /Library/Frameworks/Firebird.framework/Resources/English.lproj/var/UDF/*;do
x=`basename $i`
if test $x = "fbudf.dylib"; then
echo -n
elif test $x = "fbudf.sql"; then
echo -n
elif test $x = "ib_udf.dylib"; then
echo -n
elif test $x = "ib_udf.sql"; then
echo -n
else
cp $i /tmp/UDF_save_$x
fi
done
if [ -f /Library/StartupItems/Firebird/Firebird ]; then
/Library/StartupItems/Firebird/Firebird stop
rm -fr /Library/StartupItems/Firebird
fi
if [ -f /Library/LaunchDaemons/org.firebird.gds.plist ]; then
launchctl unload /Library/LaunchDaemons/org.firebird/gds.plist
rm /Library/LaunchDaemons/org.firebird.gds.plist
fi
rm -rf "$FB_FW/Firebird.framework"
rm -rf /Library/StartupItems/Firebird
rm /Library/LaunchDaemons/org.firebird.gds.plist
exit 0

View File

@ -93,6 +93,8 @@ darwin_finish_cs_framework:
$(FB_FW)/Resources/Info.plist
cp ../builds/install/arch-specific/darwin/launchd.org.firebird.gds.plist \
$(FB_FW)/Resources/org.firebird.gds.plist
cp ../builds/install/arch-specific/darwin/Readme.txt \
$(FB_FW)/Resources/Readme.txt
cp ../gen/firebird/misc/firebird.conf $(FB_FW)/Resources/English.lproj/var
darwin_finish_ss_framework: FB_FW = ../gen/firebird/frameworks/FirebirdSS.framework
@ -150,6 +152,8 @@ darwin_finish_ss_framework:
cp ../src/extlib/fbudf/fbudf.sql $(FB_FW)/Resources/English.lproj/var/UDF
cp ../builds/install/arch-specific/darwin/FrameworkInfo.plist \
$(FB_FW)/Resources/Info.plist
cp ../builds/install/arch-specific/darwin/Readme.txt \
$(FB_FW)/Resources/Readme.txt
cp ../gen/firebird/misc/firebird.conf $(FB_FW)/Resources/English.lproj/var
darwin_postbuild_target: package