libfaketime (still) broken on i686-linux

  • Done
  • quality assurance status badge
Details
3 participants
  • Ludovic Courtès
  • Ludovic Courtès
  • Christopher Baines
Owner
unassigned
Submitted by
Ludovic Courtès
Severity
important
L
L
Ludovic Courtès wrote on 22 Jul 00:21 +0200
(address . bug-guix@gnu.org)
87ikwyl72s.fsf@inria.fr
Hi,

This bug report is to keep track of the discussions around libfaketime
for i686-linux. Right now, libfaketime segfaults when used to run the
test suite of ‘nss’ on i686-linux. This can be reproduced in a simple
way as of ‘core-updates’ commit
05e6bd3efe1b03190839d2b91b09fa768c4ef83c:

Toggle snippet (5 lines)
$ ./pre-inst-env guix shell -s i686-linux libfaketime bash -- \
faketime 2023-01-01 bash -c true
Caught Segmentation fault

Commit 127f1842fb037cc5acfc5406e373ccd723127732 (“gnu: libfaketime:
Support compilation with glibc 2.39 on i686-linux.”) was written under
the assumption that packages in Guix would be built with
‘_TIME_BITS=64’.

Alas, as Z572 found out, packages that use Gnulib are typically built
that way, but other packages, such as ‘nss’ and ‘bash’, are often built
with a 32-bit ‘time_t’. Our modified libfaketime fails badly in these
cases.

The libfaketime limitations are discussed in

OTOH, datefudge explicitly provides replacements for both the 32-bit and
64-bit variants of the relevant libc symbols on 32-bit platforms. It
seems to work fine with 32-bit time_t programs (like ‘bash’) and 64-bit
time_t programs (like ‘date’ from Coreutils):

Toggle snippet (5 lines)
$ ./pre-inst-env guix shell -s i686-linux datefudge bash coreutils -- datefudge 2023-01-01 bash -c true
$ ./pre-inst-env guix shell -s i686-linux datefudge bash coreutils -- datefudge 2023-01-01 date
Sun Jan 1 00:00:00 CET 2023

So the easiest short-term solution seems to be using datefudge to run
the ‘nss’ tests on 32-bit platforms, as Chris already suggested before
(patch below; it’s being built right now, I’ll see tomorrow if it
worked…).

Longer-term, as discussed with Z572, we should set up a branch where
we’d ensure “everything” uses 64-bit ‘time_t’ on 32-bit platforms
(that’s beyond the scope of this issue though).

Ludo’.
Toggle diff (35 lines)
diff --git a/gnu/packages/nss.scm b/gnu/packages/nss.scm
index 49276817ae..da3847fcb1 100644
--- a/gnu/packages/nss.scm
+++ b/gnu/packages/nss.scm
@@ -40,7 +40,8 @@ (define-module (gnu packages nss)
#:use-module (gnu packages crates-io)
#:use-module (gnu packages compression)
#:use-module (gnu packages perl)
- #:use-module (gnu packages sqlite))
+ #:use-module (gnu packages sqlite)
+ #:use-module (gnu packages time))
(define-public nspr
(package
@@ -215,7 +216,8 @@ (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" "datefudge")
+ "2024-01-23" "./nss/tests/all.sh"))
(format #t "test suite not run~%"))))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
@@ -240,7 +242,9 @@ (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 (list perl
+ (if (target-64bit?) libfaketime datefudge)
+ 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.
L
L
Ludovic Courtès wrote on 22 Jul 09:08 +0200
(address . 72239@debbugs.gnu.org)
87cyn5lx9q.fsf@gnu.org
Ludovic Courtès <ludovic.courtes@inria.fr> skribis:

Toggle quote (5 lines)
> So the easiest short-term solution seems to be using datefudge to run
> the ‘nss’ tests on 32-bit platforms, as Chris already suggested before
> (patch below; it’s being built right now, I’ll see tomorrow if it
> worked…).

It failed:

Toggle snippet (38 lines)
$ gunzip < /var/log/guix/drvs/yk/8dxp7v6v29nbhkyiv5x8sk04gszycm-nss-3.99.drv.gz | tail -20
NSS_DISABLE_HW_SHA2=
NSS_DISABLE_PCLMUL=
NSS_DISABLE_AVX=
NSS_DISABLE_ARM_NEON=
NSS_DISABLE_SSSE3=

Tests summary:
--------------
Passed: 79015
Failed: 2
Failed with core: 0
ASan failures: 0
Unknown status: 2
TinderboxPrint:Unknown: 2

error: in phase 'check': uncaught exception:
%exception #<&invoke-error program: "datefudge" arguments: ("2024-01-23" "./nss/tests/all.sh") exit-status: 1 term-signal: #f stop-signal: #f>
phase `check' failed after 12784.8 seconds
command "datefudge" "2024-01-23" "./nss/tests/all.sh" failed with status 1
build process 18 exited with status 256

$ zgrep -B5 ' - FAILED$' /var/log/guix/drvs/yk/8dxp7v6v29nbhkyiv5x8sk04gszycm-nss-3.99.drv.gz
[ FAILED ] Pkcs11RsaPssTestWycheproof.RsaPss4096Sha256
[ FAILED ] Pkcs11RsaPssTestWycheproof.RsaPss4096Sha512
[ FAILED ] Pkcs11RsaPssTestWycheproof.RsaPssMisc

39 FAILED TESTS
gtests.sh: #54: pk11_gtest run successfully - FAILED
--
[ FAILED ] Pkcs11RsaPssTestWycheproof.RsaPss4096Sha256
[ FAILED ] Pkcs11RsaPssTestWycheproof.RsaPss4096Sha512
[ FAILED ] Pkcs11RsaPssTestWycheproof.RsaPssMisc

39 FAILED TESTS
gtests.sh: #54: pk11_gtest run successfully - FAILED

Not sure if it’s because datefudge doesn’t interpose on every symbol
that we need or if there’s another problem.

Thoughts?

Ludo’.
C
C
Christopher Baines wrote on 22 Jul 14:55 +0200
(name . Ludovic Courtès)(address . ludo@gnu.org)
87le1t60y0.fsf@cbaines.net
Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (53 lines)
> Ludovic Courtès <ludovic.courtes@inria.fr> skribis:
>
>> So the easiest short-term solution seems to be using datefudge to run
>> the ‘nss’ tests on 32-bit platforms, as Chris already suggested before
>> (patch below; it’s being built right now, I’ll see tomorrow if it
>> worked…).
>
> It failed:
>
> --8<---------------cut here---------------start------------->8---
> $ gunzip < /var/log/guix/drvs/yk/8dxp7v6v29nbhkyiv5x8sk04gszycm-nss-3.99.drv.gz | tail -20
> NSS_DISABLE_HW_SHA2=
> NSS_DISABLE_PCLMUL=
> NSS_DISABLE_AVX=
> NSS_DISABLE_ARM_NEON=
> NSS_DISABLE_SSSE3=
>
> Tests summary:
> --------------
> Passed: 79015
> Failed: 2
> Failed with core: 0
> ASan failures: 0
> Unknown status: 2
> TinderboxPrint:Unknown: 2
>
> error: in phase 'check': uncaught exception:
> %exception #<&invoke-error program: "datefudge" arguments: ("2024-01-23" "./nss/tests/all.sh") exit-status: 1 term-signal: #f stop-signal: #f>
> phase `check' failed after 12784.8 seconds
> command "datefudge" "2024-01-23" "./nss/tests/all.sh" failed with status 1
> build process 18 exited with status 256
>
> $ zgrep -B5 ' - FAILED$' /var/log/guix/drvs/yk/8dxp7v6v29nbhkyiv5x8sk04gszycm-nss-3.99.drv.gz
> [ FAILED ] Pkcs11RsaPssTestWycheproof.RsaPss4096Sha256
> [ FAILED ] Pkcs11RsaPssTestWycheproof.RsaPss4096Sha512
> [ FAILED ] Pkcs11RsaPssTestWycheproof.RsaPssMisc
>
> 39 FAILED TESTS
> gtests.sh: #54: pk11_gtest run successfully - FAILED
> -
> [ FAILED ] Pkcs11RsaPssTestWycheproof.RsaPss4096Sha256
> [ FAILED ] Pkcs11RsaPssTestWycheproof.RsaPss4096Sha512
> [ FAILED ] Pkcs11RsaPssTestWycheproof.RsaPssMisc
>
> 39 FAILED TESTS
> gtests.sh: #54: pk11_gtest run successfully - FAILED
> --8<---------------cut here---------------end--------------->8---
>
> Not sure if it’s because datefudge doesn’t interpose on every symbol
> that we need or if there’s another problem.
>
> Thoughts?

So you can run just this failing gtests by adding (setenv "NSS_TESTS"
"gtests") to the check phase.

Then if you build with datefudge and without datefudge, there's some
difference in the output when the testsuite starts.

When running without datefudge, the tests work and the cd in gtests.sh
seems to fail:

Running tests for gtests
TIMESTAMP gtests BEGIN: Mon Jul 22 10:09:27 UTC 2024
./gtests.sh: line 25: cd: ./nss/tests: No such file or directory
/tmp/guix-build-nss-3.99.drv-0/nss-3.99/nss/tests/gtests

But when running with datefudge, the cd seems to work, but the tests
fail:

Running tests for gtests
TIMESTAMP gtests BEGIN: Tue Jan 23 00:00:01 UTC 2024
/tmp/guix-build-nss-3.99.drv-0/nss-3.99/nss/tests


This seems to relate to the test failures, as they seem to fail reading
a JSON file because they're using the wrong filename:

[----------] 1 test from Pkcs11AESKeyWrapKwpTest
[ RUN ] Pkcs11AESKeyWrapKwpTest.TestVectors
json_reader.cc:13: Failure
Value of: f_
Actual: false
Expected: true
error opening vectors from: /tmp/guix-build-nss-3.99.drv-0/nss-3.99/nss/tests/../../gtests/pk11_gtest/../common/testvectors/kwp-vectors.json
json_reader.cc:130: Failure
Failed
Unexpected '\0'
json_reader.cc:49: Failure
Expected equality of these values:
take()
Which is: '\0'
':'
Which is: ':' (58, 0x3A)
pk11_aeskeywrapkwp_unittest.cc:120: Failure
Expected equality of these values:
"numberOfTests"
r.ReadLabel()
Which is: ""
[ FAILED ] Pkcs11AESKeyWrapKwpTest.TestVectors (0 ms)


There's two many .. here, it should be
/tmp/guix-build-nss-3.99.drv-0/nss-3.99/nss/tests/../gtests/pk11_gtest/../common/testvectors/kwp-vectors.json


Removing the cd line from the gtests.sh script seems to get the package
to build for i686-linux with datefudge, so I've sent a patch (#72244) to
this effect. It's odd that the cd command works but the tests fail
though.
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmaeVrdfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9XcWdhAAiNyxv2w+4orZIupxCsxBj1J+bmZfDaWR
92ZcOQ03y1ECAdlM7HK/StnTx2moRhCIctiRB52TDd7yVJxM0V1TuOyKSr9gNgka
U7/xmleAjgPSAbzr+Fw27GTPXgR02aBS0ZJy+ZNkkwN5mXrZccK9AE4PuBQO1827
MysovG6L5DMypuS+8tafYyDgeZ7TZsx9whVUWUHEb+wMAvwp52BHnt39IPI0L2cg
3UnxsiUiZTBPuSS+ddvwTO8utxsBicwDDZYzdCWyfycYllbi/X7Ve0NslWyJ2p2Z
sSBm9IQNjHEg7iFXBsAVz7u0gNVFLBX/TNatRxVVMSnzbprC/dlTiS/6OzKQ93I2
OC07yBnoDwWo6PuOTnq8h5d1kFZQfc4v86dJ1zAH/UMps3eKBF5WUkwS5+opAGFN
FcdXIQashi0foo/agKmmqDM5nQrswMTors7JzD+ugJhUZecU6zXTb/idZhUWcTJ1
wOlSlOrAvfhZWBx4DtZFIzOeFfyk+2XiHh7aNlTw5SSHTBa7GXvjt3b6iAmnK67e
TWwSBnldVDvrG0eoCZV2SV+8XQArVGinrxRJQOWnty69WYz7J6jDdZx+8V/IS6OH
TVQGvKZmsQauFH93JNuQPfRiOP8NmMD5TIuZxHVWv8jCJQa65Jene8NRHb1uwxIV
TTfpF26piPM=
=0rIH
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 23 Jul 12:41 +0200
(name . Christopher Baines)(address . mail@cbaines.net)
874j8gie4t.fsf@gnu.org
Hi!

Christopher Baines <mail@cbaines.net> skribis:

Toggle quote (15 lines)
> When running without datefudge, the tests work and the cd in gtests.sh
> seems to fail:
>
> Running tests for gtests
> TIMESTAMP gtests BEGIN: Mon Jul 22 10:09:27 UTC 2024
> ./gtests.sh: line 25: cd: ./nss/tests: No such file or directory
> /tmp/guix-build-nss-3.99.drv-0/nss-3.99/nss/tests/gtests
>
> But when running with datefudge, the cd seems to work, but the tests
> fail:
>
> Running tests for gtests
> TIMESTAMP gtests BEGIN: Tue Jan 23 00:00:01 UTC 2024
> /tmp/guix-build-nss-3.99.drv-0/nss-3.99/nss/tests

I added ‘set -x’ in ‘gtests.sh’. With ‘datefudge’, it goes like this:

Toggle snippet (19 lines)
log-Running tests for gtests
log-TIMESTAMP gtests BEGIN: Tue Jan 23 00:00:00 CET 2024
log-++ echo FOOOOO
log-FOOOOO
log-+++ dirname /tmp/guix-build-nss-3.99.drv-0/nss-3.99/nss/tests/all.sh
log-++ cd /tmp/guix-build-nss-3.99.drv-0/nss-3.99/nss/tests
log-++ pwd
log-/tmp/guix-build-nss-3.99.drv-0/nss-3.99/nss/tests
log:++ SOURCE_DIR=/tmp/guix-build-nss-3.99.drv-0/nss-3.99/nss/tests/../..
log-++ set +x
log-gtests: base_gtest certhigh_gtest certdb_gtest der_gtest pk11_gtest util_gtest freebl_gtest softoken_gtest sysinit_gtest smime_gtest mozpkix_gtest
log-gtests.sh: base_gtest ===============================
log-/tmp/guix-build-nss-3.99.drv-0/nss-3.99/dist/Linux6.9_x86_gcc_glibc_PTH_DBG.OBJ/bin/certutil -N -d /tmp/guix-build-nss-3.99.drv-0/nss-3.99/tests_results/security/guix-hpc5.7/gtests/base_gtest --empty-password
log-/tmp/guix-build-nss-3.99.drv-0/nss-3.99/dist/Linux6.9_x86_gcc_glibc_PTH_DBG.OBJ/bin/certutil -S -z ../tests_noise -d /tmp/guix-build-nss-3.99.drv-0/nss-3.99/tests_results/security/guix-hpc5.7/gtests/base_gtest -n dummy -s CN=dummy -t ,, -x -m 1 -w -2 -v 120 -k ec -q nistp256 -Z SHA256 -1 -2
log-
log-
log-Generating key. This may take a few moments...

*Without* ‘datefudge’:

Toggle snippet (19 lines)
log.good-TIMESTAMP gtests BEGIN: Tue Jul 23 12:37:50 CEST 2024
log.good-++ echo FOOOOO
log.good-FOOOOO
log.good-+++ dirname ./nss/tests/all.sh
log.good-++ cd ./nss/tests
log.good-./gtests.sh: line 27: cd: ./nss/tests: No such file or directory
log.good-++ pwd
log.good-/tmp/guix-build-nss-3.99.drv-0/nss-3.99/nss/tests/gtests
log.good:++ SOURCE_DIR=/tmp/guix-build-nss-3.99.drv-0/nss-3.99/nss/tests/gtests/../..
log.good-++ set +x
log.good-gtests: base_gtest certhigh_gtest certdb_gtest der_gtest pk11_gtest util_gtest freebl_gtest softoken_gtest sysinit_gtest smime_gtest mozpkix_gtest
log.good-gtests.sh: base_gtest ===============================
log.good-/tmp/guix-build-nss-3.99.drv-0/nss-3.99/dist/Linux6.9_x86_gcc_glibc_PTH_DBG.OBJ/bin/certutil -N -d /tmp/guix-build-nss-3.99.drv-0/nss-3.99/tests_results/security/guix-hpc5.6/gtests/base_gtest --empty-password
log.good-/tmp/guix-build-nss-3.99.drv-0/nss-3.99/dist/Linux6.9_x86_gcc_glibc_PTH_DBG.OBJ/bin/certutil -S -z ../tests_noise -d /tmp/guix-build-nss-3.99.drv-0/nss-3.99/tests_results/security/guix-hpc5.6/gtests/base_gtest -n dummy -s CN=dummy -t ,, -x -m 1 -w -2 -v 120 -k ec -q nistp256 -Z SHA256 -1 -2
log.good-
log.good-
log.good-Generating key. This may take a few moments...

In the latter case, the scripts gets a relative file name, which makes
it fail to cd, which then makes it succeed by chance.

This script looks extremely fragile.

My suggestion would be to:

(substitute* "nss/tests/gtests/gtests.sh"
(("SOURCE_DIR=.*")
(string-append "SOURCE_DIR=" (getcwd) "/nss\n")))

WDYT?

(There’s a tension between getting a reasonably good understanding of
what’s happening and moving forward!)

Ludo’.
C
C
Christopher Baines wrote on 23 Jul 13:40 +0200
(name . Ludovic Courtès)(address . ludo@gnu.org)
87h6cg5ob3.fsf@cbaines.net
Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (76 lines)
> Hi!
>
> Christopher Baines <mail@cbaines.net> skribis:
>
>> When running without datefudge, the tests work and the cd in gtests.sh
>> seems to fail:
>>
>> Running tests for gtests
>> TIMESTAMP gtests BEGIN: Mon Jul 22 10:09:27 UTC 2024
>> ./gtests.sh: line 25: cd: ./nss/tests: No such file or directory
>> /tmp/guix-build-nss-3.99.drv-0/nss-3.99/nss/tests/gtests
>>
>> But when running with datefudge, the cd seems to work, but the tests
>> fail:
>>
>> Running tests for gtests
>> TIMESTAMP gtests BEGIN: Tue Jan 23 00:00:01 UTC 2024
>> /tmp/guix-build-nss-3.99.drv-0/nss-3.99/nss/tests
>
> I added ‘set -x’ in ‘gtests.sh’. With ‘datefudge’, it goes like this:
>
> --8<---------------cut here---------------start------------->8---
> log-Running tests for gtests
> log-TIMESTAMP gtests BEGIN: Tue Jan 23 00:00:00 CET 2024
> log-++ echo FOOOOO
> log-FOOOOO
> log-+++ dirname /tmp/guix-build-nss-3.99.drv-0/nss-3.99/nss/tests/all.sh
> log-++ cd /tmp/guix-build-nss-3.99.drv-0/nss-3.99/nss/tests
> log-++ pwd
> log-/tmp/guix-build-nss-3.99.drv-0/nss-3.99/nss/tests
> log:++ SOURCE_DIR=/tmp/guix-build-nss-3.99.drv-0/nss-3.99/nss/tests/../..
> log-++ set +x
> log-gtests: base_gtest certhigh_gtest certdb_gtest der_gtest pk11_gtest util_gtest freebl_gtest softoken_gtest sysinit_gtest smime_gtest mozpkix_gtest
> log-gtests.sh: base_gtest ===============================
> log-/tmp/guix-build-nss-3.99.drv-0/nss-3.99/dist/Linux6.9_x86_gcc_glibc_PTH_DBG.OBJ/bin/certutil -N -d /tmp/guix-build-nss-3.99.drv-0/nss-3.99/tests_results/security/guix-hpc5.7/gtests/base_gtest --empty-password
> log-/tmp/guix-build-nss-3.99.drv-0/nss-3.99/dist/Linux6.9_x86_gcc_glibc_PTH_DBG.OBJ/bin/certutil -S -z ../tests_noise -d /tmp/guix-build-nss-3.99.drv-0/nss-3.99/tests_results/security/guix-hpc5.7/gtests/base_gtest -n dummy -s CN=dummy -t ,, -x -m 1 -w -2 -v 120 -k ec -q nistp256 -Z SHA256 -1 -2
> log-
> log-
> log-Generating key. This may take a few moments...
> --8<---------------cut here---------------end--------------->8---
>
> *Without* ‘datefudge’:
>
> --8<---------------cut here---------------start------------->8---
> log.good-TIMESTAMP gtests BEGIN: Tue Jul 23 12:37:50 CEST 2024
> log.good-++ echo FOOOOO
> log.good-FOOOOO
> log.good-+++ dirname ./nss/tests/all.sh
> log.good-++ cd ./nss/tests
> log.good-./gtests.sh: line 27: cd: ./nss/tests: No such file or directory
> log.good-++ pwd
> log.good-/tmp/guix-build-nss-3.99.drv-0/nss-3.99/nss/tests/gtests
> log.good:++ SOURCE_DIR=/tmp/guix-build-nss-3.99.drv-0/nss-3.99/nss/tests/gtests/../..
> log.good-++ set +x
> log.good-gtests: base_gtest certhigh_gtest certdb_gtest der_gtest pk11_gtest util_gtest freebl_gtest softoken_gtest sysinit_gtest smime_gtest mozpkix_gtest
> log.good-gtests.sh: base_gtest ===============================
> log.good-/tmp/guix-build-nss-3.99.drv-0/nss-3.99/dist/Linux6.9_x86_gcc_glibc_PTH_DBG.OBJ/bin/certutil -N -d /tmp/guix-build-nss-3.99.drv-0/nss-3.99/tests_results/security/guix-hpc5.6/gtests/base_gtest --empty-password
> log.good-/tmp/guix-build-nss-3.99.drv-0/nss-3.99/dist/Linux6.9_x86_gcc_glibc_PTH_DBG.OBJ/bin/certutil -S -z ../tests_noise -d /tmp/guix-build-nss-3.99.drv-0/nss-3.99/tests_results/security/guix-hpc5.6/gtests/base_gtest -n dummy -s CN=dummy -t ,, -x -m 1 -w -2 -v 120 -k ec -q nistp256 -Z SHA256 -1 -2
> log.good-
> log.good-
> log.good-Generating key. This may take a few moments...
> --8<---------------cut here---------------end--------------->8---
>
> In the latter case, the scripts gets a relative file name, which makes
> it fail to cd, which then makes it succeed by chance.
>
> This script looks extremely fragile.
>
> My suggestion would be to:
>
> (substitute* "nss/tests/gtests/gtests.sh"
> (("SOURCE_DIR=.*")
> (string-append "SOURCE_DIR=" (getcwd) "/nss\n")))
>
> WDYT?

That looks good to me.

In a related note, I was going to push the original patch yesterday, but
I got stuck rebasing core-updates. There's some substantial rust changes
on the branch which clash with master.
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmaflrBfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9XfAZQ//dRiugEitxQ2/GsoYYzDi3QFIgL5CwKO2
U+P5v3fkEFr/Hh/VaMJCUfNd81x2YnEJ6jRlXspHpO2QZZ9PsIh+VNTsUZmIFtfE
gio/y485MQeH7kQUkt/4DBP71KDa4yrDAdFcn1GSopmb88Kyej+E7ds6ZfbXSWJ+
P+daJ5vnYnwSrcGSGweyv5yO7KTDZLRfyUvxIZSj62eouKa8Y+vEOqc8lXe91XJN
/RXXXC0hWY9u0/G2/bn2AVPImlqgJwgXuqb3BrxZnP1J4mbKgtbEH2KDcqsJUaj9
IpiUGk1EzjOrNkfmzJSDhy6a6Yz2GM8j1eNcdqH2cZxONon9hesAQDAWEmOVquck
E0AXfVMBTgX0E0rUyFa9+v9tE2p6zf82LcM7RFUUFKy3WY2nKdtN9ts4HRTVhD30
/6zH5K9+me6F1A1okdXGRv1M+pmhRVnV1z1nOkRO/gdR6bseQlexiKjSEyFYW8Ob
1uVePa+XhhDt+LnCu6JhrvfRVMA0Vmn4DAnNgCxnciFQhiC97zsflpMgfz5Q3gG0
qOM5/Rt5mmRI+dVVcI6d7uIJh75jFkwpHq+1aNLZM06pQ6Tu3ohQV3tnvOoW1F0A
uDdW1zpie6WxveHmtGRh+mNm1PRr1U2fES32PjlYHQw1oFtSwJfjysr9R0sIucpS
iPAaZfGGHrA=
=77jz
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 23 Jul 17:15 +0200
control message for bug #72239
(address . control@debbugs.gnu.org)
87v80wf8bc.fsf@gnu.org
severity 72239 important
quit
L
L
Ludovic Courtès wrote on 23 Jul 23:11 +0200
Re: bug#72239: libfaketime (still) broken on i686-linux
(name . Christopher Baines)(address . mail@cbaines.net)
878qxrg6eo.fsf@gnu.org
Hi,

Christopher Baines <mail@cbaines.net> skribis:

Toggle quote (10 lines)
>> My suggestion would be to:
>>
>> (substitute* "nss/tests/gtests/gtests.sh"
>> (("SOURCE_DIR=.*")
>> (string-append "SOURCE_DIR=" (getcwd) "/nss\n")))
>>
>> WDYT?
>
> That looks good to me.

I have tested the following patch and successfully built nss on
i686-linux with it:
Toggle diff (48 lines)
diff --git a/gnu/packages/nss.scm b/gnu/packages/nss.scm
index 49276817ae..4b4d907e61 100644
--- a/gnu/packages/nss.scm
+++ b/gnu/packages/nss.scm
@@ -40,7 +40,8 @@ (define-module (gnu packages nss)
#:use-module (gnu packages crates-io)
#:use-module (gnu packages compression)
#:use-module (gnu packages perl)
- #:use-module (gnu packages sqlite))
+ #:use-module (gnu packages sqlite)
+ #:use-module (gnu packages time))
(define-public nspr
(package
@@ -211,11 +212,21 @@ (define-public nss
(substitute* "nss/tests/dbtests/dbtests.sh"
((" -lt 5") " -lt 50"))
+ #$@(if (target-64bit?)
+ '()
+ ;; The script fails to determine the source
+ ;; directory when running under 'datefudge' (see
+ ;; <https://issues.guix.gnu.org/72239>). Help it.
+ #~((substitute* "nss/tests/gtests/gtests.sh"
+ (("SOURCE_DIR=.*")
+ (string-append "SOURCE_DIR=" (getcwd) "/nss\n")))))
+
;; The "PayPalEE.cert" certificate expires every six months,
;; 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" "datefudge")
+ "2024-01-23" "./nss/tests/all.sh"))
(format #t "test suite not run~%"))))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
@@ -240,7 +251,9 @@ (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 (list perl
+ (if (target-64bit?) libfaketime datefudge)
+ 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.
Go for it?

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 26 Jul 11:13 +0200
(name . Christopher Baines)(address . mail@cbaines.net)
87le1ocy7k.fsf@gnu.org
Hi,

Ludovic Courtès <ludo@gnu.org> skribis:

Toggle quote (3 lines)
> I have tested the following patch and successfully built nss on
> i686-linux with it:

I pushed it as 21fe1e077aa77488bd413ef3255973c60d7468fe on
‘core-updates’.

Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 72239@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 72239
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch