vmware / vmware/photon

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

Open
#1,635 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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
  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:
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.