From 02abf04a9cf7717e3843b5926f0b75e73cccb194 Mon Sep 17 00:00:00 2001 From: Sven Vermeulen Date: Sat, 3 Jan 2015 12:12:39 +0000 Subject: [PATCH] Fix bug #527908 - Add SELinux dep to munin policy Package-Manager: portage-2.2.14/cvs/Linux x86_64 Manifest-Sign-Key: 0x2EDD52403B68AF47 --- net-analyzer/munin/ChangeLog | 10 +- net-analyzer/munin/Manifest | 23 +- net-analyzer/munin/munin-2.0.25-r1.ebuild | 408 ++++++++++++++++++++++ net-analyzer/munin/munin-2.1.9999.ebuild | 7 +- 4 files changed, 437 insertions(+), 11 deletions(-) create mode 100644 net-analyzer/munin/munin-2.0.25-r1.ebuild diff --git a/net-analyzer/munin/ChangeLog b/net-analyzer/munin/ChangeLog index 69506b8c7b05..ea56bcde1fcb 100644 --- a/net-analyzer/munin/ChangeLog +++ b/net-analyzer/munin/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-analyzer/munin -# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/munin/ChangeLog,v 1.163 2014/12/28 16:08:50 titanofold Exp $ +# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/munin/ChangeLog,v 1.164 2015/01/03 12:12:32 swift Exp $ + +*munin-2.0.25-r1 (03 Jan 2015) + + 03 Jan 2015; Sven Vermeulen +munin-2.0.25-r1.ebuild, + munin-2.1.9999.ebuild: + Fix bug #527908 - Add SELinux dep to munin policy 28 Dec 2014; Aaron W. Swenson munin-2.0.19.ebuild, munin-2.0.19-r1.ebuild, munin-2.0.25.ebuild, munin-2.1.9999.ebuild: diff --git a/net-analyzer/munin/Manifest b/net-analyzer/munin/Manifest index 2a6a5aebd873..5f3dbb4ab949 100644 --- a/net-analyzer/munin/Manifest +++ b/net-analyzer/munin/Manifest @@ -23,14 +23,25 @@ DIST munin-2.0.25-gentoo-1.tar.xz 10964 SHA256 725a91fe3690a045439fd3d2541de9b67 DIST munin-2.0.25.tar.gz 1337586 SHA256 6832bc5839d03639e4309178d9370697fc8a80a83d9b6653953f40161e949694 SHA512 a29563cfef26b05237b3813b44b5582563f2f75477ae3c076540cfb4f3e83f89193bd05fd7eae208d9d1bae58aff75977cc2c5f4de81225f0cbb2ba2c41effa9 WHIRLPOOL 14e7fac3d91025816fa31823484673726441f186ded0bb2a6dc6f4d8f3976211a6fc49c20c7faac5d7078d6f9963766517ee2c9b22820b1164333cb6def106b8 EBUILD munin-2.0.19-r1.ebuild 12107 SHA256 4e0786fff578ab497810236bff58408e39b5b3b43dee98d9e1264a7679fe8282 SHA512 412ebad95988609475d9dfa01ec8c38c0e4b5536d9079f0e78abc87e25d57ea0e7bf1d5b8531b2f84d76d156d246491ea6037b2df94e36f0c371393526886be1 WHIRLPOOL 72dca6ba934e5a1b72b3a71db980007a6279170c8f206391355782957d16cfa6f8b0f76bb2420c1e4fa1ddff5379e1a35054d1b0e6130bfef759fd3056fa5f3d EBUILD munin-2.0.19.ebuild 12104 SHA256 97ceef2b783f5133574a191ff62674e2f62b10d115f345f7838f9edd0f46a4bf SHA512 6c057e9a2ae67ea314df6df83de21c2508198ad315f2c533911c1399a9b946740cb9dab08a7fa184f4ba34b967659a29f34348aeafca5b7471a33defa8bd3493 WHIRLPOOL ec420c808075309e36cf4e277896df302620e28d313074b8efc3a384e7bbbb05e96b54f6ef2a7c07bcc392e28663bfa37f37037a1922cfc3e5586612aad1837f +EBUILD munin-2.0.25-r1.ebuild 12214 SHA256 a8d72430c62e672166bfe6d77cf1b14246a035e82304417b179850658358d631 SHA512 d54af56b177cef671fff0debb1700090cc63993ee1c19c08151985794ca8794ed4cafd1d2a1c6f8ca37f5cf7f7535ff7d3c9b59b1bd4036ea5bd72e8c6a83aa9 WHIRLPOOL 55b5350c4f248fec7ced52c340b7cb486d4f1704ad4d90b53bab937831d5f53ba36e6c8d8709916c3011114aae608a30f306ed58dddb14404740971dadb2898a EBUILD munin-2.0.25.ebuild 12168 SHA256 98a640f185422ab6dcd2b9dcdbd7f9f4346fae800e65acbe9696737a137f6e3a SHA512 1180e097a951d5ed7e4b1fcaa12515fc0d05a0a51d5238878914132608f00a93eb27068444306678d3a0b2aa7c675ea9f64d8fbf23ca8cf6be8c10404606ee69 WHIRLPOOL b25776038dbbe432dccac5c5672f87f3136247ccf843ec1fb8b68f3547127c5cefd563595706a8899d73c6cf402f0043abb4668183cfdb173ff9723b48e07c10 -EBUILD munin-2.1.9999.ebuild 11578 SHA256 659b00ca83b21d32de543faa8e3b212c49d443927d5817aa201bfdeeef6ac590 SHA512 4da719b1997bf6870a22e3e923ea946f6e10ee7faae83b4f800aedd3fc927ad5fe57e896a8f60f799b0100bb4fc94e749afeee8bcd2a32199c55ef0114479c87 WHIRLPOOL a412d68e0afb425ef9e5a4fdfeb6149eccd27a7e1b1c60ffa63b2ff86ddfcd86213b54783ed66dfc2bacb48f925fc94dcdb1fde9ddc62552c409d3564805661f -MISC ChangeLog 34343 SHA256 adeae30aac3219947d480e56cf6d0e56d0c15b13bb23026ddd52f4b31275df85 SHA512 5f354acfed61137a5a5cf0da69ca42f7fca9a316e24a9e0dd23546f3052db6072445f4671f99c4d06af63451208314fc0ba464f3809b0349c01894a5e81cfbe8 WHIRLPOOL 14488762e2e45187d514745277d602f47475caceea6bccf49eb6d255d2cc629f488573adf59e00893dc67784a424400b7d473c90413aef92e6e931a797d316cc +EBUILD munin-2.1.9999.ebuild 11621 SHA256 fa2bf0289a72deb52c20e2fe4c161237f971c19cea912b8f4589eec25b8a9b47 SHA512 f69ec9a43e2dce073fac86f75ae622ede333848ec0cb41ec2bedc20c6a24a0fbec980aa9144f16dd2c5220ac0b53ec9ada005f216a565db608a1e1143a83f257 WHIRLPOOL c1af793613092974e5b999531caea83bccc1008901320ab91198e260abb7dba08358af45b41ed632729d5e645fbb0568bf333b5301fc3e3436f6085939535ea8 +MISC ChangeLog 34522 SHA256 6da3b8e9a536b9f6ebe3801a4707c7e2fdd92c25b208ed111ee9c9bdee832357 SHA512 eda1f28e514c42dc0ce8efc21a3a4bc3cce25d79c8f5a61f09a11b4793b12c0f645dfd8305b6f4509d45db46d2c3d951efe59087e63575f9b6bb1093a7a6cada WHIRLPOOL ead08f94ec7f52cf55b8c67addff8ae32ac50cdbc4d8827d8a27b74737c138f8a9b50cdd913f536c47cceebdc67ca846a1319a327c9c3a378b34b6781fb1e942 MISC metadata.xml 3824 SHA256 5b838f6ccb778750cbcc41052480daaa9ebcbee5ee38ab66b054472b6313d177 SHA512 277f3ab9589982617b60ce8ea63802288dc4ff5368416a942f3670804a8e0a4cd481b2d0ff91302be040d2aba4f66a2e11b0c181164e6285dc33b150b263da60 WHIRLPOOL 7486ffd90f12e32a9feb557b4937397317cfd4325e5ffdf1dbaa749a90f3c47f797baea306585ac4a200e4a23901da1de10a9f0b951a15bd27f8a7c876c504a5 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2 +Version: GnuPG v2.0 -iF4EAREIAAYFAlSgKxUACgkQVxOqA9G7/aCjGwD+PRgOEQIs8RsuOSwNEpsX5NqV -Lx120+MhWRNKhDg2DYIBAIBHu8fTL3WA6d+rHDrFXt00jRMNPjH8sbjbgHjfCv02 -=jKSX +iQIcBAEBCAAGBQJUp9ycAAoJEC7dUkA7aK9HR+8P/jFAcYHiI9qqsF6JF+su1N4b +ch4cjum7SLgIBBlLyo28vq2TVsgq+CILA6dvVDEspjQtnkD/xVyAaBhzthjbXh1o +lQgRMyirx+BsdW0+FnP5HzSF5xWym/J++nA22vps3eiMVQ3yPyMG5fhyiR52gp6d +kfKvae6O/Io51wl0NsKUH7yLDB/7MyZs31abkJSWZCDYqaK74ZIBy0DCRtoC9ObT +Bxa8TH8O8j+7TEVLir5sLXqmPh6EscZ3vZVyk9JxRSoYNxpNyHwMphllw7AxDf+w +YpoJbNxGgrdjOms5lhcMWljELO3yKvgVOyRk61zum8YsLFGYAaveAStupaS7KWxD +bim7lNGkt4X8EhOJPP2O/DYg+2CLIA1SqCSfJufh3Fb49UbbyE/wARsf9wP6JgaM +m7jlg2IMBj4r07wFeAvkV0k10oA2uZgGC3LjZ9e7D4C8FMjmHiqUACNHMybwwY4t +Ov870wAlFOndXv7lPBjz5i0+fEM4oCmBQoCzR1viJC0MsNOjkmXYNBvmy1Gq1vIv +UzIhJtCA6rcksch06a0Iykh8GQ06+UbDd/7VeUU1+8PZliWsvo/Db6/JbGNCnCl4 +52KNwpOHhl1HQ2lya0dZPW+LNXUxZXlRegR18hBU49kuiP9ntB/y4OpWesNgOQqp +Do+JWBQqHqqgrcGtkYq2 +=LSMd -----END PGP SIGNATURE----- diff --git a/net-analyzer/munin/munin-2.0.25-r1.ebuild b/net-analyzer/munin/munin-2.0.25-r1.ebuild new file mode 100644 index 000000000000..1ba21ddba76d --- /dev/null +++ b/net-analyzer/munin/munin-2.0.25-r1.ebuild @@ -0,0 +1,408 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/munin/munin-2.0.25-r1.ebuild,v 1.1 2015/01/03 12:12:32 swift Exp $ + +EAPI=5 + +PATCHSET=1 + +inherit eutils user java-pkg-opt-2 systemd + +MY_P=${P/_/-} + +DESCRIPTION="Munin Server Monitoring Tool" +HOMEPAGE="http://munin-monitoring.org/" +SRC_URI=" + mirror://sourceforge/munin/${MY_P}.tar.gz + http://dev.gentoo.org/~jlec/distfiles/${P}-gentoo-${PATCHSET}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~mips ~ppc ~x86" +IUSE="asterisk irc java memcached minimal mysql postgres selinux ssl test cgi ipv6 syslog ipmi http dhcpd doc apache" +REQUIRED_USE="cgi? ( !minimal ) apache? ( cgi )" + +# Upstream's listing of required modules is NOT correct! +# Some of the postgres plugins use DBD::Pg, while others call psql directly. +# Some of the mysql plugins use DBD::mysql, while others call mysqladmin directly. +# We replace the original ipmi plugins with the freeipmi_ plugin which at least works. +DEPEND_COM=" + dev-lang/perl[berkdb] + dev-perl/DBI + dev-perl/DateManip + dev-perl/File-Copy-Recursive + dev-perl/List-MoreUtils + dev-perl/Log-Log4perl + dev-perl/Net-CIDR + dev-perl/Net-DNS + dev-perl/Net-Netmask + dev-perl/Net-SNMP + dev-perl/net-server[ipv6(-)?] + virtual/perl-Digest-MD5 + virtual/perl-Getopt-Long + virtual/perl-MIME-Base64 + virtual/perl-Storable + virtual/perl-Text-Balanced + virtual/perl-Time-HiRes + apache? ( www-servers/apache[apache2_modules_cgi,apache2_modules_cgid,apache2_modules_rewrite] ) + asterisk? ( dev-perl/Net-Telnet ) + cgi? ( dev-perl/FCGI ) + dhcpd? ( + >=net-misc/dhcp-3[server] + dev-perl/Net-IP + dev-perl/HTTP-Date + ) + doc? ( dev-python/sphinx ) + http? ( dev-perl/libwww-perl ) + irc? ( dev-perl/Net-IRC ) + kernel_linux? ( sys-process/procps ) + memcached? ( dev-perl/Cache-Memcached ) + mysql? ( + virtual/mysql + dev-perl/Cache-Cache + dev-perl/DBD-mysql + ) + postgres? ( dev-perl/DBD-Pg dev-db/postgresql ) + ssl? ( dev-perl/Net-SSLeay ) + syslog? ( virtual/perl-Sys-Syslog ) + !minimal? ( + dev-perl/HTML-Template + dev-perl/IO-Socket-INET6 + dev-perl/URI + >=net-analyzer/rrdtool-1.3[graph,perl] + virtual/ssh + ) + " + +# Keep this seperate, as previous versions have had other deps here +DEPEND="${DEPEND_COM} + virtual/perl-Module-Build + java? ( >=virtual/jdk-1.5 ) + test? ( + dev-perl/Test-Deep + dev-perl/Test-LongString + dev-perl/Test-Differences + dev-perl/Test-MockModule + dev-perl/Test-MockObject + dev-perl/File-Slurp + dev-perl/IO-stringy + dev-perl/IO-Socket-INET6 + )" +RDEPEND="${DEPEND_COM} + virtual/awk + ipmi? ( >=sys-libs/freeipmi-1.1.6-r1 ) + java? ( + >=virtual/jre-1.5 + || ( net-analyzer/netcat6 net-analyzer/netcat ) + ) + !minimal? ( + virtual/cron + media-fonts/dejavu + ) + selinux? ( sec-policy/selinux-munin ) + !> "${S}"/Makefile.config <<- EOF + PREFIX=\$(DESTDIR)/usr + CONFDIR=\$(DESTDIR)/etc/munin + DOCDIR=${T}/useless/doc + MANDIR=\$(PREFIX)/share/man + LIBDIR=\$(PREFIX)/libexec/munin + HTMLDIR=\$(DESTDIR)/var/www/localhost/htdocs/munin + CGIDIR=${cgidir} + CGITMPDIR=\$(DESTDIR)/var/cache/munin-cgi + CGIUSER=${cgiuser} + DBDIR=\$(DESTDIR)/var/lib/munin + DBDIRNODE=\$(DESTDIR)/var/lib/munin-node + SPOOLDIR=\$(DESTDIR)/var/spool/munin-async + LOGDIR=\$(DESTDIR)/var/log/munin + PERLSITELIB=$(perl -V:vendorlib | cut -d"'" -f2) + JCVALID=$(usex java yes no) + STATEDIR=\$(DESTDIR)/run/munin + EOF +} + +# parallel make and install need to be fixed before, and I haven't +# gotten around to do so yet. +src_compile() { + emake -j1 + use doc && emake -C doc html +} + +src_test() { + if [[ ${EUID} == 0 ]]; then + eerror "You cannot run tests as root." + eerror "Please enable FEATURES=userpriv before proceeding." + return 1 + fi + + local testtargets="test-common test-node test-plugins" + use minimal || testtargets+=" test-master" + + LC_ALL=C emake -j1 ${testtargets} +} + +src_install() { + local dirs=" + /var/log/munin + /var/lib/munin/plugin-state + /etc/munin/plugin-conf.d + /etc/munin/plugins" + use minimal || dirs+=" /etc/munin/munin-conf.d/" + + keepdir ${dirs} + fowners munin:munin ${dirs} + + # parallel install doesn't work and it's also pointless to have this + # run in parallel for now (because it uses internal loops). + emake -j1 DESTDIR="${D}" $(usex minimal install-minimal install) + + # we remove /run from the install, as it's not the package's to deal + # with. + rm -rf "${D}"/run || die + + # remove the plugins for non-Gentoo package managers; use -f so that + # it doesn't fail when installing on non-Linux platforms. + rm -f "${D}"/usr/libexec/munin/plugins/{apt{,_all},yum} || die + + insinto /etc/munin/plugin-conf.d/ + newins "${FILESDIR}"/${PN}-1.3.2-plugins.conf munin-node + + newinitd "${FILESDIR}"/munin-node_init.d_2.0.19 munin-node + newconfd "${FILESDIR}"/munin-node_conf.d_1.4.6-r2 munin-node + + newinitd "${FILESDIR}"/munin-asyncd.init.2 munin-asyncd + + dodir /usr/lib/tmpfiles.d + cat > "${D}"/usr/lib/tmpfiles.d/${CATEGORY}:${PN}:${SLOT}.conf <<- EOF + d /run/munin 0700 munin munin - - + EOF + + systemd_dounit "${FILESDIR}"/munin-async.service + systemd_dounit "${FILESDIR}"/munin-graph.{service,socket} + systemd_dounit "${FILESDIR}"/munin-html.{service,socket} + systemd_dounit "${FILESDIR}"/munin-node.service + + cat >> "${T}"/munin.env <<- EOF + CONFIG_PROTECT=/var/spool/munin-async/.ssh + EOF + newenvd "${T}"/munin.env 50munin + + dodoc README ChangeLog INSTALL + if use doc; then + cd "${S}"/doc/_build/html || die + docinto html + dodoc -r * + cd "${S}" || die + fi + + dodir /etc/logrotate.d/ + sed -e "s:@CGIUSER@:$(usex apache apache munin):g" \ + "${FILESDIR}"/logrotate.d-munin.3 > "${D}"/etc/logrotate.d/munin + + dosym ipmi_ /usr/libexec/munin/plugins/ipmi_sensor_ + + if use syslog; then + sed -i -e '/log_file/s| .*| Sys::Syslog|' \ + "${D}"/etc/munin/munin-node.conf || die + fi + + # Use a simpler pid file to avoid trouble with /run in tmpfs. The + # munin-node service is ran as user root, and only later drops + # privileges. + sed -i -e 's:/run/munin/munin-node.pid:/run/munin-node.pid:' \ + "${D}"/etc/munin/munin-node.conf || die + + keepdir /var/spool/munin-async/.ssh + touch "${D}"/var/spool/munin-async/.ssh/authorized_keys + fowners munin-async:munin /var/spool/munin-async{,/.ssh/{,authorized_keys}} + fperms 0750 /var/spool/munin-async{,/.ssh} + fperms 0600 /var/spool/munin-async/.ssh/authorized_keys + + if use minimal; then + # This requires the presence of munin-update, which is part of + # the non-minimal install... + rm "${D}"/usr/libexec/munin/plugins/munin_stats + else + # remove font files so that we don't have to keep them around + rm "${D}"/usr/libexec/${PN}/*.ttf || die + + if use cgi; then + sed -i -e '/#graph_strategy cgi/s:^#::' "${D}"/etc/munin/munin.conf || die + + keepdir /var/cache/munin-cgi + touch "${D}"/var/log/munin/munin-cgi-{graph,html}.log + fowners $(usex apache apache munin) \ + /var/cache/munin-cgi \ + /var/log/munin/munin-cgi-{graph,html}.log + + if use apache; then + insinto /etc/apache2/vhosts.d + newins "${FILESDIR}"/munin.apache.include munin.include + newins "${FILESDIR}"/munin.apache.include-2.4 munin-2.4.include + fi + else + sed \ + -e '/#graph_strategy cgi/s:#graph_strategy cgi:graph_strategy cron:' \ + -i "${D}"/etc/munin/munin.conf || die + fi + + keepdir /var/lib/munin/.ssh + cat >> "${D}"/var/lib/munin/.ssh/config <<- EOF + IdentityFile /var/lib/munin/.ssh/id_ecdsa + IdentityFile /var/lib/munin/.ssh/id_rsa + EOF + + fowners munin:munin /var/lib/munin/.ssh/{,config} + fperms go-rwx /var/lib/munin/.ssh/{,config} + + dodir /usr/share/${PN} + cat >> "${D}"/usr/share/${PN}/crontab <<- EOF + # Force the shell to bash + SHELL=/bin/bash + # Mail reports to root@, not munin@ + MAILTO=root + + # This runs the munin task every 5 minutes. + */5 * * * * /usr/bin/munin-cron + + # Alternatively, this route works differently + # Update once a minute (for busy sites) + #*/1 * * * * /usr/libexec/munin/munin-update + ## Check for limit excess every 2 minutes + #*/2 * * * * /usr/libexec/munin/munin-limits + ## Update graphs every 5 minutes + #*/5 * * * * nice /usr/libexec/munin/munin-graph + ## Update HTML pages every 15 minutes + #*/15 * * * * nice /usr/libexec/munin/munin-html + EOF + + cat >> "${D}"/usr/share/${PN}/fcrontab <<- EOF + # Mail reports to root@, not munin@, only execute one at a time + !mailto(root),serial(true) + + # This runs the munin task every 5 minutes. + @ 5 /usr/bin/munin-cron + + # Alternatively, this route works differently + # Update once a minute (for busy sites) + #@ 1 /usr/libexec/munin/munin-update + ## Check for limit excess every 2 minutes + #@ 2 /usr/libexec/munin/munin-limits + ## Update graphs every 5 minutes + #@ 5 nice /usr/libexec/munin/munin-graph + ## Update HTML pages every 15 minutes + #@ 15 nice /usr/libexec/munin/munin-html + EOF + + # remove .htaccess file + find "${D}" -name .htaccess -delete || die + fi +} + +pkg_config() { + if use minimal; then + einfo "Nothing to do." + return 0 + fi + + einfo "Press enter to install the default crontab for the munin master" + einfo "installation from /usr/share/${PN}/f?crontab" + einfo "If you have a large site, you may wish to customize it." + read + + ebegin "Setting up cron ..." + if has_version sys-process/fcron; then + fcrontab - -u munin < /usr/share/${PN}/fcrontab + else + # dcron is very fussy about syntax + # the following is the only form that works in BOTH dcron and vixie-cron + crontab - -u munin < /usr/share/${PN}/crontab + fi + eend $? + + einfo "Press enter to set up the SSH keys used for SSH transport" + read + + # generate one rsa (for legacy) and one ecdsa (for new systems) + ssh-keygen -t rsa \ + -f /var/lib/munin/.ssh/id_rsa -N '' \ + -C "created by portage for ${CATEGORY}/${PN}" || die + ssh-keygen -t ecdsa \ + -f /var/lib/munin/.ssh/id_ecdsa -N '' \ + -C "created by portage for ${CATEGORY}/${PN}" || die + chown -R munin:munin /var/lib/munin/.ssh || die + chmod 0600 /var/lib/munin/.ssh/id_{rsa,ecdsa} || die + + einfo "Your public keys are available in " + einfo " /var/lib/munin/.ssh/id_rsa.pub" + einfo " /var/lib/munin/.ssh/id_ecdsa.pub" + einfo "and follows for convenience" + echo + cat /var/lib/munin/.ssh/id_*.pub +} + +pkg_postinst() { + elog "Please follow the munin documentation to set up the plugins you" + elog "need, afterwards start munin-node." + elog "" + elog "To make use of munin-async, make sure to set up the corresponding" + elog "SSH key in /var/lib/munin-async/.ssh/authorized_keys" + elog "" + if ! use minimal; then + elog "Please run" + elog " emerge --config net-analyzer/munin" + elog "to automatically configure munin's cronjobs as well as generate" + elog "passwordless SSH keys to be used with munin-async." + fi + elog "" + elog "Further information about setting up Munin in Gentoo can be found" + elog "in the Gentoo Wiki: https://wiki.gentoo.org/wiki/Munin" + + if use cgi; then + chown $(usex apache apache munin) \ + "${ROOT}"/var/cache/munin-cgi \ + "${ROOT}"/var/log/munin/munin-cgi-{graph,html}.log + + if use apache; then + elog "To use Munin with CGI you should include /etc/apache2/vhosts.d/munin.include" + elog "or /etc/apache2/vhosts.d/munin-2.4.include (for Apache 2.4) from the virtual" + elog "host you want it to be served." + elog "If you want to enable CGI-based HTML as well, you have to add to" + elog "/etc/conf.d/apache2 the option -D MUNIN_HTML_CGI." + else + elog "Effective CGI support has just been added in 2.0.7-r6." + elog "Documentation on how to use it is still sparse." + fi + fi + + # we create this here as we don't want Portage to check /run + # symlinks but we still need this to be present before the reboot. + if ! use minimal && ! [[ -d "${ROOT}"/run/munin ]]; then + mkdir "${ROOT}"/run/munin + chown munin:munin "${ROOT}"/run/munin + chmod 0700 "${ROOT}"/run/munin + fi +} diff --git a/net-analyzer/munin/munin-2.1.9999.ebuild b/net-analyzer/munin/munin-2.1.9999.ebuild index 594536084823..815449d711c1 100644 --- a/net-analyzer/munin/munin-2.1.9999.ebuild +++ b/net-analyzer/munin/munin-2.1.9999.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/munin/munin-2.1.9999.ebuild,v 1.6 2014/12/28 16:08:50 titanofold Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/munin/munin-2.1.9999.ebuild,v 1.7 2015/01/03 12:12:32 swift Exp $ EAPI=5 @@ -14,7 +14,7 @@ HOMEPAGE="http://munin-monitoring.org/" LICENSE="GPL-2" SLOT="0" KEYWORDS="" -IUSE="irc java memcached minimal mysql postgres ssl test cgi ipv6 syslog ipmi http dhcpd doc apache" +IUSE="irc java memcached minimal mysql postgres selinux ssl test cgi ipv6 syslog ipmi http dhcpd doc apache" REQUIRED_USE="cgi? ( !minimal ) apache? ( cgi )" # Upstream's listing of required modules is NOT correct! @@ -88,6 +88,7 @@ RDEPEND="${DEPEND_COM} virtual/cron media-fonts/dejavu ) + selinux? ( sec-policy/selinux-munin ) !