- Add Super Server support

- Add superclassic and superserver modes to firebird rc script
- Remove LATEST_LINK [1]
- Other modifications for avoid pkg name collisions [1]

Suggested by:	bapt [1]
This commit is contained in:
Jose Alonso Cardenas Marquez 2013-10-03 06:55:36 +00:00
parent 1a75354b48
commit 35e9b8ca05
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=329146
5 changed files with 69 additions and 23 deletions

View file

@ -3,10 +3,10 @@
PORTNAME= firebird
PORTVERSION= 2.5.2
PORTREVISION?= 2
PORTREVISION?= 3
CATEGORIES?= databases
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTVERSION:S/.0//}-Release/
PKGNAMESUFFIX?= -server
PKGNAMESUFFIX?= ${PORTVERSION:R:S/.//}-server
DISTNAME= ${PORTNAME:S/f/F/}-${PORTVERSION}.26540-0
DIST_SUBDIR= ${PORTNAME}
@ -15,8 +15,6 @@ COMMENT?= Firebird-2 relational database (server)
LIB_DEPENDS= icuuc:${PORTSDIR}/devel/icu
LATEST_LINK= ${PORTNAME}25${PKGNAMESUFFIX}
USES= bison
USE_BZIP2= yes
USE_GMAKE= yes
@ -72,18 +70,20 @@ IGNORE= your system does not support sysvipc
# Server part stuff
LIB_DEPENDS+= fbembed.2:${PORTSDIR}/databases/firebird25-client
ALL_TARGET= firebird_embedded
CONFIGURE_ARGS+=--enable-superserver
ALL_TARGET= firebird_embedded firebird_server
USE_RC_SUBR= firebird
SUB_FILES= pkg-message
UTIL_SBIN= fb_inet_server fb_lock_print fb_smp_server
UTIL_SBIN= fb_inet_server fb_lock_print fb_smp_server fbserver
UTIL_BIN= fbguard fbsplit fbstat fbsvcmgr fbtracemgr gbak gdef gfix gsec \
nbackup
UDF_SO= ib_udf.so fbudf.so
UDF_SQL= src/extlib/ib_udf2.sql src/extlib/fbudf/fbudf.sql
PKGINSTALL?= ${PKGDIR}/pkg-install${PKGNAMESUFFIX}
PKGINSTALL?= ${PKGDIR}/pkg-install-server
.else
# Client part stuff
ALL_TARGET= firebird_basic libfbembed libfbclient embed_isql embed_gpre \

View file

@ -8,10 +8,13 @@
#
# 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_mode: Set it to "superclassic" or "superserver" to enable firebird.
# Default is "superclassic".
# firebird_flags: Set options to run fbserver or fb_smp_server.
# Default is "-el /var/db/firebird".
# firebird_pidfile: Set full path to pid file.
# Default is "/var/run/firebird.pid".
#
@ -24,17 +27,18 @@ rcvar=firebird_enable
load_rc_config $name
firebird_enable=${firebird_enable:-"NO"}
firebird_flags=${firebird_flags:-"-daemon -pidname ${name}.pid"}
firebird_mode=${firebird_mode:-"superclassic"}
firebird_flags=${firebird_flags:-"-el /var/db/firebird"}
firebird_pidfile=${firebird_pidfile:-"/var/run/${name}.pid"}
firebird_user=firebird
command_args="${firebird_flags}"
command=%%PREFIX%%/bin/fbguard
command=%%PREFIX%%/sbin/fb_smp_server
command_args="${firebird_flags} &"
pidfile=${firebird_pidfile}
start_precmd="start_precmd"
start_postcmd="start_postcmd"
stop_postcmd=stop_postcmd
reload_postcmd=reload_postcmd
stop_postcmd="stop_postcmd"
reload_postcmd="reload_postcmd"
start_precmd()
{
@ -45,7 +49,8 @@ start_precmd()
start_postcmd()
{
pgrep -u ${firebird_user} fbguard > ${firebird_pidfile}
pgrep -u ${firebird_user} ${command_app} > ${firebird_pidfile}
echo "Current firebird mode is $firebird_mode"
}
stop_postcmd()
@ -59,4 +64,19 @@ reload_postcmd()
run_rc_command start
}
case "${firebird_mode}" in
superclassic)
command=%%PREFIX%%/sbin/fb_smp_server
command_app=fb_smp_server
;;
superserver)
command=%%PREFIX%%/sbin/fbserver
command_app=fbserver
;;
*)
warn "$firebird_mode is an invalid value for firebird_mode"
return 1
;;
esac
run_rc_command "$1"

View file

@ -0,0 +1,11 @@
--- builds/posix/firebird.vers 2013-10-02 18:30:51.000000000 -0500
+++ builds/posix/firebird.vers 2013-10-02 18:31:25.000000000 -0500
@@ -25,6 +25,8 @@
{
global:
+ __progname;
+ environ;
# private entrypoint for REMOTE server
server_main;
#-------------------

View file

@ -2,20 +2,34 @@
Firebird was installed.
1) Before start the server ensure that the following line exists in /etc/services:
1) Support for Super Server has been added
2) 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
3) If you use inetd (Classic Server) then add the following line to /etc/inetd.conf
gds_db stream tcp nowait firebird %%PREFIX%%/sbin/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) If you want to use SuperClassic Server then you must add the following lines
to /etc/rc.conf file.
4) It is STRONGLY recommended that you change the SYSDBA
firebird_enable="YES"
firebird_mode="superclassic"
5) If you want to use Super Server then you must add the following lines to
/etc/rc.conf file.
firebird_enable="YES"
firebird_mode="superserver"
Note: Keep in mind that you only can add one of them but never both modes on
the same time
6) It is STRONGLY recommended that you change the SYSDBA
password with:
# gsec -user SYSDBA -pass masterkey
@ -24,14 +38,14 @@ password with:
before doing anything serious with Firebird.
5) See documentation in %%DOCSDIR%%/ for more information.
7) See documentation in %%DOCSDIR%%/ for more information.
6) Some firebird tools were renamed for avoid conflicts with some other ports
8) Some firebird tools were renamed for avoid conflicts with some other ports
%%PREFIX%%/bin/isql -> %%PREFIX%%/bin/isql-fb
%%PREFIX%%/bin/gstat -> %%PREFIX%%/bin/fbstat
%%PREFIX%%/bin/gsplit -> %%PREFIX%%/bin/fbsplit
7) Enjoy it ;)
9) Enjoy it ;)
################################################################################

View file

@ -12,6 +12,7 @@ bin/nbackup
sbin/fb_inet_server
sbin/fb_lock_print
sbin/fb_smp_server
sbin/fbserver
libexec/firebird/udf/ib_udf.so
libexec/firebird/udf/fbudf.so
libexec/firebird/udf/ib_udf2.sql