Skip to content

Add Winget support for Netdata Windows agent #19595

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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

sashwathn
Copy link
Contributor

@sashwathn sashwathn commented Feb 7, 2025

Related to #19565

Implemented Winget support for Windows.


Related to netdata#19565

Implemented Winget support for Windows.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/netdata/netdata/issues/19565?shareId=XXXX-XXXX-XXXX-XXXX).
@sashwathn sashwathn requested review from Ancairon and a team as code owners February 7, 2025 16:22
@github-actions github-actions bot added area/packaging Packaging and operating systems support area/docs labels Feb 7, 2025
@sashwathn
Copy link
Contributor Author

@Ferroin : Can you review this? I was having some fun.. :)

Copy link
Member

@Ferroin Ferroin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from the mentioned issues, the documentation should be in a separate PR to be merged only once we’re actually publishing Winget packages and have confirmed that they work correctly.

Comment on lines +60 to +62
${GITHUB_ACTIONS+echo "::group::Publish Winget Package"}
winget create --manifest "${output_manifest}" --token "${WINGET_TOKEN}"
${GITHUB_ACTIONS+echo "::endgroup::"}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be handled separately from this script, unless we expect people building the agent to publish things directly (instead of relying on CI to do it).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, dropping this will fix the Windows build failure in CI.

Comment on lines +7 to +8
"License": "GPL-3.0",
"LicenseUrl": "https://www.gnu.org/licenses/gpl-3.0.txt",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is blatantly wrong, it needs to point to a unified license that covers the whole package.

@@ -27,3 +27,19 @@ function check_and_get_file() {
check_and_get_file "gpl-3.0.rtf" "https://www.gnu.org/licenses/gpl-3.0.txt"
check_and_get_file "ncul1.rtf" "https://app.netdata.cloud/LICENSE.txt"

function create_unified_license() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strictly speaking this is likely to not be ‘correct’ from a legal perspective. We need to be explicitly calling out what parts are under what license.

Reorganizing it so the NCUL comes first, and then putting something about ‘All other parts of the software are licensed under the GPL version 3.0’. Even that may not quite be correct though, we’re bundling and shipping a large chunk of MSYS2 on Windows and I’m not certain that 100% of the stuff we are bundling there has GPL compatible licenses (in which case those components that don’t need to be called out separately).

@sashwathn
Copy link
Contributor Author

@Ferroin @ilyam8 : Sorry this was automatically generated by GitHub Copilot and all of us (@ktsaou @shyamvalsan @ralphm and I) wanted to check what you think about the PR.. :)

This may indeed not be the solution but at least it tells us that the Copilot can work in some cases.

@ktsaou
Copy link
Member

ktsaou commented Apr 6, 2025

I think we need this to allow windows users easily update

@ktsaou ktsaou requested a review from kanelatechnical as a code owner April 6, 2025 19:05
ktsaou and others added 6 commits April 6, 2025 22:06
Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>
Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>
Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>
Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>
Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>
Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>
@ktsaou
Copy link
Member

ktsaou commented Apr 6, 2025

To distribute Netdata effectively via WinGet while handling its dual licensing model (Agent: GPLv3, Dashboard: NCUL), we could consider using a three-package structure that leverages WinGet's dependency features.

Here's a proposed breakdown:

  1. netdata-agent Package:

    • Content: Would contain only the Netdata Agent installer.
    • License: Would be correctly declared as GPLv3.
    • Purpose: Would provide the core agent component.
  2. netdata-dashboard Package:

    • Content: Would contain only the Netdata Dashboard installer.
    • License: Would be correctly declared as NCUL.
    • Dependency: It would explicitly depend on the netdata-agent package (since the dashboard requires the agent).
    • Purpose: Would provide the dashboard component.
  3. netdata Package (Metapackage):

    • Content: This package would contain no software/installer itself. It would be a "virtual" or "meta" package.
    • Purpose: Its sole function would be to declare dependencies on both the netdata-agent and netdata-dashboard packages.
    • License: Could potentially be marked as "Multiple" or similar, ideally linking to documentation explaining the underlying component licenses.

Proposed User Experience:

  • If a user wants the complete Netdata installation, they could simply run: winget install netdata.
  • WinGet would read the netdata metapackage, see it requires the agent and dashboard packages.
  • WinGet would automatically resolve these dependencies and install netdata-agent and netdata-dashboard in the correct order.

Potential Benefits of this Approach:

  • Simple User Experience: Would provide a single, easy command (winget install netdata) for the full setup.
  • Accurate Licensing: Would ensure correct licensing is specified for each component package.
  • Modularity: Would allow users or automation to install just the agent (winget install netdata-agent) or the dashboard (winget install netdata-dashboard, which would also pull in the agent) if needed.
  • Standard Practice: Would utilize standard WinGet dependency features effectively.

This proposed strategy could allow us to distribute Netdata correctly via WinGet, respecting its licensing, while potentially offering a straightforward installation path for our users. Feedback and discussion are welcome.

@Ferroin
Copy link
Member

Ferroin commented Apr 7, 2025

@ktsaou

To have multiple packages via WinGet we would need to provide multiple separate MSI packages, which would in turn be a backwards incompatible change. So having a single package here is better overall because it won’t break things needlessly for our existing users and won’t complicate things for new users.

It is generally accepted that providing EULA style license text for the package as a whole that explains what license each of the individual components is under is perfectly acceptable for this type of thing. Actually having that license is literally the only thing blocking me from preparing both WinGet and Chocolatey packages for Netdata (and I have brought this specific issue up multiple times in multiple channels on Slack). If we can get that (and ideally include it properly in our MSI packages as well, because that would also simplify our MSI packages), I can likely have us fully published via both WinGet and Chocolatey within at most a week and without any breakage for end users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docs area/packaging Packaging and operating systems support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants