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

vector: include the "unix" cargo feature if targetPlatform isUnix #104179

Merged
merged 1 commit into from Nov 19, 2020

Conversation

johanot
Copy link
Contributor

@johanot johanot commented Nov 18, 2020

Motivation for this change

Fixes the issue that @happysalada is facing here: #103393 (comment)

The journald source is apparently guarded by the "unix" cargo feature flag:
https://github.com/timberio/vector/blob/v0.10.0/src/sources/mod.rs#L14-L15

Don't know why the Vector folks made the choice that unix is a "feature". There might be a good reason why it's not just: #[cfg(unix)], but never mind. Including "unix" in the default features when targetPlatform is unix should be sufficient for nixpkgs.

cc @thoughtpolice

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)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@Hoverbear
Copy link
Member

Ah-ha! Of course. This is 0.10. We redid our release process for 0.11. https://github.com/timberio/vector/blob/a46a2e488d353eff2b476fd9984304cbe2f67424/src/sources/mod.rs#L14-L15

So yes, for 0.10 you'll need unix here to get the journald source. For 0.11 you can remove this feature.

@johanot
Copy link
Contributor Author

johanot commented Nov 18, 2020

For 0.11 you can remove this feature.

@Hoverbear Right. :) I've made an alternative suggestion for a tempfix here: d1f1a88c469dec7e89d7e92ae6c9db52a2a77e41. I'll let the reviewer decide which is best. With fetchpatch, we won't forget to cleanup, since the patch will fail when already applied.

edit: removed from the branch because, it doesn't seem to work. Let's stick with the temporary unix feature flag, unless someone else wants to investigate why my fetchpatch attempt doesn't work.

@happysalada
Copy link
Contributor

@johanot @Hoverbear Amazing!
If you are not too busy with life, consider adding yourself as a maintainer of this package :-).

@thoughtpolice thoughtpolice merged commit fe3f3d7 into NixOS:master Nov 19, 2020
@thoughtpolice
Copy link
Member

Thanks everyone!

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

4 participants