Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 62582 - MySQL 4.1.7 ebuild
Summary: MySQL 4.1.7 ebuild
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords: EBUILD
: 34600 67145 67871 (view as bug list)
Depends on:
Blocks: 67871
  Show dependency tree
 
Reported: 2004-09-01 20:45 UTC by Jason Rhinelander
Modified: 2005-01-09 17:01 UTC (History)
17 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
mysql-4.1.4.ebuild (mysql-4.1.4.ebuild,7.31 KB, text/plain)
2004-09-01 20:47 UTC, Jason Rhinelander
Details
mysql-4.1.4-install-db-sh.diff (mysql-4.1.4-install-db-sh.diff,1.44 KB, patch)
2004-09-01 20:49 UTC, Jason Rhinelander
Details | Diff
mysql-4.1.4-thrssl.patch (mysql-4.1.4-thrssl.patch,418 bytes, patch)
2004-09-01 20:49 UTC, Jason Rhinelander
Details | Diff
Jason's ebuild with updated upgrade warning and latest CVS changes merged (mysql-4.1.4.ebuild,7.36 KB, text/plain)
2004-09-06 17:40 UTC, Alexander M. Turek
Details
mysql-4.1.6.ebuild (mysql-4.1.6.ebuild,7.83 KB, text/plain)
2004-10-18 10:50 UTC, Jason Rhinelander
Details
Error output on 4.1.7 emerge failure (4.1.7 error output.txt,18.31 KB, text/plain)
2004-10-27 12:01 UTC, Matt Philips
Details
mysql-4.1.7.ebuild (mysql-4.1.7.ebuild,7.85 KB, text/plain)
2004-10-28 05:13 UTC, Alexander M. Turek
Details
mysql-4.1.7.ebuild with cluster USE flag (mysql-4.1.7.ebuild,7.95 KB, text/plain)
2004-11-05 05:14 UTC, Martin Holzhauer
Details
Patch for /usr/portage/eclass/php5-sapi.eclass to allow PHP5 with mysql and mysqli at the same time. (php5-sapi.eclass.patch,1.46 KB, patch)
2004-11-17 04:43 UTC, Sune Foldager
Details | Diff
preview of a slotted mysql overlay (qpkg-l-mysql-4.1.8.txt,54.75 KB, application/octet-stream)
2005-01-06 06:17 UTC, Francesco R. (RETIRED)
Details
oops, too much hours here, this is the right one (dev-db_mysql.tgz,36.36 KB, application/octet-stream)
2005-01-06 06:20 UTC, Francesco R. (RETIRED)
Details
new improved version (dev-db_mysql.tar.gz,23.27 KB, application/octet-stream)
2005-01-09 12:08 UTC, Francesco R. (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Rhinelander 2004-09-01 20:45:19 UTC
Seeing as MySQL has now declared MySQL 4.1.4 a "gamma" release - with a "use this for new development" comment - I thought I'd submit a 4.1.x ebuild that I've been using and keeping more-or-less updated since MySQL 4.1.0 was released.  The (fairly small) differences between the 4.0.20-r1 and 4.1.4 ebuild are as follows:

- NEWP gets a -gamma added to the end
- I changed keywords to "-* ~x86", as I have no idea whether 4.1.4 works properly on other archs
- Recreated 4.0.18-install-db-sh.diff as 4.1.4-install-db-sh.diff
- Recreated 4.0.18-thrssl.patch as 4.1.4-thrssl.patch; in addition to context changes around the first hunk, the second hunk of the 4.0.18 patch is no longer needed
- removed the two commented out patches for the bug 46242 security fix
- removed the recent mysqlhotcopy security fix patch as 4.1.4 contains this fix
Comment 1 Jason Rhinelander 2004-09-01 20:47:15 UTC
Created attachment 38723 [details]
mysql-4.1.4.ebuild
Comment 2 Jason Rhinelander 2004-09-01 20:49:11 UTC
Created attachment 38725 [details, diff]
mysql-4.1.4-install-db-sh.diff
Comment 3 Jason Rhinelander 2004-09-01 20:49:53 UTC
Created attachment 38726 [details, diff]
mysql-4.1.4-thrssl.patch
Comment 4 Jason Rhinelander 2004-09-03 11:50:53 UTC
I just noticed that the PDEPEND for DBD-mysql needs to be updated to require at least 2.9004, which is currently package.mask'ed.
Comment 5 Alexander M. Turek 2004-09-06 17:40:31 UTC
Created attachment 39101 [details]
Jason's ebuild with updated upgrade warning and latest CVS changes merged

Jason,

your ebuild works fine for me. Thanks a lot :-)

I just updated the warning about recompiling packages that are linking to
libmysqlclient as revdep-rebuild also has to be run when upgrading from 4.0. In
addition, I merged a change that was made to the 4.0.20-r1 ebuild some days
ago.
Comment 6 Alexander M. Turek 2004-09-12 06:57:45 UTC
The ebuild also works fine for MySQL 4.1.4a.
Comment 7 Alexander M. Turek 2004-09-21 16:07:50 UTC
MySQL 4.1.5-gamma has been released. The ebuild also works with this release.
Comment 8 Sune Foldager 2004-10-11 16:26:43 UTC
For me, using 4.1(.5) breaks a few things... Perl's DBD-mysql is one, as mentioned in another comment.
Also, a ruby mysql module has the same problem. In both cases, problem with the number of arguments
to the my_shutdown function.
Comment 9 Alexander M. Turek 2004-10-11 17:07:27 UTC
DBD-mysql-2.9004 works fine with MySQL 4.1, but it's still hard masked for some reason.
Comment 10 Jason Rhinelander 2004-10-11 18:43:23 UTC
> DBD-mysql-2.9004 works fine with MySQL 4.1, but it's still hard masked for some reason.

But does DBD-mysql-2.9004 work fine with MySQL 4.0?  If not, you have the most likely reason for the hard mask.
Comment 11 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-10-12 11:14:35 UTC
*** Bug 67145 has been marked as a duplicate of this bug. ***
Comment 12 Jason Rhinelander 2004-10-18 10:50:41 UTC
Created attachment 42112 [details]
mysql-4.1.6.ebuild

I've updated the ebuild for 4.1.6.  Notable changes include:

- synced with 4.0.21 ebuild, notably changing permissions and uses 4.0.21's
redone install-db-sh and thrssl patches.  The diff between 4.0.21 and 4.1.6
ebuilds is now very small (6 lines changed, 5 removed).
- changed PDEPEND to require >=DBD-mysql-2.9004 (if USE=perl)
- added "ruby" use flag, that pulls in >=mysql-ruby-2.5.  Someone please tell
me if 2.5 doesn't build with MySQL 4.1.x - according to the mysql-ruby page it
should.
Comment 13 Sune Foldager 2004-10-18 13:33:53 UTC
What's the big idea about having DBD-mysql-2.9004 hard masked in profiles/package.mask anyway?
Isn't it usually enough to do it in the ebuild KEYWORDS variable? Then one can override it in e.g.
/etc/portage/package.keywords, unlike now where you presumably have to edit the package.mask file
to make it install.

Maybe it's just me :-). I never really did understand why all masks aren't just done in the ebuilds.
Comment 14 Jason Rhinelander 2004-10-18 13:50:48 UTC
I'm not sure on the specific reasons for the mask, but much easier than editing package.mask every time you sync is to add:

=dev-perl/DBD-mysql-2.9004

to the /etc/portage/package.unmask file.
Comment 15 Andy Dustman 2004-10-26 11:54:23 UTC
4.1.7 (non-gamma, first production release) is now available. I sure would like to see this in the portage tree, even if it is hard-masked for awhile.
Comment 16 Sune Foldager 2004-10-26 11:57:48 UTC
Me too; why not put this in the tree and hard-mask it? I even, with some hacking of the PHP eclass,
made it compile and use php/mod_php with the new mysqli and the old mysql support at the same
time (which is really needed for migration of code). It would be great to be able to do that without
hacking eclasses as well.
Comment 17 Matt Philips 2004-10-27 11:58:33 UTC
Grabbed the mysql-4.1.6.ebuild above, removed "-gamma" from the "NEWP=${P}" line, and renamed to 4.1.7. Failed with error that I will attach. Any suggestions?
Comment 18 Matt Philips 2004-10-27 12:01:22 UTC
Created attachment 42709 [details]
Error output on 4.1.7 emerge failure
Comment 19 Alexander M. Turek 2004-10-28 05:13:13 UTC
Created attachment 42761 [details]
mysql-4.1.7.ebuild

I've just added a fixed ebuild for MySQL 4.1.7 because I ran into compile
problems when recycling the 4.1.6 ebuild.

All I did was adding the dependency ">=sys-apps/texinfo-4.7" and removing
"-gamma" from the filename since MySQL 4.1 IS STABLE NOW. Wee. :-)
Comment 20 Matt Philips 2004-10-28 08:57:45 UTC
mysql-4.1.7.ebuild works for me. Thanks!
Comment 21 Caleb Tennis (RETIRED) gentoo-dev 2004-11-01 06:36:04 UTC
*** Bug 67871 has been marked as a duplicate of this bug. ***
Comment 22 Caleb Tennis (RETIRED) gentoo-dev 2004-11-01 06:42:05 UTC
A dilemma with this is that it doesn't provide a clean upgrade path for 4.0 users in the sense that 4.0 -> 4.1 doesn't have binary compatible libmysqlclient.  If people are connecting to a remote mysql server via a client on another computer, will a 4.0 client connect to a 4.1 server?  Or do all of the clients have to be upgraded too?

I think (and this is just a thought) that this program needs to be slotted so 4.0 and 4.1 can run together while administrators perform the migration.

Comments welcome.
Comment 23 Martin Holzhauer 2004-11-01 09:36:13 UTC
please add a "cluster" USE Flag

http://dev.mysql.com/doc/mysql/en/MySQL_Cluster_building.html
Comment 24 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-11-01 10:00:39 UTC
4.0 clients won't talk to a 4.1 server.
it's the same problem we had during the 3.23 to 4.0 migration.
but with the added complexity that this time a bit more work is required in terms of what you do with MySQL. 

slotting mysql is extremely non-trivial (it's been tried before), as it would require seperate database directories and configuration directories - which would then make version upgrades like this a PITA.

It's going to be upgrade - then revdep-rebuild. Looking at the lib problem from a different angle, I looked up how FreeBSD deals with it.
When removing something, they move it to /usr/compat/{bin,lib} if it's still used by something else directly.
Comment 25 Alexander M. Turek 2004-11-01 11:35:53 UTC
> 4.0 clients won't talk to a 4.1 server

afaik, they will, but the client can only connect to the server if the user's password has been encoded with the old password hashing algorithm (this can be acheived using MySQL's OLD_PASSWORD() function). There's also a startup function for forcing the old password hashes in the server. Maybe a comment about this should be added to the default my.ini.

Otherwise, the client is told to "consider upgrading the MySQL client" by the server.

About upgrading: Yes, the new libmysqlclient is not binary compatible, the user would have to run revdep-rebuild after upgrading to MySQL 4.1. And on top of that, he should run the mysql_fix_privilege_tables script in order to prepare the user table for the new (and longer) password hashes and to add the timezone tables. MySQL gets along without having run the script, but in this case the new password hashes (that should be more secure according to MySQL) and the timezone functions are deactivated.
Comment 26 Thomas Stein 2004-11-04 05:50:26 UTC
hello

4.1.7 does not build here.

mysqld.o(.text+0x39c8): In function `handle_connections_sockets':
: undefined reference to `deny_severity'
/usr/lib/libwrap.a(options.o)(.text+0x946): In function `twist_option':
: undefined reference to `deny_severity'
/usr/lib/libwrap.a(options.o)(.text+0xbef): In function `severity_option':
: undefined reference to `deny_severity'
/usr/lib/libwrap.a(options.o)(.text+0xbf7): In function `severity_option':
: undefined reference to `allow_severity'
collect2: ld returned 1 exit status
make[4]: *** [mysqld] Fehler 1

Someone has an idea how to resolve this?

regards
thomas
Comment 27 Thomas Stein 2004-11-04 07:39:24 UTC
hello again.

Reemerge of sys-apps/tcp-wrappers solved my problem.

regards
t.
Comment 28 Niels Laukens 2004-11-04 13:21:37 UTC
my "emerge mysql" complains about:
 * Cannot find $EPATCH_SOURCE!  Value for $EPATCH_SOURCE is:
 *
 *   /usr/local/portage/dev-db/mysql/files/mysql-4.0.21-install-db-sh.diff

I guess I need that file, however, the closest match (in attachements) has been barred-out. What file sould I put there?
Comment 29 Sune Foldager 2004-11-04 16:07:38 UTC
I copied the entire contents of the "files" directory to the local version of the MySQL repository before
merging. It needs some common patches from the "older" (i.e. the ones in the portage tree) versions.
Comment 30 Martin Holzhauer 2004-11-05 05:14:19 UTC
Created attachment 43333 [details]
mysql-4.1.7.ebuild with cluster USE flag

i tested the old ebuild and it works

then i added the cluster use falg reemerged it
and it works too
Comment 31 Caleb Tennis (RETIRED) gentoo-dev 2004-11-09 05:40:24 UTC
Robin, what do you think about this upgrade plan...:

Commit 4.1.7 to portage, package.masked.  In pkg_prefetch(), have some logic that basically doesn't allow you to emerge the package if you have an existing version already installed with a note that upgrades aren't yet supported.

Then, we can start playing with the upgrade path.

From my testing, a 4.1 client can connect to a 4.0 server if you're careful about it.
Comment 32 Chris Verges 2004-11-12 01:06:09 UTC
If binary compatibility cannot be maintained for an upgrade, why not block MySQL 4.1 on MySQL 4.0 and have the ebuild pop out a warning message saying, "You must use 'emerge world -e' to ensure that all programs link properly"?  It's a horrid solution for now, but as long as it is masked, things ought to be ok.

And thanks for all the hard work in getting this ebuild functioning!  It is greatly appreciated out here in the field.
Comment 33 Jeff Smelser 2004-11-12 06:37:18 UTC
Not an emerge -e world, just do a revdep-rebuild is all thats needed.
Comment 34 Doug Goldstein (RETIRED) gentoo-dev 2004-11-15 01:28:11 UTC
I'd really love to see this included into Portage, even if it's hard masked. This is the latest production server and it's the one devs are encouraged to develop against.

On a side note, the PHP eclass will probably have to be updated with this one. since once you install MySQL 4.1, the PHP eclass will only build mysqli support so then you can't connect to 4.0.x servers anymore with PHP. Really it should build both mysql and mysqli or maybe separate USE flags... but that's a separate bug report...
Comment 35 Tiago Freire 2004-11-17 03:31:13 UTC
yeah, tried and it worked. comiled just fine. just had to rune the 'foo.ebuild digest' stuff to generate checksums, but it worked. now I am midway in the revdep-rebuild process. so far, mod_php 5.0.2 is the only issue, claiming that it does not support the mysqli extension, and wont support until mysql 4.1 in in portage. cant it be added, masked? this would open up the way for php maitainers to solve this issue too, since the ebuild said they wont even try until this one is in portage.
Comment 36 Tiago Freire 2004-11-17 03:39:32 UTC
DBD-mysql had an hiccup too.
but the developers probably wont touch it until mysql 4.1 is in portage. should I file a bug anyway?
-----
gcc -c  -I/usr/lib/perl5/vendor_perl/5.8.4/i686-linux/auto/DBI -I/usr/include/mysql -march=athlon-xp -pipe  -DHAVE_ERRNO_AS_DEFINE=1 -DUSE_OLD_FUNCTIONS -DDBD_MYSQL_WITH_SSL -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -march=athlon-xp -fomit-frame-pointer -pipe -funroll-loops -m3dnow -msse -mmmx   -DVERSION=\"2.1027\" -DXS_VERSION=\"2.1027\" -fPIC "-I/usr/lib/perl5/5.8.4/i686-linux/CORE"   dbdimp.c
/usr/bin/perl5.8.4 -p -e "s/~DRIVER~/mysql/g" /usr/lib/perl5/vendor_perl/5.8.4/i686-linux/auto/DBI/Driver.xst > mysql.xsi
/usr/bin/perl5.8.4 /usr/lib/perl5/5.8.4/ExtUtils/xsubpp  -typemap /usr/lib/perl5/5.8.4/ExtUtils/typemap  mysql.xs > mysql.xsc && mv mysql.xsc mysql.c
Warning: duplicate function definition 'do' detected in mysql.xs, line 193
Warning: duplicate function definition 'rows' detected in mysql.xs, line 291
gcc -c  -I/usr/lib/perl5/vendor_perl/5.8.4/i686-linux/auto/DBI -I/usr/include/mysql -march=athlon-xp -pipe  -DHAVE_ERRNO_AS_DEFINE=1 -DUSE_OLD_FUNCTIONS -DDBD_MYSQL_WITH_SSL -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -march=athlon-xp -fomit-frame-pointer -pipe -funroll-loops -m3dnow -msse -mmmx   -DVERSION=\"2.1027\" -DXS_VERSION=\"2.1027\" -fPIC "-I/usr/lib/perl5/5.8.4/i686-linux/CORE"   mysql.c
mysql.xs: In function `XS_DBD__mysql__dr__admin_internal':
mysql.xs:101: error: too few arguments to function `mysql_shutdown'
make: *** [mysql.o] Error 1

!!! ERROR: dev-perl/DBD-mysql-2.1027 failed.
!!! Function perl-module_src_compile, Line 65, Exitcode 2
-----
libwww,vorbis-tools recompiled just fine
Comment 37 Alexander M. Turek 2004-11-17 03:47:19 UTC
Tiago,

if you had read the previous comments, you would have known about DBD-mysql and how to solve the problem.
Comment 38 Sune Foldager 2004-11-17 04:36:10 UTC
I hacked my php eclass to make it compile with the mysqli extension. Furthermore, I had to make some
other changes to the eclass to make it possible to compile both mysqli and old-style mysql in at the
same time. I have posted my patch (to /usr/portage/eclass/php5-sapi.eclass ) as an attachment (or rather: I will in 2 mins from now ;-) ).

As for DBD-mysql, I think the newest masked version works.
Comment 39 Sune Foldager 2004-11-17 04:43:07 UTC
Created attachment 44145 [details, diff]
Patch for /usr/portage/eclass/php5-sapi.eclass to allow PHP5 with mysql and mysqli at the same time.
Comment 40 Tiago Freire 2004-11-17 05:57:09 UTC
Uh, thanks for showing me what I should have done firstplace, I should have read teh full Bug report. anyways, I used the php-sapi patch to compile php5.0.2 and it worked! mysql is complaining about phpmyadmin queries, but that may be a phpmyadmin's problem.
Comment 41 Tiago Freire 2004-11-17 09:09:02 UTC
phpmyadmin woes after the upgrade:
after the upgrade, when I 
1) select a database
2) just click on the sql button
-----------
 comando SQL: Documenta
Comment 42 Tiago Freire 2004-11-17 09:09:02 UTC
phpmyadmin woes after the upgrade:
after the upgrade, when I 
1) select a database
2) just click on the sql button
-----------
 comando SQL: DocumentaçãoEdita

SELECT label, id
FROM `pmadb`.`PMA_bookmark`
WHERE dbase = 'ctd'
AND (
user = 'root'
OR user = ''
)

Mensagens do MySQL : Documentação
#1267 - Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='
----------
I can still type a query and try to perform it, but in the place it would show the results, it says: 
---------
 comando SQL: DocumentaçãoEdita

SELECT column_name, mimetype, transformation, transformation_options
FROM `PMA_column_info`
WHERE db_name = 'ctd'
AND table_name = 'PRODUCTS'
AND (
mimetype != ''
OR transformation != ''
OR transformation_options != ''
)

Mensagens do MySQL : Documentação
#1267 - Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=' 
----------
it looks like the 'ilegal collation' problem is related to phpmyadmin tables to me. should I refrain posting these gripes here until there is an actual ebuild in portage, file a bug for phpmyadimn, or what?
Comment 43 Andy Dustman 2004-11-17 09:22:06 UTC
mysql-python-1.0.0 will not build against MySQL-4.1 (the usual API change to mysql_shutdown() is the issue), but 1.1.7 (not yet in Portage) will build against any version from 3.23 to 4.1, and this is the preferred version for Python 2.3 and newer. (I am the author of this package.)
Comment 44 Sune Foldager 2004-11-17 10:22:00 UTC
Tiago, looks like phpmyadmin has some problems with the new character set feares of MySQL. The
swedish you see, is MySQL's default character set/collation. Whatever it is, I don't think this is the
right place to post it; It's hardly a bug with the MySQL ebuild... either a bug with phpmyadmin or you
did something wrong when upgrading to 4.1 I think. Maybe try the forums instead?
Comment 45 Alexander M. Turek 2004-11-17 12:09:21 UTC
Sune, Tiago:

This is a known phpMyAdmin bug. It appears if, after upgrading to MySQL 4.1, phpMyAdmin's tables for relations, bookmarks, etc. weren't fixed using the script "upgrade_tables_mysql_4_1_2+.sql" which is bundled with phpMyAdmin 2.6.0.

This leads us into another problem: since the phpmyadmin ebuild creates those tables automatically, the upgrade mechnism should somehow be automised, too.

phpMyAdmin 2.6.1 will probably include a fix so it will work with tables created under MySQL 4.0, although it's strongly recommend to fix the tables.
Comment 46 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-11-17 12:26:04 UTC
caleb: that deployment plan of 4.1 package.masked sounds good, and having it block as long as mysql-4.0 is installed. i'm testing out 4.1.7 now, if it compiles for me then i'll put it in the tree hardmasked.

for everybody here - we will not be supporting parallel (slotted) installs of mysql4.0 together with mysql4.1 (or any other version pair of mysql) - this definetly applies to PHP.
Comment 47 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-11-17 14:26:17 UTC
in cvs now, package.masked.
this is the first mysql4.1 that appears to work for me.
Comment 48 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-11-17 14:26:49 UTC
*** Bug 34600 has been marked as a duplicate of this bug. ***
Comment 49 Alexander M. Turek 2004-11-18 02:02:25 UTC
> in cvs now, package.masked

Thanks a lot, Robin. :-)

> we will not be supporting parallel (slotted) installs
> of mysql4.0 together with mysql4.1 (or any other
> version pair of mysql) - this definetly applies to PHP.

OK, but nevertheless, you should allow to build both php extensions (MySQL and MySQLi) against MySQL 4.1. If someone wants to write php4 compatible code, he would avoid MySQLi, whereas php5 development should prefer MySQLi over MySQL.

But anyway, this should go into a seperate bug report, shouldn't it?
Comment 50 Sune Foldager 2004-11-18 02:16:13 UTC
Alexander, you can use my patch to enable mysqli and mysql at the same time in PHP5.. but of course it
should be solved from official side instead, I agree (also because the patch is for a file which is
overwritten with each sync you make).
Comment 51 Francesco R. (RETIRED) gentoo-dev 2005-01-05 15:51:21 UTC
in #c24 are mentioned multiple configuration files, this should not be necessary for my.cnf but only for /etc/init.d scripts, the following is an extract from the mysql manual.

http://dev.mysql.com/doc/mysql/en/Automatic_start.html

[mysqld-major-version] means that groups with names like [mysqld-4.0], [mysqld-4.1], and [mysqld-5.0] will be read by servers having versions 4.0.x, 4.1.x, 5.0.x, and so forth. This feature was added in MySQL 4.0.14. It can be used to specify options that will be read only by servers within a given release series.
Comment 52 Francesco R. (RETIRED) gentoo-dev 2005-01-06 06:17:11 UTC
Created attachment 47761 [details]
preview of a slotted mysql overlay

features:
This mysql-overlay create a slotted mysql installation.
completely revritten pkg_config()
utf8 for mysql-4.1 e 5.0 (see also glep 31)

please keep in mind that this is a preview, I've posted it because I cant' work
on it in the next few days, so maybe someone would apreciate (and finish it ;)

how to use:
backup all your data around the world:
/etc/mysql
/var/log/mysql
/var/lib/mysql

emerge -C mysql
emerge =mysql-4.1.8
emerge	mysql-4.1.8 config
emerge =mysql-4.0.23
emerge	mysql-4.1.8 config # not tested yet
bring manually the stuff working 
revdep-rebuild

TODO: utf8 in create database (easy)
TODO: tweak /etc/my.cnf patches (easy)
TODO: comment in my.cnf to look at /usr/share/doc/mysql-${PV}/conf-samples
(easy)
TODO: explain to the user how to upgrade (*must* be done manually it's not
stuff for stupid programs) (medium)
TODO: /usr/include/mysql/ still overlap (medium)
TODO: simlinks for man files (/usr/share/man/man1/mysql-4.0.1.gz ->
/usr/share/man/man1/mysql.1.gz) (easy rt.fine.m)
TODO: /usr/share/mysql/sql-bench/, /usr/share/mysql/mysql-test (medium, low
pri)
TODO: mysql-config ( ebuild ? ) to change default mysql server (difficult,
important)
      and relink the following?
      /usr/lib/libmysqlclient_r.so -> libmysqlclient_r.so.12.0.0
      /usr/lib/libmysqlclient_r.so -> libmysqlclient_r.so.14.0.0
TODO: make mysql-5.0 compile again (easy time to spend)
TODO: add block USE="utf8" -> <mysql-4.1.3 (easy)
TODO: insinto /usr/include/mysql ; doins include/{my_config.h,my_dir.h}
(difficult, important)
TODO: mv /usr/share/mysql-4.0/mysql/* /usr/share/mysql-4.0/ (easy)
TODO: A lot of cosmetics, better dosym, /var/run/mysqld/ links, ${ROOT} (easy
but a bit long)
TODO: to stop mysql u ust use pkill -f mysql  , not so fair (medium)
WARN: tested installing first 4.1 then 4.0 on a clean system, try reverse order

TEST: its possible to have a shared [mysqld] config and then specific conf. for
every [mysqld-X.Y] server?
Comment 53 Francesco R. (RETIRED) gentoo-dev 2005-01-06 06:20:39 UTC
Created attachment 47762 [details]
oops, too much hours here, this is the right one
Comment 54 Francesco R. (RETIRED) gentoo-dev 2005-01-09 12:08:51 UTC
Created attachment 48037 [details]
new improved version

DONE: utf8 in create database
DONE: tweak /etc/my.cnf patches
DONE: /usr/include/mysql/ still overlap (medium)
DONE: /usr/include/mysql -> /usr/include/mysql-4.1/mysql/
DONE: /etc/init.d/mysql-4.0 restart is ok
TODO: simlinks for man files (should be done ?)
TODO: comment in my.cnf to look at /usr/share/doc/mysql-${PV}/conf-samples
TODO: explain to the user how to upgrade (*must* be done manually it's not
      stuff for stupid programs) (medium)
TODO: /usr/share/mysql/sql-bench/, /usr/share/mysql/mysql-test 
      should be a different package mysql-bench ?
TODO: mysql-config ( ebuild ? ) to change default mysql server 
TODO: Cosmetics, better dosym, ${ROOT}
WARN: tested installing first 4.1 then 4.0 on a clean system, try reverse order

TEST: its possible to have a shared [mysqld] config and then specific conf. for

      every [mysqld-X.Y] server?

tested with USE="~x86 -berkdb -cluster -debug -innodb perl readline -ruby
-selinux ssl -static tcpd utf8"

http://www.francesco-riosa.com/gentoo/my_logs.tar.bz2 (120 kB)
has some build log of emerge, of mysql, myodbc, ulogd and the output of qpkg -l
(may be not really the latest)

any comment, request, suggestions ?
Comment 55 Francesco R. (RETIRED) gentoo-dev 2005-01-09 17:01:59 UTC
a) to make "emerge =myodbc-3.51.06" go ok having more mysql versions installed, follow theese steps:

# cd /usr/lib/mysql
# rm libmysqlclient.so
# ln -s ../libmysqlclient.so.12.0.0 libmysqlclient.so
# rm libmysqlclient_r.so
# ln -s ../libmysqlclient_r.so.12.0.0 libmysqlclient_r.so

# rm -rf /usr/include/mysql
# ln -s /usr/include/mysql-4.0/mysql/ /usr/include/mysql
# emerge =myodbc-3.51.06

b) now /etc/init.d/mysql* scripts are "splitted", really there is only one mysql file, the other are symlinks to the unversioned one.
Probably it's a better solution add /etc/conf.d/mysql with a variable inside that specify wich version to use.

if requested I will submit the updated ebuilds or patch.