summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Wijsman <tomwij@gentoo.org>2013-03-13 19:28:45 +0000
committerTom Wijsman <tomwij@gentoo.org>2013-03-13 19:28:45 +0000
commitde10eb4d1bf2882c1b031b42506633c646f3ad2c (patch)
tree07305be3b81222b5a942a5f00e508bd1b8a64c2c /www-misc
parentVersion bump (diff)
downloadhistorical-de10eb4d1bf2882c1b031b42506633c646f3ad2c.tar.gz
historical-de10eb4d1bf2882c1b031b42506633c646f3ad2c.tar.bz2
historical-de10eb4d1bf2882c1b031b42506633c646f3ad2c.zip
Revision bump to make the graphs work by introducing a monitorix user and group and writing them to /var/lib/monitorix/imgs, since /usr/share should not be writable a symlink is used; thanks to anYc, Hawk777, hasufell and Maff in #gentoo-sunrise.
Package-Manager: portage-2.1.11.55/cvs/Linux x86_64 Manifest-Sign-Key: 0x6D34E57D
Diffstat (limited to 'www-misc')
-rw-r--r--www-misc/monitorix/ChangeLog11
-rw-r--r--www-misc/monitorix/monitorix-3.0.0-r1.ebuild (renamed from www-misc/monitorix/monitorix-3.0.0.ebuild)30
2 files changed, 28 insertions, 13 deletions
diff --git a/www-misc/monitorix/ChangeLog b/www-misc/monitorix/ChangeLog
index ed44bdb1d93e..0b625b6eef26 100644
--- a/www-misc/monitorix/ChangeLog
+++ b/www-misc/monitorix/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for www-misc/monitorix
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-misc/monitorix/ChangeLog,v 1.1 2013/03/13 18:21:24 tomwij Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-misc/monitorix/ChangeLog,v 1.2 2013/03/13 19:28:45 tomwij Exp $
+
+*monitorix-3.0.0-r1 (13 Mar 2013)
+
+ 13 Mar 2013; Tom Wijsman <TomWij@gentoo.org> +monitorix-3.0.0-r1.ebuild,
+ -monitorix-3.0.0.ebuild:
+ Revision bump to make the graphs work by introducing a monitorix user and
+ group and writing them to /var/lib/monitorix/imgs, since /usr/share should not
+ be writable a symlink is used; thanks to anYc, Hawk777, hasufell and Maff in
+ #gentoo-sunrise.
*monitorix-3.0.0 (13 Mar 2013)
diff --git a/www-misc/monitorix/monitorix-3.0.0.ebuild b/www-misc/monitorix/monitorix-3.0.0-r1.ebuild
index a650a61bcdcf..375e5951db7c 100644
--- a/www-misc/monitorix/monitorix-3.0.0.ebuild
+++ b/www-misc/monitorix/monitorix-3.0.0-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-misc/monitorix/monitorix-3.0.0.ebuild,v 1.1 2013/03/13 18:21:24 tomwij Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-misc/monitorix/monitorix-3.0.0-r1.ebuild,v 1.1 2013/03/13 19:28:45 tomwij Exp $
EAPI="5"
@@ -28,10 +28,16 @@ RDEPEND="net-analyzer/rrdtool[perl]
lm_sensors? ( sys-apps/lm_sensors )
postfix? ( net-mail/pflogsumm )"
+pkg_setup() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 /var/lib/${PN} ${PN}
+}
+
src_prepare() {
# Put better Gentoo defaults in the configuration file.
- sed -i "s|\(base_dir.*\)/usr/share/monitorix|\1/usr/share/monitorix/htdocs|" ${PN}.conf
+ sed -i "s|\(base_dir.*\)/usr/share/${PN}|\1/usr/share/${PN}/htdocs|" ${PN}.conf
sed -i "s|\(secure_log.*\)/var/log/secure|\1/var/log/auth.log|" ${PN}.conf
+ sed -i "s|nobody|${PN}|g" ${PN}.conf
}
src_install() {
@@ -49,27 +55,27 @@ src_install() {
doman man/man5/${PN}.conf.5
doman man/man8/${PN}.8
- dodir "/usr/share/monitorix"
- dodir "/usr/share/monitorix/htdocs"
- insinto "/usr/share/monitorix/htdocs"
- doins logo_bot.png logo_top.png monitorixico.png
- dodir "/usr/share/monitorix/htdocs/imgs"
+ insinto /usr/share/${PN}/htdocs
+ doins logo_bot.png logo_top.png ${PN}ico.png
- dodir "/usr/share/monitorix/htdocs/cgi"
- exeinto "/usr/share/monitorix/htdocs/cgi"
+ dodir /var/lib/${PN}/imgs
+ dosym /var/lib/${PN}/imgs /usr/share/${PN}/htdocs/imgs
+
+ exeinto /usr/share/${PN}/htdocs/cgi
doexe ${PN}.cgi
dodir /usr/lib/${PN}
exeinto /usr/lib/${PN}
doexe lib/*.pm
- dodir /var/lib/${PN}
dodir /var/lib/${PN}/usage
insinto /var/lib/${PN}/reports
doins -r reports/*
}
pkg_postinst() {
+ chown monitorix:monitorix /var/lib/${PN}/imgs
+
elog "WARNING: ${PN} version 3.0.0 includes a brand new config"
elog "format, that may be incompatible with your existing config"
elog "file. Please take care if upgrading from an old version."
@@ -77,6 +83,6 @@ pkg_postinst() {
elog "${PN} includes its own web server as of version 3.0.0."
elog "For this reason, the dependency on the webapp framework"
elog "has been removed. If you wish to use your own web server,"
- elog "the monitorix web data can be found at:"
- elog "/usr/share/monitorix/htdocs/"
+ elog "the ${PN} web data can be found at:"
+ elog "/usr/share/${PN}/htdocs/"
}