Ludovic Courtès writes: > Hi Marius, > > Marius Bakke skribis: > >> Marius Bakke writes: >> >>> Julien Lepiller writes: >>> >>>>> Could you send an updated patch to address those issues? Then we can >>>>> happily apply it. >>>> here is the updated patch. I let the tests be done because it doesn't >>>> harm, but it does no good either, so feel free to disable them if you >>>> prefer. >>> >>> Hello! I've gone through this package and made some improvements. I also >>> managed to enable the test suite, but had to resort to strace to figure >>> out what was going on (/bin/sh calls..). >> >> Oops, here is a version that actually passes `guix lint`. >> >> From 83b2913549784e5d3bafd29641e314b308f7df11 Mon Sep 17 00:00:00 2001 >> From: Julien Lepiller >> Date: Fri, 11 Nov 2016 15:18:29 +0100 >> Subject: [PATCH] gnu: Add php. >> >> * gnu/packages/php.scm: New file. >> * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. > > Thanks for the update! > >> + ;;"bcmath/libbcmath" > > So this one is very different from ‘bc’? Yes, it's a completely different project and apparently more akin to 'gmp'. It's maintained within the PHP repository. >> + ;;"fileinfo/libmagic" ; This is a patched version of libmagic. > > Here adding a dependency on ‘file’ instead (the package that provides > libmagic) didn’t cut it, right? Correct. The build system expects to build this, and it appears to be heavily patched, so I did not try very hard. >> + (add-before 'check 'set-test-environment >> + (lambda _ >> + ;; Without this variable, `make test' passes regardless of failures. >> + (setenv "REPORT_EXIT_STATUS" "1") >> + #t))) >> + #:test-target "test" >> + #:tests? #t)) > > Do you have more info as to what fails? I wouldn’t be surprised if > there were lots of issues having to do with the use of /bin/sh, host > name lookups, and other things not available in the build environment. > > Could you gather more info as to what fails so that we can either fix > it, or at least convince ourselves that these are not serious issues and > document them in a comment? Some failures are indeed due to missing network or programs in the build environment. I tried patching a few just now, but unfortunately some files are in a format apparently not supported by Guile! 870: 5 [call-with-input-file "ext/mbstring/tests/bug26639.phpt" ...] In /gnu/store/ciqw5z470c8ihl1kfswj1j3ix6hs092d-module-import/guix/build/utils.scm: 556: 4 [# #] 592: 3 [# # ...] In ice-9/rdelim.scm: 188: 2 [read-line # concat] In unknown file: ?: 1 [%read-line #] In ice-9/boot-9.scm: 109: 0 [# decoding-error ...] ice-9/boot-9.scm:109:20: In procedure #: ice-9/boot-9.scm:109:20: Throw to key `decoding-error' with args `("scm_getc" "input decoding error " 84 #)'. `file` reports: ext/mbstring/tests/bug26639.phpt: Non-ISO extended-ASCII text Can we work around this somehow? There are more files with non-standard file types that can't be substituted. I also found a flag "SKIP_ONLINE_TESTS" which should rule out some more failures. Attached is an updated patch, but there is still a long way to go. I will continue this journey tomorrow: