Bug 184375 - New port: net-mgmt/nagios-check_relayd_status Nagios plug-in to check on the status of relayd
Summary: New port: net-mgmt/nagios-check_relayd_status Nagios plug-in to check on the ...
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: freebsd-ports-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-29 18:20 UTC by rand
Modified: 2014-08-08 22:43 UTC (History)
3 users (show)

See Also:


Attachments
file.shar -- Obsolete (6.38 KB, text/plain)
2013-11-29 18:20 UTC, rand
no flags Details
Results of poudriere testport (18.99 KB, text/plain)
2014-08-07 16:13 UTC, rand
no flags Details
Results of poudriere testport -- Obsolete (13.56 KB, text/plain)
2014-08-07 16:59 UTC, rand
no flags Details
Updated shar -- Obsolete (6.60 KB, text/plain)
2014-08-07 17:05 UTC, rand
no flags Details
Re-Up-Dated SHAR file. (6.73 KB, text/plain)
2014-08-07 18:37 UTC, rand
no flags Details
New poudriere testport results (13.67 KB, text/plain)
2014-08-07 18:38 UTC, rand
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description rand 2013-11-29 18:20:00 UTC
	A new port based upon Daniel Werdermann's check_relayd_status
	Nagios plugin.

How-To-Repeat: 	Deploy relayd and want to monitor it.
Comment 1 John Marino freebsd_committer 2014-08-07 14:15:51 UTC
Hi, if you are still interested in having this port in FreeBSD, it may need to be reworked to support stage, and it could need updating to other newer conventions such as "USES" which is expanding all time.
See http://lists.freebsd.org/pipermail/freebsd-ports-announce/2014-May/000080.html


Additionally, you need to provide some sort of quality assurance.    
In order of preference, we are looking for:

1) "poudriere testport" or "poudriere bulk -t" logs
2) Redports or tinderbox logs

Please provide an updated shar file and attach a test log.  Alternatively, please indicate if you are no longer interested in having this software in the Ports Collection and that we can close the PR.

Thanks!
Comment 2 rand 2014-08-07 16:13:52 UTC
Created attachment 145451 [details]
Results of poudriere testport

Attached is the results of poudriere's testport. The first run did find 2 check-plist errors, that I'm not sure are valid, but I added to pkg-plist anyway:

Error: Orphaned: @dirrmtry etc/periodic/daily
Error: Orphaned: @dirrmtry etc/periodic

I'll update the shar file attachement in a minute.
Comment 3 rand 2014-08-07 16:15:40 UTC
Sigh, sorry. I just attached the poudriere testport to the wrong PR.
Comment 4 John Marino freebsd_committer 2014-08-07 16:44:46 UTC
Comment on attachment 145451 [details]
Results of poudriere testport

This test log doesn't go with this PR (attached by mistake)
Comment 5 rand 2014-08-07 16:59:23 UTC
Created attachment 145457 [details]
Results of poudriere testport  -- Obsolete
Comment 6 John Marino freebsd_committer 2014-08-07 17:03:23 UTC
(In reply to rand from comment #2)
> Created attachment 145451 [details]
> Results of poudriere testport
> 
> Attached is the results of poudriere's testport. The first run did find 2
> check-plist errors, that I'm not sure are valid, but I added to pkg-plist
> anyway:
> 
> Error: Orphaned: @dirrmtry etc/periodic/daily
> Error: Orphaned: @dirrmtry etc/periodic
> 
> I'll update the shar file attachement in a minute.


So to be clear, this comment doesn't apply to the PR, right?  Your testlog was clean but no new shar came.
Comment 7 rand 2014-08-07 17:05:14 UTC
Created attachment 145458 [details]
Updated shar -- Obsolete

Poudriere's testport found two problems, which the attached SHAR fixes:

Missing @dirrmtry libexec/nagios from the plist, which resulted in moving the plist from Makefile to pkg-plist.

And the lint check with shebang and Perl. I simply tweaked the script (which is distributed in the files along with the port) to use #!/usr/local/bin/perl.

I didn't use shebang in Makefile because I seemed to run into a problem with not having a DISTFILE, which doesn't create a directory on the extract. And shebang seems to leverage the patch target, which then fails because there isn't a nagios-check_relayd_status-1.1 directory in ${WRKSRC}.

Hope using #!/usr/local/bin/perl is acceptable.
Comment 8 rand 2014-08-07 17:07:00 UTC
(In reply to John Marino from comment #6)
> (In reply to rand from comment #2)
> > Created attachment 145451 [details]
> > Results of poudriere testport
> > 
> > Attached is the results of poudriere's testport. The first run did find 2
> > check-plist errors, that I'm not sure are valid, but I added to pkg-plist
> > anyway:
> > 
> > Error: Orphaned: @dirrmtry etc/periodic/daily
> > Error: Orphaned: @dirrmtry etc/periodic
> > 
> > I'll update the shar file attachement in a minute.
> 
> 
> So to be clear, this comment doesn't apply to the PR, right?  Your testlog
> was clean but no new shar ca(In reply to John Marino from comment #6)
> (In reply to rand from comment #2)
> > Created attachment 145451 [details]
> > Results of poudriere testport
> > 
> > Attached is the results of poudriere's testport. The first run did find 2
> > check-plist errors, that I'm not sure are valid, but I added to pkg-plist
> > anyway:
> > 
> > Error: Orphaned: @dirrmtry etc/periodic/daily
> > Error: Orphaned: @dirrmtry etc/periodic
> > 
> > I'll update the shar file attachement in a minute.
> 
> 
> So to be clear, this comment doesn't apply to the PR, right?  Your testlog
> was clean but no new shar came.

This comment was from me uploading the wrong testport result for this PR. I just uploaded a new testport result and a new SHAR too.
Comment 9 John Marino freebsd_committer 2014-08-07 17:13:25 UTC
no, don't it that way.

1) Rename files/check_relayd_status to files/check_relayd_status.in
2) change "#!/usr/local" to "#!@PREFIX@"
3) add a post-patch step something like

post-patch:
  ${SED} -e 's|@PREFIX@|${PREFIX}|' ${FILESDIR}/check_relayd_status.in \
  ${WRKSRC}/check_relayd_status

4) then change the INSTALL_SCRIPT command to install the script from there.


Alternatively, you can leave ${FILESDIR}/check_relayd_status alone, but copy it to WRKSRC in post-patch, and then use shebangfix on it.  e.g. SHEBANGFILES= check_relayd_status


So you have two ways to fix it.  the second might be preferable but either is fine.  Did I explain it clearly?
Comment 10 rand 2014-08-07 18:37:20 UTC
Created attachment 145474 [details]
Re-Up-Dated SHAR file.

Added shebang fix. Since the script is distributed via the files directory in the port, I added a do-extract: target to make ${WRKSRC} and copy the script there. That lets shebang fix work.

Hope this is the right approach.

Updated poudriere testport coming in a minute.
Comment 11 rand 2014-08-07 18:38:02 UTC
Created attachment 145476 [details]
New poudriere testport results
Comment 12 John Marino freebsd_committer 2014-08-07 18:47:05 UTC
That'll work, I'll set this to "patch-ready".

Can you do me a favor and set the old attachments to "obsolete" (details, edit details, select obsolete) so the next guy doesn't get confused?
Comment 13 rand 2014-08-07 19:13:14 UTC
(In reply to John Marino from comment #12)
> Can you do me a favor and set the old attachments to "obsolete" (details,
> edit details, select obsolete) so the next guy doesn't get confused?

You got it.  Done.

Thanks for the help.
Comment 14 commit-hook freebsd_committer 2014-08-08 22:41:26 UTC
A commit references this bug:

Author: marino
Date: Fri Aug  8 22:41:05 UTC 2014
New revision: 364391
URL: http://svnweb.freebsd.org/changeset/ports/364391

Log:
  Add new port net-mgmt/nagio-check_relayd_status

  PR:		184375
  Submitted by:	rand (iteris.com)

       ================================================================

  A plugin for Nagios to query relayd status. It returns a warning if not
  all hosts in a table are up and a critical if a table and/or redirect
  is totally down.

Changes:
  head/net-mgmt/Makefile
  head/net-mgmt/nagios-check_relayd_status/
  head/net-mgmt/nagios-check_relayd_status/Makefile
  head/net-mgmt/nagios-check_relayd_status/files/
  head/net-mgmt/nagios-check_relayd_status/files/check_relayd_status
  head/net-mgmt/nagios-check_relayd_status/pkg-descr
  head/net-mgmt/nagios-check_relayd_status/pkg-plist
Comment 15 John Marino freebsd_committer 2014-08-08 22:43:33 UTC
I guess I was the next guy.... done!