fluent-bit
fluent-bit copied to clipboard
build: Make systemd init systemd detection contingent on pkgconfig
Use pkg-config to get systemd.pc variables and systemdunitdir. Those variable ensure that .service files are installed in the correct paths and only when systemd is detected.
This addresses issues where systemd unit files are in /usr/lib and not in /lib like it was previously hardcoded. It also only installs service files on actual systemd systems.
Enter [N/A] in the box, if an item is not applicable to your change.
Testing Before we can approve your change; please submit the following in a comment:
- [ N/A ] Example configuration file for the change
- [ N/A ] Debug log output from testing the change
- [ N/A ] Attached Valgrind output that shows no leaks or memory corruption was found
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
- [ N/A ] Attached local packaging test output showing all targets (including any new ones) build.
Documentation
- [ N/A ] Documentation required for this feature
Backporting
- [ N/A ] Backport to latest stable release.
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.
@ptsneves this looks reasonable to me so appreciate the effort - can you clarify the failing targets as well if only so people can find it in a search?
You'll need to resolve the DCO check failure: https://github.com/fluent/fluent-bit/pull/5818/checks?check_run_id=7627187832
Essentially make sure your commit has the Signed-off-by: bit in it.
We may need to wait for @niedbalski to return from holiday to sign off and merge this I'm afraid so please be patient.
@niedbalski do you have time to have a look? I fixed the dco issue.
@patrick-stephens Can you clarify what you mean by failing targets? :)
@patrick-stephens Can you clarify what you mean by failing targets? :)
Yeah, so when would someone see this failure? On a specific target OS and/or configuration? Mostly so when someone gets the error message they get a search result from here.
@patrick-stephens Thanks for the clarification.
This patch is useful when Linux systems do not have systemd installed on /lib/systemd but instead in /usr/lib/systemd. Examples are CentOS or RHEL where systemd is installed in /usr/lib/systemd. In those targets the installation would not succeed.
In the embedded world the /lib vs /usr/lib is also a configurable parameter so it cannot be assumed to be /lib/systemd like it currently is, before this patch.
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.
@niedbalski can you have a look?
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.