Commit Graph

12 Commits (master)

Author SHA1 Message Date
Ludovic Courtès fd214f1522
pack: Add '--root'.
* guix/scripts/pack.scm (%options, show-help): Add "--root".
(guix-pack): Honor it.
* tests/guix-pack.sh: Test it.
* doc/guix.texi (Invoking guix pack): Document it.
2019-05-22 00:09:41 +02:00
Ludovic Courtès 8deb65c378
tests: Ensure 'unshare' works before relying on it.
Fixes <https://bugs.gnu.org/35642>.
Reported by Josh Holland <josh@inv.alid.pw>.

* tests/guix-pack-relocatable.sh: Before invoking 'unshare' at the
bottom, add "if unshare -r true" condition.
* tests/guix-pack.sh: Likewise.
2019-05-09 17:42:31 +02:00
Ludovic Courtès 72dc64f8f7
store-copy: Canonicalize the mtime and permissions of the store copy.
Fixes a bug whereby directories in the output of 'guix pack -f tarball'
would not be read-only.

* guix/build/store-copy.scm (reset-permissions): New procedure.
(populate-store): Pass #:keep-mtime? #t to 'copy-recursively'.  Call
'reset-permissions'.
* tests/pack.scm ("self-contained-tarball"): In CHECK, define
'canonical?' and use it to check that every file has an mtime of 1 and
is read-only.
* tests/guix-pack.sh: Invoke "chmod -Rf +w" before "rm -rf" in trap.
2018-11-06 23:21:24 +01:00
Ludovic Courtès b27ef1d46c
pack: Import (guix store database) only when '--localstatedir' is passed.
This is another way to address <https://bugs.gnu.org/32184>, which was
previously addressed in commit 19c924af4f.

* gnu/build/install.scm (register-closure): Move to...
* gnu/build/vm.scm (register-closure): ... here.  New procedure.
* guix/scripts/pack.scm (self-contained-tarball)[build]: Remove
now unneeded 'with-extensions' form and custom (guix config) module.
* tests/guix-pack.sh: Revert the strategy from
commit 19c924af4f.
* tests/pack.scm ("self-contained-tarball"): Likewise.
2018-11-06 23:21:23 +01:00
Ludovic Courtès 19c924af4f
tests: Run 'guix pack' tests using the external store.
Fixes <https://bugs.gnu.org/32184>.

* guix/tests.scm (call-with-external-store): New procedure.
(with-external-store): New macro.
* tests/pack.scm (%store): Remove.
(test-assertm): Add 'store' parameter.
("self-contained-tarball"): Wrap in 'with-external-store'.
* tests/guix-pack.sh: Connect to the external store, if possible, by
setting NIX_STORE_DIR and GUIX_DAEMON_SOCKET.  Remove most uses of
'--bootstrap'.
2018-10-19 18:28:57 +02:00
Ludovic Courtès ee75e80c05
tests: Skip 'guix-pack.sh'.
This works around a regression introduced in commit
66e9944e07 while waiting for a proper fix.

* tests/guix-pack.sh: Add "exit 77".
2018-07-05 21:35:55 +02:00
Ludovic Courtès ce9e684b83
tests: Skip 'tests/guix-pack.sh' when networking is missing.
The test could fail because "static-binaries.tar.xz" is missing, for
instance.

* tests/guix-pack.sh: Require a network connection to be on the safe
side.  This reverts part of 47a60325ca.
2018-05-19 00:14:51 +02:00
Ludovic Courtès 47a60325ca
pack: Add '--relocatable'.
* gnu/packages/aux-files/run-in-namespace.c: New file.
* Makefile.am (AUX_FILES): Add it.
* guix/scripts/pack.scm (<c-compiler>): New record type.
(c-compiler, bootstrap-c-compiler, c-compiler-compiler): New procedures.
(self-contained-tarball): Use
'relative-file-name' for the SOURCE -> TARGET symlink.
(docker-image): Add 'defmod' to please Geiser.
(wrapped-package, map-manifest-entries): New procedures.
(%options, show-help): Add --relocatable.
(guix-pack): Honor it.
2018-05-10 14:53:57 +02:00
Ludovic Courtès d26727a143
pack: Fix handling of '-e'.
Fixes a regression introduced in
aad16cc196.
Reported by Julien Lepiller.

* guix/scripts/pack.scm (guix-pack)[manifest-from-args]: In
'match-lambda', add clause for single packages.
* tests/guix-pack.sh: Add test for '-e'.
2018-05-07 14:04:19 +02:00
Ludovic Courtès aad16cc196
pack: Honor package transformation options.
Previously they would silently be ignored.

* guix/scripts/pack.scm (guix-pack)[manifest-from-args]: Add 'store'
parameter.  Call 'options->transformation' and use it.
Move 'with-store' and 'parameterize' around the 'let'.
* tests/guix-pack.sh: Add test using '--with-source'.
2018-05-07 10:46:07 +02:00
Ludovic Courtès df6f86a0cb
pack: Adjust test to cope with GC'd profiles.
Previous "test -x opt/gnu/bin/guile" would fail if the store item
"opt/gnu/bin" points to had been GC'd.

* tests/guix-pack.sh: Replace "test -x" with "test -L" to deal with
store items that have been reclaimed.
2018-05-07 10:41:33 +02:00
Chris Marusich 272c070962
tests: Add tests for "guix pack".
* guix/scripts/pack.scm (bootstrap-xz): New variable.
  (%options) <--bootstrap>: New option.
  (show-help): Document the new --bootstrap option.
  (guix-pack): When --bootstrap is specified, use the bootstrap Guile,
  tar, and xz to build the pack, and do not use any profile hooks or
  locales.
* doc/guix.texi (Invoking guix pull): Document the new --bootstrap
  option.
* tests/guix-pack.sh: New file.
* Makefile.am (SH_TESTS): Add guix-pack.sh.
* gnu/packages/package-management.scm (guix) <inputs>: Add util-linux.
2018-03-24 03:04:07 +01:00