Bug 184736 - net-mgmt/nagios-plugins has hidden dependency on ssh
Summary: net-mgmt/nagios-plugins has hidden dependency on ssh
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Dmitry Sivachenko
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-13 00:40 UTC by Garrett Wollman
Modified: 2013-12-16 12:10 UTC (History)
0 users

See Also:


Attachments
file.diff (671 bytes, patch)
2013-12-13 00:40 UTC, Garrett Wollman
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Garrett Wollman 2013-12-13 00:40:00 UTC
The check_by_ssh plugin is unconditionally included in the packing
list even when there is no ssh executable, but the configure script
disables the installation of check_by_ssh if it can't find an ssh
executable.  This causes packaging to fail on systems where there is
no /usr/bin/ssh.

Fix: As a workaround, I just added an unconditional dependency on
security/openssh-portable (warning, cut and paste):
How-To-Repeat: 
1) build a poudriere jail with no /usr/bin/ssh
2) poudriere testport -o net-mgmt/nagios-plugins
3) watch it fail
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-12-13 00:40:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->demon

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2013-12-16 12:06:35 UTC
Author: demon
Date: Mon Dec 16 12:06:28 2013
New Revision: 336629
URL: http://svnweb.freebsd.org/changeset/ports/336629

Log:
  Fix PLIST for users with world built WITHOUT_OPENSSH.
  
  PR:		184736
  Submitted by:	wallman
  (he proposed different solution)

Modified:
  head/net-mgmt/nagios-plugins/Makefile
  head/net-mgmt/nagios-plugins/pkg-plist

Modified: head/net-mgmt/nagios-plugins/Makefile
==============================================================================
--- head/net-mgmt/nagios-plugins/Makefile	Mon Dec 16 12:03:47 2013	(r336628)
+++ head/net-mgmt/nagios-plugins/Makefile	Mon Dec 16 12:06:28 2013	(r336629)
@@ -149,6 +149,10 @@ CONFIGURE_ARGS+=	--without-dbi
 PLIST_SUB+=	SUB_DBI="@comment "
 .endif
 
+.if ${PORT_OPTIONS:MEXTRAOPTS}
+CONFIGURE_ARGS+=	--enable-extra-opts
+.endif
+
 .if ${OSVERSION} > 1000055
 EXTRA_PATCHES+=	${FILESDIR}/extra-patch-dig-to-drill.diff
 CONFIGURE_ARGS+=--with-dig-command=/usr/bin/drill
@@ -157,8 +161,10 @@ PLIST_SUB+=	SUB_DNS="@comment "
 PLIST_SUB+=	SUB_DNS=""
 .endif
 
-.if ${PORT_OPTIONS:MEXTRAOPTS}
-CONFIGURE_ARGS+=	--enable-extra-opts
+.if !exists(/usr/bin/ssh)
+PLIST_SUB+=	SUB_SSH="@comment "
+.else
+PLIST_SUB+=	SUB_SSH=""
 .endif
 
 post-patch:

Modified: head/net-mgmt/nagios-plugins/pkg-plist
==============================================================================
--- head/net-mgmt/nagios-plugins/pkg-plist	Mon Dec 16 12:03:47 2013	(r336628)
+++ head/net-mgmt/nagios-plugins/pkg-plist	Mon Dec 16 12:06:28 2013	(r336629)
@@ -1,6 +1,6 @@
 libexec/nagios/check_apt
 libexec/nagios/check_breeze
-libexec/nagios/check_by_ssh
+%%SUB_SSH%%libexec/nagios/check_by_ssh
 libexec/nagios/check_clamd
 libexec/nagios/check_cluster
 %%SUB_DBI%%libexec/nagios/check_dbi
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Dmitry Sivachenko freebsd_committer freebsd_triage 2013-12-16 12:06:49 UTC
State Changed
From-To: open->closed

I just removed check_by_ssh from pkg-plist for those who built world  
WITHOUT_SSH.  I see no reason to build the world without ssh and then 
add dependency to ssh from ports just for this plugin.