NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.52k stars 13.01k forks source link

munin should not pull in Ruby, Python and Java unconditionally #227366

Open Necoro opened 1 year ago

Necoro commented 1 year ago

munin currently depends hard on Perl, Python, Ruby -- and Java. This adds quite a lot of bloat to a system, even though only Perl is a hard requirement.

Looking to other distros (example: Arch), only Perl is required.

Suggestion:

Necoro commented 1 year ago

@bjornfor Pinging you, as you are the munin maintainer.

I can probably create a PR for this.

bjornfor commented 1 year ago

Suggestion:

  • make python, ruby and java configurable [the latter should probably default to false]
  • provide a munin-minimal package that has all three disabled

As long as the out-of-the-box experience is good (no broken plugins by default), and the module docstrings indicate how to get the full featured munin (if the default is stripped down) -- or the inverse.

I can probably create a PR for this.

:+1:

Necoro commented 1 year ago

As long as the out-of-the-box experience is good (no broken plugins by default)

What do you mean by this? Munin expects plugins to be explicitly installed in /etc/munin/plugins.d. For each of the plugins, it is the admins responsibility to check their requirements and ensure they are installed (except for the runtime, often they require certain tools or perl packages to be around).

bjornfor commented 1 year ago

As long as the out-of-the-box experience is good (no broken plugins by default)

What do you mean by this? Munin expects plugins to be explicitly installed in /etc/munin/plugins.d. For each of the plugins, it is the admins responsibility to check their requirements and ensure they are installed (except for the runtime, often they require certain tools or perl packages to be around).

Last time I used munin on NixOS, it'd auto-configure/auto-enable a bunch of plugins. If those auto-detected plugins require perl or java etc., and we remove those runtime deps by default, we might break setups that rely on defaults.

Maybe the ./nixos/tests/munin.nix catches that?

Necoro commented 1 year ago

Ok. As far as I can see,

I'd argue: disabling Java and Ruby by default and mentioning this change in the NixOS changelog should be sufficient. Perl and Python, I'd leave be. So the usecase of the "just enable it"-user should stil work out of the box. I'd even add some more Perl deps, that are currently missing (e.g. DBD-mysql)

I then can envision two more package variants:

Necoro commented 1 year ago

Maybe the ./nixos/tests/munin.nix catches that?

This test is btw also broken: it yields an empty result.

(@domenkozar, @edolstra: You are listed as maintainers on the tests/munin.nix. Are you ok when I include the test in my "munin cleanup"-spree? Do you want to remain as maintainer of this test?)