From 2b03b0d9c5ca3890c219ebd24721133e766e9bb9 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 6 Oct 2023 11:57:11 +0100 Subject: gentoo auto-resync : 06:10:2023 - 11:57:10 --- net-analyzer/Manifest.gz | Bin 43263 -> 43263 bytes net-analyzer/gvm-tools/Manifest | 4 +- net-analyzer/gvm-tools/gvm-tools-23.4.0.ebuild | 23 -- net-analyzer/gvm-tools/gvm-tools-23.9.0.ebuild | 23 ++ net-analyzer/munin/Manifest | 5 +- net-analyzer/munin/munin-2.0.73-r1.ebuild | 418 ------------------------- net-analyzer/munin/munin-2.0.73-r2.ebuild | 417 ------------------------ net-analyzer/munin/munin-2.0.73.ebuild | 415 ------------------------ net-analyzer/munin/munin-2.0.74.ebuild | 418 +++++++++++++++++++++++++ net-analyzer/wireshark/Manifest | 6 +- net-analyzer/wireshark/wireshark-4.0.10.ebuild | 341 ++++++++++++++++++++ net-analyzer/wireshark/wireshark-4.0.9.ebuild | 341 -------------------- 12 files changed, 789 insertions(+), 1622 deletions(-) delete mode 100644 net-analyzer/gvm-tools/gvm-tools-23.4.0.ebuild create mode 100644 net-analyzer/gvm-tools/gvm-tools-23.9.0.ebuild delete mode 100644 net-analyzer/munin/munin-2.0.73-r1.ebuild delete mode 100644 net-analyzer/munin/munin-2.0.73-r2.ebuild delete mode 100644 net-analyzer/munin/munin-2.0.73.ebuild create mode 100644 net-analyzer/munin/munin-2.0.74.ebuild create mode 100644 net-analyzer/wireshark/wireshark-4.0.10.ebuild delete mode 100644 net-analyzer/wireshark/wireshark-4.0.9.ebuild (limited to 'net-analyzer') diff --git a/net-analyzer/Manifest.gz b/net-analyzer/Manifest.gz index 2b8de78e373d..94334b0c7020 100644 Binary files a/net-analyzer/Manifest.gz and b/net-analyzer/Manifest.gz differ diff --git a/net-analyzer/gvm-tools/Manifest b/net-analyzer/gvm-tools/Manifest index 5d027988a6bd..68cf7df5c943 100644 --- a/net-analyzer/gvm-tools/Manifest +++ b/net-analyzer/gvm-tools/Manifest @@ -1,5 +1,5 @@ DIST gvm-tools-21.10.0.tar.gz 162620 BLAKE2B b205fad4ef05dbd7f8d01b92cf8c123145cb526320dbe881b82ae53ebfbe5e1ee5858996687e256540dd9ce66a8fa50937b6bc0b79888c2c43389db107cefcb0 SHA512 0dc202debaae1431194585575d11b1af6aa057456429dc46e7bf6677b2217fd8569572dc71b8ada578caa961ff2b371a364fb67277c40e76e3025b6b3fcb3a5b -DIST gvm-tools-23.4.0.tar.gz 219320 BLAKE2B 5ea56fbe1c613837eb8e5d17714439275b6e544c55a1bc4a86333e18b6772dddb5d425a78caccd1a5382cc83678bf927d21e96fd2738870a6cd3adf7200f958e SHA512 41830e2388eb661d2e64fd63bf42f50adc4d3a1ec5fbe708d0cea072bf0256f10177424989a3fe44c6d93a7e88bcbba139f05e1ff11f85546a5a639974c14ad3 +DIST gvm-tools-23.9.0.tar.gz 221180 BLAKE2B cb96f7d38e84a7dfd76a859bbd33db715aeb0bfb3aa1d26acd45b04208a33ee9ca309ba736352242b732fec7a0d615f01efc5827e834e2ea0939c846dfa63994 SHA512 2c58d2cf5b0280c54e1451311bd9b331880ea338cef19bd5224580939b7e43befed5270e73e17a3016410803e417c7049f35aec63461b9d4d6c99baec0ecb374 EBUILD gvm-tools-21.10.0-r1.ebuild 1027 BLAKE2B 5b6618bf2b4a8dcb994dbee4249e7a0fb31ab2c3153c6bc3788839c3e8291125a6ca7c7ec406be1a6561cf4a1f54e35bc9f5c000eb4958453a2fa94e9fa2457d SHA512 2394382c8652ae738707b785999b9da4c4bd0e731b2a47539b2d9ca1f69ba882252ed084117e008542e9caaf432e9d7a69e408486a983fe4d361df3b2eee18c9 -EBUILD gvm-tools-23.4.0.ebuild 623 BLAKE2B 9058d528ffdf112f209e9f13f89521514e705d1bb268ed3fb207305bfcee36a6218ce1b6b7f7d84fd3e13fc383e3a8fb53eef339b4d16dc19faf0479e76da143 SHA512 f052e150bb957f7b8f29039fe83c44e6bd65fd7aad2a3ad5f8e304adaa4f4ec7c5a95199b78db3b6abcd0ddf26d3eecda95f4e81c078973ea2f4a2331ce0982d +EBUILD gvm-tools-23.9.0.ebuild 623 BLAKE2B 9058d528ffdf112f209e9f13f89521514e705d1bb268ed3fb207305bfcee36a6218ce1b6b7f7d84fd3e13fc383e3a8fb53eef339b4d16dc19faf0479e76da143 SHA512 f052e150bb957f7b8f29039fe83c44e6bd65fd7aad2a3ad5f8e304adaa4f4ec7c5a95199b78db3b6abcd0ddf26d3eecda95f4e81c078973ea2f4a2331ce0982d MISC metadata.xml 1029 BLAKE2B 91595f8420740154d2823126b12f7b67740660a08dbf5b78b26fa59523b3a37238e64d0abbbfc4fdb3dc99cc741ea0c21160923ab67030a4a77b04f1b3a11481 SHA512 0b958ded9193e1acde6db72b15cea25bc9837afb82769cf12c5434afd0223874014a05dffee8680d0bbd27f263c2adb9b5b7f25b7dfddd9f79aa54b837482576 diff --git a/net-analyzer/gvm-tools/gvm-tools-23.4.0.ebuild b/net-analyzer/gvm-tools/gvm-tools-23.4.0.ebuild deleted file mode 100644 index accfcb9a95f1..000000000000 --- a/net-analyzer/gvm-tools/gvm-tools-23.4.0.ebuild +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{10..11} ) -DISTUTILS_USE_PEP517=poetry -inherit distutils-r1 - -DESCRIPTION="Remote control for Greenbone Vulnerability Manager, previously named openvas-cli" -HOMEPAGE="https://www.greenbone.net https://github.com/greenbone/gvm-tools/" -SRC_URI="https://github.com/greenbone/gvm-tools/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -SLOT="0" -LICENSE="GPL-3" -KEYWORDS="~amd64 ~x86" - -RDEPEND=" - >=net-analyzer/python-gvm-23.4.2[${PYTHON_USEDEP}] -" -DEPEND="${RDEPEND}" - -distutils_enable_tests unittest diff --git a/net-analyzer/gvm-tools/gvm-tools-23.9.0.ebuild b/net-analyzer/gvm-tools/gvm-tools-23.9.0.ebuild new file mode 100644 index 000000000000..accfcb9a95f1 --- /dev/null +++ b/net-analyzer/gvm-tools/gvm-tools-23.9.0.ebuild @@ -0,0 +1,23 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..11} ) +DISTUTILS_USE_PEP517=poetry +inherit distutils-r1 + +DESCRIPTION="Remote control for Greenbone Vulnerability Manager, previously named openvas-cli" +HOMEPAGE="https://www.greenbone.net https://github.com/greenbone/gvm-tools/" +SRC_URI="https://github.com/greenbone/gvm-tools/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +SLOT="0" +LICENSE="GPL-3" +KEYWORDS="~amd64 ~x86" + +RDEPEND=" + >=net-analyzer/python-gvm-23.4.2[${PYTHON_USEDEP}] +" +DEPEND="${RDEPEND}" + +distutils_enable_tests unittest diff --git a/net-analyzer/munin/Manifest b/net-analyzer/munin/Manifest index 6e464357a791..0fc536eec602 100644 --- a/net-analyzer/munin/Manifest +++ b/net-analyzer/munin/Manifest @@ -21,10 +21,9 @@ AUX patches/0009-perl-526.patch 849 BLAKE2B 4f38dedbe74e601dd67f44339dc1e64754f3 DIST munin-2.0.69-gentoo-1.tar.xz 3980 BLAKE2B 5aae9c29befa761f797d362c90d810051a7f3a5dc8250776ab6ae1659197d795dfb87274db66ff0a3deb4e10e14ced5b3765551a3f29357c436968a848f450ea SHA512 b21d6590bb9e1da127066a06818f1f3157362762f80526e2231b926956959e62af575f38235f72326376dc21bba63f9767efa379f1f2558ca9b20ddf5395e851 DIST munin-2.0.69.tar.gz 2258024 BLAKE2B 2d270f6f67fc9a86a592e2b7cbcf4111d6ae40bf1928b0ad0adb99ad32384810e5768c17019f9163e8b22fd8524b28257df527df023db9c1ba333691b384dd74 SHA512 4976e394e046d3fe1cbb000acdf081060188517e09abcf8b60dd7c55e0e1cdf46e33d1760368cb1423dfb9286e397df2072a2c55ba8b79adeae4ea2303130667 DIST munin-2.0.73.tar.gz 2259959 BLAKE2B 2d2e4ce00b2df06f083280b9253f875ded100e42c991152f3f8e4b39e85d605367efc18df369e07e18eac38aabd78faa959c367752b153f97246bb47a9732f20 SHA512 4f1d59ff3f163c8fac883973ebba1221619d716c4cde506d9265544c52e73f43e8b587cda3fd00bcf779ceeaf8fef6e7780d9ea4be5b99894f0bb5047f24b935 +DIST munin-2.0.74.tar.gz 2258466 BLAKE2B a993c97d1f2c3aec8c3970e75d0406ce8b5a56eb54c729cdd97c4fbd38190dc474336b9faf06881b4f293a72c4181e8138edefc51da548c179c082869d966f34 SHA512 ad75100576b74d1d75bb7f204975ce683c88aadb668d61feabc6652d5dc0495af4f94a9e8d485a242dbc178f003be91ec72c350b35186d9410035f1c8688f97b DIST munin-remove-Date-Manip-DM5.patch 3587 BLAKE2B fab1fb61607e83aac5cbd699c93015d77ca6e58d9734a5a6bc17af6c3c7695ddf4257104cd69db4d3b3e1d36bb1d66a1893ddb51bfc52d0a1dd2efb3ba32a9c0 SHA512 976d7a50de6437a26fa77917368ab604c1987f686030e097c200fe9ebebd08e5fae10c04640cadbfecef90eda76ba123cf303d2d671cefa78b09752d1f6757af EBUILD munin-2.0.69-r1.ebuild 12568 BLAKE2B af5b2c07a81c6c1cf733fb3200aa69a81f1c7ec4b7dbdee6b1665d1070c18e9983d7a6adbd01c84c21cfa5f978fc34cec3aff1eb0b394da994e72b02e3c683e9 SHA512 66efe60daf5edfcb2d3198e0f398a01d5a68f31143b5b9723d43cf00ccf8256aa12c9e29ee57bb8fc742ee53332c1a671cd470c655d505b4e5bae16c2d0a86a2 -EBUILD munin-2.0.73-r1.ebuild 12274 BLAKE2B 2002080dad8728b31ddb3c32dea575bb7a7d04b60b6a736d77ee196b35de318aa6f7e13c925abfc083d8e2db10993e4fe6966a8ef8c1aa9282654252f625b071 SHA512 6d1f6c3932790ca1020fd0fbc573cdef3a0c9797e90ea5e714e384b06c5a758f263235a3981559f07b84445cb6c98a4f1f17fd5b10c20fdd2fa7fb574a5cbf52 -EBUILD munin-2.0.73-r2.ebuild 12161 BLAKE2B b0cd6e479b426ff82f6e4779c506c31c89b4ff71348d81d2ace3ae1d54f55bfbfb3bd6d8dae600bc2afeb941e51f191c1be87ccf929edb56c69561f344c76721 SHA512 61792e53d0c7ffef0a9d5a3dc5576d88e6e112d99a29ce0672cf4006acec290cda17a86b8a01d6167c4c3197572dbedef0d7bb056e844bafa2f63fdcc976a5cf EBUILD munin-2.0.73-r4.ebuild 12178 BLAKE2B e00d38a5e33de5940326c7841967f7862bc746546fce26bbcc7e2e7331cf72ceeafb2b0a8d15f716914487f09d41698b7fa713f2d622b60eaf5fc3b0b2819737 SHA512 ff56b174ecb3ea5327b10cb44151672c8172fb18fb20d1561a34d4cf1e79b922f0cb7eff3f8c68d08087e893913fa69da7713f5e6654753674b813a8128a4515 -EBUILD munin-2.0.73.ebuild 12147 BLAKE2B f6ca54234cec7e66ca0faac3e9f299827b16b613ec30010fd464a837e057d68e7256d7958e9f44437f7aebb3b0a35ec9730c07385cb451b29d8d6cf5f2e96ab0 SHA512 c5ab32698a3d10c52e9232c90042b0797e2cf43b34dff5a6f98de4fec3282b43db9422de54fb570f645cbe54a077601eb2bce2f1edf5d9d3c5f13c0ee66b3d5b +EBUILD munin-2.0.74.ebuild 12182 BLAKE2B 3feb957c7f21724b883c7f5397849ad0fca2d958e3c44d246e08496c4ef496a6b17713842dbbe0f19badbb9353268815d84d53b7d8ac437aeec5072dc957d952 SHA512 07d0be4a153cd99364b1973ba95150b9da9151d20bb94184a8dcb4581a1beea951a7ffae29590dbc1439aa146ba5c5e6a4811ffd8485ae1505f2d4dc720411f7 MISC metadata.xml 3933 BLAKE2B e13958d477a85e5f2327ffb529567dc129e6531a114b304d930399fe9cb81e6581f1df9d884860294984580c5b3e4335dfb623fca85e18e1de818430476eacfb SHA512 f824ef7f1a950ab81c4e3f2e81f44c6b3a49dc56a4aab977fad14e5d757875f8cb4900d8cd528c16449fafc8d08ab3792be8dc5a2a820932add7ce03ca35102c diff --git a/net-analyzer/munin/munin-2.0.73-r1.ebuild b/net-analyzer/munin/munin-2.0.73-r1.ebuild deleted file mode 100644 index 23d59f9dbda6..000000000000 --- a/net-analyzer/munin/munin-2.0.73-r1.ebuild +++ /dev/null @@ -1,418 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PATCHSET=1 - -inherit java-pkg-opt-2 systemd tmpfiles - -MY_P=${P/_/-} - -DESCRIPTION="Munin Server Monitoring Tool" -HOMEPAGE="https://munin-monitoring.org/" -SRC_URI=" - https://github.com/munin-monitoring/munin/archive/${PV}.tar.gz -> ${P}.tar.gz - " - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" -IUSE="asterisk irc java ldap memcached minimal mysql postgres selinux ssl test cgi ipv6 syslog ipmi http dhcpd doc apache2" -REQUIRED_USE="cgi? ( !minimal ) apache2? ( cgi )" -RESTRICT="!test? ( test )" - -# 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=" - acct-user/munin - acct-user/munin-async - acct-group/munin - dev-lang/perl:=[berkdb] - dev-perl/DBI - 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(-)?] - dev-perl/TimeDate - virtual/perl-Digest-MD5 - virtual/perl-Getopt-Long - virtual/perl-MIME-Base64 - virtual/perl-Storable - virtual/perl-Text-Balanced - virtual/perl-Time-HiRes - apache2? ( www-servers/apache[apache2_modules_cgi,apache2_modules_cgid,apache2_modules_rewrite] ) - asterisk? ( dev-perl/Net-Telnet ) - cgi? ( - dev-perl/FCGI - dev-perl/CGI-Fast - ) - 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 ) - ldap? ( dev-perl/perl-ldap ) - 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} - dev-perl/Module-Build - java? ( >=virtual/jdk-1.8 ) - test? ( - dev-perl/Test-Deep - dev-perl/Test-Exception - 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} - app-alternatives/awk - ipmi? ( >=sys-libs/freeipmi-1.1.6-r1 ) - java? ( - >=virtual/jre-1.8:* - || ( net-analyzer/netcat net-analyzer/openbsd-netcat ) - ) - !minimal? ( - virtual/cron - media-fonts/dejavu - ) - selinux? ( sec-policy/selinux-munin )" - -S="${WORKDIR}/${MY_P}" - -pkg_setup() { - java-pkg-opt-2_pkg_setup -} - -src_prepare() { - echo ${PV} > RELEASE || die - - eapply "${FILESDIR}"/patches/*.patch - - eapply_user - - java-pkg-opt-2_src_prepare -} - -src_configure() { - local cgidir='$(DESTDIR)/usr/libexec/munin/cgi' - use cgi || cgidir="${T}/useless/cgi-bin" - - local cgiuser=$(usex apache2 apache munin) - - cat >> "${S}"/Makefile.config <<- EOF || die - 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 - PERLLIB=\$(DESTDIR)$(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 cgiuser=$(usex apache2 apache munin) - - local dirs=" - /var/log/munin - /var/lib/munin/plugin-state - /var/lib/munin-node/plugin-state - /var/www/localhost/htdocs/munin - /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 CHOWN=true DESTDIR="${D}" $(usex minimal "install-minimal install-man" install) - - # we remove /run and /var/cache from the install, as it's not the - # package's to deal with. - rm -rf "${D}"/run "${D}"/var/cache || 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 - - newtmpfiles - ${CATEGORY}:${PN}:${SLOT}.conf <<-EOF || die - d /run/munin 0700 munin munin - - - d /var/cache/munin-cgi 0755 ${cgiuser} 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 apache2 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 - - touch "${D}"/var/log/munin/munin-cgi-{graph,html}.log - fowners $(usex apache2 apache munin) \ - /var/log/munin/munin-cgi-{graph,html}.log - - if use apache2; 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() { - tmpfiles_process ${CATEGORY}:${PN}:${SLOT}.conf - - 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 apache2 apache munin) \ - "${ROOT}"/var/log/munin/munin-cgi-{graph,html}.log - - if use apache2; 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.0.73-r2.ebuild b/net-analyzer/munin/munin-2.0.73-r2.ebuild deleted file mode 100644 index 3c34a9d76170..000000000000 --- a/net-analyzer/munin/munin-2.0.73-r2.ebuild +++ /dev/null @@ -1,417 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PATCHSET=1 - -inherit java-pkg-opt-2 systemd tmpfiles - -MY_P=${P/_/-} - -DESCRIPTION="Munin Server Monitoring Tool" -HOMEPAGE="https://munin-monitoring.org/" -SRC_URI=" - https://github.com/munin-monitoring/munin/archive/${PV}.tar.gz -> ${P}.tar.gz - " - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" -IUSE="asterisk irc java ldap memcached minimal mysql postgres selinux ssl test cgi ipv6 syslog ipmi http dhcpd doc apache2" -REQUIRED_USE="cgi? ( !minimal ) apache2? ( cgi )" -RESTRICT="!test? ( test )" - -# 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=" - acct-user/munin - acct-user/munin-async - acct-group/munin - dev-lang/perl:=[berkdb] - dev-perl/DBI - 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(-)?] - dev-perl/TimeDate - virtual/perl-Digest-MD5 - virtual/perl-Getopt-Long - virtual/perl-MIME-Base64 - virtual/perl-Storable - virtual/perl-Text-Balanced - virtual/perl-Time-HiRes - apache2? ( www-servers/apache[apache2_modules_cgi,apache2_modules_cgid,apache2_modules_rewrite] ) - asterisk? ( dev-perl/Net-Telnet ) - cgi? ( - dev-perl/FCGI - dev-perl/CGI-Fast - ) - 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 ) - ldap? ( dev-perl/perl-ldap ) - 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} - dev-perl/Module-Build - java? ( >=virtual/jdk-1.8 ) - test? ( - dev-perl/Test-Deep - dev-perl/Test-Exception - 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} - app-alternatives/awk - ipmi? ( >=sys-libs/freeipmi-1.1.6-r1 ) - java? ( - >=virtual/jre-1.8:* - || ( net-analyzer/netcat net-analyzer/openbsd-netcat ) - ) - !minimal? ( - virtual/cron - media-fonts/dejavu - ) - selinux? ( sec-policy/selinux-munin )" - -S="${WORKDIR}/${MY_P}" - -pkg_setup() { - java-pkg-opt-2_pkg_setup -} - -src_prepare() { - echo ${PV} > RELEASE || die - - eapply "${FILESDIR}"/patches/*.patch - - eapply_user - - java-pkg-opt-2_src_prepare -} - -src_configure() { - local cgidir='$(DESTDIR)/usr/libexec/munin/cgi' - use cgi || cgidir="${T}/useless/cgi-bin" - - local cgiuser=$(usex apache2 apache munin) - - cat >> "${S}"/Makefile.config <<- EOF || die - 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 - PERLLIB=\$(DESTDIR)$(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 cgiuser=$(usex apache2 apache munin) - - local dirs=" - /var/log/munin - /var/lib/munin/plugin-state - /var/lib/munin-node/plugin-state - /var/www/localhost/htdocs/munin - /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 CHOWN=true DESTDIR="${D}" $(usex minimal "install-minimal install-man" install) - - # we remove /run and /var/cache from the install, as it's not the - # package's to deal with. - rm -rf "${D}"/run "${D}"/var/cache || 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 - - newtmpfiles - ${CATEGORY}:${PN}:${SLOT}.conf <<-EOF || die - d /run/munin 0700 munin munin - - - d /var/cache/munin-cgi 0755 ${cgiuser} 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 apache2 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 - - touch "${D}"/var/log/munin/munin-cgi-{graph,html}.log - fowners $(usex apache2 apache munin) \ - /var/log/munin/munin-cgi-{graph,html}.log - - if use apache2; then - insinto /etc/apache2/vhosts.d - newins "${FILESDIR}"/munin.apache.include-2.4-r1 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() { - tmpfiles_process ${CATEGORY}:${PN}:${SLOT}.conf - - 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 apache2 apache munin) \ - "${ROOT}"/var/log/munin/munin-cgi-{graph,html}.log - - if use apache2; then - elog "To use Munin with CGI you should include" - elog "/etc/apache2/vhosts.d/munin-2.4.include 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.0.73.ebuild b/net-analyzer/munin/munin-2.0.73.ebuild deleted file mode 100644 index 069169b51efe..000000000000 --- a/net-analyzer/munin/munin-2.0.73.ebuild +++ /dev/null @@ -1,415 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PATCHSET=1 - -inherit java-pkg-opt-2 systemd tmpfiles - -MY_P=${P/_/-} - -DESCRIPTION="Munin Server Monitoring Tool" -HOMEPAGE="https://munin-monitoring.org/" -SRC_URI=" - https://github.com/munin-monitoring/munin/archive/${PV}.tar.gz -> ${P}.tar.gz - " - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" -IUSE="asterisk irc java ldap memcached minimal mysql postgres selinux ssl test cgi ipv6 syslog ipmi http dhcpd doc apache2" -REQUIRED_USE="cgi? ( !minimal ) apache2? ( cgi )" -RESTRICT="!test? ( test )" - -# 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=" - acct-user/munin - acct-user/munin-async - acct-group/munin - dev-lang/perl:=[berkdb] - dev-perl/DBI - 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(-)?] - dev-perl/TimeDate - virtual/perl-Digest-MD5 - virtual/perl-Getopt-Long - virtual/perl-MIME-Base64 - virtual/perl-Storable - virtual/perl-Text-Balanced - virtual/perl-Time-HiRes - apache2? ( www-servers/apache[apache2_modules_cgi,apache2_modules_cgid,apache2_modules_rewrite] ) - asterisk? ( dev-perl/Net-Telnet ) - cgi? ( - dev-perl/FCGI - dev-perl/CGI-Fast - ) - 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 ) - ldap? ( dev-perl/perl-ldap ) - 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} - dev-perl/Module-Build - java? ( >=virtual/jdk-1.8 ) - test? ( - dev-perl/Test-Deep - dev-perl/Test-Exception - 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} - app-alternatives/awk - ipmi? ( >=sys-libs/freeipmi-1.1.6-r1 ) - java? ( - >=virtual/jre-1.8:* - || ( net-analyzer/netcat net-analyzer/openbsd-netcat ) - ) - !minimal? ( - virtual/cron - media-fonts/dejavu - ) - selinux? ( sec-policy/selinux-munin )" - -S="${WORKDIR}/${MY_P}" - -pkg_setup() { - java-pkg-opt-2_pkg_setup -} - -src_prepare() { - echo ${PV} > RELEASE || die - - eapply "${FILESDIR}"/patches/*.patch - - eapply_user - - java-pkg-opt-2_src_prepare -} - -src_configure() { - local cgidir='$(DESTDIR)/usr/libexec/munin/cgi' - use cgi || cgidir="${T}/useless/cgi-bin" - - local cgiuser=$(usex apache2 apache munin) - - cat >> "${S}"/Makefile.config <<- EOF || die - 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 - PERLLIB=\$(DESTDIR)$(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 - /var/lib/munin-node/plugin-state - /var/www/localhost/htdocs/munin - /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 CHOWN=true DESTDIR="${D}" $(usex minimal "install-minimal install-man" 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 - - newtmpfiles - ${CATEGORY}:${PN}:${SLOT}.conf <<-EOF || die - 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 apache2 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 - - touch "${D}"/var/log/munin/munin-cgi-{graph,html}.log - fowners $(usex apache2 apache munin) \ - /var/log/munin/munin-cgi-{graph,html}.log - - if use apache2; 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() { - tmpfiles_process ${CATEGORY}:${PN}:${SLOT}.conf - - 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 apache2 apache munin) \ - "${ROOT}"/var/log/munin/munin-cgi-{graph,html}.log - - if use apache2; 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.0.74.ebuild b/net-analyzer/munin/munin-2.0.74.ebuild new file mode 100644 index 000000000000..d81f16efcec8 --- /dev/null +++ b/net-analyzer/munin/munin-2.0.74.ebuild @@ -0,0 +1,418 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PATCHSET=1 + +inherit java-pkg-opt-2 systemd tmpfiles + +MY_P=${P/_/-} + +DESCRIPTION="Munin Server Monitoring Tool" +HOMEPAGE="https://munin-monitoring.org/" +SRC_URI=" + https://github.com/munin-monitoring/munin/archive/${PV}.tar.gz -> ${P}.tar.gz + " + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" +IUSE="asterisk irc java ldap memcached minimal mysql postgres selinux ssl test cgi ipv6 syslog ipmi http dhcpd doc apache2" +REQUIRED_USE="cgi? ( !minimal ) apache2? ( cgi )" +RESTRICT="!test? ( test )" + +# 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=" + acct-user/munin + acct-user/munin-async + acct-group/munin + dev-lang/perl:=[berkdb] + dev-perl/DBI + dev-perl/Date-Manip + 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(-)?] + dev-perl/TimeDate + virtual/perl-Digest-MD5 + virtual/perl-Getopt-Long + virtual/perl-MIME-Base64 + virtual/perl-Storable + virtual/perl-Text-Balanced + virtual/perl-Time-HiRes + apache2? ( www-servers/apache[apache2_modules_cgi,apache2_modules_cgid,apache2_modules_rewrite] ) + asterisk? ( dev-perl/Net-Telnet ) + cgi? ( + dev-perl/FCGI + dev-perl/CGI-Fast + ) + 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 ) + ldap? ( dev-perl/perl-ldap ) + 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} + dev-perl/Module-Build + java? ( >=virtual/jdk-1.8 ) + test? ( + dev-perl/Test-Deep + dev-perl/Test-Exception + 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} + app-alternatives/awk + ipmi? ( >=sys-libs/freeipmi-1.1.6-r1 ) + java? ( + >=virtual/jre-1.8:* + || ( net-analyzer/netcat net-analyzer/openbsd-netcat ) + ) + !minimal? ( + virtual/cron + media-fonts/dejavu + ) + selinux? ( sec-policy/selinux-munin )" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + java-pkg-opt-2_pkg_setup +} + +src_prepare() { + echo ${PV} > RELEASE || die + + eapply "${FILESDIR}"/patches/*.patch + + eapply_user + + java-pkg-opt-2_src_prepare +} + +src_configure() { + local cgidir='$(DESTDIR)/usr/libexec/munin/cgi' + use cgi || cgidir="${T}/useless/cgi-bin" + + local cgiuser=$(usex apache2 apache munin) + + cat >> "${S}"/Makefile.config <<- EOF || die + 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 + PERLLIB=\$(DESTDIR)$(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 cgiuser=$(usex apache2 apache munin) + + local dirs=" + /var/log/munin + /var/lib/munin/plugin-state + /var/lib/munin-node/plugin-state + /var/www/localhost/htdocs/munin + /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 CHOWN=true DESTDIR="${D}" $(usex minimal "install-minimal install-man" install) + + # we remove /run and /var/cache from the install, as it's not the + # package's to deal with. + rm -rf "${D}"/run "${D}"/var/cache || 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.73 munin-node + newconfd "${FILESDIR}"/munin-node_conf.d_1.4.6-r2 munin-node + + newinitd "${FILESDIR}"/munin-asyncd.init.2 munin-asyncd + + newtmpfiles - ${CATEGORY}:${PN}:${SLOT}.conf <<-EOF || die + d /run/munin 0700 munin munin - - + d /var/cache/munin-cgi 0755 ${cgiuser} 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 apache2 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 + + touch "${D}"/var/log/munin/munin-cgi-{graph,html}.log + fowners $(usex apache2 apache munin) \ + /var/log/munin/munin-cgi-{graph,html}.log + + if use apache2; then + insinto /etc/apache2/vhosts.d + newins "${FILESDIR}"/munin.apache.include-2.4-r1 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() { + tmpfiles_process ${CATEGORY}:${PN}:${SLOT}.conf + + 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 apache2 apache munin) \ + "${ROOT}"/var/log/munin/munin-cgi-{graph,html}.log + + if use apache2; then + elog "To use Munin with CGI you should include" + elog "/etc/apache2/vhosts.d/munin-2.4.include 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/wireshark/Manifest b/net-analyzer/wireshark/Manifest index 7642014b3f8c..e58e33a6fd48 100644 --- a/net-analyzer/wireshark/Manifest +++ b/net-analyzer/wireshark/Manifest @@ -1,13 +1,13 @@ AUX README.gentoo 188 BLAKE2B 1734362317f1c09b63ebb946961a3f31e5b785787ac3c4e026d71c95c14367f4f3df752706e0d04e14792c95c33c3829eea704806b3b14a96339819f8c2ad4f7 SHA512 92811e9bb6df95d87058e6b77ed09dd086db922721b71ea87af0fdfcc44e2585ef28cf264095d8645a9b5bb60a3990b21376f892305debac19a3f01518918959 AUX wireshark-2.6.0-redhat.patch 248 BLAKE2B a3cc5af29cea1b46cc8456c80a1ddf3a0db464f1274beba49c440af831d708bf251ad7481231f27bd7d7f99cf50f964e7f8aa80ce3c0f4d3b06f00ce624f7347 SHA512 92d498c7b6c3a4ae461f5bbca090943dbd7a3151628eebd4b212f3d9eca133260fe46bc72c6bec8444a83517d7a69c334257c61f9fd8e1256f71dd70241e3f66 AUX wireshark-3.4.2-cmake-lua-version.patch 304 BLAKE2B 438bd2ee1e0e0121cc673709385ccda88664131d50fb63d48147c83798e9f541efa270c56d30ad4345ef77d59fb16554b0d8de8c19bafd8181c0c96e3c7b1ba9 SHA512 ab4a7f3d64cc402fcf6b1c9b54aad75dbb1104b19282078947a6c4315f48b5a2c0eeff9918e42d98196976d2e1d26ef2e439a1d2811de1a326a4954d54a08bff +DIST wireshark-4.0.10-signatures.txt 2521 BLAKE2B 14ff83e9514b611909a010f750f904c735bc11ecb9fb7f3faebe8e27655c981f8ec9e20481775257c5aa28a1f67e87a708ae4fc0eb6032ebc5c422c1f8ba9e9e SHA512 16dab47407ec56a8e6672404feb50b1a0af7a9e71e761488ad803d6b0c96195edd74387be6b410a40b40c5908923d13d74612228361e3aa388aef0d931ffa023 +DIST wireshark-4.0.10.tar.xz 43124192 BLAKE2B f5121ae15df79d7d8e1bf6f65e566a556b848f623e876a3d6e92a501074e987aaa08a0056be5b42131518e89e0d358efd450f6b8399313cf836883ed345dde48 SHA512 695a5617100195aad92ecc38a29c3b765018fee49913dd6025b2e19d1ec5c5c4ed4195a79b5caa9cf0e8476db237e74bb602e56e9d2989ae852298767eaffbe5 DIST wireshark-4.0.8.tar.xz 43123664 BLAKE2B bda31be809724a39e475489eb5653589310ae679933fac193cbc8bb3924b3ec48a93b5da6d39655fdb9f4a8d717b9cc84fcb357bea275cb457b45783a75ca778 SHA512 f6de0f86bb1eac82f7ed2d98d7f4fe3189107b1f0da441abd9077593f8e624989c33aaf8b4ef4b3c460fe787c64c4b8fdb3168de9f5661802fed6b06d71c5c65 -DIST wireshark-4.0.9-signatures.txt 2503 BLAKE2B 830d4630826bbf644c3d0b1dbb5df32ba460448c59b07a307987d68354305c6fbe6c4700a38abe493f80883d90425bf9ec330f4155006fca4d1bff37f42df6dd SHA512 d813145850e13a3c77e2edba66f3606667b685d657b04e4ee5bc3b1f6d26a50fb492a2de91447ad07dd358a7c3bbe2b2ccd30ade30da943071daabd006eddffb -DIST wireshark-4.0.9.tar.xz 43130608 BLAKE2B 9a7760711e761f382496123ca4578a0e6b834de85999a908f24e16ac48ebd3f3ea17e8c29d422f13f67b168ac7accb2cd394a78714b3c543077909a40029a660 SHA512 4700f41f38f23801267c035557b27c151b718542e830460ab895c87d976c44606397b98b9d48b72a7cdd3917aa744794cbccac5babbb6de94a7bd59e8d91e1f0 DIST wireshark-4.1.0-signatures.txt 2706 BLAKE2B bcc55c14a68aead0061041e39114a04531440d98b24e271d731ff6baa0047adac7871f0e089b326d29273bad71f8fa9fa482ebac21ba7635e9a251831d387a34 SHA512 ae0eb7a36f554d27fecd47cb471f3c85b8bd53030a6dc872f74b33a46eee004910a3c095c16d8eed56a7c2e6104084e632580b555f29e77a4b8c04c50b53019a DIST wireshark-4.1.0.tar.xz 44601140 BLAKE2B c20a0a917c94554d593986e9058cee7f10c68a0e73a3b8a69e87c40f5932d4f33da1d3ba8ed5177094058bd43ba9942b21a2f3fe6e04a751ffb75e9e9b524627 SHA512 d3253d26d53dbeaa14f7d7dd0956124de3f7fe1d683f2041c6d1420271ba9601248c904a0927160194ca54aa8752526bd5de643d553e55ded8478caa54cd9bb0 +EBUILD wireshark-4.0.10.ebuild 8573 BLAKE2B 85a90743e7523f4bcd10d5f08630d9108d17dd47f5cfce1e569353e0e3b57c579c59b982b4f2b1691d0e6b25b27885dfaed350b83eff6964e76b2a639a1f355f SHA512 c8f253c1af0aabebffaf03fe67a8c682d3af5f2d796e9753eaf91c0135a4061433fbb3debcf184772d7a798fcc776a3576f84939ad5bc441678a38cf34069eb4 EBUILD wireshark-4.0.8.ebuild 7998 BLAKE2B 5cfa933262dd90a34f80eabe4712e1ef56a17c95458eb1739397e872cd35d95374aa54fdba164121a912163b335691623a52d6d5ea164d6074567ec6c655154e SHA512 5996d39b034060fe9cebc3b13f2e9becfbcf640e68d9039e5e48a4da97c8a4d5f6d00973fd64db3e2d514872afa4317813b296b33d53bf630e58ac9a4d5e9a30 -EBUILD wireshark-4.0.9.ebuild 8573 BLAKE2B 85a90743e7523f4bcd10d5f08630d9108d17dd47f5cfce1e569353e0e3b57c579c59b982b4f2b1691d0e6b25b27885dfaed350b83eff6964e76b2a639a1f355f SHA512 c8f253c1af0aabebffaf03fe67a8c682d3af5f2d796e9753eaf91c0135a4061433fbb3debcf184772d7a798fcc776a3576f84939ad5bc441678a38cf34069eb4 EBUILD wireshark-4.1.0.ebuild 8654 BLAKE2B 6754327a2167144d0b62daa259686bd24163f9ee28adcfcbf75c03938595c3b95ed3202700a11c4978e5a02f439deb5b42e0937a3a91aca1e2ace211898a473c SHA512 80c91b955949f2143282614b7514662d58a23add7706d86329fc3a63424d65a2f288cd0e2b53f17c70508b3e94fa793d3780c3c4a4f84d5a1303b004625d50ca EBUILD wireshark-9999.ebuild 8654 BLAKE2B 6754327a2167144d0b62daa259686bd24163f9ee28adcfcbf75c03938595c3b95ed3202700a11c4978e5a02f439deb5b42e0937a3a91aca1e2ace211898a473c SHA512 80c91b955949f2143282614b7514662d58a23add7706d86329fc3a63424d65a2f288cd0e2b53f17c70508b3e94fa793d3780c3c4a4f84d5a1303b004625d50ca MISC metadata.xml 5422 BLAKE2B 92a191ef763a5ce4079f75b06ec7514c1f052b96e3ed2ff1e6d60e426b60d3bdebe373fc23b11625e5de2b8dc495924787e14ab6be6ec9e9f5216686a3c7dd3b SHA512 574ab162b8634bd66d1d93ac3e845328958cab66982aac5ea5aba3bbecd2c510c66a7f7584eb1192c1ca0c157522ade2dbaf0780c4d92601ff416a81a6b1239f diff --git a/net-analyzer/wireshark/wireshark-4.0.10.ebuild b/net-analyzer/wireshark/wireshark-4.0.10.ebuild new file mode 100644 index 000000000000..b93870af7ae4 --- /dev/null +++ b/net-analyzer/wireshark/wireshark-4.0.10.ebuild @@ -0,0 +1,341 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=( lua5-{1..2} ) +PYTHON_COMPAT=( python3_{10..11} ) + +inherit fcaps flag-o-matic readme.gentoo-r1 lua-single python-any-r1 qmake-utils xdg cmake + +DESCRIPTION="Network protocol analyzer (sniffer)" +HOMEPAGE="https://www.wireshark.org/" + +if [[ ${PV} == *9999* ]] ; then + EGIT_REPO_URI="https://gitlab.com/wireshark/wireshark" + inherit git-r3 +else + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/wireshark.asc + inherit verify-sig + + SRC_URI="https://www.wireshark.org/download/src/all-versions/${P/_/}.tar.xz" + SRC_URI+=" verify-sig? ( https://www.wireshark.org/download/SIGNATURES-${PV}.txt -> ${P}-signatures.txt )" + S="${WORKDIR}/${P/_/}" + + if [[ ${PV} != *_rc* ]] ; then + KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~riscv ~x86" + fi +fi + +LICENSE="GPL-2" +SLOT="0/${PV}" +IUSE="androiddump bcg729 brotli +capinfos +captype ciscodump +dftest doc dpauxmon" +IUSE+=" +dumpcap +editcap +gui http2 ilbc kerberos libxml2 lto lua lz4 maxminddb" +IUSE+=" +mergecap +minizip +netlink opus +plugins +pcap qt6 +randpkt" +IUSE+=" +randpktdump +reordercap sbc selinux +sharkd smi snappy spandsp sshdump ssl" +IUSE+=" sdjournal test +text2pcap tfshark +tshark +udpdump wifi zlib +zstd" + +REQUIRED_USE=" + lua? ( ${LUA_REQUIRED_USE} ) +" + +# Tests restricted for now because rely on pytest internals w/ >=3.11 +# See bug #897078 and https://gitlab.com/wireshark/wireshark/-/issues/18740. +RESTRICT="!test? ( test ) test" + +# bug #753062 for speexdsp +RDEPEND=" + acct-group/pcap + >=dev-libs/glib-2.50.0:2 + dev-libs/libpcre2 + >=net-dns/c-ares-1.13.0:= + >=dev-libs/libgcrypt-1.8.0:= + media-libs/speexdsp + bcg729? ( media-libs/bcg729 ) + brotli? ( app-arch/brotli:= ) + ciscodump? ( >=net-libs/libssh-0.6:= ) + filecaps? ( sys-libs/libcap ) + http2? ( >=net-libs/nghttp2-1.11.0:= ) + ilbc? ( media-libs/libilbc:= ) + kerberos? ( virtual/krb5 ) + libxml2? ( dev-libs/libxml2 ) + lua? ( ${LUA_DEPS} ) + lz4? ( app-arch/lz4:= ) + maxminddb? ( dev-libs/libmaxminddb:= ) + minizip? ( sys-libs/zlib[minizip] ) + netlink? ( dev-libs/libnl:3 ) + opus? ( media-libs/opus ) + pcap? ( net-libs/libpcap ) + gui? ( + x11-misc/xdg-utils + qt6? ( + dev-qt/qtbase:6[concurrent,dbus,gui,widgets] + dev-qt/qt5compat:6 + dev-qt/qtmultimedia:6 + ) + !qt6? ( + dev-qt/qtcore:5 + dev-qt/qtconcurrent:5 + dev-qt/qtgui:5 + dev-qt/qtmultimedia:5 + dev-qt/qtprintsupport:5 + dev-qt/qtwidgets:5 + ) + ) + sbc? ( media-libs/sbc ) + sdjournal? ( sys-apps/systemd:= ) + smi? ( net-libs/libsmi ) + snappy? ( app-arch/snappy:= ) + spandsp? ( media-libs/spandsp:= ) + sshdump? ( >=net-libs/libssh-0.6:= ) + ssl? ( >=net-libs/gnutls-3.5.8:= ) + wifi? ( >=net-libs/libssh-0.6:= ) + zlib? ( sys-libs/zlib ) + zstd? ( app-arch/zstd:= ) +" +DEPEND=" + ${RDEPEND} + gui? ( + !qt6? ( + dev-qt/qtdeclarative:5 + ) + ) +" +# TODO: 4.0.0_rc1 release notes say: +# "Perl is no longer required to build Wireshark, but may be required to build some source code files and run code analysis checks." +BDEPEND=" + ${PYTHON_DEPS} + dev-lang/perl + sys-devel/flex + sys-devel/gettext + virtual/pkgconfig + doc? ( + app-doc/doxygen + dev-ruby/asciidoctor + ) + gui? ( + qt6? ( + dev-qt/qttools:6[linguist] + ) + !qt6? ( + dev-qt/linguist-tools:5 + ) + ) + test? ( + $(python_gen_any_dep ' + dev-python/pytest[${PYTHON_USEDEP}] + dev-python/pytest-xdist[${PYTHON_USEDEP}] + ') + ) +" +RDEPEND=" + ${RDEPEND} + gui? ( virtual/freedesktop-icon-theme ) + selinux? ( sec-policy/selinux-wireshark ) +" + +if [[ ${PV} != *9999* ]] ; then + BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-wireshark )" +fi + +PATCHES=( + "${FILESDIR}"/${PN}-2.6.0-redhat.patch + "${FILESDIR}"/${PN}-3.4.2-cmake-lua-version.patch +) + +python_check_deps() { + use test || return 0 + + python_has_version -b "dev-python/pytest[${PYTHON_USEDEP}]" && + python_has_version -b "dev-python/pytest-xdist[${PYTHON_USEDEP}]" +} + +pkg_setup() { + use lua && lua-single_pkg_setup + + python-any-r1_pkg_setup +} + +src_unpack() { + if [[ ${PV} == *9999* ]] ; then + git-r3_src_unpack + else + if use verify-sig ; then + cd "${DISTDIR}" || die + verify-sig_verify_signed_checksums \ + ${P}-signatures.txt \ + openssl-dgst \ + ${P}.tar.xz + cd "${WORKDIR}" || die + fi + + default + fi +} + +src_configure() { + local mycmakeargs + + python_setup + + # Workaround bug #213705. If krb5-config --libs has -lcrypto then pass + # --with-ssl to ./configure. (Mimics code from acinclude.m4). + if use kerberos ; then + case $(krb5-config --libs) in + *-lcrypto*) + ewarn "Kerberos was built with ssl support: linkage with openssl is enabled." + ewarn "Note there are annoying license incompatibilities between the OpenSSL" + ewarn "license and the GPL, so do your check before distributing such package." + mycmakeargs+=( -DENABLE_GNUTLS=$(usex ssl) ) + ;; + esac + fi + + if use gui ; then + append-cxxflags -fPIC -DPIC + fi + + ! use lto && filter-lto + + mycmakeargs+=( + -DPython3_EXECUTABLE="${PYTHON}" + -DCMAKE_DISABLE_FIND_PACKAGE_{Asciidoctor,DOXYGEN}=$(usex !doc) + + $(use androiddump && use pcap && echo -DEXTCAP_ANDROIDDUMP_LIBPCAP=yes) + $(usex gui LRELEASE=$(qt5_get_bindir)/lrelease '') + $(usex gui MOC=$(qt5_get_bindir)/moc '') + $(usex gui RCC=$(qt5_get_bindir)/rcc '') + $(usex gui UIC=$(qt5_get_bindir)/uic '') + + -DBUILD_androiddump=$(usex androiddump) + -DBUILD_capinfos=$(usex capinfos) + -DBUILD_captype=$(usex captype) + -DBUILD_ciscodump=$(usex ciscodump) + -DBUILD_dftest=$(usex dftest) + -DBUILD_dpauxmon=$(usex dpauxmon) + -DBUILD_dumpcap=$(usex dumpcap) + -DBUILD_editcap=$(usex editcap) + -DBUILD_mergecap=$(usex mergecap) + -DBUILD_mmdbresolve=$(usex maxminddb) + -DBUILD_randpkt=$(usex randpkt) + -DBUILD_randpktdump=$(usex randpktdump) + -DBUILD_reordercap=$(usex reordercap) + -DBUILD_sdjournal=$(usex sdjournal) + -DBUILD_sharkd=$(usex sharkd) + -DBUILD_sshdump=$(usex sshdump) + -DBUILD_text2pcap=$(usex text2pcap) + -DBUILD_tfshark=$(usex tfshark) + -DBUILD_tshark=$(usex tshark) + -DBUILD_udpdump=$(usex udpdump) + + -DBUILD_wireshark=$(usex gui) + -DUSE_qt6=$(usex qt6) + + -DENABLE_WERROR=OFF + -DENABLE_BCG729=$(usex bcg729) + -DENABLE_BROTLI=$(usex brotli) + -DENABLE_CAP=$(usex filecaps caps) + -DENABLE_GNUTLS=$(usex ssl) + -DENABLE_ILBC=$(usex ilbc) + -DENABLE_KERBEROS=$(usex kerberos) + -DENABLE_LIBXML2=$(usex libxml2) + -DENABLE_LTO=$(usex lto) + -DENABLE_LUA=$(usex lua) + -DENABLE_LZ4=$(usex lz4) + -DENABLE_MINIZIP=$(usex minizip) + -DENABLE_NETLINK=$(usex netlink) + -DENABLE_NGHTTP2=$(usex http2) + -DENABLE_OPUS=$(usex opus) + -DENABLE_PCAP=$(usex pcap) + -DENABLE_PLUGINS=$(usex plugins) + -DENABLE_PLUGIN_IFDEMO=OFF + -DENABLE_SBC=$(usex sbc) + -DENABLE_SMI=$(usex smi) + -DENABLE_SNAPPY=$(usex snappy) + -DENABLE_SPANDSP=$(usex spandsp) + -DBUILD_wifidump=$(usex wifi) + -DENABLE_ZLIB=$(usex zlib) + -DENABLE_ZSTD=$(usex zstd) + ) + + cmake_src_configure +} + +src_test() { + cmake_build test-programs + + EPYTEST_DESELECT=( + # TODO: investigate + suite_follow_multistream.py::case_follow_multistream::test_follow_http2_multistream + ) + + # https://www.wireshark.org/docs/wsdg_html_chunked/ChTestsRunPytest.html + epytest \ + --disable-capture \ + --skip-missing-programs=all \ + --program-path "${BUILD_DIR}"/run +} + +src_install() { + cmake_src_install + + # FAQ is not required as is installed from help/faq.txt + dodoc AUTHORS ChangeLog NEWS README* doc/randpkt.txt doc/README* + + # install headers + insinto /usr/include/wireshark + doins "${BUILD_DIR}"/config.h + + # If trying to remove this, try build e.g. libvirt first! + # At last check, Fedora is still doing this too. + local dir dirs=( + epan + epan/crypt + epan/dfilter + epan/dissectors + epan/ftypes + wiretap + wsutil + wsutil/wmem + ) + + for dir in "${dirs[@]}" ; do + insinto /usr/include/wireshark/${dir} + doins ${dir}/*.h + done + + if use gui ; then + local s + + for s in 16 32 48 64 128 256 512 1024 ; do + insinto /usr/share/icons/hicolor/${s}x${s}/apps + newins resources/icons/wsicon${s}.png wireshark.png + done + + for s in 16 24 32 48 64 128 256 ; do + insinto /usr/share/icons/hicolor/${s}x${s}/mimetypes + newins resources/icons//WiresharkDoc-${s}.png application-vnd.tcpdump.pcap.png + done + fi + + if [[ -d "${ED}"/usr/share/appdata ]] ; then + rm -r "${ED}"/usr/share/appdata || die + fi + + readme.gentoo_create_doc +} + +pkg_postinst() { + xdg_pkg_postinst + + # Add group for users allowed to sniff. + chgrp pcap "${EROOT}"/usr/bin/dumpcap + + if use dumpcap && use pcap ; then + fcaps -o 0 -g pcap -m 4710 -M 0710 \ + cap_dac_read_search,cap_net_raw,cap_net_admin \ + "${EROOT}"/usr/bin/dumpcap + fi + + readme.gentoo_print_elog +} diff --git a/net-analyzer/wireshark/wireshark-4.0.9.ebuild b/net-analyzer/wireshark/wireshark-4.0.9.ebuild deleted file mode 100644 index b93870af7ae4..000000000000 --- a/net-analyzer/wireshark/wireshark-4.0.9.ebuild +++ /dev/null @@ -1,341 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -LUA_COMPAT=( lua5-{1..2} ) -PYTHON_COMPAT=( python3_{10..11} ) - -inherit fcaps flag-o-matic readme.gentoo-r1 lua-single python-any-r1 qmake-utils xdg cmake - -DESCRIPTION="Network protocol analyzer (sniffer)" -HOMEPAGE="https://www.wireshark.org/" - -if [[ ${PV} == *9999* ]] ; then - EGIT_REPO_URI="https://gitlab.com/wireshark/wireshark" - inherit git-r3 -else - VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/wireshark.asc - inherit verify-sig - - SRC_URI="https://www.wireshark.org/download/src/all-versions/${P/_/}.tar.xz" - SRC_URI+=" verify-sig? ( https://www.wireshark.org/download/SIGNATURES-${PV}.txt -> ${P}-signatures.txt )" - S="${WORKDIR}/${P/_/}" - - if [[ ${PV} != *_rc* ]] ; then - KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~riscv ~x86" - fi -fi - -LICENSE="GPL-2" -SLOT="0/${PV}" -IUSE="androiddump bcg729 brotli +capinfos +captype ciscodump +dftest doc dpauxmon" -IUSE+=" +dumpcap +editcap +gui http2 ilbc kerberos libxml2 lto lua lz4 maxminddb" -IUSE+=" +mergecap +minizip +netlink opus +plugins +pcap qt6 +randpkt" -IUSE+=" +randpktdump +reordercap sbc selinux +sharkd smi snappy spandsp sshdump ssl" -IUSE+=" sdjournal test +text2pcap tfshark +tshark +udpdump wifi zlib +zstd" - -REQUIRED_USE=" - lua? ( ${LUA_REQUIRED_USE} ) -" - -# Tests restricted for now because rely on pytest internals w/ >=3.11 -# See bug #897078 and https://gitlab.com/wireshark/wireshark/-/issues/18740. -RESTRICT="!test? ( test ) test" - -# bug #753062 for speexdsp -RDEPEND=" - acct-group/pcap - >=dev-libs/glib-2.50.0:2 - dev-libs/libpcre2 - >=net-dns/c-ares-1.13.0:= - >=dev-libs/libgcrypt-1.8.0:= - media-libs/speexdsp - bcg729? ( media-libs/bcg729 ) - brotli? ( app-arch/brotli:= ) - ciscodump? ( >=net-libs/libssh-0.6:= ) - filecaps? ( sys-libs/libcap ) - http2? ( >=net-libs/nghttp2-1.11.0:= ) - ilbc? ( media-libs/libilbc:= ) - kerberos? ( virtual/krb5 ) - libxml2? ( dev-libs/libxml2 ) - lua? ( ${LUA_DEPS} ) - lz4? ( app-arch/lz4:= ) - maxminddb? ( dev-libs/libmaxminddb:= ) - minizip? ( sys-libs/zlib[minizip] ) - netlink? ( dev-libs/libnl:3 ) - opus? ( media-libs/opus ) - pcap? ( net-libs/libpcap ) - gui? ( - x11-misc/xdg-utils - qt6? ( - dev-qt/qtbase:6[concurrent,dbus,gui,widgets] - dev-qt/qt5compat:6 - dev-qt/qtmultimedia:6 - ) - !qt6? ( - dev-qt/qtcore:5 - dev-qt/qtconcurrent:5 - dev-qt/qtgui:5 - dev-qt/qtmultimedia:5 - dev-qt/qtprintsupport:5 - dev-qt/qtwidgets:5 - ) - ) - sbc? ( media-libs/sbc ) - sdjournal? ( sys-apps/systemd:= ) - smi? ( net-libs/libsmi ) - snappy? ( app-arch/snappy:= ) - spandsp? ( media-libs/spandsp:= ) - sshdump? ( >=net-libs/libssh-0.6:= ) - ssl? ( >=net-libs/gnutls-3.5.8:= ) - wifi? ( >=net-libs/libssh-0.6:= ) - zlib? ( sys-libs/zlib ) - zstd? ( app-arch/zstd:= ) -" -DEPEND=" - ${RDEPEND} - gui? ( - !qt6? ( - dev-qt/qtdeclarative:5 - ) - ) -" -# TODO: 4.0.0_rc1 release notes say: -# "Perl is no longer required to build Wireshark, but may be required to build some source code files and run code analysis checks." -BDEPEND=" - ${PYTHON_DEPS} - dev-lang/perl - sys-devel/flex - sys-devel/gettext - virtual/pkgconfig - doc? ( - app-doc/doxygen - dev-ruby/asciidoctor - ) - gui? ( - qt6? ( - dev-qt/qttools:6[linguist] - ) - !qt6? ( - dev-qt/linguist-tools:5 - ) - ) - test? ( - $(python_gen_any_dep ' - dev-python/pytest[${PYTHON_USEDEP}] - dev-python/pytest-xdist[${PYTHON_USEDEP}] - ') - ) -" -RDEPEND=" - ${RDEPEND} - gui? ( virtual/freedesktop-icon-theme ) - selinux? ( sec-policy/selinux-wireshark ) -" - -if [[ ${PV} != *9999* ]] ; then - BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-wireshark )" -fi - -PATCHES=( - "${FILESDIR}"/${PN}-2.6.0-redhat.patch - "${FILESDIR}"/${PN}-3.4.2-cmake-lua-version.patch -) - -python_check_deps() { - use test || return 0 - - python_has_version -b "dev-python/pytest[${PYTHON_USEDEP}]" && - python_has_version -b "dev-python/pytest-xdist[${PYTHON_USEDEP}]" -} - -pkg_setup() { - use lua && lua-single_pkg_setup - - python-any-r1_pkg_setup -} - -src_unpack() { - if [[ ${PV} == *9999* ]] ; then - git-r3_src_unpack - else - if use verify-sig ; then - cd "${DISTDIR}" || die - verify-sig_verify_signed_checksums \ - ${P}-signatures.txt \ - openssl-dgst \ - ${P}.tar.xz - cd "${WORKDIR}" || die - fi - - default - fi -} - -src_configure() { - local mycmakeargs - - python_setup - - # Workaround bug #213705. If krb5-config --libs has -lcrypto then pass - # --with-ssl to ./configure. (Mimics code from acinclude.m4). - if use kerberos ; then - case $(krb5-config --libs) in - *-lcrypto*) - ewarn "Kerberos was built with ssl support: linkage with openssl is enabled." - ewarn "Note there are annoying license incompatibilities between the OpenSSL" - ewarn "license and the GPL, so do your check before distributing such package." - mycmakeargs+=( -DENABLE_GNUTLS=$(usex ssl) ) - ;; - esac - fi - - if use gui ; then - append-cxxflags -fPIC -DPIC - fi - - ! use lto && filter-lto - - mycmakeargs+=( - -DPython3_EXECUTABLE="${PYTHON}" - -DCMAKE_DISABLE_FIND_PACKAGE_{Asciidoctor,DOXYGEN}=$(usex !doc) - - $(use androiddump && use pcap && echo -DEXTCAP_ANDROIDDUMP_LIBPCAP=yes) - $(usex gui LRELEASE=$(qt5_get_bindir)/lrelease '') - $(usex gui MOC=$(qt5_get_bindir)/moc '') - $(usex gui RCC=$(qt5_get_bindir)/rcc '') - $(usex gui UIC=$(qt5_get_bindir)/uic '') - - -DBUILD_androiddump=$(usex androiddump) - -DBUILD_capinfos=$(usex capinfos) - -DBUILD_captype=$(usex captype) - -DBUILD_ciscodump=$(usex ciscodump) - -DBUILD_dftest=$(usex dftest) - -DBUILD_dpauxmon=$(usex dpauxmon) - -DBUILD_dumpcap=$(usex dumpcap) - -DBUILD_editcap=$(usex editcap) - -DBUILD_mergecap=$(usex mergecap) - -DBUILD_mmdbresolve=$(usex maxminddb) - -DBUILD_randpkt=$(usex randpkt) - -DBUILD_randpktdump=$(usex randpktdump) - -DBUILD_reordercap=$(usex reordercap) - -DBUILD_sdjournal=$(usex sdjournal) - -DBUILD_sharkd=$(usex sharkd) - -DBUILD_sshdump=$(usex sshdump) - -DBUILD_text2pcap=$(usex text2pcap) - -DBUILD_tfshark=$(usex tfshark) - -DBUILD_tshark=$(usex tshark) - -DBUILD_udpdump=$(usex udpdump) - - -DBUILD_wireshark=$(usex gui) - -DUSE_qt6=$(usex qt6) - - -DENABLE_WERROR=OFF - -DENABLE_BCG729=$(usex bcg729) - -DENABLE_BROTLI=$(usex brotli) - -DENABLE_CAP=$(usex filecaps caps) - -DENABLE_GNUTLS=$(usex ssl) - -DENABLE_ILBC=$(usex ilbc) - -DENABLE_KERBEROS=$(usex kerberos) - -DENABLE_LIBXML2=$(usex libxml2) - -DENABLE_LTO=$(usex lto) - -DENABLE_LUA=$(usex lua) - -DENABLE_LZ4=$(usex lz4) - -DENABLE_MINIZIP=$(usex minizip) - -DENABLE_NETLINK=$(usex netlink) - -DENABLE_NGHTTP2=$(usex http2) - -DENABLE_OPUS=$(usex opus) - -DENABLE_PCAP=$(usex pcap) - -DENABLE_PLUGINS=$(usex plugins) - -DENABLE_PLUGIN_IFDEMO=OFF - -DENABLE_SBC=$(usex sbc) - -DENABLE_SMI=$(usex smi) - -DENABLE_SNAPPY=$(usex snappy) - -DENABLE_SPANDSP=$(usex spandsp) - -DBUILD_wifidump=$(usex wifi) - -DENABLE_ZLIB=$(usex zlib) - -DENABLE_ZSTD=$(usex zstd) - ) - - cmake_src_configure -} - -src_test() { - cmake_build test-programs - - EPYTEST_DESELECT=( - # TODO: investigate - suite_follow_multistream.py::case_follow_multistream::test_follow_http2_multistream - ) - - # https://www.wireshark.org/docs/wsdg_html_chunked/ChTestsRunPytest.html - epytest \ - --disable-capture \ - --skip-missing-programs=all \ - --program-path "${BUILD_DIR}"/run -} - -src_install() { - cmake_src_install - - # FAQ is not required as is installed from help/faq.txt - dodoc AUTHORS ChangeLog NEWS README* doc/randpkt.txt doc/README* - - # install headers - insinto /usr/include/wireshark - doins "${BUILD_DIR}"/config.h - - # If trying to remove this, try build e.g. libvirt first! - # At last check, Fedora is still doing this too. - local dir dirs=( - epan - epan/crypt - epan/dfilter - epan/dissectors - epan/ftypes - wiretap - wsutil - wsutil/wmem - ) - - for dir in "${dirs[@]}" ; do - insinto /usr/include/wireshark/${dir} - doins ${dir}/*.h - done - - if use gui ; then - local s - - for s in 16 32 48 64 128 256 512 1024 ; do - insinto /usr/share/icons/hicolor/${s}x${s}/apps - newins resources/icons/wsicon${s}.png wireshark.png - done - - for s in 16 24 32 48 64 128 256 ; do - insinto /usr/share/icons/hicolor/${s}x${s}/mimetypes - newins resources/icons//WiresharkDoc-${s}.png application-vnd.tcpdump.pcap.png - done - fi - - if [[ -d "${ED}"/usr/share/appdata ]] ; then - rm -r "${ED}"/usr/share/appdata || die - fi - - readme.gentoo_create_doc -} - -pkg_postinst() { - xdg_pkg_postinst - - # Add group for users allowed to sniff. - chgrp pcap "${EROOT}"/usr/bin/dumpcap - - if use dumpcap && use pcap ; then - fcaps -o 0 -g pcap -m 4710 -M 0710 \ - cap_dac_read_search,cap_net_raw,cap_net_admin \ - "${EROOT}"/usr/bin/dumpcap - fi - - readme.gentoo_print_elog -} -- cgit v1.2.3