summaryrefslogtreecommitdiff
path: root/guix/scripts/pack.scm
Commit message (Collapse)AuthorAge
* Switch to Guile-Gcrypt.Ludovic Courtès2018-09-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes (guix hash) and (guix pk-crypto), which now live as part of Guile-Gcrypt (version 0.1.0.) * guix/gcrypt.scm, guix/hash.scm, guix/pk-crypto.scm, tests/hash.scm, tests/pk-crypto.scm: Remove. * configure.ac: Test for Guile-Gcrypt. Remove LIBGCRYPT and LIBGCRYPT_LIBDIR assignments. * m4/guix.m4 (GUIX_ASSERT_LIBGCRYPT_USABLE): Remove. * README: Add Guile-Gcrypt to the dependencies; move libgcrypt as "required unless --disable-daemon". * doc/guix.texi (Requirements): Likewise. * gnu/packages/bash.scm, guix/derivations.scm, guix/docker.scm, guix/git.scm, guix/http-client.scm, guix/import/cpan.scm, guix/import/cran.scm, guix/import/crate.scm, guix/import/elpa.scm, guix/import/gnu.scm, guix/import/hackage.scm, guix/import/texlive.scm, guix/import/utils.scm, guix/nar.scm, guix/pki.scm, guix/scripts/archive.scm, guix/scripts/authenticate.scm, guix/scripts/download.scm, guix/scripts/hash.scm, guix/scripts/pack.scm, guix/scripts/publish.scm, guix/scripts/refresh.scm, guix/scripts/substitute.scm, guix/store.scm, guix/store/deduplication.scm, guix/tests.scm, tests/base32.scm, tests/builders.scm, tests/challenge.scm, tests/cpan.scm, tests/crate.scm, tests/derivations.scm, tests/gem.scm, tests/nar.scm, tests/opam.scm, tests/pki.scm, tests/publish.scm, tests/pypi.scm, tests/store-deduplication.scm, tests/store.scm, tests/substitute.scm: Adjust imports. * gnu/system/vm.scm: Likewise. (guile-sqlite3&co): Rename to... (gcrypt-sqlite3&co): ... this. Add GUILE-GCRYPT. (expression->derivation-in-linux-vm)[config]: Remove. (iso9660-image)[config]: Remove. (qemu-image)[config]: Remove. (system-docker-image)[config]: Remove. * guix/scripts/pack.scm: Adjust imports. (guile-sqlite3&co): Rename to... (gcrypt-sqlite3&co): ... this. Add GUILE-GCRYPT. (self-contained-tarball)[build]: Call 'make-config.scm' without #:libgcrypt argument. (squashfs-image)[libgcrypt]: Remove. [build]: Call 'make-config.scm' without #:libgcrypt. (docker-image)[config, json]: Remove. [build]: Add GUILE-GCRYPT to the extensions Remove (guix config) from the imported modules. * guix/self.scm (specification->package): Remove "libgcrypt", add "guile-gcrypt". (compiled-guix): Remove #:libgcrypt. [guile-gcrypt]: New variable. [dependencies]: Add it. [*core-modules*]: Remove #:libgcrypt from 'make-config.scm' call. Add #:extensions. [*config*]: Remove #:libgcrypt from 'make-config.scm' call. (%dependency-variables): Remove %libgcrypt. (make-config.scm): Remove #:libgcrypt. * build-aux/build-self.scm (guile-gcrypt): New variable. (make-config.scm): Remove #:libgcrypt. (build-program)[fake-gcrypt-hash]: New variable. Add (gcrypt hash) to the imported modules. Adjust load path assignments. * gnu/packages/package-management.scm (guix)[propagated-inputs]: Add GUILE-GCRYPT. [arguments]: In 'wrap-program' phase, add GUILE-GCRYPT to the search path.
* pack: Correctly report "unknown pack format" errors.Ludovic Courtès2018-08-31
| | | | | * guix/scripts/pack.scm (guix-pack): Fix "unknown pack format" error message.
* Revert "guix: Compress and decompress xz archives in parallel."Marius Bakke2018-07-22
| | | | | | | Threaded compression makes archives non-deterministic: the result depends on the number of threads used for compressing. See <https://bugs.gnu.org/31015>. This reverts commit 63102406f22412bb922de5549deb89d3594a38c0.
* pack: Use guile-for-build for the target system.Ludovic Courtès2018-07-05
| | | | | | | | | | | Until now, running "guix pack -s i686-linux" on an x86_64-linux machine, for instance, would use an x86_64 guile for module derivations. This was OK until now, but would break when passing "--localstatedir" due to the introduction of guile-sqlite3: we'd be using the i686 guile-sqlite3 along with the x86_64 guile. * guix/scripts/pack.scm (guix-pack): Pass the 'system option from OPTS to 'package-derivation'.
* pack: Squashfs build expression refers to (guix store database) & co.Ludovic Courtès2018-06-25
| | | | | | | | | | | | | | Fixes a regression introduced in c45477d2a1a651485feede20fe0f3d15aec48b39. Reported by Christopher Baines <mail@cbaines.net>. * guix/scripts/pack.scm (not-config?, guile-sqlite3&co): New variables. (self-contained-tarball)[not-config?]: Remove. [build]: Use GUILE-SQLITE3&CO for 'with-extensions'. (squashfs-image)[libgcrypt]: New variable. [build]: Use 'source-module-closure', 'make-config.scm', and 'with-extensions'. (docker-image)[not-config?]: Remove.
* pack: Fix guix pack -f docker.Christopher Baines2018-06-24
| | | | | | | | Without this change, running guix pack fails as (guix sets) is missing when compiling (guix build store-copy). * guix/scripts/pack.scm (docker-image): Move (guix build store-copy) to within the source-module-closure call.
* install: Use (guix store database) instead of 'guix-register'.Ludovic Courtès2018-06-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnu/build/install.scm (register-closure): Add #:reset-timestamps? and and #:schema; honor them. Rewrite in terms of 'register-path'. (populate-single-profile-directory): Add #:schema and honor it. Make /var/guix/profiles and /var/guix/gcroots. * gnu/build/vm.scm (root-partition-initializer): Pass #:reset-timestamps? to 'register-closure'. * gnu/system/vm.scm (not-config?): New procedure. (guile-sqlite3&co): New variable. (expression->derivation-in-linux-vm)[config]: New variable. [builder]: Use 'with-extensions'. (iso9660-image)[schema, config]: New variables. Wrap build expression in 'with-extensions'; add 'sql-schema' call. Remove GUIX from INPUTS. (qemu-image)[schema, config]: New variables. Wrap body in 'with-extensions'. (system-docker-image)[not-config?]: Remove. [config]: Use 'make-config.scm'. [schema]: New variable. [build]: Use 'with-extensions'. Add call to 'sql-schema'. Remove GUIX from INPUTS. * gnu/system/file-systems.scm (%store-prefix): Check whether '%store-prefix' is defined. * guix/scripts/pack.scm (self-contained-tarball)[not-config?] [libgcrypt, schema]: New variables. [build]: Wrap in 'with-extensions'. Adjust imported module list to use 'make-config.scm' for (guix config).
* store-copy: 'read-reference-graph' returns a list of records.Ludovic Courtès2018-06-14
| | | | | | | | | | | | | | The previous implementation of 'read-reference-graph' was good enough for many use cases, but it discarded the graph structure, which is useful information in some cases. * guix/build/store-copy.scm (<store-info>): New record type. (read-reference-graph): Rewrite to return a list of <store-info>. (closure-size, populate-store): Adjust accordingly. * gnu/services/base.scm (references-file): Adjust accordingly. * gnu/system/vm.scm (system-docker-image): Likewise. * guix/scripts/pack.scm (squashfs-image, docker-image): Likewise. * tests/gexp.scm ("gexp->derivation #:references-graphs"): Likewise.
* pack: Use 'with-extensions' when referring to (guix docker).Ludovic Courtès2018-06-01
| | | | | | * guix/docker.scm: Use module (json) the normal way. * guix/scripts/pack.scm (docker-image)[build]: Wrap in 'with-extensions'.
* pack: Add support for squashfs images.Ricardo Wurmus2018-05-28
| | | | | | | * guix/scripts/pack.scm (%formats): Add "squashfs" format. (guix-pack): Adjust "archiver" dependent on pack-format. (squashfs-image): New procedure. * doc/guix.texi (Invoking guix pack): Document it.
* pack: Rename "tar" to "archiver".Ricardo Wurmus2018-05-28
| | | | | | * guix/scripts/pack.scm (self-contained-tarball, docker-image): Accept "archiver" argument; remove "tar" argument. (guix-pack): Invoke "build-image" with "archiver" argument.
* pack: Link top-level entries of wrapped packages.Ludovic Courtès2018-05-14
| | | | | | | | | | | | Previously things like: guix pack -R guile guile-json would lead to a profile without Guile-JSON, and to an 'etc/profile' that does not define 'GUILE_LOAD_PATH'. * guix/scripts/pack.scm (wrapped-package)[build]: Link top-level entries of PACKAGE into OUTPUT.
* pack: 'guix pack -S xxx' no longer adds entries twice to the tarball.Ludovic Courtès2018-05-11
| | | | | | | | | * guix/scripts/pack.scm (self-contained-tarball)[build](symlink->directives): Do not add a 'directory' directive for "/". Previously, as soon as we were using '-S /bin=bin' or similar, we would add every entry a second time in the tarball; this would translate as hard links in the tarball, which tar < 1.30 sometimes fails to extract. Pass symlinks defined in DIRECTIVES to 'tar'.
* pack: Add '--relocatable'.Ludovic Courtès2018-05-10
| | | | | | | | | | | | | * 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.
* pack: Fix handling of '-e'.Ludovic Courtès2018-05-07
| | | | | | | | | | Fixes a regression introduced in aad16cc1965ab3488449c262455eb29b15c77e95. 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'.
* pack: Honor package transformation options.Ludovic Courtès2018-05-07
| | | | | | | | | 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'.
* pack: Do not autoload (gnu packages base).Ludovic Courtès2018-05-07
| | | | | | * guix/scripts/pack.scm: Do not autoload (gnu packages base). Previously, we could end up with 'canonical-package' as an unbound variable because of the incorrect autoload spec.
* guix: Rewrite build-docker-image to allow more paths.Chris Marusich2018-03-24
| | | | | | | | | | | * guix/docker.scm (build-docker-image): Rename "path" argument to "prefix" to reflect the fact that it is used as a prefix for the symlink targets. Add the "paths" argument, and remove the "closure" argument, since it is now redundant. Add a "transformations" argument. * guix/scripts/pack.scm (docker-image): Read the profile's reference graph and provide its paths to build-docker-image via the new "paths" argument.
* tests: Add tests for "guix pack".Chris Marusich2018-03-24
| | | | | | | | | | | | | | * 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.
* pack: Adjust '--manifest' documentation.Ludovic Courtès2018-02-16
| | | | | | Reported by Konrad Hinsen <konrad.hinsen@fastmail.net>. * guix/scripts/pack.scm (show-help): Adjust --manifest documentation.
* pack: Add '--manifest'.Konrad Hinsen2018-02-15
| | | | | | | | | * guix/scripts/pack.scm (%options, show-help): Add --manifest. (guix-pack)[manifest-from-args]: New procedure. Use it. * doc/guix.texi (Invoking guix pack): Document --manifest. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* scripts: All commands enable build hooks by default.Ludovic Courtès2017-12-07
| | | | | | | | | * guix/scripts/archive.scm (%default-options): Add 'build-hook?'. * guix/scripts/copy.scm (%default-options): Likewise. * guix/scripts/environment.scm (%default-options): Likewise. * guix/scripts/pack.scm (%default-options): Likewise. * guix/scripts/package.scm (%default-options): Likewise. * guix/scripts/pull.scm (%default-options): Likewise.
* scripts: Remove 'max-silent-time' from the default options.Maxim Cournoyer2017-09-01
| | | | | | | | | | | | | | | | | | | | | Fixes <http://bugs.gnu.org/27157>. Having a finite default `max-silent-time' value for scripts such as 'guix environment' could lead to timeouts when building subtitutes; this was undesirable. This change also fixes client behavior to match the documentation, which is that by default the daemon's settings are honored. * guix/scripts/archive.scm (%default-options): Remove max-silent-time entry. * guix/scripts/copy.scm (%default-options): Likewise. * guix/scripts/environment.scm (%default-options): Likewise. * guix/scripts/pack.scm (%default-options): Likewise. * guix/scripts/package.scm (%default-options): Likewise. * guix/scripts/pull.scm (%default-options): Likewise. * guix/scripts/system.scm (%default-options): Likewise. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* pack: Add "none" compressor.Ricardo Wurmus2017-08-19
| | | | | | | | * guix/scripts/pack.scm (%compressors): Add compressor "none"; prepend extension with ".". (self-contained-tarball, docker-image): Assume compressor extensions start with period. * doc/guix.texi (Invoking guix pack): Document it.
* pack: Use 'guile2.0-json' when building with Guile 2.0.Ludovic Courtès2017-05-20
| | | | | | | | | | | Fixes <http://bugs.gnu.org/27005>. Reported by Pjotr Prins <pjotr.public12@thebird.nl>. Fixes a regression introduced in commit 2252f087d4bd450ab41a71379320467887edfc0f. * guix/scripts/pack.scm (docker-image)[json]: New variable. [build]: Use it.
* ui: Rename '_' to 'G_'.Ludovic Courtès2017-05-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids collisions with '_' when the latter is used as a 'match' pattern for instance. See <https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>. * guix/ui.scm: Rename '_' to 'G_'. * po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly. * build-aux/compile-all.scm (warnings): Remove 'format'. * gnu/packages.scm, gnu/services.scm, gnu/services/shepherd.scm, gnu/system.scm, gnu/system/shadow.scm, guix/gnupg.scm, guix/http-client.scm, guix/import/cpan.scm, guix/import/elpa.scm, guix/import/pypi.scm, guix/nar.scm, guix/scripts.scm, guix/scripts/archive.scm, guix/scripts/authenticate.scm, guix/scripts/build.scm, guix/scripts/challenge.scm, guix/scripts/container.scm, guix/scripts/container/exec.scm, guix/scripts/copy.scm, guix/scripts/download.scm, guix/scripts/edit.scm, guix/scripts/environment.scm, guix/scripts/gc.scm, guix/scripts/graph.scm, guix/scripts/hash.scm, guix/scripts/import.scm, guix/scripts/import/cpan.scm, guix/scripts/import/cran.scm, guix/scripts/import/crate.scm, guix/scripts/import/elpa.scm, guix/scripts/import/gem.scm, guix/scripts/import/gnu.scm, guix/scripts/import/hackage.scm, guix/scripts/import/nix.scm, guix/scripts/import/pypi.scm, guix/scripts/import/stackage.scm, guix/scripts/lint.scm, guix/scripts/offload.scm, guix/scripts/pack.scm, guix/scripts/package.scm, guix/scripts/perform-download.scm, guix/scripts/publish.scm, guix/scripts/pull.scm, guix/scripts/refresh.scm, guix/scripts/size.scm, guix/scripts/substitute.scm, guix/scripts/system.scm, guix/ssh.scm, guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
* pack: Add '--expression'.Ludovic Courtès2017-04-07
| | | | | | | * guix/scripts/pack.scm (%options, show-help): Add '--expression'. (guix-pack)[maybe-package-argument]: New procedure. Use it, and remove variable 'specs'. * doc/guix.texi (Invoking guix pack): Document '--expression'.
* guix: Compress and decompress xz archives in parallel.Efraim Flashner2017-04-02
| | | | | | * guix/scripts/pack.scm (%compressors): Add flag '-T0' when calling "xz". * guix/utils.scm (decompressed-port, compressed-port, compressed-output-port): Same.
* pack: Add '--target'.Ludovic Courtès2017-03-18
| | | | | | | | | | | | * guix/scripts/pack.scm (self-contained-tarball): Add #:target. (docker-image): Add #:target. [build]: Pass it to 'build-docker-image'. (%options, show-help): Add '--target'. (guix-pack): Pass TARGET to 'profile-derivation' and to 'build-image'. * guix/docker.scm (build-docker-image): Add #:system parameter and honor it. * doc/guix.texi (Invoking guix pack): Document '--target'. (Additional Build Options): Refer to the Autoconf manual instead of the obsolete 'configure.info' for cross-compilation.
* pack: Move absolute file name to <compressor>.Ludovic Courtès2017-03-17
| | | | | | | | | | * guix/scripts/pack.scm (<compressor>)[package]: Remove. [command]: Document as being a gexp with an absolute file name. (%compressors): Adjust accordingly. (self-contained-tarball): Simplify PATH expression. Move 'string-join' for the compressor command on the build side. (docker-image): Simplify PATH expression. * tests/pack.scm (%gzip-compressor): Adjust accordingly.
* pack: Allow for "-S /opt/foo=".Ludovic Courtès2017-03-16
| | | | | | | Reported by Andy Wingo. * guix/scripts/pack.scm (%options): Use 'string-split' instead of 'string-tokenize'.
* pack: Honor symlinks in the Docker back-end.Ludovic Courtès2017-03-16
| | | | | | | | * guix/docker.scm (symlink-source, topmost-component): New procedures. (build-docker-image): Add #:symlinks parameter and honor it. Remove hard-coded /bin symlink. * guix/scripts/pack.scm (docker-image): Pass #:symlinks to 'build-docker-image'.
* pack: Use a fixed timestamp in Docker images.Ludovic Courtès2017-03-16
| | | | | | | * guix/docker.scm (build-docker-image): Add #:creation-time parameter. Use SRFI-19 'date->string' instead of 'strftime' et al. * guix/scripts/pack.scm (docker-image)[build]: Pass #:creation-time to 'build-docker-image'.
* pack: Add '--format' option and Docker output support.Ludovic Courtès2017-03-16
| | | | | | | | | | | | | | | | | | | | * guix/docker.scm: Remove dependency on (guix store) and (guix utils). Use (guix build store-copy). Load (json) lazily. (build-docker-image): Remove #:system. Add #:closure, #:compressor, and 'image' parameters. Use 'uname' to determine the architecture. Remove use of 'call-with-temporary-directory'. Use 'read-reference-graph' to compute ITEMS. Honor #:compressor. * guix/scripts/pack.scm (docker-image): New procedure. (%default-options): Add 'format'. (%formats): New variable. (%options, show-help): Add '--format'. (guix-pack): Honor '--format'. * guix/scripts/archive.scm: Remove '--format' option. This reverts commits 1545a012cb7cd78e25ed99ecee26df457be590e9, 01445711db6771cea6122859c3f717f130359f55, and 03476a23ff2d4175b7d3c808726178f764359bec. * doc/guix.texi (Invoking guix pack): Document '--format'. (Invoking guix archive): Remove documentation of '--format'.
* pack: Honor command-line options related to the store.Ludovic Courtès2017-03-16
| | | | | * guix/scripts/pack.scm (guix-pack): Call 'set-build-options-from-command-line'.
* pack: Add unit test.Ludovic Courtès2017-03-14
| | | | | | | * guix/scripts/pack.scm (self-contained-tarball): Add #:tar option. [build](tar-supports-sort?): New variable. Use it. * tests/pack.scm: New file. * Makefile.am (SCM_TESTS): Add it.
* pack: Use maximum compression; use '-n' for gzip.Ludovic Courtès2017-03-14
| | | | | | | | * guix/scripts/pack.scm (<compressor>)[tar-option]: Remove. [command]: New field. (%compressors): Provide complete commands. Use '-9' or equivalent for each compressor; use '-n' for gzip. (self-contained-tarball)[build]: Adjust accordingly.
* pack: Add '--symlink'.Ludovic Courtès2017-03-14
| | | | | | | | | | | | | | * guix/scripts/pack.scm (self-contained-tarball): Add #:symlinks parameter. [build](symlink->directives): New procedure (directives): New variable. Add call to 'evaluate-populate-directive'. Pass the directories among DIRECTIVES to 'tar'. (%default-options): Add 'symlinks'. (%options, show-help): Add '--symlink'. (guix-pack): Honor it. * gnu/build/install.scm (evaluate-populate-directive): Export. * doc/guix.texi (Invoking guix pack): Document it.
* pack: Add '--localstatedir' option.Ludovic Courtès2017-03-14
| | | | | | | | | | | | * guix/scripts/pack.scm (self-contained-tarball): Add #:localstatedir? parameter and honor it. (%options, show-help): Add '--localstatedir'. (guix-pack): Honor it. * gnu/build/install.scm (populate-single-profile-directory): Add #:register? parameter and honor it. * doc/guix.texi (Binary Installation): Use '--localstatedir' in example. (Invoking guix pack): Document it.
* Add 'guix pack'.Ludovic Courtès2017-03-12
* gnu/system/install.scm (self-contained-tarball): Move to... * guix/scripts/pack.scm: ... here. New file. * doc/guix.texi (Binary Installation): Mention 'guix pack'. (Invoking guix pack): New node. * build-aux/make-binary-tarball.scm: Remove. * Makefile.am (MODULES): Add guix/scripts/pack.scm. (EXTRA_DIST): Remove build-aux/make-binary-tarball.scm. (guix-binary.%.tar.xz): Rewrite using 'guix pack'. * build-aux/hydra/gnu-system.scm (tarball-jobs): Adjust accordingly.