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

sysklogd: fix building against musl #109894

Merged
merged 2 commits into from Jan 20, 2021
Merged

Conversation

pjjw
Copy link
Contributor

@pjjw pjjw commented Jan 19, 2021

taking guidance from alpine linux's patch, removed a few ifdefs and
fixed up some includes.

Fixes #109892.

Motivation for this change

currently, sysklogd won't build with musl-libc, due to some directives narrowly targeting glibc. with this patch, it builds and runs.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • 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.

taking guidance from alpine linux's patch[1], removed a few ifdefs and
fixed up some includes.

[1]: https://git.alpinelinux.org/aports/tree/main/sysklogd/fix-includes.patch
@@ -0,0 +1,118 @@
diff -u sysklogd-1.5.1.orig/klogd.c sysklogd-1.5.1/klogd.c
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please describe that the patch is required for musl build only.
Otherwise, someone could try to build without it (on glibc) and remove it on next update, thinking it is not required anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a comment at the top of the patch file as well as changed its name, PTAL

yeah breaking things for musl seems like it might be unavoidable without some kind of testing, but don't know nix enough yet to have any suggestions (other than tracking some packages in my own hydra)

@pjjw
Copy link
Contributor Author

pjjw commented Jan 20, 2021

updated, PTAL
@GrahamcOfBorg build sysklogd
@GrahamcOfBorg build pkgsMusl.sysklogd

@symphorien symphorien merged commit 0adfe8c into NixOS:master Jan 20, 2021
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.

sysklogd doesn't build against musl-libc
2 participants