summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-db/mysql')
-rw-r--r--dev-db/mysql/ChangeLog6
-rw-r--r--dev-db/mysql/Manifest95
-rw-r--r--dev-db/mysql/files/digest-mysql-4.0.18-r11
-rw-r--r--dev-db/mysql/files/mysql-4.0.18-mysqlbugsecurity.diff15
-rw-r--r--dev-db/mysql/mysql-4.0.18-r1.ebuild266
5 files changed, 336 insertions, 47 deletions
diff --git a/dev-db/mysql/ChangeLog b/dev-db/mysql/ChangeLog
index 3cd2dccbc013..c6e7d8f87929 100644
--- a/dev-db/mysql/ChangeLog
+++ b/dev-db/mysql/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-db/mysql
# Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/ChangeLog,v 1.94 2004/04/02 15:31:33 randy Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/ChangeLog,v 1.95 2004/04/13 16:15:50 robbat2 Exp $
+
+ 13 Apr 2004; Robin H. Johnson <robbat2@gentoo.org> mysql-4.0.18-r1.ebuild,
+ files/mysql-4.0.18-mysqlbugsecurity.diff:
+ add in -r1 for bug #46242, needs more testing first for the automake change
02 Apr 2004; <randy@gentoo.org> mysql-4.0.18.ebuild:
adding s390 keywords
diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index ce722efd4ebc..c9c5848f9fbe 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,61 +1,64 @@
-MD5 ca263cdfe1888780cd2ea2b12cdb1fcf ChangeLog 15125
+MD5 8a62b8cc812a333732bbaa36958d22ba mysql-3.23.57-r1.ebuild 6610
+MD5 20589224843fda9db753936afb5dd90e mysql-3.23.56.ebuild 6550
+MD5 12145c2a6f06a0ffa39f27d9ea70987e mysql-4.0.14-r2.ebuild 7579
+MD5 3ccae3c0d46f5d9b4eb2f02f74077850 mysql-4.0.17.ebuild 7975
+MD5 ea0bc1b42a597084cd069263096a0250 mysql-4.0.12.ebuild 6770
+MD5 44e8da816a7d534ceaf927c9c8adcd83 mysql-4.0.15-r1.ebuild 7703
+MD5 a1551b114ca8102c0f474a5ae3221a97 mysql-4.0.14.ebuild 6928
+MD5 0183d8fbfebd84aeb58c02d5cb031398 mysql-3.23.52-r1.ebuild 5875
+MD5 1025b71023b2b8b471d30c0b99036b77 mysql-4.0.18-r1.ebuild 8103
+MD5 105f57237e3955c8586abb6a85449cf5 mysql-4.0.14-r1.ebuild 7426
+MD5 7745aa8cc1c4315fae3dcfda8666d991 mysql-4.0.16.ebuild 7527
+MD5 55142838e5b6fb68f824f5d63d21b778 mysql-4.0.13-r4.ebuild 7302
+MD5 add9c33a51c497251ffe7118b34dcedb mysql-3.23.57.ebuild 6553
+MD5 cf0eac0ad20de2137703bf2743992fb9 mysql-4.0.18.ebuild 7955
+MD5 27041c11ed0b298d0781d9898989fd5e ChangeLog 15124
+MD5 e6187f7a00dde20ed5810b5cfd7c58e0 mysql-4.0.15.ebuild 7585
MD5 a5dda17df0286cd82cae42d117784903 metadata.xml 163
-MD5 c8b57d37000785a37441b27fefd03c35 mysql-3.23.52-r1.ebuild 5876
-MD5 96dc01f2dcf5a185e20eb506f667f672 mysql-3.23.56.ebuild 6551
-MD5 6a9d09dba7c2f762df1c8ebea2746ef9 mysql-3.23.57-r1.ebuild 6611
-MD5 d4a47cc8cc0eaff83ce7009a7f01c802 mysql-3.23.57.ebuild 6554
-MD5 62e072297ed9ed5ba7476e637c58ce5e mysql-4.0.12.ebuild 6771
-MD5 ee2927c4f06baad97e864f15d27c8d6f mysql-4.0.13-r4.ebuild 7303
-MD5 462a3fb9a9b4e68e9325d0c297cefaf7 mysql-4.0.14-r1.ebuild 7427
-MD5 37a32ed621f46d123ace64ce406e9b5d mysql-4.0.14-r2.ebuild 7580
-MD5 9d6dd8be0b427c6b1aa9837f48317e8d mysql-4.0.14.ebuild 6929
-MD5 bceb9095986ccbb43ed062edeaa17e38 mysql-4.0.15-r1.ebuild 7704
-MD5 03a12ed95cc30f9ec11848510c036237 mysql-4.0.15.ebuild 7586
-MD5 2c115b20f3b17de258d922df05e3a86e mysql-4.0.16.ebuild 7528
-MD5 8c7cf77eb35886c3d9777698f6b00a13 mysql-4.0.17.ebuild 7976
-MD5 cf809c08d66970a745be490ef022fe96 mysql-4.0.18.ebuild 7956
+MD5 4541e130a1b0fa90db8612973b0adb75 files/mysql-4.0-mysqld-safe-sh.diff 1477
+MD5 36aa23522b241aafdb833ac4f11c4fd1 files/mysql-4.0.4-install-db-sh.diff 1439
+MD5 085dcaeb7d0d1f0e610e401fce6ed593 files/mysql-4.0.rc6 939
+MD5 1d33254617bd61fd5de350a286cf4fdc files/mysql-4.0.15.rc6 952
MD5 015a823e06d7181373b0601e4a17c284 files/digest-mysql-3.23.52-r1 67
-MD5 296a01da527263926d20aca0446bc87d files/digest-mysql-3.23.56 67
-MD5 dcd899fe185459da4cb9e71c75c3bda3 files/digest-mysql-3.23.57 67
MD5 dcd899fe185459da4cb9e71c75c3bda3 files/digest-mysql-3.23.57-r1 67
+MD5 8eaeb1372c41d2fef1622dd707a7a9d0 files/mysql-3.23-nisam.h.diff 452
+MD5 d3830060b3f74d6c0916ed85a6bbf02d files/mysql-3.23-install-db-sh.diff 1368
+MD5 58c4d09c5c2712254b1881a6fcc7abff files/mysql-4.0.18-gentoo-nptl.diff 587
+MD5 7d92ba9c74a73bf3c852a5c078c16d29 files/rebuilder.sh 1557
MD5 a77a12a8e251ca0d82d3027b7b50c762 files/digest-mysql-4.0.12 1371
-MD5 0d15b78f60dc9d26e02923e591d39ea7 files/digest-mysql-4.0.13-r4 66
MD5 33666c6c9542fe3ef02379877f0c6bac files/digest-mysql-4.0.14 66
-MD5 33666c6c9542fe3ef02379877f0c6bac files/digest-mysql-4.0.14-r1 66
-MD5 33666c6c9542fe3ef02379877f0c6bac files/digest-mysql-4.0.14-r2 66
MD5 68e456716a2026e49c85766696180bfc files/digest-mysql-4.0.15 66
-MD5 68e456716a2026e49c85766696180bfc files/digest-mysql-4.0.15-r1 66
MD5 b3d105fcbd2750964387bfcc010c145e files/digest-mysql-4.0.16 66
MD5 02c1c39a55937905f61ff17dcdb2ec0a files/digest-mysql-4.0.17 66
MD5 748cfc1902ce23fac508e803ed6907ee files/digest-mysql-4.0.18 66
-MD5 47c66444b6a1e2243eadf931d52d34b2 files/my.cnf 1229
-MD5 75e99b8e628e380551260d64553a9a10 files/my.cnf-4.0.14-r1 2813
-MD5 57531ccd19e17ccca95e0e3bf833cd67 files/mysql-3.23-db-3.2.3.diff 1105
-MD5 d3830060b3f74d6c0916ed85a6bbf02d files/mysql-3.23-install-db-sh.diff 1368
-MD5 7a5badec9c28c2f4d434d6aed0a5103b files/mysql-3.23-my-print-defaults.diff 218
-MD5 8eaeb1372c41d2fef1622dd707a7a9d0 files/mysql-3.23-nisam.h.diff 452
-MD5 8d51cbf3afa8349839380aa0986704c0 files/mysql-3.23-safe-mysqld-sh.diff 1557
-MD5 f49e58771365cb075ece153403811872 files/mysql-3.23.51-tcpd.patch 601
-MD5 50629599f478b26b4ca82c7c553feae0 files/mysql-3.23.52-install-db-sh.diff 1366
MD5 ee578e3021841ef9dba4175403564136 files/mysql-4.0-db-3.2.1.diff 1047
-MD5 e68c5d7e3c48028c4cf7e55ea8396013 files/mysql-4.0-install-db-sh.diff 1271
-MD5 d1e79f7a155e45c69558f083fcb1139d files/mysql-4.0-my-print-defaults.diff 240
-MD5 4541e130a1b0fa90db8612973b0adb75 files/mysql-4.0-mysqld-safe-sh.diff 1477
+MD5 f2905bbcc3f148a2ad689792917bd78d files/mysql-4.0.16-install-db-sh.diff 1429
MD5 ff80a5d8d87212046e89f2f8ae779af4 files/mysql-4.0-nisam.h.diff 452
-MD5 152b9a8feef16df47b56c316c5c0601e files/mysql-4.0.13-thrssl.patch 813
+MD5 8874c2bd25093fe5b8f57ce014e4a3be files/mysql.init 892
+MD5 d20c23adca5b8731ebfab4d1b5771dab files/mysql-4.0.18-mysqld-safe-sh.diff 1307
+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 977be6c68f6231cbcf1febd3305ade5d files/mysql-4.0.14-r1-tcpd-vars-fix.diff 465
+MD5 6f8de46485ea7dcf886e1747fb117427 files/mysql-gentoo-nptl.diff 654
+MD5 e68c5d7e3c48028c4cf7e55ea8396013 files/mysql-4.0-install-db-sh.diff 1271
MD5 e501d0f33d9d0be73b37c310099011d2 files/mysql-4.0.14-security-28394.patch 654
-MD5 1dcc6094ef0f068e7289ddd351e27024 files/mysql-4.0.15.rc6 953
-MD5 f2905bbcc3f148a2ad689792917bd78d files/mysql-4.0.16-install-db-sh.diff 1429
-MD5 fc80f877fa97f0f3a52ee684ce7f54b2 files/mysql-4.0.16-mysqld-safe-sh.diff 1562
-MD5 9b5ad94f6e99e65bc3373c9dd15dff08 files/mysql-4.0.17-thrssl.patch 637
-MD5 58c4d09c5c2712254b1881a6fcc7abff files/mysql-4.0.18-gentoo-nptl.diff 587
MD5 68cbaa353f522c0a404a4d07693f917d files/mysql-4.0.18-install-db-sh.diff 1473
-MD5 d20c23adca5b8731ebfab4d1b5771dab files/mysql-4.0.18-mysqld-safe-sh.diff 1307
+MD5 cfe027a0b863abadb46f75e4cf840c28 files/my.cnf 1228
+MD5 50629599f478b26b4ca82c7c553feae0 files/mysql-3.23.52-install-db-sh.diff 1366
+MD5 d1e79f7a155e45c69558f083fcb1139d files/mysql-4.0-my-print-defaults.diff 240
+MD5 f49e58771365cb075ece153403811872 files/mysql-3.23.51-tcpd.patch 601
MD5 f599e8b3eb4636bb61721525dc15f5f5 files/mysql-4.0.18-thrssl.patch 723
-MD5 36aa23522b241aafdb833ac4f11c4fd1 files/mysql-4.0.4-install-db-sh.diff 1439
-MD5 a45105d9d4ec0baca32ac9cca0350f17 files/mysql-4.0.rc6 940
-MD5 6f8de46485ea7dcf886e1747fb117427 files/mysql-gentoo-nptl.diff 654
-MD5 b959fc15281a858c87b587033a432334 files/mysql.init 893
-MD5 7d92ba9c74a73bf3c852a5c078c16d29 files/rebuilder.sh 1557
+MD5 8d51cbf3afa8349839380aa0986704c0 files/mysql-3.23-safe-mysqld-sh.diff 1557
+MD5 7a5badec9c28c2f4d434d6aed0a5103b files/mysql-3.23-my-print-defaults.diff 218
+MD5 a76ec36b83c2f0dbfba65c993f75d135 files/mysql-4.0.18-mysqlbugsecurity.diff 672
+MD5 296a01da527263926d20aca0446bc87d files/digest-mysql-3.23.56 67
+MD5 dcd899fe185459da4cb9e71c75c3bda3 files/digest-mysql-3.23.57 67
+MD5 977be6c68f6231cbcf1febd3305ade5d files/mysql-4.0.14-r1-tcpd-vars-fix.diff 465
+MD5 57531ccd19e17ccca95e0e3bf833cd67 files/mysql-3.23-db-3.2.3.diff 1105
+MD5 4c36e60ff941b21103df0acf1e6985b7 files/my.cnf-4.0.14-r1 2812
+MD5 9b5ad94f6e99e65bc3373c9dd15dff08 files/mysql-4.0.17-thrssl.patch 637
+MD5 0d15b78f60dc9d26e02923e591d39ea7 files/digest-mysql-4.0.13-r4 66
+MD5 33666c6c9542fe3ef02379877f0c6bac files/digest-mysql-4.0.14-r1 66
+MD5 33666c6c9542fe3ef02379877f0c6bac files/digest-mysql-4.0.14-r2 66
+MD5 68e456716a2026e49c85766696180bfc files/digest-mysql-4.0.15-r1 66
+MD5 748cfc1902ce23fac508e803ed6907ee files/digest-mysql-4.0.18-r1 66
+MD5 152b9a8feef16df47b56c316c5c0601e files/mysql-4.0.13-thrssl.patch 813
diff --git a/dev-db/mysql/files/digest-mysql-4.0.18-r1 b/dev-db/mysql/files/digest-mysql-4.0.18-r1
new file mode 100644
index 000000000000..4cb0175f1633
--- /dev/null
+++ b/dev-db/mysql/files/digest-mysql-4.0.18-r1
@@ -0,0 +1 @@
+MD5 702151a3e21d9e5f32e8850032aefdad mysql-4.0.18.tar.gz 13422686
diff --git a/dev-db/mysql/files/mysql-4.0.18-mysqlbugsecurity.diff b/dev-db/mysql/files/mysql-4.0.18-mysqlbugsecurity.diff
new file mode 100644
index 000000000000..1b0bf5905608
--- /dev/null
+++ b/dev-db/mysql/files/mysql-4.0.18-mysqlbugsecurity.diff
@@ -0,0 +1,15 @@
+diff -ur mysql-4.0.18.orig/scripts/mysqlbug.sh mysql-4.0.18/scripts/mysqlbug.sh
+--- mysql-4.0.18.orig/scripts/mysqlbug.sh 2004-02-10 10:15:54.000000000 -0800
++++ mysql-4.0.18/scripts/mysqlbug.sh 2004-04-13 09:00:53.000000000 -0700
+@@ -254,9 +254,9 @@
+ if cmp -s $TEMP $TEMP.x
+ then
+ echo "File not changed, no bug report submitted."
+- cp $TEMP /tmp/failed-mysql-bugreport
++ mv -f $TEMP /tmp/failed-mysql-bugreport
+ echo "The raw bug report exists in /tmp/failed-mysql-bugreport"
+- echo "If you use this remember that the first lines of the report now is a lie.."
++ echo "If you use this remember that the first lines of the report are now a lie.."
+ exit 1
+ fi
+
diff --git a/dev-db/mysql/mysql-4.0.18-r1.ebuild b/dev-db/mysql/mysql-4.0.18-r1.ebuild
new file mode 100644
index 000000000000..25d72da2ddf4
--- /dev/null
+++ b/dev-db/mysql/mysql-4.0.18-r1.ebuild
@@ -0,0 +1,266 @@
+# Copyright 1999-2004 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.18-r1.ebuild,v 1.1 2004/04/13 16:15:50 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"
+RESTRICT="nomirror"
+
+KEYWORDS="~ia64 ~x86 ~sparc ~ppc ~amd64 ~hppa ~alpha ~mips ~s390"
+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
+
+ # MySQL on mips cannot link to berkdb due to issues.
+ if [ "`use mips`" ]; then
+ if [ "`use berkdb`" ]; then
+ echo -e ""
+ eerror "You cannot link MySQL into berkeley db on mips. Please remove the \"berkdb\""
+ eerror "flag from your USE settings and try again."
+ echo -e ""
+ fi
+ fi
+}
+
+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_OPTS="-p1 -d ${S}" \
+ epatch ${FILESDIR}/${PN}-4.0.18-install-db-sh.diff
+ #zap binary distribution stuff
+ EPATCH_OPTS="-p1 -d ${S}" \
+ epatch ${FILESDIR}/${PN}-4.0.18-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
+ #
+ EPATCH_OPTS="-p1 -d ${S}" \
+ epatch ${FILESDIR}/${PN}-4.0.18-gentoo-nptl.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
+ EPATCH_OPTS="-p1 -d ${S}" \
+ epatch ${FILESDIR}/${PN}-4.0.18-thrssl.patch
+
+ # Security fix for bug #46242, upstream fix pending for 4.0.19
+ EPATH_OPTS="-p1 -d ${S}" \
+ epatch ${FILESDIR}/${PN}-4.0.18-mysqlbugsecurity.diff
+
+ if use tcpd; then
+ EPATCH_OPTS="-p1 -d ${S}" \
+ epatch ${FILESDIR}/${PN}-4.0.14-r1-tcpd-vars-fix.diff
+ fi
+
+ cd ${S}
+ autoconf
+ #WANT_AUTOMAKE=1.7 automake
+}
+
+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
+}