Gentoo Development Guide
MYSQL.ECLASS
Section: portage (5)Updated: May 2013
Index Return to Main Contents
NAME
mysql.eclass - This eclass provides most of the functions for mysql ebuildsDESCRIPTION
The mysql.eclass provides almost all the code to build the mysql ebuilds including the src_unpack, src_prepare, src_configure, src_compile, scr_install, pkg_preinst, pkg_postinst, pkg_config and pkg_postrm phase hooks.FUNCTIONS
- mysql_disable_test
- Helper function to disable specific tests.
- mysql_init_vars
- void mysql_init_vars() Initialize global variables 2005-11-19 <vivo@gentoo.org>
- mysql_pkg_setup
-
Perform some basic tests and tasks during pkg_setup phase:
die if FEATURES="test", USE="-minimal" and not using FEATURES="userpriv"
check for conflicting use flags
create new user and group for mysql
warn about deprecated features - mysql_src_unpack
- Unpack the source code and call mysql_src_prepare for EAPI < 2.
- mysql_src_prepare
- Apply patches to the source code and remove unneeded bundled libs.
- mysql_src_configure
- Configure mysql to build the code for Gentoo respecting the use flags.
- mysql_src_compile
- Compile the mysql code.
- mysql_src_install
- Install mysql.
- mysql_pkg_preinst
- Create the user and groups for mysql - die if that fails.
- mysql_pkg_postinst
-
Run post-installation tasks:
create the dir for logfiles if non-existant
touch the logfiles and secure them
install scripts
issue required steps for optional features
issue deprecation warnings - mysql_getopt
- Use my_print_defaults to extract specific config options
- mysql_getoptval
- Use my_print_defaults to extract specific config options
- mysql_pkg_config
- Configure mysql environment.
- mysql_pkg_postrm
- Remove mysql symlinks.
ECLASS VARIABLES
- MYSQL_PV_MAJOR = "$(get_version_component_range 1-2 ${PV})"
- Upstream MySQL considers the first two parts of the version number to be the major version. Upgrades that change major version should always run mysql_upgrade.
- MYSQL_VERSION_ID
- MYSQL_VERSION_ID will be: major * 10e6 + minor * 10e4 + micro * 10e2 + gentoo revision number, all [0..99] This is an important part, because many of the choices the MySQL ebuild will do depend on this variable. In particular, the code below transforms a $PVR like "5.0.18-r3" in "5001803" We also strip off upstream's trailing letter that they use to respin tarballs
- MYSQL_COMMUNITY_FEATURES
- Specifiy if community features are available. Possible values are 1 (yes) and 0 (no). Community features are available in mysql-community AND in the re-merged mysql-5.0.82 and newer
- XTRADB_VER = "${XTRADB_VER}"
- Version of the XTRADB storage engine
- PERCONA_VER = "${PERCONA_VER}"
- Designation by PERCONA for a MySQL version to apply an XTRADB release
AUTHORS
Francesco Riosa (Retired) <vivo@gentoo.org>
MAINTAINERS
MySQL Team <mysql-bugs@gentoo.org> Luca Longinotti <chtekk@gentoo.org> Robin H. Johnson <robbat2@gentoo.org>
REPORTING BUGS
Please report bugs via http://bugs.gentoo.org/FILES
/usr/portage/eclass/mysql.eclassSEE ALSO
ebuild(5)http://sources.gentoo.org/eclass/mysql.eclass?view=log
Index
This document was created by man2html, using the manual pages.
Time: 03:25:02 GMT, May 19, 2013