diff options
author | Jose Alonso Cardenas Marquez <acm@FreeBSD.org> | 2010-12-20 08:48:54 +0000 |
---|---|---|
committer | Jose Alonso Cardenas Marquez <acm@FreeBSD.org> | 2010-12-20 08:48:54 +0000 |
commit | 889c99903996bea265f44e95327fbd9f3ea2d3c2 (patch) | |
tree | 37f6c971c2214cd62fe896b7b0f2d87a6bb7304c /databases/firebird25-server/files | |
parent | 71996850bbc46b90097f091b5c2bfdb8d13d8007 (diff) |
Notes
Diffstat (limited to 'databases/firebird25-server/files')
6 files changed, 226 insertions, 0 deletions
diff --git a/databases/firebird25-server/files/firebird.in b/databases/firebird25-server/files/firebird.in new file mode 100644 index 000000000000..ef97db4252d3 --- /dev/null +++ b/databases/firebird25-server/files/firebird.in @@ -0,0 +1,62 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: firebird +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add the following line to /etc/rc.conf to enable Firebird Database: +# +# firebird_enable: Set it to "YES" to enable firebird. +# Default is "NO". +# firebird_flags: Set options to run fbguard. +# Default is "-daemon". +# firebird_pidfile: Set full path to pid file. +# Default is "/var/run/firebird.pid". +# + +. /etc/rc.subr + +name=firebird +rcvar=`set_rcvar` + +load_rc_config $name + +firebird_enable=${firebird_enable:-"NO"} +firebird_flags=${firebird_flags:-"-daemon"} +firebird_pidfile=${firebird_pidfile:-"/var/run/${name}.pid"} +firebird_user=firebird + +command_args="${firebird_flags}" +command=%%PREFIX%%/bin/fbguard +pidfile=${firebird_pidfile} +start_precmd="start_precmd" +start_postcmd="start_postcmd" +stop_postcmd=stop_postcmd +reload_postcmd=reload_postcmd + +start_precmd() +{ + touch ${firebird_pidfile} + chown "${firebird_user}:wheel" ${firebird_pidfile} || + err 1 "Cannot chown ${firebird_pidfile}" +} + +start_postcmd() +{ + pgrep -u ${firebird_user} fbguard > ${firebird_pidfile} +} + +stop_postcmd() +{ + rm -f ${pidfile} +} + +reload_postcmd() +{ + rm -f ${pidfile} + run_rc_command start +} + +run_rc_command "$1" diff --git a/databases/firebird25-server/files/patch-builds-install-misc_firebird.conf.in b/databases/firebird25-server/files/patch-builds-install-misc_firebird.conf.in new file mode 100644 index 000000000000..267509f7ec70 --- /dev/null +++ b/databases/firebird25-server/files/patch-builds-install-misc_firebird.conf.in @@ -0,0 +1,20 @@ +--- builds/install/misc/firebird.conf.in Tue Aug 15 22:38:52 2006 ++++ builds/install/misc/firebird.conf.in Tue Aug 15 22:39:24 2006 +@@ -60,7 +60,7 @@ + # + # Type: string + # +-#RootDirectory = ++#RootDirectory = /var/db/firebird + + + # ---------------------------- +@@ -125,7 +125,7 @@ + # + # Type: string (special format) + # +-#UdfAccess = Restrict UDF ++UdfAccess = Restrict %%PREFIX%%/libexec/firebird/udf + + + # ---------------------------- diff --git a/databases/firebird25-server/files/patch-builds-posix_make.defaults b/databases/firebird25-server/files/patch-builds-posix_make.defaults new file mode 100644 index 000000000000..3ff86f6392c1 --- /dev/null +++ b/databases/firebird25-server/files/patch-builds-posix_make.defaults @@ -0,0 +1,31 @@ +--- builds/posix/make.defaults 2010-09-08 03:41:23.000000000 -0500 ++++ builds/posix/make.defaults 2010-12-18 20:25:29.000000000 -0500 +@@ -127,7 +127,7 @@ + CHMOD= chmod + CHMOD_6= chmod 666 + CHMOD_7= chmod 777 +-CHMOD_S7= chmod 06777 ++CHMOD_S7= chmod 04555 + MV= mv -f + TOUCH= touch + CP= cp +@@ -153,7 +153,7 @@ + STATICEXE_LINK:= @CXX@ $(GLOB_OPTIONS) + + LINK_LIBS = @LIBS@ +-ICU_LIBS = -licuuc -licudata -licui18n ++ICU_LIBS = `icu-config --ldflags-libsonly` `icu-config --ldflags-searchpath` + STATICLINK_LIBS = @LIBS@ + SO_LINK_LIBS = @LIBS@ + +@@ -230,10 +230,6 @@ + endif + endif + +-LIBICU_SO = $(LIB)/$(LIB_PREFIX)icuuc*.$(SHRLIB_FOREIGN_EXT) \ +- $(LIB)/$(LIB_PREFIX)icudata*.$(SHRLIB_FOREIGN_EXT) \ +- $(LIB)/$(LIB_PREFIX)icui18n*.$(SHRLIB_FOREIGN_EXT) +- + # Shared library name for usage inside of the UDF + IbUtilLibraryName = $(LIB_PREFIX)ib_util.$(SHRLIB_EXT) + LIBIBUTIL_SO = $(LIB)/$(IbUtilLibraryName) diff --git a/databases/firebird25-server/files/patch-src-jrd_isc_sync.cpp b/databases/firebird25-server/files/patch-src-jrd_isc_sync.cpp new file mode 100644 index 000000000000..7825b20d1823 --- /dev/null +++ b/databases/firebird25-server/files/patch-src-jrd_isc_sync.cpp @@ -0,0 +1,11 @@ +--- src/jrd/isc_sync.cpp 2010-12-18 21:08:26.000000000 -0500 ++++ src/jrd/isc_sync.cpp 2010-12-18 21:09:05.000000000 -0500 +@@ -320,7 +320,7 @@ + public: + const static int N_FILES = 8; + const static int N_SETS = 256; +-#ifdef DEV_BUILD ++#if defined(DEV_BUILD) || defined(FREEBSD) + const static int SEM_PER_SET = 4; // force multiple sets allocation + #else + const static int SEM_PER_SET = 31; // hard limit for some old systems, might set to 32 diff --git a/databases/firebird25-server/files/pkg-install.in b/databases/firebird25-server/files/pkg-install.in new file mode 100644 index 000000000000..c74821080906 --- /dev/null +++ b/databases/firebird25-server/files/pkg-install.in @@ -0,0 +1,71 @@ +#!/bin/sh + +# $FreeBSD: /tmp/pcvs/ports/databases/firebird25-server/files/pkg-install.in,v 1.1 2010-12-20 08:48:54 acm Exp $ + +PATH=/bin:/usr/bin:/usr/sbin + +case $2 in +PRE-INSTALL) + +if [ `id -u` -ne 0 ]; then + echo; echo "You must be root to run this step!"; echo; echo + exit 1 +fi + +nofbuid=0 +fbUID=`id -u firebird 2>/dev/null` +if [ $? -ne 0 ]; then + fbUID=90 + while [ ! -z `id -un $fbUID 2>/dev/null` ] + do + fbUID=$(($fbUID+1)) + done + nofbuid=1 +fi + +fbGID=`pw groupshow firebird 2>/dev/null` +if [ $? -ne 0 ]; then + fbGID=90 + while [ ! -z `id -gn $fbGID 2>/dev/null` ] + do + fbGID=$(($fbGID+1)) + done + echo "firebird:*:$fbGID:" >> /etc/group +else + fbGID=`echo $fbGID | awk -F: '{print $3}'` +fi + +echo "firebird user using uid $fbUID" +echo "firebird user using gid $fbGID" + +if which -s pw; then + if [ $nofbuid -ne 0 ]; then + pw useradd firebird -u $fbUID -g $fbGID -h - -s /usr/sbin/nologin \ + -d /nonexistent -c "Firebird Database Administrator" + fi +else + echo -n "unable to create user firebird - please create it manually," + echo " before reinstalling this package." + exit 1 +fi +;; + +POST-INSTALL) +cd /var/db/firebird + +# Lock files + +for i in isc_init1 isc_lock1 isc_event1 +do + FileName=$i.`hostname` + touch $FileName + chmod uga=rw $FileName + chown firebird:firebird $FileName +done + +touch firebird.log +chown firebird:firebird firebird.log security2.fdb + +;; + +esac diff --git a/databases/firebird25-server/files/pkg-message.in b/databases/firebird25-server/files/pkg-message.in new file mode 100644 index 000000000000..0e743ba376cc --- /dev/null +++ b/databases/firebird25-server/files/pkg-message.in @@ -0,0 +1,31 @@ +############################################################################### + +Firebird was installed. + +1) Before start the server ensure that the following line exists in /etc/services: + +gds_db 3050/tcp #InterBase Database Remote Protocol + +2) If you use inetd then add the following line to /etc/inetd.conf + +gds_db stream tcp nowait firebird %%PREFIX%%/bin/fb_inet_server fb_inet_server + +And finally restart inetd. + +3) If you want to use SuperClassic Server then you can add firebird_enable="YES" +to /etc/rc.conf file. + +4) It is STRONGLY recommended that you change the SYSDBA +password with: + + # gsec -user SYSDBA -pass masterkey + GSEC> modify SYSDBA -pw newpassword + GSEC> quit + +before doing anything serious with Firebird. + +5) See documentation in %%DOCSDIR%%/ for more information. + +6) Enjoy it ;) + +################################################################################ |