Bug 258965 - net-mgmt/nagios-check_smartmon: fix temperature recognition for some devices
Summary: net-mgmt/nagios-check_smartmon: fix temperature recognition for some devices
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2021-10-06 19:10 UTC by Denis Shaposhnikov
Modified: 2021-10-12 11:55 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (ports)


Attachments
patch-check_smartmon2 (3.53 KB, patch)
2021-10-06 19:10 UTC, Denis Shaposhnikov
no flags Details | Diff
nagios-check_smartmon.diff (7.49 KB, patch)
2021-10-08 16:21 UTC, Denis Shaposhnikov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Denis Shaposhnikov 2021-10-06 19:10:43 UTC
Created attachment 228485 [details]
patch-check_smartmon2

This patch is from dvl (Dan Langille) from https://reviews.freebsd.org/D30712

For some devices check_smartmon always returns 0 temperature, because it thinks it's SCSI instead of ATA and ignores command line option "-t ata".
Comment 1 Krzysztof 2021-10-07 11:50:23 UTC
Comment on attachment 228485 [details]
patch-check_smartmon2

it is OK for me. Thank you Dan for your work
Comment 2 Fernando Apesteguía freebsd_committer freebsd_triage 2021-10-08 07:26:20 UTC
^Triage: PATCH tags are deprecated.--------------------------

Hi Denis, unfortunately, patch does not apply:

patch -p0 -E < ~/Downloads/patch-check_smartmon2 
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- check_smartmon
|+++ check_smartmon
--------------------------
Patching file check_smartmon using Plan A...
Hunk #1 succeeded at 59.
Hunk #2 failed at 231.
Hunk #3 succeeded at 291 with fuzz 2 (offset -14 lines).
Hunk #4 succeeded at 306 (offset -14 lines).
1 out of 4 hunks failed--saving rejects to check_smartmon.rej
done

Would you mind checking it? Also it would be great if you could send a patch for the port itself as explained in https://docs.freebsd.org/en/books/porters-handbook/book/#slow-patch

Thanks!
Comment 3 Denis Shaposhnikov 2021-10-08 16:21:50 UTC
Created attachment 228519 [details]
nagios-check_smartmon.diff

Hi!

I attached patch-check_smartmon2 for better understanding about this change. Here I'm attaching a patch for the port itself, as requested. I hope, I generated it correct.
Comment 4 Fernando Apesteguía freebsd_committer freebsd_triage 2021-10-11 16:56:17 UTC
(In reply to Denis Shaposhnikov from comment #3)
Excellent Denis,

I'll run some tests and commit shortly.

Thanks!
Comment 5 commit-hook freebsd_committer freebsd_triage 2021-10-12 11:55:35 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0eb4d839a6d8ab9a9ce44e59f1dc6c4bc24f62bf

commit 0eb4d839a6d8ab9a9ce44e59f1dc6c4bc24f62bf
Author:     Denis Shaposhnikov <dsh@bamus.cz>
AuthorDate: 2021-10-11 16:26:02 +0000
Commit:     Fernando Apesteguía <fernape@FreeBSD.org>
CommitDate: 2021-10-12 11:49:08 +0000

    net-mgmt/nagios-check_smartmon: fix temperature recognition for some devices

    Based on a patch[1] by Dan Langille

    [1] https://reviews.freebsd.org/D30712

    PR:     258965
    Reported by:    dsh@bamus.cz
    Approved by:    ports@bsdserwis.com

 net-mgmt/nagios-check_smartmon/Makefile            |  8 +--
 .../files/patch-check_smartmon                     | 75 ++++++++++++++++++----
 2 files changed, 65 insertions(+), 18 deletions(-)
Comment 6 Fernando Apesteguía freebsd_committer freebsd_triage 2021-10-12 11:55:58 UTC
Committed,

Thanks!