summaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2003-10-26 23:56:14 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2003-10-26 23:56:14 +0000
commit96fb1654fffa48f881674c2119d23495b65814b2 (patch)
treec86fe90aa6dc54e651015f1931dca9c3cf87648f /dev-db
parentversion bump as per bug 31806, re-did patching code to use epatch and re-diff... (diff)
downloadhistorical-96fb1654fffa48f881674c2119d23495b65814b2.tar.gz
historical-96fb1654fffa48f881674c2119d23495b65814b2.tar.bz2
historical-96fb1654fffa48f881674c2119d23495b65814b2.zip
version bump as per bug 31806, re-did patching code to use epatch and re-diffed some patches for the new version
Diffstat (limited to 'dev-db')
-rw-r--r--dev-db/mysql/Manifest6
-rw-r--r--dev-db/mysql/files/digest-mysql-4.0.161
-rw-r--r--dev-db/mysql/files/mysql-4.0.16-install-db-sh.diff37
-rw-r--r--dev-db/mysql/files/mysql-4.0.16-mysqld-safe-sh.diff51
-rw-r--r--dev-db/mysql/mysql-4.0.16.ebuild243
5 files changed, 336 insertions, 2 deletions
diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 7b179b7236e1..44699895ce80 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -6,10 +6,10 @@ MD5 39e3c7ff2e2cdadd676978486e20178e mysql-4.0.15-r1.ebuild 7686
MD5 4f99ec86879e1aaa642eeb33007d4d76 mysql-4.0.14.ebuild 6909
MD5 b1716c908bb6b91f9d95929d8882d362 mysql-3.23.52-r1.ebuild 5872
MD5 cac184b213bfcbbea7e7f17cf787e538 mysql-4.0.14-r1.ebuild 7407
-MD5 39e3c7ff2e2cdadd676978486e20178e mysql-4.0.16.ebuild 7686
+MD5 db544a8e75f89bcba5ffbfd57f8fa841 mysql-4.0.16.ebuild 7507
MD5 6b519e83d68043614f6631e7b098d87c mysql-4.0.13-r4.ebuild 7282
MD5 a3702a4c1f2b7118dcd12c8157f07009 mysql-3.23.57.ebuild 6550
-MD5 7866014a1102981ef38b908f26e5a2b8 ChangeLog 12367
+MD5 94892cd5a0f0b513e0f2c2d839ce261d ChangeLog 12671
MD5 aa1da099f1b75fed40b7e185626f7ad8 mysql-4.0.15.ebuild 7568
MD5 4541e130a1b0fa90db8612973b0adb75 files/mysql-4.0-mysqld-safe-sh.diff 1477
MD5 36aa23522b241aafdb833ac4f11c4fd1 files/mysql-4.0.4-install-db-sh.diff 1439
@@ -25,8 +25,10 @@ MD5 33666c6c9542fe3ef02379877f0c6bac files/digest-mysql-4.0.14 66
MD5 68e456716a2026e49c85766696180bfc files/digest-mysql-4.0.15 66
MD5 b3d105fcbd2750964387bfcc010c145e files/digest-mysql-4.0.16 66
MD5 ee578e3021841ef9dba4175403564136 files/mysql-4.0-db-3.2.1.diff 1047
+MD5 f2905bbcc3f148a2ad689792917bd78d files/mysql-4.0.16-install-db-sh.diff 1429
MD5 ff80a5d8d87212046e89f2f8ae779af4 files/mysql-4.0-nisam.h.diff 452
MD5 afbf3b6821056a31ee09430933f8fb47 files/mysql.init 903
+MD5 fc80f877fa97f0f3a52ee684ce7f54b2 files/mysql-4.0.16-mysqld-safe-sh.diff 1562
MD5 f635289f8422fdf26ba3c3dbdf99c4e2 files/mysql-4.0.14-mysqld-safe-sh.diff 1503
MD5 e68c5d7e3c48028c4cf7e55ea8396013 files/mysql-4.0-install-db-sh.diff 1271
MD5 e501d0f33d9d0be73b37c310099011d2 files/mysql-4.0.14-security-28394.patch 654
diff --git a/dev-db/mysql/files/digest-mysql-4.0.16 b/dev-db/mysql/files/digest-mysql-4.0.16
new file mode 100644
index 000000000000..cdcd0ec8d086
--- /dev/null
+++ b/dev-db/mysql/files/digest-mysql-4.0.16
@@ -0,0 +1 @@
+MD5 ddc959b9cdc2f5e30dc6a4d3650d3db5 mysql-4.0.16.tar.gz 12830094
diff --git a/dev-db/mysql/files/mysql-4.0.16-install-db-sh.diff b/dev-db/mysql/files/mysql-4.0.16-install-db-sh.diff
new file mode 100644
index 000000000000..eef47d1412a5
--- /dev/null
+++ b/dev-db/mysql/files/mysql-4.0.16-install-db-sh.diff
@@ -0,0 +1,37 @@
+--- mysql-4.0.16/scripts/mysql_install_db.sh.orig 2003-10-16 22:29:20.000000000 -0700
++++ mysql-4.0.16/scripts/mysql_install_db.sh 2003-10-26 15:14:46.000000000 -0800
+@@ -333,16 +333,11 @@
+ END_OF_DATA
+ then
+ echo ""
+- if test "$IN_RPM" = "0"
+- then
+- echo "To start mysqld at boot time you have to copy support-files/mysql.server"
+- echo "to the right place for your system"
+- echo
+- fi
+ echo "PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !"
+ echo "This is done with:"
+- echo "$bindir/mysqladmin -u root password 'new-password'"
++ echo "/etc/init.d/mysql start (you have to start the server first!)"
+ echo "$bindir/mysqladmin -u root -h $hostname password 'new-password'"
++ echo "$bindir/mysqladmin -u root password 'new-password'"
+ echo "See the manual for more instructions."
+ #
+ # Print message about upgrading unless we have created a new db table.
+@@ -354,15 +349,6 @@
+ echo "able to use the new GRANT command!"
+ fi
+ echo
+- if test "$IN_RPM" = "0"
+- then
+- echo "You can start the MySQL daemon with:"
+- echo "cd @prefix@ ; $bindir/mysqld_safe &"
+- echo
+- echo "You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:"
+- echo "cd sql-bench ; perl run-all-tests"
+- echo
+- fi
+ echo "Please report any problems with the @scriptdir@/mysqlbug script!"
+ echo
+ echo "The latest information about MySQL is available on the web at"
diff --git a/dev-db/mysql/files/mysql-4.0.16-mysqld-safe-sh.diff b/dev-db/mysql/files/mysql-4.0.16-mysqld-safe-sh.diff
new file mode 100644
index 000000000000..6bc40f559f1a
--- /dev/null
+++ b/dev-db/mysql/files/mysql-4.0.16-mysqld-safe-sh.diff
@@ -0,0 +1,51 @@
+diff -ur mysql-4.0.16.orig/scripts/mysqld_safe.sh mysql-4.0.16/scripts/mysqld_safe.sh
+--- mysql-4.0.16.orig/scripts/mysqld_safe.sh 2003-10-16 22:29:17.000000000 -0700
++++ mysql-4.0.16/scripts/mysqld_safe.sh 2003-10-26 15:22:17.000000000 -0800
+@@ -88,43 +88,15 @@
+ done
+ }
+
+-
+-MY_PWD=`pwd`
+-# Check if we are starting this relative (for the binary release)
+-if test -d $MY_PWD/data/mysql -a -f ./share/mysql/english/errmsg.sys -a \
+- -x ./bin/mysqld
+-then
+- MY_BASEDIR_VERSION=$MY_PWD # Where bin, share and data are
+- ledir=$MY_BASEDIR_VERSION/bin # Where mysqld is
+- DATADIR=$MY_BASEDIR_VERSION/data
+- if test -z "$defaults"
+- then
+- defaults="--defaults-extra-file=$MY_BASEDIR_VERSION/data/my.cnf"
+- fi
+-# Check if this is a 'moved install directory'
+-elif test -f ./var/mysql/db.frm -a -f ./share/mysql/english/errmsg.sys -a \
+- -x ./libexec/mysqld
+-then
+- MY_BASEDIR_VERSION=$MY_PWD # Where libexec, share and var are
+- ledir=$MY_BASEDIR_VERSION/libexec # Where mysqld is
+- DATADIR=$MY_BASEDIR_VERSION/var
+-else
+- MY_BASEDIR_VERSION=@prefix@
+- DATADIR=@localstatedir@
+- ledir=@libexecdir@
+-fi
++MY_BASEDIR_VERSION=@prefix@
++DATADIR=@localstatedir@
++ledir=@libexecdir@
+
+ safe_mysql_unix_port=${mysql_unix_port:-${MYSQL_UNIX_PORT:-@MYSQL_UNIX_ADDR@}}
+ user=@MYSQLD_USER@
+ niceness=0
+
+-# Use the mysqld-max binary by default if the user doesn't specify a binary
+-if test -x $ledir/mysqld-max
+-then
+- MYSQLD=mysqld-max
+-else
+- MYSQLD=mysqld
+-fi
++MYSQLD=mysqld
+
+ # these rely on $DATADIR by default, so we'll set them later on
+ pid_file=
diff --git a/dev-db/mysql/mysql-4.0.16.ebuild b/dev-db/mysql/mysql-4.0.16.ebuild
new file mode 100644
index 000000000000..1ea503a025f8
--- /dev/null
+++ b/dev-db/mysql/mysql-4.0.16.ebuild
@@ -0,0 +1,243 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-4.0.16.ebuild,v 1.1 2003/10/26 23:56:11 robbat2 Exp $
+
+inherit eutils
+#to accomodate -laadeedah releases
+NEWP=${P}
+
+SVER=${PV%.*}
+#normal releases:
+SDIR=MySQL-${SVER}
+#for a pre-release:
+#SDIR=MySQL-${SVER}-Pre
+
+S=${WORKDIR}/${NEWP}
+
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+HOMEPAGE="http://www.mysql.com/"
+SRC_URI="mirror://mysql/Downloads/${SDIR}/${NEWP}.tar.gz"
+
+KEYWORDS="ia64 ~x86 ~sparc ~ppc ~arm ~amd64 ~hppa"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="static readline innodb berkdb tcpd ssl perl debug"
+
+DEPEND="readline? ( >=sys-libs/readline-4.1 )
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6-r6 )
+ ssl? ( >=dev-libs/openssl-0.9.6d )
+ perl? ( dev-lang/perl )
+ >=sys-libs/zlib-1.1.3
+ sys-apps/procps
+ >=sys-apps/sed-4"
+PDEPEND="perl? ( dev-perl/DBI dev-perl/DBD-mysql )"
+
+warning() {
+ ewarn
+ ewarn "If you're upgrading from MySQL-3.x, you must recompile the other"
+ ewarn "packages on your system that link with libmysqlclient after the"
+ ewarn "upgrade completes. To obtain such a list of packages for your"
+ ewarn "system, you may use 'revdep-rebuild' from app-portage/gentoolkit."
+ ewarn
+ sleep 5
+}
+
+pkg_setup() {
+ warning
+}
+
+src_unpack() {
+ if use static && use ssl; then
+ local msg="MySQL does not support building statically with SSL support"
+ eerror "${msg}"
+ die "${msg}"
+ fi
+ unpack ${A} || die
+
+ #zap startup script messages
+ epatch ${FILESDIR}/${PN}-4.0.16-install-db-sh.diff
+ #zap binary distribution stuff
+ epatch ${FILESDIR}/${PN}-4.0.16-mysqld-safe-sh.diff
+ #required for qmail-mysql
+ EPATCH_OPTS="-p0 -d ${S}" \
+ epatch ${FILESDIR}/${PN}-4.0-nisam.h.diff
+ #for correct hardcoded sysconf directory
+ EPATCH_OPTS="-p1 -d ${S}" \
+ epatch ${FILESDIR}/${PN}-4.0-my-print-defaults.diff
+
+ # attempt to get libmysqlclient_r linked against ssl if USE="ssl" enabled
+ # i would really prefer to fix this at the Makefile.am level, but can't
+ # get the software to autoreconf as distributed - too many missing files
+ # Robert Coie <rac@gentoo.org> 2003.06.12
+ EPATCH_OPTS="-p0 -d ${S}" \
+ epatch ${FILESDIR}/${PN}-4.0.13-thrssl.patch
+
+ if use tcpd; then
+ EPATCH_OPTS="-p1 -d ${S}" \
+ epatch ${FILESDIR}/${PN}-4.0.14-r1-tcpd-vars-fix.diff
+ fi
+}
+
+src_compile() {
+ local myconf
+
+ #The following fix is due to a bug with bdb on sparc's. See:
+ #http://www.geocrawler.com/mail/msg.php3?msg_id=4754814&list=8
+ if use sparc || use sparc64 || use alpha || use hppa
+ then
+ myconf="${myconf} --without-berkeley-db"
+ else
+ use berkdb \
+ && myconf="${myconf} --with-berkeley-db=./bdb" \
+ || myconf="${myconf} --without-berkeley-db"
+ fi
+
+ #readline pair reads backwards on purpose, DONT change it around, Ok?
+ # this is because it refers to the building of a bundled readline
+ # versus the system copy
+ use readline && myconf="${myconf} --without-readline"
+ use readline || myconf="${myconf} --with-readline"
+
+ use static \
+ && myconf="${myconf} --with-mysqld-ldflags=-all-static --disable-shared" \
+ || myconf="${myconf} --enable-shared --enable-static"
+
+ myconf="${myconf} `use_with tcpd libwrap`"
+ myconf="${myconf} `use_with innodb`"
+
+ use ssl \
+ && myconf="${myconf} --with-vio --with-openssl" \
+ || myconf="${myconf} --without-openssl"
+
+ myconf="${myconf} `use_with debug`"
+
+ #glibc-2.3.2_pre fix; bug #16496
+ export CFLAGS="${CFLAGS} -DHAVE_ERRNO_AS_DEFINE=1"
+
+ #bug fix for #15099, should make this api backward compatible
+ export CFLAGS="${CFLAGS} -DUSE_OLD_FUNCTIONS"
+
+ #the compiler flags are as per their "official" spec ;)
+ #CFLAGS="${CFLAGS/-O?/} -O3" \
+ CXXFLAGS="${CXXFLAGS} -felide-constructors -fno-exceptions -fno-rtti" \
+ econf \
+ --libexecdir=/usr/sbin \
+ --sysconfdir=/etc/mysql \
+ --localstatedir=/var/lib/mysql \
+ --with-raid \
+ --with-low-memory \
+ --enable-assembler \
+ --with-charset=latin1 \
+ --enable-local-infile \
+ --with-mysqld-user=mysql \
+ --with-extra-charsets=all \
+ --enable-thread-safe-client \
+ --with-client-ldflags=-lstdc++ \
+ --with-comment="Gentoo Linux ${PF}" \
+ --with-unix-socket-path=/var/run/mysqld/mysqld.sock \
+ --with-embedded-server \
+ ${myconf} || die "bad ./configure"
+
+ emake || die "compile problem"
+}
+
+src_install() {
+ make install DESTDIR=${D} benchdir_root=/usr/share/mysql || die
+
+ #move client libs, install a couple of missing headers
+ mv ${D}/usr/lib/mysql/libmysqlclient*.so* ${D}/usr/lib
+ dosym ../libmysqlclient.so /usr/lib/mysql/libmysqlclient.so
+ dosym ../libmysqlclient_r.so /usr/lib/mysql/libmysqlclient_r.so
+ insinto /usr/include/mysql ; doins include/{my_config.h,my_dir.h}
+
+ #convenience links
+ dosym /usr/bin/mysqlcheck /usr/bin/mysqlanalyze
+ dosym /usr/bin/mysqlcheck /usr/bin/mysqlrepair
+ dosym /usr/bin/mysqlcheck /usr/bin/mysqloptimize
+
+ #various junk
+ rm -f ${D}/usr/share/mysql/mysql.server
+ rm -f ${D}/usr/share/mysql/binary-configure
+ rm -f ${D}/usr/share/mysql/make_binary_distribution
+ rm -f ${D}/usr/share/mysql/mysql-log-rotate
+ rm -f ${D}/usr/share/mysql/{post,pre}install
+ rm -f ${D}/usr/share/mysql/mi_test*
+ rm -f ${D}/usr/share/mysql/*.spec # Redhat gunk
+ rm -f ${D}/usr/share/mysql/*.plist # Apple gunk
+ rm -f ${D}/usr/share/mysql/my-*.cnf # Put them elsewhere
+
+ # All of these (ab)use Perl.
+ if ! use perl; then
+ rm -f ${D}/usr/bin/mysql_setpermission
+ rm -rf ${D}/usr/share/mysql/sql-bench
+ fi
+
+ dohtml Docs/*.html
+ rm -f Docs/*.html
+ dodoc README COPYING COPYING.LIB Docs/manual.*
+ docinto conf-samples
+ dodoc support-files/my-*.cnf
+
+ insinto /etc/mysql
+ newins ${FILESDIR}/my.cnf-4.0.14-r1 my.cnf
+ doins scripts/mysqlaccess.conf
+ exeinto /etc/init.d
+ newexe ${FILESDIR}/mysql-4.0.15.rc6 mysql
+}
+
+pkg_config() {
+ if [ ! -d ${ROOT}/var/lib/mysql/mysql ] ; then
+ einfo "Press ENTER to create the mysql database and set proper"
+ einfo "permissions on it, or Control-C to abort now..."
+ read
+ ${ROOT}/usr/bin/mysql_install_db #>>/var/log/mysql/mysql.err 2>&1
+ # changing ownership of newly created databases to mysql.mysql
+ local DATADIR=""
+ if [ -f '/etc/mysql/my.cnf' ] ; then
+ #DATADIR=`grep ^datadir /etc/mysql/my.cnf | sed -e 's/.*= //'`
+ DATADIR=`/usr/sbin/mysqld --help |grep '^datadir' | awk '{print $2}'`
+ fi
+ if [ -z "${DATADIR}" ]; then
+ DATADIR="/var/lib/mysql/"
+ fi
+ chown -R mysql:mysql ${DATADIR}
+ else
+ einfo "Hmm, it appears as though you already have the mysql"
+ einfo "database in place. If you are having problems trying"
+ einfo "to start mysqld, perhaps you need to manually run"
+ einfo "/usr/bin/mysql_install_db and/or check your config"
+ einfo "file(s) and/or database(s) and/or logfile(s)."
+ fi
+}
+
+pkg_preinst() {
+ if ! groupmod mysql; then
+ groupadd -g 60 mysql || die "problem adding group mysql"
+ fi
+
+ if ! id mysql; then
+ useradd -g mysql -s /dev/null -d /var/lib/mysql -c "mysql" mysql
+ assert "problem adding user mysql"
+ fi
+}
+
+pkg_postinst() {
+ #empty dirs...
+ install -d -m0755 -o mysql -g mysql ${ROOT}/var/lib/mysql
+ install -d -m0755 -o mysql -g mysql ${ROOT}/var/run/mysqld
+ install -d -m0755 -o mysql -g mysql ${ROOT}/var/log/mysql
+
+ #secure the logfiles... does this bother anybody?
+ touch ${ROOT}/var/log/mysql/mysql.{log,err}
+ chown mysql:mysql ${ROOT}/var/log/mysql/mysql.{log,err}
+ chmod 0660 ${ROOT}/var/log/mysql/mysql.{log,err}
+
+ #your friendly public service announcement...
+ einfo
+ einfo "You might want to run:"
+ einfo "\"ebuild /var/db/pkg/dev-db/${PF}/${PF}.ebuild config\""
+ einfo "if this is a new install."
+ einfo
+
+ warning
+}