Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 88490 - some packages require mysql, when libmysqlclient would suffice - requesting a split
Summary: some packages require mysql, when libmysqlclient would suffice - requesting a...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 88071
  Show dependency tree
 
Reported: 2005-04-09 10:18 UTC by Kyle England (RETIRED)
Modified: 2005-07-11 18:59 UTC (History)
4 users (show)

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


Attachments
libmysqlclient-4.1.11.ebuild (libmysqlclient-4.1.11.ebuild,5.92 KB, text/plain)
2005-04-09 17:13 UTC, Francesco R. (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle England (RETIRED) gentoo-dev 2005-04-09 10:18:33 UTC
mod_log_sql is a package that doesn't need mysql, only libmysqlclient

If I'm wanting to log to a remote MySQL server, installing MySQL locally should not be required.  I have no idea how hard it is to do such a thing, but it would be nice if there was a package for just the client stuff.  I'm sure many people are hesitant to throw MySQL on every server they want to use mod_log_sql on.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Francesco R. (RETIRED) gentoo-dev 2005-04-09 11:16:23 UTC
try to explain myself better than in bug 88071 c.1

look at this command output

# ldd /usr/lib/apache2/modules/mod_log_sql_mysql.so
        linux-gate.so.1 =>  (0xffffe000)
        libmysqlclient.so.12 => (0xb8ffe000)
        libm.so.6 => /lib/libm.so.6 (0xb7fc2000)
        libz.so.1 => /lib/libz.so.1 (0xb7fb1000)
        libc.so.6 => /lib/libc.so.6 (0xb7e9a000)
        /lib/ld-linux.so.2 (0x80000000)

this are the libraries "linked" with mod_log_sql shared object (so) that connect effectively to MySQL.

the second row of the output show "libmysqlclient.so.12" this is another so that came *only* from building mysql.

New ebuilds have the "minimal" use flag. This flag build the server with "configure --without-server" . 
explaining better this last point. You still need to download ALL the package from MySQL site *BUT* only the libraries will be installed.

So already exist a ebuild *ONLY* for libraries it's =dev-db/mysql-4.0.24-r1 (actually ~x86 masked) .

further note: at the moment "--without-server" compile the server too (remember I've say it is not /installed/) . We simply can't avoid it, because there is no way to do it.

Comment 2 Christian Parpart (RETIRED) gentoo-dev 2005-04-09 12:24:46 UTC
I vote for it, a seperate build for libmysqlclient-VERSION.ebuild. though, reopening bug 88071.
Comment 3 Francesco R. (RETIRED) gentoo-dev 2005-04-09 13:15:55 UTC
libmysqlclient-VERSION.ebuild -VS- USE="minimal" mysql

PRO
- with portage-2.1 can coexist two slotted version for 4.0 and 4.1
VERSUS
- it's a block for dev-db/mysql
- timings are the same, both download and build
- require to almost duplicate a long ebuild + patches
- "minimal" is a global use flag used into a lot of big packages. We don't need to inform users that it's there. This is not valid for libmysqlclient-VERSION.ebuild . The users must know about it.

addition to both pro and versus are welcome.
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-04-09 14:00:26 UTC
This is exactly why the 'minimal' USE flag was added to MySQL, so that you don't need to have all of mysql on a system that only talks to a remote MySQL server.

I would however like to make it possible to have all libs on a system, ideally in this fashion:
dev-db/mysql-3.23* USE=minimal SLOT=3.23
dev-db/mysql-4.0* USE=minimal SLOT=4.0
dev-db/mysql-4.1* SLOT=4.1
(and later when 5.0 is further to stable, have 4.1 with USE=minimal, and 5.0 full).

I don't know the status of slotting based on USE flags, but there should be at most a single installation of MySQL that doesn't have USE=minimal.
Comment 5 Christian Parpart (RETIRED) gentoo-dev 2005-04-09 15:59:35 UTC
"minimal" is really null and void descriptive. sorry, but it doesn't tell me that it cuts out the server side code and only includes the client side code or vice versa.

Instead "minimal" tells me that mysql got cut down to the mimimal working set, e.g. by removing all removable features for minimal disk size, expecting to get minimal feature set (implicitely), too, of course.

a "client-only" or "server-only" useflag are more appropriate. However, they are at least as questionable as the "noXXXX" useflags actually around like heaps.

Although, some words against some contra:
* Creating an mysql eclass and inheriting from it solves that duplicated code issue.
* it's no block for dev-db/mysql. why should it be? it would just block older version ebuilds because they didn't get updated.
* the timing is no issue. why would it?

> - "minimal" is a global use flag used into a lot of big packages. We don't need to inform users that it's there. This is not valid for libmysqlclient-VERSION.ebuild . The users must know about it.

Well.. IMHO, this is not true at all, at least for the reasons I brought up at first (wrt "minimal").
Although, ideally, no user has to emerge libmysqlclient-PV.ebuild explicitely. it's just a DEPEND and though, get installed implicitely. So, why this ebuild anyway? Easy, it saves disk space and lows down security risk becuase less executable code is on the disk (e.g. server). Might be somewhat paranoid, but yet, guys might think that way.

p.s.: robbat2? you got my mail from yesterday? we're actually in channel and about to start. would you mind in attending the session (regarding to svn migration).

pps: if no one voluniers in maintaining mysql this way, I do.

Regards,
Christian Parpart.
Comment 6 Francesco R. (RETIRED) gentoo-dev 2005-04-09 17:13:10 UTC
Created attachment 55816 [details]
libmysqlclient-4.1.11.ebuild

> it's no block for dev-db/mysql. why should it be? it would just block older
version ebuilds because they didn't get updated.

dev-db/mysql is a superset of dev-db/libmysqlclient-VERSION , so one need to
block the other (they have common files). Block or virtual is needed.

On the other things we can discuss untill tomorrow ;)

Attached is a stripped version of mysql-4.1.ebuild it's suitable for the work
you want to do (also for 4.0) but as is it has never been tested (really it's a
30 sec cut and paste).
Take it as a starting point.

P.S. I still disagree ;)

good luck
Comment 7 Vincenzo Romano 2005-04-15 23:20:24 UTC
Hello all.
Something very similar happens to my php.
If I try to "emerge -u php" and I have not the mysql USE flag, I get:
----| from output |....
checking for fopencookie... yes
configure: error: can not run test program while cross compiling

!!! Please attach the config.log to your bug report:
!!! /var/tmp/portage/mod_php-4.3.11/work/php-4.3.11/config.log

!!! ERROR: dev-php/mod_php-4.3.11 failed.
!!! Function econf, Line 485, Exitcode 0
!!! econf failed
!!! If you need support, post the topmost build error, NOT this status message.
----| from config.log |----
configure:13990: checking for fopencookie
configure:14018: gcc -o conftest -O3 -march=pentium4 -fomit-frame-pointer -pipe   -L/usr/X11R6/lib -ltiff -L/usr/lib conftest.c -lm  -lxmlparse -lxmltok 1>&5
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/../../../../i686-pc-linux-gnu/bin/ld: warning: libmysqlclient.so.12, needed by /usr/X11R6/lib/libxmlparse.so, not found (try using -rpath or -rpath-link)
configure:14049: gcc -c -O3 -march=pentium4 -fomit-frame-pointer -pipe  conftest.c 1>&5
----
Of course I have no mysql package installed.
It seems that I'd try to re-emerge libxmlparse.so w/o mysql (I used to have mysql among USE flags), but don't know which ebuild contains it.

This is my emerge --info:
----| emerge --info |----
Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5-20050130-vanilla, glibc-2.3.4.20041102-r1, 2.6.11-ck4 i686)
=================================================================
System uname: 2.6.11-ck4 i686 Mobile Intel(R) Pentium(R) 4     CPU 3.06GHz
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb  7 2005, 07:43:01)]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r7
sys-devel/libtool:   1.5.14
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=pentium4 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=pentium4 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://ftp.lug.ro/gentoo/ http://ftp.ntua.gr/pub/linux/gentoo/"
LINGUAS="it en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X Xaw3d acpi apache2 arts avi bash-completion berkdb bitmap-fonts cdr crypt cups curl devfs26 dvd dvdr emboss encode esd fam fastcgi fbcon fftw firebird flac flash foomaticdb fortran gcjgd gdbm gif gphoto2 gpm gps gstreamer gtk2 hardened imagemagick imap imlib innodb ipv6 jack java jpeg junit kde lcms ldap lesstif libg++ libwww lirc mad maildir mikmod mmx motif mozilla mp3 mpeg mpi ncurses nls ogg oggvorbis opengl oss pam pda pdflib perl png postgres python qt quicktime readline samba scanner sdl slang slp speex spell sse ssl svga tcltk tcpd tiff truetype truetype-fonts type1-fonts unicode usb vorbis wmf xml xml2 xmms xosd xv zlib linguas_it linguas_en"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY
----
Comment 8 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-05-31 15:11:17 UTC
if gentoo policy ever changes to prefer seperate client/server builds, we can
revisit this.