unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Zheng Junjie <zhengjunjie@iscas.ac.cn>
To: Christopher Baines <mail@cbaines.net>
Cc: 71993@debbugs.gnu.org
Subject: [bug#71993] [PATCH core-updates 0/2] Don't use libfaketime for key package tests on 32bit systems
Date: Sun, 21 Jul 2024 09:03:36 +0800	[thread overview]
Message-ID: <87wmlf5zfb.fsf@iscas.ac.cn> (raw)
In-Reply-To: <87bk389sop.fsf@cbaines.net> (Christopher Baines's message of "Mon, 08 Jul 2024 10:47:02 +0200")


[-- Attachment #1.1: Type: text/plain, Size: 1094 bytes --]

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


[-- Attachment #1.2: 0001-Revert-gnu-libfaketime-Support-compilation-with-glib.patch --]
[-- Type: text/x-patch, Size: 3906 bytes --]

From 5cbb346385201fb6fce1057a13a49c7977e9dd34 Mon Sep 17 00:00:00 2001
Message-ID: <5cbb346385201fb6fce1057a13a49c7977e9dd34.1721522810.git.zhengjunjie@iscas.ac.cn>
From: Zheng Junjie <zhengjunjie@iscas.ac.cn>
Date: Sat, 20 Jul 2024 22:35:27 +0800
Subject: [PATCH 1/2] Revert "gnu: libfaketime: Support compilation with glibc
 2.39 on i686-linux."

This reverts commit 127f1842fb037cc5acfc5406e373ccd723127732.
---
 gnu/packages/check.scm | 38 +++-----------------------------------
 1 file changed, 3 insertions(+), 35 deletions(-)

diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 70f828b2a1..0ec375069e 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -26,7 +26,7 @@
 ;;; Copyright © 2017 Nikita <nikita@n0.is>
 ;;; Copyright © 2015, 2017, 2018, 2020, 2021, 2023, 2024 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016-2022 Marius Bakke <marius@gnu.org>
-;;; Copyright © 2017-2018, 2020-2021, 2024 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2017, 2018, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
 ;;; Copyright © 2019, 2021 Pierre Langlois <pierre.langlois@gmx.com>
 ;;; Copyright © 2019 Chris Marusich <cmmarusich@gmail.com>
@@ -3478,32 +3478,6 @@ (define-public libfaketime
               (substitute* "src/faketime.c"
                 (("\"date\"")
                  (format #f "~s" (search-input-file inputs "bin/date"))))))
-
-          #$@(if (target-64bit?)
-                 #~()
-                 #~((add-after 'unpack 'switch-libc-call
-                      (lambda _
-                        (substitute* "src/libfaketime.c"
-                          (("#define _GNU_SOURCE")
-                           ;; Make sure to use the 64-bit 'struct timespec' in
-                           ;; replacement functions.
-                           (string-append "#define _GNU_SOURCE\n"
-                                          "#define _FILE_OFFSET_BITS 64\n"
-                                          "#define _TIME_BITS 64\n"))
-                          (("\"__clock_gettime\"")
-                           ;; Replace '__clock_gettime64' rather than
-                           ;; '__clock_gettime64' since this is what
-                           ;; newly-built applications use.
-                           "\"__clock_gettime64\""))
-
-                        ;; XXX: Turn off 'pthread_cond_timedwait' etc.: tests
-                        ;; related to this are failing and this feature is
-                        ;; probably not useful for the purposes of running
-                        ;; code at a fixed date.
-                        (substitute* "src/Makefile"
-                          (("-DFAKE_PTHREAD")
-                           ""))))))
-
           (replace 'configure
             (lambda* (#:key outputs #:allow-other-keys)
               (setenv "CC" #$(cc-for-target))
@@ -3522,14 +3496,8 @@ (define-public libfaketime
           (add-before 'check 'pre-check
             (lambda _
               (substitute* "test/functests/test_exclude_mono.sh"
-                (("/bin/bash") (which "bash")))
-              #$@(if (target-64bit?)
-                     #~()
-                     ;; XXX: This test uses Perl to call 'clock_gettime' and
-                     ;; fails for unclear reasons on i686-linux.
-                     #~((delete-file
-                         "test/functests/test_exclude_mono.sh"))))))))
-    (native-inputs (list perl))                   ;for tests
+                (("/bin/bash") (which "bash"))))))))
+    (native-inputs (list perl))         ;for tests
     (inputs (list coreutils-minimal))
     (synopsis "Fake the system time for single applications")
     (description

base-commit: 3f15785c71eb82832ac0520c762a18a51861a141
-- 
2.45.2


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.3: 0002-gnu-coreutils-Disable-64bit-time_t-on-32bit-platform.patch --]
[-- Type: text/x-patch, Size: 1674 bytes --]

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


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

      parent reply	other threads:[~2024-07-21  1:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-08  8:47 [bug#71993] [PATCH core-updates 0/2] Don't use libfaketime for key package tests on 32bit systems Christopher Baines
2024-07-08  9:03 ` [bug#71993] [PATCH core-updates 1/2] gnu: nss: Don't use libfaketime " Christopher Baines
2024-07-08  9:03   ` [bug#71993] [PATCH core-updates 2/2] gnu: python-pyopenssl: " Christopher Baines
2024-07-08 12:26 ` [bug#71993] [PATCH core-updates 0/2] Don't use libfaketime for key package tests " Ludovic Courtès
2024-07-08 12:54   ` [bug#71993] [PATCH v3] gnu: libfaketime: Support compilation with glibc 2.39 on i686-linux Ludovic Courtès
2024-07-09  8:50 ` [bug#71993] retitle Christopher Baines
2024-07-21  1:03 ` Zheng Junjie [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wmlf5zfb.fsf@iscas.ac.cn \
    --to=zhengjunjie@iscas.ac.cn \
    --cc=71993@debbugs.gnu.org \
    --cc=mail@cbaines.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).