summaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2004-05-18 03:57:35 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2004-05-18 03:57:35 +0000
commit6ac92b09e453c4cd37580b6cf78de8cbc0f3390a (patch)
treeae220def60ef34656ffdd5cf24ce8bf9350556ea /dev-db
parentmove to stable (diff)
downloadgentoo-2-6ac92b09e453c4cd37580b6cf78de8cbc0f3390a.tar.gz
gentoo-2-6ac92b09e453c4cd37580b6cf78de8cbc0f3390a.tar.bz2
gentoo-2-6ac92b09e453c4cd37580b6cf78de8cbc0f3390a.zip
bug #46242, fix a security hole in mysqld_multi. ansl new 4.0.19.
Diffstat (limited to 'dev-db')
-rw-r--r--dev-db/mysql/ChangeLog8
-rw-r--r--dev-db/mysql/Manifest103
-rw-r--r--dev-db/mysql/files/digest-mysql-4.0.18-r21
-rw-r--r--dev-db/mysql/files/digest-mysql-4.0.191
-rw-r--r--dev-db/mysql/files/mysql-4.0.18-mysqldmultisecurity.diff135
-rw-r--r--dev-db/mysql/mysql-4.0.18-r2.ebuild268
-rw-r--r--dev-db/mysql/mysql-4.0.19.ebuild268
7 files changed, 734 insertions, 50 deletions
diff --git a/dev-db/mysql/ChangeLog b/dev-db/mysql/ChangeLog
index bf5dffb061be..2efb2a2ef612 100644
--- a/dev-db/mysql/ChangeLog
+++ b/dev-db/mysql/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-db/mysql
# Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/ChangeLog,v 1.101 2004/04/29 16:38:50 gmsoft Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/ChangeLog,v 1.102 2004/05/18 03:57:35 robbat2 Exp $
+
+*mysql-4.0.18-r2 (17 May 2004)
+
+ 17 May 2004; Robin H. Johnson <robbat2@gentoo.org> mysql-4.0.18-r2.ebuild,
+ mysql-4.0.19.ebuild, files/mysql-4.0.18-mysqldmultisecurity.diff:
+ bug #46242, fix a security hole in mysqld_multi. ansl new 4.0.19.
29 Apr 2004; Guy Martin <gmsoft@gentoo.org> mysql-4.0.18-r1.ebuild:
Marked stable on hppa.
diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 546bde3c6d8e..7a0906ac2c66 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,64 +1,69 @@
-MD5 ef56fb9a6b64bd16ccad447f673ca976 ChangeLog 15860
+MD5 c7d67044cad0e036a83f79596f5c6526 mysql-3.23.57-r1.ebuild 6504
+MD5 20589224843fda9db753936afb5dd90e mysql-3.23.56.ebuild 6550
+MD5 1035bee6d9ecc6312e0fb6e62d0ef3db mysql-4.0.18-r2.ebuild 8214
+MD5 12145c2a6f06a0ffa39f27d9ea70987e mysql-4.0.14-r2.ebuild 7579
+MD5 3ccae3c0d46f5d9b4eb2f02f74077850 mysql-4.0.17.ebuild 7975
+MD5 ea0bc1b42a597084cd069263096a0250 mysql-4.0.12.ebuild 6770
+MD5 44e8da816a7d534ceaf927c9c8adcd83 mysql-4.0.15-r1.ebuild 7703
+MD5 be7a67fc3287a6db83d03b8810eb6d7c mysql-4.0.19.ebuild 8218
+MD5 a1551b114ca8102c0f474a5ae3221a97 mysql-4.0.14.ebuild 6928
+MD5 0183d8fbfebd84aeb58c02d5cb031398 mysql-3.23.52-r1.ebuild 5875
+MD5 1bd8dddf8a81846f10eb980ac81806c8 mysql-4.0.18-r1.ebuild 8126
+MD5 105f57237e3955c8586abb6a85449cf5 mysql-4.0.14-r1.ebuild 7426
+MD5 7745aa8cc1c4315fae3dcfda8666d991 mysql-4.0.16.ebuild 7527
+MD5 55142838e5b6fb68f824f5d63d21b778 mysql-4.0.13-r4.ebuild 7302
+MD5 add9c33a51c497251ffe7118b34dcedb mysql-3.23.57.ebuild 6553
+MD5 cf0eac0ad20de2137703bf2743992fb9 mysql-4.0.18.ebuild 7955
+MD5 ca238fec1372bed4473365f630ee5837 ChangeLog 15859
+MD5 e6187f7a00dde20ed5810b5cfd7c58e0 mysql-4.0.15.ebuild 7585
MD5 a5dda17df0286cd82cae42d117784903 metadata.xml 163
-MD5 c8b57d37000785a37441b27fefd03c35 mysql-3.23.52-r1.ebuild 5876
-MD5 96dc01f2dcf5a185e20eb506f667f672 mysql-3.23.56.ebuild 6551
-MD5 8079964d9acdf2c6191b3dc97821782f mysql-3.23.57-r1.ebuild 6505
-MD5 d4a47cc8cc0eaff83ce7009a7f01c802 mysql-3.23.57.ebuild 6554
-MD5 62e072297ed9ed5ba7476e637c58ce5e mysql-4.0.12.ebuild 6771
-MD5 ee2927c4f06baad97e864f15d27c8d6f mysql-4.0.13-r4.ebuild 7303
-MD5 462a3fb9a9b4e68e9325d0c297cefaf7 mysql-4.0.14-r1.ebuild 7427
-MD5 37a32ed621f46d123ace64ce406e9b5d mysql-4.0.14-r2.ebuild 7580
-MD5 9d6dd8be0b427c6b1aa9837f48317e8d mysql-4.0.14.ebuild 6929
-MD5 bceb9095986ccbb43ed062edeaa17e38 mysql-4.0.15-r1.ebuild 7704
-MD5 03a12ed95cc30f9ec11848510c036237 mysql-4.0.15.ebuild 7586
-MD5 2c115b20f3b17de258d922df05e3a86e mysql-4.0.16.ebuild 7528
-MD5 8c7cf77eb35886c3d9777698f6b00a13 mysql-4.0.17.ebuild 7976
-MD5 cf809c08d66970a745be490ef022fe96 mysql-4.0.18.ebuild 7956
-MD5 7a7729d302b709d2ee72a402245100b6 mysql-4.0.18-r1.ebuild 8127
+MD5 4541e130a1b0fa90db8612973b0adb75 files/mysql-4.0-mysqld-safe-sh.diff 1477
+MD5 36aa23522b241aafdb833ac4f11c4fd1 files/mysql-4.0.4-install-db-sh.diff 1439
+MD5 085dcaeb7d0d1f0e610e401fce6ed593 files/mysql-4.0.rc6 939
+MD5 1d33254617bd61fd5de350a286cf4fdc files/mysql-4.0.15.rc6 952
MD5 015a823e06d7181373b0601e4a17c284 files/digest-mysql-3.23.52-r1 67
-MD5 296a01da527263926d20aca0446bc87d files/digest-mysql-3.23.56 67
-MD5 dcd899fe185459da4cb9e71c75c3bda3 files/digest-mysql-3.23.57 67
MD5 dcd899fe185459da4cb9e71c75c3bda3 files/digest-mysql-3.23.57-r1 67
+MD5 8eaeb1372c41d2fef1622dd707a7a9d0 files/mysql-3.23-nisam.h.diff 452
+MD5 d3830060b3f74d6c0916ed85a6bbf02d files/mysql-3.23-install-db-sh.diff 1368
+MD5 58c4d09c5c2712254b1881a6fcc7abff files/mysql-4.0.18-gentoo-nptl.diff 587
+MD5 7d92ba9c74a73bf3c852a5c078c16d29 files/rebuilder.sh 1557
MD5 a77a12a8e251ca0d82d3027b7b50c762 files/digest-mysql-4.0.12 1371
-MD5 0d15b78f60dc9d26e02923e591d39ea7 files/digest-mysql-4.0.13-r4 66
MD5 33666c6c9542fe3ef02379877f0c6bac files/digest-mysql-4.0.14 66
-MD5 33666c6c9542fe3ef02379877f0c6bac files/digest-mysql-4.0.14-r1 66
-MD5 33666c6c9542fe3ef02379877f0c6bac files/digest-mysql-4.0.14-r2 66
MD5 68e456716a2026e49c85766696180bfc files/digest-mysql-4.0.15 66
-MD5 68e456716a2026e49c85766696180bfc files/digest-mysql-4.0.15-r1 66
MD5 b3d105fcbd2750964387bfcc010c145e files/digest-mysql-4.0.16 66
MD5 02c1c39a55937905f61ff17dcdb2ec0a files/digest-mysql-4.0.17 66
-MD5 47c66444b6a1e2243eadf931d52d34b2 files/my.cnf 1229
-MD5 75e99b8e628e380551260d64553a9a10 files/my.cnf-4.0.14-r1 2813
-MD5 57531ccd19e17ccca95e0e3bf833cd67 files/mysql-3.23-db-3.2.3.diff 1105
-MD5 d3830060b3f74d6c0916ed85a6bbf02d files/mysql-3.23-install-db-sh.diff 1368
-MD5 7a5badec9c28c2f4d434d6aed0a5103b files/mysql-3.23-my-print-defaults.diff 218
-MD5 8eaeb1372c41d2fef1622dd707a7a9d0 files/mysql-3.23-nisam.h.diff 452
-MD5 8d51cbf3afa8349839380aa0986704c0 files/mysql-3.23-safe-mysqld-sh.diff 1557
-MD5 f49e58771365cb075ece153403811872 files/mysql-3.23.51-tcpd.patch 601
-MD5 50629599f478b26b4ca82c7c553feae0 files/mysql-3.23.52-install-db-sh.diff 1366
+MD5 748cfc1902ce23fac508e803ed6907ee files/digest-mysql-4.0.18 66
+MD5 b776101113ddfd5cda3cdc0ccf2f08c1 files/digest-mysql-4.0.19 66
MD5 ee578e3021841ef9dba4175403564136 files/mysql-4.0-db-3.2.1.diff 1047
-MD5 e68c5d7e3c48028c4cf7e55ea8396013 files/mysql-4.0-install-db-sh.diff 1271
-MD5 d1e79f7a155e45c69558f083fcb1139d files/mysql-4.0-my-print-defaults.diff 240
-MD5 4541e130a1b0fa90db8612973b0adb75 files/mysql-4.0-mysqld-safe-sh.diff 1477
-MD5 ff80a5d8d87212046e89f2f8ae779af4 files/mysql-4.0-nisam.h.diff 452
-MD5 152b9a8feef16df47b56c316c5c0601e files/mysql-4.0.13-thrssl.patch 813
-MD5 f635289f8422fdf26ba3c3dbdf99c4e2 files/mysql-4.0.14-mysqld-safe-sh.diff 1503
-MD5 977be6c68f6231cbcf1febd3305ade5d files/mysql-4.0.14-r1-tcpd-vars-fix.diff 465
-MD5 e501d0f33d9d0be73b37c310099011d2 files/mysql-4.0.14-security-28394.patch 654
-MD5 1dcc6094ef0f068e7289ddd351e27024 files/mysql-4.0.15.rc6 953
MD5 f2905bbcc3f148a2ad689792917bd78d files/mysql-4.0.16-install-db-sh.diff 1429
+MD5 ff80a5d8d87212046e89f2f8ae779af4 files/mysql-4.0-nisam.h.diff 452
+MD5 8874c2bd25093fe5b8f57ce014e4a3be files/mysql.init 892
+MD5 d20c23adca5b8731ebfab4d1b5771dab files/mysql-4.0.18-mysqld-safe-sh.diff 1307
MD5 fc80f877fa97f0f3a52ee684ce7f54b2 files/mysql-4.0.16-mysqld-safe-sh.diff 1562
-MD5 9b5ad94f6e99e65bc3373c9dd15dff08 files/mysql-4.0.17-thrssl.patch 637
-MD5 36aa23522b241aafdb833ac4f11c4fd1 files/mysql-4.0.4-install-db-sh.diff 1439
-MD5 a45105d9d4ec0baca32ac9cca0350f17 files/mysql-4.0.rc6 940
+MD5 f635289f8422fdf26ba3c3dbdf99c4e2 files/mysql-4.0.14-mysqld-safe-sh.diff 1503
MD5 6f8de46485ea7dcf886e1747fb117427 files/mysql-gentoo-nptl.diff 654
-MD5 b959fc15281a858c87b587033a432334 files/mysql.init 893
-MD5 7d92ba9c74a73bf3c852a5c078c16d29 files/rebuilder.sh 1557
-MD5 748cfc1902ce23fac508e803ed6907ee files/digest-mysql-4.0.18 66
-MD5 58c4d09c5c2712254b1881a6fcc7abff files/mysql-4.0.18-gentoo-nptl.diff 587
+MD5 e68c5d7e3c48028c4cf7e55ea8396013 files/mysql-4.0-install-db-sh.diff 1271
+MD5 e501d0f33d9d0be73b37c310099011d2 files/mysql-4.0.14-security-28394.patch 654
MD5 68cbaa353f522c0a404a4d07693f917d files/mysql-4.0.18-install-db-sh.diff 1473
-MD5 d20c23adca5b8731ebfab4d1b5771dab files/mysql-4.0.18-mysqld-safe-sh.diff 1307
+MD5 cfe027a0b863abadb46f75e4cf840c28 files/my.cnf 1228
+MD5 50629599f478b26b4ca82c7c553feae0 files/mysql-3.23.52-install-db-sh.diff 1366
+MD5 d1e79f7a155e45c69558f083fcb1139d files/mysql-4.0-my-print-defaults.diff 240
+MD5 f49e58771365cb075ece153403811872 files/mysql-3.23.51-tcpd.patch 601
MD5 f599e8b3eb4636bb61721525dc15f5f5 files/mysql-4.0.18-thrssl.patch 723
-MD5 748cfc1902ce23fac508e803ed6907ee files/digest-mysql-4.0.18-r1 66
+MD5 8d51cbf3afa8349839380aa0986704c0 files/mysql-3.23-safe-mysqld-sh.diff 1557
+MD5 7a5badec9c28c2f4d434d6aed0a5103b files/mysql-3.23-my-print-defaults.diff 218
MD5 a76ec36b83c2f0dbfba65c993f75d135 files/mysql-4.0.18-mysqlbugsecurity.diff 672
+MD5 296a01da527263926d20aca0446bc87d files/digest-mysql-3.23.56 67
+MD5 dcd899fe185459da4cb9e71c75c3bda3 files/digest-mysql-3.23.57 67
+MD5 977be6c68f6231cbcf1febd3305ade5d files/mysql-4.0.14-r1-tcpd-vars-fix.diff 465
+MD5 57531ccd19e17ccca95e0e3bf833cd67 files/mysql-3.23-db-3.2.3.diff 1105
+MD5 4c36e60ff941b21103df0acf1e6985b7 files/my.cnf-4.0.14-r1 2812
+MD5 9b5ad94f6e99e65bc3373c9dd15dff08 files/mysql-4.0.17-thrssl.patch 637
+MD5 0d15b78f60dc9d26e02923e591d39ea7 files/digest-mysql-4.0.13-r4 66
+MD5 33666c6c9542fe3ef02379877f0c6bac files/digest-mysql-4.0.14-r1 66
+MD5 33666c6c9542fe3ef02379877f0c6bac files/digest-mysql-4.0.14-r2 66
+MD5 68e456716a2026e49c85766696180bfc files/digest-mysql-4.0.15-r1 66
+MD5 748cfc1902ce23fac508e803ed6907ee files/digest-mysql-4.0.18-r1 66
+MD5 748cfc1902ce23fac508e803ed6907ee files/digest-mysql-4.0.18-r2 66
+MD5 152b9a8feef16df47b56c316c5c0601e files/mysql-4.0.13-thrssl.patch 813
+MD5 ad5636b398982a23f6fc58f18a2114fc files/mysql-4.0.18-mysqldmultisecurity.diff 3863
diff --git a/dev-db/mysql/files/digest-mysql-4.0.18-r2 b/dev-db/mysql/files/digest-mysql-4.0.18-r2
new file mode 100644
index 000000000000..4cb0175f1633
--- /dev/null
+++ b/dev-db/mysql/files/digest-mysql-4.0.18-r2
@@ -0,0 +1 @@
+MD5 702151a3e21d9e5f32e8850032aefdad mysql-4.0.18.tar.gz 13422686
diff --git a/dev-db/mysql/files/digest-mysql-4.0.19 b/dev-db/mysql/files/digest-mysql-4.0.19
new file mode 100644
index 000000000000..0134b5bdce1d
--- /dev/null
+++ b/dev-db/mysql/files/digest-mysql-4.0.19
@@ -0,0 +1 @@
+MD5 d3c7f0e7a88ffdb52ba59cff73c79ed6 mysql-4.0.19.tar.gz 13802895
diff --git a/dev-db/mysql/files/mysql-4.0.18-mysqldmultisecurity.diff b/dev-db/mysql/files/mysql-4.0.18-mysqldmultisecurity.diff
new file mode 100644
index 000000000000..b35dabfc3792
--- /dev/null
+++ b/dev-db/mysql/files/mysql-4.0.18-mysqldmultisecurity.diff
@@ -0,0 +1,135 @@
+--- mysql-4.0.18/scripts/mysqld_multi.sh 2004-02-10 10:16:06.000000000 -0800
++++ mysql-4.0.19/scripts/mysqld_multi.sh 2004-05-03 14:10:44.000000000 -0700
+@@ -4,12 +4,12 @@
+ use POSIX qw(strftime);
+
+ $|=1;
+-$VER="2.5";
++$VER="2.7";
+
+ $opt_config_file = undef();
+ $opt_example = 0;
+ $opt_help = 0;
+-$opt_log = "/tmp/mysqld_multi.log";
++$opt_log = undef();
+ $opt_mysqladmin = "@bindir@/mysqladmin";
+ $opt_mysqld = "@libexecdir@/mysqld";
+ $opt_no_log = 0;
+@@ -18,6 +18,9 @@
+ $opt_user = "root";
+ $opt_version = 0;
+
++my $my_print_defaults_exists= 1;
++my $logdir= undef();
++
+ my ($mysqld, $mysqladmin, $groupids, $homedir, $my_progname);
+
+ $homedir = $ENV{HOME};
+@@ -42,16 +45,41 @@
+ print "Please make sure you have this command available and\n";
+ print "in your path. The command is available from the latest\n";
+ print "MySQL distribution.\n";
++ $my_print_defaults_exists= 0;
++ }
++ if ($my_print_defaults_exists)
++ {
++ foreach my $arg (@ARGV)
++ {
++ if ($arg =~ m/^--config-file=(.*)/)
++ {
++ if (!length($1))
++ {
++ die "Option config-file requires an argument\n";
++ }
++ elsif (!( -e $1 && -r $1))
++ {
++ die "Option file '$1' doesn't exists, or is not readable\n";
++ }
++ else
++ {
++ $opt_config_file= $1;
++ }
++ }
++ }
++ my $com= "my_print_defaults ";
++ $com.= "--config-file=$opt_config_file " if (defined($opt_config_file));
++ $com.= "mysqld_multi";
++ my @defops = `$com`;
++ chop @defops;
++ splice @ARGV, 0, 0, @defops;
+ }
+- my @defops = `my_print_defaults mysqld_multi`;
+- chop @defops;
+- splice @ARGV, 0, 0, @defops;
+ GetOptions("help","example","version","mysqld=s","mysqladmin=s",
+- "config-file=s","user=s","password=s","log=s","no-log","tcp-ip")
++ "config-file=s","user=s","password=s","log=s","no-log","tcp-ip")
+ || die "Wrong option! See $my_progname --help for detailed information!\n";
+
++ init_log();
+ $groupids = $ARGV[1];
+-
+ if ($opt_version)
+ {
+ print "$my_progname version $VER by Jani Tolonen\n";
+@@ -113,6 +141,45 @@
+ }
+
+ ####
++#### Init log file. Check for appropriate place for log file, in the following
++#### order my_print_defaults mysqld datadir, @datadir@, /var/log, /tmp
++####
++
++sub init_log
++{
++ if ($my_print_defaults_exists)
++ {
++ @mysqld_opts= `my_print_defaults mysqld`;
++ chomp @mysqld_opts;
++ foreach my $opt (@mysqld_opts)
++ {
++ if ($opt =~ m/^\-\-datadir[=](.*)/)
++ {
++ if (-d "$1" && -w "$1")
++ {
++ $logdir= $1;
++ }
++ }
++ }
++ }
++ if (!defined($logdir))
++ {
++ $logdir= "@datadir@" if (-d "@datadir@" && -w "@datadir@");
++ }
++ if (!defined($logdir))
++ {
++ # Log file was not specified and we could not log to a standard place,
++ # so log file be disabled for now.
++ print "WARNING: Log file disabled. Maybe directory/file isn't writable?\n";
++ $opt_no_log= 1;
++ }
++ else
++ {
++ $opt_log= "$logdir/mysqld_multi.log";
++ }
++}
++
++####
+ #### Report living and not running MySQL servers
+ ####
+
+@@ -589,12 +656,9 @@
+ list. Anything after a white space are ignored.
+
+ Options:
+---config-file=... Alternative config file. NOTE: This will not affect
+- this program's own options (group [mysqld_multi]),
+- but only groups [mysqld#]. Without this option everything
+- will be searched from the ordinary my.cnf file.
++--config-file=... Alternative config file.
+ Using: $opt_config_file
+---example Give an example of a config file. (PLEASE DO CHECK THIS!)
++--example Give an example of a config file.
+ --help Print this help and exit.
+ --log=... Log file. Full path to and the name for the log file. NOTE:
+ If the file exists, everything will be appended.
diff --git a/dev-db/mysql/mysql-4.0.18-r2.ebuild b/dev-db/mysql/mysql-4.0.18-r2.ebuild
new file mode 100644
index 000000000000..d37956aea81b
--- /dev/null
+++ b/dev-db/mysql/mysql-4.0.18-r2.ebuild
@@ -0,0 +1,268 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-4.0.18-r2.ebuild,v 1.1 2004/05/18 03:57:35 robbat2 Exp $
+
+inherit eutils
+#to accomodate -laadeedah releases
+NEWP=${P}
+
+SVER=${PV%.*}
+#normal releases:
+SDIR=MySQL-${SVER}
+#for a pre-release:
+#SDIR=MySQL-${SVER}-Pre
+
+S=${WORKDIR}/${NEWP}
+
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+HOMEPAGE="http://www.mysql.com/"
+SRC_URI="mirror://mysql/Downloads/${SDIR}/${NEWP}.tar.gz"
+RESTRICT="nomirror"
+
+KEYWORDS="~ia64 x86 sparc ~ppc amd64 hppa alpha ~mips s390"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="static readline innodb berkdb tcpd ssl perl debug"
+
+DEPEND="readline? ( >=sys-libs/readline-4.1 )
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6-r6 )
+ ssl? ( >=dev-libs/openssl-0.9.6d )
+ perl? ( dev-lang/perl )
+ >=sys-libs/zlib-1.1.3
+ sys-apps/procps
+ >=sys-apps/sed-4"
+PDEPEND="perl? ( dev-perl/DBI dev-perl/DBD-mysql )"
+
+warning() {
+ ewarn
+ ewarn "If you're upgrading from MySQL-3.x, you must recompile the other"
+ ewarn "packages on your system that link with libmysqlclient after the"
+ ewarn "upgrade completes. To obtain such a list of packages for your"
+ ewarn "system, you may use 'revdep-rebuild' from app-portage/gentoolkit."
+ ewarn
+ sleep 5
+}
+
+pkg_setup() {
+ warning
+
+ # MySQL on mips cannot link to berkdb due to issues.
+ if [ "`use mips`" ]; then
+ if [ "`use berkdb`" ]; then
+ echo -e ""
+ eerror "You cannot link MySQL into berkeley db on mips. Please remove the \"berkdb\""
+ eerror "flag from your USE settings and try again."
+ echo -e ""
+ fi
+ fi
+}
+
+src_unpack() {
+ if use static && use ssl; then
+ local msg="MySQL does not support building statically with SSL support"
+ eerror "${msg}"
+ die "${msg}"
+ fi
+ unpack ${A} || die
+
+ #zap startup script messages
+ EPATCH_OPTS="-p1 -d ${S}" \
+ epatch ${FILESDIR}/${PN}-4.0.18-install-db-sh.diff
+ #zap binary distribution stuff
+ EPATCH_OPTS="-p1 -d ${S}" \
+ epatch ${FILESDIR}/${PN}-4.0.18-mysqld-safe-sh.diff
+ #required for qmail-mysql
+ EPATCH_OPTS="-p0 -d ${S}" \
+ epatch ${FILESDIR}/${PN}-4.0-nisam.h.diff
+ #for correct hardcoded sysconf directory
+ EPATCH_OPTS="-p1 -d ${S}" \
+ epatch ${FILESDIR}/${PN}-4.0-my-print-defaults.diff
+ #
+ EPATCH_OPTS="-p1 -d ${S}" \
+ epatch ${FILESDIR}/${PN}-4.0.18-gentoo-nptl.diff
+
+ # attempt to get libmysqlclient_r linked against ssl if USE="ssl" enabled
+ # i would really prefer to fix this at the Makefile.am level, but can't
+ # get the software to autoreconf as distributed - too many missing files
+ EPATCH_OPTS="-p1 -d ${S}" \
+ epatch ${FILESDIR}/${PN}-4.0.18-thrssl.patch
+
+ # Security fix for bug #46242, upstream fix pending for 4.0.19
+ EPATCH_OPTS="-p1 -d ${S}" \
+ epatch ${FILESDIR}/${PN}-4.0.18-mysqlbugsecurity.diff
+ EPATCH_OPTS="-p1 -d ${S}" \
+ epatch ${FILESDIR}/${PN}-4.0.18-mysqldmultisecurity.diff
+
+ if use tcpd; then
+ EPATCH_OPTS="-p1 -d ${S}" \
+ epatch ${FILESDIR}/${PN}-4.0.14-r1-tcpd-vars-fix.diff
+ fi
+
+ cd ${S}
+ autoconf
+ #WANT_AUTOMAKE=1.7 automake
+}
+
+src_compile() {
+ local myconf
+
+ #The following fix is due to a bug with bdb on sparc's. See:
+ #http://www.geocrawler.com/mail/msg.php3?msg_id=4754814&list=8
+ if use sparc || use sparc64 || use alpha || use hppa
+ then
+ myconf="${myconf} --without-berkeley-db"
+ else
+ use berkdb \
+ && myconf="${myconf} --with-berkeley-db=./bdb" \
+ || myconf="${myconf} --without-berkeley-db"
+ fi
+
+ #readline pair reads backwards on purpose, DONT change it around, Ok?
+ # this is because it refers to the building of a bundled readline
+ # versus the system copy
+ use readline && myconf="${myconf} --without-readline"
+ use readline || myconf="${myconf} --with-readline"
+
+ use static \
+ && myconf="${myconf} --with-mysqld-ldflags=-all-static --disable-shared" \
+ || myconf="${myconf} --enable-shared --enable-static"
+
+ myconf="${myconf} `use_with tcpd libwrap`"
+ myconf="${myconf} `use_with innodb`"
+
+ use ssl \
+ && myconf="${myconf} --with-vio --with-openssl" \
+ || myconf="${myconf} --without-openssl"
+
+ myconf="${myconf} `use_with debug`"
+
+ #glibc-2.3.2_pre fix; bug #16496
+ export CFLAGS="${CFLAGS} -DHAVE_ERRNO_AS_DEFINE=1"
+
+ #bug fix for #15099, should make this api backward compatible
+ export CFLAGS="${CFLAGS} -DUSE_OLD_FUNCTIONS"
+
+ #the compiler flags are as per their "official" spec ;)
+ #CFLAGS="${CFLAGS/-O?/} -O3" \
+ CXXFLAGS="${CXXFLAGS} -felide-constructors -fno-exceptions -fno-rtti" \
+ econf \
+ --libexecdir=/usr/sbin \
+ --sysconfdir=/etc/mysql \
+ --localstatedir=/var/lib/mysql \
+ --with-raid \
+ --with-low-memory \
+ --enable-assembler \
+ --with-charset=latin1 \
+ --enable-local-infile \
+ --with-mysqld-user=mysql \
+ --with-extra-charsets=all \
+ --enable-thread-safe-client \
+ --with-client-ldflags=-lstdc++ \
+ --with-comment="Gentoo Linux ${PF}" \
+ --with-unix-socket-path=/var/run/mysqld/mysqld.sock \
+ --with-embedded-server \
+ ${myconf} || die "bad ./configure"
+
+ emake || die "compile problem"
+}
+
+src_install() {
+ make install DESTDIR=${D} benchdir_root=/usr/share/mysql || die
+
+ #move client libs, install a couple of missing headers
+ mv ${D}/usr/lib/mysql/libmysqlclient*.so* ${D}/usr/lib
+ dosym ../libmysqlclient.so /usr/lib/mysql/libmysqlclient.so
+ dosym ../libmysqlclient_r.so /usr/lib/mysql/libmysqlclient_r.so
+ insinto /usr/include/mysql ; doins include/{my_config.h,my_dir.h}
+
+ #convenience links
+ dosym /usr/bin/mysqlcheck /usr/bin/mysqlanalyze
+ dosym /usr/bin/mysqlcheck /usr/bin/mysqlrepair
+ dosym /usr/bin/mysqlcheck /usr/bin/mysqloptimize
+
+ #various junk
+ rm -f ${D}/usr/share/mysql/mysql.server
+ rm -f ${D}/usr/share/mysql/binary-configure
+ rm -f ${D}/usr/share/mysql/make_binary_distribution
+ rm -f ${D}/usr/share/mysql/mysql-log-rotate
+ rm -f ${D}/usr/share/mysql/{post,pre}install
+ rm -f ${D}/usr/share/mysql/mi_test*
+ rm -f ${D}/usr/share/mysql/*.spec # Redhat gunk
+ rm -f ${D}/usr/share/mysql/*.plist # Apple gunk
+ rm -f ${D}/usr/share/mysql/my-*.cnf # Put them elsewhere
+
+ # All of these (ab)use Perl.
+ if ! use perl; then
+ rm -f ${D}/usr/bin/mysql_setpermission
+ rm -rf ${D}/usr/share/mysql/sql-bench
+ fi
+
+ dohtml Docs/*.html
+ rm -f Docs/*.html
+ dodoc README COPYING COPYING.LIB Docs/manual.*
+ docinto conf-samples
+ dodoc support-files/my-*.cnf
+
+ insinto /etc/mysql
+ newins ${FILESDIR}/my.cnf-4.0.14-r1 my.cnf
+ doins scripts/mysqlaccess.conf
+ exeinto /etc/init.d
+ newexe ${FILESDIR}/mysql-4.0.15.rc6 mysql
+}
+
+pkg_config() {
+ if [ ! -d ${ROOT}/var/lib/mysql/mysql ] ; then
+ einfo "Press ENTER to create the mysql database and set proper"
+ einfo "permissions on it, or Control-C to abort now..."
+ read
+ ${ROOT}/usr/bin/mysql_install_db #>>/var/log/mysql/mysql.err 2>&1
+ # changing ownership of newly created databases to mysql.mysql
+ local DATADIR=""
+ if [ -f '/etc/mysql/my.cnf' ] ; then
+ #DATADIR=`grep ^datadir /etc/mysql/my.cnf | sed -e 's/.*= //'`
+ DATADIR=`/usr/sbin/mysqld --help |grep '^datadir' | awk '{print $2}'`
+ fi
+ if [ -z "${DATADIR}" ]; then
+ DATADIR="/var/lib/mysql/"
+ fi
+ chown -R mysql:mysql ${DATADIR}
+ else
+ einfo "Hmm, it appears as though you already have the mysql"
+ einfo "database in place. If you are having problems trying"
+ einfo "to start mysqld, perhaps you need to manually run"
+ einfo "/usr/bin/mysql_install_db and/or check your config"
+ einfo "file(s) and/or database(s) and/or logfile(s)."
+ fi
+}
+
+pkg_preinst() {
+ if ! groupmod mysql; then
+ groupadd -g 60 mysql || die "problem adding group mysql"
+ fi
+
+ if ! id mysql; then
+ useradd -g mysql -s /dev/null -d /var/lib/mysql -c "mysql" mysql
+ assert "problem adding user mysql"
+ fi
+}
+
+pkg_postinst() {
+ #empty dirs...
+ install -d -m0755 -o mysql -g mysql ${ROOT}/var/lib/mysql
+ install -d -m0755 -o mysql -g mysql ${ROOT}/var/run/mysqld
+ install -d -m0755 -o mysql -g mysql ${ROOT}/var/log/mysql
+
+ #secure the logfiles... does this bother anybody?
+ touch ${ROOT}/var/log/mysql/mysql.{log,err}
+ chown mysql:mysql ${ROOT}/var/log/mysql/mysql.{log,err}
+ chmod 0660 ${ROOT}/var/log/mysql/mysql.{log,err}
+
+ #your friendly public service announcement...
+ einfo
+ einfo "You might want to run:"
+ einfo "\"ebuild /var/db/pkg/dev-db/${PF}/${PF}.ebuild config\""
+ einfo "if this is a new install."
+ einfo
+
+ warning
+}
diff --git a/dev-db/mysql/mysql-4.0.19.ebuild b/dev-db/mysql/mysql-4.0.19.ebuild
new file mode 100644
index 000000000000..ed52bbd440f6
--- /dev/null
+++ b/dev-db/mysql/mysql-4.0.19.ebuild
@@ -0,0 +1,268 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-4.0.19.ebuild,v 1.1 2004/05/18 03:57:35 robbat2 Exp $
+
+inherit eutils
+#to accomodate -laadeedah releases
+NEWP=${P}
+
+SVER=${PV%.*}
+#normal releases:
+SDIR=MySQL-${SVER}
+#for a pre-release:
+#SDIR=MySQL-${SVER}-Pre
+
+S=${WORKDIR}/${NEWP}
+
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+HOMEPAGE="http://www.mysql.com/"
+SRC_URI="mirror://mysql/Downloads/${SDIR}/${NEWP}.tar.gz"
+RESTRICT="nomirror"
+
+KEYWORDS="~ia64 ~x86 ~sparc ~ppc ~amd64 ~hppa ~alpha ~mips ~s390"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="static readline innodb berkdb tcpd ssl perl debug"
+
+DEPEND="readline? ( >=sys-libs/readline-4.1 )
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6-r6 )
+ ssl? ( >=dev-libs/openssl-0.9.6d )
+ perl? ( dev-lang/perl )
+ >=sys-libs/zlib-1.1.3
+ sys-apps/procps
+ >=sys-apps/sed-4"
+PDEPEND="perl? ( dev-perl/DBI dev-perl/DBD-mysql )"
+
+warning() {
+ ewarn
+ ewarn "If you're upgrading from MySQL-3.x, you must recompile the other"
+ ewarn "packages on your system that link with libmysqlclient after the"
+ ewarn "upgrade completes. To obtain such a list of packages for your"
+ ewarn "system, you may use 'revdep-rebuild' from app-portage/gentoolkit."
+ ewarn
+ sleep 5
+}
+
+pkg_setup() {
+ warning
+
+ # MySQL on mips cannot link to berkdb due to issues.
+ if [ "`use mips`" ]; then
+ if [ "`use berkdb`" ]; then
+ echo -e ""
+ eerror "You cannot link MySQL into berkeley db on mips. Please remove the \"berkdb\""
+ eerror "flag from your USE settings and try again."
+ echo -e ""
+ fi
+ fi
+}
+
+src_unpack() {
+ if use static && use ssl; then
+ local msg="MySQL does not support building statically with SSL support"
+ eerror "${msg}"
+ die "${msg}"
+ fi
+ unpack ${A} || die
+
+ #zap startup script messages
+ EPATCH_OPTS="-p1 -d ${S}" \
+ epatch ${FILESDIR}/${PN}-4.0.18-install-db-sh.diff
+ #zap binary distribution stuff
+ EPATCH_OPTS="-p1 -d ${S}" \
+ epatch ${FILESDIR}/${PN}-4.0.18-mysqld-safe-sh.diff
+ #required for qmail-mysql
+ EPATCH_OPTS="-p0 -d ${S}" \
+ epatch ${FILESDIR}/${PN}-4.0-nisam.h.diff
+ #for correct hardcoded sysconf directory
+ EPATCH_OPTS="-p1 -d ${S}" \
+ epatch ${FILESDIR}/${PN}-4.0-my-print-defaults.diff
+ #
+ EPATCH_OPTS="-p1 -d ${S}" \
+ epatch ${FILESDIR}/${PN}-4.0.18-gentoo-nptl.diff
+
+ # attempt to get libmysqlclient_r linked against ssl if USE="ssl" enabled
+ # i would really prefer to fix this at the Makefile.am level, but can't
+ # get the software to autoreconf as distributed - too many missing files
+ EPATCH_OPTS="-p1 -d ${S}" \
+ epatch ${FILESDIR}/${PN}-4.0.18-thrssl.patch
+
+ # Security fix for bug #46242, upstream fix pending for 4.0.19
+ #EPATCH_OPTS="-p1 -d ${S}" \
+ #epatch ${FILESDIR}/${PN}-4.0.18-mysqlbugsecurity.diff
+ #EPATCH_OPTS="-p1 -d ${S}" \
+ #epatch ${FILESDIR}/${PN}-4.0.18-mysqldmultisecurity.diff
+
+ if use tcpd; then
+ EPATCH_OPTS="-p1 -d ${S}" \
+ epatch ${FILESDIR}/${PN}-4.0.14-r1-tcpd-vars-fix.diff
+ fi
+
+ cd ${S}
+ autoconf
+ #WANT_AUTOMAKE=1.7 automake
+}
+
+src_compile() {
+ local myconf
+
+ #The following fix is due to a bug with bdb on sparc's. See:
+ #http://www.geocrawler.com/mail/msg.php3?msg_id=4754814&list=8
+ if use sparc || use sparc64 || use alpha || use hppa
+ then
+ myconf="${myconf} --without-berkeley-db"
+ else
+ use berkdb \
+ && myconf="${myconf} --with-berkeley-db=./bdb" \
+ || myconf="${myconf} --without-berkeley-db"
+ fi
+
+ #readline pair reads backwards on purpose, DONT change it around, Ok?
+ # this is because it refers to the building of a bundled readline
+ # versus the system copy
+ use readline && myconf="${myconf} --without-readline"
+ use readline || myconf="${myconf} --with-readline"
+
+ use static \
+ && myconf="${myconf} --with-mysqld-ldflags=-all-static --disable-shared" \
+ || myconf="${myconf} --enable-shared --enable-static"
+
+ myconf="${myconf} `use_with tcpd libwrap`"
+ myconf="${myconf} `use_with innodb`"
+
+ use ssl \
+ && myconf="${myconf} --with-vio --with-openssl" \
+ || myconf="${myconf} --without-openssl"
+
+ myconf="${myconf} `use_with debug`"
+
+ #glibc-2.3.2_pre fix; bug #16496
+ export CFLAGS="${CFLAGS} -DHAVE_ERRNO_AS_DEFINE=1"
+
+ #bug fix for #15099, should make this api backward compatible
+ export CFLAGS="${CFLAGS} -DUSE_OLD_FUNCTIONS"
+
+ #the compiler flags are as per their "official" spec ;)
+ #CFLAGS="${CFLAGS/-O?/} -O3" \
+ CXXFLAGS="${CXXFLAGS} -felide-constructors -fno-exceptions -fno-rtti" \
+ econf \
+ --libexecdir=/usr/sbin \
+ --sysconfdir=/etc/mysql \
+ --localstatedir=/var/lib/mysql \
+ --with-raid \
+ --with-low-memory \
+ --enable-assembler \
+ --with-charset=latin1 \
+ --enable-local-infile \
+ --with-mysqld-user=mysql \
+ --with-extra-charsets=all \
+ --enable-thread-safe-client \
+ --with-client-ldflags=-lstdc++ \
+ --with-comment="Gentoo Linux ${PF}" \
+ --with-unix-socket-path=/var/run/mysqld/mysqld.sock \
+ --with-embedded-server \
+ ${myconf} || die "bad ./configure"
+
+ emake || die "compile problem"
+}
+
+src_install() {
+ make install DESTDIR=${D} benchdir_root=/usr/share/mysql || die
+
+ #move client libs, install a couple of missing headers
+ mv ${D}/usr/lib/mysql/libmysqlclient*.so* ${D}/usr/lib
+ dosym ../libmysqlclient.so /usr/lib/mysql/libmysqlclient.so
+ dosym ../libmysqlclient_r.so /usr/lib/mysql/libmysqlclient_r.so
+ insinto /usr/include/mysql ; doins include/{my_config.h,my_dir.h}
+
+ #convenience links
+ dosym /usr/bin/mysqlcheck /usr/bin/mysqlanalyze
+ dosym /usr/bin/mysqlcheck /usr/bin/mysqlrepair
+ dosym /usr/bin/mysqlcheck /usr/bin/mysqloptimize
+
+ #various junk
+ rm -f ${D}/usr/share/mysql/mysql.server
+ rm -f ${D}/usr/share/mysql/binary-configure
+ rm -f ${D}/usr/share/mysql/make_binary_distribution
+ rm -f ${D}/usr/share/mysql/mysql-log-rotate
+ rm -f ${D}/usr/share/mysql/{post,pre}install
+ rm -f ${D}/usr/share/mysql/mi_test*
+ rm -f ${D}/usr/share/mysql/*.spec # Redhat gunk
+ rm -f ${D}/usr/share/mysql/*.plist # Apple gunk
+ rm -f ${D}/usr/share/mysql/my-*.cnf # Put them elsewhere
+
+ # All of these (ab)use Perl.
+ if ! use perl; then
+ rm -f ${D}/usr/bin/mysql_setpermission
+ rm -rf ${D}/usr/share/mysql/sql-bench
+ fi
+
+ dohtml Docs/*.html
+ rm -f Docs/*.html
+ dodoc README COPYING COPYING.LIB Docs/manual.*
+ docinto conf-samples
+ dodoc support-files/my-*.cnf
+
+ insinto /etc/mysql
+ newins ${FILESDIR}/my.cnf-4.0.14-r1 my.cnf
+ doins scripts/mysqlaccess.conf
+ exeinto /etc/init.d
+ newexe ${FILESDIR}/mysql-4.0.15.rc6 mysql
+}
+
+pkg_config() {
+ if [ ! -d ${ROOT}/var/lib/mysql/mysql ] ; then
+ einfo "Press ENTER to create the mysql database and set proper"
+ einfo "permissions on it, or Control-C to abort now..."
+ read
+ ${ROOT}/usr/bin/mysql_install_db #>>/var/log/mysql/mysql.err 2>&1
+ # changing ownership of newly created databases to mysql.mysql
+ local DATADIR=""
+ if [ -f '/etc/mysql/my.cnf' ] ; then
+ #DATADIR=`grep ^datadir /etc/mysql/my.cnf | sed -e 's/.*= //'`
+ DATADIR=`/usr/sbin/mysqld --help |grep '^datadir' | awk '{print $2}'`
+ fi
+ if [ -z "${DATADIR}" ]; then
+ DATADIR="/var/lib/mysql/"
+ fi
+ chown -R mysql:mysql ${DATADIR}
+ else
+ einfo "Hmm, it appears as though you already have the mysql"
+ einfo "database in place. If you are having problems trying"
+ einfo "to start mysqld, perhaps you need to manually run"
+ einfo "/usr/bin/mysql_install_db and/or check your config"
+ einfo "file(s) and/or database(s) and/or logfile(s)."
+ fi
+}
+
+pkg_preinst() {
+ if ! groupmod mysql; then
+ groupadd -g 60 mysql || die "problem adding group mysql"
+ fi
+
+ if ! id mysql; then
+ useradd -g mysql -s /dev/null -d /var/lib/mysql -c "mysql" mysql
+ assert "problem adding user mysql"
+ fi
+}
+
+pkg_postinst() {
+ #empty dirs...
+ install -d -m0755 -o mysql -g mysql ${ROOT}/var/lib/mysql
+ install -d -m0755 -o mysql -g mysql ${ROOT}/var/run/mysqld
+ install -d -m0755 -o mysql -g mysql ${ROOT}/var/log/mysql
+
+ #secure the logfiles... does this bother anybody?
+ touch ${ROOT}/var/log/mysql/mysql.{log,err}
+ chown mysql:mysql ${ROOT}/var/log/mysql/mysql.{log,err}
+ chmod 0660 ${ROOT}/var/log/mysql/mysql.{log,err}
+
+ #your friendly public service announcement...
+ einfo
+ einfo "You might want to run:"
+ einfo "\"ebuild /var/db/pkg/dev-db/${PF}/${PF}.ebuild config\""
+ einfo "if this is a new install."
+ einfo
+
+ warning
+}