summaryrefslogtreecommitdiff
path: root/databases/msql
diff options
context:
space:
mode:
authorJames FitzGibbon <jfitz@FreeBSD.org>1997-07-14 12:35:19 +0000
committerJames FitzGibbon <jfitz@FreeBSD.org>1997-07-14 12:35:19 +0000
commitf02845aa730d1c6cbf7385fbfd96dd20bc89a09e (patch)
tree49d982e6e567f16fe07b5fc1eca97d1be7755610 /databases/msql
parentUpgrade, 0.59f -> 0.59k. (diff)
Merge from msql-beta as of 1/21/97
Notes
Notes: svn path=/head/; revision=7309
Diffstat (limited to 'databases/msql')
-rw-r--r--databases/msql/Makefile62
-rw-r--r--databases/msql/distinfo2
-rw-r--r--databases/msql/files/patch-aa14
-rw-r--r--databases/msql/files/patch-ab95
-rw-r--r--databases/msql/files/patch-ac35
-rw-r--r--databases/msql/files/patch-ad36
-rw-r--r--databases/msql/files/patch-ae41
-rw-r--r--databases/msql/files/patch-af11
-rw-r--r--databases/msql/files/patch-ag11
-rw-r--r--databases/msql/files/patch-ah11
-rw-r--r--databases/msql/files/patch-ai11
-rw-r--r--databases/msql/files/patch-aj16
-rw-r--r--databases/msql/files/patch-ak262
-rw-r--r--databases/msql/files/patch-al11
-rw-r--r--databases/msql/files/post-install-notes51
-rw-r--r--databases/msql/pkg-comment2
-rw-r--r--databases/msql/pkg-descr47
-rw-r--r--databases/msql/pkg-plist151
-rw-r--r--databases/msql/scripts/createuser50
-rw-r--r--databases/msql/scripts/customize_scripts7
20 files changed, 770 insertions, 156 deletions
diff --git a/databases/msql/Makefile b/databases/msql/Makefile
index 72f74172a341..c8dfffe98950 100644
--- a/databases/msql/Makefile
+++ b/databases/msql/Makefile
@@ -1,37 +1,51 @@
-# New ports collection makefile for: msql
-# Version required: 1.0.16
-# Date created: 14 January 1995
-# Whom: mr (original)
+# New ports collection makefile for: msql2
+# Version required: 2.0b3
+# Date created: December 17th 1996
+# Whom: jfitz
#
-# $Id: Makefile,v 1.14 1996/11/17 03:18:30 obrien Exp $
+# $Id$
#
-DISTNAME= msql-1.0.16
+DISTNAME= msql-2.0-B3
+PKGNAME= msql-2.0b3
CATEGORIES= databases
-MASTER_SITES= http://hughes.com.au/software/msql1/
+MASTER_SITES= ftp://ftp.worldone.com/pub/msql/ \
+ http://www2.nerosworld.com/msql/ \
+ http://hughes.com.au/software/msql2/
MAINTAINTER= jfitz@FreeBSD.ORG
-#IS_INTERACTIVE= yes
+# Not free for commercial use. Must create a user on the local system
+NO_PACKAGE= YES
RESTRICTED= "restrictive copyright (no commercial use)"
-NO_MTREE= yes
+
+MAKE_ENV+= WRKSRC=${WRKSRC}
+
+do-configure:
+ cd ${WRKSRC}; make target
+ cd ${WRKSRC}/targets/freebsd; sh setup
+ @${SETENV} ${MAKE_ENV} /usr/bin/perl ${SCRIPTDIR}/customize_scripts
+
+pre-install:
+ @${SETENV} ${MAKE_ENV} /usr/bin/perl ${SCRIPTDIR}/createuser
post-install:
-.for file in Commercial License mSQL-Invoice.txt msql-pwr.README msql-pwr.gif msql-pwr2.gif
- ${INSTALL_DATA} ${WRKSRC}/doc/${file} ${PREFIX}/Minerva/doc
-.endfor
-.if !defined(NOPORTDOCS)
-.for file in HISTORY acl.txt mSQL-1.0.11.ps
- ${INSTALL_DATA} ${WRKSRC}/doc/${file} ${PREFIX}/Minerva/doc
-.endfor
-.endif
- ${INSTALL_SCRIPT} ${WRKSRC}/scripts/run_daemon ${PREFIX}/Minerva
- @ ${MKDIR} ${PREFIX}/etc/rc.d
- @ if [ ! -f ${PREFIX}/etc/rc.d/msql.sh ]; then \
- echo "Installing ${PREFIX}/etc/rc.d/msql.sh startup file."; \
- echo "#!/bin/sh" > ${PREFIX}/etc/rc.d/msql.sh; \
- echo "[ -x ${PREFIX}/Minerva/bin/msqld ] && ${PREFIX}/Minerva/bin/msqld & && echo -n ' msql'" >> ${PREFIX}/etc/rc.d/msql.sh; \
- chmod 751 ${PREFIX}/etc/rc.d/msql.sh; \
+ @${INSTALL_SCRIPT} ${WRKSRC}/scripts/run_daemon ${PREFIX}/bin
+ @${INSTALL_DATA} ${FILESDIR}/post-install-notes ${PREFIX}/share/doc/msql
+ @for file in msql2d msqladmin msqlimport msqlexport; do\
+ /usr/bin/chgrp msql ${PREFIX}/bin/$$file; \
+ done
+ @/bin/chmod 751 ${PREFIX}/etc/msql2/
+ @/usr/sbin/chown -R msql.msql ${PREFIX}/etc/msql2/
+ @${MKDIR} -p ${PREFIX}/etc/rc.d
+ @if [ ! -f ${PREFIX}/etc/rc.d/msql2.sh ]; then \
+ echo "Installing ${PREFIX}/etc/rc.d/msql2.sh startup file."; \
+ echo "#!/bin/sh" > ${PREFIX}/etc/rc.d/msql2.sh; \
+ echo "[ -x ${PREFIX}/bin/run_daemon ] && su -l msql -c '${PREFIX}/bin/run_daemon msql2d' & && echo -n ' msql2'" >> ${PREFIX}/etc/rc.d/msql2.sh; \
+ chmod 751 ${PREFIX}/etc/rc.d/msql2.sh; \
fi
+.if !defined(BATCH)
+ @ /usr/bin/more -e ${FILESDIR}/post-install-notes
+.endif
.include <bsd.port.mk>
diff --git a/databases/msql/distinfo b/databases/msql/distinfo
index 439b1009aeb3..f634c8538b88 100644
--- a/databases/msql/distinfo
+++ b/databases/msql/distinfo
@@ -1 +1 @@
-MD5 (msql-1.0.16.tar.gz) = a999aaef53ef375221bc783d7c126d8b
+MD5 (msql-2.0-B3.tar.gz) = 411f2ce122a34ec3cdb79d98bf4e8918
diff --git a/databases/msql/files/patch-aa b/databases/msql/files/patch-aa
index f59b15c633e8..d8250563197f 100644
--- a/databases/msql/files/patch-aa
+++ b/databases/msql/files/patch-aa
@@ -1,6 +1,6 @@
---- Makefile.orig Tue Feb 7 20:03:58 1995
-+++ Makefile Thu Oct 3 20:08:24 1996
-@@ -18,12 +18,16 @@
+--- Makefile.orig Tue Dec 17 11:12:16 1996
++++ Makefile Tue Dec 17 11:13:26 1996
+@@ -18,14 +18,16 @@
SHELL=/bin/sh
all:
@@ -16,7 +16,9 @@
target:
@ scripts/make-target
-+ @ ( ARCH=`scripts/sys-arch` ; cd targets; ln -s $$ARCH freebsd)
-
-
+-
+-
++ @ ( ARCH=`scripts/sys-arch`; cd targets; ln -s $$ARCH freebsd)
+ dist:
+ @ echo; echo -n "Full Distribution - Enter archive file name : " ;\
diff --git a/databases/msql/files/patch-ab b/databases/msql/files/patch-ab
index 11a6ecd56e3d..d2604d398599 100644
--- a/databases/msql/files/patch-ab
+++ b/databases/msql/files/patch-ab
@@ -1,54 +1,43 @@
---- src/setup.orig Wed Jun 19 09:30:27 1996
-+++ src/setup Thu Oct 3 20:11:48 1996
-@@ -28,47 +28,10 @@
- echo " or symbolic paths such as ~user/msql will not work"
- echo
- echo
--$ECHO_N " Top of install tree ? [/usr/local/Minerva] $ECHO_C"
--read INST_TOP
--if test "$INST_TOP." = "."
--then
-- INST_TOP=/usr/local/Minerva
--fi
--
--$ECHO_N " Will this installation be running as root ? [y] $ECHO_C"
--read ANS
--if test "$ANS." = "."
--then
-- ANS="y"
--fi
--if echo $ANS | grep -i "y" > /dev/null
--then
-- ROOT_EXEC="-DROOT_EXEC"
-- ROOT="root"
--else
-- ROOT_EXEC=""
-- $ECHO_N " What username will it run under ? $ECHO_C"
-- read ROOT
--fi
--
--
--PID_DIRS="/var/adm /var/log /usr/adm /private/adm"
--PID_DIR=""
--for dir in $PID_DIRS
--do
-- if test -d $dir
-- then
-- PID_DIR=${dir}
-- break
-- fi
--done
--$ECHO_N " Directory for pid file ? [${PID_DIR}] $ECHO_C"
--read RESPONSE
--if test "$RESPONSE." != "."
--then
-- PID_DIR=$RESPONSE
--fi
--
-+INST_TOP=$PREFIX/Minerva
-+ROOT_EXEC="-DROOT_EXEC"
-+ROOT="root"
-+PID_DIR=/var/run
+--- scripts/run_daemon.orig Mon Dec 16 03:44:22 1996
++++ scripts/run_daemon Sun Dec 22 15:54:18 1996
+@@ -9,23 +9,25 @@
+ #
+ # bambi@Bond.edu.au
- echo
- echo
+-INST_DIR=/usr/local/Minerva
+-ADMIN="you@some.machine"
++umask 077
++
++INST_DIR=%%PREFIX%%
++ADMIN="root@%%HOSTNAME%%"
+ PROG=$1
+
+-if test ! -d "${INST_DIR}/debug"
++if test ! -d "/tmp/debug"
+ then
+- mkdir ${INST_DIR}/debug
++ mkdir /tmp/debug
+ fi
+
+-if test ! -d "${INST_DIR}/debug/${PROG}"
++if test ! -d "/tmp/debug/${PROG}"
+ then
+- mkdir ${INST_DIR}/debug/${PROG}
++ mkdir /tmp/debug/${PROG}
+ fi
+
+ while :
+ do
+- cd ${INST_DIR}/debug/${PROG}
++ cd /tmp/debug/${PROG}
+ ${INST_DIR}/bin/${PROG} > output 2>&1
+ echo "Program : ${PROG}
+ Time : `date`
+@@ -34,6 +36,6 @@
+
+ " > mail.tmp
+ cat output >> mail.tmp
+- /usr/ucb/mail -s "Minerva Daemon Crash Report" ${ADMIN} < mail.tmp
++ /usr/bin/mail -s "Minerva Daemon Crash Report" ${ADMIN} < mail.tmp
+ sleep 15
+ done
diff --git a/databases/msql/files/patch-ac b/databases/msql/files/patch-ac
index cd4abbf21a02..7d5548ca2424 100644
--- a/databases/msql/files/patch-ac
+++ b/databases/msql/files/patch-ac
@@ -1,21 +1,20 @@
---- scripts/run_daemon.orig Mon Dec 18 20:27:42 1995
-+++ scripts/run_daemon Thu Oct 3 20:08:24 1996
-@@ -9,8 +9,8 @@
- #
- # bambi@Bond.edu.au
+--- src/conf/site.mm.in.orig Mon Jan 13 10:15:08 1997
++++ src/conf/site.mm.in Sun Jan 19 13:56:52 1997
+@@ -4,7 +4,7 @@
+
+
+ CC= @CC@
+-INST_DIR= /usr/local/Hughes
++INST_DIR= /usr/local
--INST_DIR=/usr/local/Minerva
--ADMIN="you@some.machine"
-+INST_DIR=@@PREFIX@@
-+ADMIN="root@@@HOSTNAME@@"
- PROG=$1
- if test ! -d "${INST_DIR}/debug"
-@@ -34,6 +34,6 @@
+ #
+@@ -30,7 +30,7 @@
+ EXTRA_LIB= @LIBS@
+
+ # Any other CFlags required
+-EXTRA_CFLAGS= @DEFS@ $(SSIZE_T) $(U_INT) $(BITTYPES)
++EXTRA_CFLAGS= @DEFS@ $(SSIZE_T) $(U_INT) $(BITTYPES) -fpic
- " > mail.tmp
- cat output >> mail.tmp
-- /usr/ucb/mail -s "Minerva Daemon Crash Report" ${ADMIN} < mail.tmp
-+ /usr/bin/mail -s "Minerva Daemon Crash Report" ${ADMIN} < mail.tmp
- sleep 15
- done
+ # Directory for pid file
+ PID_DIR= @PID_DIR@
diff --git a/databases/msql/files/patch-ad b/databases/msql/files/patch-ad
index 0345385388e1..114d39893dc3 100644
--- a/databases/msql/files/patch-ad
+++ b/databases/msql/files/patch-ad
@@ -1,11 +1,29 @@
---- src/conf/site.mm.in.orig Wed Oct 16 22:22:29 1996
-+++ src/conf/site.mm.in Wed Oct 16 22:22:36 1996
-@@ -28,7 +28,7 @@
+--- scripts/make-install.orig Mon Jan 13 10:14:48 1997
++++ scripts/make-install Sun Jan 19 14:43:51 1997
+@@ -1,16 +1,16 @@
+ #!/bin/sh
- # CC Only flags
- # These flags are not passed to makedepend. Example use is -pic
--CC_ONLY=
-+CC_ONLY= -fpic
+-INST_DIR=$1
++INST_DIR=$PREFIX
+
+-scripts/mkinstalldirs 0755 $INST_DIR/bin
+-scripts/mkinstalldirs 0755 $INST_DIR/include
+ scripts/mkinstalldirs 0755 $INST_DIR/include/common
+-scripts/mkinstalldirs 0755 $INST_DIR/lib
+-scripts/mkinstalldirs 0755 $INST_DIR/msqldb
+-scripts/mkinstalldirs 0755 $INST_DIR/msqldb/.tmp
+-scripts/mkinstalldirs 0755 $INST_DIR/doc
+-scripts/mkinstalldirs 0755 $INST_DIR/www
+-scripts/mkinstalldirs 0755 $INST_DIR/misc
+-scripts/mkinstalldirs 0755 $INST_DIR/makegen
++scripts/mkinstalldirs 0755 $INST_DIR/etc/msql2
++scripts/mkinstalldirs 0700 /var/db/msqldb
++scripts/mkinstalldirs 0700 /var/db/msqldb/.tmp
++scripts/mkinstalldirs 0755 $INST_DIR/share/doc/msql
++scripts/mkinstalldirs 0755 $INST_DIR/share/doc/msql/manual
++scripts/mkinstalldirs 0755 $INST_DIR/share/msql/misc
++scripts/mkinstalldirs 0755 $INST_DIR/share/msql/www
++scripts/mkinstalldirs 0755 $INST_DIR/share/msql/makegen
++/usr/sbin/chown -R msql.msql /var/db/msqldb
+ scripts/mkinstalldirs 0755 $INST_DIR/modules
- # Directory for pid file
- PID_DIR= @PID_DIR@
diff --git a/databases/msql/files/patch-ae b/databases/msql/files/patch-ae
index 205f11d984a1..61bde32c7978 100644
--- a/databases/msql/files/patch-ae
+++ b/databases/msql/files/patch-ae
@@ -1,12 +1,31 @@
---- src/msql/msqldb.c.ORG Wed Oct 23 19:19:06 1996
-+++ src/msql/msqldb.c Wed Oct 23 19:20:51 1996
-@@ -1398,6 +1398,9 @@
- safeFree(entry->rowBuf);
- safeFree(entry->keyBuf);
- entry->def = NULL;
-+ *(entry->DB) = 0;
-+ *(entry->table) = 0;
-+ entry->age = 0;
- }
+--- src/Makefile.tmpl.orig Mon Jan 13 10:14:52 1997
++++ src/Makefile.tmpl Sun Jan 19 14:04:28 1997
+@@ -32,18 +32,18 @@
+ echo
- /*
+ install ::
+- @cp -r ../../doc/* $(INST_DIR)/doc; \\
+- cp -r ../../demos/w3-msql/* $(INST_DIR)/www; \\
+- cp -r ../../misc/setup_* $(INST_DIR)/misc; \\
+- cp ../../README* $(INST_DIR);\\
+- cp makegen/* $(INST_DIR)/makegen;\\
+- cp site.mm $(INST_DIR)/makegen;\\
+- if test -f $(INST_DIR)/msql.conf;\
++ @cp -r ../../doc/* $(INST_DIR)/share/doc/msql; \\
++ cp -r ../../demos/w3-msql/* $(INST_DIR)/share/msql/www; \\
++ cp -r ../../misc/setup_* $(INST_DIR)/share/msql/misc; \\
++ cp ../../README* $(INST_DIR)/share/doc/msql;\\
++ cp makegen/* $(INST_DIR)/share/msql/makegen;\\
++ cp site.mm $(INST_DIR)/share/msql/makegen;\\
++ if test -f $(INST_DIR)/etc/msql2/msql.conf;\
+ then\
+- rm -f $(INST_DIR)/msql.conf.old;\
+- mv $(INST_DIR)/msql.conf $(INST_DIR)/msql.conf.old;\
++ rm -f $(INST_DIR)/etc/msql2/msql.conf.old;\
++ mv $(INST_DIR)/etc/msql2/msql.conf $(INST_DIR)/etc/msql2/msql.conf.old;\
+ fi;\
+- cp ../../misc/msql.conf $(INST_DIR);\\
++ cp ../../misc/msql.conf $(INST_DIR)/etc/msql2;\\
+ echo ;\\
+ echo "Installation of mSQL-2 complete." ;\\
+ echo ;\\
diff --git a/databases/msql/files/patch-af b/databases/msql/files/patch-af
new file mode 100644
index 000000000000..0d247f5ce08e
--- /dev/null
+++ b/databases/msql/files/patch-af
@@ -0,0 +1,11 @@
+--- src/msql/Makefile.tmpl.orig Mon Jan 13 10:15:48 1997
++++ src/msql/Makefile.tmpl Sun Jan 19 14:47:28 1997
+@@ -78,7 +78,7 @@
+ !install msqldump $(INST_DIR)/bin/msqldump 0755 $(ROOT)
+ !libinstall libmsql.a $(INST_DIR)/lib/libmsql.a 744 $(ROOT)
+ !install msql.h $(INST_DIR)/include/msql.h 744 $(ROOT)
+-!install sample.acl $(INST_DIR)/msql.acl.sample 700 $(ROOT)
++!install sample.acl $(INST_DIR)/etc/msql2/msql.acl.sample 700 $(ROOT)
+
+ lextest :: msql_lex.c
+ $(CC) $(CC_FLAGS) -DDEBUG msql_lex.c -o lextest
diff --git a/databases/msql/files/patch-ag b/databases/msql/files/patch-ag
new file mode 100644
index 000000000000..a578c37649a2
--- /dev/null
+++ b/databases/msql/files/patch-ag
@@ -0,0 +1,11 @@
+--- src/msql/config.c.orig Sun Dec 22 17:34:53 1996
++++ src/msql/config.c Sun Dec 22 17:35:46 1996
+@@ -279,7 +279,7 @@
+ fp = fopen(file,"r");
+ else
+ {
+- sprintf(buf,"%s/msql.conf", INST_DIR);
++ sprintf(buf,"%s/etc/msql2/msql.conf", INST_DIR);
+ fp = fopen(buf,"r");
+ }
+ if (!fp)
diff --git a/databases/msql/files/patch-ah b/databases/msql/files/patch-ah
new file mode 100644
index 000000000000..252fb5fdec3a
--- /dev/null
+++ b/databases/msql/files/patch-ah
@@ -0,0 +1,11 @@
+--- src/msql/msqladmin.c.orig Mon Jan 13 10:16:02 1997
++++ src/msql/msqladmin.c Sun Jan 19 14:05:53 1997
+@@ -257,7 +257,7 @@
+ printf("\tTarget platform \t%s\n\n",TARGET);
+
+ printf("Configuration Details :-\n\n");
+- printf("\tDefault config file\t%s/msql.conf\n",INST_DIR);
++ printf("\tDefault config file\t%s/etc/msql2/msql.conf\n",INST_DIR);
+ printf("\tTCP socket \t%d\n",
+ msqlGetIntConf("tcp_port"));
+ printf("\tUNIX socket \t%s\n",
diff --git a/databases/msql/files/patch-ai b/databases/msql/files/patch-ai
new file mode 100644
index 000000000000..ea8cb20cd06a
--- /dev/null
+++ b/databases/msql/files/patch-ai
@@ -0,0 +1,11 @@
+--- src/msql/msqld.c.orig Mon Jan 13 10:16:03 1997
++++ src/msql/msqld.c Sun Jan 19 14:12:08 1997
+@@ -506,7 +506,7 @@
+
+ if (*confFile == 0)
+ {
+- sprintf(confFile,"%s/msql.conf", INST_DIR);
++ sprintf(confFile,"%s/etc/msql2/msql.conf", INST_DIR);
+ }
+ printf("Loading configuration from '%s'.\n",confFile);
+ msqlLoadConfigFile(confFile);
diff --git a/databases/msql/files/patch-aj b/databases/msql/files/patch-aj
new file mode 100644
index 000000000000..3091cd08bf29
--- /dev/null
+++ b/databases/msql/files/patch-aj
@@ -0,0 +1,16 @@
+--- misc/msql.conf.orig Mon Jan 13 10:14:37 1997
++++ misc/msql.conf Sun Jan 19 14:16:56 1997
+@@ -17,10 +17,9 @@
+
+ [general]
+
+-Inst_Dir = /usr/local/Hughes
++Inst_Dir = /usr/local
+ mSQL_User = msql
+ Admin_User = root
+-Pid_File = %I/msql2d.pid
++Pid_File = %I/etc/msql2/msql2.pid
+ TCP_Port = 1114
+-UNIX_Port = %I/msql2.sock
+-
++UNIX_Port = %I/etc/msql2/msql2.sock
diff --git a/databases/msql/files/patch-ak b/databases/msql/files/patch-ak
new file mode 100644
index 000000000000..44c21d197497
--- /dev/null
+++ b/databases/msql/files/patch-ak
@@ -0,0 +1,262 @@
+diff -ru src/msql/index.c /src/msql/index.c
+--- src/msql/index.c Sun Jan 19 14:13:26 1997
++++ /src/msql/index.c Sun Jan 19 14:14:06 1997
+@@ -105,7 +105,7 @@
+ fd;
+
+ msqlTrace(TRACE_IN,"loadIndices()");
+- (void)sprintf(path,"%s/msqldb/%s/%s.idx",msqlHomeDir,db,table);
++ (void)sprintf(path,"/var/db/msqldb/%s/%s.idx",db,table);
+ #ifdef OS2
+ fd = _sopen(path ,O_RDONLY | O_BINARY, SH_DENYNO, S_IREAD | S_IWRITE);
+ #else
+@@ -163,7 +163,7 @@
+ curIndex->next = NULL;
+ }
+ }
+- sprintf(path,"%s/msqldb/%s/%s.idx-%s",msqlHomeDir,db,table,
++ sprintf(path,"/var/db/msqldb/%s/%s.idx-%s",db,table,
+ curIndex->name);
+ curIndex->tree = avlOpen(path);
+ curIndex->buf = (char *)malloc(curIndex->length + 1);
+diff -ru src/msql/msqld.c /src/msql/msqld.c
+--- src/msql/msqld.c Sun Jan 19 14:13:26 1997
++++ /src/msql/msqld.c Sun Jan 19 14:14:06 1997
+@@ -572,7 +572,7 @@
+ /*
+ ** Ensure that the correct user owns the database files
+ */
+- sprintf(path,"%s/msqldb",msqlGetCharConf("inst_dir"));
++ sprintf(path,"/var/db/msqldb");
+ if (stat(path,&sbuf) < 0)
+ {
+ printf("\nError! Can't stat '%s'\n\n",path);
+diff -ru src/msql/msqldb.c /src/msql/msqldb.c
+--- src/msql/msqldb.c Sun Jan 19 14:13:26 1997
++++ /src/msql/msqldb.c Sun Jan 19 14:14:06 1997
+@@ -126,7 +126,7 @@
+ #endif
+
+ msqlTrace(TRACE_IN,"msqlListDBs()");
+- (void)sprintf(path,"%s/msqldb",msqlHomeDir);
++ (void)sprintf(path,"/var/db/msqldb");
+ dirp = opendir(path);
+ if (!dirp)
+ {
+@@ -187,7 +187,7 @@
+ #endif
+
+ msqlTrace(TRACE_IN,"msqlListTables()");
+- (void)sprintf(path,"%s/msqldb/%s",msqlHomeDir,db);
++ (void)sprintf(path,"/var/db/msqldb/%s",db);
+ dirp = opendir(path);
+ if (!dirp)
+ {
+@@ -1130,7 +1130,7 @@
+ struct stat buf;
+
+ msqlTrace(TRACE_IN,"msqlInit()");
+- (void)sprintf(path,"%s/msqldb/%s",msqlHomeDir,db);
++ (void)sprintf(path,"/var/db/msqldb/%s",db);
+ if (stat(path,&buf) < 0)
+ {
+ sprintf(errMsg,BAD_DB_ERROR,db);
+@@ -1165,7 +1165,7 @@
+ /*
+ ** Write the catalog entry
+ */
+- (void)sprintf(defPath,"%s/msqldb/%s/%s.def",msqlHomeDir,db,table);
++ (void)sprintf(defPath,"/var/db/msqldb/%s/%s.def",db,table);
+ #ifdef OS2
+ fd = _sopen(defPath,O_RDONLY,SH_DENYNO, S_IREAD | S_IWRITE);
+ #else
+@@ -1239,7 +1239,7 @@
+ ** Create an empty table
+ */
+
+- (void)sprintf(datPath,"%s/msqldb/%s/%s.dat",msqlHomeDir,db,table);
++ (void)sprintf(datPath,"/var/db/msqldb/%s/%s.dat",db,table);
+ (void)unlink(datPath);
+ #ifdef OS2
+ fd = _sopen(datPath,O_CREAT | O_WRONLY | O_BINARY, SH_DENYNO,
+@@ -1279,7 +1279,7 @@
+ ** Create an empty index def file
+ */
+
+- (void)sprintf(idxPath,"%s/msqldb/%s/%s.idx",msqlHomeDir,db,table);
++ (void)sprintf(idxPath,"/var/db/msqldb/%s/%s.idx",db,table);
+ (void)unlink(idxPath);
+ #ifdef OS2
+ fd = _sopen(idxPath,O_CREAT | O_WRONLY | O_BINARY, SH_DENYNO,
+@@ -1302,7 +1302,7 @@
+ /*
+ ** Create an empty overflow file
+ */
+- (void)sprintf(oflPath,"%s/msqldb/%s/%s.ofl",msqlHomeDir,db,table);
++ (void)sprintf(oflPath,"/var/db/msqldb/%s/%s.ofl",db,table);
+ (void)unlink(oflPath);
+ #ifdef OS2
+ fd = _sopen(oflPath,O_CREAT | O_WRONLY | O_BINARY, SH_DENYNO,
+@@ -1454,10 +1454,10 @@
+ /*
+ ** Can't clash with another index either
+ */
+- (void)sprintf(defPath,"%s/msqldb/%s/%s.idx",msqlHomeDir,db,
++ (void)sprintf(defPath,"/var/db/msqldb/%s/%s.idx",db,
+ index->table);
+
+- (void)sprintf(idxPath,"%s/msqldb/%s/%s.idx-%s",msqlHomeDir,db,
++ (void)sprintf(idxPath,"/var/db/msqldb/%s/%s.idx-%s",db,
+ index->table, index->name);
+
+ #ifdef OS2
+@@ -1718,7 +1718,7 @@
+ /*
+ ** Now blow away the table files
+ */
+- (void)sprintf(path,"%s/msqldb/%s/%s.def",msqlHomeDir,db,table);
++ (void)sprintf(path,"/var/db/msqldb/%s/%s.def",db,table);
+ #ifdef OS2
+ fp = fopen(path,"rb");
+ #else
+@@ -1733,15 +1733,15 @@
+ }
+ (void)fclose(fp);
+ unlink(path);
+- (void)sprintf(path,"%s/msqldb/%s/%s.dat",msqlHomeDir,db,table);
++ (void)sprintf(path,"/var/db/msqldb/%s/%s.dat",db,table);
+ unlink(path);
+- (void)sprintf(path,"%s/msqldb/%s/%s.ofl",msqlHomeDir,db,table);
++ (void)sprintf(path,"/var/db/msqldb/%s/%s.ofl",db,table);
+ unlink(path);
+
+ /*
+ ** Take care of the index files.
+ */
+- (void)sprintf(defPath,"%s/msqldb/%s/%s.idx",msqlHomeDir,db,table);
++ (void)sprintf(defPath,"/var/db/msqldb/%s/%s.idx",db,table);
+ #ifdef OS2
+ fd = _sopen(defPath,O_RDONLY | O_BINARY, SH_DENYNO, S_IREAD | S_IWRITE);
+ #else
+@@ -1751,8 +1751,8 @@
+ {
+ while(read(fd,&tmp,sizeof(tmp)) == sizeof(tmp))
+ {
+- (void)sprintf(path,"%s/msqldb/%s/%s.idx-%s",
+- msqlHomeDir,db,table,tmp.name);
++ (void)sprintf(path,"/var/db/msqldb/%s/%s.idx-%s",
++ db,table,tmp.name);
+ unlink(path);
+ }
+ close(fd);
+@@ -1791,7 +1791,7 @@
+ return(-1);
+ }
+
+- (void)sprintf(defPath,"%s/msqldb/%s/%s.idx",msqlHomeDir,db,
++ (void)sprintf(defPath,"/var/db/msqldb/%s/%s.idx",db,
+ index->table);
+ #ifdef OS2
+ in = _sopen(defPath,O_RDONLY | O_BINARY, SH_DENYNO, S_IREAD | S_IWRITE);
+@@ -1804,7 +1804,7 @@
+ msqlTrace(TRACE_OUT,"msqlDropIndex()");
+ return(-1);
+ }
+- (void)sprintf(tmpPath,"%s/msqldb/%s/%s.idx-tmp",msqlHomeDir,db,
++ (void)sprintf(tmpPath,"/var/db/msqldb/%s/%s.idx-tmp",db,
+ index->table);
+ #ifdef OS2
+ out = _sopen(tmpPath,O_RDWR | O_CREAT | O_BINARY, SH_DENYNO,
+@@ -1855,7 +1855,7 @@
+ */
+ unlink(defPath);
+ rename(tmpPath,defPath);
+- sprintf(tmpPath,"%s/msqldb/%s/%s.idx-%s",msqlHomeDir,db,
++ sprintf(tmpPath,"/var/db/msqldb/%s/%s.idx-%s",db,
+ index->table, index->name);
+ unlink(tmpPath);
+
+@@ -2412,7 +2412,7 @@
+ ** See if the directory exists
+ */
+
+- (void)sprintf(path,"%s/msqldb/%s", msqlHomeDir, db);
++ (void)sprintf(path,"/var/db/msqldb/%s", db);
+ dirp = opendir(path);
+ if (dirp)
+ {
+@@ -2459,7 +2459,7 @@
+ ** See if the directory exists
+ */
+
+- (void)sprintf(path,"%s/msqldb/%s", msqlHomeDir, db);
++ (void)sprintf(path,"/var/db/msqldb/%s", db);
+ dirp = opendir(path);
+ if (!dirp)
+ {
+diff -ru src/msql/table.c /src/msql/table.c
+--- src/msql/table.c Sun Jan 19 14:13:27 1997
++++ /src/msql/table.c Sun Jan 19 14:14:06 1997
+@@ -100,7 +100,7 @@
+ {
+ char path[MAXPATHLEN];
+
+- (void)sprintf(path,"%s/msqldb/%s/%s.dat",msqlHomeDir,db,table);
++ (void)sprintf(path,"/var/db/msqldb/%s/%s.dat",db,table);
+ #ifdef OS2
+ return(_sopen(path,O_RDWR | O_BINARY, SH_DENYNO, S_IREAD | S_IWRITE));
+ #else
+@@ -115,7 +115,7 @@
+ {
+ char path[MAXPATHLEN];
+
+- (void)sprintf(path,"%s/msqldb/%s/%s.ofl",msqlHomeDir,db,table);
++ (void)sprintf(path,"/var/db/msqldb/%s/%s.ofl",db,table);
+ #ifdef OS2
+ return(_sopen(path,O_RDWR | O_BINARY, SH_DENYNO, S_IREAD | S_IWRITE));
+ #else
+@@ -300,7 +300,7 @@
+ static char buf[MAX_FIELDS * sizeof(field_t)];
+
+ msqlTrace(TRACE_IN,"readTableDef()");
+- (void)sprintf(path,"%s/msqldb/%s/%s.def",msqlHomeDir,db,table);
++ (void)sprintf(path,"/var/db/msqldb/%s/%s.def",db,table);
+ #ifdef OS2
+ fd = _sopen(path, O_RDONLY | O_BINARY, SH_DENYNO, S_IREAD | S_IWRITE);
+ #else
+@@ -367,7 +367,7 @@
+ DIR *dirp;
+ char path[MAXPATHLEN];
+
+- (void)sprintf(path,"%s/msqldb/.tmp",msqlHomeDir);
++ (void)sprintf(path,"/var/db/msqldb/.tmp");
+ dirp = opendir(path);
+ if (!dirp)
+ {
+@@ -387,7 +387,7 @@
+ cur = readdir(dirp);
+ continue;
+ }
+- (void)sprintf(path,"%s/msqldb/.tmp/%s",msqlHomeDir,
++ (void)sprintf(path,"/var/db/msqldb/.tmp/%s",
+ cur->d_name);
+ unlink(path);
+ cur = readdir(dirp);
+@@ -434,7 +434,7 @@
+ {
+ tmpfile = cp+1;
+ }
+- (void)sprintf(path,"%s/msqldb/.tmp/%s.dat",msqlHomeDir,tmpfile);
++ (void)sprintf(path,"/var/db/msqldb/.tmp/%s.dat",tmpfile);
+
+
+ /*
+@@ -642,7 +642,7 @@
+ char path[MAXPATHLEN];
+
+ msqlTrace(TRACE_IN,"freeTmpTable()");
+- (void)sprintf(path,"%s/msqldb/.tmp/%s.dat",msqlHomeDir,entry->table);
++ (void)sprintf(path,"/var/db/msqldb/.tmp/%s.dat",entry->table);
+ freeTableDef(entry->def);
+ entry->def = NULL;
+ *(entry->db) = 0;
diff --git a/databases/msql/files/patch-al b/databases/msql/files/patch-al
new file mode 100644
index 000000000000..8f747eb3e3fc
--- /dev/null
+++ b/databases/msql/files/patch-al
@@ -0,0 +1,11 @@
+--- src/msql/acl.c.orig Sun Jan 19 14:19:11 1997
++++ src/msql/acl.c Sun Jan 19 14:19:44 1997
+@@ -111,7 +111,7 @@
+ /*
+ ** Open the acl file
+ */
+- (void)sprintf(path,"%s/msql.acl", (char *)msqlGetCharConf("inst_dir"));
++ (void)sprintf(path,"%s/etc/msql2/msql.acl", (char *)msqlGetCharConf("inst_dir"));
+ fp = fopen(path,"r");
+ if (!fp)
+ {
diff --git a/databases/msql/files/post-install-notes b/databases/msql/files/post-install-notes
new file mode 100644
index 000000000000..26e58bb76507
--- /dev/null
+++ b/databases/msql/files/post-install-notes
@@ -0,0 +1,51 @@
+ README for Mini SQL Version 2.0 Beta 1
+-------------------------------------------------------------------------------
+
+Welcome to Mini SQL 2! It's been a long time coming but we hope the
+wait has been worth it. As the development of mSQL 2 continues, further
+funtionality will be made available. This release concentrates on
+adding the underlying performance and data handling features to mSQL.
+
+The software has changed quite a lot since the 1.x version of mSQL.
+Some of the new features are greatly improved support for indexing your
+data, much better performance for complex queries and large data sets,
+the addition of variable length TEXT fields, support for server managed
+numeric sequences, better regular expression handling, and easier
+control over the configuration of the server.
+
+
+FreeBSD-specific port notes
+---------------------------
+
+The port of mSQL 1.x lived in it's own tree, /usr/local/Minerva. At the
+time, mSQL was a part of a larger project called Minerva, to which other
+tools would be added. These other tools would also live in
+/usr/local/Minerva.
+
+As of the 2.x release of mSQL, the author of mSQL has put many of these
+tools into the base mSQL distribution, and so it is no longer feasible to
+have the program live in it's own directory.
+
+So, in keeping with the BSD directory tree structure, you will find the
+following changes between the "official" mSQL 2.x distribution and the
+FreeBSD port :
+
+
+Documentation states: Port uses:
+===================== ==========================
+/usr/local/Hughes /usr/local
+/usr/local/Hughes/msqldb /var/db/msqldb
+/usr/local/Hughes/msql2.sock /usr/local/etc/msql2/msql2.sock
+/usr/local/Hughes/msql2.pid /usr/local/etc/msql2/msql2.pid
+/usr/local/Hughes/msql.conf /usr/local/etc/msql2/msql.conf
+/usr/local/Hughes/msql.acl /usr/local/etc/msql2/msql.acl
+
+To start the daemon, run /usr/local/etc/rc.d/msql2.sh as root. This will
+start the daemon as the 'msql' user to make sure that the access permissions
+are correct. This script will be executed upon system startup.
+
+Remember that mSQL is not free for use. Please see
+/usr/local/share/doc/msql/License for details.
+
+--
+j.
diff --git a/databases/msql/pkg-comment b/databases/msql/pkg-comment
index 0d969c9a3a59..08abf036c4bb 100644
--- a/databases/msql/pkg-comment
+++ b/databases/msql/pkg-comment
@@ -1 +1 @@
-Mini SQL Database.
+the Mini SQL server, version 2
diff --git a/databases/msql/pkg-descr b/databases/msql/pkg-descr
index e76fa31c6320..67ed1220e6c0 100644
--- a/databases/msql/pkg-descr
+++ b/databases/msql/pkg-descr
@@ -1,5 +1,44 @@
-mSQL (Mini-SQL) is a database manager. Refer to the documents in
-/usr/local/Minerva/docs for details.
+ README for Mini SQL Version 2.0 Beta 1
+-------------------------------------------------------------------------------
-Note that this version is freeware only for non-commercial entities.
-Read the file "License" in the documentation directory for details.
+Welcome to Mini SQL 2! It's been a long time coming but we hope the
+wait has been worth it. As the development of mSQL 2 continues, further
+funtionality will be made available. This release concentrates on
+adding the underlying performance and data handling features to mSQL.
+
+The software has changed quite a lot since the 1.x version of mSQL.
+Some of the new features are greatly improved support for indexing your
+data, much better performance for complex queries and large data sets,
+the addition of variable length TEXT fields, support for server managed
+numeric sequences, better regular expression handling, and easier
+control over the configuration of the server.
+
+
+FreeBSD-specific port notes
+---------------------------
+
+The ports of mSQL 1.x lived in it's own tree, /usr/local/Minerva. At the
+time, mSQL was a part of a larger project called Minerva, to which other
+tools would be added. These other tools would also live in
+/usr/local/Minerva.
+
+As of the 2.x release of mSQL, the author of mSQL has put many of these
+tools into the base mSQL distribution, and so it is no longer feasible to
+have the program live in it's own directory.
+
+So, in keeping with the BSD directory tree structure, you will find the
+following changes between the "official" mSQL 2.x distribution and the
+FreeBSD port :
+
+
+Documentation states: Port uses:
+===================== ==========================
+/usr/local/Hughes /usr/local
+/usr/local/Hughes/msqldb /var/db/msqldb
+/usr/local/Hughes/msql2.sock /usr/local/etc/msql2/msql2.sock
+/usr/local/Hughes/msql2.pid /usr/local/etc/msql2/msql2.pid
+/usr/local/Hughes/msql.conf /usr/local/etc/msql2/msql.conf
+/usr/local/Hughes/msql.acl /usr/local/etc/msql2/msql.acl
+
+--
+j.
diff --git a/databases/msql/pkg-plist b/databases/msql/pkg-plist
index b5a6a1d1055f..767a922c4c5d 100644
--- a/databases/msql/pkg-plist
+++ b/databases/msql/pkg-plist
@@ -1,29 +1,122 @@
-etc/rc.d/msql.sh
-Minerva/run_daemon
-Minerva/bin/msql
-Minerva/bin/msqld
-Minerva/bin/msqladmin
-Minerva/bin/relshow
-Minerva/bin/msqldump
-Minerva/include/msql.h
-Minerva/lib/libmsql.a
-Minerva/doc/HISTORY
-Minerva/doc/Commercial
-Minerva/doc/License
-Minerva/doc/License.mSQL
-Minerva/doc/acl.txt
-Minerva/doc/mSQL-1.0.11.ps
-Minerva/doc/mSQL-Invoice.txt
-Minerva/doc/mSQL-Invoice.ps
-Minerva/doc/msql-pwr.README
-Minerva/doc/msql-pwr.gif
-Minerva/doc/msql-pwr2.gif
-Minerva/msql.acl.sample
-@exec mkdir -p %D/msqldb/.tmp
-@dirrm Minerva/bin
-@dirrm Minerva/lib
-@dirrm Minerva/include
-@dirrm Minerva/doc
-@dirrm Minerva/msqldb/.tmp
-@dirrm Minerva/msqldb
-@dirrm Minerva
+bin/lite
+bin/msql
+bin/msql2d
+bin/msqladmin
+bin/msqldump
+bin/msqlexport
+bin/msqlimport
+bin/relshow
+bin/w3-auth
+bin/w3-msql
+etc/msql2/msql.acl.sample
+etc/msql2/msql.conf
+etc/msql2/msql.acl.sample.old
+etc/msql2/msql.conf.old
+etc/rc.d/msql2.sh
+include/common/config.h
+include/common/portability.h
+include/common/config.h.old
+include/common/portability.h.old
+include/lite.h
+include/mod_msql.h
+include/mod_std.h
+include/msql.h
+include/regexp.h
+lib/liblite.a
+lib/libmsql.a
+lib/libregexp.a
+lib/libtime.a
+lib/lite_lex.o
+lib/mod_lite.o
+lib/mod_msql.o
+lib/mod_std.o
+share/doc/msql/License
+share/doc/msql/README
+share/doc/msql/HISTORY
+share/doc/msql/post-install-notes
+share/doc/msql/manual/add.gif
+share/doc/msql/manual/api.htm
+share/doc/msql/manual/api.spec
+share/doc/msql/manual/area.gif
+share/doc/msql/manual/blank.gif
+share/doc/msql/manual/config.htm
+share/doc/msql/manual/create_manual
+share/doc/msql/manual/deer.gif
+share/doc/msql/manual/delete.gif
+share/doc/msql/manual/edit.gif
+share/doc/msql/manual/fast_bul.gif
+share/doc/msql/manual/group.gif
+share/doc/msql/manual/hughes.gif
+share/doc/msql/manual/info.htm
+share/doc/msql/manual/lite.htm
+share/doc/msql/manual/logout.gif
+share/doc/msql/manual/mod_msql.htm
+share/doc/msql/manual/mod_std.htm
+share/doc/msql/manual/modules.htm
+share/doc/msql/manual/new.gif
+share/doc/msql/manual/priv.gif
+share/doc/msql/manual/spec.htm
+share/doc/msql/manual/sysvar.htm
+share/doc/msql/manual/user.gif
+share/doc/msql/manual/utils.htm
+share/doc/msql/manual/view.gif
+share/doc/msql/manual/w3-auth.gif
+share/doc/msql/manual/w3-auth.htm
+share/doc/msql/manual/w3-msql.htm
+share/doc/msql/manual/w3-sec.htm
+share/doc/msql/manual/welcome.htm
+share/msql/makegen/directory.mm
+share/msql/makegen/install.mm
+share/msql/makegen/lex.mm
+share/msql/makegen/libinstall.mm
+share/msql/makegen/library.mm
+share/msql/makegen/makegen
+share/msql/makegen/makegen.cf
+share/msql/makegen/makegen.cf.in
+share/msql/makegen/object.mm
+share/msql/makegen/program.mm
+share/msql/makegen/site.mm
+share/msql/makegen/touch.mm
+share/msql/makegen/yacc.mm
+share/msql/misc/setup_www
+share/msql/www/bookmarks/README
+share/msql/www/bookmarks/Welcome.html
+share/msql/www/bookmarks/add.html
+share/msql/www/bookmarks/back.gif
+share/msql/www/bookmarks/book.gif
+share/msql/www/bookmarks/bookmarks.html
+share/msql/www/bookmarks/create.gif
+share/msql/www/bookmarks/create.html
+share/msql/www/bookmarks/delete.gif
+share/msql/www/bookmarks/delete.html
+share/msql/www/bookmarks/dump.msql
+share/msql/www/bookmarks/home.gif
+share/msql/www/bookmarks/folder.gif
+share/msql/www/bookmarks/mark-big.gif
+share/msql/www/bookmarks/remove.html
+share/msql/www/bookmarks/search.gif
+share/msql/www/bookmarks/search.html
+share/msql/www/bookmarks/search_result.html
+share/msql/www/bookmarks/wood.gif
+share/msql/www/graphics/add.gif
+share/msql/www/graphics/area.gif
+share/msql/www/graphics/banner.gif
+share/msql/www/graphics/blank.gif
+share/msql/www/graphics/delete.gif
+share/msql/www/graphics/edit.gif
+share/msql/www/graphics/group.gif
+share/msql/www/graphics/hughes.gif
+share/msql/www/graphics/logout.gif
+share/msql/www/graphics/priv.gif
+share/msql/www/graphics/user.gif
+share/msql/www/graphics/view.gif
+@dirrm etc/msql2
+@dirrm include/common
+@dirrm share/doc/msql/manual
+@dirrm share/doc/msql
+@dirrm share/msql/makegen
+@dirrm share/msql/misc
+@dirrm share/msql/www/bookmarks
+@dirrm share/msql/www/graphics
+@dirrm share/msql/www
+@dirrm share/msql
diff --git a/databases/msql/scripts/createuser b/databases/msql/scripts/createuser
new file mode 100644
index 000000000000..70fdcf8b9cc3
--- /dev/null
+++ b/databases/msql/scripts/createuser
@@ -0,0 +1,50 @@
+#!/usr/bin/perl
+#
+
+eval '(exit $?0)' && eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
+& eval 'exec /usr/bin/perl -S $0 $argv:q'
+if 0;
+
+if( $> ) {
+ print "\nYou must be root to run this step!\n\n";
+ exit 1;
+}
+
+if( getpwnam( "msql" ) ) {
+ ( $null, $null, $msqlUID ) = getpwnam( "msql" );
+} else {
+ $msqlUID = 80;
+ while( getpwuid( $msqlUID ) ) {
+ $msqlUID++;
+ }
+}
+
+if( getgrnam( "msql" ) ) {
+ ( $null, $null, $msqlGID ) = getgrnam( "msql" );
+} else {
+ $msqlGID = 80;
+ while( getgrgid( $msqlGID ) ) {
+ $msqlGID++;
+ }
+ &append_file( "/etc/group", "msql:*:$msqlGID:" );
+}
+
+print "msql user using uid $msqlUID\n";
+print "msql user using gid $msqlGID\n";
+
+system( "/usr/bin/chpass -a \"msql:*:$msqlUID:$msqlGID::0:0:mSQL-2 pseudo-user:/var/db/msqldb:/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 );
+}
diff --git a/databases/msql/scripts/customize_scripts b/databases/msql/scripts/customize_scripts
new file mode 100644
index 000000000000..7b981a2b958f
--- /dev/null
+++ b/databases/msql/scripts/customize_scripts
@@ -0,0 +1,7 @@
+#!/usr/bin/perl
+#
+
+chop( $HOSTNAME=`hostname` );
+
+system( "/usr/bin/perl -pi -e 's|%%PREFIX%%|$ENV{'PREFIX'}|' $ENV{'WRKSRC'}/scripts/run_daemon $ENV{'WRKSRC'}/misc/msql.conf" );
+system( "/usr/bin/perl -pi -e 's|%%HOSTNAME%%|$HOSTNAME|' $ENV{'WRKSRC'}/scripts/run_daemon" );