summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2012-11-11 01:59:58 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2012-11-11 01:59:58 +0000
commit3be8d54741820669b3f2d004d156bf7f759255b4 (patch)
tree1b59c992ddd9a0d1257b650cef74a1880c889646 /dev-db/drizzle
parentFix xdm init script for entrance, bug #439760. (diff)
downloadgentoo-2-3be8d54741820669b3f2d004d156bf7f759255b4.tar.gz
gentoo-2-3be8d54741820669b3f2d004d156bf7f759255b4.tar.bz2
gentoo-2-3be8d54741820669b3f2d004d156bf7f759255b4.zip
Version bump; support boost-1.50 and later; add a dependency on libaio, and an optional one on v8 (unstable); install a new init script that supports /run more easily; the init script is known to fail with RANDMMAP is enabled, problem not fixed yet.
(Portage version: 2.2.0_alpha142/cvs/Linux x86_64, signed Manifest commit with key 1CD13C8AD4301342)
Diffstat (limited to 'dev-db/drizzle')
-rw-r--r--dev-db/drizzle/ChangeLog11
-rw-r--r--dev-db/drizzle/drizzle-7.2.4.ebuild159
-rw-r--r--dev-db/drizzle/files/drizzle-7.2.4+boost-1.50.patch90
-rw-r--r--dev-db/drizzle/files/drizzle.init.d.2126
-rw-r--r--dev-db/drizzle/metadata.xml4
5 files changed, 389 insertions, 1 deletions
diff --git a/dev-db/drizzle/ChangeLog b/dev-db/drizzle/ChangeLog
index 9e42b3fa7973..2c9547ed927d 100644
--- a/dev-db/drizzle/ChangeLog
+++ b/dev-db/drizzle/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for dev-db/drizzle
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/drizzle/ChangeLog,v 1.30 2012/09/19 05:25:54 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/drizzle/ChangeLog,v 1.31 2012/11/11 01:59:58 flameeyes Exp $
+
+*drizzle-7.2.4 (11 Nov 2012)
+
+ 11 Nov 2012; Diego E. Pettenò <flameeyes@gentoo.org> +drizzle-7.2.4.ebuild,
+ +files/drizzle-7.2.4+boost-1.50.patch, +files/drizzle.init.d.2, metadata.xml:
+ Version bump; support boost-1.50 and later; add a dependency on libaio, and an
+ optional one on v8 (unstable); install a new init script that supports /run
+ more easily; the init script is known to fail with RANDMMAP is enabled,
+ problem not fixed yet.
*drizzle-7.2.3 (19 Sep 2012)
diff --git a/dev-db/drizzle/drizzle-7.2.4.ebuild b/dev-db/drizzle/drizzle-7.2.4.ebuild
new file mode 100644
index 000000000000..58392c5ec35f
--- /dev/null
+++ b/dev-db/drizzle/drizzle-7.2.4.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/drizzle/drizzle-7.2.4.ebuild,v 1.1 2012/11/11 01:59:58 flameeyes Exp $
+
+EAPI=5
+
+inherit flag-o-matic libtool autotools eutils pam user versionator
+
+MY_P="${P}-alpha"
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="Database optimized for Cloud and Net applications"
+HOMEPAGE="http://drizzle.org"
+SRC_URI="http://launchpad.net/drizzle/$(get_version_component_range 1-2)/${PV}/+download/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug tcmalloc doc memcache curl pam gearman +md5 ldap v8"
+
+RDEPEND="tcmalloc? ( dev-util/google-perftools )
+ sys-libs/readline
+ sys-apps/util-linux
+ dev-libs/libpcre
+ dev-libs/openssl
+ >=dev-libs/libevent-1.4
+ >=dev-libs/protobuf-2.1.0
+ dev-libs/libaio
+ >=dev-libs/boost-1.52.0-r1[threads]
+ gearman? ( >=sys-cluster/gearmand-0.12 )
+ pam? ( sys-libs/pam )
+ curl? ( net-misc/curl )
+ memcache? ( >=dev-libs/libmemcached-0.39 )
+ md5? ( >=dev-libs/libgcrypt-1.4.2 )
+ ldap? ( net-nds/openldap )
+ v8? ( dev-lang/v8 )
+ !dev-db/libdrizzle"
+
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ dev-util/intltool
+ dev-util/gperf
+ sys-devel/flex
+ dev-python/sphinx
+ doc? ( app-doc/doxygen )"
+
+pkg_setup() {
+ enewuser drizzle -1 -1 /dev/null nogroup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-7.2.3-libtool.patch
+ epatch "${FILESDIR}"/${PN}-7.2.3+automake-1.12.patch
+ epatch "${FILESDIR}"/${PN}-7.2.4+boost-1.50.patch
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=
+
+ if use debug; then
+ append-cppflags -DDEBUG
+ fi
+
+ # while I applaud upstreams goal of 0 compiler warnings
+ # the 1412 release didn't achieve it.
+ append-flags -Wno-error
+
+ # NOTE disable-all and without-all no longer recognized options
+ # NOTE using --enable on some plugins can cause test failures.
+ # --with should be used instead. A discussion about this here:
+ # https://bugs.launchpad.net/drizzle/+bug/598659
+ # TODO (upstream)
+ # $(use_with memcache memcached-stats-plugin) \
+ # $(use_with memcache memcached-functions-plugin) \
+
+ econf \
+ --disable-static \
+ --disable-dependency-tracking \
+ --disable-mtmalloc \
+ --without-hello-world-plugin \
+ --disable-rabbitmq-plugin --without-rabbitmq-plugin \
+ --disable-zeromq-plugin --without-zeromq-plugin \
+ --with-auth-test-plugin \
+ --with-auth-file-plugin \
+ --with-simple-user-policy-plugin \
+ --enable-logging-stats-plugin \
+ --with-logging-stats-plugin \
+ --enable-console-plugin \
+ $(use_enable gearman libgearman) \
+ $(use_enable ldap libldap) \
+ $(use_enable memcache libmemcached) \
+ $(use_enable tcmalloc) \
+ $(use_with curl auth-http-plugin) \
+ $(use_with gearman gearman-udf-plugin) \
+ $(use_with gearman logging-gearman-plugin) \
+ $(use_with ldap auth-ldap-plugin) \
+ $(use_with md5 md5-plugin) \
+ $(use_with pam auth-pam-plugin) \
+ $(use_with v8 js-plugin) \
+ ${myconf}
+}
+
+src_compile() {
+ emake V=1 all $(use doc && echo doxygen)
+}
+
+# currently not working as of 7.2.3
+RESTRICT=test
+
+src_test() {
+ if [[ ${EUID} == 0 ]]; then
+ eerror "You cannot run tests as root."
+ eerror "Please enable FEATURES=userpriv before proceeding."
+ return 1
+ fi
+
+ default
+}
+
+DOCS=( AUTHORS NEWS README )
+
+src_install() {
+ default
+
+ find "${D}" -name '*.la' -delete || die
+
+ if use doc; then
+ docinto apidoc
+ pushd docs/html
+ dohtml -r .
+ popd
+ fi
+
+ newinitd "${FILESDIR}"/drizzle.init.d.2 drizzled
+ newconfd "${FILESDIR}"/drizzle.conf.d drizzled
+
+ if ! use gearman; then
+ sed -i -e '/need gearmand/d' "${D}"/etc/init.d/drizzled \
+ || die "unable to sed init script (gearman)"
+ fi
+
+ if ! use memcache; then
+ sed -i -e '/need memcached/d' "${D}"/etc/init.d/drizzled \
+ || die "unable to sed init script (memcache)"
+ fi
+
+ keepdir /var/log/drizzle
+ keepdir /var/lib/drizzle/drizzled
+ keepdir /etc/drizzle
+
+ fperms 0755 /var/log/drizzle
+ fperms -R 0700 /var/lib/drizzle
+
+ fowners drizzle:nogroup /var/log/drizzle
+ fowners -R drizzle:nogroup /var/lib/drizzle
+
+ pamd_mimic system-auth drizzle auth account session
+}
diff --git a/dev-db/drizzle/files/drizzle-7.2.4+boost-1.50.patch b/dev-db/drizzle/files/drizzle-7.2.4+boost-1.50.patch
new file mode 100644
index 000000000000..0b10d74020cd
--- /dev/null
+++ b/dev-db/drizzle/files/drizzle-7.2.4+boost-1.50.patch
@@ -0,0 +1,90 @@
+Index: drizzle-7.2.4-alpha/client/drizzleslap.cc
+===================================================================
+--- drizzle-7.2.4-alpha.orig/client/drizzleslap.cc
++++ drizzle-7.2.4-alpha/client/drizzleslap.cc
+@@ -1934,7 +1934,7 @@ static void timer_thread()
+ boost::mutex::scoped_lock scopedLock(timer_alarm_mutex);
+
+ boost::xtime xt;
+- xtime_get(&xt, boost::TIME_UTC);
++ xtime_get(&xt, boost::TIME_UTC_);
+ xt.sec += opt_timer_length;
+
+ (void)timer_alarm_threshold.timed_wait(scopedLock, xt);
+Index: drizzle-7.2.4-alpha/configure.ac
+===================================================================
+--- drizzle-7.2.4-alpha.orig/configure.ac
++++ drizzle-7.2.4-alpha/configure.ac
+@@ -111,7 +111,6 @@ PANDORA_DRIZZLE_BUILD
+ PANDORA_HAVE_BOOST_TEST
+ PANDORA_HAVE_LIBSQLITE3
+
+-
+ #########################################################################
+
+
+Index: drizzle-7.2.4-alpha/drizzled/drizzled.cc
+===================================================================
+--- drizzle-7.2.4-alpha.orig/drizzled/drizzled.cc
++++ drizzle-7.2.4-alpha/drizzled/drizzled.cc
+@@ -460,7 +460,7 @@ void close_connections()
+ while (select_thread_in_use)
+ {
+ boost::xtime xt;
+- xtime_get(&xt, boost::TIME_UTC);
++ xtime_get(&xt, boost::TIME_UTC_);
+ xt.sec += 2;
+
+ for (uint32_t tmp=0 ; tmp < 10 && select_thread_in_use; tmp++)
+Index: drizzle-7.2.4-alpha/drizzled/table/cache.cc
+===================================================================
+--- drizzle-7.2.4-alpha.orig/drizzled/table/cache.cc
++++ drizzle-7.2.4-alpha/drizzled/table/cache.cc
+@@ -263,7 +263,7 @@ bool Cache::removeTable(Session& session
+ table::Cache::removeTable routine.
+ */
+ boost::xtime xt;
+- xtime_get(&xt, boost::TIME_UTC);
++ xtime_get(&xt, boost::TIME_UTC_);
+ xt.sec += 10;
+ boost::mutex::scoped_lock scoped(table::Cache::mutex(), boost::adopt_lock_t());
+ COND_refresh.timed_wait(scoped, xt);
+Index: drizzle-7.2.4-alpha/drizzled/thr_lock.cc
+===================================================================
+--- drizzle-7.2.4-alpha.orig/drizzled/thr_lock.cc
++++ drizzle-7.2.4-alpha/drizzled/thr_lock.cc
+@@ -170,7 +170,7 @@ static enum enum_thr_lock_result wait_fo
+ if (can_deadlock)
+ {
+ boost::xtime xt;
+- xtime_get(&xt, boost::TIME_UTC);
++ xtime_get(&xt, boost::TIME_UTC_);
+ xt.sec += table_lock_wait_timeout;
+ if (not cond->timed_wait(scoped, xt))
+ {
+Index: drizzle-7.2.4-alpha/plugin/sleep/sleep.cc
+===================================================================
+--- drizzle-7.2.4-alpha.orig/plugin/sleep/sleep.cc
++++ drizzle-7.2.4-alpha/plugin/sleep/sleep.cc
+@@ -98,7 +98,7 @@ int64_t Item_func_sleep::val_int()
+
+ try {
+ boost::xtime xt;
+- xtime_get(&xt, boost::TIME_UTC);
++ xtime_get(&xt, boost::TIME_UTC_);
+ xt.nsec += (uint64_t)(dtime * 1000000000ULL);
+ session.getThread()->sleep(xt);
+ }
+Index: drizzle-7.2.4-alpha/drizzled/message/include.am
+===================================================================
+--- drizzle-7.2.4-alpha.orig/drizzled/message/include.am
++++ drizzle-7.2.4-alpha/drizzled/message/include.am
+@@ -40,7 +40,7 @@ lib_LTLIBRARIES += drizzled/message/libd
+ drizzled_message_libdrizzledmessage_la_CXXFLAGS = ${MESSAGE_AM_CXXFLAGS} ${NO_WERROR}
+
+ drizzled_message_libdrizzledmessage_la_SOURCES = drizzled/message/statement_transform.cc
+-drizzled_message_libdrizzledmessage_la_LIBADD= ${LTLIBPROTOBUF} $(GCOV_LIBS) drizzled/libcharset.la
++drizzled_message_libdrizzledmessage_la_LIBADD= ${LTLIBPROTOBUF} $(GCOV_LIBS) $(BOOST_LIBS) drizzled/libcharset.la
+
+ nobase_dist_pkginclude_HEADERS+= \
+ drizzled/message/statement_transform.h
diff --git a/dev-db/drizzle/files/drizzle.init.d.2 b/dev-db/drizzle/files/drizzle.init.d.2
new file mode 100644
index 000000000000..8be486a64221
--- /dev/null
+++ b/dev-db/drizzle/files/drizzle.init.d.2
@@ -0,0 +1,126 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Pavel Stratil, senbonzakura.eu
+# Some functions were taken from debian init script. Licensed under GPL-2
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/drizzle/files/drizzle.init.d.2,v 1.1 2012/11/11 01:59:58 flameeyes Exp $
+
+#########################
+### Construct vars ######
+#########################
+
+
+SUFFIX=".${SVCNAME#*.}"
+[ "${SUFFIX}" == ".drizzled" ] && SUFFIX=''
+
+DIR_PID="/run/drizzle"
+DIR_LOG="/var/log/drizzle"
+
+BASE_CNF="/etc/drizzle/drizzled"
+BASE_PID="${DIR_PID}/drizzled"
+BASE_LOG="${DIR_LOG}/drizzled"
+BASE_DIR="/var/lib/drizzle/drizzled"
+
+CNFFILE="${BASE_CNF}${SUFFIX}.cnf"
+LOGFILE="${BASE_LOG}${SUFFIX}.log"
+DATADIR="${BASE_DIR}${SUFFIX}"
+DRIZZLE="/usr/bin/drizzle"
+DRIZZLE_USER="drizzle"
+
+pidfile="${BASE_PID}${SUFFIX}.pid"
+command="/usr/sbin/drizzled"
+command_args="--daemon --datadir=${DATADIR} --pid-file=${pidfile} --user=${DRIZZLE_USER} --syslog.errmsg-enable ${DRIZZLE_EXTRA}"
+
+start_stop_daemon_args="--user ${DRIZZLE_USER} --wait 5000"
+
+#########################
+### Helper functions ####
+#########################
+
+
+#
+# drizzle_status() checks if there is a server running and if it is accessible.
+# "check_alive" insists on a pingable server, "check_dead" also fails
+# if there is a lost drizzled in the process list
+# Usage: boolean drizzle_status [check_alive|check_dead] [warn|nowarn]
+#
+drizzle_status() {
+ ping_output=`$DRIZZLE --ping 2>&1`; ping_alive=$(( ! $? ))
+ ps_alive=0
+ if [ -f "$pidfile" ] && ps `cat $pidfile` >/dev/null 2>&1; then ps_alive=1; fi
+
+ if [ "$1" = "check_alive" -a $ping_alive = 1 ] ||
+ [ "$1" = "check_dead" -a $ping_alive = 0 -a $ps_alive = 0 ]; then
+ return 0 # EXIT_SUCCESS
+ else
+ if [ "$2" = "warn" ]; then
+ echo -e "$ps_alive processes alive and '$DRIZZLE --ping' resulted in\n$ping_output\n"
+ fi
+ return 1 # EXIT_FAILURE
+ fi
+}
+
+#########################
+### Main ################
+#########################
+
+checkconfig() {
+ # TODO: --print-defaults no longer a valid option. Needs to be rewritten.
+ #CNFDATADIR=`drizzle_get_param datadir`
+ #if [ -z "${CNFDATADIR}" ] ; then
+ # ewarn "Datadir not set in ${CNFFILE}."
+ # ewarn "Trying to use ${DATADIR}"
+ #else
+ DATADIR="${CNFDATADIR}"
+ #fi
+
+ if [[ ! -d "${DATADIR}" ]] ; then
+ eerror "Drizzle datadir is empty or invalid."
+ eerror "Please check your configuration ${CNFFILE} and DRIZZLE_EXTRA"
+ return 1
+ fi
+
+ if [ ! -f "${CNFFILE}" ]; then
+ eerror "The configuration file $CNFFILE was not found!"
+ fi
+}
+
+depend() {
+ use localmount
+ use gearmand
+ use memcached
+
+ # TODO use drizzle_get_param() to decide if gearmand and memcached
+ # are needed. Then the useflag based sed-ing of this script
+ # can be removed from the ebuild.
+}
+
+start_pre() {
+ checkpath -d -o ${DRIZZLE_USER}:nogroup ${DIR_PID} ${DIR_LOG}
+ checkpath -f -o ${DRIZZLE_USER}:nogroup ${LOGFILE}
+}
+
+start_post() {
+ for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14; do
+ sleep 1
+ if drizzle_status check_alive nowarn ; then break ; fi
+ done
+ if drizzle_status check_alive warn ; then
+ einfo "${SVCNAME} is alive!"
+ else
+ eerror "${SVCNAME} died!"
+ fi
+}
+
+stop_post() {
+ drizzle_status check_dead warn
+}
+
+status() {
+ if drizzle_status check_alive nowarn; then
+ mark_service_started drizzled
+ einfo "status: started"
+ else
+ mark_service_stopped drizzled
+ einfo "status: stopped"
+ fi
+}
diff --git a/dev-db/drizzle/metadata.xml b/dev-db/drizzle/metadata.xml
index e92b139ddc25..812b6d605efe 100644
--- a/dev-db/drizzle/metadata.xml
+++ b/dev-db/drizzle/metadata.xml
@@ -50,5 +50,9 @@
Use the <pkg>dev-db/haildb</pkg> libraries to replace the innodb
plugin storage engine with haildb (an innodb fork).
</flag>
+
+ <flag name="v8">
+ Use <pkg>dev-lang/v8</pkg>.
+ </flag>
</use>
</pkgmetadata>