* [bug#71993] [PATCH core-updates 0/2] Don't use libfaketime for key package tests on 32bit systems @ 2024-07-08 8:47 Christopher Baines 2024-07-08 9:03 ` [bug#71993] [PATCH core-updates 1/2] gnu: nss: Don't use libfaketime " Christopher Baines ` (3 more replies) 0 siblings, 4 replies; 7+ messages in thread From: Christopher Baines @ 2024-07-08 8:47 UTC (permalink / raw) To: 71993 [-- Attachment #1: Type: text/plain, Size: 335 bytes --] 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(-) [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 987 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* [bug#71993] [PATCH core-updates 1/2] gnu: nss: Don't use libfaketime on 32bit systems. 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 ` 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 ` (2 subsequent siblings) 3 siblings, 1 reply; 7+ messages in thread From: Christopher Baines @ 2024-07-08 9:03 UTC (permalink / raw) To: 71993 As it fails to build and doesn't seem to work. * gnu/packages/nss.scm (nss)[arguments]: Only use faketime on 64bit systems. [native-inputs]: Only include libfaketime on 64bit systems. Change-Id: I78bc9b7b2010e5b77f6184ffb7c87740ceae241c --- gnu/packages/nss.scm | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/gnu/packages/nss.scm b/gnu/packages/nss.scm index 49276817ae..2162254760 100644 --- a/gnu/packages/nss.scm +++ b/gnu/packages/nss.scm @@ -215,7 +215,12 @@ (define-public nss ;; leading to test failures: ;; <https://bugzilla.mozilla.org/show_bug.cgi?id=609734>. To ;; work around that, set the time to roughly the release date. - (invoke "faketime" "2024-01-23" "./nss/tests/all.sh")) + (invoke #$@(if (target-64bit?) + '("faketime" "2024-01-23") + ;; libfaketime is currently broken on 32bit + ;; systems + '()) + "./nss/tests/all.sh")) (format #t "test suite not run~%")))) (replace 'install (lambda* (#:key outputs #:allow-other-keys) @@ -240,7 +245,13 @@ (define-public nss (copy-recursively (string-append obj "/lib") lib))))))) (inputs (list sqlite zlib)) (propagated-inputs (list nspr)) ;required by nss.pc. - (native-inputs (list perl libfaketime which)) ;for tests + (native-inputs + `(,perl + ,@(if (target-64bit?) + (list libfaketime) + ;; libfaketime is currently broken on 32bit systems + '()) + ,which)) ;for tests ;; The NSS test suite takes around 48 hours on Loongson 3A (MIPS) when ;; another build is happening concurrently on the same machine. base-commit: 75b4a29e12011ae3d1814932591e80dcb0b80aae -- 2.45.2 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#71993] [PATCH core-updates 2/2] gnu: python-pyopenssl: Don't use libfaketime on 32bit systems. 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 ` Christopher Baines 0 siblings, 0 replies; 7+ messages in thread From: Christopher Baines @ 2024-07-08 9:03 UTC (permalink / raw) To: 71993 Cc: Lars-Dominik Braun, Marius Bakke, Munyoki Kilyungi, Sharlatan Hellseher, Tanguy Le Carrour, jgart As it fails to build and doesn't seem to work. * gnu/packages/python-pyopenssl.scm (python-pyopenssl)[arguments]: Only use faketime on 64bit systems. [native-inputs]: Only include libfaketime on 64bit systems. Change-Id: I3a4ab85219ae71af17f43d864410fe2ac86ef214 --- gnu/packages/python-crypto.scm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm index 78f65ccf87..b001bb3e19 100644 --- a/gnu/packages/python-crypto.scm +++ b/gnu/packages/python-crypto.scm @@ -662,7 +662,10 @@ (define-public python-pyopenssl ;; PyOpenSSL runs tests against a certificate with a fixed ;; expiry time. To ensure successful builds in the future, ;; set the time to roughly the release date. - (invoke "faketime" "2023-03-25" "pytest" "-vv" "-k" + (invoke #$@(if (target-64bit?) + '("faketime" "2023-03-25") + '()) + "pytest" "-vv" "-k" (string-append ;; This test tries to look up certificates from ;; the compiled-in default path in OpenSSL, which @@ -676,7 +679,10 @@ (define-public python-pyopenssl "and not test_verify_with_time")))))))) (propagated-inputs (list python-cryptography)) (inputs (list openssl)) - (native-inputs (list libfaketime python-flaky python-pretend python-pytest)) + (native-inputs `(,@(if (target-64bit?) + (list libfaketime) + '()) + ,@(list python-flaky python-pretend python-pytest))) (home-page "https://github.com/pyca/pyopenssl") (synopsis "Python wrapper module around the OpenSSL library") (description "PyOpenSSL is a high-level wrapper around a subset of the -- 2.45.2 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#71993] [PATCH core-updates 0/2] Don't use libfaketime for key package tests on 32bit systems 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 12:26 ` 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 ` [bug#71993] [PATCH core-updates 0/2] Don't use libfaketime for key package tests on 32bit systems Zheng Junjie 3 siblings, 1 reply; 7+ messages in thread From: Ludovic Courtès @ 2024-07-08 12:26 UTC (permalink / raw) To: Christopher Baines; +Cc: 71993 [-- Attachment #1: Type: text/plain, Size: 409 bytes --] Hello! Christopher Baines <mail@cbaines.net> skribis: > gnu: nss: Don't use libfaketime on 32bit systems. > gnu: python-pyopenssl: Don't use libfaketime on 32bit systems. Here’s an alternate solution: getting closer to fixing libfaketime. After this patch, there are still issues with the ‘pthread_cond_timedwait’ tests that would probably need investigation or just plain skipping. [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: Type: text/x-patch, Size: 2248 bytes --] diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index bc341943f02..8714086be89 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -3477,6 +3477,24 @@ (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\"")))))) + (replace 'configure (lambda* (#:key outputs #:allow-other-keys) (setenv "CC" #$(cc-for-target)) @@ -3495,8 +3513,14 @@ (define-public libfaketime (add-before 'check 'pre-check (lambda _ (substitute* "test/functests/test_exclude_mono.sh" - (("/bin/bash") (which "bash")))))))) - (native-inputs (list perl)) ;for tests + (("/bin/bash") (which "bash"))) + #$@(if (target-64bit?) + #~() + ;; 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 (inputs (list coreutils-minimal)) (synopsis "Fake the system time for single applications") (description [-- Attachment #3: Type: text/plain, Size: 102 bytes --] Another option: use ‘datefudge’ rather than ‘libfaketime’ for those packages. Ludo’. ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#71993] [PATCH v3] gnu: libfaketime: Support compilation with glibc 2.39 on i686-linux. 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 ` Ludovic Courtès 0 siblings, 0 replies; 7+ messages in thread From: Ludovic Courtès @ 2024-07-08 12:54 UTC (permalink / raw) To: 71993; +Cc: Ludovic Courtès * gnu/packages/check.scm (libfaketime)[arguments]: Add ‘switch-libc-call’ phase when not ‘target-64bit?’. In ‘pre-check’ phase, delete ‘test_exclude_mono.sh’ on 32-bit platforms. Change-Id: Ia4c0d1d13cdfa6028f3e11c63e76122a99a84e4d --- gnu/packages/check.scm | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) This updated version of the patch works for me on i686-linux. diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index bc341943f02..ee23406c86f 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 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2017-2018, 2020-2021, 2024 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> @@ -3477,6 +3477,32 @@ (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)) @@ -3495,8 +3521,14 @@ (define-public libfaketime (add-before 'check 'pre-check (lambda _ (substitute* "test/functests/test_exclude_mono.sh" - (("/bin/bash") (which "bash")))))))) - (native-inputs (list perl)) ;for tests + (("/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 (inputs (list coreutils-minimal)) (synopsis "Fake the system time for single applications") (description base-commit: e4da066f0029ef38f6a791f6f9d4cfdb8b39b6a3 -- 2.45.2 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#71993] retitle 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 12:26 ` [bug#71993] [PATCH core-updates 0/2] Don't use libfaketime for key package tests " Ludovic Courtès @ 2024-07-09 8:50 ` Christopher Baines 2024-07-21 1:03 ` [bug#71993] [PATCH core-updates 0/2] Don't use libfaketime for key package tests on 32bit systems Zheng Junjie 3 siblings, 0 replies; 7+ messages in thread From: Christopher Baines @ 2024-07-09 8:50 UTC (permalink / raw) To: control, 71993 retitle 71993 [core-updates] gnu: libfaketime: Support compilation with glibc 2.39 on i686-linux. thanks ^ permalink raw reply [flat|nested] 7+ messages in thread
* [bug#71993] [PATCH core-updates 0/2] Don't use libfaketime for key package tests on 32bit systems 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 ` (2 preceding siblings ...) 2024-07-09 8:50 ` [bug#71993] retitle Christopher Baines @ 2024-07-21 1:03 ` Zheng Junjie 3 siblings, 0 replies; 7+ messages in thread From: Zheng Junjie @ 2024-07-21 1:03 UTC (permalink / raw) To: Christopher Baines; +Cc: 71993 [-- 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 --] ^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-07-21 1:05 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 ` [bug#71993] [PATCH core-updates 0/2] Don't use libfaketime for key package tests on 32bit systems Zheng Junjie
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).