Skip to content

nixos/ebusd: fix device access#352743

Merged
FliegendeWurst merged 1 commit into
NixOS:masterfrom
Birdy2014:ebusd-fix-devices
Dec 11, 2024
Merged

nixos/ebusd: fix device access#352743
FliegendeWurst merged 1 commit into
NixOS:masterfrom
Birdy2014:ebusd-fix-devices

Conversation

@Birdy2014

Copy link
Copy Markdown
Contributor

When services.ebusd.device is set to a local device like /dev/ttyACM0, ebusd will fail with the error device invalid. This is because the module disallows all device access using PrivateDevices when a device is specified, instead of allowing device access.

I only tested this change with an adapter that is connected via USB, but this shouldn't change the behavior of adapters connected over the network.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions Bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Oct 31, 2024
@ofborg ofborg Bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Nov 1, 2024
@Birdy2014

Copy link
Copy Markdown
Contributor Author

@nathan-gs

Comment thread nixos/modules/services/home-automation/ebusd.nix Outdated
@Birdy2014

Copy link
Copy Markdown
Contributor Author

This should also be backported to 24.11. Do I need to do anything for that?

@FliegendeWurst

Copy link
Copy Markdown
Member

This should also be backported to 24.11. Do I need to do anything for that?

I added the label, it will be backported once merged. (You can add labels on your own if you add yourself to the maintainer list.)

@wegank wegank added 12.approvals: 1 This PR was reviewed and approved by one person. 2.status: merge conflict This PR has merge conflicts with the target branch labels Dec 8, 2024
@wegank wegank removed the 12.approvals: 1 This PR was reviewed and approved by one person. label Dec 10, 2024
@FliegendeWurst

Copy link
Copy Markdown
Member

Please fix the merge conflict. For some reason the file was reformatted as part of #322537 even though it was updated in this recent PR.

@FliegendeWurst

Copy link
Copy Markdown
Member

I think you dropped the PrivateDevices change accidentally.

@FliegendeWurst FliegendeWurst merged commit bfd7154 into NixOS:master Dec 11, 2024
@nixpkgs-ci

This comment was marked as resolved.

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

Labels

2.status: merge conflict This PR has merge conflicts with the target branch 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants