diff options
author | Jose Alonso Cardenas Marquez <acm@FreeBSD.org> | 2021-06-27 20:11:43 -0500 |
---|---|---|
committer | Jose Alonso Cardenas Marquez <acm@FreeBSD.org> | 2021-06-27 20:14:20 -0500 |
commit | ca43515803a2c11ec91ed6f32aa3155628e45ae8 (patch) | |
tree | 3c4ebd8d0470b0d3b1756cb193b97ff330b369d2 /databases/firebird30-server/files | |
parent | biology/biostar-tools: Remove falsehood in pkg-message (diff) |
databases/fireird30-[client|server]: New port: Firebird-3 relational database
Firebird is a relational database offering many ANSI SQL-99 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. It has been used in
production systems, under a variety of names since 1981.
Firebird is completely free of any registration, licensing or deployment
fees. It may be deployed freely for use with any third-party software,
whether commercial or not.
WWW: https://sourceforge.net/projects/firebird/
WWW: http://www.firebirdsql.org/
PR: 254387
Diffstat (limited to 'databases/firebird30-server/files')
15 files changed, 398 insertions, 0 deletions
diff --git a/databases/firebird30-server/files/firebird.in b/databases/firebird30-server/files/firebird.in new file mode 100644 index 000000000000..f054b2659400 --- /dev/null +++ b/databases/firebird30-server/files/firebird.in @@ -0,0 +1,61 @@ +#!/bin/sh + +# 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 firebird. +# Default is "-el /var/db/firebird". +# firebird_pidfile: Set full path to pid file. +# Default is "/var/run/firebird.pid". +# + +. /etc/rc.subr + +name=firebird +rcvar=firebird_enable + +load_rc_config $name + +firebird_enable=${firebird_enable:-"NO"} +firebird_flags=${firebird_flags:-"-el /var/db/firebird"} +firebird_pidfile=${firebird_pidfile:-"/var/run/${name}.pid"} +firebird_user=firebird + +command=%%PREFIX%%/sbin/firebird +command_args="${firebird_flags} &" +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} ${name} > ${firebird_pidfile} +} + +stop_postcmd() +{ + rm -f ${pidfile} +} + +reload_postcmd() +{ + rm -f ${pidfile} + run_rc_command start +} + +run_rc_command "$1" diff --git a/databases/firebird30-server/files/patch-builds-posix-prefix.freebsd b/databases/firebird30-server/files/patch-builds-posix-prefix.freebsd new file mode 100644 index 000000000000..3da3ac70283e --- /dev/null +++ b/databases/firebird30-server/files/patch-builds-posix-prefix.freebsd @@ -0,0 +1,20 @@ +--- builds/posix/prefix.freebsd.orig 2021-03-27 18:59:05 UTC ++++ builds/posix/prefix.freebsd +@@ -20,5 +20,14 @@ + + EXE_LINK_OPTIONS+=-Wl,-rpath,../gen/firebird/lib + +-PROD_FLAGS=-O -fno-builtin -DFREEBSD -pipe -MMD -fPIC +-DEV_FLAGS=-ggdb -DFREEBSD -pipe -MMD -p -fPIC -Wall -Wno-non-virtual-dtor ++COMMON_FLAGS=-DFREEBSD -pipe -MMD -fPIC ++PROD_FLAGS=$(COMMON_FLAGS) -O0 -g -fno-builtin -Wno-deprecated ++DEV_FLAGS=$(COMMON_FLAGS) -ggdb -p -Wall -Wno-non-virtual-dtor ++ ++# This file must be compiled with SSE4.2 support ++%/CRC32C.o: COMMON_FLAGS += -msse4 ++ ++# These files are generated incorrectly (e.g. array.epp => array.cpp) ++%/array.o %/blob.o %/alice_meta.o %/restore.o %/backup.o: COMMON_FLAGS += -Wno-narrowing ++%/OdsDetection.o %/dba.o: COMMON_FLAGS += -Wno-narrowing ++ + diff --git a/databases/firebird30-server/files/patch-builds-posix-prefix.freebsd_amd64 b/databases/firebird30-server/files/patch-builds-posix-prefix.freebsd_amd64 new file mode 100644 index 000000000000..dd0f1ae39223 --- /dev/null +++ b/databases/firebird30-server/files/patch-builds-posix-prefix.freebsd_amd64 @@ -0,0 +1,19 @@ +--- builds/posix/prefix.freebsd_amd64.orig 2020-10-20 08:40:05 UTC ++++ builds/posix/prefix.freebsd_amd64 +@@ -20,5 +20,13 @@ + + EXE_LINK_OPTIONS+=-Wl,-rpath,../gen/firebird/lib + +-PROD_FLAGS=-O -fno-builtin -DFREEBSD -DAMD64 -pipe -MMD -fPIC +-DEV_FLAGS=-ggdb -DFREEBSD -DAMD64 -pipe -MMD -p -fPIC -Wall -Wno-non-virtual-dtor ++COMMON_FLAGS=-DFREEBSD -DAMD64 -pipe -MMD -fPIC ++PROD_FLAGS=$(COMMON_FLAGS) -O0 -g -fno-builtin -Wno-deprecated ++DEV_FLAGS=$(COMMON_FLAGS) -ggdb -p -Wall -Wno-non-virtual-dtor ++ ++# This file must be compiled with SSE4.2 support ++%/CRC32C.o: COMMON_FLAGS += -msse4 ++ ++# These files are generated incorrectly (e.g. array.epp => array.cpp) ++%/array.o %/blob.o %/alice_meta.o %/restore.o %/backup.o: COMMON_FLAGS += -Wno-narrowing ++%/OdsDetection.o %/dba.o: COMMON_FLAGS += -Wno-narrowing + diff --git a/databases/firebird30-server/files/patch-builds-posix_Makefile.in b/databases/firebird30-server/files/patch-builds-posix_Makefile.in new file mode 100644 index 000000000000..3957c91179a9 --- /dev/null +++ b/databases/firebird30-server/files/patch-builds-posix_Makefile.in @@ -0,0 +1,34 @@ +--- builds/posix/Makefile.in 2020-10-20 03:40:05.000000000 -0500 ++++ builds/posix/Makefile.in 2021-06-25 00:25:25.389776000 -0500 +@@ -186,16 +186,18 @@ + $(MAKE) preliminaryCheck + $(MAKE) boot + $(MAKE) yvalve ++ $(MAKE) engine + ifeq ($(IsDeveloper), Y) + # In developer mode we must regenerate various files in include/gen + $(MAKE) ids + endif +- $(MAKE) engine ++ifeq ($(IsServer), Y) + $(MAKE) fbintl + $(MAKE) utilities ++endif + # Now having ready such useful tools as gbak and isql, we may restore / create + # required databases and switch to full-featured gpre +- $(MAKE) gpre ++ $(MAKE) gbak gfix gpre + # Pay attention - after build force gpre_current to point to gpre + # even if gpre itself was not rebuilt + -$(RM) $(GPRE_CURRENT) +@@ -204,8 +206,10 @@ + # In developer mode we must regenerate various files in include/gen + $(MAKE) codes + endif ++ifeq ($(IsServer), Y) + $(MAKE) plugins + $(MAKE) examples ++endif + $(MAKE) rest + + diff --git a/databases/firebird30-server/files/patch-builds-posix_Makefile.in.plugins_examples b/databases/firebird30-server/files/patch-builds-posix_Makefile.in.plugins_examples new file mode 100644 index 000000000000..4a58a2a2fe22 --- /dev/null +++ b/databases/firebird30-server/files/patch-builds-posix_Makefile.in.plugins_examples @@ -0,0 +1,12 @@ +--- builds/posix/Makefile.in.plugins_examples.orig 2021-03-27 11:14:37 UTC ++++ builds/posix/Makefile.in.plugins_examples +@@ -99,7 +99,7 @@ AllObjects += $(CA_Objects) + crypt_app: $(CRYPT_APP) + + $(CRYPT_APP): $(CA_Objects) +- $(EXE_LINK) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) ++ $(EXE_LINK) $^ -o $@ $(LDFLAGS) $(FIREBIRD_LIBRARY_LINK) + + + include $(ROOT)/gen/make.shared.targets + diff --git a/databases/firebird30-server/files/patch-builds_install_misc_firebird.conf.in b/databases/firebird30-server/files/patch-builds_install_misc_firebird.conf.in new file mode 100644 index 000000000000..953e438de696 --- /dev/null +++ b/databases/firebird30-server/files/patch-builds_install_misc_firebird.conf.in @@ -0,0 +1,12 @@ +--- builds/install/misc/firebird.conf.in.orig 2020-10-12 00:02:22 UTC ++++ builds/install/misc/firebird.conf.in +@@ -189,7 +189,7 @@ + # + # Type: string (special format) + # +-#UdfAccess = Restrict UDF ++UdfAccess = Restrict %%PREFIX%%/libexec/firebird/udf + + + # ---------------------------- + diff --git a/databases/firebird30-server/files/patch-builds_posix_empty.vers b/databases/firebird30-server/files/patch-builds_posix_empty.vers new file mode 100644 index 000000000000..598107119be9 --- /dev/null +++ b/databases/firebird30-server/files/patch-builds_posix_empty.vers @@ -0,0 +1,9 @@ +--- builds/posix/empty.vers.orig 2020-10-12 00:02:22 UTC ++++ builds/posix/empty.vers +@@ -21,3 +21,5 @@ + # Contributor(s): ______________________________________. + + main ++__progname ++environ + diff --git a/databases/firebird30-server/files/patch-builds_posix_make.defaults b/databases/firebird30-server/files/patch-builds_posix_make.defaults new file mode 100644 index 000000000000..b30b259a6848 --- /dev/null +++ b/databases/firebird30-server/files/patch-builds_posix_make.defaults @@ -0,0 +1,64 @@ +--- builds/posix/make.defaults 2020-10-20 03:40:05.000000000 -0500 ++++ builds/posix/make.defaults 2021-06-25 00:23:49.718147000 -0500 +@@ -134,7 +134,7 @@ + MATHLIB=@MATHLIB@ + + # switch to make sed edit files inplace +-INLINE_EDIT_SED:= -i ++INLINE_EDIT_SED:= -i "" + + # Default programs and tools to be used in the build process + +@@ -144,7 +144,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 +@@ -219,7 +219,7 @@ + #LibraryFileName=libfbclient + LibraryFileName=libfbclient + LibraryFullName=$(LibraryFileName).${SHRLIB_EXT}.${FirebirdVersion} +-LibrarySoName=$(LibraryFileName).${SHRLIB_EXT}.2 ++LibrarySoName=$(LibraryFileName).${SHRLIB_EXT}.3 + LibraryBaseName=$(LibraryFileName).${SHRLIB_EXT} + + LIBFIREBIRD_FULLNAME = $(LIB)/$(LibraryFullName) +@@ -240,7 +240,7 @@ + + ifeq ($(EDITLINE_FLG),Y) + ifeq ($(STD_EDITLINE), true) +- LIBEDITLINE := -l$(READLINE) ++ LIBEDITLINE := $(shell pkgconf libedit --libs) + else + LIBEDITLINE := $(LIB)/libedit.a + endif +@@ -362,7 +362,7 @@ + GDS_DROP = $(BIN)/gds_drop$(EXEC_EXT) + FBSVCMGR = $(BIN)/fbsvcmgr$(EXEC_EXT) + FBTRACEMGR = $(BIN)/fbtracemgr$(EXEC_EXT) +-GSTAT = $(BIN)/gstat$(EXEC_EXT) ++GSTAT = $(BIN)/fbstat$(EXEC_EXT) + NBACKUP = $(BIN)/nbackup$(EXEC_EXT) + LOCKPRINT = $(BIN)/fb_lock_print$(EXEC_EXT) + GSEC = $(BIN)/gsec$(EXEC_EXT) +@@ -383,13 +383,13 @@ + QLI = $(BIN)/qli$(EXEC_EXT) + + # From isql +-ISQL = $(BIN)/isql$(EXEC_EXT) +-RUN_ISQL = $(RBIN)/isql$(EXEC_EXT) ++ISQL = $(BIN)/isql-fb$(EXEC_EXT) ++RUN_ISQL = $(RBIN)/isql-fb$(EXEC_EXT) + + # From burp + GBAK = $(BIN)/gbak$(EXEC_EXT) + RUN_GBAK = $(RBIN)/gbak$(EXEC_EXT) +-GSPLIT = $(BIN)/gsplit$(EXEC_EXT) ++GSPLIT = $(BIN)/fbsplit$(EXEC_EXT) + + # From gpre + # (gpre current is a link to one of the others) diff --git a/databases/firebird30-server/files/patch-extern_btyacc_Makefile b/databases/firebird30-server/files/patch-extern_btyacc_Makefile new file mode 100644 index 000000000000..defaa3243e5b --- /dev/null +++ b/databases/firebird30-server/files/patch-extern_btyacc_Makefile @@ -0,0 +1,12 @@ +--- extern/btyacc/Makefile.orig 2020-10-12 00:02:22 UTC ++++ extern/btyacc/Makefile +@@ -42,7 +42,7 @@ OTHERS = README README.BYACC \ + all: $(PROGRAM) + + $(PROGRAM): $(OBJS) $(LIBS) +- $(CC) $(LDFLAGS) -o $(PROGRAM) $(OBJS) $(LIBS) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROGRAM) $(OBJS) $(LIBS) + + clean:; rm -f $(OBJS) + + diff --git a/databases/firebird30-server/files/patch-extern_cloop_Makefile b/databases/firebird30-server/files/patch-extern_cloop_Makefile new file mode 100644 index 000000000000..8c4b33ba7dac --- /dev/null +++ b/databases/firebird30-server/files/patch-extern_cloop_Makefile @@ -0,0 +1,24 @@ +--- extern/cloop/Makefile 2020-10-12 00:02:22 UTC ++++ extern/cloop/Makefile +@@ -6,7 +6,7 @@ TARGET := release + + CC := $(CC) + CXX := $(CXX) +-LD := $(CXX) ++LD := $(CXX) $(LDFLAGS) + + SRC_DIR := src + BUILD_DIR := build +@@ -27,8 +27,9 @@ SRCS_CPP := $(foreach sdir,$(SRC_DIRS),$ + OBJS_C := $(patsubst $(SRC_DIR)/%.c,$(OBJ_DIR)/%.o,$(SRCS_C)) + OBJS_CPP := $(patsubst $(SRC_DIR)/%.cpp,$(OBJ_DIR)/%.o,$(SRCS_CPP)) + +-C_FLAGS := -ggdb -fPIC -MMD -MP -W -Wall -Wno-unused-parameter +-CXX_FLAGS := $(C_FLAGS) ++COMMON_C_FLAGS := -ggdb -fPIC -MMD -MP -W -Wall -Wno-unused-parameter ++C_FLAGS := $(COMMON_C_FLAGS) $(CFLAGS) $(CPPFLAGS) ++CXX_FLAGS := $(COMMON_C_FLAGS) $(CXXFLAGS) $(CPPFLAGS) + FPC_FLAGS := -Mdelphi + + ifeq ($(TARGET),release) + diff --git a/databases/firebird30-server/files/patch-src-jrd-os-posix_unix.cpp b/databases/firebird30-server/files/patch-src-jrd-os-posix_unix.cpp new file mode 100644 index 000000000000..6c9dc50ba31d --- /dev/null +++ b/databases/firebird30-server/files/patch-src-jrd-os-posix_unix.cpp @@ -0,0 +1,25 @@ +--- src/jrd/os/posix/unix.cpp 2021-06-22 00:38:07.434896000 -0500 ++++ src/jrd/os/posix/unix.cpp 2021-06-22 00:43:54.988645000 -0500 +@@ -56,6 +56,13 @@ + #include <linux/fs.h> + #endif + ++#ifdef FREEBSD ++#include <sys/disk.h> ++#define BLKGETSIZE64 DIOCGMEDIASIZE ++#define BLKGETSIZE DIOCGMEDIASIZE ++#define BLKSSZGET DIOCGSECTORSIZE ++#endif ++ + #endif //SUPPORT_RAW_DEVICES + + #include "../jrd/jrd.h" +@@ -495,7 +502,7 @@ + // Looks like any OS needs own ioctl() to determine raw device size + #undef HAS_RAW_SIZE + +-#ifdef LINUX ++#if defined(LINUX) || defined(FREEBSD) + #ifdef BLKGETSIZE64 + if (ioctl(file->fil_desc, BLKGETSIZE64, &length) != 0) + #endif /*BLKGETSIZE64*/ diff --git a/databases/firebird30-server/files/patch-src_common_os_posix_SyncSignals.cpp b/databases/firebird30-server/files/patch-src_common_os_posix_SyncSignals.cpp new file mode 100644 index 000000000000..159ee13a99c0 --- /dev/null +++ b/databases/firebird30-server/files/patch-src_common_os_posix_SyncSignals.cpp @@ -0,0 +1,13 @@ +--- src/common/os/posix/SyncSignals.cpp.orig 2020-10-12 00:02:22 UTC ++++ src/common/os/posix/SyncSignals.cpp +@@ -54,9 +54,6 @@ + #include <errno.h> + #include <unistd.h> + +-#if defined FREEBSD || defined NETBSD || defined DARWIN || defined HPUX +-#define sigset signal +-#endif + + namespace { + + diff --git a/databases/firebird30-server/files/patch-src_remote_SockAddr.h b/databases/firebird30-server/files/patch-src_remote_SockAddr.h new file mode 100644 index 000000000000..30297137c2c5 --- /dev/null +++ b/databases/firebird30-server/files/patch-src_remote_SockAddr.h @@ -0,0 +1,25 @@ +--- src/remote/SockAddr.h.orig 2020-10-12 00:02:22 UTC ++++ src/remote/SockAddr.h +@@ -112,11 +112,13 @@ public: + + #define AF_INET6_POSIX 10 + #define AF_INET6_WINDOWS 23 ++#define AF_INET6_BSD 28 + #define AF_INET6_DARWIN 30 + + #if AF_INET6 == AF_INET6_POSIX + #elif AF_INET6 == AF_INET6_WINDOWS + #elif AF_INET6 == AF_INET6_DARWIN ++#elif AF_INET6 == AF_INET6_BSD + #else + #error Unknown value of AF_INET6 ! + #endif +@@ -132,6 +134,7 @@ inline void SockAddr::checkAndFixFamily( + case AF_INET6_POSIX: + case AF_INET6_WINDOWS: + case AF_INET6_DARWIN: ++ case AF_INET6_BSD: + data.sock.sa_family = AF_INET6; + fb_assert(len == sizeof(sockaddr_in6)); + break; + diff --git a/databases/firebird30-server/files/patch-src_remote_inet.cpp b/databases/firebird30-server/files/patch-src_remote_inet.cpp new file mode 100644 index 000000000000..6b45a4f61e75 --- /dev/null +++ b/databases/firebird30-server/files/patch-src_remote_inet.cpp @@ -0,0 +1,25 @@ +--- src/remote/inet.cpp.orig 2020-10-20 08:40:05 UTC ++++ src/remote/inet.cpp +@@ -962,7 +962,7 @@ rem_port* INET_connect(const TEXT* name, + gai_hints.ai_family = ((host.hasData() || !ipv6) ? AF_UNSPEC : AF_INET6); + gai_hints.ai_socktype = SOCK_STREAM; + +-#if !defined(WIN_NT) && !defined(__clang__) ++#if !defined(WIN_NT) && !defined(__FreeBSD__) && !defined(__DragonFly__) + gai_hints.ai_protocol = SOL_TCP; + #else + gai_hints.ai_protocol = IPPROTO_TCP; +@@ -1176,6 +1176,12 @@ static rem_port* listener_socket(rem_port* port, USHOR + setFastLoopbackOption(port); + + inet_ports->registerPort(port); ++ ++ char *parent_pid; ++ if (parent_pid = getenv("FB_SIGNAL_PROCESS")) ++ { ++ kill(atoi(parent_pid), SIGUSR1); ++ } + + if (flag & SRVR_multi_client) + { + diff --git a/databases/firebird30-server/files/pkg-message.in b/databases/firebird30-server/files/pkg-message.in new file mode 100644 index 000000000000..1e5b3814139d --- /dev/null +++ b/databases/firebird30-server/files/pkg-message.in @@ -0,0 +1,43 @@ +[ +{ type: install + message: <<EOM +Firebird 3 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 (Classic Server) then add the following line to /etc/inetd.conf + +gds_db stream tcp nowait firebird %%PREFIX%%/sbin/firebird firebird + +And finally restart inetd. + +3) If you want to use change firebird modes then you must modify the ServerMode + variable into %%ETCDIR%%/firebird.conf file. + + ServerMode="Super" + # ServerMode="SuperClassic" + # ServerMode="Classic" + +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) 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 + +6) Enjoy it ;) +EOM +} +] |