Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 52233 Details for
Bug 83424
dev-db/mysql-bin ebuild (New package)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
mysql-bin-4.1.10.ebuild
mysql-bin-4.1.10.ebuild (text/plain), 9.18 KB, created by
Francesco R. (RETIRED)
on 2005-02-27 06:07:51 UTC
(
hide
)
Description:
mysql-bin-4.1.10.ebuild
Filename:
MIME Type:
Creator:
Francesco R. (RETIRED)
Created:
2005-02-27 06:07:51 UTC
Size:
9.18 KB
patch
obsolete
># Copyright 1999-2005 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 ># $Header: $ > ># there are redundant chown, remove them > >inherit eutils versionator ># "ssl" is used in src_test() >IUSE="debug max innodb ruby selinux utf8 ssl" >MYTYPE="standard" > >if use max; then > MYTYPE="max" >else > if use debug; then > MYTYPE="debug" > fi >fi > >NEWP="mysql-${MYTYPE}-${PV}" >case "${ARCH}" in > x86) NEWP="${NEWP}-pc-linux-gnu-i686" ;; > alpha) NEWP="${NEWP}-unknown-linux-gnu-alphaev6" ;; > amd64) NEWP="${NEWP}-unknown-linux-gnu-x86_64-glibc23" ;; > ia64) NEWP="${NEWP}-unknown-linux-gnu-ia64-glibc23" ;; > ppc) NEWP="${NEWP}-unknown-linux-gnu-powerpc" ;; > ppc64) NEWP="${NEWP}-unknown-linux-gnu-powerpc" ;; > ppc-macos) NEWP="${NEWP}-unknown-linux-gnu-powerpc" ;; > s390) NEWP="${NEWP}-ibm-linux-gnu-s390";; > arm) NEWP="${NEWP}" die "Not supported";; > hppa) NEWP="${NEWP}" die "Not supported";; > mips) NEWP="${NEWP}" die "Not supported";; > sh) NEWP="${NEWP}" die "Not supported";; > sparc) NEWP="${NEWP}" die "Not supported";; > *) NEWP="${NEWP}" die "Not supported";; >esac > >SVER=$(get_version_component_range 1-2) > >SRC_URI="mirror://mysql/Downloads/MySQL-${SVER}/${NEWP}.tar.gz" > >S=${WORKDIR}/${NEWP} > >DESCRIPTION="A fast, multi-threaded, multi-user SQL database server" >HOMEPAGE="http://www.mysql.com/" > >LICENSE="GPL-2" >SLOT="0" >KEYWORDS="~x86" > >RESTRICT="nomirror" > >DEPEND=" > !dev-db/mysql > perl? ( dev-lang/perl ) > sys-apps/procps > >=sys-apps/texinfo-4.7 > >=sys-apps/sed-4" >PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 ) > ruby? ( >=dev-ruby/mysql-ruby-2.5 )" >RDEPEND="${DEPEND} selinux? ( sec-policy/selinux-mysql )" > >warning() { > ewarn "" > ewarn "If you're upgrading from MySQL-3.x to 4.0, or 4.0.x to 4.1.x, you" > ewarn "must recompile the other packages on your system that link with" > ewarn "libmysqlclient after the upgrade completes. To obtain such a list" > ewarn "of packages for your system, you may use 'revdep-rebuild' from" > ewarn "app-portage/gentoolkit." > ewarn "" > ewarn "MySQL 4.1 stores table names and column names in UTF8." > ewarn "If you have table names or column names that use characters" > ewarn "outside of the standard 7-bit US-ASCII range, you may have to" > ewarn "do a mysqldump of your tables in MySQL 4.0 and restore them" > ewarn "after upgrading to MySQL 4.1." > ewarn "" > ewarn "After upgrading, update the grant tables to have the new longer" > ewarn "Password column. To fix it you need to run:" > ewarn "# /etc/init.d/mysql start" > ewarn "# mysql_fix_privilege_tables --password=root_password" > ewarn "If you don't do this, MySQL will not use the new more secure" > ewarn "protocol to authenticate." > ewarn "" > einfo "There are also changes in replication and bdb tables, a more" > einfo "in deep explanation is avaiable at MySQL website." > einfo "You may want to upgrade also dev-php/*php." > einfo "" > einfo "You can also choose to preview the new MySQL 4.1 behaviour" > einfo "under 4.0 by adding a row with the word \"new\" in the [mysqld]" > einfo "section of your /etc/mysql/my.cnf (you need a recent MySQL version)" > > use debug && use max \ > && ewarn "both \"debug\" and \"max\" are setted, defaulted to \"${MYTYPE}\"" >} > ># retrieve the hostname in a (hope that) multiplatform safe manner >get_hostname() { > local hostname="$(hostname 2>/dev/null)" > hostname="${hostname%%.*}" > if [[ -z "${hostname}" ]] ; then > # uh on what arch/os are you ? I will give you another possibility > hostname=$(uname -n 2>/dev/null) > if [[ -z "${hostname}" ]] ; then > # hey dude we still do not support windoz ! > hostname="localhost" > fi > fi > echo "${hostname}" >} > > >pkg_setup() { > warning > epause 10 >} > >src_compile() { >: >} > >src_test() { > local myconf="--local --fast --force" > > cd "${S}/mysql-test/" > > # The "mysql-test-run" script cannot skip more than one test > # so we need to manually move the offending tests > > # this one generate sandbox violations > # symlink.test generate sandbox access violations > # open_wr: /this-dir-does-not-exist/t9.MYI > #mv t/symlink.test t/symlink.nasty > addpredict "/this-dir-does-not-exist/t9.MYI" > > > # nptl, headers > 2.6.8, glibc-2.3.4.20050125, > # x86_64-pc-linux-gnu-3.4.3 > # [DIRTY] rpl_openssl script frozen with no hope > # does ssl work outside sandbox ? > mv t/rpl_openssl.test t/rpl_openssl.nasty > > # nptl, headers > 2.6.8, glibc-2.3.4.20050125, > # x86_64-pc-linux-gnu-3.4.3 > # [DIRTY] *ndb* tests fail > # dmesg show > # factorial[17891]: segfault at 0000000000020f11 rip 0000000000402ef2 rsp 00007fffffffda70 error 4 > # ndbd[26967]: segfault at 0000000040000fd8 rip 00002aaaaabc6587 rsp 0000000040000fe0 error 6 > use max && myconf="${myconf} --with-ndbcluster" > use ssl && myconf="${myconf} --with-openssl" > use debug && myconf="${myconf} --debug" > > ./mysql-test-run ${myconf} > > if [[ $? -ne 0 ]]; then > ewarn "test finished: THERE ARE FAILED TESTs" > einfo "mysqldump.test is known to fail because of use of missing" > einfo " (cp850) charset" > # [DIRTY] force a positive result for the moment (2005-02-20) > # in the future only fully compliant versions should be installed > true > else > einfo "test finished:" > fi > > # to be sure ;) > pkill -9 -f ${S}/ndb/src/kernel/ndbd > pkill -9 -f ${S}/ndb/src/mgmsrv/ndb_mgmd > pkill -9 -f ${S}/ndb/src/mgmclient/ndb_mgm > pkill -9 -f ${S}/sql/mysqld >} > >src_install() { > diropts "-m0750" > local MYD="opt/mysql-${PV}" > local mytmp=$( emktemp ) > > mkdir --mode=0755 --parents "${D}/${MYD}" > mv ${S}/* "${D}/${MYD}/" > chown -r root:root "${D}/${MYD}" > > dodir /var/lib/mysql /var/run/mysqld /var/log/mysql /etc/mysql > touch ${D}/var/lib/mysql/.keep \ > ${D}/var/run/mysqld/.keep \ > ${D}/var/log/mysql/.keep > chown -R mysql:mysql ${D}/var/lib/mysql \ > ${D}/var/run/mysqld \ > ${D}/var/log/mysql > > cd "${D}/${MYD}" > # move client libs, install a couple of missing headers > dosym lib /usr/$(get_libdir)/mysql/ > dosym include /usr/include/mysql/ > cd "${D}/${MYD}/bin" > dosym mysqlaccess.conf /etc/mysql/ > > insinto /etc/mysql > sed -e "s/@PV@/${PV}/" "${FILESDIR}/my.cnf-4.1" > "${mytmp}" > if ! use utf8; then > sed --in-place "s/utf8/latin1/" \ > "${mytmp}" > fi > if use innodb; then > sed --in-place \ > "s/^skip-innodb/#skip-innodb/" \ > "s/^#innodb_/innodb_/" \ > "${mytmp}" > fi > newins "${mytmp}" my.cnf > # this is needed for the clients > cd "${D}/etc/" > ln -sf mysql/my.cnf my.cnf > > exeinto /etc/init.d > sed -e "s/@PV@/${PV}/" "${FILESDIR}/rc6-bin-4.1.sh" > "${mytmp}" > newexe "${mytmp}" mysql > > insinto /etc/logrotate.d > newins ${FILESDIR}/logrotate.mysql mysql > > # add PATH, ROOTPATH and MANPATH > insinto /etc/env.d > echo "PATH=\"$( strip_duplicate_slashes "${ROOT}/opt/mysql-${PV}/bin" )\"" > "${mytmp}" > echo "MANPATH=\"$( strip_duplicate_slashes "${ROOT}/opt/mysql-${PV}/man" )\"" >> "${mytmp}" > echo "ROOTPATH=\"$( strip_duplicate_slashes "${ROOT}/opt/mysql-${PV}/bin" )\"" >> "${mytmp}" > newins "${mytmp}" 98mysql > >} > >pkg_config() { > local DATADIR="" > local timestamp="" > local pwd1="a" > local pwd2="b" > > if [[ -f '/etc/mysql/my.cnf' ]] ; then > DATADIR=`${ROOT}/opt/mysql-${PV}/bin/my_print_defaults mysqld \ > | sed -ne '/datadir/s|^--datadir=||p' | tail -n1` > fi > if [[ -z "${DATADIR}" ]]; then > DATADIR="${ROOT}/var/lib/mysql/" > einfo "Using default DATADIR" > fi > einfo "MySQL DATADIR is ${DATADIR}" > > if [[ -d "${DATADIR}/mysql" ]] ; then > timestamp=$(/usr/bin/date +"%Y%m%d%H%M") > ewarn "You have already a mysql database in place." > ewarn "Press enter to RENAME it to \"my${timestamp}\"" > ewarn "Press \"Contrl-C\" to abort now..." > read > mv "${DATADIR}/mysql" "${DATADIR}/my${timestamp}" > fi > einfo "Creating the mysql database and setting proper" > einfo "permissions on it..." > > mkdir -p "${ROOT}/var/lib/mysql/mysql/../test" > > # MySQL 5.0 don't ned this > chown -R mysql:mysql ${DATADIR} > > einfo "Insert a password for the mysql 'root' user" > ewarn "the password will be visible on the screen" > > echo -n " >" && read -r pwd1 > einfo "Check the password" > echo -n " >" && read -r pwd2 > > if (( pwd1 != pwd2 )) ; then > ewarn "Passwords are not the same" > die > fi > > sed -e "s/@HOST@/$(get_hostname)/" \ > -e "s/@PWD@/${pwd1}/" \ > "${FILESDIR}/sql-create-db-4.1.8" \ > > "${T}/create-db.sql" > > cat "${T}/create-db.sql" \ > "${ROOT}/opt/mysql-${PV}/share/fill_help_tables.sql" \ > | "${ROOT}/opt/mysql-${PV}/bin/mysqld" \ > --bootstrap \ > --skip-grant-tables \ > --basedir="${ROOT}/opt/mysql-${PV}" \ > --datadir=/var/lib/mysql \ > --skip-innodb \ > --skip-bdb \ > --skip-ndbcluster \ > --max_allowed_packet=8M \ > --net_buffer_length=16K > > # changing ownership of newly created databases to mysql.mysql > chown -R mysql:mysql ${DATADIR} > chmod 0750 ${DATADIR} >} > >pkg_preinst() { > enewgroup mysql 60 || die "problem adding group mysql" > enewuser mysql 60 /dev/null /var/lib/mysql mysql \ > || die "problem adding user mysql" >} > >pkg_postinst() { > > env-update > > # secure the logfiles... does this bother anybody? > touch ${ROOT}/var/log/mysql/mysql.{log,err} > chown mysql:mysql ${ROOT}/var/log/mysql/mysql* > chmod 0660 ${ROOT}/var/log/mysql/mysql* > # secure some directories > chmod 0750 ${ROOT}/var/log/mysql ${ROOT}/var/lib/mysql ${ROOT}/var/run/mysqld > > warning > > # your friendly public service announcement... > einfo > einfo "You need to run env-update to get a working installation" > 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 > >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 83424
:
52202
|
52233
|
58567
|
58581
|
61101
|
61496