Bug 253216 - net-mgmt/netdata: Update to 1.29.0
Summary: net-mgmt/netdata: Update to 1.29.0
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: Rainer Hurling
URL: https://github.com/netdata/netdata/re...
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-03 16:21 UTC by Daniel Engberg
Modified: 2021-02-15 21:27 UTC (History)
2 users (show)

See Also:


Attachments
Patch for netdata (923 bytes, patch)
2021-02-03 16:21 UTC, Daniel Engberg
no flags Details | Diff
patch with pkg-plist added and ordered Makefile (5.84 KB, patch)
2021-02-06 21:59 UTC, Rainer Hurling
no flags Details | Diff
patch to v.1.29.1, with ordered Makefile and pkg-plist (5.52 KB, patch)
2021-02-10 20:16 UTC, Rainer Hurling
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Engberg freebsd_committer freebsd_triage 2021-02-03 16:21:31 UTC
Created attachment 222117 [details]
Patch for netdata

Update netdata to 1.29.0

Compile and runtime-tested on FreeBSD 13.0-ALPHA2 (amd64) (make, make check-plist)
Poudriere testport OK 12.2-RELEASE (amd64)
Poudriere testport OK 11.4-RELEASE (amd64)
Comment 1 Rainer Hurling freebsd_committer freebsd_triage 2021-02-06 06:55:20 UTC
Hi Daniel,

when I try to build net-mgmt/netdata on Poudriere (with 'bulk -t'), I get an error about leftovers:

[..snip..]
[HEADamd64-default-qgis-job-01] [1/1] Deinstalling netdata-1.29.0...
[HEADamd64-default-qgis-job-01] [1/1] Deleting files for netdata-1.29.0: .......... done
==> You should manually remove the "netdata" user. 
==> You should manually remove the "netdata" group 
pkg-static: unlinkat(usr/local/etc/netdata/): Is a directory
pkg-static: unlinkat(usr/local/share/netdata/): Is a directory
pkg-static: unlinkat(usr/local/etc/netdata/): Is a directory
pkg-static: unlinkat(usr/local/etc/netdata/): Is a directory
pkg-static: unlinkat(usr/local/etc/netdata/): Is a directory
pkg-static: unlinkat(usr/local/etc/netdata/): Is a directory
pkg-static: unlinkat(usr/local/etc/netdata/): Is a directory
pkg-static: unlinkat(usr/local/etc/netdata/): Is a directory
pkg-static: unlinkat(usr/local/etc/netdata/): Is a directory
===========================================================================
=>> Checking for extra files and directories
=>> Error: Files or directories left over:
@dir %%DATADIR%%
@dir %%ETCDIR%%
=>> Cleaning up wrkdir
===>  Cleaning for netdata-1.29.0
build of net-mgmt/netdata | netdata-1.29.0 ended at Fri Feb  5 22:05:21 CET 2021
build time: 00:01:38


Could you please have a look at it? Thanks :)
Comment 2 Daniel Engberg freebsd_committer freebsd_triage 2021-02-06 18:31:08 UTC
Can't reproduce, works fine on my end.
poudriere bulk -t -j 122amd64-dev net-mgmt/netdata (cmd)
Comment 3 Rainer Hurling freebsd_committer freebsd_triage 2021-02-06 21:59:17 UTC
Created attachment 222229 [details]
patch with pkg-plist added and ordered Makefile

Hmm, I have absolutely no idea what is going on here :(

After investigating more on several boxes, it turns out, that for me pkg-plist has to be changed a bit. Therefore I attached another patch of the port with an updated pkg-plist added. The biggest chance here is, that the @dir lines are without (netdata,netdata,0750) and that '@dir %%ETCDIR%%' and '@dir %%DATADIR%%' came _after_ their subdirectories.

While here, also ordered some Makefile vars, like suggested by portclippy (from portfmt).

The updated patch works for me on different boxes within and outside of Poudriere.

It would be nice if you could give it a try. Many Thanks.
Comment 4 Matthias Andree freebsd_committer freebsd_triage 2021-02-10 18:58:36 UTC
(In reply to Rainer Hurling from comment #3)
Rainer, do you happen to use anything nondefault, such as NFS, or non-native filesystems, and what's the host and guest OS for your poudriere (with versions) and what's the ports tree version? Any local changes, special options on your HEADamd64-default-qgis?  Anything wrong with the machine itself that pkg-static tries to unlinkat() a directory (which it should not attempt to do)?
Comment 5 Rainer Hurling freebsd_committer freebsd_triage 2021-02-10 20:16:42 UTC
Created attachment 222340 [details]
patch to v.1.29.1, with ordered Makefile and pkg-plist

Hi Matthias, 
Thanks for following up with these questions. It prompted me to try the port again.

Two days ago I updated the host running Poudriere to 14.0-CURRENT #5 main-n244673-fb8c2f743ab and after that I also updated my jails in Poudriere.

Interestingly, Daniel's patch now works with the original pkg-plist :)

I then attached a new version of the patch, now even for v.1.29.1 (hot fix) :D  The makefile is sorted as recommended by portclippy. pkg-plist is now sorted as generated by 'make makeplist'.

Thanks again for your critical questions and my apologies to Daniel for the misleading intermediate version.
Comment 6 Matthias Andree freebsd_committer freebsd_triage 2021-02-11 01:59:52 UTC
Ho-hum, -CURRENT sometimes is -CUTTINGEDGE it seems, no? Daniel and I were trying on supported -RELEASE branches instead.
Comment 7 Rainer Hurling freebsd_committer freebsd_triage 2021-02-11 05:57:59 UTC
(In reply to Matthias Andree from comment #6)
Yes, -CURRENT sometimes is -CUTTINGEDGE. Here it seems, was some a the very rare cases it hits me. In comment #3 I said myself that I don't know what's happening here ...

But all my boxes are -CURRENT for years now, I never had problems like this with them as host for Poudriere. Now it seems to be over, all jails behave again as usual :)
Comment 8 Daniel Engberg freebsd_committer freebsd_triage 2021-02-13 17:50:30 UTC
LGTM however the placement of L429 and L430 (new patch) seems odd and possible incorrect. I would assume that you're to go deeper in a directory tree not the other way around.
Comment 9 Rainer Hurling freebsd_committer freebsd_triage 2021-02-13 18:06:51 UTC
(In reply to daniel.engberg.lists from comment #8)
I might be wrong here, but aren't these lines about cleaning up empty directories if one deinstalls the port?

If so, I tried to work as described in example 8.2.1 from PH [1].

Interestingly, 'make makeplist' does not create the two entries %%DATADIR%% and %%ETCDIR%% (without subdirectories) at all ...


[1] https://docs.freebsd.org/en_US.ISO8859-1/books/porters-handbook/book.html#plist
Comment 10 commit-hook freebsd_committer freebsd_triage 2021-02-15 20:51:39 UTC
A commit references this bug:

Author: rhurlin
Date: Mon Feb 15 20:50:38 UTC 2021
New revision: 565340
URL: https://svnweb.freebsd.org/changeset/ports/565340

Log:
  net-mgmt/netdata: Update to 1.29.1

  Hotfix release to address a crash in the Netdata Agent

  Changelog: https://github.com/netdata/netdata/releases

  PR:		253216
  Submitted by:	daniel.engberg.lists@pyret.net

Changes:
  head/net-mgmt/netdata/Makefile
  head/net-mgmt/netdata/distinfo
  head/net-mgmt/netdata/pkg-plist
Comment 11 Rainer Hurling freebsd_committer freebsd_triage 2021-02-15 20:54:39 UTC
Hi Daniel,

I just committed the patch in its last discussed version.

Because of [1] in comment #9 I let the order of the @dir lines like in the patch. Hope your are fine with it. Please feel free to contact me if there are any problems.
Comment 12 Daniel Engberg freebsd_committer freebsd_triage 2021-02-15 21:27:33 UTC
Fine by me, thanks!