diff options
author | skv <skv@FreeBSD.org> | 2005-07-27 23:38:05 +0800 |
---|---|---|
committer | skv <skv@FreeBSD.org> | 2005-07-27 23:38:05 +0800 |
commit | 3f81afe82a2fc06634da68a4f8ec0a0823aadb83 (patch) | |
tree | 97e83053170cdbcb8ec98053ef1cc5bc426bfd0f | |
parent | 51d7f86caaaceaacaa4902e3ab0711de779f7d48 (diff) | |
download | freebsd-ports-gnome-3f81afe82a2fc06634da68a4f8ec0a0823aadb83.tar.gz freebsd-ports-gnome-3f81afe82a2fc06634da68a4f8ec0a0823aadb83.tar.zst freebsd-ports-gnome-3f81afe82a2fc06634da68a4f8ec0a0823aadb83.zip |
Change layout for firebird-server accordingly to hier(7) spirit.
See UPDATING for the details.
43 files changed, 540 insertions, 408 deletions
@@ -7,6 +7,18 @@ time you update your ports collection, before attempting any port upgrades. +20050727: + AFFECTS: users of databases/firebird-server + AUTHOR: skv@FreeBSD.org + + Changes in layout: + * database directory has changed from /usr/local/firebird to /var/db/firebird + * configuration files are placed in /usr/local/etc/firebird + * common utilities have been moved to /usr/local/bin + * suid-ed binaries have been moved to /usr/local/sbin + + Update inetd.conf/xinetd.conf to reflect new location of "fb_inet_server". + 20050722: AFFECTS: All RELENG_6 and HEAD users of ports/packages, maintainers of ports that interact with the compat libraries. diff --git a/databases/firebird-server/Makefile b/databases/firebird-server/Makefile index 2ec7fd443f6b..f51a90d1c46e 100644 --- a/databases/firebird-server/Makefile +++ b/databases/firebird-server/Makefile @@ -7,7 +7,7 @@ PORTNAME?= firebird PORTVERSION= 1.5.2 -PORTREVISION?= 2 +PORTREVISION?= 3 CATEGORIES?= databases MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR=firebird @@ -26,7 +26,10 @@ USE_LIBTOOL_VER= 15 USE_AUTOCONF_VER= 259 USE_GCC= 3.4 -PLIST_SUB= FIREBIRD_VERSION=${PORTVERSION} +LOCALSTATEDIR= /var/db/firebird +CONFDIR= ${PREFIX}/etc/firebird +PLIST_SUB= FIREBIRD_VERSION=${PORTVERSION} \ + LOCALSTATEDIR=${LOCALSTATEDIR} CONFDIR="etc/firebird" # Don't use ld for linking, use gcc LD= gcc @@ -42,45 +45,43 @@ WRKSRC= ${WRKDIR}/${DISTNAME} # Server part stuff LIB_DEPENDS+= fbembed.1:${PORTSDIR}/databases/firebird-client -AUTOGENARGS= --prefix=${PREFIX}/firebird \ - --with-lock-manager +AUTOGENARGS= --with-lock-manager -ALL_TARGET= firebird_boot ref_databases msgs intl otherfiles \ - inet_server extlib - -# Use own user and group when install server part -BINGRP= firebird -BINMODE= 550 -SHAREGRP= firebird +ALL_TARGET= firebird_boot ref_databases msgs libfbembed intl otherfiles \ + inet_server extlib embed_gfix embed_gbak embed_gdef embed_util SUB_FILES= pkg-install pkg-message aliases.conf PKGMESSAGE= ${WRKDIR}/pkg-message PKGINSTALL= ${WRKDIR}/pkg-install -SERVER_BIN= fb_inet_server fb_lock_mgr +SUID_BIN= fb_inet_server fb_lock_mgr gds_drop +UTIL_BIN= fb_lock_print gbak gdef gfix gsec gstat UDF_SO= ib_udf.so fbudf.so UDF_SQL= src/extlib/ib_udf.sql src/extlib/fbudf/fbudf.sql CONFLICTS= firebird-devel-[0-9]* .else # Client part stuff -AUTOGENARGS= --prefix=${PREFIX} \ - --with-editline +AUTOGENARGS= --with-editline -ALL_TARGET= firebird_basic libfbembed embed_gfix embed_gbak embed_isql embed_gpre \ - embed_util embed_gdef embed_qli libfbclient extlib +ALL_TARGET= firebird_basic libfbembed embed_isql embed_gpre \ + embed_gdef embed_qli libfbclient extlib +#ALL_TARGET= firebird_basic libfbembed libfbclient \ +# client_gpre client_gdef client_isql client_qli extlib INSTALLS_SHLIB= yes -LIBDATADIR= ${PREFIX}/libdata/firebird -PLIST_SUB+= LIBDATADIR="libdata/firebird" -CLIENT_BIN= fb_lock_print gbak gdef gds_drop gfix gpre gsec gstat isql qli +CLIENT_BIN= gpre isql qli + +CONFIGURE_ENV+= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" PTHREAD_LIBS="${PTHREAD_LIBS}" .if !defined(NOPORTDOCS) PORTDOCS= * .endif .endif +MAKE_ENV+= CC=${CC} CXX=${CXX} FIREBIRD_TMP="${WRKDIR}" FIREBIRD_LOCK="${WRKDIR}" + .include <bsd.port.pre.mk> .if !defined(CLIENT_ONLY) @@ -99,14 +100,6 @@ pre-everything:: .endif .endif -post-patch: -.if !defined(CLIENT_ONLY) - @${REINPLACE_CMD} -e 's|^\(LINK_OPTS +=.*\)$$|\1 -L${LOCALBASE}/lib|' \ - ${WRKSRC}/builds/posix/Makefile.in.inet_server -.endif - @${REINPLACE_CMD} -e 's|%%LIBDATADIR%%|${LIBDATADIR}|g' \ - ${WRKSRC}/src/jrd/gds.cpp - .if !defined(CLIENT_ONLY) pre-install: @${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL @@ -116,59 +109,70 @@ post-install: @${CAT} ${PKGMESSAGE} .endif +.ifndef WITHOUT_IPC_CLEANUP +pre-build: + [ -f ${WRKDIR}/ipcs.pre.build ] || /usr/bin/ipcs -s | ${TAIL} -n +3 | \ + ${GREP} -F `${ID} -un` | ${CAT} > ${WRKDIR}/ipcs.pre.build + +post-build: + /usr/bin/ipcs -s | ${TAIL} -n +3 | ${GREP} -F `${ID} -un` | ${CAT} > ${WRKDIR}/ipcs.post.build + /usr/bin/diff -n ${WRKDIR}/ipcs.pre.build ${WRKDIR}/ipcs.post.build | \ + ${TAIL} -n +2 | ${SED} -E 's/^s +([0-9]+).*$$/\/usr\/bin\/ipcrm -s \1/' > ${WRKDIR}/ipcrm.sh + ${SH} ${WRKDIR}/ipcrm.sh +.endif + do-configure: - @(cd ${WRKSRC} && ${SETENV} CC=${CC} CXX=${CXX} MAKE=${GMAKE} \ - ${AUTOTOOLS_VARS} ./autogen.sh ${AUTOGENARGS}) + @(cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${MAKE_ENV} MAKE=${GMAKE} \ + ${AUTOTOOLS_VARS} ./autogen.sh --localstatedir=${LOCALSTATEDIR} \ + --prefix=${LOCALSTATEDIR} --exec-prefix=${PREFIX} \ + --sysconfdir=${CONFDIR} --datadir=${DATADIR} ${AUTOGENARGS}) post-configure: @${REINPLACE_CMD} -e 's|__attribute__ ((__unused__));||' \ ${WRKSRC}/src/dsql/parse.cpp - @${REINPLACE_CMD} -e 's|firebird\.conf|${PREFIX}/etc/firebird.conf|g; \ - s|root_dir + string(CONFIG_FILE)|string(CONFIG_FILE)|g' \ - ${WRKSRC}/src/jrd/os/posix/config_root.cpp - -do-build: - @(cd ${WRKSRC} && ${SETENV} CC=${CC} CXX=${CXX} ${GMAKE} ${ALL_TARGET}) do-install: .if !defined(CLIENT_ONLY) - ${MKDIR} ${PREFIX}/firebird -.for f in UDF bin help intl - ${MKDIR} ${PREFIX}/firebird/${f} - ${CHOWN} ${BINOWN}:${BINGRP} ${PREFIX}/firebird/${f} -.endfor + ${INSTALL_PROGRAM} ${UTIL_BIN:S!^!${WRKSRC}/gen/firebird/bin/!} ${PREFIX}/bin - ${INSTALL_DATA} ${WRKDIR}/aliases.conf ${PREFIX}/firebird/aliases.conf.sample - ${INSTALL_DATA} -m 660 -o firebird ${WRKSRC}/gen/firebird/security.fdb \ - ${PREFIX}/firebird/security.fdb.sample - ${INSTALL_DATA} -m 0440 ${WRKSRC}/gen/firebird/help/help.fdb ${PREFIX}/firebird/help + ${INSTALL_PROGRAM} -o firebird -g firebird -m 6550 \ + ${SUID_BIN:S!^!${WRKSRC}/gen/firebird/bin/!} ${PREFIX}/sbin - ${INSTALL_DATA} ${UDF_SO:S!^!${WRKSRC}/gen/firebird/UDF/!} \ - ${UDF_SQL:S!^!${WRKSRC}/!} ${PREFIX}/firebird/UDF + @${MKDIR} ${CONFDIR} + ${INSTALL_DATA} ${WRKDIR}/aliases.conf ${CONFDIR}/aliases.conf.sample - ${INSTALL_PROGRAM} -o firebird \ - ${SERVER_BIN:S!^!${WRKSRC}/gen/firebird/bin/!} ${PREFIX}/firebird/bin - ${CHMOD} u+s ${SERVER_BIN:S!^!${PREFIX}/firebird/bin/!} + ${MKDIR} ${LOCALSTATEDIR}/UDF ${LOCALSTATEDIR}/help ${LOCALSTATEDIR}/intl + + ${INSTALL_DATA} -m 0440 ${UDF_SO:S!^!${WRKSRC}/gen/firebird/UDF/!} \ + ${UDF_SQL:S!^!${WRKSRC}/!} ${LOCALSTATEDIR}/UDF + +.if !exists(${LOCALSTATEDIR}/security.fdb) + ${INSTALL_DATA} -m 0660 -o firebird -g firebird ${WRKSRC}/gen/firebird/security.fdb \ + ${LOCALSTATEDIR}/security.fdb +.endif + ${INSTALL_DATA} -m 0660 -o firebird -g firebird ${WRKSRC}/gen/firebird/security.fdb \ + ${LOCALSTATEDIR}/security.fdb.sample - ${INSTALL_DATA} ${WRKSRC}/gen/firebird/intl/libfbintl.so ${PREFIX}/firebird/intl/fbintl + ${INSTALL_DATA} -m 0440 -g firebird ${WRKSRC}/gen/firebird/help/help.fdb \ + ${LOCALSTATEDIR}/help - ${INSTALL_DATA} ${FILESDIR}/RELNOTES ${PREFIX}/firebird + ${INSTALL_DATA} ${WRKSRC}/gen/firebird/intl/libfbintl.so ${LOCALSTATEDIR}/intl/fbintl - # runtime files (.lock, .log) still placed to ${PREFIX}/firebird - ${CHOWN} firebird:firebird ${PREFIX}/firebird - ${CHOWN} -R firebird:firebird ${PREFIX}/firebird/help + # runtime files - lock, firebird.log, security.fdb + ${CHOWN} -R firebird:firebird ${LOCALSTATEDIR} + ${INSTALL_DATA} ${FILESDIR}/RELNOTES ${LOCALSTATEDIR} .else # defined CLIENT_ONLY ${INSTALL_PROGRAM} ${CLIENT_BIN:S!^!${WRKSRC}/gen/firebird/bin/!} \ ${PREFIX}/bin - @${MKDIR} ${PREFIX}/etc -.if !exists(${PREFIX}/etc/firebird.conf) - ${INSTALL_DATA} ${WRKSRC}/gen/firebird/misc/firebird.conf ${PREFIX}/etc + @${MKDIR} ${CONFDIR} +.if !exists(${CONFDIR}/firebird.conf) + ${INSTALL_DATA} ${WRKSRC}/gen/firebird/misc/firebird.conf ${CONFDIR} .endif - ${INSTALL_DATA} ${WRKSRC}/gen/firebird/misc/firebird.conf ${PREFIX}/etc/firebird.conf.sample + ${INSTALL_DATA} ${WRKSRC}/gen/firebird/misc/firebird.conf ${CONFDIR}/firebird.conf.sample ${INSTALL_DATA} ${WRKSRC}/gen/firebird/lib/libib_util.so \ ${WRKSRC}/gen/firebird/lib/libfbclient.so.${PORTVERSION} \ @@ -186,8 +190,8 @@ do-install: @${MKDIR} ${PREFIX}/include ${INSTALL_DATA} ${WRKSRC}/gen/firebird/include/*.h ${PREFIX}/include - @${MKDIR} ${LIBDATADIR} - ${INSTALL_DATA} ${WRKSRC}/gen/firebird/*.msg ${LIBDATADIR} + @${MKDIR} ${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/gen/firebird/*.msg ${DATADIR} .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR}/sql.extensions @@ -199,6 +203,8 @@ do-install: @${ECHO_MSG} "===> Installing examples for ${PKGNAME}" @${MKDIR} ${EXAMPLESDIR} ${INSTALL_DATA} ${WRKSRC}/gen/firebird/examples/v5/* ${EXAMPLESDIR} + ${CHOWN} firebird:firebird ${EXAMPLESDIR}/employee.* + ${CHMOD} 0664 ${EXAMPLESDIR}/employee.* .endif .include <bsd.port.post.mk> diff --git a/databases/firebird-server/files/RELNOTES b/databases/firebird-server/files/RELNOTES index 0af872b2d234..2685519c686e 100644 --- a/databases/firebird-server/files/RELNOTES +++ b/databases/firebird-server/files/RELNOTES @@ -21,7 +21,7 @@ have been removed. The former can be accomplished with 'ps ax For example, after building and installing the port, you will probably go through something like this: -# isql /usr/local/firebird/security.fdb +# isql /var/db/firebird/security.fdb Statement failed, SQLCODE = -902 operating system directive semget failed @@ -86,7 +86,7 @@ a username and password already defined in security.fdb. For example: gsec > add myuser -pass mypass > quit -isql -u myuser -p mypass localhost:/usr/local/firebird/examples/employee.fdb +isql -u myuser -p mypass localhost:/usr/local/share/firebird/examples/employee.fdb This should reduce the need for hosts defined in /etc/hosts.equiv. diff --git a/databases/firebird-server/files/aliases.conf.in b/databases/firebird-server/files/aliases.conf.in index a49d31d96fdf..92b5b620c07a 100644 --- a/databases/firebird-server/files/aliases.conf.in +++ b/databases/firebird-server/files/aliases.conf.in @@ -5,4 +5,5 @@ # Examples: # # employee = %%EXAMPLESDIR%%/employee.fdb +# security = /var/db/firebird/security.fdb # diff --git a/databases/firebird-server/files/patch-builds%make.new%config%config.h.in b/databases/firebird-server/files/patch-builds%make.new%config%config.h.in new file mode 100644 index 000000000000..b3073379ba55 --- /dev/null +++ b/databases/firebird-server/files/patch-builds%make.new%config%config.h.in @@ -0,0 +1,11 @@ +--- builds/make.new/config/config.h.in.orig Sun Jul 6 05:07:48 2003 ++++ builds/make.new/config/config.h.in Wed Jul 27 13:07:37 2005 +@@ -190,5 +190,8 @@ + #undef SINIXZ + + #define FB_PREFIX "/usr/local/firebird" ++#define FB_EXEC_PREFIX "/usr/local" ++#define FB_CONF_PREFIX "/usr/local/etc/firebird" ++#define FB_MSG_PREFIX "/usr/local/libdata/firebird" + + #endif diff --git a/databases/firebird-server/files/patch-builds::posix::Makefile.in.inet_server b/databases/firebird-server/files/patch-builds::posix::Makefile.in.inet_server deleted file mode 100644 index 8dcddef34a6a..000000000000 --- a/databases/firebird-server/files/patch-builds::posix::Makefile.in.inet_server +++ /dev/null @@ -1,20 +0,0 @@ ---- builds/posix/Makefile.in.inet_server.orig Fri Sep 17 20:34:21 2004 -+++ builds/posix/Makefile.in.inet_server Wed Mar 2 16:09:41 2005 -@@ -39,6 +39,8 @@ - - @SET_MAKE@ - -+LINK_OPTS += -+ - SERVER_Files = server_stub.cpp - SERVER_Sources = $(addprefix remote/, $(SERVER_Files)) - SERVER_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(SERVER_Sources)))) -@@ -51,7 +53,7 @@ - - # SD: We don't need to rebuild fb_inet_server every time libfbembed.so changed, - # but we must ensure it's existance --fb_inet_server : $(LIBFBEMBED_SO) $(FB_CLASSIC_SERVER) -+fb_inet_server : $(FB_CLASSIC_SERVER) - - $(FB_CLASSIC_SERVER): $(SERVER_Objects) - $(LD) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LIB_GUI) $(LINK_LIBS) diff --git a/databases/firebird-server/files/patch-configure.in b/databases/firebird-server/files/patch-configure.in new file mode 100644 index 000000000000..562421312eb3 --- /dev/null +++ b/databases/firebird-server/files/patch-configure.in @@ -0,0 +1,12 @@ +--- configure.in.orig Thu Dec 9 17:43:18 2004 ++++ configure.in Wed Jul 27 13:06:06 2005 +@@ -605,6 +605,9 @@ + AC_SUBST(NEW_FIREBIRD_DIR) + + AC_DEFINE_UNQUOTED(FB_PREFIX, $(if test "x$prefix" = "xNONE" ; then echo \"$ac_default_prefix\"; else echo \"$prefix\"; fi)) ++AC_DEFINE_UNQUOTED(FB_EXEC_PREFIX, "$exec_prefix") ++AC_DEFINE_UNQUOTED(FB_CONF_PREFIX, "$sysconfdir") ++AC_DEFINE_UNQUOTED(FB_MSG_PREFIX, "$datadir") + + AC_CONFIG_COMMANDS(,,[ + dnl ### GEN ### directories for preprocessed cpp, databases and output diff --git a/databases/firebird-server/files/patch-src%jrd%db_alias.cpp b/databases/firebird-server/files/patch-src%jrd%db_alias.cpp new file mode 100644 index 000000000000..8c0e56b144da --- /dev/null +++ b/databases/firebird-server/files/patch-src%jrd%db_alias.cpp @@ -0,0 +1,13 @@ +--- src/jrd/db_alias.cpp.orig Mon Aug 18 01:16:41 2003 ++++ src/jrd/db_alias.cpp Mon Jul 25 15:07:45 2005 +@@ -37,8 +37,8 @@ + + bool ResolveDatabaseAlias(const char* alias, char* database) + { +- TEXT alias_filename[MAXPATHLEN]; +- gds__prefix(alias_filename, const_cast<char*>(ALIAS_FILE)); ++ TEXT alias_filename[MAXPATHLEN] = FB_CONF_PREFIX "/"; ++ strlcat(alias_filename, ALIAS_FILE, MAXPATHLEN); + ConfigFile aliasConfig(false); + aliasConfig.setConfigFile(alias_filename); + diff --git a/databases/firebird20-server/files/patch-src::jrd::gds.cpp b/databases/firebird-server/files/patch-src%jrd%gds.cpp index c9c19d9fe829..a68b98955e5f 100644 --- a/databases/firebird20-server/files/patch-src::jrd::gds.cpp +++ b/databases/firebird-server/files/patch-src%jrd%gds.cpp @@ -1,12 +1,11 @@ ---- src/jrd/gds.cpp.orig Sun May 22 18:52:41 2005 -+++ src/jrd/gds.cpp Sun May 22 18:55:44 2005 -@@ -1732,8 +1732,8 @@ - +--- src/jrd/gds.cpp.orig Mon Nov 22 08:11:11 2004 ++++ src/jrd/gds.cpp Wed Jul 27 13:10:40 2005 +@@ -1733,7 +1733,7 @@ if (ib_prefix_msg == NULL) { if (!(ib_prefix_msg = getenv(FB_MSG_ENV))) { -+ strncpy(ib_prefix_msg_val, "%%LIBDATADIR%%", MAXPATHLEN); ib_prefix_msg = ib_prefix_msg_val; - gds__prefix(ib_prefix_msg, ""); ++ strlcpy(ib_prefix_msg_val, FB_MSG_PREFIX, MAXPATHLEN); } else { strcat(ib_prefix_msg_val, ib_prefix_msg); diff --git a/databases/firebird-server/files/patch-src%jrd%os%posix%config_root.cpp b/databases/firebird-server/files/patch-src%jrd%os%posix%config_root.cpp new file mode 100644 index 000000000000..3af960c1599e --- /dev/null +++ b/databases/firebird-server/files/patch-src%jrd%os%posix%config_root.cpp @@ -0,0 +1,10 @@ +--- src/jrd/os/posix/config_root.cpp.orig Mon Jul 25 15:19:18 2005 ++++ src/jrd/os/posix/config_root.cpp Mon Jul 25 15:19:49 2005 +@@ -152,6 +152,6 @@ + + const char *ConfigRoot::getConfigFile() const + { +- static string file = root_dir + string(CONFIG_FILE); ++ static string file = string(FB_CONF_PREFIX) + PathUtils::dir_sep + string(CONFIG_FILE); + return file.c_str(); + } diff --git a/databases/firebird-server/files/patch-src%lock%lock.cpp b/databases/firebird-server/files/patch-src%lock%lock.cpp new file mode 100644 index 000000000000..7f550183e379 --- /dev/null +++ b/databases/firebird-server/files/patch-src%lock%lock.cpp @@ -0,0 +1,15 @@ +--- src/lock/lock.cpp.orig Mon Mar 29 08:35:49 2004 ++++ src/lock/lock.cpp Wed Jul 27 14:01:51 2005 +@@ -2800,7 +2800,11 @@ + #ifdef DEBUG_MANAGER + gds__prefix(string, DEBUG_MANAGER); + #else +- gds__prefix(string, LOCK_MANAGER); ++ if (! getenv("FIREBIRD")) { ++ strlcpy(string, FB_EXEC_PREFIX "/s" LOCK_MANAGER, MAXPATHLEN); ++ }else { ++ gds__prefix(string, LOCK_MANAGER); ++ } + #endif + if (statistics(string, &stat_buf) == -1) { + sprintf (errorstring, "can't start lock manager: %s", string); diff --git a/databases/firebird-server/files/pkg-install.in b/databases/firebird-server/files/pkg-install.in index b2da81e8fb00..ee702916f43c 100644 --- a/databases/firebird-server/files/pkg-install.in +++ b/databases/firebird-server/files/pkg-install.in @@ -41,7 +41,7 @@ echo "firebird user using gid $fbGID" if which -s pw; then if [ $nofbuid -ne 0 ]; then pw useradd firebird -u $fbUID -g $fbGID -h - -s /bin/sh \ - -d $PKG_PREFIX/firebird -c "Firebird Database Administrator" + -d /var/db/firebird -c "Firebird Database Administrator" fi else echo -n "unable to create user firebird - please create it manually," @@ -51,7 +51,7 @@ fi ;; POST-INSTALL) -cd $PKG_PREFIX/firebird +cd /var/db/firebird # Lock files diff --git a/databases/firebird-server/files/pkg-message.in b/databases/firebird-server/files/pkg-message.in index 02894da409f2..4466c517428e 100644 --- a/databases/firebird-server/files/pkg-message.in +++ b/databases/firebird-server/files/pkg-message.in @@ -8,18 +8,10 @@ gds_db 3050/tcp #InterBase Database Remote Protocol And add the following line to /etc/inetd.conf -gds_db stream tcp nowait firebird %%PREFIX%%/firebird/bin/fb_inet_server fb_inet_server +gds_db stream tcp nowait firebird %%PREFIX%%/sbin/fb_inet_server fb_inet_server And finally restart inetd. -A symbolic link from /usr/interbase -> %%PREFIX%%/firebird -may be needed for compatibility with existing programs -that use Firebird. - -The symbolic link can be created with: - -% ln -s %%PREFIX%%/firebird /usr/interbase - It is STRONGLY recommended that you change the SYSDBA password with: diff --git a/databases/firebird-server/pkg-plist b/databases/firebird-server/pkg-plist index 76072509a40e..20356943c128 100644 --- a/databases/firebird-server/pkg-plist +++ b/databases/firebird-server/pkg-plist @@ -1,25 +1,33 @@ @comment $FreeBSD$ -firebird/RELNOTES -firebird/UDF/fbudf.so -firebird/UDF/fbudf.sql -firebird/UDF/ib_udf.so -firebird/UDF/ib_udf.sql -@unexec if cmp -s %D/firebird/aliases.conf %D/firebird/aliases.conf.sample; then rm -f %D/firebird/aliases.conf; fi -firebird/aliases.conf.sample +bin/fb_lock_print +bin/gbak +bin/gdef +bin/gfix +bin/gsec +bin/gstat +sbin/fb_inet_server +sbin/fb_lock_mgr +sbin/gds_drop +%%CONFDIR%%/aliases.conf.sample @exec [ -f %B/aliases.conf ] || cp %B/%f %B/aliases.conf -firebird/bin/fb_inet_server -firebird/bin/fb_lock_mgr -@unexec [ -s %D/firebird/firebird.log ] || rm -f %D/firebird/firebird.log -firebird/help/help.fdb -firebird/intl/fbintl -@unexec rm -f %D/firebird/isc_event1.`hostname` -@unexec rm -f %D/firebird/isc_init1.`hostname` -@unexec rm -f %D/firebird/isc_lock1.`hostname` -@unexec if cmp -s %D/firebird/security.fdb %D/firebird/security.fdb.sample; then rm -f %D/firebird/security.fdb; fi -firebird/security.fdb.sample -@exec [ -f %B/security.fdb ] || cp %B/%f %B/security.fdb -@dirrm firebird/UDF -@dirrm firebird/bin -@dirrm firebird/help -@dirrm firebird/intl -@unexec rmdir %D/firebird 2>/dev/null || true +@unexec if cmp -s %D/%%CONFDIR%%/aliases.conf %D/%%CONFDIR%%/aliases.conf.sample; then rm -f %D/%%CONFDIR%%/aliases.conf; fi +@unexec rmdir %D/%%CONFDIR%% 2>/dev/null || true +@cwd / +%%LOCALSTATEDIR%%/security.fdb.sample +@exec [ -f %%LOCALSTATEDIR%%/security.fdb ] || cp %%LOCALSTATEDIR%%/security.fdb.sample %%LOCALSTATEDIR%%/security.fdb +@unexec if cmp -s %%LOCALSTATEDIR%%/security.fdb %%LOCALSTATEDIR%%/security.fdb.sample; then rm -f %%LOCALSTATEDIR%%/security.fdb; fi +%%LOCALSTATEDIR%%/RELNOTES +%%LOCALSTATEDIR%%/UDF/fbudf.so +%%LOCALSTATEDIR%%/UDF/fbudf.sql +%%LOCALSTATEDIR%%/UDF/ib_udf.so +%%LOCALSTATEDIR%%/UDF/ib_udf.sql +%%LOCALSTATEDIR%%/help/help.fdb +%%LOCALSTATEDIR%%/intl/fbintl +@unexec [ -s %%LOCALSTATEDIR%%/firebird.log ] || rm -f %%LOCALSTATEDIR%%/firebird.log +@unexec rm -f %%LOCALSTATEDIR%%/isc_event1.`hostname` +@unexec rm -f %%LOCALSTATEDIR%%/isc_init1.`hostname` +@unexec rm -f %%LOCALSTATEDIR%%/isc_lock1.`hostname` +@dirrm %%LOCALSTATEDIR%%/UDF +@dirrm %%LOCALSTATEDIR%%/help +@dirrm %%LOCALSTATEDIR%%/intl +@unexec rmdir %%LOCALSTATEDIR%% 2>/dev/null || true diff --git a/databases/firebird-server/pkg-plist.client b/databases/firebird-server/pkg-plist.client index 69f089b9f4a9..3b76148e4b3d 100644 --- a/databases/firebird-server/pkg-plist.client +++ b/databases/firebird-server/pkg-plist.client @@ -1,12 +1,5 @@ @comment $FreeBSD$ -bin/fb_lock_print -bin/gbak -bin/gdef -bin/gds_drop -bin/gfix bin/gpre -bin/gsec -bin/gstat bin/isql bin/qli include/blr.h @@ -24,14 +17,15 @@ lib/libfbembed.so.%%FIREBIRD_VERSION%% lib/libgds.so lib/libgds.so.1 lib/libib_util.so -@unexec if cmp -s %D/etc/firebird.conf %D/etc/firebird.conf.sample; then rm -f %D/etc/firebird.conf; fi -etc/firebird.conf.sample +@unexec if cmp -s %D/%%CONFDIR%%/firebird.conf %D/%%CONFDIR%%/firebird.conf.sample; then rm -f %D/%%CONFDIR%%/firebird.conf; fi +%%CONFDIR%%/firebird.conf.sample @exec [ -f %B/firebird.conf ] || cp %B/%f %B/firebird.conf -%%LIBDATADIR%%/de_DE.msg -%%LIBDATADIR%%/firebird.msg -%%LIBDATADIR%%/fr_FR.msg -%%LIBDATADIR%%/ja_JP.msg -@dirrm %%LIBDATADIR%% +@unexec rmdir %D/%%CONFDIR%% 2>/dev/null || true +%%DATADIR%%/de_DE.msg +%%DATADIR%%/firebird.msg +%%DATADIR%%/fr_FR.msg +%%DATADIR%%/ja_JP.msg +@dirrm %%DATADIR%% %%EXAMPLESDIR%%/align.h %%EXAMPLESDIR%%/api1.c %%EXAMPLESDIR%%/api10.c @@ -79,4 +73,3 @@ etc/firebird.conf.sample %%EXAMPLESDIR%%/stat9.e %%EXAMPLESDIR%%/udf.sql %%EXAMPLESDIR%%/udflib.c -@dirrm %%EXAMPLESDIR%% diff --git a/databases/firebird2-server/Makefile b/databases/firebird2-server/Makefile index 2ec7fd443f6b..f51a90d1c46e 100644 --- a/databases/firebird2-server/Makefile +++ b/databases/firebird2-server/Makefile @@ -7,7 +7,7 @@ PORTNAME?= firebird PORTVERSION= 1.5.2 -PORTREVISION?= 2 +PORTREVISION?= 3 CATEGORIES?= databases MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR=firebird @@ -26,7 +26,10 @@ USE_LIBTOOL_VER= 15 USE_AUTOCONF_VER= 259 USE_GCC= 3.4 -PLIST_SUB= FIREBIRD_VERSION=${PORTVERSION} +LOCALSTATEDIR= /var/db/firebird +CONFDIR= ${PREFIX}/etc/firebird +PLIST_SUB= FIREBIRD_VERSION=${PORTVERSION} \ + LOCALSTATEDIR=${LOCALSTATEDIR} CONFDIR="etc/firebird" # Don't use ld for linking, use gcc LD= gcc @@ -42,45 +45,43 @@ WRKSRC= ${WRKDIR}/${DISTNAME} # Server part stuff LIB_DEPENDS+= fbembed.1:${PORTSDIR}/databases/firebird-client -AUTOGENARGS= --prefix=${PREFIX}/firebird \ - --with-lock-manager +AUTOGENARGS= --with-lock-manager -ALL_TARGET= firebird_boot ref_databases msgs intl otherfiles \ - inet_server extlib - -# Use own user and group when install server part -BINGRP= firebird -BINMODE= 550 -SHAREGRP= firebird +ALL_TARGET= firebird_boot ref_databases msgs libfbembed intl otherfiles \ + inet_server extlib embed_gfix embed_gbak embed_gdef embed_util SUB_FILES= pkg-install pkg-message aliases.conf PKGMESSAGE= ${WRKDIR}/pkg-message PKGINSTALL= ${WRKDIR}/pkg-install -SERVER_BIN= fb_inet_server fb_lock_mgr +SUID_BIN= fb_inet_server fb_lock_mgr gds_drop +UTIL_BIN= fb_lock_print gbak gdef gfix gsec gstat UDF_SO= ib_udf.so fbudf.so UDF_SQL= src/extlib/ib_udf.sql src/extlib/fbudf/fbudf.sql CONFLICTS= firebird-devel-[0-9]* .else # Client part stuff -AUTOGENARGS= --prefix=${PREFIX} \ - --with-editline +AUTOGENARGS= --with-editline -ALL_TARGET= firebird_basic libfbembed embed_gfix embed_gbak embed_isql embed_gpre \ - embed_util embed_gdef embed_qli libfbclient extlib +ALL_TARGET= firebird_basic libfbembed embed_isql embed_gpre \ + embed_gdef embed_qli libfbclient extlib +#ALL_TARGET= firebird_basic libfbembed libfbclient \ +# client_gpre client_gdef client_isql client_qli extlib INSTALLS_SHLIB= yes -LIBDATADIR= ${PREFIX}/libdata/firebird -PLIST_SUB+= LIBDATADIR="libdata/firebird" -CLIENT_BIN= fb_lock_print gbak gdef gds_drop gfix gpre gsec gstat isql qli +CLIENT_BIN= gpre isql qli + +CONFIGURE_ENV+= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" PTHREAD_LIBS="${PTHREAD_LIBS}" .if !defined(NOPORTDOCS) PORTDOCS= * .endif .endif +MAKE_ENV+= CC=${CC} CXX=${CXX} FIREBIRD_TMP="${WRKDIR}" FIREBIRD_LOCK="${WRKDIR}" + .include <bsd.port.pre.mk> .if !defined(CLIENT_ONLY) @@ -99,14 +100,6 @@ pre-everything:: .endif .endif -post-patch: -.if !defined(CLIENT_ONLY) - @${REINPLACE_CMD} -e 's|^\(LINK_OPTS +=.*\)$$|\1 -L${LOCALBASE}/lib|' \ - ${WRKSRC}/builds/posix/Makefile.in.inet_server -.endif - @${REINPLACE_CMD} -e 's|%%LIBDATADIR%%|${LIBDATADIR}|g' \ - ${WRKSRC}/src/jrd/gds.cpp - .if !defined(CLIENT_ONLY) pre-install: @${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL @@ -116,59 +109,70 @@ post-install: @${CAT} ${PKGMESSAGE} .endif +.ifndef WITHOUT_IPC_CLEANUP +pre-build: + [ -f ${WRKDIR}/ipcs.pre.build ] || /usr/bin/ipcs -s | ${TAIL} -n +3 | \ + ${GREP} -F `${ID} -un` | ${CAT} > ${WRKDIR}/ipcs.pre.build + +post-build: + /usr/bin/ipcs -s | ${TAIL} -n +3 | ${GREP} -F `${ID} -un` | ${CAT} > ${WRKDIR}/ipcs.post.build + /usr/bin/diff -n ${WRKDIR}/ipcs.pre.build ${WRKDIR}/ipcs.post.build | \ + ${TAIL} -n +2 | ${SED} -E 's/^s +([0-9]+).*$$/\/usr\/bin\/ipcrm -s \1/' > ${WRKDIR}/ipcrm.sh + ${SH} ${WRKDIR}/ipcrm.sh +.endif + do-configure: - @(cd ${WRKSRC} && ${SETENV} CC=${CC} CXX=${CXX} MAKE=${GMAKE} \ - ${AUTOTOOLS_VARS} ./autogen.sh ${AUTOGENARGS}) + @(cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${MAKE_ENV} MAKE=${GMAKE} \ + ${AUTOTOOLS_VARS} ./autogen.sh --localstatedir=${LOCALSTATEDIR} \ + --prefix=${LOCALSTATEDIR} --exec-prefix=${PREFIX} \ + --sysconfdir=${CONFDIR} --datadir=${DATADIR} ${AUTOGENARGS}) post-configure: @${REINPLACE_CMD} -e 's|__attribute__ ((__unused__));||' \ ${WRKSRC}/src/dsql/parse.cpp - @${REINPLACE_CMD} -e 's|firebird\.conf|${PREFIX}/etc/firebird.conf|g; \ - s|root_dir + string(CONFIG_FILE)|string(CONFIG_FILE)|g' \ - ${WRKSRC}/src/jrd/os/posix/config_root.cpp - -do-build: - @(cd ${WRKSRC} && ${SETENV} CC=${CC} CXX=${CXX} ${GMAKE} ${ALL_TARGET}) do-install: .if !defined(CLIENT_ONLY) - ${MKDIR} ${PREFIX}/firebird -.for f in UDF bin help intl - ${MKDIR} ${PREFIX}/firebird/${f} - ${CHOWN} ${BINOWN}:${BINGRP} ${PREFIX}/firebird/${f} -.endfor + ${INSTALL_PROGRAM} ${UTIL_BIN:S!^!${WRKSRC}/gen/firebird/bin/!} ${PREFIX}/bin - ${INSTALL_DATA} ${WRKDIR}/aliases.conf ${PREFIX}/firebird/aliases.conf.sample - ${INSTALL_DATA} -m 660 -o firebird ${WRKSRC}/gen/firebird/security.fdb \ - ${PREFIX}/firebird/security.fdb.sample - ${INSTALL_DATA} -m 0440 ${WRKSRC}/gen/firebird/help/help.fdb ${PREFIX}/firebird/help + ${INSTALL_PROGRAM} -o firebird -g firebird -m 6550 \ + ${SUID_BIN:S!^!${WRKSRC}/gen/firebird/bin/!} ${PREFIX}/sbin - ${INSTALL_DATA} ${UDF_SO:S!^!${WRKSRC}/gen/firebird/UDF/!} \ - ${UDF_SQL:S!^!${WRKSRC}/!} ${PREFIX}/firebird/UDF + @${MKDIR} ${CONFDIR} + ${INSTALL_DATA} ${WRKDIR}/aliases.conf ${CONFDIR}/aliases.conf.sample - ${INSTALL_PROGRAM} -o firebird \ - ${SERVER_BIN:S!^!${WRKSRC}/gen/firebird/bin/!} ${PREFIX}/firebird/bin - ${CHMOD} u+s ${SERVER_BIN:S!^!${PREFIX}/firebird/bin/!} + ${MKDIR} ${LOCALSTATEDIR}/UDF ${LOCALSTATEDIR}/help ${LOCALSTATEDIR}/intl + + ${INSTALL_DATA} -m 0440 ${UDF_SO:S!^!${WRKSRC}/gen/firebird/UDF/!} \ + ${UDF_SQL:S!^!${WRKSRC}/!} ${LOCALSTATEDIR}/UDF + +.if !exists(${LOCALSTATEDIR}/security.fdb) + ${INSTALL_DATA} -m 0660 -o firebird -g firebird ${WRKSRC}/gen/firebird/security.fdb \ + ${LOCALSTATEDIR}/security.fdb +.endif + ${INSTALL_DATA} -m 0660 -o firebird -g firebird ${WRKSRC}/gen/firebird/security.fdb \ + ${LOCALSTATEDIR}/security.fdb.sample - ${INSTALL_DATA} ${WRKSRC}/gen/firebird/intl/libfbintl.so ${PREFIX}/firebird/intl/fbintl + ${INSTALL_DATA} -m 0440 -g firebird ${WRKSRC}/gen/firebird/help/help.fdb \ + ${LOCALSTATEDIR}/help - ${INSTALL_DATA} ${FILESDIR}/RELNOTES ${PREFIX}/firebird + ${INSTALL_DATA} ${WRKSRC}/gen/firebird/intl/libfbintl.so ${LOCALSTATEDIR}/intl/fbintl - # runtime files (.lock, .log) still placed to ${PREFIX}/firebird - ${CHOWN} firebird:firebird ${PREFIX}/firebird - ${CHOWN} -R firebird:firebird ${PREFIX}/firebird/help + # runtime files - lock, firebird.log, security.fdb + ${CHOWN} -R firebird:firebird ${LOCALSTATEDIR} + ${INSTALL_DATA} ${FILESDIR}/RELNOTES ${LOCALSTATEDIR} .else # defined CLIENT_ONLY ${INSTALL_PROGRAM} ${CLIENT_BIN:S!^!${WRKSRC}/gen/firebird/bin/!} \ ${PREFIX}/bin - @${MKDIR} ${PREFIX}/etc -.if !exists(${PREFIX}/etc/firebird.conf) - ${INSTALL_DATA} ${WRKSRC}/gen/firebird/misc/firebird.conf ${PREFIX}/etc + @${MKDIR} ${CONFDIR} +.if !exists(${CONFDIR}/firebird.conf) + ${INSTALL_DATA} ${WRKSRC}/gen/firebird/misc/firebird.conf ${CONFDIR} .endif - ${INSTALL_DATA} ${WRKSRC}/gen/firebird/misc/firebird.conf ${PREFIX}/etc/firebird.conf.sample + ${INSTALL_DATA} ${WRKSRC}/gen/firebird/misc/firebird.conf ${CONFDIR}/firebird.conf.sample ${INSTALL_DATA} ${WRKSRC}/gen/firebird/lib/libib_util.so \ ${WRKSRC}/gen/firebird/lib/libfbclient.so.${PORTVERSION} \ @@ -186,8 +190,8 @@ do-install: @${MKDIR} ${PREFIX}/include ${INSTALL_DATA} ${WRKSRC}/gen/firebird/include/*.h ${PREFIX}/include - @${MKDIR} ${LIBDATADIR} - ${INSTALL_DATA} ${WRKSRC}/gen/firebird/*.msg ${LIBDATADIR} + @${MKDIR} ${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/gen/firebird/*.msg ${DATADIR} .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR}/sql.extensions @@ -199,6 +203,8 @@ do-install: @${ECHO_MSG} "===> Installing examples for ${PKGNAME}" @${MKDIR} ${EXAMPLESDIR} ${INSTALL_DATA} ${WRKSRC}/gen/firebird/examples/v5/* ${EXAMPLESDIR} + ${CHOWN} firebird:firebird ${EXAMPLESDIR}/employee.* + ${CHMOD} 0664 ${EXAMPLESDIR}/employee.* .endif .include <bsd.port.post.mk> diff --git a/databases/firebird2-server/files/RELNOTES b/databases/firebird2-server/files/RELNOTES index 0af872b2d234..2685519c686e 100644 --- a/databases/firebird2-server/files/RELNOTES +++ b/databases/firebird2-server/files/RELNOTES @@ -21,7 +21,7 @@ have been removed. The former can be accomplished with 'ps ax For example, after building and installing the port, you will probably go through something like this: -# isql /usr/local/firebird/security.fdb +# isql /var/db/firebird/security.fdb Statement failed, SQLCODE = -902 operating system directive semget failed @@ -86,7 +86,7 @@ a username and password already defined in security.fdb. For example: gsec > add myuser -pass mypass > quit -isql -u myuser -p mypass localhost:/usr/local/firebird/examples/employee.fdb +isql -u myuser -p mypass localhost:/usr/local/share/firebird/examples/employee.fdb This should reduce the need for hosts defined in /etc/hosts.equiv. diff --git a/databases/firebird2-server/files/aliases.conf.in b/databases/firebird2-server/files/aliases.conf.in index a49d31d96fdf..92b5b620c07a 100644 --- a/databases/firebird2-server/files/aliases.conf.in +++ b/databases/firebird2-server/files/aliases.conf.in @@ -5,4 +5,5 @@ # Examples: # # employee = %%EXAMPLESDIR%%/employee.fdb +# security = /var/db/firebird/security.fdb # diff --git a/databases/firebird2-server/files/patch-builds%make.new%config%config.h.in b/databases/firebird2-server/files/patch-builds%make.new%config%config.h.in new file mode 100644 index 000000000000..b3073379ba55 --- /dev/null +++ b/databases/firebird2-server/files/patch-builds%make.new%config%config.h.in @@ -0,0 +1,11 @@ +--- builds/make.new/config/config.h.in.orig Sun Jul 6 05:07:48 2003 ++++ builds/make.new/config/config.h.in Wed Jul 27 13:07:37 2005 +@@ -190,5 +190,8 @@ + #undef SINIXZ + + #define FB_PREFIX "/usr/local/firebird" ++#define FB_EXEC_PREFIX "/usr/local" ++#define FB_CONF_PREFIX "/usr/local/etc/firebird" ++#define FB_MSG_PREFIX "/usr/local/libdata/firebird" + + #endif diff --git a/databases/firebird2-server/files/patch-builds::posix::Makefile.in.inet_server b/databases/firebird2-server/files/patch-builds::posix::Makefile.in.inet_server deleted file mode 100644 index 8dcddef34a6a..000000000000 --- a/databases/firebird2-server/files/patch-builds::posix::Makefile.in.inet_server +++ /dev/null @@ -1,20 +0,0 @@ ---- builds/posix/Makefile.in.inet_server.orig Fri Sep 17 20:34:21 2004 -+++ builds/posix/Makefile.in.inet_server Wed Mar 2 16:09:41 2005 -@@ -39,6 +39,8 @@ - - @SET_MAKE@ - -+LINK_OPTS += -+ - SERVER_Files = server_stub.cpp - SERVER_Sources = $(addprefix remote/, $(SERVER_Files)) - SERVER_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(SERVER_Sources)))) -@@ -51,7 +53,7 @@ - - # SD: We don't need to rebuild fb_inet_server every time libfbembed.so changed, - # but we must ensure it's existance --fb_inet_server : $(LIBFBEMBED_SO) $(FB_CLASSIC_SERVER) -+fb_inet_server : $(FB_CLASSIC_SERVER) - - $(FB_CLASSIC_SERVER): $(SERVER_Objects) - $(LD) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LIB_GUI) $(LINK_LIBS) diff --git a/databases/firebird2-server/files/patch-configure.in b/databases/firebird2-server/files/patch-configure.in new file mode 100644 index 000000000000..562421312eb3 --- /dev/null +++ b/databases/firebird2-server/files/patch-configure.in @@ -0,0 +1,12 @@ +--- configure.in.orig Thu Dec 9 17:43:18 2004 ++++ configure.in Wed Jul 27 13:06:06 2005 +@@ -605,6 +605,9 @@ + AC_SUBST(NEW_FIREBIRD_DIR) + + AC_DEFINE_UNQUOTED(FB_PREFIX, $(if test "x$prefix" = "xNONE" ; then echo \"$ac_default_prefix\"; else echo \"$prefix\"; fi)) ++AC_DEFINE_UNQUOTED(FB_EXEC_PREFIX, "$exec_prefix") ++AC_DEFINE_UNQUOTED(FB_CONF_PREFIX, "$sysconfdir") ++AC_DEFINE_UNQUOTED(FB_MSG_PREFIX, "$datadir") + + AC_CONFIG_COMMANDS(,,[ + dnl ### GEN ### directories for preprocessed cpp, databases and output diff --git a/databases/firebird2-server/files/patch-src%jrd%db_alias.cpp b/databases/firebird2-server/files/patch-src%jrd%db_alias.cpp new file mode 100644 index 000000000000..8c0e56b144da --- /dev/null +++ b/databases/firebird2-server/files/patch-src%jrd%db_alias.cpp @@ -0,0 +1,13 @@ +--- src/jrd/db_alias.cpp.orig Mon Aug 18 01:16:41 2003 ++++ src/jrd/db_alias.cpp Mon Jul 25 15:07:45 2005 +@@ -37,8 +37,8 @@ + + bool ResolveDatabaseAlias(const char* alias, char* database) + { +- TEXT alias_filename[MAXPATHLEN]; +- gds__prefix(alias_filename, const_cast<char*>(ALIAS_FILE)); ++ TEXT alias_filename[MAXPATHLEN] = FB_CONF_PREFIX "/"; ++ strlcat(alias_filename, ALIAS_FILE, MAXPATHLEN); + ConfigFile aliasConfig(false); + aliasConfig.setConfigFile(alias_filename); + diff --git a/databases/firebird-server/files/patch-src::jrd::gds.cpp b/databases/firebird2-server/files/patch-src%jrd%gds.cpp index c9c19d9fe829..a68b98955e5f 100644 --- a/databases/firebird-server/files/patch-src::jrd::gds.cpp +++ b/databases/firebird2-server/files/patch-src%jrd%gds.cpp @@ -1,12 +1,11 @@ ---- src/jrd/gds.cpp.orig Sun May 22 18:52:41 2005 -+++ src/jrd/gds.cpp Sun May 22 18:55:44 2005 -@@ -1732,8 +1732,8 @@ - +--- src/jrd/gds.cpp.orig Mon Nov 22 08:11:11 2004 ++++ src/jrd/gds.cpp Wed Jul 27 13:10:40 2005 +@@ -1733,7 +1733,7 @@ if (ib_prefix_msg == NULL) { if (!(ib_prefix_msg = getenv(FB_MSG_ENV))) { -+ strncpy(ib_prefix_msg_val, "%%LIBDATADIR%%", MAXPATHLEN); ib_prefix_msg = ib_prefix_msg_val; - gds__prefix(ib_prefix_msg, ""); ++ strlcpy(ib_prefix_msg_val, FB_MSG_PREFIX, MAXPATHLEN); } else { strcat(ib_prefix_msg_val, ib_prefix_msg); diff --git a/databases/firebird2-server/files/patch-src%jrd%os%posix%config_root.cpp b/databases/firebird2-server/files/patch-src%jrd%os%posix%config_root.cpp new file mode 100644 index 000000000000..3af960c1599e --- /dev/null +++ b/databases/firebird2-server/files/patch-src%jrd%os%posix%config_root.cpp @@ -0,0 +1,10 @@ +--- src/jrd/os/posix/config_root.cpp.orig Mon Jul 25 15:19:18 2005 ++++ src/jrd/os/posix/config_root.cpp Mon Jul 25 15:19:49 2005 +@@ -152,6 +152,6 @@ + + const char *ConfigRoot::getConfigFile() const + { +- static string file = root_dir + string(CONFIG_FILE); ++ static string file = string(FB_CONF_PREFIX) + PathUtils::dir_sep + string(CONFIG_FILE); + return file.c_str(); + } diff --git a/databases/firebird2-server/files/patch-src%lock%lock.cpp b/databases/firebird2-server/files/patch-src%lock%lock.cpp new file mode 100644 index 000000000000..7f550183e379 --- /dev/null +++ b/databases/firebird2-server/files/patch-src%lock%lock.cpp @@ -0,0 +1,15 @@ +--- src/lock/lock.cpp.orig Mon Mar 29 08:35:49 2004 ++++ src/lock/lock.cpp Wed Jul 27 14:01:51 2005 +@@ -2800,7 +2800,11 @@ + #ifdef DEBUG_MANAGER + gds__prefix(string, DEBUG_MANAGER); + #else +- gds__prefix(string, LOCK_MANAGER); ++ if (! getenv("FIREBIRD")) { ++ strlcpy(string, FB_EXEC_PREFIX "/s" LOCK_MANAGER, MAXPATHLEN); ++ }else { ++ gds__prefix(string, LOCK_MANAGER); ++ } + #endif + if (statistics(string, &stat_buf) == -1) { + sprintf (errorstring, "can't start lock manager: %s", string); diff --git a/databases/firebird2-server/files/pkg-install.in b/databases/firebird2-server/files/pkg-install.in index b2da81e8fb00..ee702916f43c 100644 --- a/databases/firebird2-server/files/pkg-install.in +++ b/databases/firebird2-server/files/pkg-install.in @@ -41,7 +41,7 @@ echo "firebird user using gid $fbGID" if which -s pw; then if [ $nofbuid -ne 0 ]; then pw useradd firebird -u $fbUID -g $fbGID -h - -s /bin/sh \ - -d $PKG_PREFIX/firebird -c "Firebird Database Administrator" + -d /var/db/firebird -c "Firebird Database Administrator" fi else echo -n "unable to create user firebird - please create it manually," @@ -51,7 +51,7 @@ fi ;; POST-INSTALL) -cd $PKG_PREFIX/firebird +cd /var/db/firebird # Lock files diff --git a/databases/firebird2-server/files/pkg-message.in b/databases/firebird2-server/files/pkg-message.in index 02894da409f2..4466c517428e 100644 --- a/databases/firebird2-server/files/pkg-message.in +++ b/databases/firebird2-server/files/pkg-message.in @@ -8,18 +8,10 @@ gds_db 3050/tcp #InterBase Database Remote Protocol And add the following line to /etc/inetd.conf -gds_db stream tcp nowait firebird %%PREFIX%%/firebird/bin/fb_inet_server fb_inet_server +gds_db stream tcp nowait firebird %%PREFIX%%/sbin/fb_inet_server fb_inet_server And finally restart inetd. -A symbolic link from /usr/interbase -> %%PREFIX%%/firebird -may be needed for compatibility with existing programs -that use Firebird. - -The symbolic link can be created with: - -% ln -s %%PREFIX%%/firebird /usr/interbase - It is STRONGLY recommended that you change the SYSDBA password with: diff --git a/databases/firebird2-server/pkg-plist b/databases/firebird2-server/pkg-plist index 76072509a40e..20356943c128 100644 --- a/databases/firebird2-server/pkg-plist +++ b/databases/firebird2-server/pkg-plist @@ -1,25 +1,33 @@ @comment $FreeBSD$ -firebird/RELNOTES -firebird/UDF/fbudf.so -firebird/UDF/fbudf.sql -firebird/UDF/ib_udf.so -firebird/UDF/ib_udf.sql -@unexec if cmp -s %D/firebird/aliases.conf %D/firebird/aliases.conf.sample; then rm -f %D/firebird/aliases.conf; fi -firebird/aliases.conf.sample +bin/fb_lock_print +bin/gbak +bin/gdef +bin/gfix +bin/gsec +bin/gstat +sbin/fb_inet_server +sbin/fb_lock_mgr +sbin/gds_drop +%%CONFDIR%%/aliases.conf.sample @exec [ -f %B/aliases.conf ] || cp %B/%f %B/aliases.conf -firebird/bin/fb_inet_server -firebird/bin/fb_lock_mgr -@unexec [ -s %D/firebird/firebird.log ] || rm -f %D/firebird/firebird.log -firebird/help/help.fdb -firebird/intl/fbintl -@unexec rm -f %D/firebird/isc_event1.`hostname` -@unexec rm -f %D/firebird/isc_init1.`hostname` -@unexec rm -f %D/firebird/isc_lock1.`hostname` -@unexec if cmp -s %D/firebird/security.fdb %D/firebird/security.fdb.sample; then rm -f %D/firebird/security.fdb; fi -firebird/security.fdb.sample -@exec [ -f %B/security.fdb ] || cp %B/%f %B/security.fdb -@dirrm firebird/UDF -@dirrm firebird/bin -@dirrm firebird/help -@dirrm firebird/intl -@unexec rmdir %D/firebird 2>/dev/null || true +@unexec if cmp -s %D/%%CONFDIR%%/aliases.conf %D/%%CONFDIR%%/aliases.conf.sample; then rm -f %D/%%CONFDIR%%/aliases.conf; fi +@unexec rmdir %D/%%CONFDIR%% 2>/dev/null || true +@cwd / +%%LOCALSTATEDIR%%/security.fdb.sample +@exec [ -f %%LOCALSTATEDIR%%/security.fdb ] || cp %%LOCALSTATEDIR%%/security.fdb.sample %%LOCALSTATEDIR%%/security.fdb +@unexec if cmp -s %%LOCALSTATEDIR%%/security.fdb %%LOCALSTATEDIR%%/security.fdb.sample; then rm -f %%LOCALSTATEDIR%%/security.fdb; fi +%%LOCALSTATEDIR%%/RELNOTES +%%LOCALSTATEDIR%%/UDF/fbudf.so +%%LOCALSTATEDIR%%/UDF/fbudf.sql +%%LOCALSTATEDIR%%/UDF/ib_udf.so +%%LOCALSTATEDIR%%/UDF/ib_udf.sql +%%LOCALSTATEDIR%%/help/help.fdb +%%LOCALSTATEDIR%%/intl/fbintl +@unexec [ -s %%LOCALSTATEDIR%%/firebird.log ] || rm -f %%LOCALSTATEDIR%%/firebird.log +@unexec rm -f %%LOCALSTATEDIR%%/isc_event1.`hostname` +@unexec rm -f %%LOCALSTATEDIR%%/isc_init1.`hostname` +@unexec rm -f %%LOCALSTATEDIR%%/isc_lock1.`hostname` +@dirrm %%LOCALSTATEDIR%%/UDF +@dirrm %%LOCALSTATEDIR%%/help +@dirrm %%LOCALSTATEDIR%%/intl +@unexec rmdir %%LOCALSTATEDIR%% 2>/dev/null || true diff --git a/databases/firebird2-server/pkg-plist.client b/databases/firebird2-server/pkg-plist.client index 69f089b9f4a9..3b76148e4b3d 100644 --- a/databases/firebird2-server/pkg-plist.client +++ b/databases/firebird2-server/pkg-plist.client @@ -1,12 +1,5 @@ @comment $FreeBSD$ -bin/fb_lock_print -bin/gbak -bin/gdef -bin/gds_drop -bin/gfix bin/gpre -bin/gsec -bin/gstat bin/isql bin/qli include/blr.h @@ -24,14 +17,15 @@ lib/libfbembed.so.%%FIREBIRD_VERSION%% lib/libgds.so lib/libgds.so.1 lib/libib_util.so -@unexec if cmp -s %D/etc/firebird.conf %D/etc/firebird.conf.sample; then rm -f %D/etc/firebird.conf; fi -etc/firebird.conf.sample +@unexec if cmp -s %D/%%CONFDIR%%/firebird.conf %D/%%CONFDIR%%/firebird.conf.sample; then rm -f %D/%%CONFDIR%%/firebird.conf; fi +%%CONFDIR%%/firebird.conf.sample @exec [ -f %B/firebird.conf ] || cp %B/%f %B/firebird.conf -%%LIBDATADIR%%/de_DE.msg -%%LIBDATADIR%%/firebird.msg -%%LIBDATADIR%%/fr_FR.msg -%%LIBDATADIR%%/ja_JP.msg -@dirrm %%LIBDATADIR%% +@unexec rmdir %D/%%CONFDIR%% 2>/dev/null || true +%%DATADIR%%/de_DE.msg +%%DATADIR%%/firebird.msg +%%DATADIR%%/fr_FR.msg +%%DATADIR%%/ja_JP.msg +@dirrm %%DATADIR%% %%EXAMPLESDIR%%/align.h %%EXAMPLESDIR%%/api1.c %%EXAMPLESDIR%%/api10.c @@ -79,4 +73,3 @@ etc/firebird.conf.sample %%EXAMPLESDIR%%/stat9.e %%EXAMPLESDIR%%/udf.sql %%EXAMPLESDIR%%/udflib.c -@dirrm %%EXAMPLESDIR%% diff --git a/databases/firebird20-server/Makefile b/databases/firebird20-server/Makefile index 2ec7fd443f6b..f51a90d1c46e 100644 --- a/databases/firebird20-server/Makefile +++ b/databases/firebird20-server/Makefile @@ -7,7 +7,7 @@ PORTNAME?= firebird PORTVERSION= 1.5.2 -PORTREVISION?= 2 +PORTREVISION?= 3 CATEGORIES?= databases MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR=firebird @@ -26,7 +26,10 @@ USE_LIBTOOL_VER= 15 USE_AUTOCONF_VER= 259 USE_GCC= 3.4 -PLIST_SUB= FIREBIRD_VERSION=${PORTVERSION} +LOCALSTATEDIR= /var/db/firebird +CONFDIR= ${PREFIX}/etc/firebird +PLIST_SUB= FIREBIRD_VERSION=${PORTVERSION} \ + LOCALSTATEDIR=${LOCALSTATEDIR} CONFDIR="etc/firebird" # Don't use ld for linking, use gcc LD= gcc @@ -42,45 +45,43 @@ WRKSRC= ${WRKDIR}/${DISTNAME} # Server part stuff LIB_DEPENDS+= fbembed.1:${PORTSDIR}/databases/firebird-client -AUTOGENARGS= --prefix=${PREFIX}/firebird \ - --with-lock-manager +AUTOGENARGS= --with-lock-manager -ALL_TARGET= firebird_boot ref_databases msgs intl otherfiles \ - inet_server extlib - -# Use own user and group when install server part -BINGRP= firebird -BINMODE= 550 -SHAREGRP= firebird +ALL_TARGET= firebird_boot ref_databases msgs libfbembed intl otherfiles \ + inet_server extlib embed_gfix embed_gbak embed_gdef embed_util SUB_FILES= pkg-install pkg-message aliases.conf PKGMESSAGE= ${WRKDIR}/pkg-message PKGINSTALL= ${WRKDIR}/pkg-install -SERVER_BIN= fb_inet_server fb_lock_mgr +SUID_BIN= fb_inet_server fb_lock_mgr gds_drop +UTIL_BIN= fb_lock_print gbak gdef gfix gsec gstat UDF_SO= ib_udf.so fbudf.so UDF_SQL= src/extlib/ib_udf.sql src/extlib/fbudf/fbudf.sql CONFLICTS= firebird-devel-[0-9]* .else # Client part stuff -AUTOGENARGS= --prefix=${PREFIX} \ - --with-editline +AUTOGENARGS= --with-editline -ALL_TARGET= firebird_basic libfbembed embed_gfix embed_gbak embed_isql embed_gpre \ - embed_util embed_gdef embed_qli libfbclient extlib +ALL_TARGET= firebird_basic libfbembed embed_isql embed_gpre \ + embed_gdef embed_qli libfbclient extlib +#ALL_TARGET= firebird_basic libfbembed libfbclient \ +# client_gpre client_gdef client_isql client_qli extlib INSTALLS_SHLIB= yes -LIBDATADIR= ${PREFIX}/libdata/firebird -PLIST_SUB+= LIBDATADIR="libdata/firebird" -CLIENT_BIN= fb_lock_print gbak gdef gds_drop gfix gpre gsec gstat isql qli +CLIENT_BIN= gpre isql qli + +CONFIGURE_ENV+= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" PTHREAD_LIBS="${PTHREAD_LIBS}" .if !defined(NOPORTDOCS) PORTDOCS= * .endif .endif +MAKE_ENV+= CC=${CC} CXX=${CXX} FIREBIRD_TMP="${WRKDIR}" FIREBIRD_LOCK="${WRKDIR}" + .include <bsd.port.pre.mk> .if !defined(CLIENT_ONLY) @@ -99,14 +100,6 @@ pre-everything:: .endif .endif -post-patch: -.if !defined(CLIENT_ONLY) - @${REINPLACE_CMD} -e 's|^\(LINK_OPTS +=.*\)$$|\1 -L${LOCALBASE}/lib|' \ - ${WRKSRC}/builds/posix/Makefile.in.inet_server -.endif - @${REINPLACE_CMD} -e 's|%%LIBDATADIR%%|${LIBDATADIR}|g' \ - ${WRKSRC}/src/jrd/gds.cpp - .if !defined(CLIENT_ONLY) pre-install: @${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL @@ -116,59 +109,70 @@ post-install: @${CAT} ${PKGMESSAGE} .endif +.ifndef WITHOUT_IPC_CLEANUP +pre-build: + [ -f ${WRKDIR}/ipcs.pre.build ] || /usr/bin/ipcs -s | ${TAIL} -n +3 | \ + ${GREP} -F `${ID} -un` | ${CAT} > ${WRKDIR}/ipcs.pre.build + +post-build: + /usr/bin/ipcs -s | ${TAIL} -n +3 | ${GREP} -F `${ID} -un` | ${CAT} > ${WRKDIR}/ipcs.post.build + /usr/bin/diff -n ${WRKDIR}/ipcs.pre.build ${WRKDIR}/ipcs.post.build | \ + ${TAIL} -n +2 | ${SED} -E 's/^s +([0-9]+).*$$/\/usr\/bin\/ipcrm -s \1/' > ${WRKDIR}/ipcrm.sh + ${SH} ${WRKDIR}/ipcrm.sh +.endif + do-configure: - @(cd ${WRKSRC} && ${SETENV} CC=${CC} CXX=${CXX} MAKE=${GMAKE} \ - ${AUTOTOOLS_VARS} ./autogen.sh ${AUTOGENARGS}) + @(cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${MAKE_ENV} MAKE=${GMAKE} \ + ${AUTOTOOLS_VARS} ./autogen.sh --localstatedir=${LOCALSTATEDIR} \ + --prefix=${LOCALSTATEDIR} --exec-prefix=${PREFIX} \ + --sysconfdir=${CONFDIR} --datadir=${DATADIR} ${AUTOGENARGS}) post-configure: @${REINPLACE_CMD} -e 's|__attribute__ ((__unused__));||' \ ${WRKSRC}/src/dsql/parse.cpp - @${REINPLACE_CMD} -e 's|firebird\.conf|${PREFIX}/etc/firebird.conf|g; \ - s|root_dir + string(CONFIG_FILE)|string(CONFIG_FILE)|g' \ - ${WRKSRC}/src/jrd/os/posix/config_root.cpp - -do-build: - @(cd ${WRKSRC} && ${SETENV} CC=${CC} CXX=${CXX} ${GMAKE} ${ALL_TARGET}) do-install: .if !defined(CLIENT_ONLY) - ${MKDIR} ${PREFIX}/firebird -.for f in UDF bin help intl - ${MKDIR} ${PREFIX}/firebird/${f} - ${CHOWN} ${BINOWN}:${BINGRP} ${PREFIX}/firebird/${f} -.endfor + ${INSTALL_PROGRAM} ${UTIL_BIN:S!^!${WRKSRC}/gen/firebird/bin/!} ${PREFIX}/bin - ${INSTALL_DATA} ${WRKDIR}/aliases.conf ${PREFIX}/firebird/aliases.conf.sample - ${INSTALL_DATA} -m 660 -o firebird ${WRKSRC}/gen/firebird/security.fdb \ - ${PREFIX}/firebird/security.fdb.sample - ${INSTALL_DATA} -m 0440 ${WRKSRC}/gen/firebird/help/help.fdb ${PREFIX}/firebird/help + ${INSTALL_PROGRAM} -o firebird -g firebird -m 6550 \ + ${SUID_BIN:S!^!${WRKSRC}/gen/firebird/bin/!} ${PREFIX}/sbin - ${INSTALL_DATA} ${UDF_SO:S!^!${WRKSRC}/gen/firebird/UDF/!} \ - ${UDF_SQL:S!^!${WRKSRC}/!} ${PREFIX}/firebird/UDF + @${MKDIR} ${CONFDIR} + ${INSTALL_DATA} ${WRKDIR}/aliases.conf ${CONFDIR}/aliases.conf.sample - ${INSTALL_PROGRAM} -o firebird \ - ${SERVER_BIN:S!^!${WRKSRC}/gen/firebird/bin/!} ${PREFIX}/firebird/bin - ${CHMOD} u+s ${SERVER_BIN:S!^!${PREFIX}/firebird/bin/!} + ${MKDIR} ${LOCALSTATEDIR}/UDF ${LOCALSTATEDIR}/help ${LOCALSTATEDIR}/intl + + ${INSTALL_DATA} -m 0440 ${UDF_SO:S!^!${WRKSRC}/gen/firebird/UDF/!} \ + ${UDF_SQL:S!^!${WRKSRC}/!} ${LOCALSTATEDIR}/UDF + +.if !exists(${LOCALSTATEDIR}/security.fdb) + ${INSTALL_DATA} -m 0660 -o firebird -g firebird ${WRKSRC}/gen/firebird/security.fdb \ + ${LOCALSTATEDIR}/security.fdb +.endif + ${INSTALL_DATA} -m 0660 -o firebird -g firebird ${WRKSRC}/gen/firebird/security.fdb \ + ${LOCALSTATEDIR}/security.fdb.sample - ${INSTALL_DATA} ${WRKSRC}/gen/firebird/intl/libfbintl.so ${PREFIX}/firebird/intl/fbintl + ${INSTALL_DATA} -m 0440 -g firebird ${WRKSRC}/gen/firebird/help/help.fdb \ + ${LOCALSTATEDIR}/help - ${INSTALL_DATA} ${FILESDIR}/RELNOTES ${PREFIX}/firebird + ${INSTALL_DATA} ${WRKSRC}/gen/firebird/intl/libfbintl.so ${LOCALSTATEDIR}/intl/fbintl - # runtime files (.lock, .log) still placed to ${PREFIX}/firebird - ${CHOWN} firebird:firebird ${PREFIX}/firebird - ${CHOWN} -R firebird:firebird ${PREFIX}/firebird/help + # runtime files - lock, firebird.log, security.fdb + ${CHOWN} -R firebird:firebird ${LOCALSTATEDIR} + ${INSTALL_DATA} ${FILESDIR}/RELNOTES ${LOCALSTATEDIR} .else # defined CLIENT_ONLY ${INSTALL_PROGRAM} ${CLIENT_BIN:S!^!${WRKSRC}/gen/firebird/bin/!} \ ${PREFIX}/bin - @${MKDIR} ${PREFIX}/etc -.if !exists(${PREFIX}/etc/firebird.conf) - ${INSTALL_DATA} ${WRKSRC}/gen/firebird/misc/firebird.conf ${PREFIX}/etc + @${MKDIR} ${CONFDIR} +.if !exists(${CONFDIR}/firebird.conf) + ${INSTALL_DATA} ${WRKSRC}/gen/firebird/misc/firebird.conf ${CONFDIR} .endif - ${INSTALL_DATA} ${WRKSRC}/gen/firebird/misc/firebird.conf ${PREFIX}/etc/firebird.conf.sample + ${INSTALL_DATA} ${WRKSRC}/gen/firebird/misc/firebird.conf ${CONFDIR}/firebird.conf.sample ${INSTALL_DATA} ${WRKSRC}/gen/firebird/lib/libib_util.so \ ${WRKSRC}/gen/firebird/lib/libfbclient.so.${PORTVERSION} \ @@ -186,8 +190,8 @@ do-install: @${MKDIR} ${PREFIX}/include ${INSTALL_DATA} ${WRKSRC}/gen/firebird/include/*.h ${PREFIX}/include - @${MKDIR} ${LIBDATADIR} - ${INSTALL_DATA} ${WRKSRC}/gen/firebird/*.msg ${LIBDATADIR} + @${MKDIR} ${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/gen/firebird/*.msg ${DATADIR} .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR}/sql.extensions @@ -199,6 +203,8 @@ do-install: @${ECHO_MSG} "===> Installing examples for ${PKGNAME}" @${MKDIR} ${EXAMPLESDIR} ${INSTALL_DATA} ${WRKSRC}/gen/firebird/examples/v5/* ${EXAMPLESDIR} + ${CHOWN} firebird:firebird ${EXAMPLESDIR}/employee.* + ${CHMOD} 0664 ${EXAMPLESDIR}/employee.* .endif .include <bsd.port.post.mk> diff --git a/databases/firebird20-server/files/RELNOTES b/databases/firebird20-server/files/RELNOTES index 0af872b2d234..2685519c686e 100644 --- a/databases/firebird20-server/files/RELNOTES +++ b/databases/firebird20-server/files/RELNOTES @@ -21,7 +21,7 @@ have been removed. The former can be accomplished with 'ps ax For example, after building and installing the port, you will probably go through something like this: -# isql /usr/local/firebird/security.fdb +# isql /var/db/firebird/security.fdb Statement failed, SQLCODE = -902 operating system directive semget failed @@ -86,7 +86,7 @@ a username and password already defined in security.fdb. For example: gsec > add myuser -pass mypass > quit -isql -u myuser -p mypass localhost:/usr/local/firebird/examples/employee.fdb +isql -u myuser -p mypass localhost:/usr/local/share/firebird/examples/employee.fdb This should reduce the need for hosts defined in /etc/hosts.equiv. diff --git a/databases/firebird20-server/files/aliases.conf.in b/databases/firebird20-server/files/aliases.conf.in index a49d31d96fdf..92b5b620c07a 100644 --- a/databases/firebird20-server/files/aliases.conf.in +++ b/databases/firebird20-server/files/aliases.conf.in @@ -5,4 +5,5 @@ # Examples: # # employee = %%EXAMPLESDIR%%/employee.fdb +# security = /var/db/firebird/security.fdb # diff --git a/databases/firebird20-server/files/patch-builds%make.new%config%config.h.in b/databases/firebird20-server/files/patch-builds%make.new%config%config.h.in new file mode 100644 index 000000000000..b3073379ba55 --- /dev/null +++ b/databases/firebird20-server/files/patch-builds%make.new%config%config.h.in @@ -0,0 +1,11 @@ +--- builds/make.new/config/config.h.in.orig Sun Jul 6 05:07:48 2003 ++++ builds/make.new/config/config.h.in Wed Jul 27 13:07:37 2005 +@@ -190,5 +190,8 @@ + #undef SINIXZ + + #define FB_PREFIX "/usr/local/firebird" ++#define FB_EXEC_PREFIX "/usr/local" ++#define FB_CONF_PREFIX "/usr/local/etc/firebird" ++#define FB_MSG_PREFIX "/usr/local/libdata/firebird" + + #endif diff --git a/databases/firebird20-server/files/patch-builds::posix::Makefile.in.inet_server b/databases/firebird20-server/files/patch-builds::posix::Makefile.in.inet_server deleted file mode 100644 index 8dcddef34a6a..000000000000 --- a/databases/firebird20-server/files/patch-builds::posix::Makefile.in.inet_server +++ /dev/null @@ -1,20 +0,0 @@ ---- builds/posix/Makefile.in.inet_server.orig Fri Sep 17 20:34:21 2004 -+++ builds/posix/Makefile.in.inet_server Wed Mar 2 16:09:41 2005 -@@ -39,6 +39,8 @@ - - @SET_MAKE@ - -+LINK_OPTS += -+ - SERVER_Files = server_stub.cpp - SERVER_Sources = $(addprefix remote/, $(SERVER_Files)) - SERVER_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(SERVER_Sources)))) -@@ -51,7 +53,7 @@ - - # SD: We don't need to rebuild fb_inet_server every time libfbembed.so changed, - # but we must ensure it's existance --fb_inet_server : $(LIBFBEMBED_SO) $(FB_CLASSIC_SERVER) -+fb_inet_server : $(FB_CLASSIC_SERVER) - - $(FB_CLASSIC_SERVER): $(SERVER_Objects) - $(LD) $(LINK_OPTS) $^ -o $@ $(FBEMBED_LINK) $(LIB_GUI) $(LINK_LIBS) diff --git a/databases/firebird20-server/files/patch-configure.in b/databases/firebird20-server/files/patch-configure.in new file mode 100644 index 000000000000..562421312eb3 --- /dev/null +++ b/databases/firebird20-server/files/patch-configure.in @@ -0,0 +1,12 @@ +--- configure.in.orig Thu Dec 9 17:43:18 2004 ++++ configure.in Wed Jul 27 13:06:06 2005 +@@ -605,6 +605,9 @@ + AC_SUBST(NEW_FIREBIRD_DIR) + + AC_DEFINE_UNQUOTED(FB_PREFIX, $(if test "x$prefix" = "xNONE" ; then echo \"$ac_default_prefix\"; else echo \"$prefix\"; fi)) ++AC_DEFINE_UNQUOTED(FB_EXEC_PREFIX, "$exec_prefix") ++AC_DEFINE_UNQUOTED(FB_CONF_PREFIX, "$sysconfdir") ++AC_DEFINE_UNQUOTED(FB_MSG_PREFIX, "$datadir") + + AC_CONFIG_COMMANDS(,,[ + dnl ### GEN ### directories for preprocessed cpp, databases and output diff --git a/databases/firebird20-server/files/patch-src%jrd%db_alias.cpp b/databases/firebird20-server/files/patch-src%jrd%db_alias.cpp new file mode 100644 index 000000000000..8c0e56b144da --- /dev/null +++ b/databases/firebird20-server/files/patch-src%jrd%db_alias.cpp @@ -0,0 +1,13 @@ +--- src/jrd/db_alias.cpp.orig Mon Aug 18 01:16:41 2003 ++++ src/jrd/db_alias.cpp Mon Jul 25 15:07:45 2005 +@@ -37,8 +37,8 @@ + + bool ResolveDatabaseAlias(const char* alias, char* database) + { +- TEXT alias_filename[MAXPATHLEN]; +- gds__prefix(alias_filename, const_cast<char*>(ALIAS_FILE)); ++ TEXT alias_filename[MAXPATHLEN] = FB_CONF_PREFIX "/"; ++ strlcat(alias_filename, ALIAS_FILE, MAXPATHLEN); + ConfigFile aliasConfig(false); + aliasConfig.setConfigFile(alias_filename); + diff --git a/databases/firebird2-server/files/patch-src::jrd::gds.cpp b/databases/firebird20-server/files/patch-src%jrd%gds.cpp index c9c19d9fe829..a68b98955e5f 100644 --- a/databases/firebird2-server/files/patch-src::jrd::gds.cpp +++ b/databases/firebird20-server/files/patch-src%jrd%gds.cpp @@ -1,12 +1,11 @@ ---- src/jrd/gds.cpp.orig Sun May 22 18:52:41 2005 -+++ src/jrd/gds.cpp Sun May 22 18:55:44 2005 -@@ -1732,8 +1732,8 @@ - +--- src/jrd/gds.cpp.orig Mon Nov 22 08:11:11 2004 ++++ src/jrd/gds.cpp Wed Jul 27 13:10:40 2005 +@@ -1733,7 +1733,7 @@ if (ib_prefix_msg == NULL) { if (!(ib_prefix_msg = getenv(FB_MSG_ENV))) { -+ strncpy(ib_prefix_msg_val, "%%LIBDATADIR%%", MAXPATHLEN); ib_prefix_msg = ib_prefix_msg_val; - gds__prefix(ib_prefix_msg, ""); ++ strlcpy(ib_prefix_msg_val, FB_MSG_PREFIX, MAXPATHLEN); } else { strcat(ib_prefix_msg_val, ib_prefix_msg); diff --git a/databases/firebird20-server/files/patch-src%jrd%os%posix%config_root.cpp b/databases/firebird20-server/files/patch-src%jrd%os%posix%config_root.cpp new file mode 100644 index 000000000000..3af960c1599e --- /dev/null +++ b/databases/firebird20-server/files/patch-src%jrd%os%posix%config_root.cpp @@ -0,0 +1,10 @@ +--- src/jrd/os/posix/config_root.cpp.orig Mon Jul 25 15:19:18 2005 ++++ src/jrd/os/posix/config_root.cpp Mon Jul 25 15:19:49 2005 +@@ -152,6 +152,6 @@ + + const char *ConfigRoot::getConfigFile() const + { +- static string file = root_dir + string(CONFIG_FILE); ++ static string file = string(FB_CONF_PREFIX) + PathUtils::dir_sep + string(CONFIG_FILE); + return file.c_str(); + } diff --git a/databases/firebird20-server/files/patch-src%lock%lock.cpp b/databases/firebird20-server/files/patch-src%lock%lock.cpp new file mode 100644 index 000000000000..7f550183e379 --- /dev/null +++ b/databases/firebird20-server/files/patch-src%lock%lock.cpp @@ -0,0 +1,15 @@ +--- src/lock/lock.cpp.orig Mon Mar 29 08:35:49 2004 ++++ src/lock/lock.cpp Wed Jul 27 14:01:51 2005 +@@ -2800,7 +2800,11 @@ + #ifdef DEBUG_MANAGER + gds__prefix(string, DEBUG_MANAGER); + #else +- gds__prefix(string, LOCK_MANAGER); ++ if (! getenv("FIREBIRD")) { ++ strlcpy(string, FB_EXEC_PREFIX "/s" LOCK_MANAGER, MAXPATHLEN); ++ }else { ++ gds__prefix(string, LOCK_MANAGER); ++ } + #endif + if (statistics(string, &stat_buf) == -1) { + sprintf (errorstring, "can't start lock manager: %s", string); diff --git a/databases/firebird20-server/files/pkg-install.in b/databases/firebird20-server/files/pkg-install.in index b2da81e8fb00..ee702916f43c 100644 --- a/databases/firebird20-server/files/pkg-install.in +++ b/databases/firebird20-server/files/pkg-install.in @@ -41,7 +41,7 @@ echo "firebird user using gid $fbGID" if which -s pw; then if [ $nofbuid -ne 0 ]; then pw useradd firebird -u $fbUID -g $fbGID -h - -s /bin/sh \ - -d $PKG_PREFIX/firebird -c "Firebird Database Administrator" + -d /var/db/firebird -c "Firebird Database Administrator" fi else echo -n "unable to create user firebird - please create it manually," @@ -51,7 +51,7 @@ fi ;; POST-INSTALL) -cd $PKG_PREFIX/firebird +cd /var/db/firebird # Lock files diff --git a/databases/firebird20-server/files/pkg-message.in b/databases/firebird20-server/files/pkg-message.in index 02894da409f2..4466c517428e 100644 --- a/databases/firebird20-server/files/pkg-message.in +++ b/databases/firebird20-server/files/pkg-message.in @@ -8,18 +8,10 @@ gds_db 3050/tcp #InterBase Database Remote Protocol And add the following line to /etc/inetd.conf -gds_db stream tcp nowait firebird %%PREFIX%%/firebird/bin/fb_inet_server fb_inet_server +gds_db stream tcp nowait firebird %%PREFIX%%/sbin/fb_inet_server fb_inet_server And finally restart inetd. -A symbolic link from /usr/interbase -> %%PREFIX%%/firebird -may be needed for compatibility with existing programs -that use Firebird. - -The symbolic link can be created with: - -% ln -s %%PREFIX%%/firebird /usr/interbase - It is STRONGLY recommended that you change the SYSDBA password with: diff --git a/databases/firebird20-server/pkg-plist b/databases/firebird20-server/pkg-plist index 76072509a40e..20356943c128 100644 --- a/databases/firebird20-server/pkg-plist +++ b/databases/firebird20-server/pkg-plist @@ -1,25 +1,33 @@ @comment $FreeBSD$ -firebird/RELNOTES -firebird/UDF/fbudf.so -firebird/UDF/fbudf.sql -firebird/UDF/ib_udf.so -firebird/UDF/ib_udf.sql -@unexec if cmp -s %D/firebird/aliases.conf %D/firebird/aliases.conf.sample; then rm -f %D/firebird/aliases.conf; fi -firebird/aliases.conf.sample +bin/fb_lock_print +bin/gbak +bin/gdef +bin/gfix +bin/gsec +bin/gstat +sbin/fb_inet_server +sbin/fb_lock_mgr +sbin/gds_drop +%%CONFDIR%%/aliases.conf.sample @exec [ -f %B/aliases.conf ] || cp %B/%f %B/aliases.conf -firebird/bin/fb_inet_server -firebird/bin/fb_lock_mgr -@unexec [ -s %D/firebird/firebird.log ] || rm -f %D/firebird/firebird.log -firebird/help/help.fdb -firebird/intl/fbintl -@unexec rm -f %D/firebird/isc_event1.`hostname` -@unexec rm -f %D/firebird/isc_init1.`hostname` -@unexec rm -f %D/firebird/isc_lock1.`hostname` -@unexec if cmp -s %D/firebird/security.fdb %D/firebird/security.fdb.sample; then rm -f %D/firebird/security.fdb; fi -firebird/security.fdb.sample -@exec [ -f %B/security.fdb ] || cp %B/%f %B/security.fdb -@dirrm firebird/UDF -@dirrm firebird/bin -@dirrm firebird/help -@dirrm firebird/intl -@unexec rmdir %D/firebird 2>/dev/null || true +@unexec if cmp -s %D/%%CONFDIR%%/aliases.conf %D/%%CONFDIR%%/aliases.conf.sample; then rm -f %D/%%CONFDIR%%/aliases.conf; fi +@unexec rmdir %D/%%CONFDIR%% 2>/dev/null || true +@cwd / +%%LOCALSTATEDIR%%/security.fdb.sample +@exec [ -f %%LOCALSTATEDIR%%/security.fdb ] || cp %%LOCALSTATEDIR%%/security.fdb.sample %%LOCALSTATEDIR%%/security.fdb +@unexec if cmp -s %%LOCALSTATEDIR%%/security.fdb %%LOCALSTATEDIR%%/security.fdb.sample; then rm -f %%LOCALSTATEDIR%%/security.fdb; fi +%%LOCALSTATEDIR%%/RELNOTES +%%LOCALSTATEDIR%%/UDF/fbudf.so +%%LOCALSTATEDIR%%/UDF/fbudf.sql +%%LOCALSTATEDIR%%/UDF/ib_udf.so +%%LOCALSTATEDIR%%/UDF/ib_udf.sql +%%LOCALSTATEDIR%%/help/help.fdb +%%LOCALSTATEDIR%%/intl/fbintl +@unexec [ -s %%LOCALSTATEDIR%%/firebird.log ] || rm -f %%LOCALSTATEDIR%%/firebird.log +@unexec rm -f %%LOCALSTATEDIR%%/isc_event1.`hostname` +@unexec rm -f %%LOCALSTATEDIR%%/isc_init1.`hostname` +@unexec rm -f %%LOCALSTATEDIR%%/isc_lock1.`hostname` +@dirrm %%LOCALSTATEDIR%%/UDF +@dirrm %%LOCALSTATEDIR%%/help +@dirrm %%LOCALSTATEDIR%%/intl +@unexec rmdir %%LOCALSTATEDIR%% 2>/dev/null || true diff --git a/databases/firebird20-server/pkg-plist.client b/databases/firebird20-server/pkg-plist.client index 69f089b9f4a9..3b76148e4b3d 100644 --- a/databases/firebird20-server/pkg-plist.client +++ b/databases/firebird20-server/pkg-plist.client @@ -1,12 +1,5 @@ @comment $FreeBSD$ -bin/fb_lock_print -bin/gbak -bin/gdef -bin/gds_drop -bin/gfix bin/gpre -bin/gsec -bin/gstat bin/isql bin/qli include/blr.h @@ -24,14 +17,15 @@ lib/libfbembed.so.%%FIREBIRD_VERSION%% lib/libgds.so lib/libgds.so.1 lib/libib_util.so -@unexec if cmp -s %D/etc/firebird.conf %D/etc/firebird.conf.sample; then rm -f %D/etc/firebird.conf; fi -etc/firebird.conf.sample +@unexec if cmp -s %D/%%CONFDIR%%/firebird.conf %D/%%CONFDIR%%/firebird.conf.sample; then rm -f %D/%%CONFDIR%%/firebird.conf; fi +%%CONFDIR%%/firebird.conf.sample @exec [ -f %B/firebird.conf ] || cp %B/%f %B/firebird.conf -%%LIBDATADIR%%/de_DE.msg -%%LIBDATADIR%%/firebird.msg -%%LIBDATADIR%%/fr_FR.msg -%%LIBDATADIR%%/ja_JP.msg -@dirrm %%LIBDATADIR%% +@unexec rmdir %D/%%CONFDIR%% 2>/dev/null || true +%%DATADIR%%/de_DE.msg +%%DATADIR%%/firebird.msg +%%DATADIR%%/fr_FR.msg +%%DATADIR%%/ja_JP.msg +@dirrm %%DATADIR%% %%EXAMPLESDIR%%/align.h %%EXAMPLESDIR%%/api1.c %%EXAMPLESDIR%%/api10.c @@ -79,4 +73,3 @@ etc/firebird.conf.sample %%EXAMPLESDIR%%/stat9.e %%EXAMPLESDIR%%/udf.sql %%EXAMPLESDIR%%/udflib.c -@dirrm %%EXAMPLESDIR%% |