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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Fri Apr 13 17:55:05 2012 UTC (2 years, 5 months ago) by ulm
Branch: MAIN
Changes since 1.2: +2 -2 lines
Move EAPI assignment to top of ebuild, bug 411875.

(Portage version: 2.1.10.56/cvs/Linux x86_64)

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

  ViewVC Help
Powered by ViewVC 1.1.20