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

nixos/locate: Fix sshfs exclusion #104727

Merged
merged 3 commits into from Dec 11, 2020
Merged

Conversation

chkno
Copy link
Member

@chkno chkno commented Nov 24, 2020

Motivation for this change

locate should not index sshfs mounts. These are already intended to be excluded. Fix the mechanism so they're actually excluded.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

This makes merging less painful.

This is nixfmt's preferred format.
@chkno
Copy link
Member Author

chkno commented Nov 24, 2020

I felt bad not checking the "Tested via one or more NixOS test(s)" box, so I made a locate test and verified this sshfs change.

@SuperSandro2000 , who already reviewed this: Would you prefer that I bring the test into this PR, or create a separate PR for it?

@SuperSandro2000
Copy link
Member

SuperSandro2000 commented Nov 24, 2020

I think you can just add it to this PR. It fits topic wise and please don't feel bad. Having tests is nice and for some things a must have but I think I'm this case it is nice to have.

@chkno
Copy link
Member Author

chkno commented Nov 24, 2020

Ok. Now with tests!

@symphorien
Copy link
Member

@GrahamcOfBorg test locate

@symphorien
Copy link
Member

hmmm the test probably needs an entry in nixos/tests/all-tests.nix

The "fuse" and "sshfs" entries already present are not keeping this find
invocation out of sshfs mounts, which present as fstype "fuse.sshfs"
@chkno
Copy link
Member Author

chkno commented Dec 10, 2020

nixos/tests/all-tests.nix entry added.

@symphorien
Copy link
Member

@GrahamcOfBorg test locate

@symphorien symphorien merged commit a7b60e6 into NixOS:master Dec 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants