Age | Commit message (Collapse) | Author |
|
This avoids a backtrace when running "guix help | head" or similar.
* guix/ui.scm (run-guix): Wrap 'show-guix-help' calls in
'leave-on-EPIPE'.
|
|
Fixes <https://bugs.gnu.org/43491>.
* guix/scripts/pack.scm (wrapped-package): Use (runpath program) instead
of (runpath #$(audit-module)).
|
|
* guix/scripts/system.scm (list-image-types): New procedure,
(%options): add "image-type" and "list-image-types" options, remove
"file-system-type" option,
(show-help): adapt accordingly,
(%default-options): also adapt, and set the default "image-type" to "raw",
(perform-action): add image-type argument and remove file-system-type argument,
(process-action): adapt perform-action call,
(system-derivation-for-action): remove base-image
argument, add image-type argument, and use it to create the image passed to
"system-image".
* tests/guix-system.sh: Adapt accordingly and add a test for
"--list-image-types" command.
* doc/guix.texi (Building the Installation Image,
Invoking guix system): Adapt accordingly.
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
|
|
* guix/openpgp.scm (fxbit-set?): Change to swap arguments compared to
'bit-set?'.
* tests/openpgp.scm (%binary-sample): New test vector.
("port-ascii-armored?, #t"): Add test.
("port-ascii-armored?, #f"): Add another test.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
|
|
* guix/scripts/build.scm (options->things-to-build): Add a hint when we
cannot build something.
|
|
* guix/packages.scm (package-input-rewriting): Add #:deep? and pass it
to 'package-mapping'.
[replacement-property]: New variable.
[rewrite]: Check it.
[cut?]: New procedure.
* tests/packages.scm ("package-input-rewriting"): Pass #:deep? #f and
ensure implicit inputs were not rewritten. Avoid 'eq?' comparisons.
("package-input-rewriting, deep"): New test.
* gnu/packages/guile.scm (package-for-guile-2.0, package-for-guile-3.0):
Pass #:deep? #f.
|
|
Previously, something like:
guix build glib --with-graft=glibc=glibc@2.29
would produce a result showing that rewriting rules were not applied to
libx11@1.6.A (a replacement).
* guix/packages.scm (package-mapping): Call REPLACE instead of PROC to
'replacement'.
* tests/packages.scm ("package-input-rewriting/spec, graft"): New test.
|
|
With this change, '--with-input', '--with-graft', etc. also apply to
implicit dependencies. Thus, it's now possible to do:
guix build python-itsdangerous --with-input=python-wrapper=python@2
or:
guix build hello --with-graft=glibc=glibc@2.29
Additionally, before, implicit inputs were not rewritten, which could
lead to duplicates in the output of 'bag-transitive-inputs' (packages
that are not 'eq?' but lead to the same derivation). This in turn would
lead to unnecessary rebuilds when using '--with-input' & co. This
change fixes it by ensuring even implicit inputs are rewritten.
Fixes <https://bugs.gnu.org/42156>.
* guix/packages.scm (package-input-rewriting/spec): Add #:deep?
defaulting to #true, and pass it to 'package-mapping'.
[replacement-property]: New variable.
[rewrite]: Check that property and set it on the result of PROC.
[cut?]: New procedure.
* tests/packages.scm ("package-input-rewriting/spec"): Ensure implicit
inputs were unchanged.
("package-input-rewriting/spec, partial match"): Pass #:deep? #f.
("package-input-rewriting/spec, deep")
("package-input-rewriting/spec, no duplicates"): New tests.
(package/inherit): Move before use.
* tests/guix-build.sh: Add tests.
* tests/scripts-build.scm ("options->transformation, with-graft"):
Compare dependencies by package name or derivation file name.
* doc/guix.texi (Defining Packages): Adjust accordingly.
|
|
* guix/packages.scm (build-system-with-package-mapping): New procedure.
(package-mapping): Add #:deep? and honor it.
* tests/packages.scm ("package-mapping"): Compare the direct inputs of
the bag of P0 and that of P1.
("package-mapping, deep"): New test.
|
|
* guix/scripts/build.scm (transform-package-tests): New procedure.
(%transformations, %transformation-options)
show-transformation-options-help): Add it.
* tests/scripts-build.scm ("options->transformation, without-tests"):
New test.
* doc/guix.texi (Package Transformation Options): Document it.
|
|
* gnu/packages/package-management.scm (guix)[propagated-inputs]: Use
GNUTLS instead of GUILE3.0-GNUTLS.
(guix-daemon)[inputs]: Likewise.
* guix/self.scm (specification->package): Likewise.
|
|
* guix/scripts/package.scm (package->manifest-entry*): Rewrite in terms
of 'manifest-entry-with-provenance'.
|
|
* guix/licenses.scm (apsl2): New variable.
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
|
|
* guix/import/cabal.scm (cabal-flags->alist): Fix typo in docstring.
* guix/import/stackage.scm (lts-info-ghc-version): Likewise.
* guix/scripts/import/hackage.scm (show-help): Likewise.
|
|
* guix/scripts/build.scm (show-transformation-options-help): Mention 'PACKAGE'
in '--with-source' option.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
|
|
Before this patch, we had:
$ guix environment -CP --ad-hoc coreutils
[env]$ echo $PATH
/gnu/store/…-profile/bin
[env]$ echo $GUIX_ENVIRONMENT
/gnu/store/…-profile
After this patch:
$ guix environment -CP --ad-hoc coreutils
[env]$ echo $PATH
/home/ludo/.guix-profile/bin
[env]$ echo $GUIX_ENVIRONMENT
/home/ludo/.guix-profile
* guix/scripts/environment.scm (launch-environment/container): When
LINK-PROFILE? is true, pass ~/.guix-profile as the second argument to
'launch-environment'.
* tests/guix-environment-container.sh: Adjust test accordingly.
* doc/guix.texi (Invoking guix environment): Update accordingly.
|
|
Fixes <https://bugs.gnu.org/42688>.
Reported by pkill9 <pkill9@runbox.com>.
This ensures that 'guix repl -s SCRIPT' give SCRIPT the right value
of (current-profile), which in turn ensures that (%package-module-path)
is initialized with the right set of channels.
* guix/describe.scm (initial-program-arguments): New variable.
(current-profile): Use it.
* guix/scripts/repl.scm (guix-repl): Call 'current-profile' before
'set-program-arguments'.
|
|
Fixes <https://bugs.gnu.org/43331>.
* guix/scripts/repl.scm (guix-repl): Replace "." by (getcwd)
* tests/guix-repl.sh: Add test.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
|
|
* guix/import/cpan.scm: Fix typo.
|
|
Fixes <https://bugs.gnu.org/43421>.
* guix/scripts/authenticate.scm (read-command): Decode strings as
ISO-8859-1, not UTF-8.
(guix-authenticate)[send-reply]: Encode strings as ISO-8859-1, not
UTF-8.
* tests/guix-authenticate.sh: Add test.
|
|
* guix/ui.scm (show-what-to-build): When VERBOSITY is 1, add a newline
before the "would/will be downloaded" line, and wrap that message in
'highlight'.
|
|
In practice we're always using the same key pair,
/etc/guix/signing-key.{pub,sec}. Keeping them in cache allows us to
avoid redundant I/O and parsing when signing multiple store items in a
row.
* guix/scripts/authenticate.scm (load-key-pair): New procedure.
(sign-with-key): Remove 'key-file' parameter and add 'public-key' and
'secret-key'. Adjust accordingly.
(validate-signature): Add 'acl' parameter and pass it to
'authorized-key?'.
(guix-authenticate)[call-with-reply]: New procedure.
[with-reply]: New macro.
Call 'current-acl' upfront and cache its result. Add 'key-pairs' as an
argument to 'loop' and use it as a cache of key pairs.
|
|
Previously, we'd spawn 'guix authenticate' once for each item that has
to be signed (when exporting) or authenticated (when importing). Now,
we spawn it once for all and then follow a request/reply protocol. This
reduces the wall-clock time of:
guix archive --export -r $(guix build coreutils -d)
from 30s to 2s.
* guix/scripts/authenticate.scm (sign-with-key): Return the signature
instead of displaying it. Raise a &formatted-message instead of calling
'leave'.
(validate-signature): Likewise.
(read-command): New procedure.
(define-enumerate-type, reply-code): New macros.
(guix-authenticate)[send-reply]: New procedure.
Change to read commands from current-input-port.
* nix/libstore/local-store.cc (runAuthenticationProgram): Remove.
(authenticationAgent, readInteger, readAuthenticateReply): New
functions.
(signHash, verifySignature): Rewrite in terms of the agent.
* tests/store.scm ("import not signed"): Remove 'pk' call.
("import signed by unauthorized key"): Check the error message of C.
* tests/guix-authenticate.sh: Rewrite using the new protocol.
fixlet
|
|
* guix/svn-download.scm (download-svn-to-store): Add a subdirectory to
the download path. The subdirectory is used as the target for the 'svn
export' command, avoiding a 'directory exists' error when attempting to
use the parent directory directly.
|
|
It was made transactional in a4678c6ba18d8dbd79d931f80426eebf61be7ebe, with
the reasoning to prevent broken intermediate states from being visible. I
think this means something like an entry being in ValidPaths, but the Refs not
being inserted.
Using a transaction for this makes sense, but I think using one single
transaction for the whole register-items call is unnecessary to avoid broken
states from being visible, and could block other writes to the store database
while register-items is running. Because the deduplication and resetting
timestamps happens within the transaction as well, even though these things
don't involve the database, writes to the database will still be blocked while
this is happening.
To reduce the potential for register-items to block other writers to the
database for extended periods, this commit moves the transaction to just wrap
the call to sqlite-register. This is the one place where writes occur, so that
should prevent the broken intermediate states issue above. The one difference
this will make is some of the registered items will be visible to other
connections while others may be still being added. I think this is OK, as it's
equivalent to just registering different items.
* guix/store/database.scm (register-items): Reduce transaction scope.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
|
|
It's necessary that store items be locked and protected from garbage
collection while they are being registered. This documents that.
* guix/store/database.scm (register-path, register-items): document GC
protection and locking requirements.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
|
|
This causes with-writable-file to take into consideration the actual store
being used, as passed to 'deduplicate', rather than
whatever (%store-directory) may return.
* guix/store/deduplication.scm (replace-with-link): new keyword argument
'store'. Pass to with-writable-file.
(with-writable-file, call-with-writable-file): new store argument.
(deduplicate): pass store to replace-with-link.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
|
|
* guix/build-system/linux-module.scm (make-linux-module-builder): Delete
some huge items that we probably don't need.
|
|
* guix/ui.scm (show-manifest-transaction): Sort entries to be displayed in a
tabulated view.
|
|
* guix/ui.scm (show-manifest-transaction)[package-strings]: Add an
OLD-VERSIONS keyword parameter. Absorb the code path previously found in the
upgrade-string. Remove upgrade-string.
(show-manifest-transaction): Adjust to the above changes.
|
|
There's no reason at this point to mimic the calling convention of the
'openssl' command.
* nix/libstore/local-store.cc (LocalStore::exportPath): Add only "sign"
and HASH to ARGS. Remove 'tmpDir' and 'hashFile'.
(LocalStore::importPath): Add only "verify" and SIGNATURE to
* guix/scripts/authenticate.scm (guix-authenticate): Adjust
accordingly; remove the OpenSSL-style clauses.
(read-hash-data): Remove.
(sign-with-key): Replace 'port' with 'sha256' and adjust accordingly.
(validate-signature): Export SIGNATURE to be a canonical sexp.
* tests/guix-authenticate.sh: Adjust tests accordingly.
|
|
* doc/guix.texi (Invoking guix archive): Introduce the term "nar bundle"
and clarify what the output of "guix archive --export" really is.
* guix/nar.scm (restore-one-item, restore-file-set): Use the term "nar
bundle" in docstrings.
|
|
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.
|
|
* guix/ui.scm (show-bug-report-information): Link to
<https://guix.gnu.org/help/> instead of <https://www.gnu.org/gethelp/>.
The former is much more useful and includes links to GNU manuals.
|
|
This is a followup to 4071879c86d059ee087c8986915ea72b8c742b72.
* guix/json.scm: Remove.
* Makefile.am (MODULES): Adjust accordingly.
* m4/guix.m4 (GUIX_CHECK_GUILE_JSON): Check for 'define-json-mapping'.
* doc/guix.texi (Requirements): Require Guile-JSON 4.3.0+.
* guix/ci.scm, guix/cve.scm, guix/import/cpan.scm,
guix/import/crate.scm, guix/swh.scm: Remove (guix json) import.
* guix/import/gem.scm, guix/import/pypi.scm: Likewise, and import (json).
* guix/self.scm (specification->package): Switch to GUILE-JSON-4.
* guix/git-download.scm (git-fetch): Likewise.
|
|
* guix/android-repo-download.scm (android-repo-fetch)[guile-json]: Remove.
[build]: Remove GUILE-JSON from 'with-extensions'.
|
|
* guix/git.scm (url-cache-directory): Export it.
|
|
* guix/scripts/system.scm (show-help): Add to '--share=SPEC' and
'--expose=SPEC' that it also works for containers.
|
|
count.
* guix/build/android-repo.scm (android-repo-fetch): Use parallel-job-count
instead of hard-coding job count.
|
|
Follow-up to 3feb846420f24ef1c8b3fe310d293c7a2c91e1d4.
* guix/android-repo-download.scm (android-repo-fetch): Fix docstring.
|
|
* guix/ssh.scm (notify-transfer-progress): Do nothing when TOTAL is
zero.
|
|
Regression introduced in b03267df6d5ec44e9617b6aab0df14a2e79f822e.
The (take files 20) is a leftover from testing session.
* guix/ssh.scm (send-files): Fix value for 'missing'.
|
|
* guix/ui.scm (install-locale): Add call to 'setlocale' in 'catch' handler.
|
|
* guix/store.scm (set-build-options): Change #:locale default value
to (setlocale LC_MESSAGES).
|
|
Fixes <https://bugs.gnu.org/43039>.
Reported by Adam Griffiths <adam.lw.griffiths@gmail.com>.
Previously, a client could lead 'guix substitute' to run in a non-UTF-8
locale, such as the "C" locale. Consequently, 'guix substitute' would
now fail to decode UTF-8 file names such as those that appear in the
'nss-certs' package.
* guix/scripts/substitute.scm (guix-substitute): Set LC_MESSAGES, not LC_ALL.
|
|
* guix/build/android-repo.scm: New file.
* guix/android-repo-download.scm: New file.
* Makefile.am (MODULES): Add them.
|
|
* guix/import/launchpad.scm (updated-launchpad-url): Recognize more URLs.
|
|
* guix/import/launchpad.scm (find-extension): Recognize the .orig.tar.gz
extension.
|
|
* guix/import/launchpad.scm (updated-launchpad-url): Return updated URL when
package has a list of URLs, not the old URL.
|
|
In order to do so, default to an empty options list, and expose options whose
default values are sensitive directly as keyword arguments.
* guix/gexp.scm (computed-file): Extract the LOCAL-BUILD? parameter from the
OPTIONS parameter to make it a stand-alone keyword argument. Introduce an
OPTIONS* binding which is obtained by combining the LOCAL-BUILD? keyword and
its value with OPTIONS.
* doc/guix.texi (G-Expressions): Adjust doc.
Suggested-by: Ludovic Courtès <ludo@gnu.org>
|