aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--databases/msql/Makefile11
-rw-r--r--databases/msql/distinfo2
-rw-r--r--databases/msql/scripts/check_old_version32
-rw-r--r--databases/msql3/Makefile11
-rw-r--r--databases/msql3/distinfo2
-rw-r--r--databases/msql3/scripts/check_old_version32
6 files changed, 82 insertions, 8 deletions
diff --git a/databases/msql/Makefile b/databases/msql/Makefile
index e2e456ea045e..c8ba243fcb18 100644
--- a/databases/msql/Makefile
+++ b/databases/msql/Makefile
@@ -1,13 +1,13 @@
# New ports collection makefile for: msql2
-# Version required: 2.0b4
+# Version required: 2.0b6
# Date created: December 17th 1996
# Whom: jfitz
#
# $Id$
#
-DISTNAME= msql-2.0-B4
-PKGNAME= msql-2.0b4
+DISTNAME= msql-2.0-B6
+PKGNAME= msql-2.0b6
CATEGORIES= databases
MASTER_SITES= ftp://ftp.worldone.com/pub/msql/ \
http://www2.nerosworld.com/msql/ \
@@ -21,12 +21,17 @@ RESTRICTED= "restrictive copyright (no commercial use)"
MAKE_ENV+= WRKSRC=${WRKSRC}
+# Uncomment this if you're upgrading from <= b4 to >= b5 and have already
+# dumped your databases (or just build with -DOVERWRITE_DB)
+#OVERWRITE_DB= YES
+
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}/check_old_version
@${SETENV} ${MAKE_ENV} /usr/bin/perl ${SCRIPTDIR}/createuser
post-install:
diff --git a/databases/msql/distinfo b/databases/msql/distinfo
index 9d9dff34dd3b..aa5c6366f58d 100644
--- a/databases/msql/distinfo
+++ b/databases/msql/distinfo
@@ -1 +1 @@
-MD5 (msql-2.0-B4.tar.gz) = 67f6fd6d1114a06f5ab3e978a5b5b9d0
+MD5 (msql-2.0-B6.tar.gz) = 2a502c5dd341f74b9ed5caad61136418
diff --git a/databases/msql/scripts/check_old_version b/databases/msql/scripts/check_old_version
new file mode 100644
index 000000000000..ea046b99543f
--- /dev/null
+++ b/databases/msql/scripts/check_old_version
@@ -0,0 +1,32 @@
+#!/usr/bin/perl
+#
+# $Id$
+#
+
+if( -d "/var/db/msqldb" ) {
+ chdir( "/var/db/pkg" );
+ opendir( DIR, "." );
+ @oldmsql = grep( /^msql-2.0b[1234]$/, readdir( DIR ) );
+ closedir;
+ if( @oldmsql ) {
+ if( ! $ENV{OVERWRITE_DB} ) {
+ print <<END;
+
+mSQL v2.0 beta 5 and above make changes to the AVL index format of your
+databases. In order to preserve your existing data, you must:
+ - use msqldump to dump all your databases
+ - install beta 5 or above
+ - use msqladmin to drop and then create each of your databases
+ - use msql to reload your data
+
+If you understand the consequences of this upgrade, please re-build this
+port with the environment variable OVERWRITE_DB defined.
+
+END
+ exit 1;
+ }
+ }
+}
+
+#
+# EOF
diff --git a/databases/msql3/Makefile b/databases/msql3/Makefile
index e2e456ea045e..c8ba243fcb18 100644
--- a/databases/msql3/Makefile
+++ b/databases/msql3/Makefile
@@ -1,13 +1,13 @@
# New ports collection makefile for: msql2
-# Version required: 2.0b4
+# Version required: 2.0b6
# Date created: December 17th 1996
# Whom: jfitz
#
# $Id$
#
-DISTNAME= msql-2.0-B4
-PKGNAME= msql-2.0b4
+DISTNAME= msql-2.0-B6
+PKGNAME= msql-2.0b6
CATEGORIES= databases
MASTER_SITES= ftp://ftp.worldone.com/pub/msql/ \
http://www2.nerosworld.com/msql/ \
@@ -21,12 +21,17 @@ RESTRICTED= "restrictive copyright (no commercial use)"
MAKE_ENV+= WRKSRC=${WRKSRC}
+# Uncomment this if you're upgrading from <= b4 to >= b5 and have already
+# dumped your databases (or just build with -DOVERWRITE_DB)
+#OVERWRITE_DB= YES
+
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}/check_old_version
@${SETENV} ${MAKE_ENV} /usr/bin/perl ${SCRIPTDIR}/createuser
post-install:
diff --git a/databases/msql3/distinfo b/databases/msql3/distinfo
index 9d9dff34dd3b..aa5c6366f58d 100644
--- a/databases/msql3/distinfo
+++ b/databases/msql3/distinfo
@@ -1 +1 @@
-MD5 (msql-2.0-B4.tar.gz) = 67f6fd6d1114a06f5ab3e978a5b5b9d0
+MD5 (msql-2.0-B6.tar.gz) = 2a502c5dd341f74b9ed5caad61136418
diff --git a/databases/msql3/scripts/check_old_version b/databases/msql3/scripts/check_old_version
new file mode 100644
index 000000000000..ea046b99543f
--- /dev/null
+++ b/databases/msql3/scripts/check_old_version
@@ -0,0 +1,32 @@
+#!/usr/bin/perl
+#
+# $Id$
+#
+
+if( -d "/var/db/msqldb" ) {
+ chdir( "/var/db/pkg" );
+ opendir( DIR, "." );
+ @oldmsql = grep( /^msql-2.0b[1234]$/, readdir( DIR ) );
+ closedir;
+ if( @oldmsql ) {
+ if( ! $ENV{OVERWRITE_DB} ) {
+ print <<END;
+
+mSQL v2.0 beta 5 and above make changes to the AVL index format of your
+databases. In order to preserve your existing data, you must:
+ - use msqldump to dump all your databases
+ - install beta 5 or above
+ - use msqladmin to drop and then create each of your databases
+ - use msql to reload your data
+
+If you understand the consequences of this upgrade, please re-build this
+port with the environment variable OVERWRITE_DB defined.
+
+END
+ exit 1;
+ }
+ }
+}
+
+#
+# EOF