* [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
* Re: [PATCH] gen_initramfs.sh: use 'date -u' to get Timestamp
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 1:24 ` GangYan
2025-10-13 11:50 ` MPTCP CI
1 sibling, 2 replies; 8+ messages in thread
From: Matthieu Baerts @ 2025-10-13 10:28 UTC (permalink / raw)
To: Gang Yan; +Cc: Geliang Tang, mptcp
Hi Gang,
On 13/10/2025 12:19, Gang Yan wrote:
> 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.
Thank you for having looked at this. I already sent a fix in
mptcp-upstream-virtme-docker:
https://github.com/multipath-tcp/mptcp-upstream-virtme-docker/commit/52aa674
The issue is in fact in Rust CoreUtils:
https://github.com/uutils/coreutils/issues/8898
Then, I don't think we need to modify the kernel source. Here are a few
workarounds:
- Use date's GNU version: ln -sf gnudate /usr/bin/date
- Do not generate the initramfs if not needed: -d CONFIG_BLK_DEV_INITRD
- Set KBUILD_BUILD_TIMESTAMP to "-1"
WDYT?
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] gen_initramfs.sh: use 'date -u' to get Timestamp
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 11:50 ` MPTCP CI
2025-10-13 12:23 ` Matthieu Baerts
1 sibling, 1 reply; 8+ messages in thread
From: MPTCP CI @ 2025-10-13 11:50 UTC (permalink / raw)
To: Gang Yan; +Cc: mptcp
Hi Gang,
Thank you for your modifications, that's great!
Our CI did some validations and here is its report:
- KVM Validation: normal (except selftest_mptcp_join): Unstable: 2 failed test(s): packetdrill_fastclose selftest_simult_flows 🔴
- KVM Validation: normal (only selftest_mptcp_join): Success! ✅
- KVM Validation: debug (except selftest_mptcp_join): Success! ✅
- KVM Validation: debug (only selftest_mptcp_join): Success! ✅
- KVM Validation: btf-normal (only bpftest_all): Script error! ❓
- KVM Validation: btf-debug (only bpftest_all): Script error! ❓
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/18463151285
Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/ca9d5aad6b72
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=1010664
If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:
$ cd [kernel source code]
$ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
--pull always mptcp/mptcp-upstream-virtme-docker:latest \
auto-normal
For more details:
https://github.com/multipath-tcp/mptcp-upstream-virtme-docker
Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)
Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] gen_initramfs.sh: use 'date -u' to get Timestamp
2025-10-13 11:50 ` MPTCP CI
@ 2025-10-13 12:23 ` Matthieu Baerts
0 siblings, 0 replies; 8+ messages in thread
From: Matthieu Baerts @ 2025-10-13 12:23 UTC (permalink / raw)
To: mptcp; +Cc: Gang Yan
Hi Gang,
13 Oct 2025 13:50:42 MPTCP CI <wpasupplicant.patchew@gmail.com>:
> Hi Gang,
>
> Thank you for your modifications, that's great!
>
> Our CI did some validations and here is its report:
>
> - KVM Validation: normal (except selftest_mptcp_join): Unstable: 2 failed test(s): packetdrill_fastclose selftest_simult_flows 🔴
> - KVM Validation: normal (only selftest_mptcp_join): Success! ✅
> - KVM Validation: debug (except selftest_mptcp_join): Success! ✅
> - KVM Validation: debug (only selftest_mptcp_join): Success! ✅
> - KVM Validation: btf-normal (only bpftest_all): Script error! ❓
> - KVM Validation: btf-debug (only bpftest_all): Script error! ❓
FYI, this issue has also been fixed in our tree, but just after you sent
your patch:
https://git.kernel.org/bpf/bpf/c/de7342228b73
Cheers,
Matt
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] gen_initramfs.sh: use 'date -u' to get Timestamp
2025-10-13 10:28 ` Matthieu Baerts
@ 2025-10-13 13:22 ` GangYan
2025-10-14 9:44 ` Matthieu Baerts
2025-10-14 1:24 ` GangYan
1 sibling, 1 reply; 8+ messages in thread
From: GangYan @ 2025-10-13 13:22 UTC (permalink / raw)
To: Matthieu Baerts; +Cc: Gang Yan, Geliang Tang, mptcp
On Mon, Oct 13, 2025 at 12:28:08PM +0200, Matthieu Baerts wrote:
> Hi Gang,
>
> On 13/10/2025 12:19, Gang Yan wrote:
> > 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.
>
> Thank you for having looked at this. I already sent a fix in
> mptcp-upstream-virtme-docker:
>
>
> https://github.com/multipath-tcp/mptcp-upstream-virtme-docker/commit/52aa674
>
> The issue is in fact in Rust CoreUtils:
>
> https://github.com/uutils/coreutils/issues/8898
>
Thanks for this information.
>
> Then, I don't think we need to modify the kernel source. Here are a few
> workarounds:
Sure!
>
> - Use date's GNU version: ln -sf gnudate /usr/bin/date
>
> - Do not generate the initramfs if not needed: -d CONFIG_BLK_DEV_INITRD
>
> - Set KBUILD_BUILD_TIMESTAMP to "-1"
>
> WDYT?
Still, I have another question: Is the compilation error too strict when
failing to retrieve the date? Would throwing a simple error be enough by
default? Or would it be better to provide a default value when the date
cannot be obtained, ensuring the compilation can be completed?
WDYT? It's just a normal discussion.
Thanks,
Gang
>
> Cheers,
> Matt
> --
> Sponsored by the NGI0 Core fund.
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] gen_initramfs.sh: use 'date -u' to get Timestamp
2025-10-13 10:28 ` Matthieu Baerts
2025-10-13 13:22 ` GangYan
@ 2025-10-14 1:24 ` GangYan
1 sibling, 0 replies; 8+ messages in thread
From: GangYan @ 2025-10-14 1:24 UTC (permalink / raw)
To: Matthieu Baerts; +Cc: Gang Yan, Geliang Tang, mptcp
> On Mon, Oct 13, 2025 at 12:28:08PM +0200, Matthieu Baerts wrote:
> Hi Gang,
>
> On 13/10/2025 12:19, Gang Yan wrote:
> > 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.
>
> Thank you for having looked at this. I already sent a fix in
> mptcp-upstream-virtme-docker:
>
>
> https://github.com/multipath-tcp/mptcp-upstream-virtme-docker/commit/52aa674
>
This fix works well in my enviroment.
Thanks,
Gang
> The issue is in fact in Rust CoreUtils:
>
> https://github.com/uutils/coreutils/issues/8898
>
>
> Then, I don't think we need to modify the kernel source. Here are a few
> workarounds:
>
> - Use date's GNU version: ln -sf gnudate /usr/bin/date
>
> - Do not generate the initramfs if not needed: -d CONFIG_BLK_DEV_INITRD
>
> - Set KBUILD_BUILD_TIMESTAMP to "-1"
>
> WDYT?
>
> Cheers,
> Matt
> --
> Sponsored by the NGI0 Core fund.
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] gen_initramfs.sh: use 'date -u' to get Timestamp
2025-10-13 13:22 ` GangYan
@ 2025-10-14 9:44 ` Matthieu Baerts
2025-10-15 2:36 ` GangYan
0 siblings, 1 reply; 8+ messages in thread
From: Matthieu Baerts @ 2025-10-14 9:44 UTC (permalink / raw)
To: GangYan; +Cc: Gang Yan, Geliang Tang, mptcp
Hi Gang,
On 13/10/2025 15:22, GangYan wrote:
> Still, I have another question: Is the compilation error too strict when
> failing to retrieve the date? Would throwing a simple error be enough by
> default? Or would it be better to provide a default value when the date
> cannot be obtained, ensuring the compilation can be completed?
Maybe, I don't know. This gen_initramfs.sh already checks that 'date'
returned something, and if not, it doesn't try to set the option. Maybe
an extra check could be added to make sure the timestamp is positive?
if test -n "$timestamp" && test "$timestamp" -ge 0; then
But because it is not linked to MPTCP, do you mind checking this with
the maintainers of this file, please?
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] gen_initramfs.sh: use 'date -u' to get Timestamp
2025-10-14 9:44 ` Matthieu Baerts
@ 2025-10-15 2:36 ` GangYan
0 siblings, 0 replies; 8+ messages in thread
From: GangYan @ 2025-10-15 2:36 UTC (permalink / raw)
To: Matthieu Baerts; +Cc: Gang Yan, Geliang Tang, mptcp
> On Tue, Oct 14, 2025 at 11:44:45AM +0200, Matthieu Baerts wrote:
> Hi Gang,
>
> On 13/10/2025 15:22, GangYan wrote:
> > Still, I have another question: Is the compilation error too strict when
> > failing to retrieve the date? Would throwing a simple error be enough by
> > default? Or would it be better to provide a default value when the date
> > cannot be obtained, ensuring the compilation can be completed?
>
> Maybe, I don't know. This gen_initramfs.sh already checks that 'date'
> returned something, and if not, it doesn't try to set the option. Maybe
> an extra check could be added to make sure the timestamp is positive?
>
> if test -n "$timestamp" && test "$timestamp" -ge 0; then
>
> But because it is not linked to MPTCP, do you mind checking this with
> the maintainers of this file, please?
Already sent the email[1], please check.
Thanks,
Gang
>
> Cheers,
> Matt
> --
> Sponsored by the NGI0 Core fund.
>
^ permalink raw reply [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.