bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#72239: libfaketime (still) broken on i686-linux


From: Ludovic Courtès
Subject: bug#72239: libfaketime (still) broken on i686-linux
Date: Tue, 23 Jul 2024 23:11:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Hi,

Christopher Baines <mail@cbaines.net> skribis:

>> 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:

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’.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]