Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 83424 - dev-db/mysql-bin ebuild (New package)
Summary: dev-db/mysql-bin ebuild (New package)
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Linux MySQL bugs team
URL: http://thread.gmane.org/gmane.linux.g...
Whiteboard:
Keywords:
: 91998 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-02-26 17:17 UTC by Francesco R. (RETIRED)
Modified: 2006-03-18 04:39 UTC (History)
1 user (show)

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


Attachments
tar.gz of the overlay (dev-db_mysql-bin.tar.gz,9.30 KB, image/x-xpixmap)
2005-02-26 17:19 UTC, Francesco R. (RETIRED)
Details
mysql-bin-4.1.10.ebuild (mysql-bin-4.1.10.ebuild,9.18 KB, text/plain)
2005-02-27 06:07 UTC, Francesco R. (RETIRED)
Details
update of the dev-db_mysql-bin.tar.gz file (dev-db_mysql-bin.tar.gz,13.02 KB, application/octet-stream)
2005-05-10 07:54 UTC, Martin Mokrejš
Details
update of the dev-db_mysql-bin.tar.gz file #2 (dev-db_mysql-bin.tar.gz,11.28 KB, application/octet-stream)
2005-05-10 10:19 UTC, Martin Mokrejš
Details
update of the dev-db_mysql-bin.tar.gz file #3 (dev-db_mysql-bin.tar.gz,11.32 KB, application/octet-stream)
2005-06-12 03:30 UTC, Martin Mokrejš
Details
mysql-bin-20050619.tar.gz overlay for binary mysq (mysql-bin-20050619.tar.gz,76.53 KB, application/octet-stream)
2005-06-19 08:01 UTC, Francesco R. (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Francesco R. (RETIRED) gentoo-dev 2005-02-26 17:17:01 UTC
- Tested on x86, runed with skip-networking option.
- It's very vague for me when and where this ebuild work with ppc* 


Reproducible: Always
Steps to Reproduce:
Comment 1 Ciaran McCreesh 2005-02-26 17:18:49 UTC
I hear debian's good if you want to use binary packages.
Comment 2 Francesco R. (RETIRED) gentoo-dev 2005-02-26 17:19:27 UTC
Created attachment 52202 [details]
tar.gz of the overlay

# tar -tf dev-db_mysql-bin.tar.gz
dev-db/mysql-bin/
dev-db/mysql-bin/mysql-bin-4.1.10.ebuild
dev-db/mysql-bin/Manifest
dev-db/mysql-bin/files/
dev-db/mysql-bin/files/rc6-bin-4.1.sh
dev-db/mysql-bin/files/digest-mysql-bin-4.1.10
dev-db/mysql-bin/files/sql-create-db-4.1.8
dev-db/mysql-bin/files/sql-create-db-5.0.0
dev-db/mysql-bin/files/logrotate.mysql
dev-db/mysql-bin/files/my.cnf-4.1
dev-db/mysql-bin/ChangeLog
dev-db/mysql-bin/metadata.xml
Comment 3 Tuan Van (RETIRED) gentoo-dev 2005-02-26 18:00:49 UTC
Please review http://www.gentoo.org/doc/en/ebuild-submit.xml for a brief howto submit ebuild.

<quote>
Attaching the Ebuild Script

After clicking submit on the Enter Bug page, you will go to the Posting Bug page. Take note of the bug number.

Toward the bottom of this page, there is a link to Create a new attachment. Click on this link.

Select the file using the text entry box or the Browse dialog. In the Description field, type the name of the ebuild file, much the same as you did in the Summary section of the last page.

Make sure that the content type is set to "text/plain", and that the radiobutton for select from list is marked.

There are no other required fields on this form. Click Submit and you are done!
</quote>
Comment 4 Francesco R. (RETIRED) gentoo-dev 2005-02-27 06:07:51 UTC
Created attachment 52233 [details]
mysql-bin-4.1.10.ebuild

Tuan, sorry for the garbage, was very tired at the moment of submitting, next
time I'll wait the day after.
Reattaching the plain text version of the ebuild.
Comment 5 Martin Mokrejš 2005-05-09 09:33:20 UTC
I tried that ebuild ... but ... I have sys-process/procps instead:

aquarius portage # emerge mysql-bin
Calculating dependencies -
emerge: there are no ebuilds to satisfy "sys-apps/procps".

aquarius portage # 
Comment 6 Martin Mokrejš 2005-05-09 10:00:49 UTC
I tried the ebuild, actually I renamed that to 4.1.11, downloaded standard-4.1.11 file, made ebuild digests and finally:

emerge mysql-bin

emerge decided to install 3 packages for me. The first was mysql-bin, but what a surprise the second package was mysql-4.0.24-r1 ... and it started to unpack the sources, patch stuff and ran configure. :(

Will attach the fixed ebuild for the procps problem.
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2005-05-09 10:27:19 UTC
*** Bug 91998 has been marked as a duplicate of this bug. ***
Comment 8 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-05-09 11:41:43 UTC
procps has moved in the tree, so you just need update it, sys-process/procps I think.

As for mysql being pulled in, you need to edit DBD-Mysql to come in on either mysql or mysql-bin packages.
Comment 9 Martin Mokrejš 2005-05-10 07:54:00 UTC
Created attachment 58567 [details]
update of the dev-db_mysql-bin.tar.gz file

added 4.1.11 ebuild and fixed the procps call.

emerging this package does the following (actually re-emerging shown):

# emerge -p mysql-bin

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] dev-db/mysql-bin-4.1.11  
[ebuild  N    ] dev-db/mysql-4.0.24-r1	
[ebuild  N    ] dev-ruby/mysql-ruby-2.5.2  

#
Comment 10 Martin Mokrejš 2005-05-10 10:19:14 UTC
Created attachment 58581 [details]
update of the dev-db_mysql-bin.tar.gz file #2

I've created a patch for safe_mysqld. That shell script starts mysqld in never
ending loop, actually the only exit out is when the pid_file is removed on
mysqlds shutdown.

To start mysqld, it first looks for ./mysql directory and if found bin/mysqld
or libexec/mysqld it reads the values from configfile and fires up mysqld.

Gentoo doesn't start doing "cd /opt/mysql-4.1.11 && ./bin/safe_mysqld ${OPTS}".

So, our approach is unsupported. Yesterday I've submitted a patch to
/etc/init.d/mysql which add --basedir to the arguments passed down to
safe_mysqld. I have realized that is not enough, because safe_mysqld doesn't
utilize that argument. So I wrote a patch for it.

I'd be almost finished, but mysqld wasn't started by safe_mysqld wrapper. It
turned out I had wrong language value in my.cnf. I removed that line but mysqld
 expects the language files to be in /usr/local/mysql/share/mysql/english/ as a
last resort. I don't have it. But why not to process the --basedir if
--language wasn't specified and try to look if we can find the files? So, I've
added processing of --language argument to safe_mysqld and let it to pass them
to mysqld. Unfortunately, mysql_config used by Gentoo's /etc/init.d/mysql
doesn't expose this variable from my.cnf file, so we just rely on the logic
I've implemented -- if the variable is unset in my.cnf, patched safe_mysqld at
least tries to set it to $basedir/share/mysql/english/ (if that exists).

So, at the moment, /etc/init.d/mysql starts safe_mysqld from $basedir/bin/
directory specified in my.cnf file. It gives it in addition --basedir and with
some effort could also pass --language so that Gentoo by default could remove
the annoying line "language = /usr/local/mysql-XXXXXX/share/mysql/english" from
my.cnf.

The major advantage of these changes is that whenever user modifies basedir in
my.cnf, Gentoo will start the *proper* safe_mysqld **and** proper mysqld.

I'm a bit new to portage, so the files/mysql file should be maybe a diff too,
but I've no idea where the "official" file lives. OK, that's your job now. ;)
Comment 11 Martin Mokrejš 2005-05-10 10:24:11 UTC
OK, I don't want to resubmit another patch. The .ebuild file should instruct the user to run the mysql_fix_privilege_tables command with full path!
Why? First, the older version do something totally different! Second, might be the user did not run "hash -r" before this command. and finally, it's a lot safer when multiple mysql installations are on the host.


What one should get:

# mysql_fix_privilege_tables --password=**** --socket=/var/run/mysqld/mysqld.sock --basedir=/opt/mysql-4.1.11
This script updates all the mysql privilege tables to be usable by
MySQL 4.0 and above.

This is needed if you want to use the new GRANT functions,
CREATE AGGREGATE FUNCTION, or the more secure passwords in 4.1

done
# 
Comment 12 Martin Mokrejš 2005-05-10 10:34:35 UTC
and yes, please add this line to the ebuild

PROVIDE="dev-db/mysql"

and alter DEPEND to like

DEPEND="
        !dev-db/mysql-src

(if you aggree the package when Gentoo users will compile binaries on their own will be renamed to mysql-src). ;-)
Comment 13 Martin Mokrejš 2005-05-10 13:16:32 UTC
dev-tcltk/mysqltcl-2.50 looks for 

checking for build with symbols... no
checking for mysql header... configure: error: Cannot find mysql.h in /usr/include/mysql use -with-mysql-include=?

!!! Please attach the config.log to your bug report:
!!! /var/tmp/portage/mysqltcl-2.50/work/mysqltcl-2.50/config.log

I think the ebuild should make the symlinks.

/usr/include # ln -s /opt/mysql-4.1.11/include mysql
/usr/lib # ln -s /opt/mysql-4.1.11/lib mysql



And yes, the ebuild must be modified to download also MySQL-shared-compat-4.1.11-0.i386.rpm or MySQL-shared-4.1.11-0.i386.rpm.
It is a bit misfortunate but the dynamic libraries are not available as tar.gz files.



And, if USE=icc then I think ebuild should download icc compiled binaries instead. I used to use them some months ago and they were excellent!
At the moment I use the gcc binaries installed by this ebuild. ;)
Comment 14 Martin Mokrejš 2005-06-12 03:09:15 UTC
Unmerging this ebuild leaves me with:

# ls -la /usr/include/mysql
lrwxrwxrwx  1 root root 25 May 10 22:06 /usr/include/mysql ->
/opt/mysql-4.1.11/include
# ls -la /usr/lib/mysql
lrwxrwxrwx  1 root root 21 May 10 22:07 /usr/lib/mysql -> /opt/mysql-4.1.11/lib
#
Comment 15 Martin Mokrejš 2005-06-12 03:30:32 UTC
Created attachment 61101 [details]
update of the dev-db_mysql-bin.tar.gz file #3

It seems last time I forgot to upload the patches I was talking about.
Comment 16 Francesco R. (RETIRED) gentoo-dev 2005-06-19 08:01:31 UTC
Created attachment 61496 [details]
mysql-bin-20050619.tar.gz overlay for binary mysq

Patches and suggestion from Martin Mokrejs are not contained in this overlay,
this happen _only_ because I didn't had the time to review them as good as it
should be done. Will do that shortly in the future.
Changes:
- added support for "icc" compiled binaryes.
- modified /etc/init.d/my.cnf to launc the server from $basedir
- updated to 5.0.7_beta
- rewritten the code incompatible with portage cache
- added shared libraries from rpm
- sincronized pkg_config with newer/better ebuilds
Comment 17 Francesco R. (RETIRED) gentoo-dev 2006-03-18 04:39:50 UTC
lost interest in this, too much bandwidth and effort needed to keep it up to date.