Index: head/databases/firebird/Makefile =================================================================== --- head/databases/firebird/Makefile (revision 50866) +++ head/databases/firebird/Makefile (revision 50867) @@ -1,72 +1,81 @@ # New ports collection makefile for: Firebird # Date created: 20 December 2000 # Whom: Geoffrey C. Speicher # # $FreeBSD$ # PORTNAME= firebird PORTVERSION= 0.9 PORTREVISION= 4 CATEGORIES= databases MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR=firebird DISTFILES= firebird-boot-kit.tar.gz \ interbase0.9-4-v5examples.tar.gz \ interbase0.9-4src.tar.gz MAINTAINER= chris@aims.com.au WRKSRC= ${WRKDIR}/interbase INSTALLS_SHLIB= yes LDCONFIG_DIRS= %%PREFIX%%/firebird/lib +MSG_FILE= ${PKGDIR}/pkg-message +PKGMESSAGE= ${WRKDIR}/pkg-message ONLY_FOR_ARCHS= i386 .include do-extract: @${MKDIR} ${WRKDIR} @( \ - cd ${WRKDIR}; tar zxf ${DISTDIR}/interbase0.9-4src.tar.gz; \ - cd interbase; tar zxf ${DISTDIR}/firebird-boot-kit.tar.gz; \ + cd ${WRKDIR}; ${TAR} -xzf ${DISTDIR}/interbase0.9-4src.tar.gz; \ + cd interbase; ${TAR} -xzf ${DISTDIR}/firebird-boot-kit.tar.gz; \ ${CP} msgs/msg.gbak misc/msg.gbak \ ) -.if ${OSVERSION} >= 500016 post-patch: - ${PERL} -pi -e 's,\-ldescrypt,\-lcrypt,g' ${WRKSRC}/builds/original/prefix.freebsd + @${SED} 's|%%PREFIX%%|${PREFIX}|g' ${MSG_FILE} > ${PKGMESSAGE} +.if ${OSVERSION} >= 500016 || ${OSVERSION} >= 430001 + @${PERL} -pi -e 's,\-ldescrypt,\-lcrypt,g' \ + ${WRKSRC}/builds/original/prefix.freebsd +.else + @${PERL} -pi -e 's,^crypt_set_format.*,,' ${WRKSRC}/jrd/enc.c .endif do-configure: @( \ cd ${WRKDIR}/interbase; \ INTERBASE=${WRKDIR}/interbase/interbase; export INTERBASE; \ REFDBPATH=${WRKDIR}/refDatabases; export REFDBPATH; \ ${SH} buildBootDatabases; \ ${SH} setup_dirs.boot FREEBSD PROD ${WRKDIR}/refDatabases boot; \ ) do-build: @( \ + ${ECHO} '#!/bin/sh'; ${ECHO} \ + '[ -d ${LDCONFIG_RUNLIST} ] && ${LDCONFIG} -m ${LDCONFIG_RUNLIST}'; \ + ) > ${WRKDIR}/000.${PORTNAME}.sh + @( \ cd ${WRKDIR}/interbase; \ INTERBASE=${WRKDIR}/interbase/interbase; export INTERBASE; \ REFDBPATH=${WRKDIR}/refDatabases; export REFDBPATH; \ ${SH} boot.freebsd; \ ) do-install: @( \ cd ${WRKDIR}/interbase; \ ${CP} -Rp interbase ${PREFIX}/firebird; \ ${RM} ${PREFIX}/firebird/install; \ ${RM} ${PREFIX}/firebird/lib/libgds.so.1.0; \ ${LN} -fs gds.so ${PREFIX}/firebird/lib/libgds.so.1; \ - ${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/firebird/lib \ - ${CHMOD} -R g-w ${PREFIX}/firebird/lib \ cd ${PREFIX}/firebird/examples; \ - tar zxf ${DISTDIR}/interbase0.9-4-v5examples.tar.gz; \ - ${CP} ${FILESDIR}/RELNOTES ${PREFIX}/firebird/ \ + ${TAR} -xzf ${DISTDIR}/interbase0.9-4-v5examples.tar.gz; \ + ${CP} ${FILESDIR}/RELNOTES ${PREFIX}/firebird/; \ + ${INSTALL_SCRIPT} ${WRKDIR}/000.${PORTNAME}.sh ${PREFIX}/etc/rc.d/ \ ) .include Property changes on: head/databases/firebird/Makefile ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.4 \ No newline at end of property +1.5 \ No newline at end of property Index: head/databases/firebird/files/RELNOTES =================================================================== --- head/databases/firebird/files/RELNOTES (revision 50866) +++ head/databases/firebird/files/RELNOTES (revision 50867) @@ -1,78 +1,79 @@ Firebird 0.9_4 FreeBSD Release Notes 13-Jan-2001 ------------------------------------ FB-T0.9.4.34 Firebird Test1 Welcome to the FreeBSD Firebird port! Users should note that there was a package called `firebird-1.0.tgz' released in mid-August 2000. Unfortunately, that package was released before Firebird version numbering conventions were established, so although the version number would suggest that it is newer than the current release, it is certainly not. Users of the August 1.0 package should upgrade to 0.9_4 or later, which has fixed many bugs and security problems, including the recently-discovered back door. Firebird originally required a running copy of Firebird (or InterBase) in order to build itself. This port uses a boot kit to overcome that, so that it does not require itself to build. Unfortunately, the side effect of this is that if you have a lock manager running from an already-installed version of Firebird or InterBase, this port will not build. Firebird is installed SUID with owner and group `firebird'. This does affect where you can and cannot create databases when connecting remotely, as well as which existing databases you can access. If you want a database to be available remotely, be sure it's readable and writeable to group firebird. There may be times when you manage to get your system into a state where using any of the Firebird utilites (isql, gbak, gsec, etc.) gives you the message "semget failed". One surefire way to do this is to build and install the port. :) If this happens, make sure that the lock manager is not running and its semaphores have been removed. The former can be accomplished with 'ps ax |grep gds' and 'kill'; the latter with 'ipcs -s' and 'ipcrm -s'. For example, after building and installing the port, you will probably go through something like this: # isql /usr/interbase/isc4.gdb Statement failed, SQLCODE = -902 operating system directive semget failed -No such file or directory # ipcs -s Semaphores: T ID KEY MODE OWNER GROUP s 1310720 252034728 --rw-rw-rw- root wheel # ipcrm -s 1310720 and you should be in business. Once this is done, you should be able to connect normally to databases. Your first connection will restart the lock manager. There may be times, however, when you still get "semget failed" even though the lock manager is not running and the semaphores have been cleaned up. There seems to be a conflict with this release and the PostgreSQL 7 release as installed from the ports collection. If you're having trouble with Firebird and you're running PostgreSQL, try stopping PostgreSQL: /usr/local/etc/rc.d/pgsql.sh stop and see if that helps. Complete documentation for InterBase(tm) is available (free of charge) from http://www.interbase.com/ in PDF format. While InterBase and Firebird are two distinct entities, all InterBase documentation is pertinent to Firebird. More information on Firebird and InterBase can be found at the following: http://sourceforge.net/projects/firebird/ http://www.ibphoenix.com/ http://www.interbase2000.org/ + http://www.firebirdsql.org/ Geoff Speicher Property changes on: head/databases/firebird/files/RELNOTES ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property Index: head/databases/firebird/files/patch-ad =================================================================== --- head/databases/firebird/files/patch-ad (nonexistent) +++ head/databases/firebird/files/patch-ad (revision 50867) @@ -0,0 +1,13 @@ +--- jrd/enc.c.orig Fri Aug 4 06:50:03 2000 ++++ jrd/enc.c Sun Nov 18 19:17:19 2001 +@@ -31,6 +31,10 @@ + * + **************************************/ + ++#ifdef FREEBSD ++crypt_set_format("des"); ++#endif ++ + return CRYPT_FUNC( string, salt); + } + #endif Property changes on: head/databases/firebird/files/patch-ad ___________________________________________________________________ Added: cvs2svn:cvs-rev ## -0,0 +1 ## +1.1 \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/databases/firebird/pkg-descr =================================================================== --- head/databases/firebird/pkg-descr (revision 50866) +++ head/databases/firebird/pkg-descr (revision 50867) @@ -1,22 +1,23 @@ The open-source InterBase(tm) 6.0 spin-off (Classic server version) InterBase is a world-class DBMS with a history too rich to detail here. Once selling for several thousands of dollars per license, some very big players use it worldwide. Inprise has open-sourced InterBase 6.0, and a lively bunch of folks has charged themselves with seeing that it lives on through the Firebird project. Note that as of Firebird 0.9_4, the locksmith back door has been closed. For more information on Firebird and InterBase, see: http://www.ibphoenix.com/ http://www.interbase2000.org/ http://www.interbase.com/ +http://www.firebirdsql.org/ and of course the firebird page itself: WWW: http://sourceforge.net/projects/firebird/ For more information on the locksmith back door, see: https://www.kb.cert.org/vuls/id/247371 Property changes on: head/databases/firebird/pkg-descr ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property Index: head/databases/firebird/pkg-install =================================================================== --- head/databases/firebird/pkg-install (revision 50866) +++ head/databases/firebird/pkg-install (revision 50867) @@ -1,149 +1,159 @@ #!/bin/sh # Created in haste by smashing together various # files from the port scripts. if [ "$2" = "PRE-INSTALL" ]; then if [ -d $PKG_PREFIX/firebird ]; then if [ -d $PKG_PREFIX/firebird.old ]; then rm -rf $PKG_PREFIX/firebird.old fi mv $PKG_PREFIX/firebird $PKG_PREFIX/firebird.old fi if [ -L /usr/interbase ]; then rm -f /usr/interbase fi if [ -d /usr/interbase ]; then mv /usr/interbase /usr/interbase.old fi ln -fs $PKG_PREFIX/firebird /usr/interbase perl < ) { print "\nYou must be root to run this step!\n\n"; exit 1; } if( getpwnam( "firebird" ) ) { ( \$null, \$null, \$fbUID ) = getpwnam( "firebird" ); } else { \$fbUID = 90; while( getpwuid( \$fbUID ) ) { \$fbUID++; } } if( getgrnam( "firebird" ) ) { ( \$null, \$null, \$fbGID ) = getgrnam( "firebird" ); } else { \$fbGID = 90; while( getgrgid( \$fbGID ) ) { \$fbGID++; } &append_file( "/etc/group", "firebird:*:\$fbGID:" ); } print "firebird user using uid \$fbUID\n"; print "firebird user using gid \$fbGID\n"; system( "/usr/bin/chpass -a \"firebird:*:\$fbUID:\$fbGID\:\:0:0:Firebird pseudo-user:\$ENV{'PKG_PREFIX'}/firebird:/bin/sh\"" ); sub append_file { local(\$file,@list) = @_; local(\$LOCK_EX) = 2; local(\$LOCK_NB) = 4; local(\$LOCK_UN) = 8; open(F, ">> \$file") || die "\$file: \$!\n"; while( ! flock( F, \$LOCK_EX | \$LOCK_NB ) ) { exit 1; } print F join( "\n", @list) . "\n"; close F; flock( F, \$LOCK_UN ); } EOF elif [ "$2" = "POST-INSTALL" ]; then chown -R firebird:firebird $PKG_PREFIX/firebird -# make lib ldconfig-compatible -chown -R root:wheel $PKG_PREFIX/firebird/lib -chmod -R g-w $PKG_PREFIX/firebird/lib - # Turn everybody to read only. chmod -R o=r $PKG_PREFIX/firebird # Now fix up the mess. # fix up directories for i in `find $PKG_PREFIX/firebird -print` do FileName=$i if [ -d $FileName ] then chmod o=rx $FileName fi done +# make lib ldconfig-compatible +chown -R root:wheel $PKG_PREFIX/firebird/lib +chmod -R g-w $PKG_PREFIX/firebird/lib +# Fix UDF load problem +cd $PKG_PREFIX/firebird/lib +ln -sf ib_util.so libib_util.so cd $PKG_PREFIX/firebird/bin # all users can run everything. chmod o=rx * # SUID is needed for running server programs. for i in gds_lock_mgr gds_drop gds_inet_server do chmod ug+s $i done # Lock files cd $PKG_PREFIX/firebird for i in isc_init1 isc_lock1 isc_event1 do FileName=$i.`hostname` touch $FileName chmod uga=rw $FileName chown firebird:firebird $FileName done touch interbase.log chmod ugo=rw interbase.log # make databases writable by all chmod ugo=rw examples/v5/*.gdb chmod ugo=rw help/*.gdb chmod ugo=rw isc4.gdb # remove any existing gds service cp /etc/services /etc/services.old cp /etc/inetd.conf /etc/inetd.conf.old cat /etc/services |grep -v gds_db >/etc/services.new cat /etc/inetd.conf |grep -v gds_db >/etc/inetd.conf.new mv /etc/services.new /etc/services mv /etc/inetd.conf.new /etc/inetd.conf # add the gds service and restart inetd cat >>/etc/services <>/etc/inetd.conf < $PKG_PREFIX/etc/rc.d/000.firebird.sh +fi fi Property changes on: head/databases/firebird/pkg-install ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.2 \ No newline at end of property +1.3 \ No newline at end of property Index: head/databases/firebird/pkg-plist =================================================================== --- head/databases/firebird/pkg-plist (revision 50866) +++ head/databases/firebird/pkg-plist (revision 50867) @@ -1,104 +1,106 @@ +etc/rc.d/000.firebird.sh firebird/intl/gdsintl firebird/examples/v5/ib_udf.sql firebird/examples/v5/README firebird/examples/v5/align.h firebird/examples/v5/api1.c firebird/examples/v5/api10.c firebird/examples/v5/api11.c firebird/examples/v5/api12.c firebird/examples/v5/api13.c firebird/examples/v5/api14.e firebird/examples/v5/api15.c firebird/examples/v5/api16.c firebird/examples/v5/api16t.c firebird/examples/v5/api2.c firebird/examples/v5/api3.c firebird/examples/v5/api4.c firebird/examples/v5/api5.c firebird/examples/v5/api6.c firebird/examples/v5/api7.c firebird/examples/v5/api8.c firebird/examples/v5/api9.c firebird/examples/v5/api9f.c firebird/examples/v5/apifull.c firebird/examples/v5/employe2.sql firebird/examples/v5/dyn1.e firebird/examples/v5/dyn2.e firebird/examples/v5/dyn3.e firebird/examples/v5/dyn4.e firebird/examples/v5/dyn5.e firebird/examples/v5/dynfull.e firebird/examples/v5/employee.gbk firebird/examples/v5/employee.gdb firebird/examples/v5/example.h firebird/examples/v5/api9f.sql firebird/examples/v5/intlemp.gbk firebird/examples/v5/intlemp.gdb firebird/examples/v5/stat1.e firebird/examples/v5/stat10.e firebird/examples/v5/stat11.e firebird/examples/v5/stat12.e firebird/examples/v5/stat12t.e firebird/examples/v5/stat2.e firebird/examples/v5/stat3.e firebird/examples/v5/stat4.e firebird/examples/v5/stat5.e firebird/examples/v5/stat6.e firebird/examples/v5/stat7.e firebird/examples/v5/stat8.e firebird/examples/v5/stat9.e firebird/examples/v5/udf.sql firebird/examples/v5/udflib.c firebird/examples/v5/makefile firebird/include/perf.h firebird/include/ib_util.h firebird/include/gds.hxx firebird/include/gds.h firebird/include/ibase.h firebird/include/iberror.h firebird/include/gds.f firebird/UDF/ib_udf firebird/lib/ib_util.so firebird/lib/gds.a firebird/lib/gds.so firebird/lib/libgds.so firebird/lib/libgds.so.1 firebird/lib/libgds_pyxis.a firebird/lib/libgds.a +firebird/lib/libib_util.so firebird/lib/gds_pyxis.a firebird/help/help.gbak firebird/help/help.gdb firebird/bin/isc4.gbak firebird/bin/gpre firebird/bin/gds_pipe firebird/bin/gds_drop firebird/bin/gds_lock_mgr firebird/bin/gfix firebird/bin/gdef firebird/bin/isql firebird/bin/gds_lock_print firebird/bin/qli firebird/bin/gds_inet_server firebird/bin/gsplit firebird/bin/gstat firebird/bin/gds_relay firebird/bin/gsec firebird/bin/gbak firebird/services.isc firebird/isc_config firebird/isc4.gdb firebird/interbase.msg firebird/interbase.log firebird/inetd.conf.isc firebird/RELNOTES @dirrm firebird @dirrm firebird/intl @dirrm firebird/examples/v3 @dirrm firebird/examples/v4 @dirrm firebird/examples/v5 @dirrm firebird/examples @dirrm firebird/include @dirrm firebird/UDF @dirrm firebird/lib @dirrm firebird/help @dirrm firebird/bin Property changes on: head/databases/firebird/pkg-plist ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property Index: head/databases/firebird/scripts/post-install =================================================================== --- head/databases/firebird/scripts/post-install (revision 50866) +++ head/databases/firebird/scripts/post-install (revision 50867) @@ -1,76 +1,84 @@ #!/bin/sh chown -R firebird:firebird $PREFIX/firebird # Turn everybody to read only. chmod -R o=r $PREFIX/firebird # Now fix up the mess. # fix up directories for i in `find $PREFIX/firebird -print` do FileName=$i if [ -d $FileName ] then chmod o=rx $FileName fi done +# make lib ldconfig-compatible +chown -R root:wheel $PREFIX/firebird/lib +chmod -R g-w $PREFIX/firebird/lib +# Fix UDF load problem +cd $PREFIX/firebird/lib +ln -sf ib_util.so libib_util.so cd $PREFIX/firebird/bin # all users can run everything. chmod o=rx * # SUID is needed for running server programs. for i in gds_lock_mgr gds_drop gds_inet_server do chmod ug+s $i done # Lock files cd $PREFIX/firebird for i in isc_init1 isc_lock1 isc_event1 do FileName=$i.`hostname` touch $FileName chmod uga=rw $FileName chown firebird:firebird $FileName done touch interbase.log chmod ugo=rw interbase.log # make databases writable by all chmod ugo=rw examples/v5/*.gdb chmod ugo=rw help/*.gdb chmod ugo=rw isc4.gdb # remove any existing gds service sh $SCRIPTDIR/rmservice # add the gds service and restart inetd sh $SCRIPTDIR/addservice -kill -HUP `cat /var/run/inetd.pid` +if [ -f /var/run/inetd.pid ]; then + kill -HUP `cat /var/run/inetd.pid` +fi sed "s|%%PREFIX%%|$PREFIX|" $SCRIPTDIR/../pkg-message cat < # # $FreeBSD$ # PORTNAME= firebird PORTVERSION= 0.9 PORTREVISION= 4 CATEGORIES= databases MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR=firebird DISTFILES= firebird-boot-kit.tar.gz \ interbase0.9-4-v5examples.tar.gz \ interbase0.9-4src.tar.gz MAINTAINER= chris@aims.com.au WRKSRC= ${WRKDIR}/interbase INSTALLS_SHLIB= yes LDCONFIG_DIRS= %%PREFIX%%/firebird/lib +MSG_FILE= ${PKGDIR}/pkg-message +PKGMESSAGE= ${WRKDIR}/pkg-message ONLY_FOR_ARCHS= i386 .include do-extract: @${MKDIR} ${WRKDIR} @( \ - cd ${WRKDIR}; tar zxf ${DISTDIR}/interbase0.9-4src.tar.gz; \ - cd interbase; tar zxf ${DISTDIR}/firebird-boot-kit.tar.gz; \ + cd ${WRKDIR}; ${TAR} -xzf ${DISTDIR}/interbase0.9-4src.tar.gz; \ + cd interbase; ${TAR} -xzf ${DISTDIR}/firebird-boot-kit.tar.gz; \ ${CP} msgs/msg.gbak misc/msg.gbak \ ) -.if ${OSVERSION} >= 500016 post-patch: - ${PERL} -pi -e 's,\-ldescrypt,\-lcrypt,g' ${WRKSRC}/builds/original/prefix.freebsd + @${SED} 's|%%PREFIX%%|${PREFIX}|g' ${MSG_FILE} > ${PKGMESSAGE} +.if ${OSVERSION} >= 500016 || ${OSVERSION} >= 430001 + @${PERL} -pi -e 's,\-ldescrypt,\-lcrypt,g' \ + ${WRKSRC}/builds/original/prefix.freebsd +.else + @${PERL} -pi -e 's,^crypt_set_format.*,,' ${WRKSRC}/jrd/enc.c .endif do-configure: @( \ cd ${WRKDIR}/interbase; \ INTERBASE=${WRKDIR}/interbase/interbase; export INTERBASE; \ REFDBPATH=${WRKDIR}/refDatabases; export REFDBPATH; \ ${SH} buildBootDatabases; \ ${SH} setup_dirs.boot FREEBSD PROD ${WRKDIR}/refDatabases boot; \ ) do-build: @( \ + ${ECHO} '#!/bin/sh'; ${ECHO} \ + '[ -d ${LDCONFIG_RUNLIST} ] && ${LDCONFIG} -m ${LDCONFIG_RUNLIST}'; \ + ) > ${WRKDIR}/000.${PORTNAME}.sh + @( \ cd ${WRKDIR}/interbase; \ INTERBASE=${WRKDIR}/interbase/interbase; export INTERBASE; \ REFDBPATH=${WRKDIR}/refDatabases; export REFDBPATH; \ ${SH} boot.freebsd; \ ) do-install: @( \ cd ${WRKDIR}/interbase; \ ${CP} -Rp interbase ${PREFIX}/firebird; \ ${RM} ${PREFIX}/firebird/install; \ ${RM} ${PREFIX}/firebird/lib/libgds.so.1.0; \ ${LN} -fs gds.so ${PREFIX}/firebird/lib/libgds.so.1; \ - ${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/firebird/lib \ - ${CHMOD} -R g-w ${PREFIX}/firebird/lib \ cd ${PREFIX}/firebird/examples; \ - tar zxf ${DISTDIR}/interbase0.9-4-v5examples.tar.gz; \ - ${CP} ${FILESDIR}/RELNOTES ${PREFIX}/firebird/ \ + ${TAR} -xzf ${DISTDIR}/interbase0.9-4-v5examples.tar.gz; \ + ${CP} ${FILESDIR}/RELNOTES ${PREFIX}/firebird/; \ + ${INSTALL_SCRIPT} ${WRKDIR}/000.${PORTNAME}.sh ${PREFIX}/etc/rc.d/ \ ) .include Property changes on: head/databases/firebird-client/Makefile ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.4 \ No newline at end of property +1.5 \ No newline at end of property Index: head/databases/firebird-client/files/RELNOTES =================================================================== --- head/databases/firebird-client/files/RELNOTES (revision 50866) +++ head/databases/firebird-client/files/RELNOTES (revision 50867) @@ -1,78 +1,79 @@ Firebird 0.9_4 FreeBSD Release Notes 13-Jan-2001 ------------------------------------ FB-T0.9.4.34 Firebird Test1 Welcome to the FreeBSD Firebird port! Users should note that there was a package called `firebird-1.0.tgz' released in mid-August 2000. Unfortunately, that package was released before Firebird version numbering conventions were established, so although the version number would suggest that it is newer than the current release, it is certainly not. Users of the August 1.0 package should upgrade to 0.9_4 or later, which has fixed many bugs and security problems, including the recently-discovered back door. Firebird originally required a running copy of Firebird (or InterBase) in order to build itself. This port uses a boot kit to overcome that, so that it does not require itself to build. Unfortunately, the side effect of this is that if you have a lock manager running from an already-installed version of Firebird or InterBase, this port will not build. Firebird is installed SUID with owner and group `firebird'. This does affect where you can and cannot create databases when connecting remotely, as well as which existing databases you can access. If you want a database to be available remotely, be sure it's readable and writeable to group firebird. There may be times when you manage to get your system into a state where using any of the Firebird utilites (isql, gbak, gsec, etc.) gives you the message "semget failed". One surefire way to do this is to build and install the port. :) If this happens, make sure that the lock manager is not running and its semaphores have been removed. The former can be accomplished with 'ps ax |grep gds' and 'kill'; the latter with 'ipcs -s' and 'ipcrm -s'. For example, after building and installing the port, you will probably go through something like this: # isql /usr/interbase/isc4.gdb Statement failed, SQLCODE = -902 operating system directive semget failed -No such file or directory # ipcs -s Semaphores: T ID KEY MODE OWNER GROUP s 1310720 252034728 --rw-rw-rw- root wheel # ipcrm -s 1310720 and you should be in business. Once this is done, you should be able to connect normally to databases. Your first connection will restart the lock manager. There may be times, however, when you still get "semget failed" even though the lock manager is not running and the semaphores have been cleaned up. There seems to be a conflict with this release and the PostgreSQL 7 release as installed from the ports collection. If you're having trouble with Firebird and you're running PostgreSQL, try stopping PostgreSQL: /usr/local/etc/rc.d/pgsql.sh stop and see if that helps. Complete documentation for InterBase(tm) is available (free of charge) from http://www.interbase.com/ in PDF format. While InterBase and Firebird are two distinct entities, all InterBase documentation is pertinent to Firebird. More information on Firebird and InterBase can be found at the following: http://sourceforge.net/projects/firebird/ http://www.ibphoenix.com/ http://www.interbase2000.org/ + http://www.firebirdsql.org/ Geoff Speicher Property changes on: head/databases/firebird-client/files/RELNOTES ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property Index: head/databases/firebird-client/files/patch-ad =================================================================== --- head/databases/firebird-client/files/patch-ad (nonexistent) +++ head/databases/firebird-client/files/patch-ad (revision 50867) @@ -0,0 +1,13 @@ +--- jrd/enc.c.orig Fri Aug 4 06:50:03 2000 ++++ jrd/enc.c Sun Nov 18 19:17:19 2001 +@@ -31,6 +31,10 @@ + * + **************************************/ + ++#ifdef FREEBSD ++crypt_set_format("des"); ++#endif ++ + return CRYPT_FUNC( string, salt); + } + #endif Property changes on: head/databases/firebird-client/files/patch-ad ___________________________________________________________________ Added: cvs2svn:cvs-rev ## -0,0 +1 ## +1.1 \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/databases/firebird-client/pkg-descr =================================================================== --- head/databases/firebird-client/pkg-descr (revision 50866) +++ head/databases/firebird-client/pkg-descr (revision 50867) @@ -1,22 +1,23 @@ The open-source InterBase(tm) 6.0 spin-off (Classic server version) InterBase is a world-class DBMS with a history too rich to detail here. Once selling for several thousands of dollars per license, some very big players use it worldwide. Inprise has open-sourced InterBase 6.0, and a lively bunch of folks has charged themselves with seeing that it lives on through the Firebird project. Note that as of Firebird 0.9_4, the locksmith back door has been closed. For more information on Firebird and InterBase, see: http://www.ibphoenix.com/ http://www.interbase2000.org/ http://www.interbase.com/ +http://www.firebirdsql.org/ and of course the firebird page itself: WWW: http://sourceforge.net/projects/firebird/ For more information on the locksmith back door, see: https://www.kb.cert.org/vuls/id/247371 Property changes on: head/databases/firebird-client/pkg-descr ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property Index: head/databases/firebird-client/pkg-install =================================================================== --- head/databases/firebird-client/pkg-install (revision 50866) +++ head/databases/firebird-client/pkg-install (revision 50867) @@ -1,149 +1,159 @@ #!/bin/sh # Created in haste by smashing together various # files from the port scripts. if [ "$2" = "PRE-INSTALL" ]; then if [ -d $PKG_PREFIX/firebird ]; then if [ -d $PKG_PREFIX/firebird.old ]; then rm -rf $PKG_PREFIX/firebird.old fi mv $PKG_PREFIX/firebird $PKG_PREFIX/firebird.old fi if [ -L /usr/interbase ]; then rm -f /usr/interbase fi if [ -d /usr/interbase ]; then mv /usr/interbase /usr/interbase.old fi ln -fs $PKG_PREFIX/firebird /usr/interbase perl < ) { print "\nYou must be root to run this step!\n\n"; exit 1; } if( getpwnam( "firebird" ) ) { ( \$null, \$null, \$fbUID ) = getpwnam( "firebird" ); } else { \$fbUID = 90; while( getpwuid( \$fbUID ) ) { \$fbUID++; } } if( getgrnam( "firebird" ) ) { ( \$null, \$null, \$fbGID ) = getgrnam( "firebird" ); } else { \$fbGID = 90; while( getgrgid( \$fbGID ) ) { \$fbGID++; } &append_file( "/etc/group", "firebird:*:\$fbGID:" ); } print "firebird user using uid \$fbUID\n"; print "firebird user using gid \$fbGID\n"; system( "/usr/bin/chpass -a \"firebird:*:\$fbUID:\$fbGID\:\:0:0:Firebird pseudo-user:\$ENV{'PKG_PREFIX'}/firebird:/bin/sh\"" ); sub append_file { local(\$file,@list) = @_; local(\$LOCK_EX) = 2; local(\$LOCK_NB) = 4; local(\$LOCK_UN) = 8; open(F, ">> \$file") || die "\$file: \$!\n"; while( ! flock( F, \$LOCK_EX | \$LOCK_NB ) ) { exit 1; } print F join( "\n", @list) . "\n"; close F; flock( F, \$LOCK_UN ); } EOF elif [ "$2" = "POST-INSTALL" ]; then chown -R firebird:firebird $PKG_PREFIX/firebird -# make lib ldconfig-compatible -chown -R root:wheel $PKG_PREFIX/firebird/lib -chmod -R g-w $PKG_PREFIX/firebird/lib - # Turn everybody to read only. chmod -R o=r $PKG_PREFIX/firebird # Now fix up the mess. # fix up directories for i in `find $PKG_PREFIX/firebird -print` do FileName=$i if [ -d $FileName ] then chmod o=rx $FileName fi done +# make lib ldconfig-compatible +chown -R root:wheel $PKG_PREFIX/firebird/lib +chmod -R g-w $PKG_PREFIX/firebird/lib +# Fix UDF load problem +cd $PKG_PREFIX/firebird/lib +ln -sf ib_util.so libib_util.so cd $PKG_PREFIX/firebird/bin # all users can run everything. chmod o=rx * # SUID is needed for running server programs. for i in gds_lock_mgr gds_drop gds_inet_server do chmod ug+s $i done # Lock files cd $PKG_PREFIX/firebird for i in isc_init1 isc_lock1 isc_event1 do FileName=$i.`hostname` touch $FileName chmod uga=rw $FileName chown firebird:firebird $FileName done touch interbase.log chmod ugo=rw interbase.log # make databases writable by all chmod ugo=rw examples/v5/*.gdb chmod ugo=rw help/*.gdb chmod ugo=rw isc4.gdb # remove any existing gds service cp /etc/services /etc/services.old cp /etc/inetd.conf /etc/inetd.conf.old cat /etc/services |grep -v gds_db >/etc/services.new cat /etc/inetd.conf |grep -v gds_db >/etc/inetd.conf.new mv /etc/services.new /etc/services mv /etc/inetd.conf.new /etc/inetd.conf # add the gds service and restart inetd cat >>/etc/services <>/etc/inetd.conf < $PKG_PREFIX/etc/rc.d/000.firebird.sh +fi fi Property changes on: head/databases/firebird-client/pkg-install ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.2 \ No newline at end of property +1.3 \ No newline at end of property Index: head/databases/firebird-client/pkg-plist =================================================================== --- head/databases/firebird-client/pkg-plist (revision 50866) +++ head/databases/firebird-client/pkg-plist (revision 50867) @@ -1,104 +1,106 @@ +etc/rc.d/000.firebird.sh firebird/intl/gdsintl firebird/examples/v5/ib_udf.sql firebird/examples/v5/README firebird/examples/v5/align.h firebird/examples/v5/api1.c firebird/examples/v5/api10.c firebird/examples/v5/api11.c firebird/examples/v5/api12.c firebird/examples/v5/api13.c firebird/examples/v5/api14.e firebird/examples/v5/api15.c firebird/examples/v5/api16.c firebird/examples/v5/api16t.c firebird/examples/v5/api2.c firebird/examples/v5/api3.c firebird/examples/v5/api4.c firebird/examples/v5/api5.c firebird/examples/v5/api6.c firebird/examples/v5/api7.c firebird/examples/v5/api8.c firebird/examples/v5/api9.c firebird/examples/v5/api9f.c firebird/examples/v5/apifull.c firebird/examples/v5/employe2.sql firebird/examples/v5/dyn1.e firebird/examples/v5/dyn2.e firebird/examples/v5/dyn3.e firebird/examples/v5/dyn4.e firebird/examples/v5/dyn5.e firebird/examples/v5/dynfull.e firebird/examples/v5/employee.gbk firebird/examples/v5/employee.gdb firebird/examples/v5/example.h firebird/examples/v5/api9f.sql firebird/examples/v5/intlemp.gbk firebird/examples/v5/intlemp.gdb firebird/examples/v5/stat1.e firebird/examples/v5/stat10.e firebird/examples/v5/stat11.e firebird/examples/v5/stat12.e firebird/examples/v5/stat12t.e firebird/examples/v5/stat2.e firebird/examples/v5/stat3.e firebird/examples/v5/stat4.e firebird/examples/v5/stat5.e firebird/examples/v5/stat6.e firebird/examples/v5/stat7.e firebird/examples/v5/stat8.e firebird/examples/v5/stat9.e firebird/examples/v5/udf.sql firebird/examples/v5/udflib.c firebird/examples/v5/makefile firebird/include/perf.h firebird/include/ib_util.h firebird/include/gds.hxx firebird/include/gds.h firebird/include/ibase.h firebird/include/iberror.h firebird/include/gds.f firebird/UDF/ib_udf firebird/lib/ib_util.so firebird/lib/gds.a firebird/lib/gds.so firebird/lib/libgds.so firebird/lib/libgds.so.1 firebird/lib/libgds_pyxis.a firebird/lib/libgds.a +firebird/lib/libib_util.so firebird/lib/gds_pyxis.a firebird/help/help.gbak firebird/help/help.gdb firebird/bin/isc4.gbak firebird/bin/gpre firebird/bin/gds_pipe firebird/bin/gds_drop firebird/bin/gds_lock_mgr firebird/bin/gfix firebird/bin/gdef firebird/bin/isql firebird/bin/gds_lock_print firebird/bin/qli firebird/bin/gds_inet_server firebird/bin/gsplit firebird/bin/gstat firebird/bin/gds_relay firebird/bin/gsec firebird/bin/gbak firebird/services.isc firebird/isc_config firebird/isc4.gdb firebird/interbase.msg firebird/interbase.log firebird/inetd.conf.isc firebird/RELNOTES @dirrm firebird @dirrm firebird/intl @dirrm firebird/examples/v3 @dirrm firebird/examples/v4 @dirrm firebird/examples/v5 @dirrm firebird/examples @dirrm firebird/include @dirrm firebird/UDF @dirrm firebird/lib @dirrm firebird/help @dirrm firebird/bin Property changes on: head/databases/firebird-client/pkg-plist ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property Index: head/databases/firebird-client/scripts/post-install =================================================================== --- head/databases/firebird-client/scripts/post-install (revision 50866) +++ head/databases/firebird-client/scripts/post-install (revision 50867) @@ -1,76 +1,84 @@ #!/bin/sh chown -R firebird:firebird $PREFIX/firebird # Turn everybody to read only. chmod -R o=r $PREFIX/firebird # Now fix up the mess. # fix up directories for i in `find $PREFIX/firebird -print` do FileName=$i if [ -d $FileName ] then chmod o=rx $FileName fi done +# make lib ldconfig-compatible +chown -R root:wheel $PREFIX/firebird/lib +chmod -R g-w $PREFIX/firebird/lib +# Fix UDF load problem +cd $PREFIX/firebird/lib +ln -sf ib_util.so libib_util.so cd $PREFIX/firebird/bin # all users can run everything. chmod o=rx * # SUID is needed for running server programs. for i in gds_lock_mgr gds_drop gds_inet_server do chmod ug+s $i done # Lock files cd $PREFIX/firebird for i in isc_init1 isc_lock1 isc_event1 do FileName=$i.`hostname` touch $FileName chmod uga=rw $FileName chown firebird:firebird $FileName done touch interbase.log chmod ugo=rw interbase.log # make databases writable by all chmod ugo=rw examples/v5/*.gdb chmod ugo=rw help/*.gdb chmod ugo=rw isc4.gdb # remove any existing gds service sh $SCRIPTDIR/rmservice # add the gds service and restart inetd sh $SCRIPTDIR/addservice -kill -HUP `cat /var/run/inetd.pid` +if [ -f /var/run/inetd.pid ]; then + kill -HUP `cat /var/run/inetd.pid` +fi sed "s|%%PREFIX%%|$PREFIX|" $SCRIPTDIR/../pkg-message cat < # # $FreeBSD$ # PORTNAME= firebird PORTVERSION= 0.9 PORTREVISION= 4 CATEGORIES= databases MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR=firebird DISTFILES= firebird-boot-kit.tar.gz \ interbase0.9-4-v5examples.tar.gz \ interbase0.9-4src.tar.gz MAINTAINER= chris@aims.com.au WRKSRC= ${WRKDIR}/interbase INSTALLS_SHLIB= yes LDCONFIG_DIRS= %%PREFIX%%/firebird/lib +MSG_FILE= ${PKGDIR}/pkg-message +PKGMESSAGE= ${WRKDIR}/pkg-message ONLY_FOR_ARCHS= i386 .include do-extract: @${MKDIR} ${WRKDIR} @( \ - cd ${WRKDIR}; tar zxf ${DISTDIR}/interbase0.9-4src.tar.gz; \ - cd interbase; tar zxf ${DISTDIR}/firebird-boot-kit.tar.gz; \ + cd ${WRKDIR}; ${TAR} -xzf ${DISTDIR}/interbase0.9-4src.tar.gz; \ + cd interbase; ${TAR} -xzf ${DISTDIR}/firebird-boot-kit.tar.gz; \ ${CP} msgs/msg.gbak misc/msg.gbak \ ) -.if ${OSVERSION} >= 500016 post-patch: - ${PERL} -pi -e 's,\-ldescrypt,\-lcrypt,g' ${WRKSRC}/builds/original/prefix.freebsd + @${SED} 's|%%PREFIX%%|${PREFIX}|g' ${MSG_FILE} > ${PKGMESSAGE} +.if ${OSVERSION} >= 500016 || ${OSVERSION} >= 430001 + @${PERL} -pi -e 's,\-ldescrypt,\-lcrypt,g' \ + ${WRKSRC}/builds/original/prefix.freebsd +.else + @${PERL} -pi -e 's,^crypt_set_format.*,,' ${WRKSRC}/jrd/enc.c .endif do-configure: @( \ cd ${WRKDIR}/interbase; \ INTERBASE=${WRKDIR}/interbase/interbase; export INTERBASE; \ REFDBPATH=${WRKDIR}/refDatabases; export REFDBPATH; \ ${SH} buildBootDatabases; \ ${SH} setup_dirs.boot FREEBSD PROD ${WRKDIR}/refDatabases boot; \ ) do-build: @( \ + ${ECHO} '#!/bin/sh'; ${ECHO} \ + '[ -d ${LDCONFIG_RUNLIST} ] && ${LDCONFIG} -m ${LDCONFIG_RUNLIST}'; \ + ) > ${WRKDIR}/000.${PORTNAME}.sh + @( \ cd ${WRKDIR}/interbase; \ INTERBASE=${WRKDIR}/interbase/interbase; export INTERBASE; \ REFDBPATH=${WRKDIR}/refDatabases; export REFDBPATH; \ ${SH} boot.freebsd; \ ) do-install: @( \ cd ${WRKDIR}/interbase; \ ${CP} -Rp interbase ${PREFIX}/firebird; \ ${RM} ${PREFIX}/firebird/install; \ ${RM} ${PREFIX}/firebird/lib/libgds.so.1.0; \ ${LN} -fs gds.so ${PREFIX}/firebird/lib/libgds.so.1; \ - ${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/firebird/lib \ - ${CHMOD} -R g-w ${PREFIX}/firebird/lib \ cd ${PREFIX}/firebird/examples; \ - tar zxf ${DISTDIR}/interbase0.9-4-v5examples.tar.gz; \ - ${CP} ${FILESDIR}/RELNOTES ${PREFIX}/firebird/ \ + ${TAR} -xzf ${DISTDIR}/interbase0.9-4-v5examples.tar.gz; \ + ${CP} ${FILESDIR}/RELNOTES ${PREFIX}/firebird/; \ + ${INSTALL_SCRIPT} ${WRKDIR}/000.${PORTNAME}.sh ${PREFIX}/etc/rc.d/ \ ) .include Property changes on: head/databases/firebird-devel/Makefile ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.4 \ No newline at end of property +1.5 \ No newline at end of property Index: head/databases/firebird-devel/files/RELNOTES =================================================================== --- head/databases/firebird-devel/files/RELNOTES (revision 50866) +++ head/databases/firebird-devel/files/RELNOTES (revision 50867) @@ -1,78 +1,79 @@ Firebird 0.9_4 FreeBSD Release Notes 13-Jan-2001 ------------------------------------ FB-T0.9.4.34 Firebird Test1 Welcome to the FreeBSD Firebird port! Users should note that there was a package called `firebird-1.0.tgz' released in mid-August 2000. Unfortunately, that package was released before Firebird version numbering conventions were established, so although the version number would suggest that it is newer than the current release, it is certainly not. Users of the August 1.0 package should upgrade to 0.9_4 or later, which has fixed many bugs and security problems, including the recently-discovered back door. Firebird originally required a running copy of Firebird (or InterBase) in order to build itself. This port uses a boot kit to overcome that, so that it does not require itself to build. Unfortunately, the side effect of this is that if you have a lock manager running from an already-installed version of Firebird or InterBase, this port will not build. Firebird is installed SUID with owner and group `firebird'. This does affect where you can and cannot create databases when connecting remotely, as well as which existing databases you can access. If you want a database to be available remotely, be sure it's readable and writeable to group firebird. There may be times when you manage to get your system into a state where using any of the Firebird utilites (isql, gbak, gsec, etc.) gives you the message "semget failed". One surefire way to do this is to build and install the port. :) If this happens, make sure that the lock manager is not running and its semaphores have been removed. The former can be accomplished with 'ps ax |grep gds' and 'kill'; the latter with 'ipcs -s' and 'ipcrm -s'. For example, after building and installing the port, you will probably go through something like this: # isql /usr/interbase/isc4.gdb Statement failed, SQLCODE = -902 operating system directive semget failed -No such file or directory # ipcs -s Semaphores: T ID KEY MODE OWNER GROUP s 1310720 252034728 --rw-rw-rw- root wheel # ipcrm -s 1310720 and you should be in business. Once this is done, you should be able to connect normally to databases. Your first connection will restart the lock manager. There may be times, however, when you still get "semget failed" even though the lock manager is not running and the semaphores have been cleaned up. There seems to be a conflict with this release and the PostgreSQL 7 release as installed from the ports collection. If you're having trouble with Firebird and you're running PostgreSQL, try stopping PostgreSQL: /usr/local/etc/rc.d/pgsql.sh stop and see if that helps. Complete documentation for InterBase(tm) is available (free of charge) from http://www.interbase.com/ in PDF format. While InterBase and Firebird are two distinct entities, all InterBase documentation is pertinent to Firebird. More information on Firebird and InterBase can be found at the following: http://sourceforge.net/projects/firebird/ http://www.ibphoenix.com/ http://www.interbase2000.org/ + http://www.firebirdsql.org/ Geoff Speicher Property changes on: head/databases/firebird-devel/files/RELNOTES ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property Index: head/databases/firebird-devel/files/patch-ad =================================================================== --- head/databases/firebird-devel/files/patch-ad (nonexistent) +++ head/databases/firebird-devel/files/patch-ad (revision 50867) @@ -0,0 +1,13 @@ +--- jrd/enc.c.orig Fri Aug 4 06:50:03 2000 ++++ jrd/enc.c Sun Nov 18 19:17:19 2001 +@@ -31,6 +31,10 @@ + * + **************************************/ + ++#ifdef FREEBSD ++crypt_set_format("des"); ++#endif ++ + return CRYPT_FUNC( string, salt); + } + #endif Property changes on: head/databases/firebird-devel/files/patch-ad ___________________________________________________________________ Added: cvs2svn:cvs-rev ## -0,0 +1 ## +1.1 \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/databases/firebird-devel/pkg-descr =================================================================== --- head/databases/firebird-devel/pkg-descr (revision 50866) +++ head/databases/firebird-devel/pkg-descr (revision 50867) @@ -1,22 +1,23 @@ The open-source InterBase(tm) 6.0 spin-off (Classic server version) InterBase is a world-class DBMS with a history too rich to detail here. Once selling for several thousands of dollars per license, some very big players use it worldwide. Inprise has open-sourced InterBase 6.0, and a lively bunch of folks has charged themselves with seeing that it lives on through the Firebird project. Note that as of Firebird 0.9_4, the locksmith back door has been closed. For more information on Firebird and InterBase, see: http://www.ibphoenix.com/ http://www.interbase2000.org/ http://www.interbase.com/ +http://www.firebirdsql.org/ and of course the firebird page itself: WWW: http://sourceforge.net/projects/firebird/ For more information on the locksmith back door, see: https://www.kb.cert.org/vuls/id/247371 Property changes on: head/databases/firebird-devel/pkg-descr ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property Index: head/databases/firebird-devel/pkg-install =================================================================== --- head/databases/firebird-devel/pkg-install (revision 50866) +++ head/databases/firebird-devel/pkg-install (revision 50867) @@ -1,149 +1,159 @@ #!/bin/sh # Created in haste by smashing together various # files from the port scripts. if [ "$2" = "PRE-INSTALL" ]; then if [ -d $PKG_PREFIX/firebird ]; then if [ -d $PKG_PREFIX/firebird.old ]; then rm -rf $PKG_PREFIX/firebird.old fi mv $PKG_PREFIX/firebird $PKG_PREFIX/firebird.old fi if [ -L /usr/interbase ]; then rm -f /usr/interbase fi if [ -d /usr/interbase ]; then mv /usr/interbase /usr/interbase.old fi ln -fs $PKG_PREFIX/firebird /usr/interbase perl < ) { print "\nYou must be root to run this step!\n\n"; exit 1; } if( getpwnam( "firebird" ) ) { ( \$null, \$null, \$fbUID ) = getpwnam( "firebird" ); } else { \$fbUID = 90; while( getpwuid( \$fbUID ) ) { \$fbUID++; } } if( getgrnam( "firebird" ) ) { ( \$null, \$null, \$fbGID ) = getgrnam( "firebird" ); } else { \$fbGID = 90; while( getgrgid( \$fbGID ) ) { \$fbGID++; } &append_file( "/etc/group", "firebird:*:\$fbGID:" ); } print "firebird user using uid \$fbUID\n"; print "firebird user using gid \$fbGID\n"; system( "/usr/bin/chpass -a \"firebird:*:\$fbUID:\$fbGID\:\:0:0:Firebird pseudo-user:\$ENV{'PKG_PREFIX'}/firebird:/bin/sh\"" ); sub append_file { local(\$file,@list) = @_; local(\$LOCK_EX) = 2; local(\$LOCK_NB) = 4; local(\$LOCK_UN) = 8; open(F, ">> \$file") || die "\$file: \$!\n"; while( ! flock( F, \$LOCK_EX | \$LOCK_NB ) ) { exit 1; } print F join( "\n", @list) . "\n"; close F; flock( F, \$LOCK_UN ); } EOF elif [ "$2" = "POST-INSTALL" ]; then chown -R firebird:firebird $PKG_PREFIX/firebird -# make lib ldconfig-compatible -chown -R root:wheel $PKG_PREFIX/firebird/lib -chmod -R g-w $PKG_PREFIX/firebird/lib - # Turn everybody to read only. chmod -R o=r $PKG_PREFIX/firebird # Now fix up the mess. # fix up directories for i in `find $PKG_PREFIX/firebird -print` do FileName=$i if [ -d $FileName ] then chmod o=rx $FileName fi done +# make lib ldconfig-compatible +chown -R root:wheel $PKG_PREFIX/firebird/lib +chmod -R g-w $PKG_PREFIX/firebird/lib +# Fix UDF load problem +cd $PKG_PREFIX/firebird/lib +ln -sf ib_util.so libib_util.so cd $PKG_PREFIX/firebird/bin # all users can run everything. chmod o=rx * # SUID is needed for running server programs. for i in gds_lock_mgr gds_drop gds_inet_server do chmod ug+s $i done # Lock files cd $PKG_PREFIX/firebird for i in isc_init1 isc_lock1 isc_event1 do FileName=$i.`hostname` touch $FileName chmod uga=rw $FileName chown firebird:firebird $FileName done touch interbase.log chmod ugo=rw interbase.log # make databases writable by all chmod ugo=rw examples/v5/*.gdb chmod ugo=rw help/*.gdb chmod ugo=rw isc4.gdb # remove any existing gds service cp /etc/services /etc/services.old cp /etc/inetd.conf /etc/inetd.conf.old cat /etc/services |grep -v gds_db >/etc/services.new cat /etc/inetd.conf |grep -v gds_db >/etc/inetd.conf.new mv /etc/services.new /etc/services mv /etc/inetd.conf.new /etc/inetd.conf # add the gds service and restart inetd cat >>/etc/services <>/etc/inetd.conf < $PKG_PREFIX/etc/rc.d/000.firebird.sh +fi fi Property changes on: head/databases/firebird-devel/pkg-install ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.2 \ No newline at end of property +1.3 \ No newline at end of property Index: head/databases/firebird-devel/pkg-plist =================================================================== --- head/databases/firebird-devel/pkg-plist (revision 50866) +++ head/databases/firebird-devel/pkg-plist (revision 50867) @@ -1,104 +1,106 @@ +etc/rc.d/000.firebird.sh firebird/intl/gdsintl firebird/examples/v5/ib_udf.sql firebird/examples/v5/README firebird/examples/v5/align.h firebird/examples/v5/api1.c firebird/examples/v5/api10.c firebird/examples/v5/api11.c firebird/examples/v5/api12.c firebird/examples/v5/api13.c firebird/examples/v5/api14.e firebird/examples/v5/api15.c firebird/examples/v5/api16.c firebird/examples/v5/api16t.c firebird/examples/v5/api2.c firebird/examples/v5/api3.c firebird/examples/v5/api4.c firebird/examples/v5/api5.c firebird/examples/v5/api6.c firebird/examples/v5/api7.c firebird/examples/v5/api8.c firebird/examples/v5/api9.c firebird/examples/v5/api9f.c firebird/examples/v5/apifull.c firebird/examples/v5/employe2.sql firebird/examples/v5/dyn1.e firebird/examples/v5/dyn2.e firebird/examples/v5/dyn3.e firebird/examples/v5/dyn4.e firebird/examples/v5/dyn5.e firebird/examples/v5/dynfull.e firebird/examples/v5/employee.gbk firebird/examples/v5/employee.gdb firebird/examples/v5/example.h firebird/examples/v5/api9f.sql firebird/examples/v5/intlemp.gbk firebird/examples/v5/intlemp.gdb firebird/examples/v5/stat1.e firebird/examples/v5/stat10.e firebird/examples/v5/stat11.e firebird/examples/v5/stat12.e firebird/examples/v5/stat12t.e firebird/examples/v5/stat2.e firebird/examples/v5/stat3.e firebird/examples/v5/stat4.e firebird/examples/v5/stat5.e firebird/examples/v5/stat6.e firebird/examples/v5/stat7.e firebird/examples/v5/stat8.e firebird/examples/v5/stat9.e firebird/examples/v5/udf.sql firebird/examples/v5/udflib.c firebird/examples/v5/makefile firebird/include/perf.h firebird/include/ib_util.h firebird/include/gds.hxx firebird/include/gds.h firebird/include/ibase.h firebird/include/iberror.h firebird/include/gds.f firebird/UDF/ib_udf firebird/lib/ib_util.so firebird/lib/gds.a firebird/lib/gds.so firebird/lib/libgds.so firebird/lib/libgds.so.1 firebird/lib/libgds_pyxis.a firebird/lib/libgds.a +firebird/lib/libib_util.so firebird/lib/gds_pyxis.a firebird/help/help.gbak firebird/help/help.gdb firebird/bin/isc4.gbak firebird/bin/gpre firebird/bin/gds_pipe firebird/bin/gds_drop firebird/bin/gds_lock_mgr firebird/bin/gfix firebird/bin/gdef firebird/bin/isql firebird/bin/gds_lock_print firebird/bin/qli firebird/bin/gds_inet_server firebird/bin/gsplit firebird/bin/gstat firebird/bin/gds_relay firebird/bin/gsec firebird/bin/gbak firebird/services.isc firebird/isc_config firebird/isc4.gdb firebird/interbase.msg firebird/interbase.log firebird/inetd.conf.isc firebird/RELNOTES @dirrm firebird @dirrm firebird/intl @dirrm firebird/examples/v3 @dirrm firebird/examples/v4 @dirrm firebird/examples/v5 @dirrm firebird/examples @dirrm firebird/include @dirrm firebird/UDF @dirrm firebird/lib @dirrm firebird/help @dirrm firebird/bin Property changes on: head/databases/firebird-devel/pkg-plist ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property Index: head/databases/firebird-devel/scripts/post-install =================================================================== --- head/databases/firebird-devel/scripts/post-install (revision 50866) +++ head/databases/firebird-devel/scripts/post-install (revision 50867) @@ -1,76 +1,84 @@ #!/bin/sh chown -R firebird:firebird $PREFIX/firebird # Turn everybody to read only. chmod -R o=r $PREFIX/firebird # Now fix up the mess. # fix up directories for i in `find $PREFIX/firebird -print` do FileName=$i if [ -d $FileName ] then chmod o=rx $FileName fi done +# make lib ldconfig-compatible +chown -R root:wheel $PREFIX/firebird/lib +chmod -R g-w $PREFIX/firebird/lib +# Fix UDF load problem +cd $PREFIX/firebird/lib +ln -sf ib_util.so libib_util.so cd $PREFIX/firebird/bin # all users can run everything. chmod o=rx * # SUID is needed for running server programs. for i in gds_lock_mgr gds_drop gds_inet_server do chmod ug+s $i done # Lock files cd $PREFIX/firebird for i in isc_init1 isc_lock1 isc_event1 do FileName=$i.`hostname` touch $FileName chmod uga=rw $FileName chown firebird:firebird $FileName done touch interbase.log chmod ugo=rw interbase.log # make databases writable by all chmod ugo=rw examples/v5/*.gdb chmod ugo=rw help/*.gdb chmod ugo=rw isc4.gdb # remove any existing gds service sh $SCRIPTDIR/rmservice # add the gds service and restart inetd sh $SCRIPTDIR/addservice -kill -HUP `cat /var/run/inetd.pid` +if [ -f /var/run/inetd.pid ]; then + kill -HUP `cat /var/run/inetd.pid` +fi sed "s|%%PREFIX%%|$PREFIX|" $SCRIPTDIR/../pkg-message cat < # # $FreeBSD$ # PORTNAME= firebird PORTVERSION= 0.9 PORTREVISION= 4 CATEGORIES= databases MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR=firebird DISTFILES= firebird-boot-kit.tar.gz \ interbase0.9-4-v5examples.tar.gz \ interbase0.9-4src.tar.gz MAINTAINER= chris@aims.com.au WRKSRC= ${WRKDIR}/interbase INSTALLS_SHLIB= yes LDCONFIG_DIRS= %%PREFIX%%/firebird/lib +MSG_FILE= ${PKGDIR}/pkg-message +PKGMESSAGE= ${WRKDIR}/pkg-message ONLY_FOR_ARCHS= i386 .include do-extract: @${MKDIR} ${WRKDIR} @( \ - cd ${WRKDIR}; tar zxf ${DISTDIR}/interbase0.9-4src.tar.gz; \ - cd interbase; tar zxf ${DISTDIR}/firebird-boot-kit.tar.gz; \ + cd ${WRKDIR}; ${TAR} -xzf ${DISTDIR}/interbase0.9-4src.tar.gz; \ + cd interbase; ${TAR} -xzf ${DISTDIR}/firebird-boot-kit.tar.gz; \ ${CP} msgs/msg.gbak misc/msg.gbak \ ) -.if ${OSVERSION} >= 500016 post-patch: - ${PERL} -pi -e 's,\-ldescrypt,\-lcrypt,g' ${WRKSRC}/builds/original/prefix.freebsd + @${SED} 's|%%PREFIX%%|${PREFIX}|g' ${MSG_FILE} > ${PKGMESSAGE} +.if ${OSVERSION} >= 500016 || ${OSVERSION} >= 430001 + @${PERL} -pi -e 's,\-ldescrypt,\-lcrypt,g' \ + ${WRKSRC}/builds/original/prefix.freebsd +.else + @${PERL} -pi -e 's,^crypt_set_format.*,,' ${WRKSRC}/jrd/enc.c .endif do-configure: @( \ cd ${WRKDIR}/interbase; \ INTERBASE=${WRKDIR}/interbase/interbase; export INTERBASE; \ REFDBPATH=${WRKDIR}/refDatabases; export REFDBPATH; \ ${SH} buildBootDatabases; \ ${SH} setup_dirs.boot FREEBSD PROD ${WRKDIR}/refDatabases boot; \ ) do-build: @( \ + ${ECHO} '#!/bin/sh'; ${ECHO} \ + '[ -d ${LDCONFIG_RUNLIST} ] && ${LDCONFIG} -m ${LDCONFIG_RUNLIST}'; \ + ) > ${WRKDIR}/000.${PORTNAME}.sh + @( \ cd ${WRKDIR}/interbase; \ INTERBASE=${WRKDIR}/interbase/interbase; export INTERBASE; \ REFDBPATH=${WRKDIR}/refDatabases; export REFDBPATH; \ ${SH} boot.freebsd; \ ) do-install: @( \ cd ${WRKDIR}/interbase; \ ${CP} -Rp interbase ${PREFIX}/firebird; \ ${RM} ${PREFIX}/firebird/install; \ ${RM} ${PREFIX}/firebird/lib/libgds.so.1.0; \ ${LN} -fs gds.so ${PREFIX}/firebird/lib/libgds.so.1; \ - ${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/firebird/lib \ - ${CHMOD} -R g-w ${PREFIX}/firebird/lib \ cd ${PREFIX}/firebird/examples; \ - tar zxf ${DISTDIR}/interbase0.9-4-v5examples.tar.gz; \ - ${CP} ${FILESDIR}/RELNOTES ${PREFIX}/firebird/ \ + ${TAR} -xzf ${DISTDIR}/interbase0.9-4-v5examples.tar.gz; \ + ${CP} ${FILESDIR}/RELNOTES ${PREFIX}/firebird/; \ + ${INSTALL_SCRIPT} ${WRKDIR}/000.${PORTNAME}.sh ${PREFIX}/etc/rc.d/ \ ) .include Property changes on: head/databases/firebird-server/Makefile ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.4 \ No newline at end of property +1.5 \ No newline at end of property Index: head/databases/firebird-server/files/RELNOTES =================================================================== --- head/databases/firebird-server/files/RELNOTES (revision 50866) +++ head/databases/firebird-server/files/RELNOTES (revision 50867) @@ -1,78 +1,79 @@ Firebird 0.9_4 FreeBSD Release Notes 13-Jan-2001 ------------------------------------ FB-T0.9.4.34 Firebird Test1 Welcome to the FreeBSD Firebird port! Users should note that there was a package called `firebird-1.0.tgz' released in mid-August 2000. Unfortunately, that package was released before Firebird version numbering conventions were established, so although the version number would suggest that it is newer than the current release, it is certainly not. Users of the August 1.0 package should upgrade to 0.9_4 or later, which has fixed many bugs and security problems, including the recently-discovered back door. Firebird originally required a running copy of Firebird (or InterBase) in order to build itself. This port uses a boot kit to overcome that, so that it does not require itself to build. Unfortunately, the side effect of this is that if you have a lock manager running from an already-installed version of Firebird or InterBase, this port will not build. Firebird is installed SUID with owner and group `firebird'. This does affect where you can and cannot create databases when connecting remotely, as well as which existing databases you can access. If you want a database to be available remotely, be sure it's readable and writeable to group firebird. There may be times when you manage to get your system into a state where using any of the Firebird utilites (isql, gbak, gsec, etc.) gives you the message "semget failed". One surefire way to do this is to build and install the port. :) If this happens, make sure that the lock manager is not running and its semaphores have been removed. The former can be accomplished with 'ps ax |grep gds' and 'kill'; the latter with 'ipcs -s' and 'ipcrm -s'. For example, after building and installing the port, you will probably go through something like this: # isql /usr/interbase/isc4.gdb Statement failed, SQLCODE = -902 operating system directive semget failed -No such file or directory # ipcs -s Semaphores: T ID KEY MODE OWNER GROUP s 1310720 252034728 --rw-rw-rw- root wheel # ipcrm -s 1310720 and you should be in business. Once this is done, you should be able to connect normally to databases. Your first connection will restart the lock manager. There may be times, however, when you still get "semget failed" even though the lock manager is not running and the semaphores have been cleaned up. There seems to be a conflict with this release and the PostgreSQL 7 release as installed from the ports collection. If you're having trouble with Firebird and you're running PostgreSQL, try stopping PostgreSQL: /usr/local/etc/rc.d/pgsql.sh stop and see if that helps. Complete documentation for InterBase(tm) is available (free of charge) from http://www.interbase.com/ in PDF format. While InterBase and Firebird are two distinct entities, all InterBase documentation is pertinent to Firebird. More information on Firebird and InterBase can be found at the following: http://sourceforge.net/projects/firebird/ http://www.ibphoenix.com/ http://www.interbase2000.org/ + http://www.firebirdsql.org/ Geoff Speicher Property changes on: head/databases/firebird-server/files/RELNOTES ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property Index: head/databases/firebird-server/files/patch-ad =================================================================== --- head/databases/firebird-server/files/patch-ad (nonexistent) +++ head/databases/firebird-server/files/patch-ad (revision 50867) @@ -0,0 +1,13 @@ +--- jrd/enc.c.orig Fri Aug 4 06:50:03 2000 ++++ jrd/enc.c Sun Nov 18 19:17:19 2001 +@@ -31,6 +31,10 @@ + * + **************************************/ + ++#ifdef FREEBSD ++crypt_set_format("des"); ++#endif ++ + return CRYPT_FUNC( string, salt); + } + #endif Property changes on: head/databases/firebird-server/files/patch-ad ___________________________________________________________________ Added: cvs2svn:cvs-rev ## -0,0 +1 ## +1.1 \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/databases/firebird-server/pkg-descr =================================================================== --- head/databases/firebird-server/pkg-descr (revision 50866) +++ head/databases/firebird-server/pkg-descr (revision 50867) @@ -1,22 +1,23 @@ The open-source InterBase(tm) 6.0 spin-off (Classic server version) InterBase is a world-class DBMS with a history too rich to detail here. Once selling for several thousands of dollars per license, some very big players use it worldwide. Inprise has open-sourced InterBase 6.0, and a lively bunch of folks has charged themselves with seeing that it lives on through the Firebird project. Note that as of Firebird 0.9_4, the locksmith back door has been closed. For more information on Firebird and InterBase, see: http://www.ibphoenix.com/ http://www.interbase2000.org/ http://www.interbase.com/ +http://www.firebirdsql.org/ and of course the firebird page itself: WWW: http://sourceforge.net/projects/firebird/ For more information on the locksmith back door, see: https://www.kb.cert.org/vuls/id/247371 Property changes on: head/databases/firebird-server/pkg-descr ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property Index: head/databases/firebird-server/pkg-install =================================================================== --- head/databases/firebird-server/pkg-install (revision 50866) +++ head/databases/firebird-server/pkg-install (revision 50867) @@ -1,149 +1,159 @@ #!/bin/sh # Created in haste by smashing together various # files from the port scripts. if [ "$2" = "PRE-INSTALL" ]; then if [ -d $PKG_PREFIX/firebird ]; then if [ -d $PKG_PREFIX/firebird.old ]; then rm -rf $PKG_PREFIX/firebird.old fi mv $PKG_PREFIX/firebird $PKG_PREFIX/firebird.old fi if [ -L /usr/interbase ]; then rm -f /usr/interbase fi if [ -d /usr/interbase ]; then mv /usr/interbase /usr/interbase.old fi ln -fs $PKG_PREFIX/firebird /usr/interbase perl < ) { print "\nYou must be root to run this step!\n\n"; exit 1; } if( getpwnam( "firebird" ) ) { ( \$null, \$null, \$fbUID ) = getpwnam( "firebird" ); } else { \$fbUID = 90; while( getpwuid( \$fbUID ) ) { \$fbUID++; } } if( getgrnam( "firebird" ) ) { ( \$null, \$null, \$fbGID ) = getgrnam( "firebird" ); } else { \$fbGID = 90; while( getgrgid( \$fbGID ) ) { \$fbGID++; } &append_file( "/etc/group", "firebird:*:\$fbGID:" ); } print "firebird user using uid \$fbUID\n"; print "firebird user using gid \$fbGID\n"; system( "/usr/bin/chpass -a \"firebird:*:\$fbUID:\$fbGID\:\:0:0:Firebird pseudo-user:\$ENV{'PKG_PREFIX'}/firebird:/bin/sh\"" ); sub append_file { local(\$file,@list) = @_; local(\$LOCK_EX) = 2; local(\$LOCK_NB) = 4; local(\$LOCK_UN) = 8; open(F, ">> \$file") || die "\$file: \$!\n"; while( ! flock( F, \$LOCK_EX | \$LOCK_NB ) ) { exit 1; } print F join( "\n", @list) . "\n"; close F; flock( F, \$LOCK_UN ); } EOF elif [ "$2" = "POST-INSTALL" ]; then chown -R firebird:firebird $PKG_PREFIX/firebird -# make lib ldconfig-compatible -chown -R root:wheel $PKG_PREFIX/firebird/lib -chmod -R g-w $PKG_PREFIX/firebird/lib - # Turn everybody to read only. chmod -R o=r $PKG_PREFIX/firebird # Now fix up the mess. # fix up directories for i in `find $PKG_PREFIX/firebird -print` do FileName=$i if [ -d $FileName ] then chmod o=rx $FileName fi done +# make lib ldconfig-compatible +chown -R root:wheel $PKG_PREFIX/firebird/lib +chmod -R g-w $PKG_PREFIX/firebird/lib +# Fix UDF load problem +cd $PKG_PREFIX/firebird/lib +ln -sf ib_util.so libib_util.so cd $PKG_PREFIX/firebird/bin # all users can run everything. chmod o=rx * # SUID is needed for running server programs. for i in gds_lock_mgr gds_drop gds_inet_server do chmod ug+s $i done # Lock files cd $PKG_PREFIX/firebird for i in isc_init1 isc_lock1 isc_event1 do FileName=$i.`hostname` touch $FileName chmod uga=rw $FileName chown firebird:firebird $FileName done touch interbase.log chmod ugo=rw interbase.log # make databases writable by all chmod ugo=rw examples/v5/*.gdb chmod ugo=rw help/*.gdb chmod ugo=rw isc4.gdb # remove any existing gds service cp /etc/services /etc/services.old cp /etc/inetd.conf /etc/inetd.conf.old cat /etc/services |grep -v gds_db >/etc/services.new cat /etc/inetd.conf |grep -v gds_db >/etc/inetd.conf.new mv /etc/services.new /etc/services mv /etc/inetd.conf.new /etc/inetd.conf # add the gds service and restart inetd cat >>/etc/services <>/etc/inetd.conf < $PKG_PREFIX/etc/rc.d/000.firebird.sh +fi fi Property changes on: head/databases/firebird-server/pkg-install ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.2 \ No newline at end of property +1.3 \ No newline at end of property Index: head/databases/firebird-server/pkg-plist =================================================================== --- head/databases/firebird-server/pkg-plist (revision 50866) +++ head/databases/firebird-server/pkg-plist (revision 50867) @@ -1,104 +1,106 @@ +etc/rc.d/000.firebird.sh firebird/intl/gdsintl firebird/examples/v5/ib_udf.sql firebird/examples/v5/README firebird/examples/v5/align.h firebird/examples/v5/api1.c firebird/examples/v5/api10.c firebird/examples/v5/api11.c firebird/examples/v5/api12.c firebird/examples/v5/api13.c firebird/examples/v5/api14.e firebird/examples/v5/api15.c firebird/examples/v5/api16.c firebird/examples/v5/api16t.c firebird/examples/v5/api2.c firebird/examples/v5/api3.c firebird/examples/v5/api4.c firebird/examples/v5/api5.c firebird/examples/v5/api6.c firebird/examples/v5/api7.c firebird/examples/v5/api8.c firebird/examples/v5/api9.c firebird/examples/v5/api9f.c firebird/examples/v5/apifull.c firebird/examples/v5/employe2.sql firebird/examples/v5/dyn1.e firebird/examples/v5/dyn2.e firebird/examples/v5/dyn3.e firebird/examples/v5/dyn4.e firebird/examples/v5/dyn5.e firebird/examples/v5/dynfull.e firebird/examples/v5/employee.gbk firebird/examples/v5/employee.gdb firebird/examples/v5/example.h firebird/examples/v5/api9f.sql firebird/examples/v5/intlemp.gbk firebird/examples/v5/intlemp.gdb firebird/examples/v5/stat1.e firebird/examples/v5/stat10.e firebird/examples/v5/stat11.e firebird/examples/v5/stat12.e firebird/examples/v5/stat12t.e firebird/examples/v5/stat2.e firebird/examples/v5/stat3.e firebird/examples/v5/stat4.e firebird/examples/v5/stat5.e firebird/examples/v5/stat6.e firebird/examples/v5/stat7.e firebird/examples/v5/stat8.e firebird/examples/v5/stat9.e firebird/examples/v5/udf.sql firebird/examples/v5/udflib.c firebird/examples/v5/makefile firebird/include/perf.h firebird/include/ib_util.h firebird/include/gds.hxx firebird/include/gds.h firebird/include/ibase.h firebird/include/iberror.h firebird/include/gds.f firebird/UDF/ib_udf firebird/lib/ib_util.so firebird/lib/gds.a firebird/lib/gds.so firebird/lib/libgds.so firebird/lib/libgds.so.1 firebird/lib/libgds_pyxis.a firebird/lib/libgds.a +firebird/lib/libib_util.so firebird/lib/gds_pyxis.a firebird/help/help.gbak firebird/help/help.gdb firebird/bin/isc4.gbak firebird/bin/gpre firebird/bin/gds_pipe firebird/bin/gds_drop firebird/bin/gds_lock_mgr firebird/bin/gfix firebird/bin/gdef firebird/bin/isql firebird/bin/gds_lock_print firebird/bin/qli firebird/bin/gds_inet_server firebird/bin/gsplit firebird/bin/gstat firebird/bin/gds_relay firebird/bin/gsec firebird/bin/gbak firebird/services.isc firebird/isc_config firebird/isc4.gdb firebird/interbase.msg firebird/interbase.log firebird/inetd.conf.isc firebird/RELNOTES @dirrm firebird @dirrm firebird/intl @dirrm firebird/examples/v3 @dirrm firebird/examples/v4 @dirrm firebird/examples/v5 @dirrm firebird/examples @dirrm firebird/include @dirrm firebird/UDF @dirrm firebird/lib @dirrm firebird/help @dirrm firebird/bin Property changes on: head/databases/firebird-server/pkg-plist ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property Index: head/databases/firebird-server/scripts/post-install =================================================================== --- head/databases/firebird-server/scripts/post-install (revision 50866) +++ head/databases/firebird-server/scripts/post-install (revision 50867) @@ -1,76 +1,84 @@ #!/bin/sh chown -R firebird:firebird $PREFIX/firebird # Turn everybody to read only. chmod -R o=r $PREFIX/firebird # Now fix up the mess. # fix up directories for i in `find $PREFIX/firebird -print` do FileName=$i if [ -d $FileName ] then chmod o=rx $FileName fi done +# make lib ldconfig-compatible +chown -R root:wheel $PREFIX/firebird/lib +chmod -R g-w $PREFIX/firebird/lib +# Fix UDF load problem +cd $PREFIX/firebird/lib +ln -sf ib_util.so libib_util.so cd $PREFIX/firebird/bin # all users can run everything. chmod o=rx * # SUID is needed for running server programs. for i in gds_lock_mgr gds_drop gds_inet_server do chmod ug+s $i done # Lock files cd $PREFIX/firebird for i in isc_init1 isc_lock1 isc_event1 do FileName=$i.`hostname` touch $FileName chmod uga=rw $FileName chown firebird:firebird $FileName done touch interbase.log chmod ugo=rw interbase.log # make databases writable by all chmod ugo=rw examples/v5/*.gdb chmod ugo=rw help/*.gdb chmod ugo=rw isc4.gdb # remove any existing gds service sh $SCRIPTDIR/rmservice # add the gds service and restart inetd sh $SCRIPTDIR/addservice -kill -HUP `cat /var/run/inetd.pid` +if [ -f /var/run/inetd.pid ]; then + kill -HUP `cat /var/run/inetd.pid` +fi sed "s|%%PREFIX%%|$PREFIX|" $SCRIPTDIR/../pkg-message cat < # # $FreeBSD$ # PORTNAME= firebird PORTVERSION= 0.9 PORTREVISION= 4 CATEGORIES= databases MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR=firebird DISTFILES= firebird-boot-kit.tar.gz \ interbase0.9-4-v5examples.tar.gz \ interbase0.9-4src.tar.gz MAINTAINER= chris@aims.com.au WRKSRC= ${WRKDIR}/interbase INSTALLS_SHLIB= yes LDCONFIG_DIRS= %%PREFIX%%/firebird/lib +MSG_FILE= ${PKGDIR}/pkg-message +PKGMESSAGE= ${WRKDIR}/pkg-message ONLY_FOR_ARCHS= i386 .include do-extract: @${MKDIR} ${WRKDIR} @( \ - cd ${WRKDIR}; tar zxf ${DISTDIR}/interbase0.9-4src.tar.gz; \ - cd interbase; tar zxf ${DISTDIR}/firebird-boot-kit.tar.gz; \ + cd ${WRKDIR}; ${TAR} -xzf ${DISTDIR}/interbase0.9-4src.tar.gz; \ + cd interbase; ${TAR} -xzf ${DISTDIR}/firebird-boot-kit.tar.gz; \ ${CP} msgs/msg.gbak misc/msg.gbak \ ) -.if ${OSVERSION} >= 500016 post-patch: - ${PERL} -pi -e 's,\-ldescrypt,\-lcrypt,g' ${WRKSRC}/builds/original/prefix.freebsd + @${SED} 's|%%PREFIX%%|${PREFIX}|g' ${MSG_FILE} > ${PKGMESSAGE} +.if ${OSVERSION} >= 500016 || ${OSVERSION} >= 430001 + @${PERL} -pi -e 's,\-ldescrypt,\-lcrypt,g' \ + ${WRKSRC}/builds/original/prefix.freebsd +.else + @${PERL} -pi -e 's,^crypt_set_format.*,,' ${WRKSRC}/jrd/enc.c .endif do-configure: @( \ cd ${WRKDIR}/interbase; \ INTERBASE=${WRKDIR}/interbase/interbase; export INTERBASE; \ REFDBPATH=${WRKDIR}/refDatabases; export REFDBPATH; \ ${SH} buildBootDatabases; \ ${SH} setup_dirs.boot FREEBSD PROD ${WRKDIR}/refDatabases boot; \ ) do-build: @( \ + ${ECHO} '#!/bin/sh'; ${ECHO} \ + '[ -d ${LDCONFIG_RUNLIST} ] && ${LDCONFIG} -m ${LDCONFIG_RUNLIST}'; \ + ) > ${WRKDIR}/000.${PORTNAME}.sh + @( \ cd ${WRKDIR}/interbase; \ INTERBASE=${WRKDIR}/interbase/interbase; export INTERBASE; \ REFDBPATH=${WRKDIR}/refDatabases; export REFDBPATH; \ ${SH} boot.freebsd; \ ) do-install: @( \ cd ${WRKDIR}/interbase; \ ${CP} -Rp interbase ${PREFIX}/firebird; \ ${RM} ${PREFIX}/firebird/install; \ ${RM} ${PREFIX}/firebird/lib/libgds.so.1.0; \ ${LN} -fs gds.so ${PREFIX}/firebird/lib/libgds.so.1; \ - ${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/firebird/lib \ - ${CHMOD} -R g-w ${PREFIX}/firebird/lib \ cd ${PREFIX}/firebird/examples; \ - tar zxf ${DISTDIR}/interbase0.9-4-v5examples.tar.gz; \ - ${CP} ${FILESDIR}/RELNOTES ${PREFIX}/firebird/ \ + ${TAR} -xzf ${DISTDIR}/interbase0.9-4-v5examples.tar.gz; \ + ${CP} ${FILESDIR}/RELNOTES ${PREFIX}/firebird/; \ + ${INSTALL_SCRIPT} ${WRKDIR}/000.${PORTNAME}.sh ${PREFIX}/etc/rc.d/ \ ) .include Property changes on: head/databases/firebird2-server/Makefile ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.4 \ No newline at end of property +1.5 \ No newline at end of property Index: head/databases/firebird2-server/files/RELNOTES =================================================================== --- head/databases/firebird2-server/files/RELNOTES (revision 50866) +++ head/databases/firebird2-server/files/RELNOTES (revision 50867) @@ -1,78 +1,79 @@ Firebird 0.9_4 FreeBSD Release Notes 13-Jan-2001 ------------------------------------ FB-T0.9.4.34 Firebird Test1 Welcome to the FreeBSD Firebird port! Users should note that there was a package called `firebird-1.0.tgz' released in mid-August 2000. Unfortunately, that package was released before Firebird version numbering conventions were established, so although the version number would suggest that it is newer than the current release, it is certainly not. Users of the August 1.0 package should upgrade to 0.9_4 or later, which has fixed many bugs and security problems, including the recently-discovered back door. Firebird originally required a running copy of Firebird (or InterBase) in order to build itself. This port uses a boot kit to overcome that, so that it does not require itself to build. Unfortunately, the side effect of this is that if you have a lock manager running from an already-installed version of Firebird or InterBase, this port will not build. Firebird is installed SUID with owner and group `firebird'. This does affect where you can and cannot create databases when connecting remotely, as well as which existing databases you can access. If you want a database to be available remotely, be sure it's readable and writeable to group firebird. There may be times when you manage to get your system into a state where using any of the Firebird utilites (isql, gbak, gsec, etc.) gives you the message "semget failed". One surefire way to do this is to build and install the port. :) If this happens, make sure that the lock manager is not running and its semaphores have been removed. The former can be accomplished with 'ps ax |grep gds' and 'kill'; the latter with 'ipcs -s' and 'ipcrm -s'. For example, after building and installing the port, you will probably go through something like this: # isql /usr/interbase/isc4.gdb Statement failed, SQLCODE = -902 operating system directive semget failed -No such file or directory # ipcs -s Semaphores: T ID KEY MODE OWNER GROUP s 1310720 252034728 --rw-rw-rw- root wheel # ipcrm -s 1310720 and you should be in business. Once this is done, you should be able to connect normally to databases. Your first connection will restart the lock manager. There may be times, however, when you still get "semget failed" even though the lock manager is not running and the semaphores have been cleaned up. There seems to be a conflict with this release and the PostgreSQL 7 release as installed from the ports collection. If you're having trouble with Firebird and you're running PostgreSQL, try stopping PostgreSQL: /usr/local/etc/rc.d/pgsql.sh stop and see if that helps. Complete documentation for InterBase(tm) is available (free of charge) from http://www.interbase.com/ in PDF format. While InterBase and Firebird are two distinct entities, all InterBase documentation is pertinent to Firebird. More information on Firebird and InterBase can be found at the following: http://sourceforge.net/projects/firebird/ http://www.ibphoenix.com/ http://www.interbase2000.org/ + http://www.firebirdsql.org/ Geoff Speicher Property changes on: head/databases/firebird2-server/files/RELNOTES ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property Index: head/databases/firebird2-server/files/patch-ad =================================================================== --- head/databases/firebird2-server/files/patch-ad (nonexistent) +++ head/databases/firebird2-server/files/patch-ad (revision 50867) @@ -0,0 +1,13 @@ +--- jrd/enc.c.orig Fri Aug 4 06:50:03 2000 ++++ jrd/enc.c Sun Nov 18 19:17:19 2001 +@@ -31,6 +31,10 @@ + * + **************************************/ + ++#ifdef FREEBSD ++crypt_set_format("des"); ++#endif ++ + return CRYPT_FUNC( string, salt); + } + #endif Property changes on: head/databases/firebird2-server/files/patch-ad ___________________________________________________________________ Added: cvs2svn:cvs-rev ## -0,0 +1 ## +1.1 \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/databases/firebird2-server/pkg-descr =================================================================== --- head/databases/firebird2-server/pkg-descr (revision 50866) +++ head/databases/firebird2-server/pkg-descr (revision 50867) @@ -1,22 +1,23 @@ The open-source InterBase(tm) 6.0 spin-off (Classic server version) InterBase is a world-class DBMS with a history too rich to detail here. Once selling for several thousands of dollars per license, some very big players use it worldwide. Inprise has open-sourced InterBase 6.0, and a lively bunch of folks has charged themselves with seeing that it lives on through the Firebird project. Note that as of Firebird 0.9_4, the locksmith back door has been closed. For more information on Firebird and InterBase, see: http://www.ibphoenix.com/ http://www.interbase2000.org/ http://www.interbase.com/ +http://www.firebirdsql.org/ and of course the firebird page itself: WWW: http://sourceforge.net/projects/firebird/ For more information on the locksmith back door, see: https://www.kb.cert.org/vuls/id/247371 Property changes on: head/databases/firebird2-server/pkg-descr ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property Index: head/databases/firebird2-server/pkg-install =================================================================== --- head/databases/firebird2-server/pkg-install (revision 50866) +++ head/databases/firebird2-server/pkg-install (revision 50867) @@ -1,149 +1,159 @@ #!/bin/sh # Created in haste by smashing together various # files from the port scripts. if [ "$2" = "PRE-INSTALL" ]; then if [ -d $PKG_PREFIX/firebird ]; then if [ -d $PKG_PREFIX/firebird.old ]; then rm -rf $PKG_PREFIX/firebird.old fi mv $PKG_PREFIX/firebird $PKG_PREFIX/firebird.old fi if [ -L /usr/interbase ]; then rm -f /usr/interbase fi if [ -d /usr/interbase ]; then mv /usr/interbase /usr/interbase.old fi ln -fs $PKG_PREFIX/firebird /usr/interbase perl < ) { print "\nYou must be root to run this step!\n\n"; exit 1; } if( getpwnam( "firebird" ) ) { ( \$null, \$null, \$fbUID ) = getpwnam( "firebird" ); } else { \$fbUID = 90; while( getpwuid( \$fbUID ) ) { \$fbUID++; } } if( getgrnam( "firebird" ) ) { ( \$null, \$null, \$fbGID ) = getgrnam( "firebird" ); } else { \$fbGID = 90; while( getgrgid( \$fbGID ) ) { \$fbGID++; } &append_file( "/etc/group", "firebird:*:\$fbGID:" ); } print "firebird user using uid \$fbUID\n"; print "firebird user using gid \$fbGID\n"; system( "/usr/bin/chpass -a \"firebird:*:\$fbUID:\$fbGID\:\:0:0:Firebird pseudo-user:\$ENV{'PKG_PREFIX'}/firebird:/bin/sh\"" ); sub append_file { local(\$file,@list) = @_; local(\$LOCK_EX) = 2; local(\$LOCK_NB) = 4; local(\$LOCK_UN) = 8; open(F, ">> \$file") || die "\$file: \$!\n"; while( ! flock( F, \$LOCK_EX | \$LOCK_NB ) ) { exit 1; } print F join( "\n", @list) . "\n"; close F; flock( F, \$LOCK_UN ); } EOF elif [ "$2" = "POST-INSTALL" ]; then chown -R firebird:firebird $PKG_PREFIX/firebird -# make lib ldconfig-compatible -chown -R root:wheel $PKG_PREFIX/firebird/lib -chmod -R g-w $PKG_PREFIX/firebird/lib - # Turn everybody to read only. chmod -R o=r $PKG_PREFIX/firebird # Now fix up the mess. # fix up directories for i in `find $PKG_PREFIX/firebird -print` do FileName=$i if [ -d $FileName ] then chmod o=rx $FileName fi done +# make lib ldconfig-compatible +chown -R root:wheel $PKG_PREFIX/firebird/lib +chmod -R g-w $PKG_PREFIX/firebird/lib +# Fix UDF load problem +cd $PKG_PREFIX/firebird/lib +ln -sf ib_util.so libib_util.so cd $PKG_PREFIX/firebird/bin # all users can run everything. chmod o=rx * # SUID is needed for running server programs. for i in gds_lock_mgr gds_drop gds_inet_server do chmod ug+s $i done # Lock files cd $PKG_PREFIX/firebird for i in isc_init1 isc_lock1 isc_event1 do FileName=$i.`hostname` touch $FileName chmod uga=rw $FileName chown firebird:firebird $FileName done touch interbase.log chmod ugo=rw interbase.log # make databases writable by all chmod ugo=rw examples/v5/*.gdb chmod ugo=rw help/*.gdb chmod ugo=rw isc4.gdb # remove any existing gds service cp /etc/services /etc/services.old cp /etc/inetd.conf /etc/inetd.conf.old cat /etc/services |grep -v gds_db >/etc/services.new cat /etc/inetd.conf |grep -v gds_db >/etc/inetd.conf.new mv /etc/services.new /etc/services mv /etc/inetd.conf.new /etc/inetd.conf # add the gds service and restart inetd cat >>/etc/services <>/etc/inetd.conf < $PKG_PREFIX/etc/rc.d/000.firebird.sh +fi fi Property changes on: head/databases/firebird2-server/pkg-install ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.2 \ No newline at end of property +1.3 \ No newline at end of property Index: head/databases/firebird2-server/pkg-plist =================================================================== --- head/databases/firebird2-server/pkg-plist (revision 50866) +++ head/databases/firebird2-server/pkg-plist (revision 50867) @@ -1,104 +1,106 @@ +etc/rc.d/000.firebird.sh firebird/intl/gdsintl firebird/examples/v5/ib_udf.sql firebird/examples/v5/README firebird/examples/v5/align.h firebird/examples/v5/api1.c firebird/examples/v5/api10.c firebird/examples/v5/api11.c firebird/examples/v5/api12.c firebird/examples/v5/api13.c firebird/examples/v5/api14.e firebird/examples/v5/api15.c firebird/examples/v5/api16.c firebird/examples/v5/api16t.c firebird/examples/v5/api2.c firebird/examples/v5/api3.c firebird/examples/v5/api4.c firebird/examples/v5/api5.c firebird/examples/v5/api6.c firebird/examples/v5/api7.c firebird/examples/v5/api8.c firebird/examples/v5/api9.c firebird/examples/v5/api9f.c firebird/examples/v5/apifull.c firebird/examples/v5/employe2.sql firebird/examples/v5/dyn1.e firebird/examples/v5/dyn2.e firebird/examples/v5/dyn3.e firebird/examples/v5/dyn4.e firebird/examples/v5/dyn5.e firebird/examples/v5/dynfull.e firebird/examples/v5/employee.gbk firebird/examples/v5/employee.gdb firebird/examples/v5/example.h firebird/examples/v5/api9f.sql firebird/examples/v5/intlemp.gbk firebird/examples/v5/intlemp.gdb firebird/examples/v5/stat1.e firebird/examples/v5/stat10.e firebird/examples/v5/stat11.e firebird/examples/v5/stat12.e firebird/examples/v5/stat12t.e firebird/examples/v5/stat2.e firebird/examples/v5/stat3.e firebird/examples/v5/stat4.e firebird/examples/v5/stat5.e firebird/examples/v5/stat6.e firebird/examples/v5/stat7.e firebird/examples/v5/stat8.e firebird/examples/v5/stat9.e firebird/examples/v5/udf.sql firebird/examples/v5/udflib.c firebird/examples/v5/makefile firebird/include/perf.h firebird/include/ib_util.h firebird/include/gds.hxx firebird/include/gds.h firebird/include/ibase.h firebird/include/iberror.h firebird/include/gds.f firebird/UDF/ib_udf firebird/lib/ib_util.so firebird/lib/gds.a firebird/lib/gds.so firebird/lib/libgds.so firebird/lib/libgds.so.1 firebird/lib/libgds_pyxis.a firebird/lib/libgds.a +firebird/lib/libib_util.so firebird/lib/gds_pyxis.a firebird/help/help.gbak firebird/help/help.gdb firebird/bin/isc4.gbak firebird/bin/gpre firebird/bin/gds_pipe firebird/bin/gds_drop firebird/bin/gds_lock_mgr firebird/bin/gfix firebird/bin/gdef firebird/bin/isql firebird/bin/gds_lock_print firebird/bin/qli firebird/bin/gds_inet_server firebird/bin/gsplit firebird/bin/gstat firebird/bin/gds_relay firebird/bin/gsec firebird/bin/gbak firebird/services.isc firebird/isc_config firebird/isc4.gdb firebird/interbase.msg firebird/interbase.log firebird/inetd.conf.isc firebird/RELNOTES @dirrm firebird @dirrm firebird/intl @dirrm firebird/examples/v3 @dirrm firebird/examples/v4 @dirrm firebird/examples/v5 @dirrm firebird/examples @dirrm firebird/include @dirrm firebird/UDF @dirrm firebird/lib @dirrm firebird/help @dirrm firebird/bin Property changes on: head/databases/firebird2-server/pkg-plist ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property Index: head/databases/firebird2-server/scripts/post-install =================================================================== --- head/databases/firebird2-server/scripts/post-install (revision 50866) +++ head/databases/firebird2-server/scripts/post-install (revision 50867) @@ -1,76 +1,84 @@ #!/bin/sh chown -R firebird:firebird $PREFIX/firebird # Turn everybody to read only. chmod -R o=r $PREFIX/firebird # Now fix up the mess. # fix up directories for i in `find $PREFIX/firebird -print` do FileName=$i if [ -d $FileName ] then chmod o=rx $FileName fi done +# make lib ldconfig-compatible +chown -R root:wheel $PREFIX/firebird/lib +chmod -R g-w $PREFIX/firebird/lib +# Fix UDF load problem +cd $PREFIX/firebird/lib +ln -sf ib_util.so libib_util.so cd $PREFIX/firebird/bin # all users can run everything. chmod o=rx * # SUID is needed for running server programs. for i in gds_lock_mgr gds_drop gds_inet_server do chmod ug+s $i done # Lock files cd $PREFIX/firebird for i in isc_init1 isc_lock1 isc_event1 do FileName=$i.`hostname` touch $FileName chmod uga=rw $FileName chown firebird:firebird $FileName done touch interbase.log chmod ugo=rw interbase.log # make databases writable by all chmod ugo=rw examples/v5/*.gdb chmod ugo=rw help/*.gdb chmod ugo=rw isc4.gdb # remove any existing gds service sh $SCRIPTDIR/rmservice # add the gds service and restart inetd sh $SCRIPTDIR/addservice -kill -HUP `cat /var/run/inetd.pid` +if [ -f /var/run/inetd.pid ]; then + kill -HUP `cat /var/run/inetd.pid` +fi sed "s|%%PREFIX%%|$PREFIX|" $SCRIPTDIR/../pkg-message cat < # # $FreeBSD$ # PORTNAME= firebird PORTVERSION= 0.9 PORTREVISION= 4 CATEGORIES= databases MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR=firebird DISTFILES= firebird-boot-kit.tar.gz \ interbase0.9-4-v5examples.tar.gz \ interbase0.9-4src.tar.gz MAINTAINER= chris@aims.com.au WRKSRC= ${WRKDIR}/interbase INSTALLS_SHLIB= yes LDCONFIG_DIRS= %%PREFIX%%/firebird/lib +MSG_FILE= ${PKGDIR}/pkg-message +PKGMESSAGE= ${WRKDIR}/pkg-message ONLY_FOR_ARCHS= i386 .include do-extract: @${MKDIR} ${WRKDIR} @( \ - cd ${WRKDIR}; tar zxf ${DISTDIR}/interbase0.9-4src.tar.gz; \ - cd interbase; tar zxf ${DISTDIR}/firebird-boot-kit.tar.gz; \ + cd ${WRKDIR}; ${TAR} -xzf ${DISTDIR}/interbase0.9-4src.tar.gz; \ + cd interbase; ${TAR} -xzf ${DISTDIR}/firebird-boot-kit.tar.gz; \ ${CP} msgs/msg.gbak misc/msg.gbak \ ) -.if ${OSVERSION} >= 500016 post-patch: - ${PERL} -pi -e 's,\-ldescrypt,\-lcrypt,g' ${WRKSRC}/builds/original/prefix.freebsd + @${SED} 's|%%PREFIX%%|${PREFIX}|g' ${MSG_FILE} > ${PKGMESSAGE} +.if ${OSVERSION} >= 500016 || ${OSVERSION} >= 430001 + @${PERL} -pi -e 's,\-ldescrypt,\-lcrypt,g' \ + ${WRKSRC}/builds/original/prefix.freebsd +.else + @${PERL} -pi -e 's,^crypt_set_format.*,,' ${WRKSRC}/jrd/enc.c .endif do-configure: @( \ cd ${WRKDIR}/interbase; \ INTERBASE=${WRKDIR}/interbase/interbase; export INTERBASE; \ REFDBPATH=${WRKDIR}/refDatabases; export REFDBPATH; \ ${SH} buildBootDatabases; \ ${SH} setup_dirs.boot FREEBSD PROD ${WRKDIR}/refDatabases boot; \ ) do-build: @( \ + ${ECHO} '#!/bin/sh'; ${ECHO} \ + '[ -d ${LDCONFIG_RUNLIST} ] && ${LDCONFIG} -m ${LDCONFIG_RUNLIST}'; \ + ) > ${WRKDIR}/000.${PORTNAME}.sh + @( \ cd ${WRKDIR}/interbase; \ INTERBASE=${WRKDIR}/interbase/interbase; export INTERBASE; \ REFDBPATH=${WRKDIR}/refDatabases; export REFDBPATH; \ ${SH} boot.freebsd; \ ) do-install: @( \ cd ${WRKDIR}/interbase; \ ${CP} -Rp interbase ${PREFIX}/firebird; \ ${RM} ${PREFIX}/firebird/install; \ ${RM} ${PREFIX}/firebird/lib/libgds.so.1.0; \ ${LN} -fs gds.so ${PREFIX}/firebird/lib/libgds.so.1; \ - ${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/firebird/lib \ - ${CHMOD} -R g-w ${PREFIX}/firebird/lib \ cd ${PREFIX}/firebird/examples; \ - tar zxf ${DISTDIR}/interbase0.9-4-v5examples.tar.gz; \ - ${CP} ${FILESDIR}/RELNOTES ${PREFIX}/firebird/ \ + ${TAR} -xzf ${DISTDIR}/interbase0.9-4-v5examples.tar.gz; \ + ${CP} ${FILESDIR}/RELNOTES ${PREFIX}/firebird/; \ + ${INSTALL_SCRIPT} ${WRKDIR}/000.${PORTNAME}.sh ${PREFIX}/etc/rc.d/ \ ) .include Property changes on: head/databases/firebird20-server/Makefile ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.4 \ No newline at end of property +1.5 \ No newline at end of property Index: head/databases/firebird20-server/files/RELNOTES =================================================================== --- head/databases/firebird20-server/files/RELNOTES (revision 50866) +++ head/databases/firebird20-server/files/RELNOTES (revision 50867) @@ -1,78 +1,79 @@ Firebird 0.9_4 FreeBSD Release Notes 13-Jan-2001 ------------------------------------ FB-T0.9.4.34 Firebird Test1 Welcome to the FreeBSD Firebird port! Users should note that there was a package called `firebird-1.0.tgz' released in mid-August 2000. Unfortunately, that package was released before Firebird version numbering conventions were established, so although the version number would suggest that it is newer than the current release, it is certainly not. Users of the August 1.0 package should upgrade to 0.9_4 or later, which has fixed many bugs and security problems, including the recently-discovered back door. Firebird originally required a running copy of Firebird (or InterBase) in order to build itself. This port uses a boot kit to overcome that, so that it does not require itself to build. Unfortunately, the side effect of this is that if you have a lock manager running from an already-installed version of Firebird or InterBase, this port will not build. Firebird is installed SUID with owner and group `firebird'. This does affect where you can and cannot create databases when connecting remotely, as well as which existing databases you can access. If you want a database to be available remotely, be sure it's readable and writeable to group firebird. There may be times when you manage to get your system into a state where using any of the Firebird utilites (isql, gbak, gsec, etc.) gives you the message "semget failed". One surefire way to do this is to build and install the port. :) If this happens, make sure that the lock manager is not running and its semaphores have been removed. The former can be accomplished with 'ps ax |grep gds' and 'kill'; the latter with 'ipcs -s' and 'ipcrm -s'. For example, after building and installing the port, you will probably go through something like this: # isql /usr/interbase/isc4.gdb Statement failed, SQLCODE = -902 operating system directive semget failed -No such file or directory # ipcs -s Semaphores: T ID KEY MODE OWNER GROUP s 1310720 252034728 --rw-rw-rw- root wheel # ipcrm -s 1310720 and you should be in business. Once this is done, you should be able to connect normally to databases. Your first connection will restart the lock manager. There may be times, however, when you still get "semget failed" even though the lock manager is not running and the semaphores have been cleaned up. There seems to be a conflict with this release and the PostgreSQL 7 release as installed from the ports collection. If you're having trouble with Firebird and you're running PostgreSQL, try stopping PostgreSQL: /usr/local/etc/rc.d/pgsql.sh stop and see if that helps. Complete documentation for InterBase(tm) is available (free of charge) from http://www.interbase.com/ in PDF format. While InterBase and Firebird are two distinct entities, all InterBase documentation is pertinent to Firebird. More information on Firebird and InterBase can be found at the following: http://sourceforge.net/projects/firebird/ http://www.ibphoenix.com/ http://www.interbase2000.org/ + http://www.firebirdsql.org/ Geoff Speicher Property changes on: head/databases/firebird20-server/files/RELNOTES ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property Index: head/databases/firebird20-server/files/patch-ad =================================================================== --- head/databases/firebird20-server/files/patch-ad (nonexistent) +++ head/databases/firebird20-server/files/patch-ad (revision 50867) @@ -0,0 +1,13 @@ +--- jrd/enc.c.orig Fri Aug 4 06:50:03 2000 ++++ jrd/enc.c Sun Nov 18 19:17:19 2001 +@@ -31,6 +31,10 @@ + * + **************************************/ + ++#ifdef FREEBSD ++crypt_set_format("des"); ++#endif ++ + return CRYPT_FUNC( string, salt); + } + #endif Property changes on: head/databases/firebird20-server/files/patch-ad ___________________________________________________________________ Added: cvs2svn:cvs-rev ## -0,0 +1 ## +1.1 \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/databases/firebird20-server/pkg-descr =================================================================== --- head/databases/firebird20-server/pkg-descr (revision 50866) +++ head/databases/firebird20-server/pkg-descr (revision 50867) @@ -1,22 +1,23 @@ The open-source InterBase(tm) 6.0 spin-off (Classic server version) InterBase is a world-class DBMS with a history too rich to detail here. Once selling for several thousands of dollars per license, some very big players use it worldwide. Inprise has open-sourced InterBase 6.0, and a lively bunch of folks has charged themselves with seeing that it lives on through the Firebird project. Note that as of Firebird 0.9_4, the locksmith back door has been closed. For more information on Firebird and InterBase, see: http://www.ibphoenix.com/ http://www.interbase2000.org/ http://www.interbase.com/ +http://www.firebirdsql.org/ and of course the firebird page itself: WWW: http://sourceforge.net/projects/firebird/ For more information on the locksmith back door, see: https://www.kb.cert.org/vuls/id/247371 Property changes on: head/databases/firebird20-server/pkg-descr ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property Index: head/databases/firebird20-server/pkg-install =================================================================== --- head/databases/firebird20-server/pkg-install (revision 50866) +++ head/databases/firebird20-server/pkg-install (revision 50867) @@ -1,149 +1,159 @@ #!/bin/sh # Created in haste by smashing together various # files from the port scripts. if [ "$2" = "PRE-INSTALL" ]; then if [ -d $PKG_PREFIX/firebird ]; then if [ -d $PKG_PREFIX/firebird.old ]; then rm -rf $PKG_PREFIX/firebird.old fi mv $PKG_PREFIX/firebird $PKG_PREFIX/firebird.old fi if [ -L /usr/interbase ]; then rm -f /usr/interbase fi if [ -d /usr/interbase ]; then mv /usr/interbase /usr/interbase.old fi ln -fs $PKG_PREFIX/firebird /usr/interbase perl < ) { print "\nYou must be root to run this step!\n\n"; exit 1; } if( getpwnam( "firebird" ) ) { ( \$null, \$null, \$fbUID ) = getpwnam( "firebird" ); } else { \$fbUID = 90; while( getpwuid( \$fbUID ) ) { \$fbUID++; } } if( getgrnam( "firebird" ) ) { ( \$null, \$null, \$fbGID ) = getgrnam( "firebird" ); } else { \$fbGID = 90; while( getgrgid( \$fbGID ) ) { \$fbGID++; } &append_file( "/etc/group", "firebird:*:\$fbGID:" ); } print "firebird user using uid \$fbUID\n"; print "firebird user using gid \$fbGID\n"; system( "/usr/bin/chpass -a \"firebird:*:\$fbUID:\$fbGID\:\:0:0:Firebird pseudo-user:\$ENV{'PKG_PREFIX'}/firebird:/bin/sh\"" ); sub append_file { local(\$file,@list) = @_; local(\$LOCK_EX) = 2; local(\$LOCK_NB) = 4; local(\$LOCK_UN) = 8; open(F, ">> \$file") || die "\$file: \$!\n"; while( ! flock( F, \$LOCK_EX | \$LOCK_NB ) ) { exit 1; } print F join( "\n", @list) . "\n"; close F; flock( F, \$LOCK_UN ); } EOF elif [ "$2" = "POST-INSTALL" ]; then chown -R firebird:firebird $PKG_PREFIX/firebird -# make lib ldconfig-compatible -chown -R root:wheel $PKG_PREFIX/firebird/lib -chmod -R g-w $PKG_PREFIX/firebird/lib - # Turn everybody to read only. chmod -R o=r $PKG_PREFIX/firebird # Now fix up the mess. # fix up directories for i in `find $PKG_PREFIX/firebird -print` do FileName=$i if [ -d $FileName ] then chmod o=rx $FileName fi done +# make lib ldconfig-compatible +chown -R root:wheel $PKG_PREFIX/firebird/lib +chmod -R g-w $PKG_PREFIX/firebird/lib +# Fix UDF load problem +cd $PKG_PREFIX/firebird/lib +ln -sf ib_util.so libib_util.so cd $PKG_PREFIX/firebird/bin # all users can run everything. chmod o=rx * # SUID is needed for running server programs. for i in gds_lock_mgr gds_drop gds_inet_server do chmod ug+s $i done # Lock files cd $PKG_PREFIX/firebird for i in isc_init1 isc_lock1 isc_event1 do FileName=$i.`hostname` touch $FileName chmod uga=rw $FileName chown firebird:firebird $FileName done touch interbase.log chmod ugo=rw interbase.log # make databases writable by all chmod ugo=rw examples/v5/*.gdb chmod ugo=rw help/*.gdb chmod ugo=rw isc4.gdb # remove any existing gds service cp /etc/services /etc/services.old cp /etc/inetd.conf /etc/inetd.conf.old cat /etc/services |grep -v gds_db >/etc/services.new cat /etc/inetd.conf |grep -v gds_db >/etc/inetd.conf.new mv /etc/services.new /etc/services mv /etc/inetd.conf.new /etc/inetd.conf # add the gds service and restart inetd cat >>/etc/services <>/etc/inetd.conf < $PKG_PREFIX/etc/rc.d/000.firebird.sh +fi fi Property changes on: head/databases/firebird20-server/pkg-install ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.2 \ No newline at end of property +1.3 \ No newline at end of property Index: head/databases/firebird20-server/pkg-plist =================================================================== --- head/databases/firebird20-server/pkg-plist (revision 50866) +++ head/databases/firebird20-server/pkg-plist (revision 50867) @@ -1,104 +1,106 @@ +etc/rc.d/000.firebird.sh firebird/intl/gdsintl firebird/examples/v5/ib_udf.sql firebird/examples/v5/README firebird/examples/v5/align.h firebird/examples/v5/api1.c firebird/examples/v5/api10.c firebird/examples/v5/api11.c firebird/examples/v5/api12.c firebird/examples/v5/api13.c firebird/examples/v5/api14.e firebird/examples/v5/api15.c firebird/examples/v5/api16.c firebird/examples/v5/api16t.c firebird/examples/v5/api2.c firebird/examples/v5/api3.c firebird/examples/v5/api4.c firebird/examples/v5/api5.c firebird/examples/v5/api6.c firebird/examples/v5/api7.c firebird/examples/v5/api8.c firebird/examples/v5/api9.c firebird/examples/v5/api9f.c firebird/examples/v5/apifull.c firebird/examples/v5/employe2.sql firebird/examples/v5/dyn1.e firebird/examples/v5/dyn2.e firebird/examples/v5/dyn3.e firebird/examples/v5/dyn4.e firebird/examples/v5/dyn5.e firebird/examples/v5/dynfull.e firebird/examples/v5/employee.gbk firebird/examples/v5/employee.gdb firebird/examples/v5/example.h firebird/examples/v5/api9f.sql firebird/examples/v5/intlemp.gbk firebird/examples/v5/intlemp.gdb firebird/examples/v5/stat1.e firebird/examples/v5/stat10.e firebird/examples/v5/stat11.e firebird/examples/v5/stat12.e firebird/examples/v5/stat12t.e firebird/examples/v5/stat2.e firebird/examples/v5/stat3.e firebird/examples/v5/stat4.e firebird/examples/v5/stat5.e firebird/examples/v5/stat6.e firebird/examples/v5/stat7.e firebird/examples/v5/stat8.e firebird/examples/v5/stat9.e firebird/examples/v5/udf.sql firebird/examples/v5/udflib.c firebird/examples/v5/makefile firebird/include/perf.h firebird/include/ib_util.h firebird/include/gds.hxx firebird/include/gds.h firebird/include/ibase.h firebird/include/iberror.h firebird/include/gds.f firebird/UDF/ib_udf firebird/lib/ib_util.so firebird/lib/gds.a firebird/lib/gds.so firebird/lib/libgds.so firebird/lib/libgds.so.1 firebird/lib/libgds_pyxis.a firebird/lib/libgds.a +firebird/lib/libib_util.so firebird/lib/gds_pyxis.a firebird/help/help.gbak firebird/help/help.gdb firebird/bin/isc4.gbak firebird/bin/gpre firebird/bin/gds_pipe firebird/bin/gds_drop firebird/bin/gds_lock_mgr firebird/bin/gfix firebird/bin/gdef firebird/bin/isql firebird/bin/gds_lock_print firebird/bin/qli firebird/bin/gds_inet_server firebird/bin/gsplit firebird/bin/gstat firebird/bin/gds_relay firebird/bin/gsec firebird/bin/gbak firebird/services.isc firebird/isc_config firebird/isc4.gdb firebird/interbase.msg firebird/interbase.log firebird/inetd.conf.isc firebird/RELNOTES @dirrm firebird @dirrm firebird/intl @dirrm firebird/examples/v3 @dirrm firebird/examples/v4 @dirrm firebird/examples/v5 @dirrm firebird/examples @dirrm firebird/include @dirrm firebird/UDF @dirrm firebird/lib @dirrm firebird/help @dirrm firebird/bin Property changes on: head/databases/firebird20-server/pkg-plist ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property Index: head/databases/firebird20-server/scripts/post-install =================================================================== --- head/databases/firebird20-server/scripts/post-install (revision 50866) +++ head/databases/firebird20-server/scripts/post-install (revision 50867) @@ -1,76 +1,84 @@ #!/bin/sh chown -R firebird:firebird $PREFIX/firebird # Turn everybody to read only. chmod -R o=r $PREFIX/firebird # Now fix up the mess. # fix up directories for i in `find $PREFIX/firebird -print` do FileName=$i if [ -d $FileName ] then chmod o=rx $FileName fi done +# make lib ldconfig-compatible +chown -R root:wheel $PREFIX/firebird/lib +chmod -R g-w $PREFIX/firebird/lib +# Fix UDF load problem +cd $PREFIX/firebird/lib +ln -sf ib_util.so libib_util.so cd $PREFIX/firebird/bin # all users can run everything. chmod o=rx * # SUID is needed for running server programs. for i in gds_lock_mgr gds_drop gds_inet_server do chmod ug+s $i done # Lock files cd $PREFIX/firebird for i in isc_init1 isc_lock1 isc_event1 do FileName=$i.`hostname` touch $FileName chmod uga=rw $FileName chown firebird:firebird $FileName done touch interbase.log chmod ugo=rw interbase.log # make databases writable by all chmod ugo=rw examples/v5/*.gdb chmod ugo=rw help/*.gdb chmod ugo=rw isc4.gdb # remove any existing gds service sh $SCRIPTDIR/rmservice # add the gds service and restart inetd sh $SCRIPTDIR/addservice -kill -HUP `cat /var/run/inetd.pid` +if [ -f /var/run/inetd.pid ]; then + kill -HUP `cat /var/run/inetd.pid` +fi sed "s|%%PREFIX%%|$PREFIX|" $SCRIPTDIR/../pkg-message cat <