/[gentoo-x86]/dev-db/mariadb/mariadb-5.3.6.ebuild
Gentoo

Contents of /dev-db/mariadb/mariadb-5.3.6.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Wed May 9 06:50:24 2012 UTC (2 years, 4 months ago) by zmedico
Branch: MAIN
Changes since 1.1: +2 -2 lines
Move EAPI assignment to top of ebuild, bug 411875.

(Portage version: 2.2.0_alpha102_p2/cvs/Linux i686)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-db/mariadb/mariadb-5.3.6.ebuild,v 1.1 2012/04/18 02:14:09 robbat2 Exp $
4
5 EAPI="4"
6 MY_EXTRAS_VER="20120416-2021Z"
7
8 # Build system
9 BUILD="autotools"
10
11 # Suffix on files...
12 #MY_PV="$PV-ga"
13
14 inherit toolchain-funcs mysql-v2
15 # only to make repoman happy. it is really set in the eclass
16 IUSE="$IUSE"
17
18 # REMEMBER: also update eclass/mysql*.eclass before committing!
19 KEYWORDS="~amd64 ~s390 ~sh ~x86 ~sparc-fbsd ~x86-fbsd"
20
21 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
22 EPATCH_EXCLUDE=''
23
24 DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
25 RDEPEND="${RDEPEND}"
26
27 # Please do not add a naive src_unpack to this ebuild
28 # If you want to add a single patch, copy the ebuild to an overlay
29 # and create your own mysql-extras tarball, looking at 000_index.txt
30 src_prepare() {
31 sed -i \
32 -e '/^noinst_PROGRAMS/s/basic-t//g' \
33 "${S}"/unittest/mytap/t/Makefile.am
34 mysql-v2_src_prepare
35 }
36
37 # Official test instructions:
38 # USE='berkdb -cluster embedded extraengine perl ssl community' \
39 # FEATURES='test userpriv -usersandbox' \
40 # ebuild mariadb-X.X.XX.ebuild \
41 # digest clean package
42 src_test() {
43 # Bug #213475 - MySQL _will_ object strenously if your machine is named
44 # localhost. Also causes weird failures.
45 [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
46
47 emake check || die "make check failed"
48 if ! use "minimal" ; then
49 if [[ $UID -eq 0 ]]; then
50 die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
51 fi
52 has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
53 cd "${S}"
54 einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
55 local retstatus_unit
56 local retstatus_ns
57 local retstatus_ps
58 local t
59 addpredict /this-dir-does-not-exist/t9.MYI
60
61 # Ensure that parallel runs don't die
62 export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
63
64 # The entire 5.0 series has pre-generated SSL certificates, they have
65 # mostly expired now. ${S}/mysql-tests/std-data/*.pem
66 # The certs really SHOULD be generated for the tests, so that they are
67 # not expiring like this. We cannot do so ourselves as the tests look
68 # closely as the cert path data, and we do not have the CA key to regen
69 # ourselves. Alternatively, upstream should generate them with at least
70 # 50-year validity.
71 #
72 # Known expiry points:
73 # 4.1.*, 5.0.0-5.0.22, 5.1.7: Expires 2013/09/09
74 # 5.0.23-5.0.77, 5.1.7-5.1.22?: Expires 2009/01/27
75 # 5.0.78-5.0.90, 5.1.??-5.1.42: Expires 2010/01/28
76 #
77 # mysql-test/std_data/untrusted-cacert.pem is MEANT to be
78 # expired/invalid.
79 case ${PV} in
80 5.1.*|5.5.*)
81 for t in openssl_1 rpl_openssl rpl.rpl_ssl rpl.rpl_ssl1 ssl ssl_8k_key \
82 ssl_compress ssl_connect rpl.rpl_heartbeat_ssl ; do \
83 mysql-v2_disable_test \
84 "$t" \
85 "These OpenSSL tests break due to expired certificates"
86 done
87 ;;
88 esac
89
90 # These are also failing in MySQL 5.1 for now, and are believed to be
91 # false positives:
92 #
93 # main.mysql_comment, main.mysql_upgrade, main.information_schema,
94 # funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers:
95 # fails due to USE=-latin1 / utf8 default
96 #
97 # main.mysql_client_test:
98 # segfaults at random under Portage only, suspect resource limits.
99 #
100 # main.not_partition:
101 # Failure reason unknown at this time, must resolve before package.mask
102 # removal FIXME
103 case ${PV} in
104 5.1.*|5.2.*|5.3.*|5.5.*)
105 for t in main.mysql_client_test main.mysql_comments \
106 main.mysql_upgrade \
107 main.information_schema \
108 main.not_partition funcs_1.is_columns_mysql \
109 funcs_1.is_tables_mysql funcs_1.is_triggers; do
110 mysql-v2_disable_test "$t" "False positives in Gentoo"
111 done
112 ;;
113 esac
114
115 # New failures in 5.1.50/5.1.51, reported by jmbsvicetto.
116 # These tests are picking up a 'connect-timeout' config from somewhere,
117 # which is not valid, and since it does not have 'loose-' in front of
118 # it, it's causing a failure
119 case ${PV} in
120 5.1.5*|5.5.*|6*)
121 for t in rpl.rpl_mysql_upgrade main.log_tables_upgrade ; do
122 mysql-v2_disable_test "$t" \
123 "False positives in Gentoo: connect-timeout"
124 done
125 ;;
126 esac
127
128 use profiling && use community \
129 || mysql-v2_disable_test main.profiling \
130 "Profiling test needs profiling support"
131
132 if [ "${PN}" == "mariadb" ]; then
133 for t in \
134 parts.part_supported_sql_func_ndb \
135 parts.partition_auto_increment_ndb ; do
136 mysql-v2_disable_test $t "ndb not supported in mariadb"
137 done
138 fi
139
140 # create directories because mysqladmin might make out of order
141 mkdir -p "${S}"/mysql-test/var-{ps,ns}{,/log}
142
143 # We run the test protocols seperately
144 emake test-unit
145 retstatus_unit=$?
146 [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
147
148 emake test-ns force="--force --vardir=${S}/mysql-test/var-ns"
149 retstatus_ns=$?
150 [[ $retstatus_ns -eq 0 ]] || eerror "test-ns failed"
151 has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
152
153 emake test-ps force="--force --vardir=${S}/mysql-test/var-ps"
154 retstatus_ps=$?
155 [[ $retstatus_ps -eq 0 ]] || eerror "test-ps failed"
156 has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
157
158 # TODO:
159 # When upstream enables the pr and nr testsuites, we need those as well.
160
161 # Cleanup is important for these testcases.
162 pkill -9 -f "${S}/ndb" 2>/dev/null
163 pkill -9 -f "${S}/sql" 2>/dev/null
164 failures=""
165 [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
166 [[ $retstatus_ns -eq 0 ]] || failures="${failures} test-ns"
167 [[ $retstatus_ps -eq 0 ]] || failures="${failures} test-ps"
168 has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
169 [[ -z "$failures" ]] || die "Test failures: $failures"
170 einfo "Tests successfully completed"
171 else
172 einfo "Skipping server tests due to minimal build."
173 fi
174 }

  ViewVC Help
Powered by ViewVC 1.1.20