diff options
author | Wolfram Schlich <wschlich@gentoo.org> | 2006-06-07 10:10:46 +0000 |
---|---|---|
committer | Wolfram Schlich <wschlich@gentoo.org> | 2006-06-07 10:10:46 +0000 |
commit | 943511c9aa1bbbd6a63e2247b71bc76b332599cb (patch) | |
tree | bde30be2947ccde9c977765ef55789129a9883d3 /net-analyzer/zabbix-server | |
parent | Added to ~ppc64. (diff) | |
download | historical-943511c9aa1bbbd6a63e2247b71bc76b332599cb.tar.gz historical-943511c9aa1bbbd6a63e2247b71bc76b332599cb.tar.bz2 historical-943511c9aa1bbbd6a63e2247b71bc76b332599cb.zip |
Fix handling of postgres and oracle USE flags
Package-Manager: portage-2.1_rc4-r1
Diffstat (limited to 'net-analyzer/zabbix-server')
-rw-r--r-- | net-analyzer/zabbix-server/ChangeLog | 6 | ||||
-rw-r--r-- | net-analyzer/zabbix-server/Manifest | 26 | ||||
-rw-r--r-- | net-analyzer/zabbix-server/zabbix-server-1.1.ebuild | 76 |
3 files changed, 68 insertions, 40 deletions
diff --git a/net-analyzer/zabbix-server/ChangeLog b/net-analyzer/zabbix-server/ChangeLog index 8466126fef6f..66171aa300a8 100644 --- a/net-analyzer/zabbix-server/ChangeLog +++ b/net-analyzer/zabbix-server/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for net-analyzer/zabbix-server # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix-server/ChangeLog,v 1.6 2006/06/06 13:47:10 wschlich Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix-server/ChangeLog,v 1.7 2006/06/07 10:10:46 wschlich Exp $ + + 07 Jun 2006; Wolfram Schlich <wschlich@gentoo.org> + zabbix-server-1.1.ebuild: + Fix handling of postgres and oracle USE flags *zabbix-server-1.1 (06 Jun 2006) diff --git a/net-analyzer/zabbix-server/Manifest b/net-analyzer/zabbix-server/Manifest index 9b0ef6a87d58..e564dcf78079 100644 --- a/net-analyzer/zabbix-server/Manifest +++ b/net-analyzer/zabbix-server/Manifest @@ -1,6 +1,3 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - AUX 1.0/conf.d/zabbix-suckerd 334 RMD160 f7a074de1a3edb9c3901cb90a44ffc2c08c4c9e4 SHA1 0737581ff71e5426f07f613199f05b9a46ff992e SHA256 bfdf4f181403ca8722b54b1a3e6d54aaf66f338a87a399d97290f9126914b374 MD5 ee29fececd9e7e7b108b691b854020b0 files/1.0/conf.d/zabbix-suckerd 334 RMD160 f7a074de1a3edb9c3901cb90a44ffc2c08c4c9e4 files/1.0/conf.d/zabbix-suckerd 334 @@ -64,18 +61,18 @@ EBUILD zabbix-server-1.0.ebuild 3105 RMD160 51fd954acb7bb485e2a63c95a258e5231bdf MD5 06da02b78de05922527142254870f1ed zabbix-server-1.0.ebuild 3105 RMD160 51fd954acb7bb485e2a63c95a258e5231bdfc481 zabbix-server-1.0.ebuild 3105 SHA256 75f3242e1335792229ebe86960a69b7c0041b878cd95389c633c7f06e313931f zabbix-server-1.0.ebuild 3105 -EBUILD zabbix-server-1.1.ebuild 3481 RMD160 17acc85bef990175b9801b0d0512453764ca420b SHA1 33315dc2b4bc442d4002276ba34a3a5fbe05bc6e SHA256 d49b7711728d8ceaa1632780672c956525755a5aad39f326c9a7a0f507f04e4d -MD5 7e936809c4b75e5fe02a822fd84a3166 zabbix-server-1.1.ebuild 3481 -RMD160 17acc85bef990175b9801b0d0512453764ca420b zabbix-server-1.1.ebuild 3481 -SHA256 d49b7711728d8ceaa1632780672c956525755a5aad39f326c9a7a0f507f04e4d zabbix-server-1.1.ebuild 3481 +EBUILD zabbix-server-1.1.ebuild 4502 RMD160 86013552afbeaa6d85809793c6841de9d29079ea SHA1 b7a2ce435b0cc1f17159d9b480a8f030ce6f3882 SHA256 dfeed512f8d26bdae558c05945b798573ca4f230c2f8f4ce8d58fe68be54b8f6 +MD5 f7952a376d3533a9c160566136531ac9 zabbix-server-1.1.ebuild 4502 +RMD160 86013552afbeaa6d85809793c6841de9d29079ea zabbix-server-1.1.ebuild 4502 +SHA256 dfeed512f8d26bdae558c05945b798573ca4f230c2f8f4ce8d58fe68be54b8f6 zabbix-server-1.1.ebuild 4502 EBUILD zabbix-server-1.1_alpha7.ebuild 2926 RMD160 fbbefe41127057bae727e5aefdef8bd55e53748e SHA1 2963e7bfca79b61478e012645e85c10c960eb4a6 SHA256 2d7f60464c0959a9a2cff258ed61ec6fc6da97e26c37aa483732d6dba5d814f3 MD5 89646fde9d4a16939ec0599b1624d7d9 zabbix-server-1.1_alpha7.ebuild 2926 RMD160 fbbefe41127057bae727e5aefdef8bd55e53748e zabbix-server-1.1_alpha7.ebuild 2926 SHA256 2d7f60464c0959a9a2cff258ed61ec6fc6da97e26c37aa483732d6dba5d814f3 zabbix-server-1.1_alpha7.ebuild 2926 -MISC ChangeLog 3174 RMD160 554f9709c1500b4f6b5e13b0580009dba56e0240 SHA1 aae27baed721100be0543d56ce9cd343ff40df3e SHA256 e3acbef7c3b7780706084127fd1ab037cc55d78ec0447ebadb611f9eb132b40b -MD5 f55c2d54755d3714714a52d43c41d8e1 ChangeLog 3174 -RMD160 554f9709c1500b4f6b5e13b0580009dba56e0240 ChangeLog 3174 -SHA256 e3acbef7c3b7780706084127fd1ab037cc55d78ec0447ebadb611f9eb132b40b ChangeLog 3174 +MISC ChangeLog 3304 RMD160 4fdf0b3502be540652978a5561bc9d8a3092a3fa SHA1 87df0c77e93a09235a57d8d2e2a6aab36cb62941 SHA256 2f0e4e9b11d13ce58c9d461e73e88f4577b7cc30d347f2b17f202de5b02ce9ff +MD5 3ffa933f991df0d237e350c6802430d7 ChangeLog 3304 +RMD160 4fdf0b3502be540652978a5561bc9d8a3092a3fa ChangeLog 3304 +SHA256 2f0e4e9b11d13ce58c9d461e73e88f4577b7cc30d347f2b17f202de5b02ce9ff ChangeLog 3304 MISC metadata.xml 630 RMD160 0ceb5472b6bc0efd1fa4a09f52d3ef953b0cb13c SHA1 88bffe8fc9f05440edecef1fdc65f4c6dbb6f735 SHA256 770d0897320974215ae8d520cc2f56761e9b53dfa85e9e3081bff1427d8aa03c MD5 d86acab58212886771ef2bf837a2e8b9 metadata.xml 630 RMD160 0ceb5472b6bc0efd1fa4a09f52d3ef953b0cb13c metadata.xml 630 @@ -89,10 +86,3 @@ SHA256 0da858ef9c249d9fe814beefe60ef90c8012f70f022b2f575e6d716d2736971a files/di MD5 4990ea7476a1a66671f7faf9b1c93719 files/digest-zabbix-server-1.1_alpha7 68 RMD160 a7f96c94c87207b1892c72dc1af24655ec5acd60 files/digest-zabbix-server-1.1_alpha7 68 SHA256 2d4b8595b2103d43be706e78f1fc1cb549bfe7a8cb33841424bb6bb19132cf2b files/digest-zabbix-server-1.1_alpha7 68 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.3 (GNU/Linux) - -iD8DBQFEheNbI1lqEGTUzyQRAt6pAKDVEJtBrmW+xu+TisQiB0tMCjCW5QCePAoR -l//3W4Pc9bidtX++2jalpjg= -=UYIY ------END PGP SIGNATURE----- diff --git a/net-analyzer/zabbix-server/zabbix-server-1.1.ebuild b/net-analyzer/zabbix-server/zabbix-server-1.1.ebuild index cc7e16e8ca62..95e266b04f88 100644 --- a/net-analyzer/zabbix-server/zabbix-server-1.1.ebuild +++ b/net-analyzer/zabbix-server/zabbix-server-1.1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix-server/zabbix-server-1.1.ebuild,v 1.1 2006/06/06 13:47:10 wschlich Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix-server/zabbix-server-1.1.ebuild,v 1.2 2006/06/07 10:10:46 wschlich Exp $ inherit eutils @@ -22,52 +22,86 @@ RDEPEND="${RDEPEND} net-analyzer/fping" S=${WORKDIR}/${MY_P}-${MY_PV} +pkg_setup() { + if useq postgres; then + eerror "" + eerror "PostgreSQL support is broken/missing in 1.1." + eerror "Please use MySQL or Oracle until this is resolved." + eerror "Turn the postgres USE flag off for zabbix-server and select your database." + eerror "For MySQL:" + eerror " echo 'net-analyzer/zabbix-server -postgres mysql' >>/etc/portage/package.use" + eerror "" + die "USE flag 'postgres' unsupported in this version :-(" + fi + if useq oracle; then + if [ -z "${ORACLE_HOME}" ]; then + eerror + eerror "The environment variable ORACLE_HOME must be set" + eerror "and point to the correct location." + eerror "It looks like you don't have Oracle installed." + eerror + die "Environment variable ORACLE_HOME is not set" + fi + if has_version 'dev-db/oracle-instantclient-basic'; then + ewarn + ewarn "Please ensure you have a full install of the Oracle client." + ewarn "dev-db/oracle-instantclient* is NOT sufficient." + ewarn + fi + fi +} + pkg_preinst() { enewgroup zabbix enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix } pkg_postinst() { - einfo "" - if useq mysql; then - einfo "You need to configure MySQL for Zabbix." - elif useq postgres; then - einfo "You need to configure PostgreSQL for Zabbix." - fi - einfo "" + einfo + einfo "You need to configure your database for Zabbix." + einfo einfo "Have a look at /usr/share/zabbix/database for" einfo "database creation and upgrades." - einfo "" + einfo einfo "For more info read the Zabbix manual at" einfo "http://www.zabbix.com/manual/v1.1/" - einfo "" + einfo zabbix_homedir="$(egetent passwd zabbix | cut -d : -f 6 )" if [ -n "${zabbix_homedir}" ] && \ [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then - ewarn "" + ewarn ewarn "The user 'zabbix' should have his homedir changed" ewarn "to /var/lib/zabbix/home if you want to use" ewarn "custom alert scripts." - ewarn "" + ewarn ewarn "A real homedir might be needed for configfiles" ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when" ewarn "using sendxmpp for Jabber alerts)." - ewarn "" + ewarn ewarn "To change the homedir use:" ewarn " usermod -d /var/lib/zabbix/home zabbix" - ewarn "" + ewarn fi } src_unpack() { - # This needs do be fixed! :-( - if useq mysql && useq postgres; then - eerror "You can't use both MySQL and PostgreSQL in Zabbix. Select one database." - die "Both database types selected" - elif ! ( useq mysql || useq postgres || useq oracle ); then - eerror "Select MySQL, PostgreSQL or Oracle database" - die "No database selected" + local dbnum dbtypes="mysql postgres oracle" dbtype + declare -i dbnum=0 + for dbtype in ${dbtypes}; do + useq ${dbtype} && let dbnum++ + done + if [ ${dbnum} -gt 1 ]; then + eerror + eerror "You can't use more than one database type in Zabbix." + eerror "Select exactly one database type out of these: ${dbtypes}" + eerror + die "Multiple database types selected." + elif [ ${dbnum} -lt 1 ]; then + eerror + eerror "Select exactly one database type out of these: ${dbtypes}" + eerror + die "No database type selected." fi unpack ${A} } |