Skip to content

Inconsistency in CMAKE_INSTALL_SYSCONFDIR #6619

@MindTooth

Description

@MindTooth

Bug Report

Describe the bug

The fluent-bit.service includes an extra forward slash (/) in the -c option for loading the configuration file.

# /usr/lib/systemd/system/fluent-bit.service
[Unit]
Description=Fluent Bit
Documentation=https://docs.fluentbit.io/manual/
Requires=network.target
After=network.target

[Service]
Type=simple
EnvironmentFile=-/etc/sysconfig/fluent-bit
EnvironmentFile=-/etc/default/fluent-bit
ExecStart=/opt/fluent-bit/bin/fluent-bit -c //etc/fluent-bit/fluent-bit.conf
Restart=always

[Install]
WantedBy=multi-user.target

I've tracked it down to #4392 for introducing the extra slash. It was the correct change. However, in various places, CMAKE_INSTALL_SYSCONFDIR is changed to /etc from the default etc (docs). Which in turn created a double slash.

Places where the extra / is added: Project Search. Mainly the double assignment lyes in the Dockerfiles which packages are created from.

I don't know what the best approach is. But I see no need for the Dockerfiles to override the default value if the systemd unit file has already set the correct path.

What are your thoughts?

To Reproduce

  • Install fluent-bit from the package repository.
  • systemctl cat fluent-bit.service.
  • See a / too much.

Expected behavior

I expect that the command for running fluent-bit do not include an extra / in the path of the confiruration.

- ExecStart=/opt/fluent-bit/bin/fluent-bit -c //etc/fluent-bit/fluent-bit.conf
+ ExecStart=/opt/fluent-bit/bin/fluent-bit -c /etc/fluent-bit/fluent-bit.conf

Screenshots

N/A.

Your Environment

  • Version used: v2.0.8
  • Configuration: N/A
  • Environment name and version (e.g. Kubernetes? What version?): N/A
  • Server type and version: Virtual Machine
  • Operating System and version: AlmaLinux 9.1
  • Filters and plugins: N/A

Additional context

N/A.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions