aboutsummaryrefslogtreecommitdiff
path: root/guix
Commit message (Collapse)AuthorAge
* bootloader: Use <menu-entry> for the bootloader side.Danny Milosavljevic2017-07-28
| | | | | | | | | | | | | | * gnu/bootloader.scm (menu-entry-device-mount-point): New variable. Export it. (<menu-entry>: New field "device". * gnu/bootloader/grub.scm (grub-confgiuration-file): Handle <menu-entry> entries. * gnu/bootloader/extlinux.scm (extlinux-configuration-file): Handle <menu-entry> entries. * gnu/system.scm (menu->entry->boot-parameters): Delete variable. (boot-parameters->menu-entry): New variable. Export it. (operating-system-bootcfg): Make OLD-ENTRIES a list of <menu-entry>. * guix/script/system.scm (reinstall-bootloader): Fix bootcfg usage. (perform-action): Fix bootcfg usage.
* utils: Factorize XDG directory handling.Ludovic Courtès2017-07-28
| | | | | | | | * guix/ui.scm (config-directory): Remove. * guix/utils.scm (xdg-directory, config-directory): New procedures. (cache-directory): Rewrite in terms of 'xdg-directory'. * guix/scripts/substitute.scm (%narinfo-cache-directory): Pass #:ensure? #f to 'cache-directory'.
* weather: Show "-m" option in help message.Ludovic Courtès2017-07-27
| | | | | | Reported by Alex Kost <alezost@gmail.com>. * guix/scripts/weather.scm (show-help): Show "-m".
* git-download: Speed up 'git-predicate'.Christopher Baines2017-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adjust 'git-predicate' to use data structures that perform better when used with git repositories with a large number of files. Previously when matching either a regular file or directory, 'git-predicate' would search a list with a length equal to the number of files in the repository. As a search operation happens for roughly every file in the repository, this meant that the time taken to use 'git-predicate' to traverse all the files in a repository was roughly exponential with respect to the number of files in the repository. Now, for matching regular files or symlinks, 'git-predicate' uses a vhash using the inode value as the key. This should perform roughly in constant amount of time, instead of linear with respect to the number of files in the repository. For matching directories, 'git-predicate' now uses a tree structure stored in association lists. To check if a directory is in the tree, the tree is traversed from the root. The time complexity of this depends on the shape of the tree, but it should be an improvement on searching through the list of all files. * guix/git-download.scm (files->directory-tree, directory-in-tree?): New procedures. (git-predicate): Compute DIRECTORY-TREE. Turn INODES into a vhash. Adjust body of lambda accordingly. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* offload: Fix potential file descriptor and memory leak.Ludovic Courtès2017-07-25
| | | | | | | | | | | The '%slots' list could grow indefinitely; in practice though, guix-daemon is likely to restart 'guix offload' often enough. * guix/scripts/offload.scm (%slots): Remove. (choose-build-machine): Don't 'set!' %SLOTS. Return the acquired slot as a second value. (process-request): Adjust accordingly. Release the returned slot after 'transfer-and-offload'.
* offload: Disconnect sessions created by 'machine-load'.Ludovic Courtès2017-07-25
| | | | | | | | This fixes a memory leak that can be seen by running: (map (lambda _ (machine-load m)) (iota 1000)) * guix/scripts/offload.scm (machine-load): Add call to 'disconnect!'.
* Add 'guix weather'.Ludovic Courtès2017-07-25
| | | | | | | | | | * guix/scripts/weather.scm: New file. * Makefile.am (MODULES): Add it. * doc/guix.texi (Substitutes, Invoking guix publish): Mention "guix weather". (Invoking guix weather): New node. Co-authored-by: Ricardo Wurmus <rekado@elephly.net>
* import: cpan: Updater returns a list of URLs.Ludovic Courtès2017-07-24
| | | | | * guix/import/cpan.scm (latest-release): Return a list in the 'urls' field of 'upstream-source'.
* publish: Make the cache eviction policy less aggressive.Ludovic Courtès2017-07-21
| | | | | | | | Suggested by Mark H Weaver <mhw@netris.org>. * guix/scripts/publish.scm (nar-expiration-time): New procedure. (render-narinfo/cached): Use it as the #:entry-expiration passed to 'maybe-remove-expired-cache-entries'.
* publish: Avoid 'valid-path?' RPC for non-existent items.Ludovic Courtès2017-07-21
| | | | | * guix/scripts/publish.scm (render-narinfo/cached): Call 'file-exists?' before calling 'valid-path?'. This makes the 404 path slightly faster.
* store: Rewrite 'store-path-hash-part' to not use regexps.Ludovic Courtès2017-07-21
| | | | | * guix/store.scm (store-path-hash-part): Rewrite without using a regexp. This speeds up 'guix substitute'.
* publish: Remove 'regexp-exec' call from the hot path.Ludovic Courtès2017-07-21
| | | | | * guix/scripts/publish.scm (extract-narinfo-hash): Rewrite without resorting to regexps.
* base32: Export the base32 charsets.Ludovic Courtès2017-07-21
| | | | | * guix/base32.scm (%nix-base32-charset, %rfc4648-base32-charset): New variables.
* substitute: Avoid repeated calls to 'length'.Ludovic Courtès2017-07-21
| | | | | * guix/scripts/substitute.scm (fetch-narinfos)[update-progress!]: Move 'length' call outside of lambda.
* substitute: Optimize hash-part-to-path conversion on non-200 responses.Ludovic Courtès2017-07-21
| | | | | | | | | Previously this operation was linear in the number of requests and involved costly calls to 'string-contains'. * guix/scripts/substitute.scm (fetch-narinfos)[hash-part->path]: New procedure. [handle-narinfo-response]: Use it for caching when CODE is not 200.
* gexp: Slightly improve error reporting for 'local-file'.Ludovic Courtès2017-07-20
| | | | | | | | Reported by Ricardo Wurmus. * guix/gexp.scm (local-file): Define using 'syntax-case' instead of 'syntax-rules'. Explicitly handle the zero-argument case and the use-as-an-identifier case.
* licenses: Add MirOS license.Arun Isaac2017-07-20
| | | | * guix/licenses.scm (miros): New variable.
* guix package: '-l' correctly handles zero-generation profiles.Ludovic Courtès2017-07-20
| | | | | * guix/scripts/package.scm (process-query) <'list-generations>: Properly handle the case where 'profile-generations' returns the empty list.
* guix package: Trim trailing slashes from the profile name.Ludovic Courtès2017-07-20
| | | | | | | | Fixes <https://bugs.gnu.org/25762>. Reported by Ricardo Wurmus <rekado@elephly.net>. * guix/scripts/package.scm (canonicalize-profile): Trim trailing slashes from PROFILE.
* profiles: Remove workaround for an old Guile 'scandir' bug.Ludovic Courtès2017-07-20
| | | | * guix/profiles.scm (generation-numbers)[scandir]: Remove.
* download: Add OpenBSD mirrors.Tobias Geerinckx-Rice2017-07-19
| | | | | | | * guix/download.scm (%mirrors) <openbsd>: Add HTTPS OpenBSD mirrors. * gnu/packages/ntp.scm (openntpd)[source]: Use them. * gnu/packages/ssh.scm (openssh)[source]: Likewise. * gnu/packages/tls.scm (libressl)[source]: Likewise.
* guix system: Use "image.iso" as the name of ISO images.Ludovic Courtès2017-07-18
| | | | | * guix/scripts/system.scm (system-derivation-for-action): Pass #:name to 'system-disk-image'.
* gexp: 'ungexp-splicing' properly accounts for nested native inputs.Ludovic Courtès2017-07-17
| | | | | | | | | | Previously, (gexp-native-inputs #~#$@(list #~#+foo)) would return '(). This is a followup to 5b14a7902c58d9fb7923f9e16871f549fbe59b6e. * guix/gexp.scm (gexp-inputs)[add-reference-inputs]: In the list case, remove 'if' around 'fold-right'. In 'map' lambda, always inherit N?. * tests/gexp.scm ("gexp list splicing + ungexp-splicing"): New test.
* substitute: Work around Guile 2.2 'time-monotonic' bug.Ludovic Courtès2017-07-12
| | | | | | | | | Prior to this change, half of the cached narinfos would expire immediately since they contained the number of nanoseconds instead of the number of seconds as their date. * guix/scripts/substitute.scm (time-monotonic) <guile-2.2>: Define, as a workaround.
* size: Add '--sort=KEY'.Ludovic Courtès2017-07-12
| | | | | | | | | | * guix/scripts/size.scm (profile-closure<?, profile-self<?): New procedures. (display-profile): Add #:profile<? parameter and honor it. (show-help, %options): Add '--sort'. (%default-options): Add 'profile<?'. (guix-size): Pass PROFILE<? to 'display-profile*'. * doc/guix.texi (Invoking guix size): Document '--sort'.
* environment: Rationalize calls to 'set-build-options'.Ludovic Courtès2017-07-12
| | | | | | | | | Before this change '--substitute-urls' would be ignored. * guix/scripts/environment.scm (build-environment): Remove redundant call to 'set-build-options-from-command-line*'. (guix-environment): Move 'set-build-options-from-command-line' right after 'with-store'.
* syscalls: Add network-interface-running?Danny Milosavljevic2017-07-12
| | | | | | | | * guix/build/syscalls.scm (network-interface-running?): New variable. Export it. * tests/syscalls.scm: Add test. Co-authored-by: John Darrington <jmd@gnu.org>
* store: Account for 'add-to-store' in RPC statistics.Ludovic Courtès2017-07-11
| | | | * guix/store.scm (add-to-store): Add call to 'record-operation'.
* syscalls: Adjust 'dirent64' struct for GNU/Hurd.Ludovic Courtès2017-07-10
| | | | | | | | | | | | | Reported by rennes@openmailbox.org. * guix/build/syscalls.scm (file-type->symbol): New procedure. (%struct-dirent-header): Rename to... (%struct-dirent-header/linux): ... this. Rename introduced bindings as well. (%struct-dirent-header/hurd): New C struct. (define-generic-identifier): New macro. (read-dirent-header, %struct-dirent-header, sizeof-dirent-header): Define in terms of 'define-generic-identifier'.
* build-system: texlive: Build union in configure phase.Ricardo Wurmus2017-07-09
| | | | | | | | | | | | This allows us to use texmf.cnf instead of having to set all required environment variables manually. * guix/build/texlive-build-system.scm (configure): New procedure. (build): Simplify. (%standard-phases): Add configure phase. * guix/build-system/texlive.scm (texlive-build): Include (guix build union) in modules. (%texlive-build-system-modules): Likewise.
* build-system: texlive: Only build packages in the current directory.Ricardo Wurmus2017-07-09
| | | | | * guix/build/texlive-build-system.scm (build): Use scandir instead of find-files.
* discovery: Recurse into directories pointed to by a symlink.Ludovic Courtès2017-07-03
| | | | | | | | | | | | Reported by Christopher Baines <mail@cbaines.net> and Alex Kost <alezost@gmail.com> at <https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00290.html>. * guix/discovery.scm (scheme-files): When ENTRY is a symlink that doesn't end in '.scm', call 'stat' and recurse if it points to a directory. * tests/discovery.scm ("scheme-modules recurses in symlinks to directories"): New test.
* copy: Default to port 22.Ludovic Courtès2017-07-03
| | | | | | | | Failing to do that, "%p" would be "0" when using "ProxyCommand" in ~/.ssh/config. * guix/scripts/copy.scm (send-to-remote-host): Default to port 22. (retrieve-from-remote-host): Likewise.
* packages: Mark 'replacement' as an "innate" field.Ludovic Courtès2017-07-03
| | | | | | | | | | | | | | | | | | | | | | | | Suggested by Mark H Weaver at <https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00355.html>. * guix/packages.scm (<package>)[replacement]: Mark as "innate". * gnu/packages/base.scm (glibc-2.25-patched, glibc-2.24) (glibc-2.23, glibc-2.22, glibc-2.21, glibc-locales): Remove 'replacement' field, which was set to #f. * gnu/packages/commencement.scm (perl-boot0): Likewise. * gnu/packages/fontutils.scm (graphite2/fixed): Likewise. * gnu/packages/ghostscript.scm (ghostscript/fixed): Likewise. * gnu/packages/gnupg.scm (libgcrypt-1.7.8): Likewise. * gnu/packages/guile.scm (guile-2.0/fixed, guile-2.2): Likewise. * gnu/packages/icu4c.scm (icu4c/fixed): Likewise. * gnu/packages/image.scm (libpng-apng): Likewise. * gnu/packages/make-bootstrap.scm (%guile-static): Likewise. * gnu/packages/pcre.scm (pcre/fixed): Likewise. * gnu/packages/perl.scm (perl/fixed): Likewise. * gnu/packages/ruby.scm (ruby-2.3, ruby-2.2, ruby-2.1) (ruby-1.8): Likewise. * gnu/packages/tls.scm (gnutls-3.5.13, gnutls/guile-2.2): Likewise. * gnu/packages/xml.scm (expat-2.2.1): Likewise.
* profiles: xdg-desktop-database: Run the hook when GLib is referenced.宋文武2017-07-03
| | | | | | | | This will pull the latest 'desktop-file-utils' package into the profile closure, as the 'xdg-mime-database' hook already does. * guix/profiles.scm (xdg-desktop-database): Run the hook when 'glib' is referenced.
* guix system: Add "--file-system-type" option.Danny Milosavljevic2017-07-03
| | | | | | | | * guix/scripts/system.scm (process-action): Pass file-system-type to ... (perform-action): ... here. Add new keyword argument. Pass new value to ... (system-derivation-for-action): ... here. Add new keyword argument. Pass new value to system-disk-image. * doc/guix.texi (disk-image): Document new option.
* ui: package->recutlis: Remove duplicated package names in dependencies.宋文武2017-07-02
| | | | | * guix/ui.scm (package->recutils): Add call to 'delete-duplicates' in 'dependencies->recutils'.
* store: 'references/substitutes' really caches its result.Ludovic Courtès2017-07-02
| | | | | | | | Until now the cache was always empty because 'for-each' was passed ITEMS as its second argument, and ITEMS was the empty list at that point. * guix/store.scm (references/substitutes): Add 'requested' variable. Use it as second argument of 'for-each' in base case.
* store: 'references/substitutes' save an RPC is the trivial case.Ludovic Courtès2017-07-02
| | | | | * guix/store.scm (references/substitutes): Save a 'substitutable-path-info' call when MISSING is empty.
* guix: git: Stop using libgit2-shutdown.Mathieu Othacehe2017-07-01
| | | | | * guix/git.scm (with-libgit2): Stop calling (libgit2-shutdown) to prevent segfaults when pointer finalizers are run.
* vm: Estimate the disk size by default.Ludovic Courtès2017-06-30
| | | | | | | | | | | | | | | * gnu/build/vm.scm (estimated-partition-size): New procedure. * gnu/system/vm.scm (expression->derivation-in-linux-vm): Change #:disk-image-size default to 'guess. [builder]: When DISK-IMAGE-SIZE is 'guess, use 'estimated-partition-size' and compute and estimate of the image size. (qemu-image): Likewise. * guix/build/store-copy.scm (file-size, closure-size): New procedures. * guix/scripts/system.scm (%default-options): Change 'image-size' to 'guess. * doc/guix.texi (Building the Installation Image): Remove '--image-size' flag from example. (Invoking guix system): Document the image size estimate.
* guix package: Allow '--rollback', after all.Ludovic Courtès2017-06-26
| | | | | * guix/scripts/package.scm (%options): Add "rollback" as an alias for "roll-back".
* guix package: 'guix package -r PKG -u' does not upgrade PKG.Ludovic Courtès2017-06-26
| | | | | | | | | | Fixes <http://bugs.gnu.org/27262>. Reported by Mark H Weaver <mhw@netris.org>. * guix/scripts/package.scm (transaction-upgrade-entry): Check if ENTRY matches 'manifest-transaction-removal-candidate?' and return TRANSACTION if it does. (process-actions): Move 'options->removable' from step 2 to step 1.
* profiles: Add 'manifest-transaction-removal-candidate?'.Ludovic Courtès2017-06-26
| | | | | | | * guix/profiles.scm (manifest-transaction-removal-candidate?): New procedure. * tests/profiles.scm ("manifest-transaction-removal-candidate?"): New test.
* import cran: Generate a valid 'license' field for "GPL".Ludovic Courtès2017-06-26
| | | | | | | Fixes <http://bugs.gnu.org/27294>. Reported by Joshua Sierles <joshua@joshua.si>. * guix/import/cran.scm (string->license) <"GPL">: Return a quoted list.
* guix package: Warn about packages that no longer exist.Ludovic Courtès2017-06-25
| | | | | | | | Fixes <http://bugs.gnu.org/27261>. Reported by Mark H Weaver <mhw@netris.org>. * guix/scripts/package.scm (transaction-upgrade-entry): Add call to 'warning' when NAME cannot be found in the package set.
* refresh: Be more verbose when passed an explicit package list.Ludovic Courtès2017-06-24
| | | | | | * guix/scripts/refresh.scm (check-for-package-update): Use 'version-compare' instead of 'version>?'. When WARN? is true, print something for the '=' and '<' cases.
* store: Define a default port for TCP connections.Ludovic Courtès2017-06-22
| | | | | | * guix/store.scm (%default-guix-port): New variable. (connect-to-daemon)[connect]: Use it when (uri-port uri) is #f. * doc/guix.texi (The Store): Mention the default port number.
* store: Pass a socket type hint to 'getaddrinfo'.Ludovic Courtès2017-06-22
| | | | | * guix/store.scm (open-inet-socket): Pass hints in the 'getaddrinfo' call.
* environment: Disable profile collision checks.Ludovic Courtès2017-06-21
| | | | | | | | | | | Reported by Efraim Flashner. This is a followup to a654dc4bcf7c8e205bdefa1a1d5f23444dd22778. * guix/profiles.scm (profile-derivation): Add #:allow-collisions? and honor it. * guix/scripts/environment.scm (inputs->profile-derivation): Pass #:allow-collisions? #f to 'profile-derivation'. * tests/guix-environment.sh: Test "guix environment guix".