test-name: self-contained-tarball location: /home/cassou/Documents/projects/guix/guix/tests/pack.scm:58 source: + (test-assert + "self-contained-tarball" + (let ((guile (package-derivation %store %bootstrap-guile))) + (run-with-store + %store + (mlet* %store-monad + ((profile + (profile-derivation + (packages->manifest (list %bootstrap-guile)) + #:hooks + '() + #:locales? + #f)) + (tarball + (self-contained-tarball + "pack" + profile + #:symlinks + '(("/bin/Guile" -> "bin/guile")) + #:compressor + %gzip-compressor + #:archiver + %tar-bootstrap)) + (check (gexp->derivation + "check-tarball" + (with-imported-modules + '((guix build utils)) + (gexp (begin + (use-modules + (guix build utils) + (srfi srfi-1)) + (define store + (string-append + "." + (%store-directory) + "/")) + (define (canonical? file) + (let ((st (lstat file))) + (or (not (string-prefix? store file)) + (eq? 'symlink (stat:type st)) + (and (= 1 (stat:mtime st)) + (zero? (logand + 146 + (stat:mode st))))))) + (define bin + (string-append + "." + (ungexp profile) + "/bin")) + (setenv + "PATH" + (string-append + (ungexp %tar-bootstrap) + "/bin")) + (system* "tar" "xvf" (ungexp tarball)) + (mkdir (ungexp output)) + (exit (and (file-exists? + (string-append bin "/guile")) + (file-exists? store) + (every canonical? + (find-files + "." + (const #t) + #:directories? + #t)) + (string=? + (string-append + (ungexp %bootstrap-guile) + "/bin") + (readlink bin)) + (string=? + (string-append + ".." + (ungexp profile) + "/bin/guile") + (readlink "bin/Guile")))))))))) + (built-derivations (list check))) + #:guile-for-build + guile))) actual-value: #t result: PASS test-name: self-contained-tarball + localstatedir location: /home/cassou/Documents/projects/guix/guix/tests/pack.scm:117 source: + (test-assert + "self-contained-tarball + localstatedir" + (let ((guile (package-derivation store %bootstrap-guile))) + (run-with-store + store + (mlet* %store-monad + ((guile (set-guile-for-build (default-guile))) + (profile + (profile-derivation + (packages->manifest (list %bootstrap-guile)) + #:hooks + '() + #:locales? + #f)) + (tarball + (self-contained-tarball + "tar-pack" + profile + #:localstatedir? + #t)) + (check (gexp->derivation + "check-tarball" + (gexp (let ((bin (string-append + "." + (ungexp profile) + "/bin"))) + (setenv + "PATH" + (string-append + (ungexp %tar-bootstrap) + "/bin")) + (system* "tar" "xvf" (ungexp tarball)) + (mkdir (ungexp output)) + (exit (and (file-exists? + "var/guix/db/db.sqlite") + (string=? + (string-append + (ungexp %bootstrap-guile) + "/bin") + (readlink bin))))))))) + (built-derivations (list check))) + #:guile-for-build + guile))) actual-value: #t result: PASS test-name: docker-image + localstatedir location: /home/cassou/Documents/projects/guix/guix/tests/pack.scm:140 source: + (test-assert + "docker-image + localstatedir" + (let ((guile (package-derivation store %bootstrap-guile))) + (run-with-store + store + (mlet* %store-monad + ((guile (set-guile-for-build (default-guile))) + (profile + (profile-derivation + (packages->manifest (list %bootstrap-guile)) + #:hooks + '() + #:locales? + #f)) + (tarball + (docker-image + "docker-pack" + profile + #:symlinks + '(("/bin/Guile" -> "bin/guile")) + #:localstatedir? + #t)) + (check (gexp->derivation + "check-tarball" + (with-imported-modules + '((guix build utils)) + (gexp (begin + (use-modules + (guix build utils) + (ice-9 match)) + (define bin + (string-append + "." + (ungexp profile) + "/bin")) + (setenv + "PATH" + (string-append + (ungexp %tar-bootstrap) + "/bin")) + (mkdir "base") + (with-directory-excursion + "base" + (invoke "tar" "xvf" (ungexp tarball))) + (match (find-files "base" "layer.tar") + ((layer) (invoke "tar" "xvf" layer))) + (when (and (file-exists? + (string-append bin "/guile")) + (file-exists? + "var/guix/db/db.sqlite") + (file-is-directory? "tmp") + (string=? + (string-append + (ungexp %bootstrap-guile) + "/bin") + (pk 'binlink (readlink bin))) + (string=? + (string-append + (ungexp profile) + "/bin/guile") + (pk 'guilelink + (readlink "bin/Guile")))) + (mkdir (ungexp output))))))))) + (built-derivations (list check))) + #:guile-for-build + guile))) actual-value: #t result: PASS test-name: squashfs-image + localstatedir location: /home/cassou/Documents/projects/guix/guix/tests/pack.scm:181 source: + (test-assert + "squashfs-image + localstatedir" + (let ((guile (package-derivation store %bootstrap-guile))) + (run-with-store + store + (mlet* %store-monad + ((guile (set-guile-for-build (default-guile))) + (profile + (profile-derivation + (packages->manifest (list %bootstrap-guile)) + #:hooks + '() + #:locales? + #f)) + (image (squashfs-image + "squashfs-pack" + profile + #:symlinks + '(("/bin" -> "bin")) + #:localstatedir? + #t)) + (check (gexp->derivation + "check-tarball" + (with-imported-modules + '((guix build utils)) + (gexp (begin + (use-modules + (guix build utils) + (ice-9 match)) + (define bin + (string-append + "." + (ungexp profile) + "/bin")) + (setenv + "PATH" + (string-append + (ungexp squashfs-tools) + "/bin")) + (invoke "unsquashfs" (ungexp image)) + (with-directory-excursion + "squashfs-root" + (when (and (file-exists? + (string-append bin "/guile")) + (file-exists? + "var/guix/db/db.sqlite") + (string=? + (string-append + (ungexp %bootstrap-guile) + "/bin") + (pk 'binlink (readlink bin))) + (string=? + (string-drop + (string-append + random seed for tests: 1582998248 building path(s) `/gnu/store/ncj3mfzqdjji32nsgd8k54zp916rm90n-squashfs-pack.gz.squashfs' Parallel mksquashfs: Using 4 processors Creating 4.0 filesystem on /gnu/store/ncj3mfzqdjji32nsgd8k54zp916rm90n-squashfs-pack.gz.squashfs, block size 131072. [===============================================================|] 580/580 100% Exportable Squashfs 4.0 filesystem, gzip compressed, data block size 131072 compressed data, compressed metadata, compressed fragments, compressed xattrs, compressed ids duplicates are not removed Filesystem size 4835.09 Kbytes (4.72 Mbytes) 35.34% of uncompressed filesystem size (13679.85 Kbytes) Inode table size 6922 bytes (6.76 Kbytes) 20.71% of uncompressed inode table size (33425 bytes) Directory table size 6178 bytes (6.03 Kbytes) 49.40% of uncompressed directory table size (12506 bytes) Xattr table size 49 bytes (0.05 Kbytes) 100.00% of uncompressed xattr table size (49 bytes) No duplicate files removed Number of inodes 613 Number of files 531 Number of fragments 64 Number of symbolic links 3 Number of device nodes 0 Number of fifo nodes 0 Number of socket nodes 0 Number of directories 79 Number of ids (unique uids + gids) 3 Number of uids 2 unknown (0) nixbld (972) Number of gids 2 unknown (0) nixbld (964) Failed to read existing filesystem - will not overwrite - ABORTING! To force Mksquashfs to write to this block device or file use -noappend Found a valid exportable SQUASHFS superblock on /gnu/store/ncj3mfzqdjji32nsgd8k54zp916rm90n-squashfs-pack.gz.squashfs. Compression used gzip Inodes are compressed Data is compressed Fragments are compressed Xattrs are compressed Fragments are present in the filesystem Always-use-fragments option is not specified Duplicates are not removed Xattrs are stored Filesystem size 4835.09 Kbytes (4.72 Mbytes) Block size 131072 Number of fragments 64 Number of inodes 613 Number of ids 3 Parallel mksquashfs: Using 4 processors Scanning existing filesystem... Backtrace: 3 (primitive-load "/gnu/store/1wn2rh73paxdchdjyha0010467n?") In ice-9/eval.scm: 619:8 2 (_ #f) In srfi/srfi-1.scm: 640:9 1 (for-each # ?) In guix/build/utils.scm: 652:6 0 (invoke _ . _) guix/build/utils.scm:652:6: In procedure invoke: Throw to key `srfi-34' with args `(#)'. builder for `/gnu/store/ziq7rj7dq8d6azmzvabrlnps6kxv76mb-squashfs-pack.gz.squashfs.drv' failed with exit code 1 cannot build derivation `/gnu/store/dhxqv3z0axpvsgf5fwv6wm9c2rnfw0x5-check-tarball.drv': 1 dependencies couldn't be built (ungexp profile) + "/bin") + 1) + (pk 'guilelink + (readlink "bin")))) + (mkdir (ungexp output)))))))))) + (built-derivations (list check))) + #:guile-for-build + guile))) actual-value: #f actual-error: + (srfi-34 + #) result: FAIL