Bug 2225684 - dracut creates initramfs with incorrect timestamps
Summary: dracut creates initramfs with incorrect timestamps
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: dracut
Version: CentOS Stream
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: dracut-maint-list
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-25 16:46 UTC by Andrew Schorr
Modified: 2023-07-25 16:48 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: ---
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-163431 0 None None None 2023-07-25 16:48:02 UTC

Description Andrew Schorr 2023-07-25 16:46:49 UTC
Description of problem:
I have noticed on several occasions that the initramfs file created by dracut does not have correct timestamps. It somehow seems to preserve the timestamp from the previous version of the file. I don't think I am hallucinating.

Version-Release number of selected component (if applicable):
dracut-057-22.git20230530.el9.x86_64


How reproducible:
Always?

Steps to Reproduce:
1. Modify a file included in the initramfs
2. Run 'dracut -f'
3. run 'lsinitrd' and look at the listing for that file.

Actual results:
For example, I modified /etc/sysctl.conf. Prior to editing, here is what I saw:
lsinitrd | grep sysctl
-r--r--r--   1 root     root         1223 May 31 10:29 etc/sysctl.conf
...
Then I edited /etc/sysctl.conf. In the filesystem, I see:
-r--r--r-- 1 root root 1230 Jul 25 12:16 /etc/sysctl.conf
Then I ran 'dracut -f'. When I then ran 'lsinitrd | grep sysctl', I saw this:
-r--r--r--   1 root     root         1230 May 31 10:29 etc/sysctl.conf
Notice that the length of the file has changed, but it somehow preserves
the old timestamp. It is confounding.

Expected results:
The timestamps should update.

Additional info:
I have observed the same behavior with kernel modules created by dkms.


Note You need to log in before you can comment on or make changes to this bug.