logrotate: wtmp and btmp configurations missing due to upstream changes (spec file mismatch)
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 3.2k
- Forks
- 692
- PR merge metrics
- No merged PRs in 30d
Description
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.
https://github.com/logrotate/logrotate/commit/75da4ecf16f1f58ad750c9746d72f81e7b7efdea
As a result, neither wtmp nor btmp are currently being rotated, which may cause these log files to grow indefinitely.
Reproduction steps
- Install logrotate:
tdnf install logrotate - Check for config files:
ls /etc/logrotate.d/wtmp(File not found)
ls /etc/logrotate.d/btmp(File not found) - 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:
https://github.com/logrotate/logrotate/commit/75da4ecf16f1f58ad750c9746d72f81e7b7efdea
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in logrotate.spec, specifically its %install section, and compare the package contents with upstream examples/wtmp and examples/btmp. Verify the installed package using the issue's tdnf, ls, and grep reproduction steps; done means both files are present under /etc/logrotate.d and the configurations are included.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux
- Domain
- build-system, operating-systems
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100