[Bug 255980] net-mgmt/netdata: Update to 1.31.0

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 12 Jun 2021 00:56:08 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255980

--- Comment #17 from Namkhai B. <namkhai.n3@protonmail.com> ---
So, here's the process I followed to build the custom dashboard:

1. I have a fork at https://github.com/forkbomb9/dashboard, in which the branch
`freebsd` removes the social media components.

2. I then build the dashboard (using Node LTS), and pack `build/` in
`dashboard.tar.gz`.
This file can be found here:
https://github.com/forkbomb9/dashboard/releases/tag/v2.17.1-bsd0.

I then use that as a basis to update the dashboard in netdata:

1. go to web/gui, and in bundle_dashboard.py, change URLTEMPLATE to point to my
fork, e.g. instead of github.com/netdata/dashboard use
github.com/forkbomb9/dashboard.

2. call bundle_dashboard.py with my custom release tag :./bundle_dashboard.py
v2.17.1-bsd0.

This is now the customized dashboard. This procedure is only to generate the
patch, it has to be done on every dashboard update (it's not that hard).

Then, to generate the actual patch, I commit the changes to my `netdata` fork
in the `freebsd` branch. And then I use that commit as a patch in the Makefile
(https://github.com/forkbomb9/netdata/commit/69bb76a794d8ae7fde1d9a1a8202fef3ec04726a)

This is the most efficient way I found to update the dashboard, while following
the build procedure. The only thing that I have to do is update my `netdata`
branch every time there's a package update, and it isn't very hard to do.

Another option would be to run bundle_dashboard.py on the build process, thus
skipping the patch download. But that would pull Python as a build
dependency...

I could also try to rewrite it in Lua, but that feels much hackier than the
procedure I described above. And I don't have the skills in Bash/Sh to do it...

-- 
You are receiving this mail because:
You are the assignee for the bug.