Use unsigned integers for buildtime too for Y2K38 safety
Resolves: RHEL-22602
This commit is contained in:
parent
f3557c42a9
commit
590afced8b
@ -0,0 +1,32 @@
|
|||||||
|
From 97aa64d8281974fb369c66d5aef8650515b89c52 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Panu Matilainen <pmatilai@redhat.com>
|
||||||
|
Date: Wed, 24 Jan 2024 12:03:39 +0200
|
||||||
|
Subject: [PATCH] Use unsigned integers for buildtime too for Y2K38 safety
|
||||||
|
|
||||||
|
This little patch buys us 68 extra years to move to 64bit time tags
|
||||||
|
in rpm. That seems achievable.
|
||||||
|
|
||||||
|
Fixes: #1228
|
||||||
|
---
|
||||||
|
build/build.c | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/build/build.c b/build/build.c
|
||||||
|
index e4081c673..0ac8bf6c9 100644
|
||||||
|
--- a/build/build.c
|
||||||
|
+++ b/build/build.c
|
||||||
|
@@ -36,9 +36,9 @@ static rpm_time_t getBuildTime(void)
|
||||||
|
if (srcdate == endptr || *endptr || errno != 0)
|
||||||
|
rpmlog(RPMLOG_ERR, _("unable to parse SOURCE_DATE_EPOCH\n"));
|
||||||
|
else
|
||||||
|
- buildTime = (int32_t) epoch;
|
||||||
|
+ buildTime = (uint32_t) epoch;
|
||||||
|
} else
|
||||||
|
- buildTime = (int32_t) time(NULL);
|
||||||
|
+ buildTime = (uint32_t) time(NULL);
|
||||||
|
|
||||||
|
return buildTime;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.45.1
|
||||||
|
|
2
rpm.spec
2
rpm.spec
@ -109,6 +109,7 @@ Patch140: 0001-Fix-short-circuiting-of-version-strings-in-expressio.patch
|
|||||||
Patch141: 0001-Fix-a-copy-paste-help-description-of-whatconflicts-R.patch
|
Patch141: 0001-Fix-a-copy-paste-help-description-of-whatconflicts-R.patch
|
||||||
Patch142: 0001-Expose-and-document-rpmdb-verifydb-operation.patch
|
Patch142: 0001-Expose-and-document-rpmdb-verifydb-operation.patch
|
||||||
Patch143: 0001-Don-t-segfault-on-missing-priority-tag.patch
|
Patch143: 0001-Don-t-segfault-on-missing-priority-tag.patch
|
||||||
|
Patch144: 0001-Use-unsigned-integers-for-buildtime-too-for-Y2K38-sa.patch
|
||||||
|
|
||||||
# These are not yet upstream
|
# These are not yet upstream
|
||||||
Patch906: rpm-4.7.1-geode-i686.patch
|
Patch906: rpm-4.7.1-geode-i686.patch
|
||||||
@ -660,6 +661,7 @@ fi
|
|||||||
%changelog
|
%changelog
|
||||||
* Mon Jun 03 2024 Michal Domonkos <mdomonko@redhat.com> - 4.16.1.3-30
|
* Mon Jun 03 2024 Michal Domonkos <mdomonko@redhat.com> - 4.16.1.3-30
|
||||||
- Don't segfault on missing priority tag (RHEL-35249)
|
- Don't segfault on missing priority tag (RHEL-35249)
|
||||||
|
- Use unsigned integers for buildtime too for Y2K38 safety (RHEL-22602)
|
||||||
|
|
||||||
* Wed Dec 13 2023 Florian Festi <ffesti@redhat.com> - 4.16.1.3-29
|
* Wed Dec 13 2023 Florian Festi <ffesti@redhat.com> - 4.16.1.3-29
|
||||||
- Actually add --verifydb to the man page (RHEL-14591)
|
- Actually add --verifydb to the man page (RHEL-14591)
|
||||||
|
Loading…
Reference in New Issue
Block a user