[PATCH 2/3] debuginfod: Don't touch access time of new files

2023-03-23 Thread Jan Alexander Steffens (heftig) via Elfutils-devel
Instead of copying the mtime, which might be far in the past, don't touch the access time. This will prevent cache cleaning from considering the file as old immediately. Signed-off-by: Jan Alexander Steffens (heftig) --- debuginfod/debuginfod-client.c | 16 +--- debuginfod/debuginfod

[PATCH 3/3] debuginfod: When retrieving files from cache, update atime manually

2023-03-23 Thread Jan Alexander Steffens (heftig) via Elfutils-devel
The cache cleaning logic requires atime to be correct (strictatime) but most users on Linux only have relatime or even noatime. Attempt to update the atime manually so that the cache works properly. Signed-off-by: Jan Alexander Steffens (heftig) --- debuginfod/debuginfod-client.c | 15 +

[PATCH 1/3] debuginfod: Replace futimes with futimens

2023-03-23 Thread Jan Alexander Steffens (heftig) via Elfutils-devel
Similar to what 8c4aa0ef998191ed828a37190dc179b91649938a did for ar and strip, replace the non-standard futimes with the POSIX futimens. Signed-off-by: Jan Alexander Steffens (heftig) --- debuginfod/debuginfod-client.c | 6 +++--- debuginfod/debuginfod.cxx | 13 ++--- 2 files chang