diff options
author | Jose Alonso Cardenas Marquez <acm@FreeBSD.org> | 2013-10-03 06:55:36 +0000 |
---|---|---|
committer | Jose Alonso Cardenas Marquez <acm@FreeBSD.org> | 2013-10-03 06:55:36 +0000 |
commit | 35e9b8ca051ca45aab3928eaf8f64679269493d4 (patch) | |
tree | aa5de6401380a0ef9dccf6e51cdf0ecdf1194d66 /databases | |
parent | - Add LICENSE (diff) |
- 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]
Notes
Notes:
svn path=/head/; revision=329146
Diffstat (limited to 'databases')
-rw-r--r-- | databases/firebird25-server/Makefile | 14 | ||||
-rw-r--r-- | databases/firebird25-server/files/firebird.in | 36 | ||||
-rw-r--r-- | databases/firebird25-server/files/patch-builds-posix_firebird.vers | 11 | ||||
-rw-r--r-- | databases/firebird25-server/files/pkg-message.in | 30 | ||||
-rw-r--r-- | databases/firebird25-server/pkg-plist | 1 |
5 files changed, 69 insertions, 23 deletions
diff --git a/databases/firebird25-server/Makefile b/databases/firebird25-server/Makefile index 65d3ec3e603a..e958c6cb2007 100644 --- a/databases/firebird25-server/Makefile +++ b/databases/firebird25-server/Makefile @@ -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 \ diff --git a/databases/firebird25-server/files/firebird.in b/databases/firebird25-server/files/firebird.in index 0d01153410b9..93c134b22b92 100644 --- a/databases/firebird25-server/files/firebird.in +++ b/databases/firebird25-server/files/firebird.in @@ -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" diff --git a/databases/firebird25-server/files/patch-builds-posix_firebird.vers b/databases/firebird25-server/files/patch-builds-posix_firebird.vers new file mode 100644 index 000000000000..106689f5e08b --- /dev/null +++ b/databases/firebird25-server/files/patch-builds-posix_firebird.vers @@ -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; + #------------------- diff --git a/databases/firebird25-server/files/pkg-message.in b/databases/firebird25-server/files/pkg-message.in index 39f945fa3c47..776370dcb99f 100644 --- a/databases/firebird25-server/files/pkg-message.in +++ b/databases/firebird25-server/files/pkg-message.in @@ -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. + + 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 -4) It is STRONGLY recommended that you change the SYSDBA +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 ;) ################################################################################ diff --git a/databases/firebird25-server/pkg-plist b/databases/firebird25-server/pkg-plist index ac1d8cf27e9c..833b40d21ae7 100644 --- a/databases/firebird25-server/pkg-plist +++ b/databases/firebird25-server/pkg-plist @@ -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 |