summaryrefslogtreecommitdiff
path: root/databases/mysql323-server
diff options
context:
space:
mode:
authorAlex Dupre <ale@FreeBSD.org>2004-09-24 16:18:12 +0000
committerAlex Dupre <ale@FreeBSD.org>2004-09-24 16:18:12 +0000
commitb34e1466b942962b1f6d5f8d9a64edcd37dfbf00 (patch)
tree0ed6aa0184483077ee1fb7d592c98bceef290e9e /databases/mysql323-server
parentOne of the man-pages (faxinfo.8c) was listed twice in a row... (diff)
- Fix mysqlhotdump vulnerability
- Fix plist (don't install .la files) - Add optional knob WITH_PROC_SCOPE_PTH Approved by: portmgr (marcus)
Notes
Notes: svn path=/head/; revision=118374
Diffstat (limited to 'databases/mysql323-server')
-rw-r--r--databases/mysql323-server/Makefile10
-rw-r--r--databases/mysql323-server/files/patch-configure64
-rw-r--r--databases/mysql323-server/files/patch-scripts::mysqlhotcopy.sh49
3 files changed, 66 insertions, 57 deletions
diff --git a/databases/mysql323-server/Makefile b/databases/mysql323-server/Makefile
index 70066f76c17e..c74765fb397b 100644
--- a/databases/mysql323-server/Makefile
+++ b/databases/mysql323-server/Makefile
@@ -28,8 +28,7 @@ COMMENT?= Multithreaded SQL database (server)
SLAVEDIRS= databases/mysql323-client
PKGINSTALL?= ${WRKDIR}/pkg-install
DB_DIR?= /var/db/mysql
-USE_GNOME= lthack
-USE_LIBTOOL_VER= 13
+USE_LIBTOOL_VER=15
USE_REINPLACE= yes
CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
@@ -59,7 +58,7 @@ CONFIGURE_ARGS+=--with-mysqld-ldflags=-all-static
.include <bsd.port.pre.mk>
-.if ${MACHINE_ARCH} == "i386"
+.if ${ARCH} == "i386"
CONFIGURE_ARGS+=--enable-assembler --with-berkeley-db
.endif
.if defined(WITH_LINUXTHREADS)
@@ -121,6 +120,8 @@ pre-fetch:
@${ECHO} " WITH_OPENSSL=yes Enable secure connections."
@${ECHO} " DB_DIR=directory Set alternate directory for database files"
@${ECHO} " (default is /var/db/mysql)."
+ @${ECHO} " WITH_PROC_SCOPE_PTH=yes Use process scope threads"
+ @${ECHO} " (try it if you use libpthread)."
@${ECHO} " WITH_LINUXTHREADS=yes Use the linuxthreads pthread library."
@${ECHO} " OVERWRITE_DB=yes Re-initialize default databases."
@${ECHO} " BUILD_OPTIMIZED=yes Enable compiler optimizations"
@@ -134,6 +135,9 @@ post-patch:
@${REINPLACE_CMD} -e "s|bin_SCRIPTS =|bin_SCRIPTS = @server_scripts@|g" ${WRKSRC}/scripts/Makefile.in
@${REINPLACE_CMD} -e "s|man_MANS =|man_MANS = ${MAN1}|g" ${WRKSRC}/man/Makefile.in
@${REINPLACE_CMD} -e "s|install: install-am|install:|g" ${WRKSRC}/include/Makefile.in
+.if defined(WITH_PROC_SCOPE_PTH)
+ @${REINPLACE_CMD} -e "s|PTHREAD_SCOPE_SYSTEM|PTHREAD_SCOPE_PROCESS|g" ${WRKSRC}/libmysqld/lib_sql.cc ${WRKSRC}/sql/mysqld.cc
+.endif
post-build:
@${SED} "s|%%DB_DIR%%|${DB_DIR}|g" ${PKGDIR}/pkg-install > ${WRKDIR}/pkg-install
diff --git a/databases/mysql323-server/files/patch-configure b/databases/mysql323-server/files/patch-configure
index f62b2b50eef7..aa467e7115ee 100644
--- a/databases/mysql323-server/files/patch-configure
+++ b/databases/mysql323-server/files/patch-configure
@@ -1,59 +1,15 @@
---- configure.orig Thu Sep 11 13:49:33 2003
-+++ configure Sat Jan 17 00:49:23 2004
-@@ -8999,7 +8999,7 @@
- ;;
- esac
- fi
--HOSTNAME=$ac_cv_path_HOSTNAME
-+HOSTNAME="$ac_cv_path_HOSTNAME -s"
+--- configure.orig Fri Sep 24 16:53:37 2004
++++ configure Fri Sep 24 16:53:53 2004
+@@ -8071,8 +8071,6 @@
+ # This can be used to rebuild libtool when needed
+ LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"; $ac_aux_dir/ltconfig $LIBTOOL_DEPS;
- if test -n "$HOSTNAME"; then
- echo "$as_me:$LINENO: result: $HOSTNAME" >&5
-@@ -9188,43 +9188,7 @@
- echo "${ECHO_T}no" >&6
- fi
+-# Always use our own libtool.
+-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
--echo "$as_me:$LINENO: checking \"how to check if pid exists\"" >&5
--echo $ECHO_N "checking \"how to check if pid exists\"... $ECHO_C" >&6
--PS=$ac_cv_path_PS
--# Linux style
--if $PS p $$ 2> /dev/null | grep $0 > /dev/null
--then
-- FIND_PROC="$PS p \$\$PID | grep mysqld > /dev/null"
--# Solaris
--elif $PS -p $$ 2> /dev/null | grep $0 > /dev/null
--then
-- FIND_PROC="$PS -p \$\$PID | grep mysqld > /dev/null"
--# BSD style
--elif $PS -uaxww 2> /dev/null | grep $0 > /dev/null
--then
- FIND_PROC="$PS -uaxww | grep mysqld | grep \" \$\$PID \" > /dev/null"
--# SysV style
--elif $PS -ef 2> /dev/null | grep $0 > /dev/null
--then
-- FIND_PROC="$PS -ef | grep mysqld | grep \" \$\$PID \" > /dev/null"
--# Do anybody use this?
--elif $PS $$ 2> /dev/null | grep $0 > /dev/null
--then
-- FIND_PROC="$PS \$\$PID | grep mysqld > /dev/null"
--else
-- case $SYSTEM_TYPE in
-- *darwin*)
-- FIND_PROC="$PS -uaxww | grep mysqld | grep \" \$\$PID \" > /dev/null"
-- ;;
-- *cygwin*)
-- FIND_PROC="$PS -e | grep mysqld | grep \" \$\$PID \" > /dev/null"
-- ;;
-- *)
-- { { echo "$as_me:$LINENO: error: Could not find the right ps switches. Which OS is this ?. See the Installation chapter in the Reference Manual." >&5
--echo "$as_me: error: Could not find the right ps switches. Which OS is this ?. See the Installation chapter in the Reference Manual." >&2;}
-- { (exit 1); exit 1; }; }
-- esac
--fi
+ # Prevent multiple expansion
- echo "$as_me:$LINENO: result: \"$FIND_PROC\"" >&5
- echo "${ECHO_T}\"$FIND_PROC\"" >&6
-@@ -12509,8 +12473,16 @@
+@@ -12509,8 +12507,16 @@
;;
*freebsd*)
echo "Adding fix for interrupted reads"
@@ -72,7 +28,7 @@
;;
*netbsd*)
echo "Adding flag -Dunix"
-@@ -13710,30 +13682,6 @@
+@@ -13710,30 +13716,6 @@
#define HAVE_RESTARTABLE_SYSCALLS 1
_ACEOF
diff --git a/databases/mysql323-server/files/patch-scripts::mysqlhotcopy.sh b/databases/mysql323-server/files/patch-scripts::mysqlhotcopy.sh
new file mode 100644
index 000000000000..19d4395fa09f
--- /dev/null
+++ b/databases/mysql323-server/files/patch-scripts::mysqlhotcopy.sh
@@ -0,0 +1,49 @@
+--- scripts/mysqlhotcopy.sh.orig Sun Dec 21 19:01:29 2003
++++ scripts/mysqlhotcopy.sh Thu Sep 23 11:02:45 2004
+@@ -7,6 +7,7 @@
+ use File::Path;
+ use DBI;
+ use Sys::Hostname;
++use File::Temp;
+
+ =head1 NAME
+
+@@ -607,7 +608,6 @@
+ sub copy_index
+ {
+ my ($method, $files, $source, $target) = @_;
+- my $tmpfile="$opt_tmpdir/mysqlhotcopy$$";
+
+ print "Copying indices for ".@$files." files...\n" unless $opt{quiet};
+ foreach my $file (@$files)
+@@ -633,23 +633,23 @@
+ }
+ close OUTPUT || die "Error on close of $to: $!\n";
+ }
+- elsif ($opt{method} eq 'scp')
++ elsif ($opt{method} =~ /^scp\b/)
+ {
+- my $tmp=$tmpfile;
+- open(OUTPUT,">$tmp") || die "Can\'t create file $tmp: $!\n";
+- if (syswrite(OUTPUT,$buff) != length($buff))
++ my ($fh, $tmp)=tempfile('mysqlhotcopy-XXXXXX', DIR => $opt_tmpdir);
++ die "Can\'t create/open file in $opt_tmpdir\n";
++ if (syswrite($fh,$buff) != length($buff))
+ {
+ die "Error when writing data to $tmp: $!\n";
+ }
+- close OUTPUT || die "Error on close of $tmp: $!\n";
+- safe_system("scp $tmp $to");
++ close $fh || die "Error on close of $tmp: $!\n";
++ safe_system("$opt{method} $tmp $to");
++ unlink $tmp;
+ }
+ else
+ {
+ die "Can't use unsupported method '$opt{method}'\n";
+ }
+ }
+- unlink "$tmpfile" if ($opt{method} eq 'scp');
+ }
+
+