Bug 265217 - net-mgmt/collectd5: fails to build with nut
Summary: net-mgmt/collectd5: fails to build with nut
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: Daniel Engberg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-14 17:58 UTC by Stéphane D'Alu
Modified: 2023-03-17 09:03 UTC (History)
5 users (show)

See Also:
ports: maintainer-feedback+


Attachments
poudriere log (71.29 KB, text/plain)
2022-07-14 17:58 UTC, Stéphane D'Alu
no flags Details
collectd patch for nut plugin (721 bytes, patch)
2022-08-08 07:23 UTC, Krzysztof
ports: maintainer-approval+
Details | Diff
poudriere testport log (581.20 KB, text/plain)
2022-08-08 07:24 UTC, Krzysztof
no flags Details
config log after make (957.98 KB, text/plain)
2023-01-06 15:09 UTC, Serge Volkov
no flags Details
poudriere testport log - nutups is on (866.42 KB, text/plain)
2023-01-08 21:46 UTC, Krzysztof
ports: maintainer-approval-
Details
collectd Makefile patch for nut plugin (546 bytes, patch)
2023-01-09 10:53 UTC, Serge Volkov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stéphane D'Alu 2022-07-14 17:58:54 UTC
Created attachment 235260 [details]
poudriere log

Build fails in the configuration phase due to a missing dependency:
 
   nut . . . . . . . . . no (pkg-config doesn't know libupsclient) (dependency error)

Poudriere log in attachement
Comment 1 Krzysztof 2022-07-14 20:32:51 UTC
Thanks a lot for reporting. I think that I know what is the reason. AFAIR the upsclient (nut) changed its name. I have to check collectd github repository to be sure that libnutclient (newer version) is supported...
Comment 2 Krzysztof 2022-08-08 07:23:58 UTC
Created attachment 235766 [details]
collectd patch for nut plugin

Hello,

I've made a patch which covers change of libupsclient to libnutclient.
Comment 3 Krzysztof 2022-08-08 07:24:56 UTC
Created attachment 235767 [details]
poudriere testport log

Also poudriere log from testport. As you can see there is no problem after applying simple patch
Comment 4 Krzysztof 2022-12-05 09:59:29 UTC
Is it possible to commit this small change? I'm notified every week with email from bugzilla, but I have no power to close this bug :-)))
Comment 5 alexlily 2022-12-06 07:44:07 UTC
MARKED AS SPAM
Comment 6 commit-hook freebsd_committer freebsd_triage 2022-12-06 23:00:01 UTC
A commit in branch main references this bug:

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

commit fdb0314da55d4369b2cffca2b565ee21141ea723
Author:     Krzysztof <ports@bsdserwis.com>
AuthorDate: 2022-12-06 22:55:23 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2022-12-06 22:59:14 +0000

    net-mgmt/collectd5: Update dependency for NUTUPS option

    Network UPS Tools project changed filename of one of its libraries,
    update dependency entry to accordingly.

    PR:             265217

 net-mgmt/collectd5/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 7 Daniel Engberg freebsd_committer freebsd_triage 2022-12-06 23:00:40 UTC
Committed, sorry for the wait
Comment 8 kiloeswa 2022-12-06 23:54:14 UTC
MARKED AS SPAM
Comment 9 Serge Volkov 2023-01-06 15:09:43 UTC
Created attachment 239304 [details]
config log after make

The collectd5 still doesn't build with nut.
Comment 10 Krzysztof 2023-01-06 21:39:34 UTC
Hmm, that's strange. As you can see with poudriere testport log there were no errors...

It seems that you did not updated ports tree ??? :-(

I've checked my ports tree and change (my patch) is applied.
Comment 11 Serge Volkov 2023-01-07 07:43:02 UTC
(In reply to Krzysztof from comment #10)

I updated the ports tree with `portsnap fetch update`. Thus, I am using the latest version of the ports tree. Patch is applied, I checked this. But the port still doesn't compile with `make install`. I have attached the log file above. I have tried to build on two different machines. But the results are the same.
Comment 12 Krzysztof 2023-01-08 21:46:23 UTC
Created attachment 239347 [details]
poudriere testport log - nutups is on

I do not know what's going on. I've just updated ports tree, and made testport once again. As you can see there is no error at all.

You can check poudriere build process via this link: http://pkg.codenix.pl/pkg/build.html?mastername=12x64-testing&build=2023-01-08_20h45m08s

Sorry, but for me it seems that you still have old ports tree :-(((

I've just checked on one of my servers and during configure there is no problem:
configure:123862: result:     libudev . . . . . . . no (Linux only library)
configure:123864: result:     libupsclient  . . . . yes
configure:123866: result:     libvarnish  . . . . . no (pkg-config doesn't know varnishapi)
configure:123868: result:     libvirt . . . . . . . no (pkg-config doesn't know libvirt)
Comment 13 Stéphane D'Alu 2023-01-09 10:40:31 UTC
I've got the same problem (port updated from git)

     MYSQL=on: Enable mysql-based plugins
     NUTUPS=on: Enable nut (ups) plugin
     OLSRD=off: Enable olsrd plugin


    libudev . . . . . . . no (Linux only library)
    libupsclient  . . . . no (pkg-config doesn't know libupsclient)
    libvarnish  . . . . . no (pkg-config doesn't know varnishapi)
    libvirt . . . . . . . no (pkg-config doesn't know libvirt)
    libxenctrl  . . . . . no (xenctrl.h not found)



    numa  . . . . . . . . no
    nut . . . . . . . . . no (pkg-config doesn't know libupsclient) (dependency 
error)
    olsrd . . . . . . . . no (disabled on command line)
    onewire . . . . . . . no (disabled on command line)



MD5 (Makefile) = a58906d8c533e44c65066f4da65ad201
MD5 (distinfo) = d985e62f99028e20dce9da2a39e9cec3
MD5 (files/nut.in) = 3f786f3f8fef89af0c4e904e3d76ac63
MD5 (files/nut.newsyslog) = 047427e262daaa443873b5bfa24aed22
MD5 (files/nut.syslog) = 6dd3e9c73f51fc83ae613673943be251
MD5 (files/nut_upslog.in) = c9aa49efc71a3f554b5902e7de75fb48
MD5 (files/nut_upslog.sample) = 1100b2ded2cf65cc496f94d336fbf942
MD5 (files/nut_upsmon.in) = bb793a2898f811339b46adec32898717
MD5 (files/patch-clients_upslog.c) = e6bdf55ada655fdd8f8484553d56de20
MD5 (files/patch-conf_upsmon.conf.sample.in) = 192b7254ad4560da72b5db89cf32c679
MD5 (files/patch-docs_man_upslog.8) = 339f3ed95e551dd6ddad8a869a41c692
MD5 (files/patch-docs_man_upslog.txt) = 8d69a341e826fecbb5a8b2b64f1a38cb
MD5 (files/patch-drivers_main.h) = b38435744f4804b06d16c8d7ea5204d1
MD5 (files/patch-scripts_Makefile) = f0f9debaf2a8b080707a96baf542fde6
MD5 (files/patch-tools_nut-scanner_nutscan-init.c) = 7fdce248c8f5e0e7ccba559e716fc42b
MD5 (pkg-descr) = 86f086e917f74af161252b714e54d1b2
MD5 (pkg-plist) = 39e2c88e8df14e889351256b730d46c0
Comment 14 Serge Volkov 2023-01-09 10:53:16 UTC
Created attachment 239359 [details]
collectd Makefile patch for nut plugin

I don't understand why the port builds fine with Poudriere.

I finally found a bug and made a patch. The error was in the port's Makefile. If you apply my patch, then the port is build normally.
Comment 15 Stéphane D'Alu 2023-01-09 11:02:17 UTC
Build successfully with the last patch provided. Thanks
Comment 16 Krzysztof 2023-01-09 13:24:09 UTC
OK,

I've applied your changes to my poudriere instance. There is no problems at all.

Because I have to change varnish dependency also, so I will make a patch which fixes some more things.

By the way: may I reopen this bug or I should make a new one? Thanks a lot for an advise.
Comment 17 commit-hook freebsd_committer freebsd_triage 2023-03-17 09:03:40 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=910e52c9d15669b8caf7101011e86786e3b25f54

commit 910e52c9d15669b8caf7101011e86786e3b25f54
Author:     Krzysztof <ports@bsdserwis.com>
AuthorDate: 2023-03-14 09:35:49 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-03-17 09:02:16 +0000

    net-mgmt/collectd5: update varnish dependency, modify nut dependency

    As discussed in PR 265217 there is small patch for the nut (libups)
    dependency.  I also add the actual varnish depndency (6 instead of 4).

    PR:             268972, 265217

 net-mgmt/collectd5/Makefile                   |  42 ++++-------
 net-mgmt/collectd5/files/patch-Makefile.am    |   6 +-
 net-mgmt/collectd5/files/patch-configure.ac   | 104 +++++++++++++++++++++++++-
 net-mgmt/collectd5/files/patch-version-gen.sh |   6 +-
 4 files changed, 122 insertions(+), 36 deletions(-)