Сравнение monitoring-plugins-2.4.0-r1 с monitoring-plugins-3.0.3

/usr/portage/net-analyzer/monitoring-plugins/monitoring-plugins-3.0.3.ebuild 2026-11-22 20:08:04.128380551 +0300
1
# Copyright 1999-2025 Gentoo Authors
1
# Copyright 1999-2026 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4 4
EAPI=8
5 5

  
6
inherit flag-o-matic
6
inherit fcaps flag-o-matic
7 7

  
8 8
DESCRIPTION="50+ standard plugins for Icinga, Naemon, Nagios, Shinken, Sensu"
9
HOMEPAGE="https://www.monitoring-plugins.org/"
9
HOMEPAGE="https://www.monitoring-plugins.org/
10
	https://github.com/monitoring-plugins/monitoring-plugins/"
10 11
SRC_URI="https://www.monitoring-plugins.org/download/${P}.tar.gz"
11 12

  
12 13
LICENSE="GPL-3"
13 14
SLOT="0"
14
KEYWORDS="amd64 ~arm ~arm64 ~sparc x86"
15
IUSE="curl gnutls ipv6 ldap mysql dns fping game postgres radius samba snmp ssh +ssl"
15
KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~sparc ~x86"
16
IUSE="curl ipv6 ldap mysql dns fping game postgres radius rpc samba snmp ssh suid"
16 17

  
17 18
# Most of the plugins use automagic dependencies, i.e. the plugin will
18 19
# get built if the binary it uses is installed. For example, check_snmp
......
23 24
# REAL_DEPEND contains the dependencies that are actually needed to
24 25
# build. DEPEND contains those plus the automagic dependencies.
25 26
#
27
# Note: openssl is required unconditionally because the build fails
28
# without it:
29
#
30
#   * https://github.com/monitoring-plugins/monitoring-plugins/issues/2135
31
#
26 32
REAL_DEPEND="dev-lang/perl
27 33
	curl? (
28 34
		dev-libs/uriparser
......
31 37
	ldap? ( net-nds/openldap:= )
32 38
	mysql? ( || ( dev-db/mysql-connector-c dev-db/mariadb-connector-c ) )
33 39
	postgres? ( dev-db/postgresql:= )
34
	ssl? (
35
		!gnutls? (
36
			dev-libs/openssl:0=
37
		)
38
		gnutls? ( net-libs/gnutls )
39
	)
40
	dev-libs/openssl:0=
40 41
	radius? ( net-dialup/freeradius-client )"
41 42

  
42 43
DEPEND="${REAL_DEPEND}
43 44
	dns? ( net-dns/bind )
44 45
	game? ( games-util/qstat )
45 46
	fping? ( net-analyzer/fping )
47
	rpc? ( net-nds/rpcbind )
46 48
	samba? ( net-fs/samba )
47 49
	ssh? ( virtual/openssh )
48 50
	snmp? ( dev-perl/Net-SNMP
......
50 52

  
51 53
# Basically everything collides with nagios-plugins.
52 54
RDEPEND="${DEPEND}
53
	acct-group/nagios
54
	acct-user/nagios
55 55
	!net-analyzer/nagios-plugins"
56 56

  
57 57
# At least one test is interactive.
......
67 67
	alignof
68 68
)
69 69

  
70
DOCS=( ACKNOWLEDGEMENTS AUTHORS CODING ChangeLog FAQ \
71
		NEWS README REQUIREMENTS SUPPORT THANKS )
72

  
73
PATCHES=( "${FILESDIR}"/${P}-openssl-4.patch )
74

  
75
src_prepare() {
76
	if ! use snmp; then
77
		# automagic detection becomes a much bigger problem when the
78
		# feature breaks the build
79
		sed -i configure -e '/EXTRAS="\$EXTRAS check_snmp"/d' \
80
			|| die "failed to disable check_snmp"
81
	fi
82
	default
83
}
84

  
70 85
src_configure() {
86
	# https://github.com/monitoring-plugins/monitoring-plugins/issues/2295
71 87
	append-flags -fno-strict-aliasing
72 88

  
73 89
	# Use an array to prevent econf from mangling the ping args.
74 90
	local myconf=()
75 91

  
76
	if use ssl; then
77
		myconf+=( $(use_with !gnutls openssl /usr)
78
				  $(use_with gnutls gnutls /usr) )
79
	else
80
		myconf+=( --without-openssl )
81
		myconf+=( --without-gnutls )
82
	fi
83

  
84 92
	# The autodetection for these two commands can hang if localhost is
85 93
	# down or ICMP traffic is filtered (bug #468296). But also the path
86 94
	# likes to move around on us (bug #883729).
......
98 106
		$(use_with ldap) \
99 107
		$(use_with postgres pgsql /usr) \
100 108
		$(use_with radius) \
109
		--with-openssl=/usr \
110
		--without-gnutls \
101 111
		"${myconf[@]}" \
102 112
		--libexecdir="/usr/$(get_libdir)/nagios/plugins" \
103 113
		--sysconfdir="/etc/nagios"
104 114
}
105 115

  
106
DOCS=( ACKNOWLEDGEMENTS AUTHORS CODING ChangeLog FAQ \
107
		NEWS README REQUIREMENTS SUPPORT THANKS )
116
src_install() {
117
	default
118

  
119
	# Prefer capabilities to suid. Beware that fcaps and fperms require
120
	# two different kinds of paths; fperms always prepends ${ED}, but
121
	# fcaps only does so it if the path does not already start with a
122
	# slash. Anyway, begin by removing suid unconditionally.
123
	local pd="usr/$(get_libdir)/nagios/plugins"
124

  
125
	if use filecaps; then
126
		local flags msg
127
		if use suid; then
128
			# use suid if setcap fails
129
			flags="-m u+s"
130
			msg=" (with suid fallback)"
131
		fi
132
		einfo "replacing suid bits with filecaps${msg}"
133
		fperms ug-s /"${pd}"/check_{dhcp,icmp}
134
		fcaps ${flags} cap_net_bind_service "${pd}"/check_dhcp
135
		fcaps ${flags} cap_net_bind_service,cap_net_raw "${pd}"/check_icmp
136
	else
137
		# no filecaps, just suid (or not)
138
		if ! use suid; then
139
			einfo "stripping suid bits"
140
			fperms ug-s /"${pd}"/check_{dhcp,icmp}
141
		fi
142
	fi
143
}
108 144

  
109 145
pkg_postinst() {
110 146
	elog "This ebuild has a number of USE flags that determine what you"
Спасибо!