Failing tests (guix-pack, lint)

  • Open
  • quality assurance status badge
Details
2 participants
  • taxuswc
  • zimoun
Owner
unassigned
Submitted by
taxuswc
Severity
normal
T
T
taxuswc wrote on 25 Jan 2021 23:10
(address . bug-guix@gnu.org)
06a73269-5650-9020-24a7-08c5e7fd3275@disroot.org
Hello,

I am building GNU Guix from the source on a foreign distro. Several
tests fail:
1. tests/lint.scm.
2. tests/guix-pack.sh. Probably, tar is the root of the issue, as it
refuses to create a hard link to /opt/gnu/bin.
3. When current directory has symlinks in its path, tests/guix-gc.sh
fail because of the absence of path canonicalization in $PWD.
    Assuming ln -s ~/downloads ~/downloads-sl and insertion of echo
instead of pipe at line 71, tests/guix-gc.sh yields

+ guix gc --list-roots
accepted connection from pid 911, user taxus
/home/taxus/downloads/distro/guix/guix-1.2.0/guix-gc-root
/home/taxus/downloads/distro/guix/guix-1.2.0/test-tmp/var/755/profiles
+ echo grep /home/taxus/downloads-sl/distro/guix/guix-1.2.0/guix-gc-root
grep /home/taxus/downloads-sl/distro/guix/guix-1.2.0/guix-gc-root

I am ?ttaching ./test-suite-failing.log for the #1 and #2 and providing
the versions of the build requirements below:

- GNU tar: 1.33
- GNU make: 4.3
- GNU guix: 1.2.0,
- GNU Guile: 2.2.6
- guile-json: 4.3.2
- guile-gcrypt: 0.3.0
- gnutls: 3.7.0
- guile-sqlite3: 0.1.3
- guile-zlib: 0.0.1
- guile-lzlib: 0.0.1
- guile-avahi: 6d43caf64f672a9694bf6c98bbf7a734f17a51e8
- guile-git: 0.4.0

Also, tests/offload.scm tests brings down the entire test suite when
guile-ssh is not installed (despite it being an optional dependency);
attaching the corresponding logfile, too.

Thanks in advance,
   ~taxuswc
Backtrace:
In ice-9/boot-9.scm:
2887:24 19 (_)
222:17 18 (map1 (((guix scripts offload)) ((srfi srfi-64))))
2800:17 17 (resolve-interface (guix scripts offload) #:select _ # _ …)
In ice-9/threads.scm:
390:8 16 (_ _)
In ice-9/boot-9.scm:
2726:13 15 (_)
In ice-9/threads.scm:
390:8 14 (_ _)
In ice-9/boot-9.scm:
2994:20 13 (_)
2312:4 12 (save-module-excursion #<procedure 7f40c806d2a0 at ice-…>)
3014:26 11 (_)
In unknown file:
10 (primitive-load-path "guix/scripts/offload" #<procedure…>)
In ice-9/eval.scm:
721:20 9 (primitive-eval (define-module (guix scripts offload) …))
In ice-9/psyntax.scm:
1262:36 8 (expand-top-sequence ((define-module (guix # #) # # …)) …)
1209:24 7 (parse _ (("placeholder" placeholder)) ((top) #(# # …)) …)
285:10 6 (parse _ (("placeholder" placeholder)) (()) _ c&e (eval) …)
In ice-9/eval.scm:
293:34 5 (_ #<module (#{ g24}#) 7f40c8b980a0>)
In ice-9/boot-9.scm:
2874:4 4 (define-module* _ #:filename _ #:pure _ #:version _ # _ …)
2887:24 3 (_)
222:17 2 (map1 (((ssh key)) ((ssh auth)) ((ssh session)) ((…)) …))
2803:6 1 (resolve-interface _ #:select _ #:hide _ #:prefix _ # _ …)
In unknown file:
0 (scm-error misc-error #f "~A ~S" ("no code for modu…" …) …)

ERROR: In procedure scm-error:
no code for module (ssh key)
Z
Z
zimoun wrote on 26 Jan 2021 11:55
867do0j7b9.fsf@gmail.com
Hi,

On Mon, 25 Jan 2021 at 22:10, taxuswc--- via Bug reports for GNU Guix <bug-guix@gnu.org> wrote:

Toggle quote (3 lines)
> I am building GNU Guix from the source on a foreign distro. Several
> tests fail:

Which commit are you building using which commit version?

Did you do

guix environment guix
./bootstrap
./configure --localstatedir=/var/
make
make check

? Or something else?

Or are you trying to bootstrap Guix on foreign distro?


Toggle quote (3 lines)
> FAIL: tests/lint
> ================

[...]


Toggle quote (27 lines)
> test-name: archival: missing content
> location: /home/taxus/downloads/distro/guix/guix-1.2.0/tests/lint.scm:921
> source:
> + (test-assert
> + "archival: missing content"
> + (let* ((origin
> + (origin
> + (method url-fetch)
> + (uri "http://example.org/foo.tgz")
> + (sha256 (make-bytevector 32))))
> + (warnings
> + (with-http-server
> + '((404 "Not archived."))
> + (parameterize
> + ((%swh-base-url (%local-url)))
> + (check-archival
> + (dummy-package "x" (source origin)))))))
> + (warning-contains? "not archived" warnings)))
> actual-value: #f
> actual-error:
> + (keyword-argument-error
> + #<procedure http-request (uri #:key body port method version keep-alive? headers decode-body? streaming? request)>
> + "Unrecognized keyword"
> + ()
> + (#:verify-certificate?))
> result: FAIL

Hum?!

[...]

Toggle quote (11 lines)
> FAIL: tests/guix-pack
> =====================
>
> + guile -c '(getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV)'
> + guix pack --version
> guix pack (GNU Guix) 1.2.0
> Copyright (C) 2020 the Guix authors
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.

[...]

Toggle quote (43 lines)
> + tar -xf /home/taxus/downloads/distro/guix/guix-1.2.0/test-tmp/store/az698s2v2q2qnc1ljrg4ypnjpb246x4c-tarball-pack.tar.xz
> tar: ./opt/gnu/bin: Cannot hard link to ‘./opt/gnu/bin’: No such file or directory
> tar: Exiting with failure status due to previous errors
> + chmod -Rf +w /tmp/tmp.QVmTayA5IX
> + rm -rf /tmp/tmp.QVmTayA5IX
> FAIL tests/guix-pack.sh (exit status: 2)
>
> Backtrace:
> In ice-9/boot-9.scm:
> 2887:24 19 (_)
> 222:17 18 (map1 (((guix scripts offload)) ((srfi srfi-64))))
> 2800:17 17 (resolve-interface (guix scripts offload) #:select _ # _ …)
> In ice-9/threads.scm:
> 390:8 16 (_ _)
> In ice-9/boot-9.scm:
> 2726:13 15 (_)
> In ice-9/threads.scm:
> 390:8 14 (_ _)
> In ice-9/boot-9.scm:
> 2994:20 13 (_)
> 2312:4 12 (save-module-excursion #<procedure 7f40c806d2a0 at ice-…>)
> 3014:26 11 (_)
> In unknown file:
> 10 (primitive-load-path "guix/scripts/offload" #<procedure…>)
> In ice-9/eval.scm:
> 721:20 9 (primitive-eval (define-module (guix scripts offload) …))
> In ice-9/psyntax.scm:
> 1262:36 8 (expand-top-sequence ((define-module (guix # #) # # …)) …)
> 1209:24 7 (parse _ (("placeholder" placeholder)) ((top) #(# # …)) …)
> 285:10 6 (parse _ (("placeholder" placeholder)) (()) _ c&e (eval) …)
> In ice-9/eval.scm:
> 293:34 5 (_ #<module (#{ g24}#) 7f40c8b980a0>)
> In ice-9/boot-9.scm:
> 2874:4 4 (define-module* _ #:filename _ #:pure _ #:version _ # _ …)
> 2887:24 3 (_)
> 222:17 2 (map1 (((ssh key)) ((ssh auth)) ((ssh session)) ((…)) …))
> 2803:6 1 (resolve-interface _ #:select _ #:hide _ #:prefix _ # _ …)
> In unknown file:
> 0 (scm-error misc-error #f "~A ~S" ("no code for modu…" …) …)
>
> ERROR: In procedure scm-error:
> no code for module (ssh key)

It seems a misconfiguration of your environment.


All the best,
simon
T
T
taxuswc wrote on 26 Jan 2021 14:03
cbc369c7-28c2-8335-e41d-034b52f10015@disroot.org
Hello,

26.01.2021 10:55, zimoun wrote:
Toggle quote (7 lines)
> On Mon, 25 Jan 2021 at 22:10, taxuswc--- via Bug reports for GNU Guix <bug-guix@gnu.org> wrote:
>
>> I am building GNU Guix from the source on a foreign distro. Several
>> tests fail:
>
> Which commit are you building using which commit version?

?fficial source tarball from https://guix.gnu.org/en/download/,probably
v1.2.0 (d5b556eef57321d0be89fdb07db447b2db2718ed)


Toggle quote (11 lines)
> Did you do
>
> guix environment guix
> ./bootstrap
> ./configure --localstatedir=/var/
> make
> make check
>
> ? Or something else?
> Or are you trying to bootstrap Guix on foreign distro?

Basically the same steps only without --localstatedir (it seems to
default to /var) and guix environment stuff, as guix is not installed in
the system yet.

I have installed the prerequisites manually or from a foreign distro
package manager, so to my mind it probably does not count as
``bootstrapping''.

Toggle quote (35 lines)
>> FAIL: tests/lint
>> ================
>
> [...]
>
>
>> test-name: archival: missing content
>> location: /home/taxus/downloads/distro/guix/guix-1.2.0/tests/lint.scm:921
>> source:
>> + (test-assert
>> + "archival: missing content"
>> + (let* ((origin
>> + (origin
>> + (method url-fetch)
>> + (uri "http://example.org/foo.tgz")
>> + (sha256 (make-bytevector 32))))
>> + (warnings
>> + (with-http-server
>> + '((404 "Not archived."))
>> + (parameterize
>> + ((%swh-base-url (%local-url)))
>> + (check-archival
>> + (dummy-package "x" (source origin)))))))
>> + (warning-contains? "not archived" warnings)))
>> actual-value: #f
>> actual-error:
>> + (keyword-argument-error
>> + #<procedure http-request (uri #:key body port method version keep-alive? headers decode-body? streaming? request)>
>> + "Unrecognized keyword"
>> + ()
>> + (#:verify-certificate?))
>> result: FAIL
>
> Hum?!

I got guile from the foreign distro package manager, so it was an
obvious suspect, but upon inspection [1] it is just vanilla guile 2.2.6
without any distro-specific patches.

[1]

Could you please clarify which additional info can I provide to identify
the root of the issue? Maybe, should I try building with guile 3.x?


Toggle quote (22 lines)
> [...]
>
>> FAIL: tests/guix-pack
>> =====================
>>
>> + guile -c '(getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV)'
>> + guix pack --version
>> guix pack (GNU Guix) 1.2.0
>> Copyright (C) 2020 the Guix authors
>> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
>> This is free software: you are free to change and redistribute it.
>> There is NO WARRANTY, to the extent permitted by law.
>
> [...]
>
>> + tar -xf /home/taxus/downloads/distro/guix/guix-1.2.0/test-tmp/store/az698s2v2q2qnc1ljrg4ypnjpb246x4c-tarball-pack.tar.xz
>> tar: ./opt/gnu/bin: Cannot hard link to ‘./opt/gnu/bin’: No such file or directory
>> tar: Exiting with failure status due to previous errors
>> + chmod -Rf +w /tmp/tmp.QVmTayA5IX
>> + rm -rf /tmp/tmp.QVmTayA5IX
>> FAIL tests/guix-pack.sh (exit status: 2)

Well, the problem is not with tar as I previously assumed.
guix pack --bootstrap -S /opt/gnu/bin=bin guile-bootstrap

creates the following tarball
$ tar -tvf "$the_pack" | grep '/opt/'

drwxr-xr-x root/root 0 1970-01-01 03:00 ./opt/gnu/
lrwxrwxrwx root/root 0 1970-01-01 03:00 ./opt/gnu/bin ->
../../home/taxus/downloads/distro/guix/guix-1.2.0/test-tmp/store/w67kdqf2ghkkxp6spdyvfvvhiqqk3g76-profile/bin
hrwxrwxrwx root/root 0 1970-01-01 03:00 ./opt/gnu/bin link to
./opt/gnu/bin

I can hardly understand how the last line can be correct in any setup.
An attempt to unpack the tarball quite expectedly results in

tar: ./opt/gnu/bin: Cannot hard link to './opt/gnu/bin': No such file
or directory

as the hardlink creation erases the file it wants to reference in the
first place..

Toggle quote (9 lines)
>>
>> Backtrace:
>> In ice-9/boot-9.scm:
>> [...]
>> ERROR: In procedure scm-error:
>> no code for module (ssh key)
>
> It seems a misconfiguration of your environment.

It is likely the case, however, I would like to setup offloading once
guix is working, so for now I have commented out the test in question to
get any sort of report.

Thanks for the reply!

All the best,
~taxuswc
?
Your comment

Commenting via the web interface is currently disabled.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 46109
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