Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Oct 2013 06:55:36 +0000 (UTC)
From:      Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r329146 - in head/databases/firebird25-server: . files
Message-ID:  <201310030655.r936tagm073998@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: acm
Date: Thu Oct  3 06:55:36 2013
New Revision: 329146
URL: http://svnweb.freebsd.org/changeset/ports/329146

Log:
  - 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]

Added:
  head/databases/firebird25-server/files/patch-builds-posix_firebird.vers   (contents, props changed)
Modified:
  head/databases/firebird25-server/Makefile
  head/databases/firebird25-server/files/firebird.in
  head/databases/firebird25-server/files/pkg-message.in
  head/databases/firebird25-server/pkg-plist

Modified: head/databases/firebird25-server/Makefile
==============================================================================
--- head/databases/firebird25-server/Makefile	Thu Oct  3 06:42:41 2013	(r329145)
+++ head/databases/firebird25-server/Makefile	Thu Oct  3 06:55:36 2013	(r329146)
@@ -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
 
 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 sy
 # 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 \

Modified: head/databases/firebird25-server/files/firebird.in
==============================================================================
--- head/databases/firebird25-server/files/firebird.in	Thu Oct  3 06:42:41 2013	(r329145)
+++ head/databases/firebird25-server/files/firebird.in	Thu Oct  3 06:55:36 2013	(r329146)
@@ -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"

Added: head/databases/firebird25-server/files/patch-builds-posix_firebird.vers
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/firebird25-server/files/patch-builds-posix_firebird.vers	Thu Oct  3 06:55:36 2013	(r329146)
@@ -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;
+ #-------------------

Modified: head/databases/firebird25-server/files/pkg-message.in
==============================================================================
--- head/databases/firebird25-server/files/pkg-message.in	Thu Oct  3 06:42:41 2013	(r329145)
+++ head/databases/firebird25-server/files/pkg-message.in	Thu Oct  3 06:55:36 2013	(r329146)
@@ -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 ;)
 
 ################################################################################

Modified: head/databases/firebird25-server/pkg-plist
==============================================================================
--- head/databases/firebird25-server/pkg-plist	Thu Oct  3 06:42:41 2013	(r329145)
+++ head/databases/firebird25-server/pkg-plist	Thu Oct  3 06:55:36 2013	(r329146)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310030655.r936tagm073998>