diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2011-01-10 01:22:32 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2011-01-10 01:22:32 +0000 |
commit | ae24b1ff2059a4855bcfe14220acc8c412056b9e (patch) | |
tree | 526629689f0bed8e5f905cffc9d9a81ce6b3a26d /dev-db/drizzle | |
parent | Simplify ebuild by dropping apache.depend and webapp eclasses; this version n... (diff) | |
download | historical-ae24b1ff2059a4855bcfe14220acc8c412056b9e.tar.gz historical-ae24b1ff2059a4855bcfe14220acc8c412056b9e.tar.bz2 historical-ae24b1ff2059a4855bcfe14220acc8c412056b9e.zip |
Version bump by Pavel; also cleanup init script (by Pavel and me), and drop old versions and patches.
Package-Manager: portage-2.2.0_alpha14/cvs/Linux x86_64
Diffstat (limited to 'dev-db/drizzle')
-rw-r--r-- | dev-db/drizzle/ChangeLog | 13 | ||||
-rw-r--r-- | dev-db/drizzle/Manifest | 18 | ||||
-rw-r--r-- | dev-db/drizzle/drizzle-6.2010.08.1742.ebuild | 159 | ||||
-rw-r--r-- | dev-db/drizzle/drizzle-7.2010.10.01.ebuild | 162 | ||||
-rw-r--r-- | dev-db/drizzle/drizzle-7.2010.12.06.ebuild (renamed from dev-db/drizzle/drizzle-7.2010.10.01-r1.ebuild) | 9 | ||||
-rw-r--r-- | dev-db/drizzle/files/drizzle-2010.08.1742-pcre.patch | 13 | ||||
-rw-r--r-- | dev-db/drizzle/files/drizzle.init.d | 126 |
7 files changed, 69 insertions, 431 deletions
diff --git a/dev-db/drizzle/ChangeLog b/dev-db/drizzle/ChangeLog index 640fdcfcf49e..9dc4d69e2971 100644 --- a/dev-db/drizzle/ChangeLog +++ b/dev-db/drizzle/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for dev-db/drizzle -# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/drizzle/ChangeLog,v 1.19 2010/10/25 00:24:09 fauli Exp $ +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/drizzle/ChangeLog,v 1.20 2011/01/10 01:22:32 flameeyes Exp $ + +*drizzle-7.2010.12.06 (10 Jan 2011) + + 10 Jan 2011; Diego E. Pettenò <flameeyes@gentoo.org> + -drizzle-6.2010.08.1742.ebuild, -drizzle-7.2010.10.01.ebuild, + -drizzle-7.2010.10.01-r1.ebuild, +drizzle-7.2010.12.06.ebuild, + -files/drizzle-2010.08.1742-pcre.patch, files/drizzle.init.d: + Version bump by Pavel; also cleanup init script (by Pavel and me), and drop + old versions and patches. 25 Oct 2010; Christian Faulhammer <fauli@gentoo.org> drizzle-7.2010.10.01-r1.ebuild: diff --git a/dev-db/drizzle/Manifest b/dev-db/drizzle/Manifest index 3b2e4e9a2297..a588d7a7478c 100644 --- a/dev-db/drizzle/Manifest +++ b/dev-db/drizzle/Manifest @@ -2,20 +2,16 @@ Hash: SHA1 AUX drizzle-2009.12.1240-nolint.patch 366 RMD160 5edac5d0f35b6a7830ba4c5d4cc9fa78f30c29bc SHA1 29f2257773552dabc40424ac068ca4ef32425d01 SHA256 612ffed94aebcce0aeef56a4fabfe35a5bb01f6c85a4c00757bef59f0cd75312 -AUX drizzle-2010.08.1742-pcre.patch 413 RMD160 fb532b5d9b6113cf6672f472bd8445ac2ab1ca8e SHA1 c39637b3466f09e0c4bfc97876e6409bbcd4196a SHA256 f83893d65909217af8ee98c2ed36acbc8269ea13a7a39dd7b0aad060f10cda79 AUX drizzle.conf.d 17 RMD160 04ac72be16bab0e6a590a19d2d663baa6741e743 SHA1 0337f18c03bbfbf1203a6391f8d7076a4d36a155 SHA256 5739bf0120eb4ef9dfed0b5307332d10c728ab9d204411d37fec85393e6db630 -AUX drizzle.init.d 4602 RMD160 477d668649c413df96aa34d14a7446a3b7343656 SHA1 66ffc2d253350d4f7d91f6fd17bf0a3eb4b6e83f SHA256 eeb854e850abeb88997ea4ecf44d8d67a436a6870b03122a96319ab70e492f7f -DIST drizzle-2010.08.1742.tar.gz 9721271 RMD160 56ca34582eb260aa3461a67758dce8688af912b1 SHA1 d2e7b0e7240db2be55b86bbaa13a4f75926f1e2b SHA256 f39f7a6e893ead7231a17683833b3831d0586d3f7b24e40571bf0aabd5dfec54 -DIST drizzle7-2010.10.01.tar.gz 9785453 RMD160 b3a04b9d3db2de4b8f7b49a6262e4641b4eda003 SHA1 acda9daff29611163108b58104bbed0394612dc9 SHA256 58d84e26aa0ab6509c1be4780a8c4faecea37b79914a5965f2c01142b95eb73b -EBUILD drizzle-6.2010.08.1742.ebuild 4319 RMD160 269063a7e6b948f0186d68fea83e290674024022 SHA1 d8f7602fa0a124b42f6587ae3f870b32600c2ca7 SHA256 6ff0e6b7c59a59007a669bcd5118c8e45fd1c6553acd26e3ab28e85c0c68707f -EBUILD drizzle-7.2010.10.01-r1.ebuild 4440 RMD160 4af552e5a10dd1d08aba532bcd3241175c730a8a SHA1 7f22a5cbeb7baf79fc5422cc73315d6f258c0fd0 SHA256 3ac0e830a5c7f762c94d008b8decf8c086a55ca0440a40fd6825b80c397721c2 -EBUILD drizzle-7.2010.10.01.ebuild 4371 RMD160 28a167f78d83780cfa4dfc56dd03562e38d081d9 SHA1 9e4409861efa269353dab42dc0ed137014ee91dd SHA256 ff8e71fdb395ef359621f8a21054a39bb7cd5a83a0fac2b404e1d8aa8d2b4791 -MISC ChangeLog 4834 RMD160 f2f3f099c5a8ce2a2f56faf2e9e01fedfb8c2415 SHA1 9a88db3ee596761e652678dc5844c4610cd12c9d SHA256 3aa899c4f366a4c701c2db45a28bef992e69fe123028bdb33b2df3a4eafefd79 +AUX drizzle.init.d 3936 RMD160 99ab5c4b20e5e9c498396737fde1dbfcb8dccd1e SHA1 8bb93e0f92ecedb192eb6f1d12e9c3b4700dc66b SHA256 b3a0645876ee8eabe8bd8b90dabd189a2365141fb28213b1d4148443410b119d +DIST drizzle7-2010.12.06.tar.gz 10465124 RMD160 1451815540b50c0863a8df3271146ca4f8781733 SHA1 49ac1d227b69b051204d8b1531a823a9225fe350 SHA256 2049b5f60aa1b81150c3a4882335d849860c4af48ae515a0095c5aee59dae5e2 +EBUILD drizzle-7.2010.12.06.ebuild 4400 RMD160 58c9e302ea263fc6bc11b40e72900d7c9ca0bb83 SHA1 c2aedc0a3fa49b5450b40c4b0a55db1ff105e4f7 SHA256 df41908ae638cc438d78135aa2e464d490b0a649e2f3e6e606a6a99d5d5d5ec0 +MISC ChangeLog 5231 RMD160 e40218ce775cbfabbc121f074398e5e4aa8faaa3 SHA1 eab2d429011ba09637ee8b3c35ab38418b65c9ae SHA256 d829c783d81cc9279fbec97f73607498eb6b31b6d859a7632f01bc621ce0e099 MISC metadata.xml 1855 RMD160 ab45f0607b34db49bfe7972a9ece34f73e8eda3b SHA1 d3967d627e939ee30126f26f4f97f97164c51825 SHA256 61d9e5fadb778b559dac84110a46a0f1f7c8b85e0dac0ff09c36c2fc7e0d3e83 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) -iEYEARECAAYFAkzEzsYACgkQNQqtfCuFnePX2gCfQbPWCea77hUwlSRA8JQEAQdN -C7cAn1A0QC1drjjBfluH9VI+I3P7U/Nt -=u6QV +iEYEARECAAYFAk0qX0YACgkQAiZjviIA2XjBcwCgrBB+LVAN1rbG4eSHnJGJ35Lo +28IAn3Xkzcsyp8PBwmdwqep5M/kziw5/ +=k5I2 -----END PGP SIGNATURE----- diff --git a/dev-db/drizzle/drizzle-6.2010.08.1742.ebuild b/dev-db/drizzle/drizzle-6.2010.08.1742.ebuild deleted file mode 100644 index b5d65deea390..000000000000 --- a/dev-db/drizzle/drizzle-6.2010.08.1742.ebuild +++ /dev/null @@ -1,159 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/drizzle/drizzle-6.2010.08.1742.ebuild,v 1.1 2010/10/14 20:23:18 flameeyes Exp $ - -EAPI=2 - -inherit flag-o-matic libtool autotools eutils pam versionator - -MY_P="${PN}-$(get_version_component_range 2-)" -S="${WORKDIR}/${MY_P}" - -DESCRIPTION="Database optimized for Cloud and Net applications" -HOMEPAGE="http://drizzle.org" -SRC_URI="http://launchpad.net/drizzle/dexter/2010-08-30/+download/${MY_P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="debug tcmalloc doc memcache curl pam gearman +md5 ldap" - -# upstream bug #499911 -#RESTRICT="memcache? ( test ) !curl? ( test )" - -# for libdrizzle version, check m4/pandora*, PANDORA_LIBDRIZZLE_RECENT -RDEPEND="tcmalloc? ( dev-util/google-perftools ) - sys-libs/readline - sys-apps/util-linux - dev-libs/libpcre - >=dev-libs/libevent-1.4 - >=dev-libs/protobuf-2.1.0 - 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 ) - >=dev-libs/boost-1.32 - ldap? ( net-nds/openldap ) - !dev-db/libdrizzle" - -DEPEND="${RDEPEND} - dev-util/intltool - dev-util/gperf - doc? ( app-doc/doxygen ) - >=dev-util/boost-build-1.32" - -pkg_setup() { - enewuser drizzle -1 -1 /dev/null nogroup -} - -src_prepare() { - epatch "${FILESDIR}/${PN}-2009.12.1240-nolint.patch" - epatch "${FILESDIR}/${PN}-2010.08.1742-pcre.patch" - - AT_M4DIR="m4" eautoreconf - elibtoolize -} - -src_configure() { - local myconf= - - if use debug; then - append-flags -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 \ - $(use_enable tcmalloc) \ - $(use_enable memcache libmemcached) \ - $(use_enable gearman libgearman) \ - $(use_enable ldap libldap) \ - $(use_with curl auth-http-plugin) \ - $(use_with pam auth-pam-plugin) \ - $(use_with md5 md5-plugin) \ - $(use_with gearman gearman-udf-plugin) \ - $(use_with gearman logging-gearman-plugin) \ - $(use_with ldap auth-ldap-plugin) \ - --without-hello-world-plugin \ - --disable-pbxt-plugin --without-pbxt-plugin \ - --disable-rabbitmq-plugin --without-rabbitmq-plugin \ - --disable-embedded-innodb-plugin --without-embedded-innodb-plugin \ - --with-auth-test-plugin \ - --with-auth-file-plugin \ - --with-simple-user-policy-plugin \ - --enable-logging-stats-plugin \ - --with-logging-stats-plugin \ - ${myconf} - -} - -src_compile() { - emake || die "build failed" - - if use doc; then - emake doxygen || die "doxygen failed" - fi -} - -# 5-10 min eta -src_test() { - # If you want to turn off a test, rename to suffix of .DISABLED - # Explicitly allow parallel make check - emake check || die "tests failed" -} - -src_install() { - emake DESTDIR="${D}" install || die "install failed" - dodoc AUTHORS NEWS README || die - - find "${D}" -name '*.la' -delete || die - - if use doc; then - docinto apidoc - pushd docs/html - dohtml -r . - popd - fi - - newinitd "${FILESDIR}"/drizzle.init.d drizzled || die - newconfd "${FILESDIR}"/drizzle.conf.d drizzled || die - - 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/run/drizzle || die - keepdir /var/log/drizzle || die - keepdir /var/lib/drizzle/drizzled || die - keepdir /etc/drizzle || die - - fperms 0755 /var/run/drizzle || die - fperms 0755 /var/log/drizzle || die - fperms -R 0700 /var/lib/drizzle || die - - fowners drizzle:nogroup /var/run/drizzle || die - fowners drizzle:nogroup /var/log/drizzle || die - fowners -R drizzle:nogroup /var/lib/drizzle || die - - pamd_mimic system-auth drizzle auth account session -} diff --git a/dev-db/drizzle/drizzle-7.2010.10.01.ebuild b/dev-db/drizzle/drizzle-7.2010.10.01.ebuild deleted file mode 100644 index 9ee61c84c65f..000000000000 --- a/dev-db/drizzle/drizzle-7.2010.10.01.ebuild +++ /dev/null @@ -1,162 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/drizzle/drizzle-7.2010.10.01.ebuild,v 1.2 2010/10/15 14:51:10 mr_bones_ Exp $ - -EAPI=2 - -inherit flag-o-matic libtool autotools eutils pam versionator - -MY_P="${PN}$(replace_version_separator 1 -)" -S="${WORKDIR}/${MY_P}" - -DESCRIPTION="Database optimized for Cloud and Net applications" -HOMEPAGE="http://drizzle.org" -SRC_URI="http://launchpad.net/drizzle/elliott/2010-10-11/+download/${MY_P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="debug tcmalloc doc memcache curl pam gearman +md5 ldap" - -# upstream bug #499911 -#RESTRICT="memcache? ( test ) !curl? ( test )" - -# for libdrizzle version, check m4/pandora*, PANDORA_LIBDRIZZLE_RECENT -RDEPEND="tcmalloc? ( dev-util/google-perftools ) - sys-libs/readline - sys-apps/util-linux - dev-libs/libpcre - sys-devel/flex - >=dev-libs/libevent-1.4 - >=dev-libs/protobuf-2.1.0 - 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 ) - >=dev-libs/boost-1.32 - ldap? ( net-nds/openldap ) - !dev-db/libdrizzle" - -DEPEND="${RDEPEND} - dev-util/intltool - dev-util/gperf - doc? ( app-doc/doxygen ) - >=dev-util/boost-build-1.32" - -pkg_setup() { - enewuser drizzle -1 -1 /dev/null nogroup -} - -src_prepare() { - epatch "${FILESDIR}/${PN}-2009.12.1240-nolint.patch" - epatch "${FILESDIR}/${PN}-2010.08.1742-pcre.patch" - - AT_M4DIR="m4" eautoreconf - elibtoolize -} - -src_configure() { - local myconf= - - if use debug; then - append-flags -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 \ - $(use_enable tcmalloc) \ - $(use_enable memcache libmemcached) \ - $(use_enable gearman libgearman) \ - $(use_enable ldap libldap) \ - $(use_with curl auth-http-plugin) \ - $(use_with pam auth-pam-plugin) \ - $(use_with md5 md5-plugin) \ - $(use_with gearman gearman-udf-plugin) \ - $(use_with gearman logging-gearman-plugin) \ - $(use_with ldap auth-ldap-plugin) \ - --without-hello-world-plugin \ - --disable-pbxt-plugin --without-pbxt-plugin \ - --disable-rabbitmq-plugin --without-rabbitmq-plugin \ - --without-haildb-plugin --disable-haildb-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 \ - --enable-archive-plugin \ - ${myconf} - -} - -src_compile() { - emake || die "build failed" - - if use doc; then - emake doxygen || die "doxygen failed" - fi -} - -# 5-10 min eta -src_test() { - # If you want to turn off a test, rename to suffix of .DISABLED - # Explicitly allow parallel make check - emake check || die "tests failed" -} - -src_install() { - emake DESTDIR="${D}" install || die "install failed" - dodoc AUTHORS NEWS README || die - - find "${D}" -name '*.la' -delete || die - - if use doc; then - docinto apidoc - pushd docs/html - dohtml -r . - popd - fi - - newinitd "${FILESDIR}"/drizzle.init.d drizzled || die - newconfd "${FILESDIR}"/drizzle.conf.d drizzled || die - - 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/run/drizzle || die - keepdir /var/log/drizzle || die - keepdir /var/lib/drizzle/drizzled || die - keepdir /etc/drizzle || die - - fperms 0755 /var/run/drizzle || die - fperms 0755 /var/log/drizzle || die - fperms -R 0700 /var/lib/drizzle || die - - fowners drizzle:nogroup /var/run/drizzle || die - fowners drizzle:nogroup /var/log/drizzle || die - fowners -R drizzle:nogroup /var/lib/drizzle || die - - pamd_mimic system-auth drizzle auth account session -} diff --git a/dev-db/drizzle/drizzle-7.2010.10.01-r1.ebuild b/dev-db/drizzle/drizzle-7.2010.12.06.ebuild index 24d9adacf374..14c769f27c2a 100644 --- a/dev-db/drizzle/drizzle-7.2010.10.01-r1.ebuild +++ b/dev-db/drizzle/drizzle-7.2010.12.06.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/drizzle/drizzle-7.2010.10.01-r1.ebuild,v 1.3 2010/10/25 00:24:09 fauli Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/drizzle/drizzle-7.2010.12.06.ebuild,v 1.1 2011/01/10 01:22:32 flameeyes Exp $ EAPI=2 @@ -11,7 +11,7 @@ S="${WORKDIR}/${MY_P}" DESCRIPTION="Database optimized for Cloud and Net applications" HOMEPAGE="http://drizzle.org" -SRC_URI="http://launchpad.net/drizzle/elliott/2010-10-11/+download/${MY_P}.tar.gz" +SRC_URI="http://launchpad.net/drizzle/elliott/$(get_version_component_range 2-2)-$(get_version_component_range 3-3)-20/+download/${MY_P}.tar.gz" LICENSE="GPL-2" SLOT="0" @@ -21,7 +21,6 @@ IUSE="debug tcmalloc doc memcache curl pam gearman +md5 ldap haildb" # upstream bug #499911 #RESTRICT="memcache? ( test ) !curl? ( test )" -# for libdrizzle version, check m4/pandora*, PANDORA_LIBDRIZZLE_RECENT RDEPEND="tcmalloc? ( dev-util/google-perftools ) sys-libs/readline sys-apps/util-linux @@ -39,6 +38,7 @@ RDEPEND="tcmalloc? ( dev-util/google-perftools ) !dev-db/libdrizzle" DEPEND="${RDEPEND} + sys-devel/gettext dev-util/intltool dev-util/gperf sys-devel/flex @@ -51,7 +51,6 @@ pkg_setup() { src_prepare() { epatch "${FILESDIR}/${PN}-2009.12.1240-nolint.patch" - epatch "${FILESDIR}/${PN}-2010.08.1742-pcre.patch" AT_M4DIR="m4" eautoreconf elibtoolize diff --git a/dev-db/drizzle/files/drizzle-2010.08.1742-pcre.patch b/dev-db/drizzle/files/drizzle-2010.08.1742-pcre.patch deleted file mode 100644 index 2ceff6c86a57..000000000000 --- a/dev-db/drizzle/files/drizzle-2010.08.1742-pcre.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: drizzle-2010.08.1742/drizzled/include.am -=================================================================== ---- drizzle-2010.08.1742.orig/drizzled/include.am -+++ drizzle-2010.08.1742/drizzled/include.am -@@ -458,7 +458,7 @@ drizzled_drizzled_LDADD= \ - $(LDADD) \ - $(LIBUUID) \ - $(LIBDL_LIBS) \ -- $(LIBPCRE) \ -+ $(LTLIBPCRE) \ - $(LTLIBPROTOBUF) \ - $(LIBTBB) \ - $(BOOST_LIBS) \ diff --git a/dev-db/drizzle/files/drizzle.init.d b/dev-db/drizzle/files/drizzle.init.d index c8a5a33dbae2..0f2ac908f139 100644 --- a/dev-db/drizzle/files/drizzle.init.d +++ b/dev-db/drizzle/files/drizzle.init.d @@ -1,8 +1,8 @@ #!/sbin/runscript -# Copyright 2010-2010 Pavel Stratil, senbonzakura.eu +# Copyright 1999-2011 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,v 1.3 2010/09/06 20:19:25 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/drizzle/files/drizzle.init.d,v 1.4 2011/01/10 01:22:32 flameeyes Exp $ ######################### ### Construct vars ###### @@ -12,7 +12,6 @@ SUFFIX=".${SVCNAME#*.}" [ "${SUFFIX}" == ".drizzled" ] && SUFFIX='' -BASE_CONFD="/etc/conf.d/drizzle" BASE_CNF="/etc/drizzle/drizzled" BASE_PID="/var/run/drizzle/drizzled" BASE_LOG="/var/log/drizzle/drizzled" @@ -22,7 +21,6 @@ PIDFILE="${BASE_PID}${SUFFIX}.pid" CNFFILE="${BASE_CNF}${SUFFIX}.cnf" LOGFILE="${BASE_LOG}${SUFFIX}.log" DATADIR="${BASE_DIR}${SUFFIX}" -CONFSRC="${BASE_CONFD}${SUFFIX}" DRIZZLE="/usr/bin/drizzle" DRIZZLE_USER="drizzle" DRIZZLE_DAEMON="/usr/sbin/drizzled" @@ -34,39 +32,25 @@ DRIZZLE_EXTRA="" # -# drizzle_get_param() fetches a particular option from drizzle's invocation. -# Usage: void drizzle_get_param option -# Example: /etc/init.d/drizzled drizzle_get_param pid-file -# -drizzle_get_param() { - ${DRIZZLE_DAEMON} --print-defaults \ - | tr " " "\n" \ - | grep -- "--$1" \ - | tail -n 1 \ - | cut -d= -f2 -} - - -# # 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 + 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" + echo -e "$ps_alive processes alive and '$DRIZZLE --ping' resulted in\n$ping_output\n" fi return 1 # EXIT_FAILURE - fi + fi } ######################### @@ -74,13 +58,14 @@ drizzle_status() { ######################### checkconfig() { - CNFDATADIR=`drizzle_get_param datadir` - if [ -z "${CNFDATADIR}" ] ; then - ewarn "Datadir not set in ${CNFFILE}." - ewarn "Trying to use ${DATADIR}" - else + # 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 + #fi if [[ ! -d "${DATADIR}" ]] ; then eerror "Drizzle datadir is empty or invalid." @@ -88,27 +73,19 @@ checkconfig() { return 1 fi - if [ -f "${CONFSRC}" ]; then - source "${CONFSRC}" - else - eerror "The configuration file $CONFSRC was not found!" - fi - - if [ ! -f "${CNFFILE}" ]; then - eerror "The configuration file $CNFFILE was not found!" - 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. + 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. } @@ -118,49 +95,40 @@ stop() { --exec ${DRIZZLE_DAEMON} eend $? drizzle_status check_dead warn - } - start() { - checkconfig + #checkconfig ebegin "Starting ${SVCNAME}" # Test if ${BASE_PID}, ${BASE_LOG} and ${LOG_FILE} exist, create if not. [ ! -e ${BASE_PID} ] && mkdir -p ${BASE_PID} && chown ${DRIZZLE_USER}:nogroup ${BASE_PID} [ ! -e ${BASE_LOG} ] && mkdir -p ${BASE_LOG} && chown ${DRIZZLE_USER}:nogroup ${BASE_LOG} [ ! -e ${LOGFILE} ] && touch ${LOGFILE} && chown ${DRIZZLE_USER}:nogroup ${LOGFILE} - start-stop-daemon --background --pidfile ${PIDFILE} --stderr ${LOGFILE} \ - --user ${DRIZZLE_USER} --start --exec ${DRIZZLE_DAEMON} -- \ - --datadir=${DATADIR} --pid-file=${PIDFILE} --user=${DRIZZLE_USER} \ - ${DRIZZLE_EXTRA} + start-stop-daemon --background --pidfile ${PIDFILE} --stderr ${LOGFILE} \ + --user ${DRIZZLE_USER} --start --exec ${DRIZZLE_DAEMON} -- \ + --datadir=${DATADIR} --pid-file=${PIDFILE} --user=${DRIZZLE_USER} \ + ${DRIZZLE_EXTRA} eend $? - - # TODO in order to have replication always working we should add the - # --server-id=# option. AFAIK only integers are allowed, though - # ${HOSTNAME}${SVCNAME}${SUFFIX} whould be much easier to handle. + + # TODO in order to have replication always working we should add the + # --server-id=# option. AFAIK only integers are allowed, though + # ${HOSTNAME}${SVCNAME}${SUFFIX} whould be much easier to handle. 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 + 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!" + einfo "${SVCNAME} is alive!" + else + eerror "${SVCNAME} died!" fi } -restart() { - stop - sleep 1 - start -} - status() { - if drizzle_status check_alive nowarn; then - einfo "status: started" - else - einfo "status: stopped" - fi + if drizzle_status check_alive nowarn; then + einfo "status: started" + else + einfo "status: stopped" + fi } - |