tar/tar-1.28-atime-rofs.patch

35 lines
994 B
Diff
Raw Normal View History

From c4d06365aef1539853e1dd41c539173809760cd0 Mon Sep 17 00:00:00 2001
From: Lukas Javorsky <ljavorsk@redhat.com>
Date: Tue, 18 Jul 2023 12:27:38 +0000
Subject: [PATCH 4/9] utime & read-only FS
Ignore errors from setting utime() for source file on read-only
file-system.
Resolves: #500742
Upstream bugreport (still downstream):
http://lists.gnu.org/archive/html/bug-tar/2009-06/msg00016.html
---
src/create.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/create.c b/src/create.c
index d20178c..b31fbe5 100644
--- a/src/create.c
+++ b/src/create.c
@@ -1851,7 +1851,8 @@ dump_file0 (struct tar_stat_info *st, char const *name, char const *p)
}
else if (atime_preserve_option == replace_atime_preserve
&& timespec_cmp (st->atime, get_stat_atime (&st2)) != 0
- && set_file_atime (fd, parentfd, name, st->atime) != 0)
+ && set_file_atime (fd, parentfd, name, st->atime) != 0
+ && errno != EROFS )
utime_error (p);
}
--
2.41.0