summaryrefslogtreecommitdiff
path: root/guix/build/graft.scm
Commit message (Collapse)AuthorAge
* grafts: Add (guix build debug-link) and use it.Ludovic Courtès2018-08-24
| | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/19973>. Reported by Mark H Weaver <mhw@netris.org>. * guix/build/debug-link.scm: New file. * guix/build/graft.scm (%graft-hooks): New variable. (graft): Add #:hooks and honor it. * guix/grafts.scm (graft-derivation/shallow): Add (guix build debug-link) and (guix elf) to #:modules. * tests/debug-link.scm: New file. * Makefile.am (MODULES): Add guix/build/debug-link.scm. (SCM_TESTS): Add tests/debug-link.scm.
* grafts: Add high-level 'graft' procedure on the build side.Ludovic Courtès2018-08-24
| | | | | | * guix/build/graft.scm (graft): New procedure. * guix/grafts.scm (graft-derivation/shallow)[build]: Use it instead of inline code.
* grafts: Clarify the status of the workaround for <http://bugs.gnu.org/24659>.Leo Famulari2017-11-14
| | | | * guix/build/graft.scm (mkdir-p*): Annotate.
* graft: Correctly replace references near the end of the scan buffer.Ludovic Courtès2017-08-24
| | | | | | | | | | Fixes <http://bugs.gnu.org/28212>. Reported by Leo Famulari <leo@famulari.name>. * guix/build/graft.scm (replace-store-references): When I >= END, check whether WRITTEN > END and call 'get-bytevector-n!' when it is. * tests/grafts.scm (buffer-size): New variable. ("replace-store-references, <http://bugs.gnu.org/28212>"): New test.
* grafts: Remove unnecessary 'umask' call.Ludovic Courtès2016-10-17
| | | | | | This is a followup to d72267863382041b84a9712eea354882be72ef55. * guix/build/graft.scm (rewrite-directory): Remove 'umask' call.
* grafts: Always make directories #o755.Ludovic Courtès2016-10-10
| | | | | | | | | Fixes <http://bugs.gnu.org/22954>. Reported by Albin <albin@fripost.org> and Jeffrey Serio <serio.jeffrey@gmail.com>. * guix/build/graft.scm (mkdir-p*): New procedure. (rewrite-directory): Use it instead of 'mkdir-p'.
* grafts: Allow the replacement to have a different name.Ludovic Courtès2016-10-03
| | | | | | | | | | | | | | * guix/build/graft.scm (replace-store-references): REPLACEMENT is now the full string, not just the hash. (rewrite-directory)[hash-mapping](valid-suffix?): Remove. (hash+suffix): Rename to... (hash+rest): ... this. Change to return the whole string as the second element of the list. Adjust 'match-lambda' expression accordingly; check whether the string length of the origin and replacement match. * tests/grafts.scm ("graft-derivation, grafted item uses a different name"): New test. * doc/guix.texi (Security Updates): Update sentence on the name/version restriction.
* grafts: Make grafting faster.Mark H Weaver2016-08-09
| | | | | | | | | | | * guix/build/graft.scm (replace-store-references): Reimplement for faster grafting. Use binary I/O instead of textual I/O. Replace 'mapping' argument (an alist) with 'replacement-table' (a vhash). (rewrite-directory): Adapt to mapping argument change in 'replace-store-references'. Remove 'with-fluids' that previously set '%default-port-encoding' to #f, since we now use binary I/O. (define-inline, hash-length): New macros. (nix-base32-char?): New variable.
* graft: Fail when one of the threads raises an exception.Ludovic Courtès2016-05-24
| | | | | | | Fixes <http://bugs.gnu.org/23581>. * guix/build/graft.scm (exit-on-exception): New procedure. (rewrite-directory): Use it to wrap REWRITE-LEAF.
* grafts: Rename files whose name matches a graft.Ludovic Courtès2016-05-21
| | | | | | | | | Fixes <http://bugs.gnu.org/23132>. Reported by Mark H Weaver <mhw@netris.org>. * guix/build/graft.scm (rename-matching-files): New procedure. (rewrite-directory): Use it. * tests/grafts.scm ("graft-derivation, renaming"): New test.
* grafts: Preserve empty directories when grafting.Ludovic Courtès2016-05-21
| | | | | | * guix/build/graft.scm (rewrite-directory)[rewrite-leaf]: Add case for 'directory. Pass #:directories? #t to 'find-files'.
* grafts: Make sure files are not created world-writable.Ludovic Courtès2016-02-27
| | | | * guix/build/graft.scm (rewrite-directory): Add 'umask' call.
* graft: Graft files in parallel.Ludovic Courtès2015-11-16
| | | | | * guix/build/graft.scm (rewrite-directory): Use 'n-par-for-each' instead of 'for-each'.
* graft: Graft files in a deterministic order.Ludovic Courtès2015-11-16
| | | | | | | * guix/build/graft.scm (rewrite-directory)[rewrite-leaf]: Change to take a single parameter. Add call to 'lstat'. Factorize result of 'destination'. Use 'find-files' instead of 'file-system-fold'.
* derivations: Add 'graft-derivation'.Ludovic Courtès2014-10-08
* guix/derivations.scm (graft-derivation): New procedure. * guix/build/graft.scm: New file. * Makefile.am (MODULES): Add it. * tests/derivations.scm ("graft-derivation"): New test.