Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netdata, since v1.41.0, includes a new, non-free version of the dashboard #256964

Closed
peat-psuwit opened this issue Sep 23, 2023 · 5 comments · Fixed by #257143
Closed

Netdata, since v1.41.0, includes a new, non-free version of the dashboard #256964

peat-psuwit opened this issue Sep 23, 2023 · 5 comments · Fixed by #257143

Comments

@peat-psuwit
Copy link
Contributor

peat-psuwit commented Sep 23, 2023

(Apology for the kind label, I'm just unable to find the right one (or the right template) for the licensing issue.)

Starting from version 1.41.0, Netdata has started to include their new agent dashboard - the so-called Cloud UI (or sometimes v2) [1]. This, however, is distributed under a different license than the rest of Netdata - the Netdata Cloud UI License v1.0 (NCUL1) [2].

This license restricts the use of the software, allowing it "only to interface with the licensor's other software components". Moreover, the UI itself is distributed in the minified form. This makes this license non-free. Luckily, the license does not restrict the redistribution, so NixOS is probably not in a legal trouble just yet (disclaimer: IANAL).

The old versions of dashboard is still distributed with Netdata. To the best of my knowledge, the old version of the dashboard is still distributed under GPL-3+. Users can choose to go to the old (so-called v1) dashboard by going to e.g. http://localhost:19999/v1/.

As a related issue, also since version 1.41.0 Netdata will, by default, download the latest version of the Cloud UI from their server to the browser, falling back to the local copy of the UI distributed with itself if it fails to do so.

So, in this case, I believe it's possible for NixOS to remove the new UI from its build. The relevant code will have to be patched so that it redirects the the v1 version of dashboard.

I plan to solve this by using fetchFromGitHub's postFetch to remove the source code for the new dashboard, then provide a patch (potentially upstreamable) to disable the build of the v2 directory using a configuration flag. I also plan to build the v1 dashboard from source [3] since it'll help us comply with its GPLv3 license. Is postFetch acceptable for making the source derivation free from non-free content?

[1]
https://github.com/netdata/netdata/releases/tag/v1.41.0#v1410-one-dashboard
[2] https://github.com/netdata/netdata/blob/master/web/gui/v2/LICENSE.md
[3] https://github.com/netdata/dashboard

Notify maintainers

@RaitoBezarius

@RaitoBezarius
Copy link
Member

RaitoBezarius commented Sep 23, 2023 via email

peat-psuwit added a commit to peat-psuwit/nixpkgs that referenced this issue Sep 23, 2023
TODO: wire up to actual netdata build

Since Netdata's (v1) dashboard is licensed under GPLv3, it's better to
build it ourselves instead of using minified copy shipped with the
primary Netdata repository.

Bug: NixOS#256964
peat-psuwit added a commit to peat-psuwit/nixpkgs that referenced this issue Sep 24, 2023
TODO: put sourcemap in a separated output, to avoid Node in closure

Since Netdata's (v1) dashboard is licensed under GPLv3, it's better to
build it ourselves instead of using minified copy shipped with the
primary Netdata repository.

Bug: NixOS#256964
peat-psuwit added a commit to peat-psuwit/nixpkgs that referenced this issue Sep 24, 2023
TODO: makes Netdata's dashboard buildable using supported version of
NodeJS

Since Netdata's (v1) dashboard is licensed under GPLv3, it's better to
build it ourselves instead of using minified copy shipped with the
primary Netdata repository.

Bug: NixOS#256964
peat-psuwit added a commit to peat-psuwit/nixpkgs that referenced this issue Sep 24, 2023
The v2 dashboard (included since version 1.41.0) is licensed under
Netdata Cloud UI License v1.0, which is a non-free license.

Patch the source code so that the v2 is not included in the source
and the result derivation. Users that want the v2 dashboard can still
request it by overriding this derivation and pass `withCloudUi = true`.

Co-authored-by: Raito Bezarius <masterancpp@gmail.com>
Fixes: NixOS#256964
peat-psuwit added a commit to peat-psuwit/nixpkgs that referenced this issue Sep 24, 2023
The v2 dashboard (included since version 1.41.0) is licensed under
Netdata Cloud UI License v1.0, which is a non-free license.

Patch the source code so that the v2 is not included in the source
and the result derivation. Users that want the v2 dashboard can still
request it by overriding this derivation and pass `withCloudUi = true`.

Co-authored-by: Raito Bezarius <masterancpp@gmail.com>
Fixes: NixOS#256964
@peat-psuwit
Copy link
Contributor Author

Making Netdata exclude the v2 dashboard is simple (and the fallback to v1 Just works™). The PR [1[ does just that, and I also file a PR to upstream to see how they think [2].

On the other hand, making v1 dashboard build by itself is more complex than I thought. The NPM dependencies in @netdata/dashboard is ancient. It's so old that it won't build with NodeJS 18 and node2nix's dependency resolution. I get it to build with NodeJS 14, but that's marked insecure now. Even with dashboard already in the store, the NodeJS 14's insecure flag is still being evaluated as netdata's transitive dependency.

So I give up on that front for now. The branch containing the work is at [3]. I'll open another issue for getting the v1 built by itself, but for now, the v2 dashboard is now excluded.

[1] #257143
[2] netdata/netdata#16040
[3] https://github.com/peat-psuwit/nixpkgs/tree/netdata-self-built-dashboard

@RaitoBezarius
Copy link
Member

RaitoBezarius commented Sep 24, 2023 via email

github-actions bot pushed a commit to arcnmx/nixpkgs-lib that referenced this issue Oct 3, 2023
The v2 dashboard (included since version 1.41.0) is licensed under
Netdata Cloud UI License v1.0, which is a non-free license.

Patch the source code so that the v2 is not included in the source
and the result derivation. Users that want the v2 dashboard can still
request it by overriding this derivation and pass `withCloudUi = true`.

Co-authored-by: Raito Bezarius <masterancpp@gmail.com>
Fixes: NixOS/nixpkgs#256964
github-actions bot pushed a commit to nix-community/nixpkgs.lib that referenced this issue Oct 8, 2023
The v2 dashboard (included since version 1.41.0) is licensed under
Netdata Cloud UI License v1.0, which is a non-free license.

Patch the source code so that the v2 is not included in the source
and the result derivation. Users that want the v2 dashboard can still
request it by overriding this derivation and pass `withCloudUi = true`.

Co-authored-by: Raito Bezarius <masterancpp@gmail.com>
Fixes: NixOS/nixpkgs#256964
@wmertens
Copy link
Contributor

Is this the reason netdata can't talk to cloud any more?

It seems to me that the actions were overzealous. By all means exclude the minified dashboard, but don't remove the open source connector that connects to the netdata cloud?

@RaitoBezarius
Copy link
Member

Is this the reason netdata can't talk to cloud any more?

It seems to me that the actions were overzealous. By all means exclude the minified dashboard, but don't remove the open source connector that connects to the netdata cloud?

No it's not. This was done in another PR for maintenance reasons, there's a netdataCloud attribute which you can build.

If you want to restore a netdataCloudButWithoutCloudDashboard, feel free to do so, but I won't maintain it, netdata requires enough attention and coordination with upstream like this ; though we could have a proper NixOS module option "I really need cloud" that ensures that your package has cloud support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants