summaryrefslogtreecommitdiff
path: root/guix/scripts/pack.scm
Commit message (Collapse)AuthorAge
* wip: guix: pack: Only wrap executable files.series-3304Eric Bavier2020-03-27
| | | | | | | * guix/scripts/pack.scm (wrapped-package)<build>: Build wrappers for executable files and symlink others. * tests/guix-pack-relocatable.sh: Test relocatable git-minimal's "merge-octopus".
* pack: Do not store extended attributes in squashfs images.Ludovic Courtès2020-03-24
| | | | * guix/scripts/pack.scm (squashfs-image)[build](mksquashfs): Pass "-no-xattrs".
* pack: Use 'with-build-handler'.Ludovic Courtès2020-03-22
| | | | | | * guix/scripts/pack.scm (guix-pack): Wrap 'parameterize' in 'with-build-handler'. Remove explicit call to 'show-what-to-build'. Call 'build-derivations' regardless of whether OPTS contains 'dry-run?'.
* pack: Do not create a squashfs "recovery file".Ludovic Courtès2020-03-13
| | | | | | | Reported by Josh Marshall <Josh.Marshall@jax.org>. * guix/scripts/pack.scm (squashfs-image)[build](mksquashfs): Always pass "-no-recovery".
* pack: Make bit-reproducible squashfs images.Ludovic Courtès2020-03-13
| | | | | | | Reported by Josh Marshall <Josh.Marshall@jax.org>. * guix/scripts/pack.scm (squashfs-image)[build](mksquashfs): Always pass "-all-time", "-mkfs-time", "-force-uid", and "-force-gid" to 'mksquashfs'.
* pack: Factorize 'mksquashfs' invocations.Ludovic Courtès2020-03-13
| | | | | | * guix/scripts/pack.scm (squashfs-image)[build](mksquashfs): New procedure. Replace instances of (invoke "mksquashfs" ...) with (mksquashfs ...).
* Adjust module autoloads.Ludovic Courtès2020-01-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Guile < 2.9.7, autoloading a module would give you access to all its bindings. In future versions, autoloading a module gives access only to the listed bindings, as per #:select (see <https://bugs.gnu.org/38895>). This commit adjusts autoloads to the new semantics, allowing Guix to be built with Guile 2.9.7/2.9.8. * guix/build/download.scm <top level>: Remove call to 'module-autoload!'. (load-gnutls): New procedure. (tls-wrap): Call it. * guix/git.scm <top level>: Remove call to 'module-autoload!'. (load-git-submodules): New procedure. (update-submodules): Call it instead of 'resolve-interface'. * gnu/bootloader/grub.scm: Replace #:autoload with #:use-module. * gnu/packages.scm: Likewise. * gnu/packages/ssh.scm: Likewise. * gnu/packages/tex.scm: Likewise. * gnu/services/cuirass.scm: Likewise. * gnu/services/mcron.scm: Likewise. * guix/lint.scm: Augment list of bindings in #:autoload. * guix/scripts/build.scm: Likewise. * guix/scripts/gc.scm: Likewise. * guix/scripts/pack.scm: Likewise. * guix/scripts/publish.scm: Likewise. * guix/scripts/pull.scm: Likewise. * guix/utils.scm: Remove unnecessary #:autoload clauses; replace one of them with #:use-module.
* pack: Save provenance information when using '--manifest'.Ludovic Courtès2019-12-29
| | | | | | * guix/scripts/pack.scm (guix-pack)[manifest-from-args]: Remove 'provenance', and add 'with-provenance' procedure. Wrap 'cond' form in 'with-provenance'.
* profiles: Add 'map-manifest-entries'.Ludovic Courtès2019-12-29
| | | | | * guix/scripts/pack.scm (map-manifest-entries): Move to... * guix/profiles.scm (map-manifest-entries): ... here.
* gnu: Remove squashfs-tools-next.Ricardo Wurmus2019-12-26
| | | | | | * gnu/packages/compression.scm (squashfs-tools-next): Remove variable. * guix/scripts/pack.scm (squashfs-image, guix-pack): Use squashfs-tools. * tests/pack.scm: Use squashfs-tools.
* pack: Clarify the /bin/sh requirement for Singularity.Ludovic Courtès2019-12-10
| | | | | | | | | * guix/scripts/pack.scm (squashfs-image)[symlinks*]: New variable. [build]: Use it instead of SYMLINKS. (guix-pack): Emit a warning and a hint when "bash" and "bash-minimal" are missing and PACK-FORMAT is 'squashfs. * doc/guix.texi (Invoking guix pack): Document the /bin/sh requirement for Singularity.
* Use 'offload?' instead of 'build-hook?' internally.Ludovic Courtès2019-11-26
| | | | | | | | | | | | | | | | | | | | * guix/scripts/archive.scm (%default-options): Replace 'build-hook?' with 'offload?'. * guix/scripts/build.scm (set-build-options-from-command-line): Pass #:offload? instead of #:use-build-hook?. (%standard-build-options): Use the 'offload? key instead of 'build-hook?. (%default-options): Replace 'build-hook?' with 'offload?'. * guix/scripts/copy.scm (%default-options): Likewise. * guix/scripts/deploy.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. * guix/scripts/time-machine.scm (%default-options): Likewise. * guix/store.scm (set-build-options): Have #:use-build-hook? default to *unspecified*. Add #:offload?. Add call to 'warn-about-deprecation' when #:use-build-hook? is specified.
* pack: Allow multiple '--manifest' options.Ludovic Courtès2019-11-22
| | | | | | | * guix/scripts/pack.scm (guix-pack): Collect 'manifest' options, and concatenate the resulting manifests. * tests/guix-pack.sh: Test it. * doc/guix.texi (Invoking guix pack): Document it.
* pack: Add "--derivation".Ludovic Courtès2019-11-21
| | | | | | | * guix/scripts/pack.scm (%options, show-help): Add "--derivation". (guix-pack): Honor it. * tests/guix-pack.sh: Test it. * doc/guix.texi (Invoking guix pack): Document it.
* Merge branch 'master' into core-updatesLudovic Courtès2019-09-17
|\
| * pack: Provide a meaningful "repository name" for Docker.Ludovic Courtès2019-09-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, images produced by 'guix pack -f docker' would always show up as "profile" in the output of 'docker images'. With this change, 'docker images' shows a name constructed from the packages found in the image--e.g., "bash-coreutils-grep-sed". * guix/docker.scm (canonicalize-repository-name): New procedure. (generate-tag): Remove. (manifest): Add optional 'tag' parameter and honor it. (repositories): Likewise. (build-docker-image): Add #:repository parameter and pass it to 'manifest' and 'repositories'. * guix/scripts/pack.scm (docker-image)[build]: Compute 'tag' and pass it as #:repository to 'build-docker-image'.
| * pack: Add packages in the order in which they appear on the command line.Ludovic Courtès2019-09-16
| | | | | | | | | | * guix/scripts/pack.scm (guix-pack)[manifest-from-args](packages): Reverse order of packages taken from OPTS.
* | Merge branch 'master' into core-updatesMark H Weaver2019-08-29
|\|
| * pack: Create /tmp in Docker images.Ludovic Courtès2019-08-27
| | | | | | | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/37161>. * guix/scripts/pack.scm (docker-image)[build]: Add a 'directory' entry for "/tmp" to DIRECTIVES. * tests/pack.scm ("docker-image + localstatedir"): Test the presence of /tmp. * gnu/tests/docker.scm (run-docker-test)["Load docker image and run it"]: Test the presence and permission bits of "/tmp".
| * docker: Take a list of directives instead of a list of symlinks.Ludovic Courtès2019-08-27
| | | | | | | | | | | | | | | | | | | | | | * guix/docker.scm (symlink-source, topmost-component): Remove. (directive-file): New procedure. (build-docker-image): Remove #:symlinks and add #:extra-files. Make a sub-directory "extra" and call 'evaluate-populate-directive' for EXTRA-FILES in that directory. * guix/scripts/pack.scm (docker-image)[build](symlink->directives, directives): New procedures. Pass #:extra-files instead of #:symlinks to 'build-docker-image'.
| * pack: '-R' honors the requested output.Ludovic Courtès2019-08-23
| | | | | | | | | | | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/36925>. Reported by Jesse Gibbons <jgibbons2357@gmail.com>. * guix/scripts/pack.scm (wrapped-package): Add 'output*' parameter. [build]: Define 'input' and 'target'; use them instead of #$package and #$output, respectively. (wrapped-manifest-entry): New procedure. (map-manifest-entries): Call PROC directly. (guix-pack): Pass WRAPPED-MANIFEST-ENTRY to 'map-manifest-entries'.
* | Merge branch 'master' into core-updatesMarius Bakke2019-07-31
|\|
| * maint: Switch to Guile-JSON 3.x.Ludovic Courtès2019-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Guile-JSON 3.x is incompatible with Guile-JSON 1.x, which we relied on until now: it maps JSON dictionaries to alists (instead of hash tables), and JSON arrays to vectors (instead of lists). This commit is about adjusting all the existing code to this new mapping. * m4/guix.m4 (GUIX_CHECK_GUILE_JSON): New macro. * configure.ac: Use it. * doc/guix.texi (Requirements): Mention the Guile-JSON version. * guix/git-download.scm (git-fetch)[guile-json]: Use GUILE-JSON-3. * guix/import/cpan.scm (string->license): Expect vectors instead of lists. (module->dist-name): Use 'json-fetch' instead of 'json-fetch-alist'. (cpan-fetch): Likewise. * guix/import/crate.scm (crate-fetch): Likewise, and call 'vector->list' for DEPS. * guix/import/gem.scm (rubygems-fetch): Likewise. * guix/import/json.scm (json-fetch-alist): Remove. * guix/import/pypi.scm (pypi-fetch): Use 'json-fetch' instead of 'json-fetch-alist'. (latest-source-release, latest-wheel-release): Call 'vector->list' on RELEASES. * guix/import/stackage.scm (stackage-lts-info-fetch): Use 'json-fetch' instead of 'json-fetch-alist'. (lts-package-version): Use 'vector->list'. * guix/import/utils.scm (hash-table->alist): Remove. (alist->package): Pass 'vector->list' on the inputs fields, and default to the empty vector. * guix/scripts/import/json.scm (guix-import-json): Remove call to 'hash-table->alist'. * guix/swh.scm (define-json-reader): Expect pair? or null? instead of hash-table?. [extract-field]: Use 'assoc-ref' instead of 'hash-ref'. (json->branches): Use 'map' instead of 'hash-map->list'. (json->checksums): Likewise. (json->directory-entries, origin-visits): Call 'vector->list' on the result of 'json->scm'. * tests/import-utils.scm ("alist->package with dependencies"): New test. * gnu/installer.scm (build-compiled-file)[builder]: Use GUILE-JSON-3. * gnu/installer.scm (installer-program)[installer-builder]: Likewise. * gnu/installer/locale.scm (iso639->iso639-languages): Use 'assoc-ref' instead of 'hash-ref', and pass vectors through 'vector->list'. (iso3166->iso3166-territories): Likewise. * gnu/system/vm.scm (system-docker-image)[build]: Use GUILE-JSON-3. * guix/docker.scm (manifest, config): Adjust for Guile-JSON 3. * guix/scripts/pack.scm (docker-image)[build]: Use GUILE-JSON-3. * guix/import/github.scm (fetch-releases-or-tags): Update docstring. (latest-released-version): Use 'assoc-ref' instead of 'hash-ref'. Pass the result of 'fetch-releases-or-tags' to 'vector->list'. * guix/import/launchpad.scm (latest-released-version): Likewise.
* | Merge branch 'master' into core-updatesMarius Bakke2019-07-22
|\|
| * pack: Pass a list as the entry point for 'build-docker-image'.Ludovic Courtès2019-07-22
| | | | | | | | | | * guix/scripts/pack.scm (docker-image)[build]: Pass a list as #:entry-point, not a string.
* | Merge branch 'master' into core-updatesMarius Bakke2019-07-12
|\| | | | | | | | | | | | | | | | | Conflicts: gnu/local.mk gnu/packages/python-xyz.scm gnu/packages/xml.scm guix/gexp.scm po/guix/POTFILES.in
| * pack: 'squashfs' backend records the profile's search paths.Ludovic Courtès2019-07-04
| | | | | | | | | | | | | | | | | | * guix/scripts/pack.scm (singularity-environment-file): New procedure. (squashfs-image): Use it, and create /.singularity/env/90-environment.sh. * gnu/tests/singularity.scm (run-singularity-test)["singularity run, with environment"]: New test, currently skipped. * gnu/tests/singularity.scm (build-tarball&run-singularity-test): Add GUILE-JSON to the profile.
| * pack: 'docker' backend records the profile's search paths.Ludovic Courtès2019-07-04
| | | | | | | | | | | | | | | | | | | | | | | | * guix/docker.scm (config): Add #:environment parameter and honor it. (build-docker-image): Likewise, and pass it to 'config'. * guix/scripts/pack.scm (docker-image): Import (guix profiles) and (guix search-paths). Call 'profile-search-paths' and pass #:environment to 'build-docker-image'. * gnu/tests/docker.scm (run-docker-test)["Load docker image and run it"]: Add example that expects (json) to be available. * gnu/tests/docker.scm (build-tarball&run-docker-test): Replace %BOOTSTRAP-GUILE by GUILE-2.2 and GUILE-JSON in the environment.
* | Merge branch 'master' into core-updatesLudovic Courtès2019-06-13
|\|
| * pack: Fix 'guix pack -f docker'.Ludovic Courtès2019-06-10
| | | | | | | | | | | | | | Regression introduced in a0f352b30f4869a7af7017b8a5011ac7602dd115. * guix/scripts/pack.scm (docker-image): Check whether ENTRY-POINT is true before returning (string-append #$profile ...).
| * pack: Add '--entry-point'.Ludovic Courtès2019-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/scripts/pack.scm (self-contained-tarball): Add #:entry-point and warn when it's true. (squashfs-image): Add #:entry-point and honor it. (docker-image): Add #:entry-point and honor it. (%options, show-help): Add '--entry-point'. (guix-pack): Honor '--entry-point' and pass #:entry-point to BUILD-IMAGE. * gnu/tests/docker.scm (run-docker-test): Test 'docker run' with the default entry point. (build-tarball&run-docker-test): Pass #:entry-point to 'docker-image'. * doc/guix.texi (Invoking guix pack): Document it. * gnu/tests/singularity.scm (run-singularity-test)["singularity run"]: New test. (build-tarball&run-singularity-test): Pass #:entry-point to 'squashfs-image'.
* | Merge branch 'staging' into core-updatesMarius Bakke2019-05-25
|\|
| * pack: Warn when building an empty pack.Ludovic Courtès2019-05-22
| | | | | | | | | | * guix/scripts/pack.scm (guix-pack): Warn when MANIFEST has zero entries.
| * pack: Add '--root'.Ludovic Courtès2019-05-22
| | | | | | | | | | | | | | * 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.
* | Merge branch 'master' into core-updatesMarius Bakke2019-05-01
|\|
| * scripts: More commands default to verbosity level 1.Ludovic Courtès2019-04-04
| | | | | | | | | | | | | | * guix/scripts/environment.scm (%default-options): Change 'verbosity' to 1. * guix/scripts/pack.scm (%default-options): Likewise. * guix/scripts/system.scm (guix-system): Likewise, except for the 'build' command.
| * gexp: Remove workarounds for <https://bugs.gnu.org/15602>.Ludovic Courtès2019-04-04
| | | | | | | | | | | | | | * gnu/services/base.scm (hydra-key-authorization)[aaa]: Remove. [default-acl]: Don't import it. * guix/scripts/pack.scm (store-database)[build]: Don't import (gnu build install).
* | Merge branch 'staging' into core-updatesMarius Bakke2019-03-23
|\|
| * pack: Create an empty /home directory for '-f squashfs'.Ludovic Courtès2019-03-19
| | | | | | | | | | | | Fixes <https://bugs.gnu.org/34914>. * guix/scripts/pack.scm (squashfs-image)[build]: Pass "-p /home d 555 0 0".
| * pack: Produce relative symlinks when using '-f squashfs'.Ludovic Courtès2019-03-19
| | | | | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/34913>. * guix/scripts/pack.scm (squashfs-image)[build]: Use 'relative-file-name' when creating SYMLINKS. * guix/scripts/pack.scm (guix-pack): Pass #:relative-symlinks? #t when PACK-FORMAT is 'squashfs.
| * pack: Construct inferior package names correctly.P.C. Shyamshankar2019-03-15
| | | | | | | | | | | | | | * guix/scripts/pack.scm (wrapped-package): now correctly constructs full names of inferior packages. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
| * pack: "-RR" produces PRoot-enabled relocatable binaries.Ludovic Courtès2019-03-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnu/packages/aux-files/run-in-namespace.c (exec_with_proot): New function. (main): When 'clone' fails, call 'rm_rf'. [PROOT_PROGRAM]: When 'clone' fails, call 'exec_with_proot'. * guix/scripts/pack.scm (wrapped-package): Add #:proot?. [proot]: New procedure. [build]: Compile with -DPROOT_PROGRAM when PROOT? is true. * guix/scripts/pack.scm (%options): Set the 'relocatable?' value to 'proot when "-R" is passed several times. (guix-pack): Pass #:proot? to 'wrapped-package'. * tests/guix-pack-relocatable.sh: Use "-RR" on Intel systems that lack user namespace support. * doc/guix.texi (Invoking guix pack): Document -RR.
* | Merge branch 'staging' into core-updatesMarius Bakke2019-03-10
|\|
| * pack: Add '--save-provenance'.Ludovic Courtès2019-03-07
| | | | | | | | | | | | * guix/scripts/pack.scm (show-help, %options): Add '--save-provenance'. (guix-pack)[manifest-from-args]: Honor it. * doc/guix.texi (Invoking guix pack): Document it.
* | Merge branch 'staging' into core-updatesMarius Bakke2019-02-20
|\|
| * Avoid name clash with 'build' from (guix store) and (guix status).Ludovic Courtès2019-02-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 976ef2d97887d16eab8d4eb9dad811786b04d690, (guix status) exports 'build', which clashes with 'build' from (guix store). * build-aux/run-system-tests.scm: Select 'with-status-verbosity' from (guix status). * guix/scripts/archive.scm: Likewise. * guix/scripts/build.scm: Likewise. * guix/scripts/copy.scm: Likewise. * guix/scripts/environment.scm: Likewise. * guix/scripts/pack.scm: Likewise. * guix/scripts/package.scm: Likewise. * guix/scripts/pull.scm: Likewise. * guix/scripts/system.scm: Likewise.
| * pack, vm: Fix incorrect use of 'package-transitive-propagated-inputs'.Ludovic Courtès2019-02-11
| | | | | | | | | | | | | | | | | | | | In practice the error was not triggered because 'package-transitive-propagated-inputs' currently returns the empty list for these two packages. * guix/scripts/pack.scm (gcrypt-sqlite3&co): Remove labels from the result. * gnu/system/vm.scm (gcrypt-sqlite3&co): Likewise.
* | Merge branch 'master' into core-updatesRicardo Wurmus2019-02-06
|\|
| * guix build: Re-purpose '--verbosity' and add '--debug'.Ludovic Courtès2019-01-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous '--verbosity' option was misleading and rarely what users were looking for. The new option provides a consistent way to choose whether or not to display the build log. * guix/scripts/build.scm (show-build-options-help): Remove "--verbosity" and add "--debug". (set-build-options-from-command-line): Use the 'debug key of OPTS for #:verbosity. (%standard-build-options): Change "verbosity" to "debug". Use 'string->number*' instead of 'string->number'. (%default-options): Change 'verbosity to 'debug and add a 'verbosity key. (show-help): Add '--verbosity'. (%options): Likewise, and change '--quiet' to set the 'verbosity key of RESULT. (guix-build): Use 'with-status-verbosity' instead of parameterizing CURRENT-BUILD-OUTPUT-PORT, honor the 'verbosity key of OPTS, and remove 'quiet?'. * guix/scripts/environment.scm (show-help, %options): Add '--verbosity'. (%default-options): Add 'debug'. (guix-environment): Honor the 'verbosity key of OPTS. * guix/scripts/pack.scm (%default-options): Add 'debug. (%options, show-help): Add '--verbosity'. (guix-pack): Honor the 'verbosity key of OPTS. * guix/scripts/package.scm (%default-options): Add 'debug. (show-help, %options): Add '--verbosity'. Mark '--verbose' as deprecated and change it to set 'verbosity. (guix-package): Honor the 'verbosity key of OPTS and remove 'verbose?'. * guix/scripts/pull.scm (%default-options): Add 'debug. (show-help, %options): Add '--verbosity'. (guix-pull): Honor the 'verbosity key of OPTS. * guix/scripts/system.scm (show-help, %options): Add '--verbosity'. (%default-options): Add 'debug. (guix-system): Honor the 'verbosity key of OPTS. * guix/scripts/archive.scm (%default-options): Add 'debug, 'print-build-trace?, 'print-extended-build-trace?, and 'multiplexed-build-output?. (show-help, %options): Add '--verbosity'. (export-from-store): Remove call to 'set-build-options-from-command-line'. (guix-archive): Wrap body in 'with-status-verbosity'. Add call to 'set-build-options-from-command-line. * doc/guix.texi (Common Build Options): Document '--verbosity' and '--debug'. (Additional Build Options): Adjust description of '--quiet'.
| * status: Add 'with-status-verbosity'.Ludovic Courtès2019-01-11
| | | | | | | | | | | | | | | | | | | | | | | | | | * guix/status.scm (logger-for-level, call-with-status-verbosity): New procedures. (with-status-verbosity): New macro. * guix/scripts/environment.scm (guix-environment): Use 'with-status-verbosity' instead of 'with-status-report'. * guix/scripts/pack.scm (guix-pack): Likewise. * guix/scripts/package.scm (guix-package): Likewise. * guix/scripts/pull.scm (guix-pull): Likewise. * guix/scripts/system.scm (guix-system): Likewise. * build-aux/run-system-tests.scm (run-system-tests): Likewise.