diff mbox

[bug#71993,core-updates,0/2] Don't use libfaketime for key package tests on 32bit systems

Message ID 87wmlf5zfb.fsf@iscas.ac.cn
State New
Headers show

Commit Message

Z572 July 21, 2024, 1:03 a.m. UTC
Christopher Baines <mail@cbaines.net> writes:

> As it fails to build and seems broken.
>
>
> Christopher Baines (2):
>   gnu: nss: Don't use libfaketime on 32bit systems.
>   gnu: python-pyopenssl: Don't use libfaketime on 32bit systems.
>
>  gnu/packages/nss.scm           | 15 +++++++++++++--
>  gnu/packages/python-crypto.scm | 10 ++++++++--
>  2 files changed, 21 insertions(+), 4 deletions(-)

libfaketime is actually good, it just fails the test because coreutils
uses 64bit time_t.
gnulib will enable 64bit time_t on 32bit platforms, but we don't
currently support this, mixed abi will cause many problems[1], so turning
off 64bit time_t on coreutils can fix libfaketime's tests, and nss can
also use libfaketime because they use same time_t.

And libfaketime is not provided 64-bit time_t support on 32-bit archs,
see https://github.com/wolfcw/libfaketime/issues/418

We need to open a new branch to migrate time64 later

And see also

https://wiki.gentoo.org/wiki/Project:Toolchain/time64_migration
https://wiki.debian.org/ReleaseGoals/64bit-time

[1] https://bugs.gentoo.org/828001
diff mbox

Patch

From 273c1c1189d824b86ae531bd1b5df601f0e7e838 Mon Sep 17 00:00:00 2001
Message-ID: <273c1c1189d824b86ae531bd1b5df601f0e7e838.1721522810.git.zhengjunjie@iscas.ac.cn>
In-Reply-To: <5cbb346385201fb6fce1057a13a49c7977e9dd34.1721522810.git.zhengjunjie@iscas.ac.cn>
References: <5cbb346385201fb6fce1057a13a49c7977e9dd34.1721522810.git.zhengjunjie@iscas.ac.cn>
From: Zheng Junjie <zhengjunjie@iscas.ac.cn>
Date: Sun, 21 Jul 2024 08:36:28 +0800
Subject: [PATCH 2/2] gnu: coreutils: Disable 64bit time_t on 32bit platform.

* gnu/packages/nss.scm (nss)[arguments]<#:configure-flags>: Pass
gl_cv_type_time_t_bits_macro=no on 32bit platform.

Change-Id: I3ba9e21733727a41f2070a27ccba39c9d5f2d406
---
 gnu/packages/base.scm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index bc30d73426..47488c1603 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -471,6 +471,13 @@  (define-public coreutils
                                    " test-renameatu"
                                    " test-utimensat")))
             '())
+      ,@(if (target-64bit?)
+            '()
+            ;; We currently do not support 64-bit time_t on 32-bit platforms,
+            ;; mixing different bits of time_t will cause a lot of problems
+            ;; so forcibly disable it.
+            ;; see https://wiki.gentoo.org/wiki/Project:Toolchain/time64_migration
+            '(#:configure-flags (list "gl_cv_type_time_t_bits_macro=no")))
       #:phases (modify-phases %standard-phases
                  (add-before 'build 'patch-shell-references
                    (lambda _
-- 
2.45.2