diff options
author | Francesco Riosa <vivo@gentoo.org> | 2005-08-18 16:39:28 +0000 |
---|---|---|
committer | Francesco Riosa <vivo@gentoo.org> | 2005-08-18 16:39:28 +0000 |
commit | a472a38611dbb4e9e8e25f1d1a95ba2ab721e595 (patch) | |
tree | f70be329215200fa0f9cecbff20abb85d9151155 /dev-db | |
parent | Add Python.framework bin dirs to PATH, fix typo in 10.4/package.provided (diff) | |
download | historical-a472a38611dbb4e9e8e25f1d1a95ba2ab721e595.tar.gz historical-a472a38611dbb4e9e8e25f1d1a95ba2ab721e595.tar.bz2 historical-a472a38611dbb4e9e8e25f1d1a95ba2ab721e595.zip |
Cleanup of dated unstable packages, backup at http://dev.gentoo.org/~vivo/misc/BACKUP-mysql-20050818.tar.gz
Package-Manager: portage-2.0.51.22-r2
Diffstat (limited to 'dev-db')
23 files changed, 10 insertions, 3314 deletions
diff --git a/dev-db/mysql/ChangeLog b/dev-db/mysql/ChangeLog index a18cc8f07af9..89e907470bdb 100644 --- a/dev-db/mysql/ChangeLog +++ b/dev-db/mysql/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for dev-db/mysql # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/ChangeLog,v 1.219 2005/08/18 09:23:48 vivo Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/ChangeLog,v 1.220 2005/08/18 16:39:28 vivo Exp $ + + 18 Aug 2005; Francesco Riosa <vivo@gentoo.org> + -files/mysql-4.0.25-r1-asm-pic-fixes.patch, -mysql-3.23.58.ebuild, + -mysql-4.0.22-r1.ebuild, -mysql-4.0.23.ebuild, -mysql-4.0.23-r1.ebuild, + -mysql-4.0.23-r2.ebuild, -mysql-4.0.24-r1.ebuild, -mysql-4.0.24-r2.ebuild, + -mysql-4.0.25-r1.ebuild, -mysql-4.1.8.ebuild, -mysql-4.1.8-r1.ebuild: + Cleanup of dated unstable packages, backup at + http://dev.gentoo.org/~vivo/misc/BACKUP-mysql-20050818.tar.gz 18 Aug 2005; Francesco Riosa <vivo@gentoo.org> mysql-4.0.25-r2.ebuild, mysql-4.1.13-r1.ebuild, mysql-5.0.9_beta-r2.ebuild, diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest index 7d4d41f7e1de..e17ec8f92759 100644 --- a/dev-db/mysql/Manifest +++ b/dev-db/mysql/Manifest @@ -1,21 +1,11 @@ -MD5 e3a764b1e76aa148fba0f11df81fa606 mysql-4.0.22-r1.ebuild 9288 -MD5 e43e3bc71ccf6832470f216636dd156b mysql-4.0.24-r2.ebuild 13747 -MD5 44dc5280381a06b8ce48d2a92d8bc416 mysql-3.23.58.ebuild 6947 -MD5 4934e2f34bd00ba4dd037222836a3697 mysql-4.0.23.ebuild 9059 -MD5 0cfe352d9d7ac0595951401ad80c72eb mysql-4.0.25-r1.ebuild 13809 MD5 55dfc93b08b3ccdc42599173dc7a691f mysql-5.0.9_beta-r2.ebuild 16660 -MD5 d7ff11dcd8af325be5a80286307e5a56 mysql-4.0.23-r2.ebuild 9427 MD5 8268c892b7722d5bb7549a8198e8bb23 mysql-4.1.13-r1.ebuild 16285 MD5 18a1e97d010b0613e9e77fc4500b7011 mysql-5.0.10_beta.ebuild 16658 -MD5 1b9b5ba4d58d54c962b3592dd26900e8 mysql-4.1.8-r1.ebuild 9243 -MD5 a9cebc508de69f6c21bad7776432d9f8 mysql-4.0.24-r1.ebuild 11918 MD5 72f1eb68e70c1bccc2d4972a7e155412 mysql-4.0.22.ebuild 8776 MD5 4d7e9321374c1b16b872eaadaeb1fed7 mysql-4.0.22-r2.ebuild 9621 MD5 82eebc79341497bc468d529ecac22ab1 mysql-3.23.58-r1.ebuild 7064 -MD5 1f8d9a7c214e1f7ce3227fc915a44d8c mysql-4.1.8.ebuild 9105 -MD5 344659e307cb1ee515bc0cabc4ac9015 mysql-4.0.23-r1.ebuild 9179 MD5 7a2300e4b7c4f1c68d680ea6fa75aab1 mysql-4.0.24.ebuild 9835 -MD5 51dde1f9523ad0e9537957234da8f7ea ChangeLog 37775 +MD5 189484c38e026bef200768eab9da43c4 ChangeLog 38229 MD5 a2a9fdc7d010a7c04c96cb3b7c05f06b metadata.xml 158 MD5 5df66e82623ad0af7eea7c86c1497ff8 mysql-4.0.25-r2.ebuild 13781 MD5 93827506c0de13cf7b5023847a4afd95 files/digest-mysql-5.0.9_beta-r2 70 @@ -31,41 +21,30 @@ MD5 8eaeb1372c41d2fef1622dd707a7a9d0 files/mysql-3.23-nisam.h.diff 452 MD5 58c4d09c5c2712254b1881a6fcc7abff files/mysql-4.0.18-gentoo-nptl.diff 587 MD5 087f3fbbe8e3385f5408d91cb661aace files/mysql-4.0-mysqlhotcopy-security.patch 1394 MD5 04fa914460358170e2865d20b22d2171 files/digest-mysql-4.0.22 66 -MD5 5c65bc30646d669193798324a56b002a files/digest-mysql-4.0.23 66 MD5 547fab43da8e59a03a5f3e4a500cca45 files/digest-mysql-4.0.24 66 MD5 ff80a5d8d87212046e89f2f8ae779af4 files/mysql-4.0-nisam.h.diff 452 MD5 9209843349ac5e9560f9ad7450c49769 files/703_all_test-rpl_rotate_logs.patch 802 MD5 73be6460f548f6f73c70246a4cfd13a0 files/mysql.init 886 MD5 6d4fc135a2143e95681416795d1948d9 files/mysql-4.0.23-install-db-sh.diff 1055 MD5 d20c23adca5b8731ebfab4d1b5771dab files/mysql-4.0.18-mysqld-safe-sh.diff 1307 -MD5 5701dee85af16e5d7aa821853ec8cda5 files/digest-mysql-4.1.8 65 MD5 46b0857fe11abf1015f0db6da26614ff files/010_all_my-print-defaults-r2.patch 907 MD5 d200345efa421d012cf858134d2c8884 files/logrotate.mysql 440 MD5 f1fc8bfe540d6f1268b53b7cad275080 files/my.cnf 1231 -MD5 26a871e24e291f135d9189b6037fe48e files/mysql-4.0.25-r1-asm-pic-fixes.patch 2494 MD5 50629599f478b26b4ca82c7c553feae0 files/mysql-3.23.52-install-db-sh.diff 1366 MD5 d1e79f7a155e45c69558f083fcb1139d files/mysql-4.0-my-print-defaults.diff 240 MD5 3d755bbd0b109ec0397b0ce50b4a554d files/mysql-accesstmp.patch 3393 -MD5 5701dee85af16e5d7aa821853ec8cda5 files/digest-mysql-4.1.8-r1 65 MD5 8af497943e1a29aa0a0c6b17af54b116 files/mysql-4.0.21-thrssl.patch 318 MD5 277705080f05b5b98b815487e080e562 files/my.cnf-4.1 4068 MD5 8d51cbf3afa8349839380aa0986704c0 files/mysql-3.23-safe-mysqld-sh.diff 1557 MD5 7a5badec9c28c2f4d434d6aed0a5103b files/mysql-3.23-my-print-defaults.diff 218 MD5 a9f61fe89f1a43f6c5a8de100176d2dc files/701_all_test-myisam-geometry.patch 1239 MD5 66b1e90f93ae0adc106e7b62a2c4043b files/mysql-4.1.9-thrssl.patch 905 -MD5 6e0ae36e30287df25336d8bd71c0e764 files/digest-mysql-3.23.58 67 MD5 d0fbdf4e41f2b52210eef6cb3a53e128 files/mysql-4.0.24-r1.rc6 1662 MD5 08f1246e8107e4140378d429ff9773af files/mysql-4.0.24-r2.rc6 2123 MD5 977be6c68f6231cbcf1febd3305ade5d files/mysql-4.0.14-r1-tcpd-vars-fix.diff 465 MD5 c6ff193b0612040bab879d2085b6edea files/mysql-4.0.24-manual.texi.patch 603 MD5 a8f89d11a0913332c5f8c1da5a21cc3f files/my.cnf-4.0.14-r1 2816 MD5 9946a8f7163970ec4f6a713c97eadbe0 files/my.cnf-4.0.24-r1 4271 -MD5 04fa914460358170e2865d20b22d2171 files/digest-mysql-4.0.22-r1 66 MD5 04fa914460358170e2865d20b22d2171 files/digest-mysql-4.0.22-r2 66 -MD5 5c65bc30646d669193798324a56b002a files/digest-mysql-4.0.23-r1 66 -MD5 ce711c0d8387720dbb85de1d756daa75 files/digest-mysql-4.0.23-r2 67 -MD5 547fab43da8e59a03a5f3e4a500cca45 files/digest-mysql-4.0.24-r1 66 -MD5 547fab43da8e59a03a5f3e4a500cca45 files/digest-mysql-4.0.24-r2 66 -MD5 06a7c1ead0dfe570f7c67d525c45f7c3 files/digest-mysql-4.0.25-r1 66 MD5 06a7c1ead0dfe570f7c67d525c45f7c3 files/digest-mysql-4.0.25-r2 66 MD5 c5fcb05dcc3f2d093efd55bd96af2423 files/035_x86_asm-pic-fixes-r1.patch 4093 diff --git a/dev-db/mysql/files/digest-mysql-3.23.58 b/dev-db/mysql/files/digest-mysql-3.23.58 deleted file mode 100644 index 36384becd475..000000000000 --- a/dev-db/mysql/files/digest-mysql-3.23.58 +++ /dev/null @@ -1 +0,0 @@ -MD5 835a96c86132fbde0db36db60c5b34cd mysql-3.23.58.tar.gz 12039843 diff --git a/dev-db/mysql/files/digest-mysql-4.0.22-r1 b/dev-db/mysql/files/digest-mysql-4.0.22-r1 deleted file mode 100644 index e3e0885efab8..000000000000 --- a/dev-db/mysql/files/digest-mysql-4.0.22-r1 +++ /dev/null @@ -1 +0,0 @@ -MD5 fab53259c3ba9f729a319bf271fc8587 mysql-4.0.22.tar.gz 14395535 diff --git a/dev-db/mysql/files/digest-mysql-4.0.23 b/dev-db/mysql/files/digest-mysql-4.0.23 deleted file mode 100644 index d651bdb55e4d..000000000000 --- a/dev-db/mysql/files/digest-mysql-4.0.23 +++ /dev/null @@ -1 +0,0 @@ -MD5 8b3a40434348f961b71715ed45fe540e mysql-4.0.23.tar.gz 16601941 diff --git a/dev-db/mysql/files/digest-mysql-4.0.23-r1 b/dev-db/mysql/files/digest-mysql-4.0.23-r1 deleted file mode 100644 index d651bdb55e4d..000000000000 --- a/dev-db/mysql/files/digest-mysql-4.0.23-r1 +++ /dev/null @@ -1 +0,0 @@ -MD5 8b3a40434348f961b71715ed45fe540e mysql-4.0.23.tar.gz 16601941 diff --git a/dev-db/mysql/files/digest-mysql-4.0.23-r2 b/dev-db/mysql/files/digest-mysql-4.0.23-r2 deleted file mode 100644 index 5c2ff9a55604..000000000000 --- a/dev-db/mysql/files/digest-mysql-4.0.23-r2 +++ /dev/null @@ -1 +0,0 @@ -MD5 ea85758104faf3bb2704af08dd6b3b7d mysql-4.0.23a.tar.gz 16735725 diff --git a/dev-db/mysql/files/digest-mysql-4.0.24-r1 b/dev-db/mysql/files/digest-mysql-4.0.24-r1 deleted file mode 100644 index c6d7e25405e2..000000000000 --- a/dev-db/mysql/files/digest-mysql-4.0.24-r1 +++ /dev/null @@ -1 +0,0 @@ -MD5 408d3001ed715ddc90009c247e548638 mysql-4.0.24.tar.gz 16885399 diff --git a/dev-db/mysql/files/digest-mysql-4.0.24-r2 b/dev-db/mysql/files/digest-mysql-4.0.24-r2 deleted file mode 100644 index c6d7e25405e2..000000000000 --- a/dev-db/mysql/files/digest-mysql-4.0.24-r2 +++ /dev/null @@ -1 +0,0 @@ -MD5 408d3001ed715ddc90009c247e548638 mysql-4.0.24.tar.gz 16885399 diff --git a/dev-db/mysql/files/digest-mysql-4.0.25-r1 b/dev-db/mysql/files/digest-mysql-4.0.25-r1 deleted file mode 100644 index f75729166e27..000000000000 --- a/dev-db/mysql/files/digest-mysql-4.0.25-r1 +++ /dev/null @@ -1 +0,0 @@ -MD5 68a47ff8c1f0c24866a792f6b3bb59d6 mysql-4.0.25.tar.gz 11159288 diff --git a/dev-db/mysql/files/digest-mysql-4.1.8 b/dev-db/mysql/files/digest-mysql-4.1.8 deleted file mode 100644 index 64b3ef829861..000000000000 --- a/dev-db/mysql/files/digest-mysql-4.1.8 +++ /dev/null @@ -1 +0,0 @@ -MD5 d1b3e84d1d49366e2692f453e7bf8879 mysql-4.1.8.tar.gz 22288304 diff --git a/dev-db/mysql/files/digest-mysql-4.1.8-r1 b/dev-db/mysql/files/digest-mysql-4.1.8-r1 deleted file mode 100644 index 64b3ef829861..000000000000 --- a/dev-db/mysql/files/digest-mysql-4.1.8-r1 +++ /dev/null @@ -1 +0,0 @@ -MD5 d1b3e84d1d49366e2692f453e7bf8879 mysql-4.1.8.tar.gz 22288304 diff --git a/dev-db/mysql/files/mysql-4.0.25-r1-asm-pic-fixes.patch b/dev-db/mysql/files/mysql-4.0.25-r1-asm-pic-fixes.patch deleted file mode 100644 index 300756f71dda..000000000000 --- a/dev-db/mysql/files/mysql-4.0.25-r1-asm-pic-fixes.patch +++ /dev/null @@ -1,99 +0,0 @@ -###MY_VER_RANGE [4.0.24,4.1_alpha) ---- mysql-4.0.24/strings/longlong2str-x86.s 2005-03-05 00:38:14.000000000 +0000 -+++ mysql-4.0.24-fixed/strings/longlong2str-x86.s 2005-05-17 01:37:52.000000000 +0100 -@@ -19,6 +19,13 @@ - .file "longlong2str.s" - .version "1.01" - -+ .section .rodata -+ .align 32 -+ .type _dig_vec, @object -+ .size _dig_vec, 37 -+_dig_vec: -+ .string "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" -+ - .text - .align 4 - -@@ -31,11 +38,14 @@ longlong2str: - pushl %esi - pushl %edi - pushl %ebx -+ -+ call __i686.get_pc_thunk.bx -+ addl $_GLOBAL_OFFSET_TABLE_,%ebx -+ - movl 100(%esp),%esi # Lower part of val - movl 104(%esp),%ebp # Higher part of val - movl 108(%esp),%edi # get dst -- movl 112(%esp),%ebx # Radix -- movl %ebx,%eax -+ movl 112(%esp),%eax # Radix - testl %eax,%eax - jge .L144 - -@@ -50,7 +60,7 @@ longlong2str: - adcl $0,%ebp - negl %ebp - .L146: -- negl %ebx # Change radix to positive -+ negl 112(%esp) # Change radix to positive - jmp .L148 - .align 4 - .L144: -@@ -77,12 +87,12 @@ longlong2str: - - movl %ebp,%eax # High part of value - xorl %edx,%edx -- divl %ebx -+ divl 112(%esp) - movl %eax,%ebp - movl %esi,%eax -- divl %ebx -+ divl 112(%esp) - movl %eax,%esi # quotent in ebp:esi -- movb _dig_vec(%edx),%al # al is faster than dl -+ movb _dig_vec@GOTOFF(%ebx,%edx),%al # al is faster than dl - decl %ecx - movb %al,(%ecx) # store value in buff - .align 4 -@@ -93,14 +103,13 @@ longlong2str: - jl .L153 - je .L160 # Ready - movl %esi,%eax -- movl $_dig_vec,%ebp - .align 4 - - .L154: # Do rest with integer precision - cltd -- divl %ebx -+ divl 112(%esp) - decl %ecx -- movb (%edx,%ebp),%dl # bh is always zero as ebx=radix < 36 -+ movb _dig_vec@GOTOFF(%ebx,%edx),%dl - testl %eax,%eax - movb %dl,(%ecx) - jne .L154 -@@ -138,3 +147,13 @@ longlong10_to_str: - - .L10end: - .size longlong10_to_str,.L10end-longlong10_to_str -+ -+ .section .gnu.linkonce.t.__i686.get_pc_thunk.bx,"ax",@progbits -+.globl __i686.get_pc_thunk.bx -+ .hidden __i686.get_pc_thunk.bx -+ .type __i686.get_pc_thunk.bx, @function -+__i686.get_pc_thunk.bx: -+ movl (%esp), %ebx -+ ret -+ -+ .section .note.GNU-stack,"",@progbits -diff -Nurp mysql-4.0.24/strings/strings-x86.s mysql-4.0.24-fixed/strings/strings-x86.s ---- mysql-4.0.24/strings/strings-x86.s 2005-03-05 00:38:15.000000000 +0000 -+++ mysql-4.0.24-fixed/strings/strings-x86.s 2005-05-17 01:37:47.000000000 +0100 -@@ -403,3 +403,5 @@ next_str: - ret - .strxmov_end: - .size strxmov,.strxmov_end-strxmov -+ -+ .section .note.GNU-stack,"",@progbits diff --git a/dev-db/mysql/mysql-3.23.58.ebuild b/dev-db/mysql/mysql-3.23.58.ebuild deleted file mode 100644 index b95765b1f179..000000000000 --- a/dev-db/mysql/mysql-3.23.58.ebuild +++ /dev/null @@ -1,201 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-3.23.58.ebuild,v 1.11 2005/07/27 00:22:45 vivo Exp $ - -inherit flag-o-matic eutils - -SVER=${PV%.*} -#normal releases: -SDIR=MySQL-${SVER} -#for a pre-release: -#SDIR=MySQL-${SVER}-Pre - -DESCRIPTION="A fast, multi-threaded, multi-user SQL database server." -HOMEPAGE="http://www.mysql.com/" -SRC_URI="ftp://ftp.sunet.se/pub/unix/databases/relational/mysql/Downloads/${SDIR}/${P}.tar.gz - ftp://mysql.valueclick.com/pub/mysql/Downloads/${SDIR}/${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~x86 ~sparc ~alpha ~hppa ppc" -IUSE="berkdb debug innodb perl readline ssl static tcpd" - -DEPEND="readline? ( >=sys-libs/readline-4.1 ) - bdb? ( sys-apps/ed ) - tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) - ssl? ( >=dev-libs/openssl-0.9.6d ) - >=sys-libs/zlib-1.2.3 - dev-lang/perl - sys-process/procps" -PDEPEND="perl? ( dev-perl/DBI dev-perl/DBD-mysql )" - -src_unpack() { - use innodb || ewarn "InnoDB support is not selected to be compiled in." - unpack ${A} || die - cd ${S} || die - # required for qmail-mysql - patch -p0 < ${FILESDIR}/mysql-3.23-nisam.h.diff || die - # zap startup script messages - patch -p1 < ${FILESDIR}/mysql-3.23.52-install-db-sh.diff || die - # zap binary distribution stuff - patch -p1 < ${FILESDIR}/mysql-3.23-safe-mysqld-sh.diff || die - # for correct hardcoded sysconf directory - patch -p1 < ${FILESDIR}/mysql-3.23-my-print-defaults.diff || die - #patch -p1 < ${FILESDIR}/mysql-3.23.51-tcpd.patch || die - #epatch ${FILESDIR}/mysql-4.0.14-security-28394.patch - - # upstream bug http://bugs.mysql.com/bug.php?id=7971 - # names conflict with stuff in 2.6.10 kernel headers - echo ${S}/client/mysqltest.c ${S}/extra/replace.c | xargs -n1 \ - sed -i \ - -e "s/set_bit/my__set_bit/g" \ - -e "s/clear_bit/my__clear_bit/g" \ - || die "Failed to fix bitops" - -} - -src_compile() { - # bug #11681; get b0rked code when using -march=k6 with this package. - replace-cpu-flags k6 k6-2 k6-3 i586 - - 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 - # same for alpha (see http://www.mysql.com/doc/en/BDB_portability.html) - # thanks to peter@icebear.net for noticing this. - if use sparc || 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? - use readline && myconf="${myconf} --without-readline" - use readline || myconf="${myconf} --with-readline" - use static && myconf="${myconf} --with-mysqld-ldflags=-all-static --disable-shared" - use static || myconf="${myconf} --enable-shared --enable-static" - use tcpd && myconf="${myconf} --with-libwrap" - use tcpd || myconf="${myconf} --without-libwrap" - use innodb && myconf="${myconf} --with-innodb" - use innodb || myconf="${myconf} --without-innodb" - use ssl && myconf="${myconf} --with-vio --with-openssl" - use ssl || 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" - export CXXFLAGS="${CXXFLAGS} -DHAVE_ERRNO_AS_DEFINE=1" - - # the compiler flags are as per their "official" spec ;-) - einfo "\$myconf is $myconf" - CFLAGS="${CFLAGS/-O?/} -O3" \ - CXXFLAGS="${CXXFLAGS/-O?/} -O3 -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 \ - ${myconf} || die "bad ./configure" - - make || die "compile problem" -} - -src_install() { - make install DESTDIR=${D} benchdir_root=/usr/share/mysql || die - - # eeek, not sure whats going on here.. are these needed by anything? - #use innodb && insinto /usr/lib/mysql && doins ${WORKDIR}/../libs/* - - # 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/binary-configure - rm -f ${D}/usr/share/mysql/mysql.server - rm -f ${D}/usr/share/mysql/make_binary_distribution - rm -f ${D}/usr/share/mysql/mi_test_all* - rm -f ${D}/usr/share/mysql/mysql-log-rotate - rm -f ${D}/usr/share/mysql/mysql*.spec - rm -f ${D}/usr/share/mysql/my-*.cnf - - #hmm what about all the very nice benchmark/test scripts - #in /usr/share/mysql/sql-bench - if ! use perl; then - rm -f ${D}/usr/bin/mysql_setpermission - fi - - dodoc README MIRRORS Docs/{manual.ps,manual.txt} - dohtml -r Docs/* - docinto conf-samples - dodoc support-files/my-*.cnf - - insinto /etc/mysql - doins ${FILESDIR}/my.cnf scripts/mysqlaccess.conf - exeinto /etc/init.d - newexe ${FILESDIR}/mysql.init 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 - 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 /bin/false -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 - use innodb || ewarn "InnoDB support is not selected to be compiled in." -} diff --git a/dev-db/mysql/mysql-4.0.22-r1.ebuild b/dev-db/mysql/mysql-4.0.22-r1.ebuild deleted file mode 100644 index cc70596a1640..000000000000 --- a/dev-db/mysql/mysql-4.0.22-r1.ebuild +++ /dev/null @@ -1,289 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-4.0.22-r1.ebuild,v 1.13 2005/07/26 17:14:23 vivo Exp $ - -inherit eutils gnuconfig -#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" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" -IUSE="static readline innodb berkdb tcpd ssl perl debug selinux" - -DEPEND="readline? ( >=sys-libs/readline-4.1 ) - bdb? ( sys-apps/ed ) - tcpd? ( >=sys-apps/tcp-wrappers-7.6-r6 ) - ssl? ( >=dev-libs/openssl-0.9.6d ) - perl? ( dev-lang/perl ) - >=sys-libs/zlib-1.2.3 - >=sys-apps/texinfo-4.7-r1 - sys-process/procps - >=sys-apps/sed-4" -PDEPEND="perl? ( dev-perl/DBI dev-perl/DBD-mysql )" -RDEPEND="${DEPEND} selinux? ( sec-policy/selinux-mysql )" - -mysql_upgrade_warning() { - ewarn - ewarn "If you're upgrading from MySQL-3.x to 4.0, or 4.0.x to 4.1.x, you" - ewarn "must recompile the other packages on your system that link with" - ewarn "libmysqlclient after the upgrade completes. To obtain such a list" - ewarn "of packages for your system, you may use 'revdep-rebuild' from" - ewarn "app-portage/gentoolkit." - ewarn - epause 5 -} - - -mysql_get_datadir() { - 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}'` - #DATADIR=`my_print_defaults mysqld | grep -- '^--datadir' | tail -n1 | sed -e 's|^--datadir=||'` - DATADIR=`my_print_defaults mysqld | sed -ne '/datadir/s|^--datadir=||p' | tail -n1` - fi - if [ -z "${DATADIR}" ]; then - DATADIR="/var/lib/mysql/" - einfo "Using default DATADIR" - fi - einfo "MySQL DATADIR is ${DATADIR}" - export DATADIR -} - -pkg_setup() { - use innodb || ewarn "InnoDB support is not selected to be compiled in." - mysql_upgrade_warning - mysql_get_datadir -} - -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.21-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 - # NPTL support - 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.21-thrssl.patch - - if use tcpd; then - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.14-r1-tcpd-vars-fix.diff - fi - - # security fix from http://lists.mysql.com/internals/15185 - # gentoo bug #60744 - #EPATCH_OPTS="-p1 -d ${S}" epatch ${FILESDIR}/${PN}-4.0-mysqlhotcopy-security.patch - # Already included upstream in 4.0.21 - - cd ${S} - autoreconf --install --force - # Saving this for a rainy day, in case we need it again - #WANT_AUTOMAKE=1.7 automake - gnuconfig_update - - # upstream bug http://bugs.mysql.com/bug.php?id=7971 - # names conflict with stuff in 2.6.10 kernel headers - echo ${S}/client/mysqltest.c ${S}/extra/replace.c | xargs -n1 \ - sed -i \ - -e "s/set_bit/my__set_bit/g" \ - -e "s/clear_bit/my__clear_bit/g" \ - || die "Failed to fix bitops" -} - -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 alpha || use hppa || use mips - 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/$(get_libdir)/mysql/libmysqlclient*.so* ${D}/usr/$(get_libdir) - dosym ../libmysqlclient.so /usr/$(get_libdir)/mysql/libmysqlclient.so - dosym ../libmysqlclient_r.so /usr/$(get_libdir)/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 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 - - insinto /etc/logrotate.d - newins ${FILESDIR}/logrotate.mysql mysql -} - -pkg_config() { - mysql_get_datadir - - if [ ! -d ${ROOT}/${DATADIR}/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 - chown -R mysql:mysql ${ROOT}/${DATADIR} - chmod 0750 ${ROOT}/${DATADIR} - ewarn "For security reasons you should set your MySQL root" - ewarn "password as soon as possible." - - 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() { - enewgroup mysql 60 || die "problem adding group mysql" - enewuser mysql 60 /bin/false /var/lib/mysql mysql || die "problem adding user mysql" -} - -pkg_postinst() { - mysql_get_datadir - - #empty dirs... - [ -d "${ROOT}/${DATADIR}" ] || install -d -m0750 -o mysql -g mysql ${ROOT}/var/lib/mysql - [ -d "${ROOT}/var/run/mysqld" ] || install -d -m0755 -o mysql -g mysql ${ROOT}/var/run/mysqld - [ -d "${ROOT}/var/log/mysql" ] || 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* - chmod 0660 ${ROOT}/var/log/mysql/mysql* - # secure some directories - chmod 0750 ${ROOT}/var/log/mysql ${ROOT}/${DATADIR} - - #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 - - mysql_upgrade_warning - use innodb || ewarn "InnoDB support is not selected to be compiled in." -} diff --git a/dev-db/mysql/mysql-4.0.23-r1.ebuild b/dev-db/mysql/mysql-4.0.23-r1.ebuild deleted file mode 100644 index 782c621919eb..000000000000 --- a/dev-db/mysql/mysql-4.0.23-r1.ebuild +++ /dev/null @@ -1,284 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-4.0.23-r1.ebuild,v 1.15 2005/07/26 17:14:23 vivo Exp $ - -inherit eutils gnuconfig -#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" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" -IUSE="static readline innodb berkdb tcpd ssl perl debug selinux" - -DEPEND="readline? ( >=sys-libs/readline-4.1 ) - bdb? ( sys-apps/ed ) - tcpd? ( >=sys-apps/tcp-wrappers-7.6-r6 ) - ssl? ( >=dev-libs/openssl-0.9.6d ) - perl? ( dev-lang/perl ) - >=sys-libs/zlib-1.2.3 - >=sys-apps/texinfo-4.7-r1 - sys-process/procps - >=sys-apps/sed-4" -PDEPEND="perl? ( dev-perl/DBI dev-perl/DBD-mysql )" -RDEPEND="${DEPEND} selinux? ( sec-policy/selinux-mysql )" - -warning() { - ewarn - ewarn "If you're upgrading from MySQL-3.x to 4.0, or 4.0.x to 4.1.x, you" - ewarn "must recompile the other packages on your system that link with" - ewarn "libmysqlclient after the upgrade completes. To obtain such a list" - ewarn "of packages for your system, you may use 'revdep-rebuild' from" - ewarn "app-portage/gentoolkit." - ewarn - epause 5 -} - -pkg_setup() { - use innodb || ewarn "InnoDB support is not selected to be compiled in." - 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_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.23-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 - # NPTL support - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.18-gentoo-nptl.diff - # bad tmpfiles in mysqlaccess, see bug 77805 - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/mysql-accesstmp.patch - - # 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.21-thrssl.patch - - if use tcpd; then - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.14-r1-tcpd-vars-fix.diff - fi - - # security fix from http://lists.mysql.com/internals/15185 - # gentoo bug #60744 - #EPATCH_OPTS="-p1 -d ${S}" epatch ${FILESDIR}/${PN}-4.0-mysqlhotcopy-security.patch - # Already included upstream in 4.0.21 - - cd ${S} - autoconf - libtoolize --copy --force - # Saving this for a rainy day, in case we need it again - #WANT_AUTOMAKE=1.7 automake - gnuconfig_update - - # upstream bug http://bugs.mysql.com/bug.php?id=7971 - # names conflict with stuff in 2.6.10 kernel headers - echo ${S}/client/mysqltest.c ${S}/extra/replace.c | xargs -n1 \ - sed -i \ - -e "s/set_bit/my__set_bit/g" \ - -e "s/clear_bit/my__clear_bit/g" \ - || die "Failed to fix bitops" -} - -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 alpha || use hppa || use mips - 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/$(get_libdir)/mysql/libmysqlclient*.so* ${D}/usr/$(get_libdir) - dosym ../libmysqlclient.so /usr/$(get_libdir)/mysql/libmysqlclient.so - dosym ../libmysqlclient_r.so /usr/$(get_libdir)/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 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 - - insinto /etc/logrotate.d - newins ${FILESDIR}/logrotate.mysql mysql -} - -pkg_config() { - 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}'` - #DATADIR=`my_print_defaults mysqld | grep -- '^--datadir' | tail -n1 | sed -e 's|^--datadir=||'` - DATADIR=`my_print_defaults mysqld | sed -ne '/datadir/s|^--datadir=||p' | tail -n1` - fi - if [ -z "${DATADIR}" ]; then - DATADIR="/var/lib/mysql/" - einfo "Using default DATADIR" - fi - einfo "MySQL DATADIR is ${DATADIR}" - - if [ ! -d ${ROOT}/${DATADIR}/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 - chown -R mysql:mysql ${ROOT}/${DATADIR} - chmod 0750 ${ROOT}/${DATADIR} - ewarn "For security reasons you should set your MySQL root" - ewarn "password as soon as possible." - - 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() { - enewgroup mysql 60 || die "problem adding group mysql" - enewuser mysql 60 /bin/false /var/lib/mysql mysql || die "problem adding user mysql" -} - -pkg_postinst() { - #empty dirs... - install -d -m0750 -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* - chmod 0660 ${ROOT}/var/log/mysql/mysql* - # secure some directories - chmod 0750 ${ROOT}/var/log/mysql ${ROOT}/var/lib/mysql - - #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 - use innodb || ewarn "InnoDB support is not selected to be compiled in." -} diff --git a/dev-db/mysql/mysql-4.0.23-r2.ebuild b/dev-db/mysql/mysql-4.0.23-r2.ebuild deleted file mode 100644 index ccddbfe38054..000000000000 --- a/dev-db/mysql/mysql-4.0.23-r2.ebuild +++ /dev/null @@ -1,294 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-4.0.23-r2.ebuild,v 1.12 2005/07/26 17:14:23 vivo Exp $ - -inherit eutils gnuconfig -#to accomodate -laadeedah releases -NEWP=${P}a - -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" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" -IUSE="static readline innodb berkdb tcpd ssl perl debug selinux" - -DEPEND="readline? ( >=sys-libs/readline-4.1 ) - bdb? ( sys-apps/ed ) - tcpd? ( >=sys-apps/tcp-wrappers-7.6-r6 ) - ssl? ( >=dev-libs/openssl-0.9.6d ) - perl? ( dev-lang/perl ) - >=sys-libs/zlib-1.2.3 - >=sys-apps/texinfo-4.7-r1 - sys-process/procps - >=sys-apps/sed-4" -PDEPEND="perl? ( dev-perl/DBI dev-perl/DBD-mysql )" -RDEPEND="${DEPEND} selinux? ( sec-policy/selinux-mysql )" - -mysql_upgrade_warning() { - ewarn - ewarn "If you're upgrading from MySQL-3.x to 4.0, or 4.0.x to 4.1.x, you" - ewarn "must recompile the other packages on your system that link with" - ewarn "libmysqlclient after the upgrade completes. To obtain such a list" - ewarn "of packages for your system, you may use 'revdep-rebuild' from" - ewarn "app-portage/gentoolkit." - ewarn - epause 5 -} - - -mysql_get_datadir() { - 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}'` - #DATADIR=`my_print_defaults mysqld | grep -- '^--datadir' | tail -n1 | sed -e 's|^--datadir=||'` - DATADIR=`my_print_defaults mysqld | sed -ne '/datadir/s|^--datadir=||p' | tail -n1` - fi - if [ -z "${DATADIR}" ]; then - DATADIR="/var/lib/mysql/" - einfo "Using default DATADIR" - fi - einfo "MySQL DATADIR is ${DATADIR}" - export DATADIR -} - -pkg_setup() { - use innodb || ewarn "InnoDB support is not selected to be compiled in." - mysql_upgrade_warning - mysql_get_datadir -} - -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.23-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 - # NPTL support - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.18-gentoo-nptl.diff - # bad tmpfiles in mysqlaccess, see bug 77805 - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/mysql-accesstmp.patch - - # 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.21-thrssl.patch - - if use tcpd; then - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.14-r1-tcpd-vars-fix.diff - fi - - for d in ${S} ${S}/innobase; do - cd ${d} - # WARNING, plain autoconf breaks it! - #autoconf - # must use this instead - WANT_AUTOCONF=2.59 autoreconf --force - # Fix the evil "libtool.m4 and ltmain.sh have a version mismatch!" - libtoolize --copy --force - # Saving this for a rainy day, in case we need it again - #WANT_AUTOMAKE=1.7 automake - gnuconfig_update - done - - # upstream bug http://bugs.mysql.com/bug.php?id=7971 - # names conflict with stuff in 2.6.10 kernel headers - echo ${S}/client/mysqltest.c ${S}/extra/replace.c | xargs -n1 \ - sed -i \ - -e "s/set_bit/my__set_bit/g" \ - -e "s/clear_bit/my__clear_bit/g" \ - || die "Failed to fix bitops" -} - -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 alpha || use hppa || use mips - 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/$(get_libdir)/mysql/libmysqlclient*.so* ${D}/usr/$(get_libdir) - dosym ../libmysqlclient.so /usr/$(get_libdir)/mysql/libmysqlclient.so - dosym ../libmysqlclient_r.so /usr/$(get_libdir)/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 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 - - insinto /etc/logrotate.d - newins ${FILESDIR}/logrotate.mysql mysql -} - -pkg_config() { - mysql_get_datadir - - if [ ! -d ${ROOT}/${DATADIR}/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 - chown -R mysql:mysql ${ROOT}/${DATADIR} - chmod 0750 ${ROOT}/${DATADIR} - ewarn "For security reasons you should set your MySQL root" - ewarn "password as soon as possible." - - 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() { - enewgroup mysql 60 || die "problem adding group mysql" - enewuser mysql 60 /bin/false /var/lib/mysql mysql || die "problem adding user mysql" -} - -pkg_postinst() { - mysql_get_datadir - - #empty dirs... - [ -d "${ROOT}/${DATADIR}" ] || install -d -m0750 -o mysql -g mysql ${ROOT}/var/lib/mysql - [ -d "${ROOT}/var/run/mysqld" ] || install -d -m0755 -o mysql -g mysql ${ROOT}/var/run/mysqld - [ -d "${ROOT}/var/log/mysql" ] || 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* - chmod 0660 ${ROOT}/var/log/mysql/mysql* - # secure some directories - chmod 0750 ${ROOT}/var/log/mysql ${ROOT}/${DATADIR} - - #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 - - mysql_upgrade_warning - use innodb || ewarn "InnoDB support is not selected to be compiled in." -} diff --git a/dev-db/mysql/mysql-4.0.23.ebuild b/dev-db/mysql/mysql-4.0.23.ebuild deleted file mode 100644 index 903f7e6d3385..000000000000 --- a/dev-db/mysql/mysql-4.0.23.ebuild +++ /dev/null @@ -1,281 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-4.0.23.ebuild,v 1.13 2005/07/26 17:14:23 vivo Exp $ - -inherit eutils gnuconfig -#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" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" -IUSE="static readline innodb berkdb tcpd ssl perl debug selinux" - -DEPEND="readline? ( >=sys-libs/readline-4.1 ) - bdb? ( sys-apps/ed ) - tcpd? ( >=sys-apps/tcp-wrappers-7.6-r6 ) - ssl? ( >=dev-libs/openssl-0.9.6d ) - perl? ( dev-lang/perl ) - >=sys-libs/zlib-1.2.3 - >=sys-apps/texinfo-4.7-r1 - sys-process/procps - >=sys-apps/sed-4" -PDEPEND="perl? ( dev-perl/DBI dev-perl/DBD-mysql )" -RDEPEND="${DEPEND} selinux? ( sec-policy/selinux-mysql )" - -warning() { - ewarn - ewarn "If you're upgrading from MySQL-3.x to 4.0, or 4.0.x to 4.1.x, you" - ewarn "must recompile the other packages on your system that link with" - ewarn "libmysqlclient after the upgrade completes. To obtain such a list" - ewarn "of packages for your system, you may use 'revdep-rebuild' from" - ewarn "app-portage/gentoolkit." - ewarn - epause 5 -} - -pkg_setup() { - use innodb || ewarn "InnoDB support is not selected to be compiled in." - 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_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.23-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 - # NPTL support - 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.21-thrssl.patch - - if use tcpd; then - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.14-r1-tcpd-vars-fix.diff - fi - - # security fix from http://lists.mysql.com/internals/15185 - # gentoo bug #60744 - #EPATCH_OPTS="-p1 -d ${S}" epatch ${FILESDIR}/${PN}-4.0-mysqlhotcopy-security.patch - # Already included upstream in 4.0.21 - - cd ${S} - autoconf - libtoolize --copy --force - # Saving this for a rainy day, in case we need it again - #WANT_AUTOMAKE=1.7 automake - gnuconfig_update - - # upstream bug http://bugs.mysql.com/bug.php?id=7971 - # names conflict with stuff in 2.6.10 kernel headers - echo ${S}/client/mysqltest.c ${S}/extra/replace.c | xargs -n1 \ - sed -i \ - -e "s/set_bit/my__set_bit/g" \ - -e "s/clear_bit/my__clear_bit/g" \ - || die "Failed to fix bitops" -} - -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 alpha || use hppa || use mips - 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/$(get_libdir)/mysql/libmysqlclient*.so* ${D}/usr/$(get_libdir) - dosym ../libmysqlclient.so /usr/$(get_libdir)/mysql/libmysqlclient.so - dosym ../libmysqlclient_r.so /usr/$(get_libdir)/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 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 - - insinto /etc/logrotate.d - newins ${FILESDIR}/logrotate.mysql mysql -} - -pkg_config() { - 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}'` - #DATADIR=`my_print_defaults mysqld | grep -- '^--datadir' | tail -n1 | sed -e 's|^--datadir=||'` - DATADIR=`my_print_defaults mysqld | sed -ne '/datadir/s|^--datadir=||p' | tail -n1` - fi - if [ -z "${DATADIR}" ]; then - DATADIR="/var/lib/mysql/" - einfo "Using default DATADIR" - fi - einfo "MySQL DATADIR is ${DATADIR}" - - if [ ! -d ${ROOT}/${DATADIR}/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 - chown -R mysql:mysql ${ROOT}/${DATADIR} - chmod 0750 ${ROOT}/${DATADIR} - ewarn "For security reasons you should set your MySQL root" - ewarn "password as soon as possible." - - 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() { - enewgroup mysql 60 || die "problem adding group mysql" - enewuser mysql 60 /bin/false /var/lib/mysql mysql || die "problem adding user mysql" -} - -pkg_postinst() { - #empty dirs... - install -d -m0750 -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* - chmod 0660 ${ROOT}/var/log/mysql/mysql* - # secure some directories - chmod 0750 ${ROOT}/var/log/mysql ${ROOT}/var/lib/mysql - - #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 - use innodb || ewarn "InnoDB support is not selected to be compiled in." -} diff --git a/dev-db/mysql/mysql-4.0.24-r1.ebuild b/dev-db/mysql/mysql-4.0.24-r1.ebuild deleted file mode 100644 index 419a4103dd70..000000000000 --- a/dev-db/mysql/mysql-4.0.24-r1.ebuild +++ /dev/null @@ -1,360 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-4.0.24-r1.ebuild,v 1.6 2005/07/26 17:14:23 vivo Exp $ - -inherit eutils gnuconfig -#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" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" -IUSE="berkdb debug doc minimal perl readline selinux ssl static tcpd" - -DEPEND="readline? ( >=sys-libs/readline-4.1 ) - bdb? ( sys-apps/ed ) - tcpd? ( >=sys-apps/tcp-wrappers-7.6-r6 ) - ssl? ( >=dev-libs/openssl-0.9.6d ) - perl? ( dev-lang/perl ) - >=sys-libs/zlib-1.2.3 - >=sys-apps/texinfo-4.7-r1 - sys-process/procps - >=sys-apps/sed-4" -PDEPEND="perl? ( dev-perl/DBI dev-perl/DBD-mysql )" -RDEPEND="${DEPEND} selinux? ( sec-policy/selinux-mysql )" - -mysql_upgrade_warning() { - ewarn - ewarn "If you're upgrading from MySQL-3.x to 4.0, or 4.0.x to 4.1.x, you" - ewarn "must recompile the other packages on your system that link with" - ewarn "libmysqlclient after the upgrade completes. To obtain such a list" - ewarn "of packages for your system, you may use 'revdep-rebuild' from" - ewarn "app-portage/gentoolkit." - ewarn - epause 5 -} - - -mysql_get_datadir() { - 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}'` - #DATADIR=`my_print_defaults mysqld | grep -- '^--datadir' | tail -n1 | sed -e 's|^--datadir=||'` - DATADIR=`my_print_defaults mysqld | sed -ne '/datadir/s|^--datadir=||p' | tail -n1` - fi - if [ -z "${DATADIR}" ]; then - DATADIR="/var/lib/mysql/" - einfo "Using default DATADIR" - fi - einfo "MySQL DATADIR is ${DATADIR}" - export DATADIR -} - -pkg_setup() { - mysql_upgrade_warning - mysql_get_datadir -} - -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.23-install-db-sh.diff || die - #zap binary distribution stuff - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.18-mysqld-safe-sh.diff || die - #required for qmail-mysql - EPATCH_OPTS="-p0 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0-nisam.h.diff || die - #for correct hardcoded sysconf directory - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0-my-print-defaults.diff || die - # NPTL support - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.18-gentoo-nptl.diff || die - # Merged upstream as of 4.0.24 - # bad tmpfiles in mysqlaccess, see bug 77805 - #EPATCH_OPTS="-p1 -d ${S}" \ - #epatch ${FILESDIR}/mysql-accesstmp.patch - - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.24-manual.texi.patch || die - - # 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.21-thrssl.patch || die - - if use tcpd; then - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.14-r1-tcpd-vars-fix.diff || die - fi - - for d in ${S} ${S}/innobase; do - cd ${d} - # WARNING, plain autoconf breaks it! - #autoconf - # must use this instead - WANT_AUTOCONF=2.59 autoreconf --force - # Fix the evil "libtool.m4 and ltmain.sh have a version mismatch!" - libtoolize --copy --force - # Saving this for a rainy day, in case we need it again - #WANT_AUTOMAKE=1.7 automake - gnuconfig_update - done - - # upstream bug http://bugs.mysql.com/bug.php?id=7971 - # names conflict with stuff in 2.6.10 kernel headers - echo ${S}/client/mysqltest.c ${S}/extra/replace.c | xargs -n1 \ - sed -i \ - -e "s/\<set_bit\>/my__set_bit/g" \ - -e "s/\<clear_bit\>/my__clear_bit/g" \ - || die "Failed to fix bitops" -} - -src_compile() { - local myconf - - #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`" - - use ssl \ - && myconf="${myconf} --with-vio --with-openssl" \ - || myconf="${myconf} --without-openssl" - - myconf="${myconf} `use_with debug`" - - # benchmarking stuff needs perl - # and shouldn't be bothered with on minimal builds - if useq perl && ! useq minimal; then - myconf="${myconf} --with-bench" - else - myconf="${myconf} --without-bench" - fi - - # these are things we exclude from a minimal build - # note that the server actually does get built and installed - # but we then delete it before packaging. - local minimal_exclude_list="server embedded-server extra-tools innodb raid" - if ! useq minimal; then - for i in ${minimal_exclude_list}; do - myconf="${myconf} --with-${i}" - done - # lots of chars - myconf="${myconf} --with-extra-charsets=all" - #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 alpha || use hppa || use mips - then - myconf="${myconf} --without-berkeley-db" - else - use berkdb \ - && myconf="${myconf} --with-berkeley-db=./bdb" \ - || myconf="${myconf} --without-berkeley-db" - fi - else - for i in ${minimal_exclude_list}; do - myconf="${myconf} --without-${i}" - done - myconf="${myconf} --without-berkeley-db" - myconf="${myconf} --with-extra-charsets=none" - fi - - # documentation - myconf="${myconf} `use_with doc docs`" - - #glibc-2.3.2_pre fix; bug #16496 - export CFLAGS="${CFLAGS} -DHAVE_ERRNO_AS_DEFINE=1" - export CXXFLAGS="${CXXFLAGS} -DHAVE_ERRNO_AS_DEFINE=1" - - #bug fix for #15099, should make this api backward compatible - export CFLAGS="${CFLAGS} -DUSE_OLD_FUNCTIONS" - export CXXFLAGS="${CXXFLAGS} -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 \ - -C \ - --libexecdir=/usr/sbin \ - --sysconfdir=/etc/mysql \ - --localstatedir=/var/lib/mysql \ - --with-low-memory \ - --enable-assembler \ - --with-charset=latin1 \ - --enable-local-infile \ - --with-mysqld-user=mysql \ - --with-client-ldflags=-lstdc++ \ - --enable-thread-safe-client \ - --with-comment="Gentoo Linux ${PF}" \ - --with-unix-socket-path=/var/run/mysqld/mysqld.sock \ - ${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/$(get_libdir)/mysql/libmysqlclient*.so* ${D}/usr/$(get_libdir) - dosym ../libmysqlclient.so /usr/$(get_libdir)/mysql/libmysqlclient.so - dosym ../libmysqlclient_r.so /usr/$(get_libdir)/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/bin/make*distribution - rm -f ${D}/usr/share/mysql/make_*_distribution - rm -f ${D}/usr/share/mysql/mysql.server - rm -f ${D}/usr/share/mysql/binary-configure - 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/{mysqlhotcopy,mysql_find_rows,mysql_convert_table_format,mysqld_multi,mysqlaccess,mysql_fix_extensions,mysqldumpslow,mysql_zap,mysql_explain_log,mysql_tableinfo,mysql_setpermission} - rm -f ${D}/usr/bin/mysqlhotcopy - rm -rf ${D}/usr/share/mysql/sql-bench - fi - # clean up stuff for a minimal build - # this is anything server-specific - if useq minimal; then - rm -rf ${D}/usr/share/mysql/{mysql-test,sql-bench} - rm -f ${D}/usr/bin/{mysql_install_db,mysqlmanager*,mysql_secure_installation,mysql_fix_privilege_tables,mysqlhotcopy,mysql_convert_table_format,mysqld_multi,mysql_fix_extensions,mysql_zap,mysql_explain_log,mysql_tableinfo,mysqld_safe,myisam*,isam*,mysql_install,mysql_waitpid,mysqlbinlog,mysqltest,pack_isam} - rm -f ${D}/usr/sbin/mysqld - rm -f ${D}/usr/lib/mysql/lib{heap,merge,nisam,mysys,mystrings,mysqld,myisammrg,vio,dbug,myisam}.a - fi - - # config stuff - insinto /etc/mysql - doins scripts/mysqlaccess.conf - newins ${FILESDIR}/my.cnf-4.0.24-r1 my.cnf - # minimal builds don't have the server - if ! useq minimal; then - exeinto /etc/init.d - newexe ${FILESDIR}/mysql-4.0.24-r1.rc6 mysql - insinto /etc/logrotate.d - newins ${FILESDIR}/logrotate.mysql mysql - fi - - # docs - dodoc README COPYING ChangeLog EXCEPTIONS-CLIENT INSTALL-SOURCE - # minimal builds don't have the server - if useq doc && ! useq minimal; then - dohtml Docs/*.html - dodoc Docs/manual.{txt,ps} - docinto conf-samples - dodoc support-files/my-*.cnf - fi - -} - -src_test() { - cd ${S} - einfo ">>> Test phase [check]: ${CATEGORY}/${PF}" - make check || die "make check failed" - if ! useq minimal; then - einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" - addpredict /this-dir-does-not-exist/t9.MYI - make test || die "make test failed" - else - einfo "Skipping server tests due to minimal build." - fi -} - -pkg_config() { - mysql_get_datadir - if useq minimal; then - die "Minimal builds do NOT include the MySQL server" - fi - if [ ! -d ${ROOT}/${DATADIR}/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 - chown -R mysql:mysql ${ROOT}/${DATADIR} - chmod 0750 ${ROOT}/${DATADIR} - ewarn "For security reasons you should set your MySQL root" - ewarn "password as soon as possible." - - 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() { - enewgroup mysql 60 || die "problem adding group mysql" - enewuser mysql 60 /bin/false /var/lib/mysql mysql || die "problem adding user mysql" -} - -pkg_postinst() { - mysql_get_datadir - - if ! useq minimal; then - #empty dirs... - [ -d "${ROOT}/${DATADIR}" ] || install -d -m0750 -o mysql -g mysql ${ROOT}/var/lib/mysql - [ -d "${ROOT}/var/run/mysqld" ] || install -d -m0755 -o mysql -g mysql ${ROOT}/var/run/mysqld - [ -d "${ROOT}/var/log/mysql" ] || 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* - chmod 0660 ${ROOT}/var/log/mysql/mysql* - # secure some directories - chmod 0750 ${ROOT}/var/log/mysql ${ROOT}/${DATADIR} - - #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 - fi - - mysql_upgrade_warning - einfo "InnoDB is not optional as of MySQL-4.0.24, at the request of upstream." -} diff --git a/dev-db/mysql/mysql-4.0.24-r2.ebuild b/dev-db/mysql/mysql-4.0.24-r2.ebuild deleted file mode 100644 index 0c3d6c17b507..000000000000 --- a/dev-db/mysql/mysql-4.0.24-r2.ebuild +++ /dev/null @@ -1,448 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-4.0.24-r2.ebuild,v 1.5 2005/07/26 17:14:23 vivo Exp $ - -inherit eutils gnuconfig flag-o-matic versionator - -SVER=${PV%.*} -PLV="" -NEWP="${PN}-${SVER}.$( get_version_component_range 3-3 )${PLV}" - -# shorten the path because the socket path length must be shorter than 107 chars -# and we will run a mysql server during test phase -S="${WORKDIR}/${PN}" - -DESCRIPTION="A fast, multi-threaded, multi-user SQL database server" -HOMEPAGE="http://www.mysql.com/" -SRC_URI="mirror://mysql/Downloads/MySQL-${SVER}/${NEWP}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" -IUSE="berkdb debug doc minimal perl readline selinux ssl static tcpd" -RESTRICT="primaryuri" - -DEPEND="readline? ( >=sys-libs/readline-4.1 ) - bdb? ( sys-apps/ed ) - tcpd? ( >=sys-apps/tcp-wrappers-7.6-r6 ) - ssl? ( >=dev-libs/openssl-0.9.6d ) - perl? ( dev-lang/perl ) - >=sys-libs/zlib-1.2.3 - >=sys-apps/texinfo-4.7-r1 - sys-process/procps - >=sys-apps/sed-4" -RDEPEND="${DEPEND} - selinux? ( sec-policy/selinux-mysql )" -# dev-perl/DBD-mysql is needed by some scripts installed by MySQL -PDEPEND="perl? ( dev-perl/DBD-mysql )" - -mysql_get_datadir() { - 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}'` - #DATADIR=`my_print_defaults mysqld | grep -- '^--datadir' | tail -n1 | sed -e 's|^--datadir=||'` - DATADIR=`my_print_defaults mysqld 2>/dev/null | sed -ne '/datadir/s|^--datadir=||p' | tail -n1` - fi - if [ -z "${DATADIR}" ]; then - DATADIR="/var/lib/mysql/" - einfo "Using default DATADIR" - fi - einfo "MySQL DATADIR is ${DATADIR}" - export DATADIR -} - -mysql_upgrade_warning() { - ewarn - ewarn "If you're upgrading from MySQL-3.x to 4.0, or 4.0.x to 4.1.x, you" - ewarn "must recompile the other packages on your system that link with" - ewarn "libmysqlclient after the upgrade completes. To obtain such a list" - ewarn "of packages for your system, you may use 'revdep-rebuild' from" - ewarn "app-portage/gentoolkit." - ewarn - epause 5 -} - -pkg_setup() { - mysql_upgrade_warning - mysql_get_datadir -} - -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 - - mv "${WORKDIR}/${NEWP}" "${S}" - cd "${S}" - - #zap startup script messages - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.23-install-db-sh.diff || die - #zap binary distribution stuff - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.18-mysqld-safe-sh.diff || die - #required for qmail-mysql - EPATCH_OPTS="-p0 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0-nisam.h.diff || die - #for correct hardcoded sysconf directory - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0-my-print-defaults.diff || die - # NPTL support - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.18-gentoo-nptl.diff || die - # Merged upstream as of 4.0.24 - # bad tmpfiles in mysqlaccess, see bug 77805 - #EPATCH_OPTS="-p1 -d ${S}" \ - #epatch ${FILESDIR}/mysql-accesstmp.patch - - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.24-manual.texi.patch || die - - # 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.21-thrssl.patch || die - - # PIC fixes - # bug #42968 - #EPATCH_OPTS="-p1 -d ${S}" \ - #epatch ${FILESDIR}/${PN}-4.0.24-asm-pic-fixes.patch || die - - if use tcpd; then - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.14-r1-tcpd-vars-fix.diff || die - fi - - for d in ${S} ${S}/innobase; do - cd ${d} - # WARNING, plain autoconf breaks it! - #autoconf - # must use this instead - WANT_AUTOCONF=2.59 autoreconf --force - # Fix the evil "libtool.m4 and ltmain.sh have a version mismatch!" - libtoolize --copy --force - # Saving this for a rainy day, in case we need it again - #WANT_AUTOMAKE=1.7 automake - gnuconfig_update - done - - # upstream bug http://bugs.mysql.com/bug.php?id=7971 - # names conflict with stuff in 2.6.10 kernel headers - echo ${S}/client/mysqltest.c ${S}/extra/replace.c | xargs -n1 \ - sed -i \ - -e "s/\<set_bit\>/my__set_bit/g" \ - -e "s/\<clear_bit\>/my__clear_bit/g" \ - || die "Failed to fix bitops" -} - -src_compile() { - local myconf - - # 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`" - - use ssl \ - && myconf="${myconf} --with-vio --with-openssl" \ - || myconf="${myconf} --without-openssl" - - myconf="${myconf} `use_with debug`" - - # benchmarking stuff needs perl - # and shouldn't be bothered with on minimal builds - if useq perl && ! useq minimal; then - myconf="${myconf} --with-bench" - else - myconf="${myconf} --without-bench" - fi - - # these are things we exclude from a minimal build - # note that the server actually does get built and installed - # but we then delete it before packaging. - local minimal_exclude_list="server embedded-server extra-tools innodb raid" - if ! useq minimal; then - for i in ${minimal_exclude_list}; do - myconf="${myconf} --with-${i}" - done - - # lots of chars - myconf="${myconf} --with-extra-charsets=all" - - #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 - # it boils down to non-64 bit safety. - if useq sparc || useq alpha || useq hppa || useq mips || useq amd64 - then - myconf="${myconf} --without-berkeley-db" - else - use berkdb \ - && myconf="${myconf} --with-berkeley-db=./bdb" \ - || myconf="${myconf} --without-berkeley-db" - fi - - else - for i in ${minimal_exclude_list}; do - myconf="${myconf} --without-${i}" - done - myconf="${myconf} --without-berkeley-db" - myconf="${myconf} --with-extra-charsets=none" - fi - - # documentation - myconf="${myconf} `use_with doc docs`" - - # glibc-2.3.2_pre fix; bug #16496 - append-flags "-DHAVE_ERRNO_AS_DEFINE=1" - - #bug fix for #15099, should make this api backward compatible - append-flags "-DUSE_OLD_FUNCTIONS" - - #the compiler flags are as per their "official" spec ;) - #CFLAGS="${CFLAGS/-O?/} -O3" \ - export CXXFLAGS="${CXXFLAGS} -felide-constructors -fno-exceptions -fno-rtti" - - econf \ - -C \ - --libexecdir=/usr/sbin \ - --sysconfdir=/etc/mysql \ - --localstatedir=/var/lib/mysql \ - --with-low-memory \ - --enable-assembler \ - --with-charset=latin1 \ - --enable-local-infile \ - --with-mysqld-user=mysql \ - --with-client-ldflags=-lstdc++ \ - --enable-thread-safe-client \ - --with-comment="Gentoo Linux ${PF}" \ - --with-unix-socket-path=/var/run/mysqld/mysqld.sock \ - ${myconf} || die "bad ./configure" - - emake || die "compile problem" -} - -src_install() { - make install DESTDIR="${D}" benchdir_root="/usr/share/mysql" || die - - diropts "-m0750" - - dodir "${DATADIR}" /var/run/mysqld /var/log/mysql - keepdir "${DATADIR}" /var/run/mysqld /var/log/mysql - chown -R mysql:mysql ${D}/var/lib/mysql \ - ${D}/var/run/mysqld \ - ${D}/var/log/mysql - - diropts "-m0755" - - # move client libs, install a couple of missing headers - local lib=$(get_libdir) - 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/bin/make*distribution - rm -f ${D}/usr/share/mysql/make_*_distribution - rm -f ${D}/usr/share/mysql/mysql.server - rm -f ${D}/usr/share/mysql/binary-configure - 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/{mysqlhotcopy,mysql_find_rows,mysql_convert_table_format,mysqld_multi,mysqlaccess,mysql_fix_extensions,mysqldumpslow,mysql_zap,mysql_explain_log,mysql_tableinfo,mysql_setpermission} - rm -f ${D}/usr/bin/mysqlhotcopy - rm -rf ${D}/usr/share/mysql/sql-bench - fi - - # clean up stuff for a minimal build - # this is anything server-specific - if useq minimal; then - rm -rf ${D}/usr/share/mysql/{mysql-test,sql-bench} - rm -f ${D}/usr/bin/{mysql_install_db,mysqlmanager*,mysql_secure_installation,mysql_fix_privilege_tables,mysqlhotcopy,mysql_convert_table_format,mysqld_multi,mysql_fix_extensions,mysql_zap,mysql_explain_log,mysql_tableinfo,mysqld_safe,myisam*,isam*,mysql_install,mysql_waitpid,mysqlbinlog,mysqltest,pack_isam} - rm -f ${D}/usr/sbin/mysqld - rm -f ${D}/usr/lib/mysql/lib{heap,merge,nisam,mysys,mystrings,mysqld,myisammrg,vio,dbug,myisam}.a - fi - - # config stuff - insinto /etc/mysql - doins scripts/mysqlaccess.conf - newins ${FILESDIR}/my.cnf-4.0.24-r1 my.cnf - - # minimal builds don't have the server - if ! useq minimal; then - exeinto /etc/init.d - newexe "${FILESDIR}/mysql-4.0.24-r2.rc6" mysql - insinto /etc/logrotate.d - newins "${FILESDIR}/logrotate.mysql" mysql - fi - - # docs - dodoc README COPYING ChangeLog EXCEPTIONS-CLIENT INSTALL-SOURCE - # minimal builds don't have the server - if useq doc && ! useq minimal; then - dohtml Docs/*.html - dodoc Docs/manual.{txt,ps} - docinto conf-samples - dodoc support-files/my-*.cnf - fi - -} - -src_test() { - cd ${S} - einfo ">>> Test phase [check]: ${CATEGORY}/${PF}" - make check || die "make check failed" - if ! useq minimal; then - local retstatus - einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" - addpredict /this-dir-does-not-exist/t9.MYI - make test - retstatus=$? - - # to be sure ;) - pkill -9 -f ${S}/ndb/src/kernel/ndbd 2>/dev/null - pkill -9 -f ${S}/ndb/src/mgmsrv/ndb_mgmd 2>/dev/null - pkill -9 -f ${S}/ndb/src/mgmclient/ndb_mgm 2>/dev/null - pkill -9 -f ${S}/sql/mysqld 2>/dev/null - [[ $retstatus == 0 ]] || die "make test failed" - - else - einfo "Skipping server tests due to minimal build." - fi -} - -pkg_config() { - mysql_get_datadir - - if built_with_use dev-db/mysql minimal; then - die "Minimal builds do NOT include the MySQL server" - fi - - if [[ "$(pgrep mysqld)" != "" ]] ; then - die "Oops you already have a mysql daemon running!" - fi - - local pwd1="a" - local pwd2="b" - local maxtry=5 - - if [[ -d "${DATADIR}/mysql" ]] ; then - ewarn "You have already a MySQL database in place." - ewarn "Please rename it or delete it if you wish to replace it." - die "MySQL database already exists!" - fi - - einfo "Creating the mysql database and setting proper" - einfo "permissions on it..." - - einfo "Insert a password for the mysql 'root' user" - ewarn "the password will be visible on the screen" - - echo -n " >" && read -r pwd1 - einfo "Repeat the password" - echo -n " >" && read -r pwd2 - - if (( "x$pwd1" != "x$pwd2" )) ; then - die "Passwords are not the same" - fi - - ${ROOT}/usr/bin/mysql_install_db || die "MySQL databases not installed" - - # MySQL 5.0 don't ned this - chown -R mysql:mysql ${DATADIR} - chmod 0750 ${ROOT}/${DATADIR} - - # now we can set the password - local socket=${ROOT}/var/run/mysqld/mysqld.sock - local mysqld="${ROOT}/usr/sbin/mysqld \ - --skip-grant-tables \ - --basedir=${ROOT}/usr \ - --datadir=${ROOT}/var/lib/mysql \ - --skip-innodb \ - --skip-bdb \ - --max_allowed_packet=8M \ - --net_buffer_length=16K \ - --socket=${socket} \ - --pid-file=${ROOT}/var/run/mysqld/mysqld.pid" - - $mysqld & - - while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] - do - maxtry=$(($maxtry-1)) - echo -n "." - sleep 1 - done - - # do this from memory we don't want clear text password in temp files - local sql="UPDATE mysql.user SET Password = PASSWORD('${pwd1}') WHERE USER='root'" - ${ROOT}/usr/bin/mysql \ - --socket=${socket} \ - -hlocalhost \ - -e "${sql}" - local retstatus=$? - - kill $( cat ${ROOT}/var/run/mysqld/mysqld.pid ) - - [[ $retstatus == 0 ]] || die "Failed to communicate with MySQL server" - - einfo "done" -} - -pkg_preinst() { - enewgroup mysql 60 || die "problem adding group mysql" - enewuser mysql 60 /bin/false /var/lib/mysql mysql \ - || die "problem adding user mysql" -} - -pkg_postinst() { - mysql_get_datadir - - if ! useq minimal; then - #empty dirs... - [ -d "${ROOT}/${DATADIR}" ] || install -d -m0750 -o mysql -g mysql ${ROOT}/var/lib/mysql - [ -d "${ROOT}/var/run/mysqld" ] || install -d -m0755 -o mysql -g mysql ${ROOT}/var/run/mysqld - [ -d "${ROOT}/var/log/mysql" ] || 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* - chmod 0660 ${ROOT}/var/log/mysql/mysql* - # secure some directories - chmod 0750 ${ROOT}/var/log/mysql ${ROOT}/${DATADIR} - - # 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 - fi - - mysql_upgrade_warning - einfo "InnoDB is not optional as of MySQL-4.0.24, at the request of upstream." -} diff --git a/dev-db/mysql/mysql-4.0.25-r1.ebuild b/dev-db/mysql/mysql-4.0.25-r1.ebuild deleted file mode 100644 index 81cfff6886e3..000000000000 --- a/dev-db/mysql/mysql-4.0.25-r1.ebuild +++ /dev/null @@ -1,450 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-4.0.25-r1.ebuild,v 1.4 2005/07/26 17:14:23 vivo Exp $ - -inherit eutils gnuconfig flag-o-matic versionator - -SVER=${PV%.*} -PLV="" -NEWP="${PN}-${SVER}.$( get_version_component_range 3-3 )${PLV}" - -# shorten the path because the socket path length must be shorter than 107 chars -# and we will run a mysql server during test phase -S="${WORKDIR}/${PN}" - -DESCRIPTION="A fast, multi-threaded, multi-user SQL database server" -HOMEPAGE="http://www.mysql.com/" -SRC_URI="mirror://mysql/Downloads/MySQL-${SVER}/${NEWP}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" -IUSE="berkdb debug doc minimal perl readline selinux ssl static tcpd big-tables" -RESTRICT="primaryuri" - -DEPEND="readline? ( >=sys-libs/readline-4.1 ) - bdb? ( sys-apps/ed ) - tcpd? ( >=sys-apps/tcp-wrappers-7.6-r6 ) - ssl? ( >=dev-libs/openssl-0.9.6d ) - perl? ( dev-lang/perl ) - >=sys-libs/zlib-1.2.3 - >=sys-apps/texinfo-4.7-r1 - sys-process/procps - >=sys-apps/sed-4" -RDEPEND="${DEPEND} - selinux? ( sec-policy/selinux-mysql )" -# dev-perl/DBD-mysql is needed by some scripts installed by MySQL -PDEPEND="perl? ( dev-perl/DBD-mysql )" - -mysql_get_datadir() { - 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}'` - #DATADIR=`my_print_defaults mysqld | grep -- '^--datadir' | tail -n1 | sed -e 's|^--datadir=||'` - DATADIR=`my_print_defaults mysqld 2>/dev/null | sed -ne '/datadir/s|^--datadir=||p' | tail -n1` - fi - if [ -z "${DATADIR}" ]; then - DATADIR="/var/lib/mysql/" - einfo "Using default DATADIR" - fi - einfo "MySQL DATADIR is ${DATADIR}" - export DATADIR -} - -mysql_upgrade_warning() { - ewarn - ewarn "If you're upgrading from MySQL-3.x to 4.0, or 4.0.x to 4.1.x, you" - ewarn "must recompile the other packages on your system that link with" - ewarn "libmysqlclient after the upgrade completes. To obtain such a list" - ewarn "of packages for your system, you may use 'revdep-rebuild' from" - ewarn "app-portage/gentoolkit." - ewarn - epause 5 -} - -pkg_setup() { - mysql_upgrade_warning - mysql_get_datadir -} - -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 - - mv "${WORKDIR}/${NEWP}" "${S}" - cd "${S}" - - #zap startup script messages - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.23-install-db-sh.diff || die - #zap binary distribution stuff - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.18-mysqld-safe-sh.diff || die - #required for qmail-mysql - EPATCH_OPTS="-p0 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0-nisam.h.diff || die - #for correct hardcoded sysconf directory - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0-my-print-defaults.diff || die - # NPTL support - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.18-gentoo-nptl.diff || die - # Merged upstream as of 4.0.24 - # bad tmpfiles in mysqlaccess, see bug 77805 - #EPATCH_OPTS="-p1 -d ${S}" \ - #epatch ${FILESDIR}/mysql-accesstmp.patch - - # fixed in 4.0.25 - #EPATCH_OPTS="-p1 -d ${S}" \ - #epatch ${FILESDIR}/${PN}-4.0.24-manual.texi.patch || die - - # 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.21-thrssl.patch || die - - # PIC fixes - # bug #42968 - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.25-r1-asm-pic-fixes.patch || die - - if use tcpd; then - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.14-r1-tcpd-vars-fix.diff || die - fi - - for d in ${S} ${S}/innobase; do - cd ${d} - # WARNING, plain autoconf breaks it! - #autoconf - # must use this instead - WANT_AUTOCONF=2.59 autoreconf --force - # Fix the evil "libtool.m4 and ltmain.sh have a version mismatch!" - libtoolize --copy --force - # Saving this for a rainy day, in case we need it again - #WANT_AUTOMAKE=1.7 automake - gnuconfig_update - done - - # upstream bug http://bugs.mysql.com/bug.php?id=7971 - # names conflict with stuff in 2.6.10 kernel headers - echo ${S}/client/mysqltest.c ${S}/extra/replace.c | xargs -n1 \ - sed -i \ - -e "s/\<set_bit\>/my__set_bit/g" \ - -e "s/\<clear_bit\>/my__clear_bit/g" \ - || die "Failed to fix bitops" -} - -src_compile() { - local myconf - - # 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`" - - use ssl \ - && myconf="${myconf} --with-vio --with-openssl" \ - || myconf="${myconf} --without-openssl" - - myconf="${myconf} `use_with debug` `use_with big-tables`" - - # benchmarking stuff needs perl - # and shouldn't be bothered with on minimal builds - if useq perl && ! useq minimal; then - myconf="${myconf} --with-bench" - else - myconf="${myconf} --without-bench" - fi - - # these are things we exclude from a minimal build - # note that the server actually does get built and installed - # but we then delete it before packaging. - local minimal_exclude_list="server embedded-server extra-tools innodb raid" - if ! useq minimal; then - for i in ${minimal_exclude_list}; do - myconf="${myconf} --with-${i}" - done - - # lots of chars - myconf="${myconf} --with-extra-charsets=all" - - #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 - # it boils down to non-64 bit safety. - if useq sparc || useq alpha || useq hppa || useq mips || useq amd64 - then - myconf="${myconf} --without-berkeley-db" - else - use berkdb \ - && myconf="${myconf} --with-berkeley-db=./bdb" \ - || myconf="${myconf} --without-berkeley-db" - fi - - else - for i in ${minimal_exclude_list}; do - myconf="${myconf} --without-${i}" - done - myconf="${myconf} --without-berkeley-db" - myconf="${myconf} --with-extra-charsets=none" - fi - - # documentation - myconf="${myconf} `use_with doc docs`" - - # glibc-2.3.2_pre fix; bug #16496 - append-flags "-DHAVE_ERRNO_AS_DEFINE=1" - - #bug fix for #15099, should make this api backward compatible - append-flags "-DUSE_OLD_FUNCTIONS" - - #the compiler flags are as per their "official" spec ;) - #CFLAGS="${CFLAGS/-O?/} -O3" \ - export CXXFLAGS="${CXXFLAGS} -felide-constructors -fno-exceptions -fno-rtti" - - econf \ - -C \ - --libexecdir=/usr/sbin \ - --sysconfdir=/etc/mysql \ - --localstatedir=/var/lib/mysql \ - --with-low-memory \ - --enable-assembler \ - --with-charset=latin1 \ - --enable-local-infile \ - --with-mysqld-user=mysql \ - --with-client-ldflags=-lstdc++ \ - --enable-thread-safe-client \ - --with-comment="Gentoo Linux ${PF}" \ - --with-unix-socket-path=/var/run/mysqld/mysqld.sock \ - ${myconf} || die "bad ./configure" - - emake || die "compile problem" -} - -src_install() { - make install DESTDIR="${D}" benchdir_root="/usr/share/mysql" || die - - diropts "-m0750" - dodir "${DATADIR}" /var/log/mysql - - diropts "-m0755" - dodir /var/run/mysqld - - keepdir "${DATADIR}" /var/run/mysqld /var/log/mysql - chown -R mysql:mysql ${D}/var/lib/mysql \ - ${D}/var/run/mysqld \ - ${D}/var/log/mysql - - # move client libs, install a couple of missing headers - local lib=$(get_libdir) - 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/bin/make*distribution - rm -f ${D}/usr/share/mysql/make_*_distribution - rm -f ${D}/usr/share/mysql/mysql.server - rm -f ${D}/usr/share/mysql/binary-configure - 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/{mysqlhotcopy,mysql_find_rows,mysql_convert_table_format,mysqld_multi,mysqlaccess,mysql_fix_extensions,mysqldumpslow,mysql_zap,mysql_explain_log,mysql_tableinfo,mysql_setpermission} - rm -f ${D}/usr/bin/mysqlhotcopy - rm -rf ${D}/usr/share/mysql/sql-bench - fi - - # clean up stuff for a minimal build - # this is anything server-specific - if useq minimal; then - rm -rf ${D}/usr/share/mysql/{mysql-test,sql-bench} - rm -f ${D}/usr/bin/{mysql_install_db,mysqlmanager*,mysql_secure_installation,mysql_fix_privilege_tables,mysqlhotcopy,mysql_convert_table_format,mysqld_multi,mysql_fix_extensions,mysql_zap,mysql_explain_log,mysql_tableinfo,mysqld_safe,myisam*,isam*,mysql_install,mysql_waitpid,mysqlbinlog,mysqltest,pack_isam} - rm -f ${D}/usr/sbin/mysqld - rm -f ${D}/usr/lib/mysql/lib{heap,merge,nisam,mysys,mystrings,mysqld,myisammrg,vio,dbug,myisam}.a - fi - - # config stuff - insinto /etc/mysql - doins scripts/mysqlaccess.conf - newins ${FILESDIR}/my.cnf-4.0.24-r1 my.cnf - - # minimal builds don't have the server - if ! useq minimal; then - exeinto /etc/init.d - newexe "${FILESDIR}/mysql-4.0.24-r2.rc6" mysql - insinto /etc/logrotate.d - newins "${FILESDIR}/logrotate.mysql" mysql - fi - - # docs - dodoc README COPYING ChangeLog EXCEPTIONS-CLIENT INSTALL-SOURCE - # minimal builds don't have the server - if useq doc && ! useq minimal; then - dohtml Docs/*.html - dodoc Docs/manual.{txt,ps} - docinto conf-samples - dodoc support-files/my-*.cnf - fi - -} - -src_test() { - cd ${S} - einfo ">>> Test phase [check]: ${CATEGORY}/${PF}" - make check || die "make check failed" - if ! useq minimal; then - local retstatus - einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" - addpredict /this-dir-does-not-exist/t9.MYI - make test - retstatus=$? - - # to be sure ;) - pkill -9 -f ${S}/ndb/src/kernel/ndbd 2>/dev/null - pkill -9 -f ${S}/ndb/src/mgmsrv/ndb_mgmd 2>/dev/null - pkill -9 -f ${S}/ndb/src/mgmclient/ndb_mgm 2>/dev/null - pkill -9 -f ${S}/sql/mysqld 2>/dev/null - [[ $retstatus == 0 ]] || die "make test failed" - - else - einfo "Skipping server tests due to minimal build." - fi -} - -pkg_config() { - mysql_get_datadir - - if built_with_use dev-db/mysql minimal; then - die "Minimal builds do NOT include the MySQL server" - fi - - if [[ "$(pgrep mysqld)" != "" ]] ; then - die "Oops you already have a mysql daemon running!" - fi - - local pwd1="a" - local pwd2="b" - local maxtry=5 - - if [[ -d "${DATADIR}/mysql" ]] ; then - ewarn "You have already a MySQL database in place." - ewarn "Please rename it or delete it if you wish to replace it." - die "MySQL database already exists!" - fi - - einfo "Creating the mysql database and setting proper" - einfo "permissions on it..." - - einfo "Insert a password for the mysql 'root' user" - ewarn "the password will be visible on the screen" - - echo -n " >" && read -r pwd1 - einfo "Repeat the password" - echo -n " >" && read -r pwd2 - - if (( "x$pwd1" != "x$pwd2" )) ; then - die "Passwords are not the same" - fi - - ${ROOT}/usr/bin/mysql_install_db || die "MySQL databases not installed" - - # MySQL 5.0 don't ned this - chown -R mysql:mysql ${DATADIR} - chmod 0750 ${ROOT}/${DATADIR} - - # now we can set the password - local socket=${ROOT}/var/run/mysqld/mysqld.sock - local mysqld="${ROOT}/usr/sbin/mysqld \ - --skip-grant-tables \ - --basedir=${ROOT}/usr \ - --datadir=${ROOT}/var/lib/mysql \ - --skip-innodb \ - --skip-bdb \ - --max_allowed_packet=8M \ - --net_buffer_length=16K \ - --socket=${socket} \ - --pid-file=${ROOT}/var/run/mysqld/mysqld.pid" - - $mysqld & - - while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] - do - maxtry=$(($maxtry-1)) - echo -n "." - sleep 1 - done - - # do this from memory we don't want clear text password in temp files - local sql="UPDATE mysql.user SET Password = PASSWORD('${pwd1}') WHERE USER='root'" - ${ROOT}/usr/bin/mysql \ - --socket=${socket} \ - -hlocalhost \ - -e "${sql}" - local retstatus=$? - - kill $( cat ${ROOT}/var/run/mysqld/mysqld.pid ) - - [[ $retstatus == 0 ]] || die "Failed to communicate with MySQL server" - - einfo "done" -} - -pkg_preinst() { - enewgroup mysql 60 || die "problem adding group mysql" - enewuser mysql 60 /bin/false /var/lib/mysql mysql \ - || die "problem adding user mysql" -} - -pkg_postinst() { - mysql_get_datadir - - if ! useq minimal; then - #empty dirs... - [ -d "${ROOT}/${DATADIR}" ] || install -d -m0750 -o mysql -g mysql ${ROOT}/var/lib/mysql - [ -d "${ROOT}/var/run/mysqld" ] || install -d -m0755 -o mysql -g mysql ${ROOT}/var/run/mysqld - [ -d "${ROOT}/var/log/mysql" ] || 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* - chmod 0660 ${ROOT}/var/log/mysql/mysql* - # secure some directories - chmod 0750 ${ROOT}/var/log/mysql ${ROOT}/${DATADIR} - - # 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 - fi - - mysql_upgrade_warning - einfo "InnoDB is not optional as of MySQL-4.0.24, at the request of upstream." -} diff --git a/dev-db/mysql/mysql-4.1.8-r1.ebuild b/dev-db/mysql/mysql-4.1.8-r1.ebuild deleted file mode 100644 index 3c1c0871f099..000000000000 --- a/dev-db/mysql/mysql-4.1.8-r1.ebuild +++ /dev/null @@ -1,289 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-4.1.8-r1.ebuild,v 1.15 2005/07/26 17:14:23 vivo Exp $ - -inherit eutils gnuconfig -#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" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86 ~sparc ~ia64 ~ppc" -IUSE="static readline innodb berkdb tcpd ssl perl ruby selinux debug cluster" - -DEPEND=" - !<dev-db/mysql-4.1 - bdb? ( sys-apps/ed ) - 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.2.3 - sys-process/procps - >=sys-apps/texinfo-4.7 - >=sys-apps/sed-4" -PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 ) - ruby? ( >=dev-ruby/mysql-ruby-2.5 )" -RDEPEND="${DEPEND} selinux? ( sec-policy/selinux-mysql )" - -warning() { - ewarn - ewarn "If you're upgrading from MySQL-3.x to 4.0, or 4.0.x to 4.1.x, you" - ewarn "must recompile the other packages on your system that link with" - ewarn "libmysqlclient after the upgrade completes. To obtain such a list" - ewarn "of packages for your system, you may use 'revdep-rebuild' from" - ewarn "app-portage/gentoolkit." - ewarn - ewarn "TODO: you must also follow the official upgrade instructions (research and write this up here)" - epause 5 -} - -pkg_setup() { - warning - use innodb || ewarn "InnoDB support is not selected to be compiled in." -} - -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.23-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 - # NPTL support - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.18-gentoo-nptl.diff - # bad tmpfiles in mysqlaccess, see bug 77805 - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/mysql-accesstmp.patch - - # 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.21-thrssl.patch - - if use tcpd; then - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.14-r1-tcpd-vars-fix.diff - fi - - cd ${S} - autoconf - # this does the libtoolize stuff - libtoolize --copy --force - # Saving this for a rainy day, in case we need it again - #WANT_AUTOMAKE=1.7 automake - gnuconfig_update - - # upstream bug http://bugs.mysql.com/bug.php?id=7971 - # names conflict with stuff in 2.6.10 kernel headers - echo ${S}/client/mysqltest.c ${S}/extra/replace.c | xargs -n1 \ - sed -i \ - -e "s/set_bit/my__set_bit/g" \ - -e "s/clear_bit/my__clear_bit/g" \ - || die "Failed to fix bitops" -} - -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 alpha || use hppa || use mips - 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`" - - # MySQL CLuster UseFlag - if use cluster; then - myconf="${myconf} --with-ndbcluster" - fi - - #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/$(get_libdir)/mysql/libmysqlclient*.so* ${D}/usr/$(get_libdir) - dosym ../libmysqlclient.so /usr/$(get_libdir)/mysql/libmysqlclient.so - dosym ../libmysqlclient_r.so /usr/$(get_libdir)/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 - - insinto /etc/logrotate.d - newins ${FILESDIR}/logrotate.mysql mysql -} - -pkg_config() { - 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}'` - #DATADIR=`my_print_defaults mysqld | grep -- '^--datadir' | tail -n1 | sed -e 's|^--datadir=||'` - DATADIR=`my_print_defaults mysqld | sed -ne '/datadir/s|^--datadir=||p' | tail -n1` - fi - if [ -z "${DATADIR}" ]; then - DATADIR="/var/lib/mysql/" - einfo "Using default DATADIR" - fi - einfo "MySQL DATADIR is ${DATADIR}" - - if [ ! -d ${ROOT}/${DATADIR}/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 - chown -R mysql:mysql ${ROOT}/${DATADIR} - chmod 0750 ${ROOT}/${DATADIR} - ewarn "For security reasons you should set your MySQL root" - ewarn "password as soon as possible." - - 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() { - enewgroup mysql 60 || die "problem adding group mysql" - enewuser mysql 60 /bin/false /var/lib/mysql mysql || die "problem adding user mysql" -} - -pkg_postinst() { - #empty dirs... - install -d -m0750 -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* - chmod 0660 ${ROOT}/var/log/mysql/mysql* - # secure some directories - chmod 0750 ${ROOT}/var/log/mysql ${ROOT}/var/lib/mysql - - #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 - use innodb || ewarn "InnoDB support is not selected to be compiled in." -} diff --git a/dev-db/mysql/mysql-4.1.8.ebuild b/dev-db/mysql/mysql-4.1.8.ebuild deleted file mode 100644 index 5ce167843329..000000000000 --- a/dev-db/mysql/mysql-4.1.8.ebuild +++ /dev/null @@ -1,286 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-4.1.8.ebuild,v 1.14 2005/07/26 17:14:23 vivo Exp $ - -inherit eutils gnuconfig -#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" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="static readline innodb berkdb tcpd ssl perl ruby selinux debug cluster" - -DEPEND=" - !<dev-db/mysql-4.1 - bdb? ( sys-apps/ed ) - 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.2.3 - sys-process/procps - >=sys-apps/texinfo-4.7 - >=sys-apps/sed-4" -PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 ) - ruby? ( >=dev-ruby/mysql-ruby-2.5 )" -RDEPEND="${DEPEND} selinux? ( sec-policy/selinux-mysql )" - -warning() { - ewarn - ewarn "If you're upgrading from MySQL-3.x to 4.0, or 4.0.x to 4.1.x, you" - ewarn "must recompile the other packages on your system that link with" - ewarn "libmysqlclient after the upgrade completes. To obtain such a list" - ewarn "of packages for your system, you may use 'revdep-rebuild' from" - ewarn "app-portage/gentoolkit." - ewarn - ewarn "TODO: you must also follow the official upgrade instructions (research and write this up here)" - epause 5 -} - -pkg_setup() { - use innodb || ewarn "InnoDB support is not selected to be compiled in." - 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_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.23-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 - # NPTL support - 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.21-thrssl.patch - - if use tcpd; then - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.14-r1-tcpd-vars-fix.diff - fi - - cd ${S} - autoconf - # this does the libtoolize stuff - libtoolize --copy --force - # Saving this for a rainy day, in case we need it again - #WANT_AUTOMAKE=1.7 automake - gnuconfig_update - - # upstream bug http://bugs.mysql.com/bug.php?id=7971 - # names conflict with stuff in 2.6.10 kernel headers - echo ${S}/client/mysqltest.c ${S}/extra/replace.c | xargs -n1 \ - sed -i \ - -e "s/set_bit/my__set_bit/g" \ - -e "s/clear_bit/my__clear_bit/g" \ - || die "Failed to fix bitops" -} - -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 alpha || use hppa || use mips - 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`" - - # MySQL CLuster UseFlag - if use cluster; then - myconf="${myconf} --with-ndbcluster" - fi - - #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/$(get_libdir)/mysql/libmysqlclient*.so* ${D}/usr/$(get_libdir) - dosym ../libmysqlclient.so /usr/$(get_libdir)/mysql/libmysqlclient.so - dosym ../libmysqlclient_r.so /usr/$(get_libdir)/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 - - insinto /etc/logrotate.d - newins ${FILESDIR}/logrotate.mysql mysql -} - -pkg_config() { - 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}'` - #DATADIR=`my_print_defaults mysqld | grep -- '^--datadir' | tail -n1 | sed -e 's|^--datadir=||'` - DATADIR=`my_print_defaults mysqld | sed -ne '/datadir/s|^--datadir=||p' | tail -n1` - fi - if [ -z "${DATADIR}" ]; then - DATADIR="/var/lib/mysql/" - einfo "Using default DATADIR" - fi - einfo "MySQL DATADIR is ${DATADIR}" - - if [ ! -d ${ROOT}/${DATADIR}/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 - chown -R mysql:mysql ${ROOT}/${DATADIR} - chmod 0750 ${ROOT}/${DATADIR} - ewarn "For security reasons you should set your MySQL root" - ewarn "password as soon as possible." - - 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() { - enewgroup mysql 60 || die "problem adding group mysql" - enewuser mysql 60 /bin/false /var/lib/mysql mysql || die "problem adding user mysql" -} - -pkg_postinst() { - #empty dirs... - install -d -m0750 -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* - chmod 0660 ${ROOT}/var/log/mysql/mysql* - # secure some directories - chmod 0750 ${ROOT}/var/log/mysql ${ROOT}/var/lib/mysql - - #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 - use innodb || ewarn "InnoDB support is not selected to be compiled in." -} |