[Bug 2052986] Re: faketime doesn't fake stat(1) or ls(1) timestamps after Ubuntu 20.10
Ubuntu Foundations Team Bug Bot
2052986 at bugs.launchpad.net
Tue Feb 13 20:17:01 UTC 2024
The attachment "faketime-add-statx.debdiff" seems to be a debdiff. The
ubuntu-sponsors team has been subscribed to the bug report so that they
can review and hopefully sponsor the debdiff. If the attachment isn't a
patch, please remove the "patch" flag from the attachment, remove the
"patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe
the team.
[This is an automated message performed by a Launchpad user owned by
~brian-murray, for any issue please contact him.]
** Tags added: patch
--
You received this bug notification because you are a member of Ubuntu
Sponsors, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/2052986
Title:
faketime doesn't fake stat(1) or ls(1) timestamps after Ubuntu 20.10
Status in faketime package in Ubuntu:
Fix Committed
Status in faketime package in Debian:
New
Bug description:
In all versions of Ubuntu including and after 20.10 (groovy)
(including 22.04, 23.10, and the current devel release noble), the
'faketime' package fails to correctly fake timestamps for core
commands like 'stat' and 'ls'. Instead, the on-disk timestamps are
returned:
# LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1 FAKETIME='1970-01-01 00:00:01' stat /
File: /
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 72h/114d Inode: 14475976 Links: 1
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2024-02-13 00:08:45.027068497 +0000
Modify: 2024-02-13 00:08:45.027068497 +0000
Change: 2024-02-13 00:09:55.450105641 +0000
Birth: 2024-02-13 00:08:45.027068497 +0000
In Ubuntu 20.04, or with faketime built from current git master, the
correct result is returned:
# LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1 FAKETIME='1970-01-01 00:00:01' stat /
File: /
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 72h/114d Inode: 14475976 Links: 1
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 1970-01-01 00:00:01.000000000 +0000
Modify: 1970-01-01 00:00:01.000000000 +0000
Change: 1970-01-01 00:00:01.000000000 +0000
Birth: -
This seems to be related to upstream bug
https://github.com/wolfcw/libfaketime/issues/417 which was fixed by PR
https://github.com/wolfcw/libfaketime/pull/434
Ubuntu directly followed Debian with this bug, it was introduced in
Debian's bullseye (11) release, with the same command working in
buster (10).
Unfortunately, faketime hasn't had a release since the fix for statx
was merged, so Debian hasn't noticed either.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/faketime/+bug/2052986/+subscriptions
More information about the Ubuntu-sponsors
mailing list