-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
mediatomb: Improve service + add gerbera support and tests #93450
Conversation
77ae356
to
211b225
Compare
I just:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here are some initial comments. I think I need more time to do a thorough review. Will circle back to this in the next few days hopefully.
Awesome, thanks. Cheers, |
(NdA: PR description editing)
I can run tests now ( |
7e674dd
to
762af6d
Compare
lol, 1 check failed... In that regards, "All" sounds a bit harsh ;)
This is fixed now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I'm going to need some more time to review this. I'm hoping someone else can jump in and offer some review as well because it has been too many years since I've used mediatomb
to be the only person reviewing this.
default = ""; | ||
description = '' | ||
A specific interface to bind to. | ||
''; | ||
}; | ||
|
||
openFirewall = mkOption { | ||
type = types.bool; | ||
default = true; # On by default for retro-compatibility with existing behavior |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... we may want to check on this. I can't recall the details. I think we're supposed to have all ports closed unless explicitly allowed by the sysadmin. If so an entry in the release notes would suffice here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, i recall a discussion (github issue) about services should stop opening firewall themselves... (let me search for it... found a rule in a doc instead [1])
I specifically left it open here because it was the existing behavior i did not want to break (thus the comment so reviewer know my intent). If "breaking the existing behavior" is acceptable with an update in the release note though (i don't really know what that is yet ;) then i'll adapt accordingly.
[1] https://nixos.org/nixpkgs/manual/#reviewing-contributions-new-modules (it's for a new module though ¯_(ツ)_/¯)
Thanks again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, the option is false by default now. And I added a note in the release-note (20.09) in the breaking-compatibility section about it.
Hello,
Well, sure ;) For information, I separated logically the commits so the review is easier one
Hopefully, yes. That'd be great, the more eyes to look, the more improvments we can do ;) In the mean time, do you have some time to review the less impactful diffs (the
Yes, that's why I opened tests around this. After touching so much part on So in those tests, I'm making sure both old and new mediatomb service still Note that I did not add all the possible scenarios though. I was a bit wary of I could still improve the testing, so we actually check:
[1] web ui is hard-coded to on by default. I did not open an option for it Cheers, |
762af6d
to
6633914
Compare
Note to self, look into adding a release note [1] to explicit the firewall rule option change [2] [1] nixpkgs/nixos/doc/manual/release-notes/rl-2009.xml <- in that file probably [2] as of this commit, the service no longer opens the firewall rules by default, this needs an explicit user declaration |
Do I need to rebase and fix conflicts now? |
@ardumont sure. We really should find someone who uses |
c5dca04
to
066fb9d
Compare
done.
It'd be neat because since the release notes got updated, I gather conflicts will happen more often... I note you are still noted as requesting changes. But as far as I know and remember, I addressed all your points, didn't I? ;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have we found anyone to review this yet? Did you post on https://discourse.nixos.org/?
No, I did not know i'd need to do something and don't know how to actually search for someone to review. Cheers, |
This exposes 2 scenario running the mediatomb service: - one running with the unmaintained mediatomb package - one running with the new maintained gerbera package
This changes the default behavior which opened by default the firewall rules. The users now need to declare explicitely they want to open the firewall.
Note that it made into 2 entries, one about new options in the first section. Another in the breaking compatibility section due to the openFirewall option which changes the behavior.
Thanks and sorry, I was sleeping... I don't understand why I don't reproduce this... When running either the build It's not clear to me why [1] Then again, I don't understand either why I have the following error locally
To work around this ^ (which i know is not so great ¯_(ツ)_/¯), I have locally |
It works ;) I'm still unclear on the other part though [1] |
Absolutely no need to apologize :) The iteration speed here is already breakneck for open source standards ;)
Yeah this is a bit confusing at first: Its not about the build, but the evaluation. ofBorg tries to evaluate all of nixpkgs, while the simple build only lazily evaluates whatever it needs. To avoid these issues, I have this hook in my
I think its not quite the same ofBorg does, but it usually catches evaluation errors.
Looks like that worked.
This is because That knowledge might be outdated, but either way one of the aliases should be removed. This doesn't show up in ofBorg because this actually is a build error, not an eval error (and it didn't try to build |
(CC @mkg20001) |
It's already aliased in all-packages. This creates issues at least for the mediatomb build. Related to NixOS#93450#issuecomment-705408544
Thank you for your patience and your diligence here 🚀 |
default = "/var/lib/mediatomb"; | ||
default = "/var/lib/${name}"; | ||
description = '' | ||
The directory where ${cfg.serverName} stores its state, data, etc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately I just noticed this post-merge. How can you refer to the value of an option within an option description? Have you tried building the docs with this? I suspect this will just always expand to the default value.
default = false; | ||
description = '' | ||
If false (the default), this is up to the user to declare the firewall rules. | ||
If true, this opens the 1900 (tcp and udp) and ${toString cfg.port} (tcp) ports. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here: Reference to an option value within an option description.
customCfg = mkOption { | ||
type = types.bool; | ||
default = false; | ||
description = '' | ||
Allow mediatomb to create and use its own config file inside ${cfg.dataDir}. | ||
Allow ${name} to create and use its own config file inside ${cfg.dataDir}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also here. You should probably refer to the options by name instead.
It seems like this breaks the manual build. I'm working on a fix. |
Follow-up to NixOS#93450 to fix the manual build.
Well, thanks for your input on this ;)
I actually saw this in other derivations (I think).
I thought this was covered by the actual build process. How does one build the documentation? Is that [1]? [1] https://nixos.org/manual/nixpkgs/stable/#chap-contributing
Ack, I'll stop doing that then. Cheers, |
@timokau What do you mean by updating spidermonkey to spidermonkey_68 in all-packages.nix? Should I move the alias there? Or simply drop spidermonkey alias for good? |
ah ok, thx |
No worries. If anything, its a failure of automated testing and a weird doc format (hopefully not much longer, #88488 and NixOS/rfcs#72).
I built the manpages like this: |
Hi, so this touched the |
Sorry for missing that in the review, I didn't check the filename. @ardumont if you want to re-add it, you can add it to the 21.03 release notes since it will be included in that release. |
Well, i did not realize I was targetting the wrong release, so my bad ;)
ok, i'll have a look later in the day. |
Motivations
transcoding
option which if enabled installs the necessary dependencies to actually workopenFirewall
(defaults to false) and improve the firewall declaration using it.openFirewall
off by default now)Actions
sandbox
innix.conf
on non-NixOS linux)Linux alderaan 5.7.7 #1-NixOS SMP Tue Jun 30 20:21:22 UTC 2020 x86_64 GNU/Linux
)Linux yavin4 4.19.0-9-amd64 #1 SMP Debian 4.19.118-2+deb10u1 (2020-06-07) x86_64 GNU/Linux
)./result/bin/
)nix path-info -S
before and after)Notes
I built the diff on the started works [1] [2]
[1] #82429 (apparently idle, asked but got no reply so i continued from it)
[2] #93226 (my own work about gerbera, merged now)
[4]
Cheers,