-
Notifications
You must be signed in to change notification settings - Fork 284
Require snmpgetnext to build check_snmp #2062
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Require snmpgetnext to build check_snmp #2062
Conversation
Not strictly required here, but the AS_IF macro is generally safer because it handles (often unintentional) AC_REQUIRE calls.
PATH_TO_SNMPGETNEXT is used unconditionally in plugins/check_snmp.c, and the build will fail if it is left undefined (that is, if we are building check_snmp but snmpgetnext was neither found on the user's PATH or supplied manually). To avoid this build failure, we now test for snmpgetnext inside the case for snmpget, and skip check_snmp unless BOTH are found.
|
Hi @orlitzky, Thank you for the PR. Any opinions? |
|
Ha, this one is so niche that I can't even explain it. Either PR is fine with me. I considered disabling the option myself but arrived at the current solution due to another (you're not gonna believe this) niche consideration. On Gentoo, the automatic enabling of features based on the presence of certain dependencies can be a headache, because they sometimes get enabled incidentally. Our users build things from source and can usually enable/disable features explicitly, but the automatic detection can lead to plugins being enabled even when the user hasn't asked for it. For example, if the user happens to have net-snmp installed as a dependency of another program, and if he then builds monitoring-plugins, he will wind up with In that regard, |
|
ok, wow, that's a headache. |
I actually don't mind it but there are always a hundred bigger fires to put out. Thank you! |
Currently,
configure.acperforms checks for two programs,The second one is used by
check_snmponly when a particular flag is passed, but in reality,snmpgetnextis still required because unless itsPATH_TO_SNMPGETNEXTis defined, compilation ofcheck_snmp.cwill fail.I have no idea how you might wind up with
snmpgetand notsnmpgetnext, but at least one person has managed to do it and file a Gentoo bug about it. To fix the issue, this PR will disable the building ofcheck_snmpifsnmpgetnextis missing. It also emits a warning in that case. For most people this should do absolutely nothing.See also: