All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gen_initramfs.sh: use 'date -u' to get Timestamp
@ 2025-10-13 10:19 Gang Yan
  2025-10-13 10:28 ` Matthieu Baerts
  2025-10-13 11:50 ` MPTCP CI
  0 siblings, 2 replies; 8+ messages in thread
From: Gang Yan @ 2025-10-13 10:19 UTC (permalink / raw)
  To: mptcp; +Cc: Gang Yan, Geliang Tang

There exists a compilation error in the latest version of
mptcp-upstream-virtme-docker:latest:
'''
	ERROR: Timestamp out of range for cpio format
	make[4]: *** [<KERNEL_SRC>/usr/Makefile:76:
'''

The reason is the output of 'date -d0' is 'Sat Jan 1 00:00:00 UTC 0000'.
After using 'date -u', the output is correct.

Reported-by: Geliang Tang <geliang@kernel.org>
Signed-off-by: Gang Yan <yangang@kylinos.cn>
---
 usr/gen_initramfs.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usr/gen_initramfs.sh b/usr/gen_initramfs.sh
index 7eba2fddf0ef..8eb43f76d521 100755
--- a/usr/gen_initramfs.sh
+++ b/usr/gen_initramfs.sh
@@ -222,7 +222,7 @@ while [ $# -gt 0 ]; do
 			shift
 			;;
 		"-d")	# date for file mtimes
-			timestamp="$(date -d"$1" +%s || :)"
+			timestamp="$(date -u +%s || :)"
 			if test -n "$timestamp"; then
 				timestamp="-t $timestamp"
 			fi
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-10-15  2:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-13 10:19 [PATCH] gen_initramfs.sh: use 'date -u' to get Timestamp Gang Yan
2025-10-13 10:28 ` Matthieu Baerts
2025-10-13 13:22   ` GangYan
2025-10-14  9:44     ` Matthieu Baerts
2025-10-15  2:36       ` GangYan
2025-10-14  1:24   ` GangYan
2025-10-13 11:50 ` MPTCP CI
2025-10-13 12:23   ` Matthieu Baerts

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.