summaryrefslogtreecommitdiff
path: root/guix/scripts/pack.scm
Commit message (Collapse)AuthorAge
* scripts: Add --list-systems and --list-targets options.Mathieu Othacehe2022-05-22
| | | | | | | | | | | | | | | | | | | | | | | | | Also factorize the --system and --target build options. Check that the passed system and target arguments are known platforms. * doc/guix.texi (Additional Build Options): Document the new --list-systems and --list-targets options. * guix/scripts/build.scm (show-cross-build-options-help, show-emulated-build-options-help, list-systems, list-targets): New procedures. (%standard-cross-build-options, %standard-emulated-build-options): New variables. (show-help): Remove --system and --target entries and use show-cross-build-options-help and show-emulated-build-options-help procedures instead. (%options): Remove --system and --target entries and use %standard-cross-build-options and %standard-emulated-build-options variables instead. * guix/scripts/archive.scm (show-help, %options): Adapt them. * guix/scripts/environment.scm: Ditto. * guix/scripts/graph.scm: Ditto. * guix/scripts/pack.scm: Ditto. * guix/scripts/pull.scm: Ditto. * guix/scripts/size.scm: Ditto. * guix/scripts/weather.scm: Ditto. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* scripts: pack: Fix typo.Alex Griffin2022-04-26
| | | | | | * guix/scripts/pack.scm (compressor-extenstion): Fix typo. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* pack: Fix match error for multi-packages deb packs.Maxim Cournoyer2022-04-23
| | | | | | | * guix/scripts/pack.scm: Remove duplicated copyright line. (debian-archive)[single-entry]: Match one or anything, not one or zero. Reported-by: jgart <jgart@dismail.de>
* Merge branch 'master' into core-updatesLudovic Courtès2021-07-18
|\
| * pack: Streamline how files are included in tarballs.Maxim Cournoyer2021-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thanks to Guillem Jover <guillem@debian.org> on the OFTC's #debian-dpkg channel for helping with troubleshooting. Letting GNU Tar recursively walk the complete files hierarchy side-steps the risks associated with providing a list of file names: 1. Duplicated files in the archive (recorded as hard links by GNU Tar) 2. Missing parent directories. The above would cause dpkg to malfunction, for example by aborting early and skipping triggers when there were missing parent directories. * guix/scripts/pack.scm (self-contained-tarball/builder): Do not call POPULATE-SINGLE-PROFILE-DIRECTORY, which creates extraneous files such as /root. Instead, call POPULATE-STORE and INSTALL-DATABASE-AND-GC-ROOTS individually to more precisely generate the file system. Replace the list of files by the current directory, "." and streamline the way options are passed. * gnu/system/file-systems.scm (reduce-directories): Remove procedure. * tests/file-systems.scm ("reduce-directories"): Remove test.
| * pack/deb: Add default section and priority fields to the control file.Maxim Cournoyer2021-07-18
| | | | | | | | | | | | | | | | These fields, while optional per dpkg, are required by other tools such as reprepro, commonly used to generate apt repositories. * guix/scripts/pack.scm (debian-archive): Set the control file section field to 'misc' and the priority field to 'optional'.
| * pack: Allow embedding custom control files in deb packs.Maxim Cournoyer2021-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/scripts/pack.scm (self-contained-tarball/builder) [extra-options]: New argument. (self-contained-tarball, squashfs-image, docker-image) (debian-archive): Likewise. Remove two TODO comments. Document EXTRA-OPTIONS. Use the custom control files when provided. (%deb-format-options): New variable. (show-deb-format-options, show-deb-format-options/detailed): New procedures. (%options): Register new options. (show-help): Augment with new usage. (guix-pack): Validate and propagate new argument values. * doc/guix.texi (Invoking guix pack)[deb]: Document how to list advanced options. Add an example. * tests/pack.scm (deb archive...): Provide extra-options to the debian-archive procedure, and validate that the provided files are embedded in the pack.
| * pack: Add support for the deb format.Maxim Cournoyer2021-06-29
| | | | | | | | | | | | | | | | | | | | | | * .dir-locals.el (scheme-mode)[gexp->derivation]: Define indentation rule. * guix/scripts/pack.scm (debian-archive): New procedure. (%formats): Register the new deb format. (show-formats): Add it to the usage string. * tests/pack.scm (%ar-bootstrap): New variable. (deb archive with symlinks): New test. * doc/guix.texi (Invoking guix pack): Document it. * NEWS: Add news entry.
| * pack: Prevent duplicate files in tar archives.Maxim Cournoyer2021-06-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tar translate duplicate files in the archive into hard links. These can cause problems, as not every tool support them; for example dpkg doesn't. * gnu/system/file-systems.scm (reduce-directories): New procedure. (file-prefix?): Lift the restriction on file prefix. The procedure can be useful for comparing relative file names. Adjust doc. (file-name-depth): New procedure, extracted from ... (btrfs-store-subvolume-file-name): ... here. * guix/scripts/pack.scm (self-contained-tarball/builder): Use reduce-directories. * tests/file-systems.scm ("reduce-directories"): New test.
| * pack: Improve naming of the packs store file names.Maxim Cournoyer2021-06-29
| | | | | | | | | | | | | | | | | | | | | | Instead of just naming them by their pack type, add information from the package(s) they contain to make it easier to differentiate them. * guix/scripts/pack.scm (define-with-source): New macro. (manifest->friendly-name): Extract procedure from ... (docker-image): ... here, now defined via the above macro. Adjust REPOSITORY argument value accordingly. (guix-pack): Derive NAME using MANIFEST->FRIENDLY-NAME.
| * pack: Fix typo.Maxim Cournoyer2021-06-29
| | | | | | | | * guix/scripts/pack.scm (self-contained-tarball/builder): Fix typo.
| * pack: Factorize base tar options.Maxim Cournoyer2021-06-29
| | | | | | | | | | | | | | | | * guix/docker.scm (%tar-determinism-options): Move to a new module and rename to `tar-base-options'. Adjust references accordingly. * guix/build/pack.scm: New file. * Makefile.am (MODULES): Register it. * guix/scripts/pack.scm (self-contained-tarball/builder): Use it.
| * pack: Extract builder code from self-contained-tarball.Maxim Cournoyer2021-06-29
| | | | | | | | | | | | | | | | | | This is made to allow reusing it for the debian-archive pack format, added in a subsequent commit. * guix/scripts/pack.scm (self-contained-tarball/builder): New procedure, containing the build code extracted from self-contained-tarball. (self-contained-tarball): Use the above procedure.
* | Merge branch 'master' into core-updatesMarius Bakke2021-06-19
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note: this merge actually changes the 'curl' and 'python-attrs' derivations, as part of solving caf4a7a2770ef4d05a6e18f40d602e51da749ddc and 12964df69a99de6190422c752fef65ef813f3b6b respectively. 4604d43c0e (gnu: gnutls@3.6.16: Fix cross-compilation.) was ignored because it cannot currently be tested. Conflicts: gnu/local.mk gnu/packages/aidc.scm gnu/packages/boost.scm gnu/packages/curl.scm gnu/packages/nettle.scm gnu/packages/networking.scm gnu/packages/python-xyz.scm gnu/packages/tls.scm
| * pack: Fix the system value passed to build-docker-image.Maxim Cournoyer2021-06-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, the system value would be passed as x86_64 when using a i686-linux emulated system, e.g.: $ guix environment --system=i686-linux --ad-hoc guile -- \ guile -c '(display (utsname:machine (uname))) (newline)' x86_64 This change uses the Guile builtin %host-type variable, which doesn't have this problem: $ guix environment --system=i686-linux --ad-hoc guile -- \ guile -c '(display %host-type) (newline)' i686-unknown-linux-gnu * guix/scripts/pack.scm (docker-image)[#:system] Use %host-type as a fall-back when target is not defined. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* | Merge branch 'master' into core-updatesChristopher Baines2021-03-06
|\|
| * profiles: 'package->manifest-entry' preserves transformations by default.Ludovic Courtès2021-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, transformations applied from a manifest (rather than via "guix install") would be lost. This change fixes that and simplifies things. Reported by zimoun at <https://lists.gnu.org/archive/html/guix-devel/2021-02/msg00153.html>. * guix/profiles.scm (default-properties): New procedure. (package->manifest-entry): Use it for #:properties. * guix/scripts/pack.scm (guix-pack)[with-transformations]: Remove. Remove caller. * guix/scripts/package.scm (transaction-upgrade-entry): Remove calls to 'manifest-entry-with-transformations'. * tests/guix-package.sh: Add test. * tests/transformations.scm ("options->transformation + package->manifest-entry"): New test.
* | Merge branch 'staging' into 'core-updates'.Maxim Cournoyer2021-01-13
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: gnu/local.mk gnu/packages/cmake.scm gnu/packages/curl.scm gnu/packages/gl.scm gnu/packages/glib.scm gnu/packages/guile.scm gnu/packages/node.scm gnu/packages/openldap.scm gnu/packages/package-management.scm gnu/packages/python-xyz.scm gnu/packages/python.scm gnu/packages/tls.scm gnu/packages/vpn.scm gnu/packages/xorg.scm
| * database: Remove #:deduplicate? from 'register-items'.Ludovic Courtès2020-12-15
| | | | | | | | | | | | | | | | | | | | | | | | It is now up to the caller to deduplicate store contents. * guix/store/database.scm (register-items): Remove #:deduplicate? parameter and call to 'deduplicate'. (register-path): Call 'deduplicate' when #:deduplicate? is true. * gnu/build/image.scm (register-closure): Adjust call accordingly. * gnu/build/vm.scm (register-closure): Likewise. * guix/nar.scm (finalize-store-file): Likewise. * guix/scripts/pack.scm (store-database): Likewise.
| * store-copy: 'populate-store' can optionally deduplicate files.Ludovic Courtès2020-12-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now deduplication was performed as an additional pass after copying files, which involve re-traversing all the files that had just been copied. * guix/store/deduplication.scm (copy-file/deduplicate): New procedure. * tests/store-deduplication.scm ("copy-file/deduplicate"): New test. * guix/build/store-copy.scm (populate-store): Add #:deduplicate? parameter and honor it. * tests/gexp.scm ("gexp->derivation, store copy"): Pass #:deduplicate? #f to 'populate-store'. * gnu/build/image.scm (initialize-root-partition): Pass #:deduplicate? to 'populate-store'. Pass #:deduplicate? #f to 'register-closure'. * gnu/build/vm.scm (root-partition-initializer): Likewise. * gnu/build/install.scm (populate-single-profile-directory): Pass #:deduplicate? #f to 'populate-store'. * gnu/build/linux-initrd.scm (build-initrd): Likewise. * guix/scripts/pack.scm (self-contained-tarball)[import-module?]: New procedure. [build]: Pass it as an argument to 'source-module-closure'. * guix/scripts/pack.scm (squashfs-image)[build]: Wrap in 'with-extensions'. * gnu/system/linux-initrd.scm (expression->initrd)[import-module?]: New procedure. [builder]: Pass it to 'source-module-closure'. * gnu/system/install.scm (cow-store-service-type)[import-module?]: New procedure. Pass it to 'source-module-closure'.
| * database: Remove #:reset-timestamps? from 'register-items'.Ludovic Courtès2020-12-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The assumption now is that the caller took care of resetting timestamps and permissions. * guix/store/database.scm (register-items): Remove #:reset-timestamps? parameter and the call to 'reset-timestamps'. (register-path): Adjust accordingly and add call to 'reset-timestamps'. * gnu/build/image.scm (register-closure): Remove #:reset-timestamps? parameter to 'register-items'. * gnu/build/vm.scm (register-closure): Likewise. * guix/nar.scm (finalize-store-file): Adjust accordingly. * guix/scripts/pack.scm (store-database)[build]: Likewise.
* | Merge remote-tracking branch 'origin/master' into core-updatesChristopher Baines2020-11-29
|\|
| * transformations: Show '--help-transform' only where applicable.Ludovic Courtès2020-11-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/44773>. Reported by Florian Pelz <pelzflorian@pelzflorian.de>. This fixes a regression introduced in 6701f64f7329cdbeda70bcaf38523c9098e5a938. * guix/transformations.scm (%transformation-options): Add "--help-transform". (show-transformation-options-help): Rename to... (show-transformation-options-help/detailed): ... this. (show-transformation-options-help): New public procedure. * guix/scripts/build.scm (show-build-options-help): Remove "--help-transform". (%standard-build-options): Likewise. (show-help): Call 'show-transformation-options-help'. * guix/scripts/environment.scm (show-help): Likewise. * guix/scripts/graph.scm (show-help): Likewise. * guix/scripts/install.scm (show-help): Likewise. * guix/scripts/pack.scm (show-help): Likewise. * guix/scripts/package.scm (show-help): Likewise. * guix/scripts/upgrade.scm (show-help): Likewise.
| * pack: Expose some bindings for third-party use.John Soo2020-11-13
| | | | | | | | | | | | | | * guix/scripts/pack.scm (compressor-name, compressor-extension, compressor-command, %compressors, %formats): Export. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| * pack: Do not include the host (guix config).Ludovic Courtès2020-11-05
| | | | | | | | | | * guix/scripts/pack.scm (store-database)[build]: Import a synthetic (guix config).
| * guix build: Move transformation options to (guix transformations).Ludovic Courtès2020-10-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/transformations.scm: New file. * tests/scripts-build.scm: Rename to... * tests/transformations.scm: ... this. * Makefile.am (MODULES): Add 'guix/transformations.scm'. (SCM_TESTS): Adjust to rename. * guix/scripts/build.scm (numeric-extension?) (tarball-base-name, <downloaded-file>, download-to-store*) (compile-downloaded-file, package-with-source) (transform-package-source, evaluate-replacement-specs) (transform-package-inputs, transform-package-inputs/graft) (%not-equal, package-git-url, evaluate-git-replacement-specs) (transform-package-source-branch, transform-package-source-commit) (transform-package-source-git-url, package-dependents/spec) (package-toolchain-rewriting, transform-package-toolchain) (transform-package-with-debug-info, transform-package-tests) (%transformations, transformation-procedure, %transformation-options) (show-transformation-options-help, options->transformation) (package-transformations): Move to (guix transformations). * guix/scripts/environment.scm: Adjust accordingly. * guix/scripts/graph.scm: Likewise. * guix/scripts/install.scm: Likewise. * guix/scripts/pack.scm: Likewise. * guix/scripts/package.scm: Likewise. * guix/scripts/upgrade.scm: Likewise. * po/guix/POTFILES.in: Add 'guix/transformations.scm'.
| * guix build: 'options->transformation' no longer takes a 'store' parameter.Ludovic Courtès2020-10-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/scripts/build.scm (transform-package-source) (transform-package-inputs, transform-package-inputs/graft) (transform-package-source-branch, transform-package-source-commit) (transform-package-source-git-url, transform-package-toolchain) (transform-package-with-debug-info, transform-package-tests): Remove 'store' parameter. (options->transformation, options->derivations): Adjust accordingly. * guix/scripts/environment.scm (options/resolve-packages): Likewise. * guix/scripts/graph.scm (guix-graph): Likewise. * guix/scripts/pack.scm (guix-pack): Likewise. * guix/scripts/package.scm (transaction-upgrade-entry): Likewise. (process-actions): Likewise. * tests/scripts-build.scm ("options->transformation, no transformations") ("options->transformation, with-source, replacement"): Adjust tests. ("options->transformation, with-source") ("options->transformation, with-source, with version") ("options->transformation, with-source, PKG=URI"): Use 'lower-object' to compute the store file name of the source. ("options->transformation, with-source, no matches"): Remove 'with-store' and adjust accordingly. ("options->transformation, with-input"): Likewise. ("options->transformation, with-graft"): Likewise. ("options->transformation, with-branch"): Likewise. ("options->transformation, with-commit"): Likewise. ("options->transformation, with-git-url"): Likewise. ("options->transformation, with-git-url + with-branch"): Likewise. ("options->transformation, with-c-toolchain"): Likewise. ("options->transformation, with-c-toolchain twice"): Likewise. ("options->transformation, with-c-toolchain, no effect"): Likewise. ("options->transformation, with-debug-info"): Likewise. ("options->transformation, without-tests"): Likewise.
| * guix: pack: Only wrap executable files.Eric Bavier2020-10-30
| | | | | | | | | | | | | | * guix/scripts/pack.scm (wrapped-package)<build>: Build wrappers for executable files and symlink others. * tests/guix-pack-relocatable.sh: Test relocatable example of mixed executable and non-executable files.
| * guix: pack: Fix offset calculation for store directory mount point.Eric Bavier2020-10-30
| | | | | | | | | | | | | | | | | | | | Fixes wrapping of non-package things, where the target store directory may differ in length from the original. * guix/scripts/pack.scm (wrapped-package)<build-wrapper>: Define WRAPPER_PROGRAM macro with wrapper's file name. * gnu/packages/aux-files/run-in-namespace.c (main): Offset index by len of that file name.
| * guix build: Move package transformation options behind '--help-transform'.Ludovic Courtès2020-10-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change declutters the '--help' output. * guix/scripts/build.scm (show-build-options-help) (%standard-build-options): Add '--help-transform'. (show-transformation-options-help): Make private. (show-help): Remove call to 'show-transformation-options-help'. * guix/scripts/build.scm (show-help): Likewise. * guix/scripts/environment.scm (show-help): Likewise. * guix/scripts/graph.scm (show-help): Likewise. * guix/scripts/install.scm (show-help): Likewise. * guix/scripts/pack.scm (show-help): Likewise. * guix/scripts/package.scm (show-help): Likewise. * guix/scripts/upgrade.scm (show-help): Likewise. * doc/guix.texi (Package Transformation Options): Mention '--help-transform'.
* | Merge branch 'staging'Maxim Cournoyer2020-10-19
|\| | | | | | | | | | | | | | | | | | | Conflicts: gnu/packages/admin.scm gnu/packages/commencement.scm gnu/packages/gdb.scm gnu/packages/llvm.scm gnu/packages/package-management.scm gnu/packages/tls.scm
| * guix build: Record package transformations in manifest entries.Ludovic Courtès2020-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this change, package transformation options used while building a manifest are saved in the metadata of the manifest entries. * guix/scripts/build.scm (transformation-procedure): New procedure. (options->transformation)[applicable]: Use it. Change to a list of key/value/proc tuples instead of key/proc pairs. [package-with-transformation-properties, tagged-object]: New procedures. Use them. (package-transformations, manifest-entry-with-transformations): New procedures. * guix/scripts/pack.scm (guix-pack)[with-transformations]: New procedure. Use it. * guix/scripts/package.scm (process-actions)[transform-entry]: Use it. * tests/guix-package-aliases.sh: Add test.
| * pack: Work around ld.so bug that affects the "fakechroot" engine.Ludovic Courtès2020-10-01
| | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/43491>. * guix/scripts/pack.scm (wrapped-package): Use (runpath program) instead of (runpath #$(audit-module)).
* | packages, scripts, utils: Enable multi-threaded xz compression.Maxim Cournoyer2020-10-08
|/ | | | | | | | | | | | | | | | | xz compression is slow; using the multi-thread mode of xz can make it more than 6 times faster, for example when compressing the large linux-libre source. * guix/build/utils.scm (%xz-parallel-args): New procedure. * guix/packages.scm (patch-and-repack): Specify the required above xz arguments by setting the XZ_DEFAULTS environment variable. * guix/scripts/pack.scm (%compressors, bootstrap-xz): Modify the commands Gexps so they do not need to be quoted. This allows lazily evaluating the arguments on the builder's side. Specify the required xz arguments. (self-contained-tarball): Do not quote the compressor command value. (docker-image): Likewise. * guix/utils.scm (decompressed-port, compressed-port) (compressed-output-port): Specify the required above xz arguments.
* scripts: Use 'define-command' and have 'guix help' use that.Ludovic Courtès2020-09-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes 'guix help' to print a short synopsis for each command and to group commands by category. * guix/scripts.scm (synopsis, category): New variables. (define-command-categories, define-command): New macros. (%command-categories): New variable. * guix/ui.scm (<command>): New record type. (source-file-command): New procedure. (command-files): Return absolute file names. (commands): Return a list of <command> records. (show-guix-help)[display-commands, category-predicate]: New procedures. Display commands grouped in three categories. * guix/scripts/archive.scm (guix-archive): Use 'define-command'. * guix/scripts/authenticate.scm (guix-authenticate): Likewise. * guix/scripts/build.scm (guix-build): Likewise. * guix/scripts/challenge.scm (guix-challenge): Likewise. * guix/scripts/container.scm (guix-container): Likewise. * guix/scripts/copy.scm (guix-copy): Likewise. * guix/scripts/deploy.scm (guix-deploy): Likewise. * guix/scripts/describe.scm (guix-describe): Likewise. * guix/scripts/download.scm (guix-download): Likewise. * guix/scripts/edit.scm (guix-edit): Likewise. * guix/scripts/environment.scm (guix-environment): Likewise. * guix/scripts/gc.scm (guix-gc): Likewise. * guix/scripts/git.scm (guix-git): Likewise. * guix/scripts/graph.scm (guix-graph): Likewise. * guix/scripts/hash.scm (guix-hash): Likewise. * guix/scripts/import.scm (guix-import): Likewise. * guix/scripts/install.scm (guix-install): Likewise. * guix/scripts/lint.scm (guix-lint): Likewise. * guix/scripts/offload.scm (guix-offload): Likewise. * guix/scripts/pack.scm (guix-pack): Likewise. * guix/scripts/package.scm (guix-package): Likewise. * guix/scripts/perform-download.scm (guix-perform-download): Likewise. * guix/scripts/processes.scm (guix-processes): Likewise. * guix/scripts/publish.scm (guix-publish): Likewise. * guix/scripts/pull.scm (guix-pull): Likewise. * guix/scripts/refresh.scm (guix-refresh): Likewise. * guix/scripts/remove.scm (guix-remove): Likewise. * guix/scripts/repl.scm (guix-repl): Likewise. * guix/scripts/search.scm (guix-search): Likewise. * guix/scripts/show.scm (guix-show): Likewise. * guix/scripts/size.scm (guix-size): Likewise. * guix/scripts/substitute.scm (guix-substitute): Likewise. * guix/scripts/system.scm (guix-system): Likewise. * guix/scripts/time-machine.scm (guix-time-machine): Likewise. * guix/scripts/upgrade.scm (guix-upgrade): Likewise. * guix/scripts/weather.scm (guix-weather): Likewise.
* scripts: Pass #:verbosity to 'build-notifier'.Ludovic Courtès2020-08-03
| | | | | | | | | | | | | | | * guix/scripts/archive.scm (guix-archive): Pass #:verbosity to 'build-notifier'. * guix/scripts/build.scm (guix-build): Likewise. * guix/scripts/copy.scm (guix-copy): Likewise. * guix/scripts/deploy.scm (guix-deploy): Likewise. * guix/scripts/environment.scm (guix-environment): Likewise. * 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 (verbosity-level): New procedure. (process-action): Pass #:verbosity to 'build-notifier'. (guix-system): Use 'verbosity-level' for 'with-status-verbosity'.
* pack: "fakechroot" execution engine can load its audit module.Ludovic Courtès2020-07-28
| | | | | | | | | | | | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/42558>. Until now, loading 'pack-audit.so' in a truly non-Guix environment would usually fail because 'pack-audit.so' depends on 'libgcc_s.so' and 'libc.so', none of which could be found. Furthermore, the test was not working as expected: the trick unshare -mrf sh -c 'mount -t tmpfs none /gnu ; ...' would allow the fakechroot engine to make its store available as /gnu/store as a result of another bug. * gnu/packages/aux-files/run-in-namespace.c (relocated_search_path): New function. (exec_with_loader): Pass "--library-path" to the loader. * guix/scripts/pack.scm (wrapped-package)[build](runpath): New procedure. (elf-loader-compile-flags): Pass "-DLOADER_AUDIT_RUNPATH". * tests/guix-pack-relocatable.sh: Remove 'STORE_PARENT'. (run_without_store): New function. Erase $NIX_STORE_DIR instead of $STORE_PARENT. Use 'run_without_store' throughout.
* pack: '-R' applies to propagated inputs too.Ludovic Courtès2020-07-24
| | | | | | | | Fixes <https://bugs.gnu.org/42510>. * guix/scripts/pack.scm (wrapped-manifest-entry): Recurse on 'dependencies' field. * tests/guix-pack-relocatable.sh: Add test.
* pack: Build the store database under a UTF-8 locale.Ludovic Courtès2020-07-20
| | | | | | | | | | Fixes <https://bugs.gnu.org/42389>. Reported by branjam4@gmail.com. * guix/scripts/pack.scm (store-database)[build]: Add calls to 'setenv' and 'setlocale'. * tests/pack.scm ("self-contained-tarball + localstatedir, UTF-8 file names"): New test.
* pack: 'self-contained-tarball' runs derivation in a UTF-8local.Ludovic Courtès2020-07-20
| | | | | | | | * guix/scripts/pack.scm (self-contained-tarball) [set-utf8-locale]: New variable. [build]: Use it. * tests/pack.scm ("self-contained-tarball"): Use a <profile> record instead of 'profile-derivation'.
* pack: Dereference symlinks when looking for executables.Ludovic Courtès2020-06-30
| | | | | | | | Fixes <https://bugs.gnu.org/42127>. Reported by Andrius Štikonas <andrius@stikonas.eu>. * guix/scripts/pack.scm (wrapped-package)[build]: Add trailing slash to the arguments to 'find-files'.
* database: 'register-items' takes an open database.Ludovic Courtès2020-06-18
| | | | | | | | | | | | * guix/store/database.scm (store-database-directory) (store-database-file): New procedures. (call-with-database): Add call to 'mkdir-p'. (register-items): Add 'db' parameter and remove #:state-directory and #:schema. (register-path): Use 'store-database-file' and 'with-database', and parameterize SQL-SCHEMA. * gnu/build/image.scm (register-closure): Likewise. * gnu/build/vm.scm (register-closure): Likewise. * guix/scripts/pack.scm (store-database)[build]: Likewise.
* pack: Add zstd compressor.Tobias Geerinckx-Rice2020-06-16
| | | | | * guix/scripts/pack.scm (%compressors): Add zstd. * doc/guix.texi (Invoking guix pack): Document it.
* pack: Add relocation via ld.so and fakechroot.Ludovic Courtès2020-05-14
| | | | | | | | | | | | | | | | | | | | | | | | * gnu/packages/aux-files/run-in-namespace.c (HAVE_EXEC_WITH_LOADER): New macro. (bind_mount): Rename to... (mirror_directory): ... this. Add 'firmlink' argument and use it instead of calling mkdir/open/close/mount directly. (bind_mount, make_symlink): New functions. (exec_in_user_namespace): Adjust accordingly. (exec_with_loader) [HAVE_EXEC_WITH_LOADER]: New function. (exec_performance): New function. (engines): Add them. * guix/scripts/pack.scm (wrapped-package)[fakechroot-library] [audit-module]: New procedures. [audit-source]: New variable. [build](elf-interpreter, elf-loader-compile-flags): New procedures. (build-wrapper): Use them. * tests/guix-pack-relocatable.sh: Test with 'GUIX_EXECUTION_ENGINE=fakechroot'. * doc/guix.texi (Invoking guix pack): Document the 'performance' and 'fakechroot' engines. * gnu/packages/aux-files/pack-audit.c: New file. * Makefile.am (AUX_FILES): Add it.
* pack: Do not cross-compile the image building tools.Ludovic Courtès2020-05-14
| | | | | | | | | | | | | | Until now, something like: guix pack -f docker --target=arm-linux-gnueabihf would attempt to cross-compile tar. * guix/scripts/pack.scm (self-contained-tarball): Pass #:target to 'gexp->derivation'. (squashfs-image): Use #+ instead of #$ for ARCHIVER. Use 'file-append' instead of 'string-append'. Pass #:target to 'gexp->derivation'. (docker-image): Likewise.
* Merge branch 'master' into core-updatesMarius Bakke2020-04-30
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: gnu/local.mk gnu/packages/backup.scm gnu/packages/emacs-xyz.scm gnu/packages/guile.scm gnu/packages/lisp.scm gnu/packages/openldap.scm gnu/packages/package-management.scm gnu/packages/web.scm gnu/packages/xorg.scm
| * pack: Use a declarative profile.Ludovic Courtès2020-04-26
| | | | | | | | | | * guix/scripts/pack.scm (guix-pack): Use a declarative profile instead of 'profile-derivation'.
* | Merge branch 'master' into core-updatesMarius Bakke2020-04-08
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: etc/news.scm gnu/local.mk gnu/packages/check.scm gnu/packages/cross-base.scm gnu/packages/gimp.scm gnu/packages/java.scm gnu/packages/mail.scm gnu/packages/sdl.scm gnu/packages/texinfo.scm gnu/packages/tls.scm gnu/packages/version-control.scm
| * pack: Pass the cross-compilation target to 'run-with-store'.Ludovic Courtès2020-04-03
| | | | | | | | | | | | | | This ensures '%current-target-system' is correctly bound upfront, which some packages rely on. * guix/scripts/pack.scm (guix-pack): Pass #:target to 'run-with-store'.
* | Merge branch 'master' into core-updatesMarius Bakke2020-03-30
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: gnu/packages/admin.scm gnu/packages/commencement.scm gnu/packages/guile.scm gnu/packages/linux.scm gnu/packages/package-management.scm gnu/packages/pulseaudio.scm gnu/packages/web.scm