Age | Commit message (Expand) | Author |
2022-10-10 | packages: Raise an exception for invalid 'license' values....This is written in such a way that the type check turns into a no-op at
macro-expansion time for trivial cases:
> ,optimize (validate-license gpl3+)
$18 = gpl3+
> ,optimize (validate-license (list gpl3+ gpl2+))
$19 = (list gpl3+ gpl2+)
* guix/packages.scm (valid-license-value?, validate-license): New
macros.
(<package>)[license]: Add 'sanitize' option.
(&package-license-error): New error condition type.
* tests/packages.scm ("license type checking"): New test.
| Ludovic Courtès |
2022-10-07 | tests: Attempt to build 'desktop.tmpl' on all major architectures....Partly fixes <https://issues.guix.gnu.org/58352>.
* tests/guix-system.sh: Try to build 'desktop.tmpl' for x86_64, i686, and aarch64.
| Ludovic Courtès |
2022-10-05 | tests: Add new test cases for beautify-description....* tests/import-utils.scm ("beautify-description: use double spacing"): Update.
("beautify-description: remove single quotes",
"beautify-description: escape @"): New tests.
| Ricardo Wurmus |
2022-09-29 | transformations: '--with-source' now operates in depth....The '--with-source' option is the first one that was implemented, and
it's the only one that would operate only on leaf packages rather than
traversing the dependency graph. This change makes it consistent with
the rest of the transformation options.
* guix/transformations.scm (evaluate-source-replacement-specs): New
procedure.
(transform-package-source): Rewrite using it.
* tests/transformations.scm ("options->transformation, with-source, no
matches"): Rewrite since we no longer get a warning.
("options->transformation, with-source, in depth"): New test.
* doc/guix.texi (Package Transformation Options): Adjust examples.
| Ludovic Courtès |
2022-09-29 | import: print: Quasiquote properties...* guix/import/print.scm (package->code): Quasiquote properties.
* tests/print.scm (pkg-with-properties, pkg-with-properties-source):
New variables.
("package with properties"): New test
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| itd |
2022-09-29 | import/utils: alist->package: Include properties....* guix/import/utils.scm (alist->package): Process properties field in input
data and include it in the generated package.
* tests/import-utils.scm ("alist->package with properties"): New test.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| itd |
2022-09-28 | substitute: Retry downloading when a nar is unavailable....Fixes <https://issues.guix.gnu.org/57978>
Reported by Attila Lendvai <attila@lendvai.name>.
Previously, if a narinfo was available but its corresponding nar was
missing (for instance because the narinfo was cached and the server
became unreachable in the meantime), 'guix substitute --substitute'
would try to download the nar from its preferred location and abort when
that fails. This change forces one retry with each of the URLs.
* guix/scripts/substitute.scm (download-nar): Do not catch
'http-get-error?' exceptions.
(system-error?, network-error?, process-substitution/fallback): New
procedures.
(process-substitution): Call 'process-substitution/fallback' upon
'network-error?'.
* tests/substitute.scm ("substitute, first URL has narinfo but lacks nar, second URL unauthorized")
("substitute, first URL has narinfo but nar is 404, both URLs authorized")
("substitute, first URL has narinfo but nar is 404, one URL authorized")
("substitute, narinfo is available but nar is missing"): New tests.
| Ludovic Courtès |
2022-09-26 | gnu-maintenance: Test latest-html-release....* tests/gnu-maintenance.scm ("latest-html-release, no signature")
("latest-html-release, signature): New tests.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| Maxime Devos |
2022-09-24 | substitute: Test behavior with unroutable substitute server addresses....* tests/substitute.scm (%unroutable-substitute-url): New variable.
("query narinfo signed with authorized key, unroutable URL first")
("substitute, authorized key, first substitute URL is unroutable"): New
tests.
| Ludovic Courtès |
2022-09-20 | home: import: Use (guix read-print) to render the config file....* guix/scripts/home/import.scm (manifest+configuration-files->code):
Insert calls to 'comment' and 'vertical-space'.
(import-manifest): Use 'pretty-print-with-comments/splice' instead of a
loop on 'pretty-print'.
* tests/home-import.scm (remove-recursively): New procedure.
(eval-test-with-home-environment): Use it.
| Ludovic Courtès |
2022-09-20 | read-print: Correctly support multiple same-named newline forms....Previously (home-environment (services ...)) would not be considered a
"newline form". This fixes it.
* guix/read-print.scm (newline-form?): Use 'vhash-foldq*' instead of
'vhash-assq' and iterate over candidates.
* tests/read-print.scm: Add test.
| Ludovic Courtès |
2022-09-17 | gnu-maintenance: Support // URLs in latest-html-release....This makes "./pre-inst-env guix refresh -u" download the release tarball from
the right place -- previously, it downloaded from
https://www.libreoffice.org//download.documentfoundation.org/libreoffice/src/7.4.0/libreoffice-7.4.0.3.tar.xz?idx=1
whereas it should download from
https://download.documentfoundation.org/libreoffice/src/7.4.0/libreoffice-7.4.0.3.tar.xz?idx=1
instead.
* guix/gnu-maintenance.scm (latest-html-release)[url-release]: Adjust
computation in the case of an absolute URI-reference without a scheme.
* tests/gnu-maintenance.scm ("latest-html-release, scheme-less URIs"):
Test it.
Signed-off-by: Christopher Baines <mail@cbaines.net>
| Maxime Devos |
2022-09-17 | import: gem: Support importing a specific version of a gem....* guix/import/gem.scm: (rubygems-fetch, gem->guix-package)
(gem-recursive-import): Fix to fetch the specified version of the gem.
* guix/scripts/import/gem.scm (show-help): Update the help message.
(guix-import-gem): Modify so the version number to be passed to subsequent
procedures.
* tests/gem.scm: Add tests.
* doc/guix.texi (Invoking guix import): Document.
Signed-off-by: Christopher Baines <mail@cbaines.net>
| Taiju HIGASHI |
2022-09-04 | guix system: Do not use 'vm-image.tmpl' in tests....This is a followup to 95a03aa5c507d48e2cde19ea007b8f90a4e0108a. Since
that commit, merely evaluating 'vm-image.tmpl' would trigger the build
of 'current-guix' so skip it.
* tests/guix-system.sh: Do not try to build 'vm-image.tmpl'.
| Ludovic Courtès |
2022-09-04 | guix describe: Adjust test to latest changes....This is a followup to 64a070717c3de32332201df5d6d2d52a7f99dce9.
* tests/guix-describe.sh: Add trailing slash when checking URL.
| Ludovic Courtès |
2022-09-04 | store: Open daemon connections with SOCK_CLOEXEC....Previously, 'guix shell' for example would leak the socket that's
connected to the daemon.
* guix/store.scm (open-unix-domain-socket, open-inet-socket): Pass
SOCK_CLOEXEC to 'socket'.
* tests/guix-shell.sh: Add test.
| Ludovic Courtès |
2022-09-02 | read-print: Define forms for which \n, \t, etc. are not escaped....Previously, the pretty-printer would unconditionally leave everything
but double-quotes and backslashes unescaped when rendering a string.
With this change, the previous behavior only applies to forms listed in
%NATURAL-WHITESPACE-STRING-FORMS.
* guix/read-print.scm (%natural-whitespace-string-forms): New variable.
(printed-string): New procedure.
(pretty-print-with-comments): Use it instead of 'escaped-string'.
* tests/read-print.scm: Add test.
| Ludovic Courtès |
2022-09-01 | read-print: Guess the base to use for integers being printed....Fixes <https://issues.guix.gnu.org/57090>.
Reported by Christopher Rodriguez <yewscion@gmail.com>.
* guix/read-print.scm (%symbols-followed-by-octal-integers)
(%symbols-followed-by-hexadecimal-integers): New variables.
* guix/read-print.scm (integer->string): New procedure.
(pretty-print-with-comments): Use it.
* tests/read-print.scm: Add test.
| Ludovic Courtès |
2022-08-28 | services: Add lightdm-service-type....* gnu/services/lightdm.scm: New service.
* tests/services/lightdm.scm: Test it.
* doc/guix.texi (X Window): Document it.
* gnu/local.mk (GNU_SYSTEM_MODULES): Register it.
Co-authored-by: L p R n d n <guix@lprndn.info>
Co-authored-by: Ricardo Wurmus <rekado@elephly.net>
| Maxim Cournoyer |
2022-08-28 | tests: Add test for menu-entry roundtrips as sexps....* tests/boot-parameters.scm (%uuid-menu-entry,
%file-system-label-menu-entry): New variables.
("menu-entry roundtrip, uuid", "menu-entry roundtrip,
file-system-label"): New tests.
Signed-off-by: Marius Bakke <marius@gnu.org>
| Josselin Poiret |
2022-08-25 | services: configuration: Change the value of the unset marker....The new value of %unset-value sticks out more when something goes wrong, and
is also more unique; i.e. easier to search for.
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
| Attila Lendvai |
2022-08-25 | services: Use the new maybe/unset API....* gnu/home/services/ssh.scm (serialize-address-family): Use the public API of
the maybe infrastructure.
* gnu/services/file-sharing.scm (serialize-maybe-string): Use maybe-value.
(serialize-maybe-file-object): Use maybe-value-set?.
* gnu/services/getmail.scm (getmail-retriever-configuration): Don't use
internals in unset field declarations.
(getmail-destination-configuration): Ditto.
* gnu/services/messaging.scm (raw-content?): Use maybe-value-set?.
(prosody-configuration): Use %unset-value.
* gnu/services/telephony.scm (jami-shepherd-services): Use maybe-value-set?.
(archive-name->username): Use maybe-value-set?.
* tests/services/configuration.scm ("maybe type, no default"): Use
%unset-value.
Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
| Attila Lendvai |
2022-08-10 | read-print: Report missing closing parens instead of looping....Fixes <https://issues.guix.gnu.org/57093>.
Reported by Mohammed AMAR-BENSABER <renken@shione.net>.
Previously 'read-with-comments' would enter an infinite loop.
* guix/read-print.scm (read-with-comments)[missing-closing-paren-error]:
New procedure.
Call it when 'loop' as called from 'liip' returns EOF.
* tests/read-print.scm ("read-with-comments: missing closing paren"):
New test.
| Ludovic Courtès |
2022-08-09 | tests: configuration: Add a test to cover 'unset regression....The regression was introduced with a2b89a3319dc1d621c546855f578acae5baaf6da,
and introduce a risk that 'unset leaks to serialized configuration files.
* tests/services/configuration.scm (maybe-symbol): New type.
(config-with-maybe-symbol): New configuration.
("symbol maybe value serialization, unspecified"): New test.
Reported-by: Attila Lendvai <attila@lendvai.name>
| Maxim Cournoyer |
2022-08-08 | read-print: Add 'case' and 'cond' special forms....* guix/read-print.scm (%special-forms): Add 'case' and 'cond'.
* tests/read-print.scm: Add tests.
| Ludovic Courtès |
2022-08-08 | read-print: Support printing multi-line comments....* guix/read-print.scm (%not-newline): New variable.
(print-multi-line-comment): New procedure.
(pretty-print-with-comments): Use it.
* tests/read-print.scm ("pretty-print-with-comments, multi-line
comment"): New test.
| Ludovic Courtès |
2022-08-08 | style: Add '--whole-file' option....* guix/scripts/style.scm (format-whole-file): New procedure.
(%options, show-help): Add '--whole-file'.
(guix-style): Honor it.
* tests/guix-style.sh: New file.
* Makefile.am (SH_TESTS): Add it.
* doc/guix.texi (Invoking guix style): Document it.
| Ludovic Courtès |
2022-08-08 | read-print: 'canonicalize-comment' leaves top-level comments unchanged....This lets users use three leading semicolons, for instance, in top-level
comments.
* guix/read-print.scm (canonicalize-comment): Add INDENT parameter and
honor it.
(pretty-print-with-comments): Change default value of #:format-comment.
Call FORMAT-COMMENT with INDENT as the second argument.
* tests/read-print.scm: Adjust test accordingly.
| Ludovic Courtès |
2022-08-08 | read-print: Add code to read and write sequences of expressions/blanks....* guix/read-print.scm (read-with-comments): Add #:blank-line? and honor it.
(read-with-comments/sequence, pretty-print-with-comments/splice): New
procedures.
* tests/read-print.scm (test-pretty-print/sequence): New macro.
Add tests using it.
| Ludovic Courtès |
2022-08-08 | read-print: Recognize page breaks....* guix/read-print.scm (<page-break>, page-break?, page-break)
(char-set:whitespace-sans-page-break): New variables.
(space?): New procedure.
(read-vertical-space): Use it.
(read-until-end-of-line): New procedure.
(read-with-comments): Add #\page case.
(pretty-print-with-comments): Add 'page-break?' case.
* tests/read-print.scm ("read-with-comments: top-level page break"): New
test.
Add round-trip test with page break within an sexp.
| Ludovic Courtès |
2022-08-08 | read-print: Read and render vertical space....* guix/read-print.scm (<vertical-space>, vertical-space?)
(vertical-space, vertical-space-height): New variables.
(combine-vertical-space, canonicalize-vertical-space)
(read-vertical-space): New procedures.
(read-with-comments): Use it in the #\newline case.
(pretty-print-with-comments): Add #:format-vertical-space and honor it.
Add case for 'vertical-space?'.
* guix/scripts/style.scm (format-package-definition): Pass
#:format-vertical-space to 'object->string*'.
* tests/read-print.scm ("read-with-comments: list with blank line")
("read-with-comments: list with multiple blank lines")
("read-with-comments: top-level blank lines")
("pretty-print-with-comments, canonicalize-vertical-space"): New tests.
Add a couple of additional round-trip tests.
| Ludovic Courtès |
2022-08-08 | style: Adjust test to not emit blank lines....Previously this test would produce a file containing blank lines between
inputs.
* tests/style.scm ("input labels, modify-inputs and margin comment"):
Remove trailing newlines in replacement strings of 'substitute*'
expression.
| Ludovic Courtès |
2022-08-08 | style: Move reader and printer to (guix read-print)....* guix/scripts/style.scm (<comment>, read-with-comments)
(vhashq, %special-forms, %newline-forms, prefix?)
(special-form-lead, newline-form?, escaped-string)
(string-width, canonicalize-comment, pretty-print-with-comments)
(object->string*): Move to...
* guix/read-print.scm: ... here. New file.
* guix/scripts/import.scm: Adjust accordingly.
* tests/style.scm: Move 'test-pretty-print' and tests to...
* tests/read-print.scm: ... here. New file.
* Makefile.am (MODULES): Add 'guix/read-print.scm'.
(SCM_TESTS): Add 'tests/read-print.scm'.
| Ludovic Courtès |
2022-08-05 | tests: Make tests inside container reproducible....* tests/guix-home.sh: Make tests inside container reproducible.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| Andrew Tropin |
2022-08-01 | services: configuration: Step back from *unspecified*....Fixes <https://issues.guix.gnu.org/56799>.
This partially reverts 8cb1a49a3998c39f315a4199b7d4a121a6d66449.
Rationale: *unspecified* cannot be serialized thus used as a G-Expression
input, which is problematic/inconvenient when using deeply nested records. As
an example, jami-service-type was broken when using partially defined
<jami-account> records.
* gnu/services/configuration.scm (define-maybe-helper): Check against the
'unset symbol.
(normalize-field-type+def): Adjust value to 'unset.
(define-configuration-helper): Use 'unset as the default value thunk.
* gnu/services/file-sharing.scm (serialize-maybe-string): Check against the
'unset symbol.
(serialize-maybe-file-object): Likewise.
* gnu/services/messaging.scm (define-all-configurations): Use 'unset as
value.
(raw-content?): Check against 'unset symbol.
(prosody-configuration)[http-max-content-size]: Default to 'unset.
[http-external-url]: Likewise.
[mod-muc]: Likewise.
[raw-content]: Likewise.
* gnu/services/networking.scm (opendht-configuration): Adjust documentation.
* gnu/services/telephony.scm (jami-shepherd-services): Replace *undefined*
with the 'unset symbol.
* tests/services/configuration.scm ("maybe type, no default"): Check against
the 'unset symbol.
* doc/guix.texi: Regenerate the opendht-configuration,
openvpn-client-configuration and openvpn-server-configuration documentation.
| Maxim Cournoyer |
2022-07-22 | tests: Adjust texlive importer tests....This is a follow-up to commit be7b314f3fe22273e935accac22f313e44d3d970.
* tests/texlive.scm: Add version field to expected output.
| Ricardo Wurmus |
2022-07-14 | home: services: environment-variables: Double-quote values....Fixes <https://issues.guix.gnu.org/54469>.
Reported by Maxime Devos <maximedevos@telenet.be>.
* gnu/home/services.scm (environment-variable-shell-definitions): New
procedure, with code formerly in 'serialize-posix-env-vars'.
(environment-variables->setup-environment-script): Change
"setup-environment" from 'mixed-text-file' to 'computed-file', and use
'environment-variable-shell-definitions'.
* tests/guix-home.sh: Test it.
* gnu/home/services/shells.scm (serialize-posix-env-vars): Delegate to
'environment-variable-shell-definitions'.
| Ludovic Courtès |
2022-07-14 | home: services: shells: Double-quote environment variable values....Fixes <https://issues.guix.gnu.org/56540>.
Until now, environment variable values were emitted unquoted, producing
invalid shell code if the value contains spaces for example.
* gnu/home/services/shells.scm (serialize-posix-env-vars): Define
'shell-quote' procedure in staged code and use it for #$value.
* tests/guix-home.sh: Add test for PS1 variable with a value containing
spaces.
| Ludovic Courtès |
2022-07-13 | tests: build-emacs-utils: Allow test to pass on Emacs 27 too....* tests/build-emacs-utils.scm
("emacs-batch-script: raise &emacs-batch-error on failure"): More loosely
match expected error string, which differs between Emacs 27 and Emacs 28.
| Maxim Cournoyer |
2022-07-10 | monads: Add 'mparameterize'....* etc/system-tests.scm (mparameterize): Move to...
* guix/monads.scm (mparameterize): ... here.
* tests/monads.scm ("mparameterize"): New test.
* .dir-locals.el (c-mode): Add it.
| Ludovic Courtès |
2022-07-08 | profiles: Support the creation of profiles with version 3 manifests....* guix/profiles.scm (%manifest-format-version): New variable.
(manifest->gexp): Add optional 'format-version' parameter.
[optional, entry->gexp]: Honor it.
(profile-derivation): Add #:format-version parameter and honor it.
(<profile>)[format-version]: New field.
(profile-compiler): Honor it.
* guix/build/profiles.scm (manifest-sexp->inputs+search-paths): Support
both versions 3 and 4. Remove unused 'properties' variable.
* tests/profiles.scm ("profile-derivation format version 3"): New test.
| Ludovic Courtès |
2022-07-08 | guix: inferior: Fix the behaviour of open-inferior #:error-port....I'm looking at this as the Guix Data Service uses this behaviour to record and
display logs from inferior processes.
* guix/inferior.scm (open-bidirectional-pipe): Call dup2 for file descriptor
2, passing either the file number for the current error port, or a file
descriptor for /dev/null.
* tests/inferior.scm ("#:error-port stderr", "#:error-port pipe"): Add two new
tests that cover some of the #:error-port behaviour.
| Christopher Baines |
2022-07-07 | tests: telephony: Remove obsolete parsing tests....Fixes <https://issues.guix.gnu.org/56343>.
* tests/services/telephony.scm (parse-dbus-reply, parse-account-ids)
(parse-account-details, parse-contacts, getAccountList-reply): Delete
procedures.
("parse-account-ids"): Delete test.
(getAccountDetails-reply): Delete procedure.
("parse-account-details; username, alias and display name"): Delete test.
(getContacts-reply): Delete procedure.
("parse-account-contacts"): Delete test.
(getContacts-empty-reply): Delete procedure.
("parse-account-contacts, empty array"): Delete test.
Reported-by: Ludovic Courtès <ludo@gnu.org>
| Maxim Cournoyer |
2022-07-04 | style: For 'let' and similar forms, emit one binding per line....Previously, 'let' bindings could be rendered like this:
(let ((x 1) (y 2)
(z 3))
...)
With this change, each bindings goes in its own line.
Partly fixes <https://issues.guix.gnu.org/56297>.
Reported by Maxime Devos <maximedevos@telenet.be>.
* guix/scripts/style.scm (pretty-print-with-comments)[list-of-lists?]:
New procedure.
Use it.
* tests/style.scm: Add tests with 'let' and 'substitute-keyword-arguments'.
| Ludovic Courtès |
2022-07-01 | tests: Adjust 'guix graph' test to latest OCaml changes....* tests/graph.scm ("reverse bag DAG"): Adjust to latest OCaml changes by
looking at dune/ocaml-camomile/ocaml-utop.
| Ludovic Courtès |
2022-07-01 | profiles: Do not repeat entries in 'manifest' file....Fixes <https://issues.guix.gnu.org/55499>.
Reported by Ricardo Wurmus <rekado@elephly.net>.
With this change, the manifest file created for:
guix install r r-seurat r-cistopic r-monocle3 r-cicero-monocle3 r-assertthat
goes from 5.7M to 176K. Likewise, on this profile, wall-clock time of:
GUIX_PROFILING=gc guix package -I
goes from 0.7s to 0.1s, with heap usage going from 55M to 9M.
* guix/profiles.scm (manifest->gexp)[optional]: New procedure.
[entry->gexp]: Turn into a monadic procedure. Return a 'repeated' sexp
if ENTRY was already visited before.
Adjust caller accordingly. Bump manifest version.
(sexp->manifest)[sexp->manifest-entry]: Turn into a monadic procedure.
Add case for 'repeated' nodes. Add each entry to the current state
vhash.
Add clause for version 4 manifests.
[sexp->manifest-entry/v3]: New procedure, with former
'sexp->manifest-entry' code.
* tests/profiles.scm ("deduplication of repeated entries"): New test.
* guix/build/profiles.scm (manifest-sexp->inputs+search-paths)[let-fields]:
New macro.
Use it. Expect version 4. Add clause for 'repeated' nodes.
| Ludovic Courtès |
2022-07-01 | tests: Augment profile collision test....* tests/profiles.scm ("collision of propagated inputs"): Check the
parents of ENTRY1 and ENTRY2.
| Ludovic Courtès |
2022-07-01 | tests: Add sanitizer test....* tests/records.scm ("define-record-type* & sanitize without default
value"): New test.
| Ludovic Courtès |
2022-06-26 | status: Relay "updating substitutes" messages....Until now, those messages would be accumulated and displayed all at
once, when a '\n' was finally emitted by 'guix substitute'. In the
meantime, clients would remain silent.
* guix/status.scm (bytevector-index): Change 'number' parameter to
'numbers' and adjust accordingly.
(build-event-output-port): Pass both #\newline and #\return to
'bytevector-index'.
* tests/status.scm ("build-output-port, daemon messages with LF"): New
test.
| Ludovic Courtès |
2022-06-26 | status: Change tests from SRFI-11 to SRFI-71....* tests/status.scm: Use SRFI-71 'let' instead of SRFI-11 'let-values'.
| Ludovic Courtès |