diff options
author | Treeve Jelbert | 2010-01-30 18:27:54 +0100 |
---|---|---|
committer | Treeve Jelbert | 2010-01-30 18:27:54 +0100 |
commit | 584862773f650801725b0e3bb2d05ab71d801ff3 (patch) | |
tree | 78ad2da1a37aee0761834cf95f23795dc864c3d1 | |
parent | 26c3af30b4ee859378b01f99f3c6f7e6984d474d (diff) |
database/firebird25 - new spell
-rw-r--r-- | ChangeLog | 3 | ||||
-rwxr-xr-x | database/firebird25/BUILD | 51 | ||||
-rwxr-xr-x | database/firebird25/CONFIGURE | 7 | ||||
-rwxr-xr-x | database/firebird25/CONFLICTS | 1 | ||||
-rwxr-xr-x | database/firebird25/DEPENDS | 22 | ||||
-rwxr-xr-x | database/firebird25/DETAILS | 20 | ||||
-rwxr-xr-x | database/firebird25/FINAL | 27 | ||||
-rw-r--r-- | database/firebird25/HISTORY | 4 | ||||
-rwxr-xr-x | database/firebird25/INSTALL | 19 | ||||
-rwxr-xr-x | database/firebird25/PRE_BUILD | 21 | ||||
-rwxr-xr-x | database/firebird25/PROVIDES | 2 | ||||
-rwxr-xr-x | database/firebird25/UP_TRIGGERS | 16 | ||||
-rw-r--r-- | database/firebird25/configs | 3 | ||||
-rw-r--r-- | database/firebird25/excluded | 1 | ||||
-rw-r--r-- | database/firebird25/fb25.patch.bz2 | bin | 0 -> 3933 bytes | |||
-rwxr-xr-x | database/firebird25/init.d/firebird2 | 45 | ||||
-rw-r--r-- | database/firebird25/volatiles | 3 |
17 files changed, 245 insertions, 0 deletions
@@ -1,3 +1,6 @@ +2010-01-30 Treeve Jelbert <treeve@sourcemage.org> + * database/firebird25: added, separate versions of firebird + 2010-01-29 Finn Haedicke <finn@sourcemage.org> * python-pypi/gtg: new spell, a gtk based todo organizer diff --git a/database/firebird25/BUILD b/database/firebird25/BUILD new file mode 100755 index 0000000000..4e9e1dccce --- /dev/null +++ b/database/firebird25/BUILD @@ -0,0 +1,51 @@ + local FF DB LL && + persistent_add FB_PREFIX && + FB_PREFIX=${INSTALL_ROOT}/opt/firebird && + OPTS="${OPTS} ${FB_SS}" && + make_single && +# prepare optional language support + for LL in $FB_GPRE; do + if [[ $LL != none ]]; then + OPTS="${OPTS} --with-gpre-${LL}" + fi + done && + OPTS="${OPTS} ${FB_STAT}" && + LDFLAGS="$LDFLAGS -lpthread" && + ./configure \ + --prefix=$FB_PREFIX \ + $OPTS && +if [[ $FB_CLIENT == n ]]; then + make && + cd $SOURCE_DIRECTORY/gen/firebird && +# fix ownership and permissions + chown -R root:root ./ && + chmod -R uga-w ./ && +# Everyone may execute clients + chmod 0555 bin/* && +# Shell scripts changing security attributes are for root only + chmod 0500 bin/*.sh && +# Security database + FF=security2.fdb && + if [[ -e $FB_PREFIX/$FF ]];then + mv $FF $FF.new + else +# Nobody except firebird permitted to even read this file + chown firebird:firebird $FF && + chmod 0600 $FF + fi && +# all database should be owned by firebird +# cd $SOURCE_DIRECTORY/gen/ && + for DB in `ls examples/empbuild/*.fdb` + do + chmod ug+w $DB && + chown firebird:firebird $DB + done +else + cd gen && + make includes && + make -f Makefile.boot.gpre && + make -f Makefile.libfbclient && + make -f Makefile.client.isql +# probably need to build gbak and then restore messages and help fdb +# make -f Makefile.client.gbak +fi diff --git a/database/firebird25/CONFIGURE b/database/firebird25/CONFIGURE new file mode 100755 index 0000000000..3afa86429a --- /dev/null +++ b/database/firebird25/CONFIGURE @@ -0,0 +1,7 @@ +#source $GRIMOIRE/FUNCTIONS && +config_query FB_CLIENT "Build only client library?" n +if [ $FB_CLIENT == n ]; then + config_query_multi FB_GPRE "which additional GPRE languages to support?" \ + none ada cobol pascal fortran && + config_query_option FB_STAT "build static libraries?" n "--enable-static" "--disable-static" +fi diff --git a/database/firebird25/CONFLICTS b/database/firebird25/CONFLICTS new file mode 100755 index 0000000000..df70b786ac --- /dev/null +++ b/database/firebird25/CONFLICTS @@ -0,0 +1 @@ +conflicts firebird diff --git a/database/firebird25/DEPENDS b/database/firebird25/DEPENDS new file mode 100755 index 0000000000..12f80743b1 --- /dev/null +++ b/database/firebird25/DEPENDS @@ -0,0 +1,22 @@ +depends g++ && +depends libtool && +depends openssl && +depends libmcrypt && +depends ncurses && +case $FB_VER in + 2.0) depends bison && + depends icu && + optional_depends libedit \ + "--with-editline" \ + "--without-editline" \ + "for fancy line editing" + ;; + 2.1 | 2.5) + depends btyacc && + depends icu '--with-system-icu' && + optional_depends libedit \ + "-with-system-editline" \ + "--without-editline" \ + "for fancy line editing" + ;; +esac diff --git a/database/firebird25/DETAILS b/database/firebird25/DETAILS new file mode 100755 index 0000000000..8f32056590 --- /dev/null +++ b/database/firebird25/DETAILS @@ -0,0 +1,20 @@ + SPELL=firebird25 + SPELLX=Firebird + VERSION=2.5.0.25784-ReleaseCandidate1 + SOURCE_HASH=sha512:7227b39cd73477dc50123999f819b52cdaaf19a37bc583bae77b4ae68743a7fff51b67eebab28e4faa8ba15af47e9560b94d5284fac639ac74e882879f652fd0 +SOURCE_DIRECTORY=$BUILD_DIRECTORY/${SPELLX}-${VERSION/-0\.RC?/} + SOURCE=${SPELLX}-$VERSION.tar.bz2 + SOURCE_URL[0]=http://firebirdsql.org/download/prerelease/source/$SOURCE + SOURCE_URL[1]=$SOURCEFORGE_URL/firebird/$SOURCE + WEB_SITE=http://www.firebirdsql.org + LICENSE=IDPL + ENTERED=20031111 + GATHER_DOCS=off + KEYWORDS="database engine" + SHORT="a very powerful relational dbms" +cat << EOF +Firebird is a relational database offering many ANSI SQL-92 features +that runs on Linux, Windows, and a variety of Unix platforms. +Firebird offers excellent concurrency, high performance, and powerful +language support for stored procedures and triggers. +EOF diff --git a/database/firebird25/FINAL b/database/firebird25/FINAL new file mode 100755 index 0000000000..b9ad338c02 --- /dev/null +++ b/database/firebird25/FINAL @@ -0,0 +1,27 @@ +if [[ $FB_CLIENT == n ]]; then + +# we do this here, so that things are not tracked, as these files are +# constantly modified in normal use +local FF FileName LCK LOG && + +cd $FB_PREFIX && +# create lock files + LCK=$INSTALL_ROOT/var/lock/firebird && + mkdir -p $LCK && + for FF in isc_init1 isc_lock1 isc_event1 isc_guard1 + do + FileName=$LCK/$FF.`hostname` && + touch $FileName && + chown firebird:firebird $FileName && + chmod u+w $FileName && + ln -sf $FileName ./ + done && + +# log file + mkdir -p $INSTALL_ROOT/var/log/ && + LOG=$INSTALL_ROOT/var/log/firebird.log && + touch $LOG && + chown firebird:firebird $LOG && + chmod o=,ug=rw $LOG && + ln -sf $LOG ./ +fi diff --git a/database/firebird25/HISTORY b/database/firebird25/HISTORY new file mode 100644 index 0000000000..44bdf16c1a --- /dev/null +++ b/database/firebird25/HISTORY @@ -0,0 +1,4 @@ +2010-01-30 Treeve Jelbert <treeve@sourcemage.org> + * PROVIDES: add FIREBIRD + create separate firebird25 spell + diff --git a/database/firebird25/INSTALL b/database/firebird25/INSTALL new file mode 100755 index 0000000000..d3947ddcd4 --- /dev/null +++ b/database/firebird25/INSTALL @@ -0,0 +1,19 @@ +local FF FBDEST && +mkdir -p ${FB_PREFIX}/intl && +if [[ $FB_CLIENT == n ]]; then +# prepare an install image + cd $SOURCE_DIRECTORY/gen && + ./install/makeInstallImage.sh && +# config files + cd $SOURCE_DIRECTORY/gen/install/misc && + install_config_file firebird.conf $FB_PREFIX/firebird.conf && + install_config_file aliases.conf $FB_PREFIX/aliases.conf && + install_config_file fbintl.conf $FB_PREFIX/intl/fbintl.conf +else + cd $SOURCE_DIRECTORY/gen/firebird && + for FF in bin include lib;do + FBDEST=$FB_PREFIX/$FF && + mkdir -p $FBDEST && + cp -ar $FF/* $FBDEST/$FF + done +fi diff --git a/database/firebird25/PRE_BUILD b/database/firebird25/PRE_BUILD new file mode 100755 index 0000000000..9ac431ad10 --- /dev/null +++ b/database/firebird25/PRE_BUILD @@ -0,0 +1,21 @@ + check for running server + (ps -u firebird | grep fb*) && + message ${PROBLEM_COLOR}please stop the firebird server and try again\ + ${DEFAULT_COLOR} && + return 1 + + create_account firebird && + default_pre_build && + cd $SOURCE_DIRECTORY && + +# at present the build only works for everything in one directory +# tree /opt/firebird + +# remove supplied ICU & editline packages + rm -rf extern/{SfIO,btyacc,editline,icu} && +# fix for gcc4 and smgl issues +#apply patches + bzcat ${SPELL_DIRECTORY}/fb25.patch.bz2 | patch -p1 && +# regenerate files +libtoolize -f -i && +autoreconf diff --git a/database/firebird25/PROVIDES b/database/firebird25/PROVIDES new file mode 100755 index 0000000000..64d87278dd --- /dev/null +++ b/database/firebird25/PROVIDES @@ -0,0 +1,2 @@ +SQL +FIREBIRD diff --git a/database/firebird25/UP_TRIGGERS b/database/firebird25/UP_TRIGGERS new file mode 100755 index 0000000000..e9e98d5895 --- /dev/null +++ b/database/firebird25/UP_TRIGGERS @@ -0,0 +1,16 @@ +# up_trigger everything on major version updates + +local OLD_SPELL_VERSION="" +if spell_ok $SPELL; then + OLD_SPELL_VERSION="$(installed_version $SPELL)" + if test "${VERSION:0:1}" != "${OLD_SPELL_VERSION:0:1}"; then + message "This is a possibly incompatible update of firebird..." + message "Figuring out what spells need to be recast, this may take a while." + for each in $(show_up_depends $SPELL 1); do + if gaze install $each | xargs readelf -d 2> /dev/null | + grep -q "NEEDED.*libfbclient.so.${OLD_SPELL_VERSION:0:1}"; then + up_trigger $each cast_self + fi + done + fi +fi diff --git a/database/firebird25/configs b/database/firebird25/configs new file mode 100644 index 0000000000..dffac136bc --- /dev/null +++ b/database/firebird25/configs @@ -0,0 +1,3 @@ +^/opt/firebird/aliases.conf$ +^/opt/firebird/firebird.conf$ +^/opt/firebird/intl/fbintl.conf$ diff --git a/database/firebird25/excluded b/database/firebird25/excluded new file mode 100644 index 0000000000..b6c039bb43 --- /dev/null +++ b/database/firebird25/excluded @@ -0,0 +1 @@ +^/opt/firebird/.*fdb$ diff --git a/database/firebird25/fb25.patch.bz2 b/database/firebird25/fb25.patch.bz2 Binary files differnew file mode 100644 index 0000000000..db885b42bc --- /dev/null +++ b/database/firebird25/fb25.patch.bz2 diff --git a/database/firebird25/init.d/firebird2 b/database/firebird25/init.d/firebird2 new file mode 100755 index 0000000000..e68436efc5 --- /dev/null +++ b/database/firebird25/init.d/firebird2 @@ -0,0 +1,45 @@ +#!/bin/bash + +# description: Start/Stop firebird2 database server +# +# This file belongs in /etc/init.d where it will be run +# on system startup and shutdown to start the background +# Firebird2 database Super server daemon + +FB_DIR=/opt/firebird/bin +FB=fbserver +if [[ ! -f $FB_DIR/$FB ]];then +# 2.5 has a combined classic-super server using libfbembed.so + FB=fb_smp_server +fi +# as of rc2, preferred method of stopping is to kill the process + +source /etc/init.d/smgl_functions + +PROGRAM=/bin/false +RUNLEVEL=3 +NEEDS="+network +remote_fs" + +case $1 in + start) + echo "Starting Firebird Super Server" + su -s "/bin/sh" -m -c "$FB_DIR/$FB" -l "firebird" & + evaluate_retval + ;; + stop) + echo "Stopping Firebird server" + pkill $FB + evaluate_retval + ;; + + restart) + echo "Restarting Firebird server" + $0 stop + $0 start + evaluate_retval + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 + ;; +esac diff --git a/database/firebird25/volatiles b/database/firebird25/volatiles new file mode 100644 index 0000000000..dffac136bc --- /dev/null +++ b/database/firebird25/volatiles @@ -0,0 +1,3 @@ +^/opt/firebird/aliases.conf$ +^/opt/firebird/firebird.conf$ +^/opt/firebird/intl/fbintl.conf$ |