Skip to content

logrotate: wtmp and btmp configurations missing due to upstream changes (spec file mismatch) #1635

@akiemon113

Description

@akiemon113

Describe the bug

The logrotate package in Photon OS is missing the configurations for both /etc/logrotate.d/wtmp and /etc/logrotate.d/btmp.
Historically, these configurations were included in the main logrotate.conf, but upstream logrotate moved them to separate files.
logrotate/logrotate@75da4ec

As a result, neither wtmp nor btmp are currently being rotated, which may cause these log files to grow indefinitely.

Reproduction steps

  1. Install logrotate: tdnf install logrotate
  2. Check for config files:
    ls /etc/logrotate.d/wtmp (File not found)
    ls /etc/logrotate.d/btmp (File not found)
  3. Check main config:
    grep -E "wtmp|btmp" /etc/logrotate.conf (Entries not found)

Expected behavior

The package should install examples/wtmp and examples/btmp into /etc/logrotate.d/wtmp and /etc/logrotate.d/btmp, respectively.

Additional context

The upstream logrotate project removed the wtmp and btmp sections from the default config and moved them to examples/wtmp and examples/btmp in this commit:
logrotate/logrotate@75da4ec

However, the current Photon OS spec file does not reflect this change and misses the new example files.

Could you please consider adding the following lines to the %install section of logrotate.spec?

install -p -m 644 examples/btmp %{buildroot}%{_sysconfdir}/logrotate.d/btmp
install -p -m 644 examples/wtmp %{buildroot}%{_sysconfdir}/logrotate.d/wtmp

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions