Bug 274308 - net-mgmt/check_mysql_health: update to 3.0.0.5
Summary: net-mgmt/check_mysql_health: update to 3.0.0.5
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Robert Clausecker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-06 13:24 UTC by Kirill
Modified: 2023-10-19 07:13 UTC (History)
1 user (show)

See Also:


Attachments
patch (1.52 KB, patch)
2023-10-06 13:24 UTC, Kirill
no flags Details | Diff
patch2 (613 bytes, patch)
2023-10-10 14:58 UTC, Kirill
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kirill 2023-10-06 13:24:39 UTC
Created attachment 245465 [details]
patch

Hi.

New version of net-mgmt/check_mysql_health. Please commit somebody.
Comment 1 Robert Clausecker freebsd_committer freebsd_triage 2023-10-07 03:30:00 UTC
Thank you for your submission.  Would you like to become maintainer of this port?
Comment 2 Robert Clausecker freebsd_committer freebsd_triage 2023-10-07 03:31:06 UTC
Also, is there a changelog for this update?
Comment 3 Kirill 2023-10-07 11:44:04 UTC
Ok. Let's try.

* 3.0.0.5
  update GLPlugin, fix valdiff&lookback
* 3.0.0.4
  was a bad idea. now if there is no cache activity, there are no perfdata
* 3.0.0.3
  use the last good value for hitrates of there is absolutely no database activity
* 3.0.0.2
  default --lookback 3600 only if not given on the commandline
  fix version string
* 3.0.0.1
  default --lookback 3600
* 3.0
  new structure, using Monitoring::GLPlugin
Comment 4 Robert Clausecker freebsd_committer freebsd_triage 2023-10-07 15:39:28 UTC
Thank you for supplying the changelog.  A link to an online changelog is fine, too.  I'll include it into the commit.

Would you like to become maintainer of this port?  It is currently unmaintained.
Comment 5 Robert Clausecker freebsd_committer freebsd_triage 2023-10-07 16:43:23 UTC
Interestingly, the port fails to build on amd64 but not other architectures:

===>  Building for check_mysql_health-3.0.0.5
Making all in plugins-scripts
/bin/echo "#! #PERL# -w" | /usr/bin/awk -f ./subst > check_mysql_health
/bin/echo "# nagios: -epn" >> check_mysql_health
/bin/echo >> check_mysql_health
if [ "yes" == "yes" ]; then  /bin/echo i am standalone;  for m in ../GLPlugin/lib/Monitoring/GLPlugin/Commandline/Extraopts.pm  ../GLPlugin/lib/Monitoring/GLPlugin/Commandline/Getopt.pm  ../GLPlugin/lib/Monitoring/GLPlugin/Commandline.pm  ../GLPlugin/lib/Monitoring/GLPlugin.pm  ../GLPlugin/lib/Monitoring/GLPlugin/Item.pm  ../GLPlugin/lib/Monitoring/GLPlugin/TableItem.pm  ../GLPlugin/lib/Monitoring/GLPlugin/DB.pm  ../GLPlugin/lib/Monitoring/GLPlugin/DB/DBI.pm  ../GLPlugin/lib/Monitoring/GLPlugin/DB/CSF.pm  ../GLPlugin/lib/Monitoring/GLPlugin/DB/Item.pm  ../GLPlugin/lib/Monitoring/GLPlugin/DB/TableItem.pm; do  /bin/sed -e 's/^1;//g' < $m | /bin/sed -e '/^__END__/,$d' | /bin/sed -e '/^__PACKAGE__/,$d' | /usr/bin/awk -f ./subst >> check_mysql_health;  done  fi
i am standalone
/bin/sh: /bin/sed: not found
/bin/sh: /bin/sed: not found
/bin/sh: /bin/sed: not found
/bin/sh: /bin/sed: not found
/bin/sh: /bin/sed: not found
/bin/sh: /bin/sed: not found
/bin/sh: /bin/sed: not found
/bin/sh: /bin/sed: not found
/bin/sh: /bin/sed: not found
/bin/sh: /bin/sed: not found
/bin/sh: /bin/sed: not found
/bin/sh: /bin/sed: not found
/usr/bin/awk: illegal primary in regular expression ^#! ?\/.*\/[a-z]{0,2}awk at 
 source line number 44 source file ./subst
 context is
        /^#! ?\/.*\/[a-z]{0,2}awk/ {sub(/^#! ?\/.*\/[a-z]{0,2}awk/,"#! >>>  /usr/bin/awk") <<< ;}
*** Error code 2

Stop.

Please check and resubmit as appropriate.
Comment 6 Robert Clausecker freebsd_committer freebsd_triage 2023-10-07 21:03:13 UTC
On a second attempt, the port builds.  Either my setup was wrong or there is some sort of flakiness.
Comment 7 Kirill 2023-10-08 15:19:47 UTC
May be you tried to build it without Makefile.am patch.

I can try maintain this port.

Also may be it too early, but on the official site this version is marked as test version. https://labs.consol.de/de/nagios/check_mysql_health/index.html, see German localization.
Comment 8 Robert Clausecker freebsd_committer freebsd_triage 2023-10-08 16:15:53 UTC
(In reply to Kirill from comment #7)

No, the patch is definitely there.

What helped was adding USES=autoreconf, but then it still fails processing the awk script.

It fails on some platforms only weirdly enough.
Comment 9 Robert Clausecker freebsd_committer freebsd_triage 2023-10-09 03:21:30 UTC
I couldn't get this port to build on armv7.  Are you okay with that?  It's not an essential platform and I would be okay with pushing the update regardless.
Comment 10 Kirill 2023-10-09 05:20:40 UTC
I don't mind.
Comment 11 Robert Clausecker freebsd_committer freebsd_triage 2023-10-09 05:33:45 UTC
Okay.  You may receive emails indicating build failures.  If you find the problem, feel free to submit patches!
Comment 12 commit-hook freebsd_committer freebsd_triage 2023-10-09 07:42:52 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=980be78e8501e633c7f6c7e9a3def58015b35b96

commit 980be78e8501e633c7f6c7e9a3def58015b35b96
Author:     Kirill <kirill@varnakov.com>
AuthorDate: 2023-10-07 03:30:49 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-10-09 07:40:28 +0000

    net-mgmt/check_mysql_health: update to 3.0.0.5

    Submitter becomes maintainer.

    Changelog:

    * 3.0.0.5
      update GLPlugin, fix valdiff&lookback
    * 3.0.0.4
      was a bad idea. now if there is no cache activity, there are no perfdata
    * 3.0.0.3
      use the last good value for hitrates of there is absolutely no database activity
    * 3.0.0.2
      default --lookback 3600 only if not given on the commandline
      fix version string
    * 3.0.0.1
      default --lookback 3600
    * 3.0
      new structure, using Monitoring::GLPlugin

    PR:             274308

 net-mgmt/check_mysql_health/Makefile                          |  7 ++++---
 net-mgmt/check_mysql_health/distinfo                          |  6 +++---
 .../files/patch-plugins-scripts_Makefile.am (new)             | 11 +++++++++++
 3 files changed, 18 insertions(+), 6 deletions(-)
Comment 13 Robert Clausecker freebsd_committer freebsd_triage 2023-10-09 07:45:31 UTC
Thank you for your contribution.
Comment 14 Kirill 2023-10-10 14:58:16 UTC
Created attachment 245545 [details]
patch2

Not at all. I added to USES autoreconf and gmake in patch 2. Could you commit it?

And I could reproduce strange error by running command several times:

cat Classes/Mysql/Component/InstanceSubsystem.pm | /usr/bin
/awk -v N=100 -f ./subst

Looks like Broken pipe error, which appears rarely.
Comment 15 Robert Clausecker freebsd_committer freebsd_triage 2023-10-10 17:02:53 UTC
(In reply to Kirill from comment #14)

You could try to replace the cat with a redirection like so:

    /usr/bin/awk -v N=100 -f ./subst <Classes/Mysql/Component/InstanceSubsystem.pm

Perhaps that avoids the issue (can't have a broken pipe if there is no pipe).

I'll see that I can get your fix up committed shortly.
Comment 16 commit-hook freebsd_committer freebsd_triage 2023-10-19 07:09:40 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=672b1b7c1e414c3882f4a2452c7a5585c949ca78

commit 672b1b7c1e414c3882f4a2452c7a5585c949ca78
Author:     Kirill <kirill@varnakov.com>
AuthorDate: 2023-10-16 03:19:58 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-10-19 07:07:25 +0000

    net-mgmt/check_mysql_health: attempt to fix the build

    Seems like USES=autoreconf may be required.

    PR:             274308

 net-mgmt/check_mysql_health/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Comment 17 Robert Clausecker freebsd_committer freebsd_triage 2023-10-19 07:13:12 UTC
Thank you for your contribution.