From c8d6fa77478acdd2ed7640b0f1011819b3e5d5b5 Mon Sep 17 00:00:00 2001 From: Filip Lajszczak Date: Sun, 9 May 2021 18:05:52 +0200 Subject: doc: Add information about first patch. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * doc/contributing.texi (Submitting Patches): Add information about first patch acnowledgement delay. Signed-off-by: Ludovic Courtès --- doc/contributing.texi | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/contributing.texi b/doc/contributing.texi index c3419912a1..cfcae22502 100644 --- a/doc/contributing.texi +++ b/doc/contributing.texi @@ -1180,6 +1180,11 @@ MIME attachments. You are advised to pay attention if your email client changes anything like line breaks or indentation which could potentially break the patches. +Expect some delay when you submit your very first patch to +@email{guix-patches@@gnu.org}. You have to wait until you get an +acnowledgement with the assigned tracking number. Future acnowledgements +should not be delayed. + When a bug is resolved, please close the thread by sending an email to @email{@var{NNN}-done@@debbugs.gnu.org}. -- cgit 1.4.1 From 4b08aad5e723567c76764eafdde1c3c90eb1def4 Mon Sep 17 00:00:00 2001 From: Filip Lajszczak Date: Sun, 23 May 2021 10:35:08 +0200 Subject: doc: Correct spelling * doc/contributing.tex (Submitting Patches): Correct spelling of "acknowledgement" Co-authored-by: Piotr Kaznowski Signed-off-by: Marius Bakke --- doc/contributing.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/contributing.texi b/doc/contributing.texi index cfcae22502..5fadde4d6c 100644 --- a/doc/contributing.texi +++ b/doc/contributing.texi @@ -1182,7 +1182,7 @@ break the patches. Expect some delay when you submit your very first patch to @email{guix-patches@@gnu.org}. You have to wait until you get an -acnowledgement with the assigned tracking number. Future acnowledgements +acknowledgement with the assigned tracking number. Future acknowledgements should not be delayed. When a bug is resolved, please close the thread by sending an email to -- cgit 1.4.1 From de393bd027b783eac9899bf314fd4ab037a594be Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 25 May 2021 10:04:58 +0300 Subject: doc: Remove reference to mips64. * doc/contributing.texi (Submitting Patches): Don't suggest building packages for mips64. --- doc/contributing.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/contributing.texi b/doc/contributing.texi index 5fadde4d6c..1355c59375 100644 --- a/doc/contributing.texi +++ b/doc/contributing.texi @@ -1031,7 +1031,7 @@ Then reconfigure your system. You can then build packages for different platforms by specifying the @code{--system} option. For example, to build the "hello" package for -the armhf, aarch64, or mips64 architectures, you would run the following +the armhf or aarch64 architectures, you would run the following commands, respectively: @example guix build --system=armhf-linux --rounds=2 hello -- cgit 1.4.1 From 22f95a09eb9f136e59e2c2588a2c28a449155202 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 28 May 2021 16:10:19 +0200 Subject: doc: Spell out the implications of disabling substitutes. Suggested by elb on #guix. * doc/guix.texi (Binary Installation): Add note explaining the implications of disabling substitutes. --- doc/guix.texi | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index e8b0485f78..52c263f7a4 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -787,6 +787,13 @@ To use substitutes from @code{@value{SUBSTITUTE-SERVER}} or one of its mirrors ~root/.config/guix/current/share/guix/@value{SUBSTITUTE-SERVER}.pub @end example +@quotation Note +If you do not enable substitutes, Guix will end up building +@emph{everything} from source on your machine, making each installation +and upgrade very expensive. @xref{On Trusting Binaries}, for a +discussion of reasons why one might want do disable substitutes. +@end quotation + @item Each user may need to perform a few additional steps to make their Guix environment ready for use, @pxref{Application Setup}. -- cgit 1.4.1 From 338f012d8b0437d5a17ac4b46c5d8fb618e2c8df Mon Sep 17 00:00:00 2001 From: Brendan Tildesley Date: Mon, 17 May 2021 00:06:20 +1000 Subject: doc: lxqt-desktop-service: Update lxqt homepage url. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * doc/guix.texi: Replace lxqt.github.io with lxqt-project.org. Signed-off-by: Ludovic Courtès --- doc/guix.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index 52c263f7a4..dc10e88123 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -19213,7 +19213,7 @@ The MATE package to use. @end deftp @deffn {Scheme Variable} lxqt-desktop-service-type -This is the type of the service that runs the @uref{https://lxqt.github.io, +This is the type of the service that runs the @uref{https://lxqt-project.org, LXQt desktop environment}. Its value is a @code{lxqt-desktop-configuration} object (see below). -- cgit 1.4.1 From d127fdd0e79905f99ace13039bc0919acf02eed2 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 30 May 2021 15:07:31 +0200 Subject: doc: Fix typos. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * doc/contributing.texi (Translating Guix): Fix ‘runnig’ typo. Replace ‘target’ with ‘command’ to match the verb. Fix ‘refered’ and ‘formating’ too. --- doc/contributing.texi | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'doc') diff --git a/doc/contributing.texi b/doc/contributing.texi index 1355c59375..bebc8721a0 100644 --- a/doc/contributing.texi +++ b/doc/contributing.texi @@ -1522,20 +1522,20 @@ doubt, please contact us, we will be happy to help! @table @asis @item guix Guix is written in the Guile programming language, and some strings contain -special formating that is interpreted by Guile. These special formating +special formatting that is interpreted by Guile. These special formatting should be highlighted by Weblate. They start with @code{~} followed by one or more characters. -When printing the string, Guile replaces the special formating symbols with +When printing the string, Guile replaces the special formatting symbols with actual values. For instance, the string @samp{ambiguous package specification `~a'} would be substituted to contain said package specification instead of -@code{~a}. To properly translate this string, you must keep the formating +@code{~a}. To properly translate this string, you must keep the formatting code in your translation, although you can place it where it makes sense in your language. For instance, the French translation says @samp{spécification du paquet « ~a » ambiguë} because the adjective needs to be placed in the end of the sentence. -If there are multiple formating symbols, make sure to respect the order. +If there are multiple formatting symbols, make sure to respect the order. Guile does not know in which order you intended the string to be read, so it will substitute the symbols in the same order as the English sentence. @@ -1543,9 +1543,9 @@ As an example, you cannot translate @samp{package '~a' has been superseded by '~a'} by @samp{'~a' superseeds package '~a'}, because the meaning would be reversed. If @var{foo} is superseded by @var{bar}, the translation would read @samp{'foo' superseeds package 'bar'}. To work around this problem, it -is possible to use more advanced formating to select a given piece of data, +is possible to use more advanced formatting to select a given piece of data, instead of following the default English order. @xref{Formatted Output,,, -guile, GNU Guile Reference Manual}, for more information on formating in Guile. +guile, GNU Guile Reference Manual}, for more information on formatting in Guile. @item packages @@ -1556,7 +1556,7 @@ and Descriptions}). Texinfo markup looks like @samp{@@code@{rm -rf@}}, The characters after ``@@'' form the name of the markup, and the text between ``@{'' and ``@}'' is its content. In general, you should not translate the content of markup like @code{@@code}, as it contains literal code that do not -change with language. You can translate the content of formating markup such +change with language. You can translate the content of formatting markup such as @code{@@emph}, @code{@@i}, @code{@@itemize}, @code{@@item}. However, do not translate the name of the markup, or it will not be recognized. Do not translate the word after @code{@@end}, it is the name of the markup that @@ -1586,10 +1586,10 @@ The manual and the cookbook both use Texinfo. As for @code{packages}, please keep Texinfo markup as is. There are more possible markup types in the manual than in the package descriptions. In general, do not translate the content of @code{@@code}, @code{@@file}, @code{@@var}, @code{@@value}, etc. You -should translate the content of formating markup such as @code{@@emph}, +should translate the content of formatting markup such as @code{@@emph}, @code{@@i}, etc. -The manual contains sections that can be refered to by name by @code{@@ref}, +The manual contains sections that can be referred to by name by @code{@@ref}, @code{@@xref} and @code{@@pxref}. We have a mechanism in place so you do not have to translate their content. If you keep the English title, we will automatically replace it with your translation of that title. This ensures @@ -1669,7 +1669,7 @@ synchronize it with our guix and artworks repositories after checking no issue was introduced in the translation. Developers can download the latest PO files from weblate in the Guix -repository by runnig the @command{make download-po} target. It will +repository by running the @command{make download-po} command. It will automatically download the latest files from weblate, reformat them to a canonical form, and check they do not contain issues. The manual needs to be built again to check for additional issues that might crash Texinfo. -- cgit 1.4.1 From b9ac7d9aaaa5849cc3c2acd4b1b41acdd545e66b Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sun, 30 May 2021 23:15:27 -0400 Subject: doc: Add a note about networking requirements for SSH access to VMs. Fixes . It may seem silly, but when not realizing this firsthand, it can be quite surprising and thus not obvious to troubleshoot. Thanks to Eric Brown for their insightful comments on the tracker. * doc/guix.texi (Running Guix in a VM): Add a note that networking support must be available in the Guix System operating system declaration used for the VM. --- doc/guix.texi | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index dc10e88123..0126099d68 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33845,6 +33845,13 @@ every time you modify your @command{config.scm} file and the @command{-o StrictHostKeyChecking=no} prevents you from having to allow a connection to an unknown host every time you connect. +@quotation Note +If you find the above @samp{hostfwd} example not to be working (e.g., +your SSH client hangs attempting to connect to the mapped port of your +VM), make sure that your Guix System VM has networking support, such as +by using the @code{dhcp-client-service-type} service type. +@end quotation + @subsection Using @command{virt-viewer} with Spice As an alternative to the default @command{qemu} graphical client you can -- cgit 1.4.1 From 8a0dc5f1bfba4493d2460bf05be9aff200a9bd04 Mon Sep 17 00:00:00 2001 From: Brice Waegeneire Date: Mon, 31 May 2021 21:44:02 +0200 Subject: tests: Fix loadable-kernel-modules-service tests. * gnu/tests/linux-modules.scm (run-loadable-kernel-modules-service-test): Actually load the modules with kernel-module-loader-service-type. Use a singleton service instead of defining a custom one. * doc/guix.texi (Service Reference): To give an example of linux-loadable-module-service-type use a singleton instead of defining a new service. --- doc/guix.texi | 13 +++++-------- gnu/tests/linux-modules.scm | 13 +++++-------- 2 files changed, 10 insertions(+), 16 deletions(-) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index 0126099d68..39dc2446ef 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -76,7 +76,7 @@ Copyright @copyright{} 2020 Damien Cassou@* Copyright @copyright{} 2020 Jakub Kądziołka@* Copyright @copyright{} 2020 Jack Hill@* Copyright @copyright{} 2020 Naga Malleswari@* -Copyright @copyright{} 2020 Brice Waegeneire@* +Copyright @copyright{} 2020, 2021 Brice Waegeneire@* Copyright @copyright{} 2020 R Veera Kumar@* Copyright @copyright{} 2020 Pierre Langlois@* Copyright @copyright{} 2020 pinoaffe@* @@ -34379,13 +34379,10 @@ This service type is intended to be extended by other service types, such as below: @lisp -(define module-installing-service-type - (service-type - (name 'module-installing-service) - (extensions (list (service-extension linux-loadable-module-service-type - (const (list module-to-install-1 - module-to-install-2))))) - (default-value #f))) +(simple-service 'installing-module + linux-loadable-module-service-type + (list module-to-install-1 + module-to-install-2)) @end lisp This does not actually load modules at bootup, only adds it to the diff --git a/gnu/tests/linux-modules.scm b/gnu/tests/linux-modules.scm index 30d8eae03b..fc8945b77f 100644 --- a/gnu/tests/linux-modules.scm +++ b/gnu/tests/linux-modules.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2019 Jakob L. Kreuze ;;; Copyright © 2020 Danny Milosavljevic -;;; Copyright © 2020 Brice Waegeneire +;;; Copyright © 2020, 2021 Brice Waegeneire ;;; Copyright © 2021 raid5atemyhomework ;;; ;;; This file is part of GNU Guix. @@ -112,16 +112,13 @@ are loaded in memory." "Run a test of an OS having MODULE-PACKAGES, which are loaded by creating a service that extends LINUXL-LOADABLE-MODULE-SERVICE-TYPE. Then verify that MODULE-NAMES are loaded in memory." - (define module-installing-service-type - (service-type - (name 'module-installing-service) - (extensions (list (service-extension linux-loadable-module-service-type - (const module-packages)))) - (default-value #f))) (run-loadable-kernel-modules-test-base (operating-system (inherit (simple-operating-system)) - (services (cons* (service module-installing-service-type) + (services (cons* (simple-service 'installing-module + linux-loadable-module-service-type + module-packages) + (service kernel-module-loader-service-type module-names) (operating-system-user-services (simple-operating-system))))) module-names)) -- cgit 1.4.1 From 82d8ab01f5cb6d479e3b82c08067e2442ee7cad8 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 26 May 2021 22:30:31 +0200 Subject: maint: Require Guile 3.0. * configure.ac: Require Guile 3.0. * doc/guix.texi (Requirements): Adjust accordingly. * gnu/packages/package-management.scm (guile2.2-guix): Remove. * guix/lint.scm (exception-with-kind-and-args?): Remove 'cond-expand'. * guix/scripts/deploy.scm (deploy-machine*): Likewise. * guix/store.scm (call-with-store): Likewise. * guix/swh.scm (http-get*, http-post*): Likewise. * guix/ui.scm (without-compiler-optimizations, guard*) (call-with-error-handling): Likewise. --- configure.ac | 6 +---- doc/guix.texi | 3 +-- gnu/packages/package-management.scm | 34 --------------------------- guix/lint.scm | 11 +++------ guix/scripts/deploy.scm | 5 +--- guix/store.scm | 16 ++++--------- guix/swh.scm | 20 +++++----------- guix/ui.scm | 46 +++++++++++++------------------------ 8 files changed, 32 insertions(+), 109 deletions(-) (limited to 'doc') diff --git a/configure.ac b/configure.ac index 583b902361..84592f6041 100644 --- a/configure.ac +++ b/configure.ac @@ -96,16 +96,12 @@ m4_pattern_forbid([^GUIX_]) dnl Search for 'guile' and 'guild'. This macro defines dnl 'GUILE_EFFECTIVE_VERSION'. -GUILE_PKG([3.0 2.2]) +GUILE_PKG([3.0]) GUILE_PROGS if test "x$GUILD" = "x"; then AC_MSG_ERROR(['guild' binary not found; please check your Guile installation.]) fi -if test "x$GUILE_EFFECTIVE_VERSION" = "x2.2"; then - PKG_CHECK_MODULES([GUILE], [guile-2.2 >= 2.2.6]) -fi - dnl Get CFLAGS and LDFLAGS for libguile. GUILE_FLAGS diff --git a/doc/guix.texi b/doc/guix.texi index 39dc2446ef..43198a0af1 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -840,8 +840,7 @@ GNU Guix is available for download from its website at GNU Guix depends on the following packages: @itemize -@item @url{https://gnu.org/software/guile/, GNU Guile}, version 3.0.x or -2.2.x; +@item @url{https://gnu.org/software/guile/, GNU Guile}, version 3.0.x; @item @url{https://notabug.org/cwebber/guile-gcrypt, Guile-Gcrypt}, version 0.1.0 or later; @item diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index d3d9f87be4..7229723ab8 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -518,40 +518,6 @@ the Nix package manager.") (invoke "make" "install-binPROGRAMS"))) (delete 'wrap-program))))))) - -(define-public guile2.2-guix - (package - (inherit guix) - (name "guile2.2-guix") - (native-inputs - `(("guile" ,guile-2.2) - ("gnutls" ,guile2.2-gnutls) - ("guile-gcrypt" ,guile2.2-gcrypt) - ("guile-json" ,guile2.2-json) - ("guile-lib" ,guile2.2-lib) - ("guile-sqlite3" ,guile2.2-sqlite3) - ("guile-ssh" ,guile2.2-ssh) - ("guile-git" ,guile2.2-git) - ("guile-zlib" ,guile2.2-zlib) - ("guile-lzlib" ,guile2.2-lzlib) - ,@(fold alist-delete (package-native-inputs guix) - '("guile" "gnutls" "guile-gcrypt" "guile-json" - "guile-lib" "guile-sqlite3" "guile-ssh" "guile-git" - "guile-zlib" "guile-lzlib")))) - (inputs - `(("guile" ,guile-2.2) - ,@(alist-delete "guile" (package-inputs guix)))) - (propagated-inputs - `(("gnutls" ,gnutls) - ("guile-gcrypt" ,guile2.2-gcrypt) - ("guile-json" ,guile2.2-json) - ("guile-lib" ,guile2.2-lib) - ("guile-sqlite3" ,guile2.2-sqlite3) - ("guile-ssh" ,guile2.2-ssh) - ("guile-git" ,guile2.2-git) - ("guile-zlib" ,guile2.2-zlib) - ("guile-lzlib" ,guile2.2-lzlib))))) - (define-public guile3.0-guix (deprecated-package "guile3.0-guix" guix)) diff --git a/guix/lint.scm b/guix/lint.scm index a2d6418b85..023a179ea6 100644 --- a/guix/lint.scm +++ b/guix/lint.scm @@ -1003,14 +1003,9 @@ descriptions maintained upstream." (origin-uris origin)) '()))) -(cond-expand - (guile-3 - ;; Guile 3.0.0 does not export this predicate. - (define exception-with-kind-and-args? - (exception-predicate &exception-with-kind-and-args))) - (else ;Guile 2 - (define exception-with-kind-and-args? - (const #f)))) +;; Guile 3.0.0 does not export this predicate. +(define exception-with-kind-and-args? + (exception-predicate &exception-with-kind-and-args)) (define* (check-derivation package #:key store) "Emit a warning if we fail to compile PACKAGE to a derivation." diff --git a/guix/scripts/deploy.scm b/guix/scripts/deploy.scm index bf2e8afa7f..7c62b05d12 100644 --- a/guix/scripts/deploy.scm +++ b/guix/scripts/deploy.scm @@ -125,10 +125,7 @@ Perform the deployment specified by FILE.\n")) ;; and include a '&message'. However, that message only contains ;; the format string. Thus, special-case it here to avoid ;; displaying a bare format string. - ((cond-expand - (guile-3 - ((exception-predicate &exception-with-kind-and-args) c)) - (else #f)) + (((exception-predicate &exception-with-kind-and-args) c) (raise c)) ((message-condition? c) diff --git a/guix/store.scm b/guix/store.scm index 9d706ae590..cf5d5eeccc 100644 --- a/guix/store.scm +++ b/guix/store.scm @@ -648,18 +648,10 @@ connection. Use with care." (close-connection store) (apply values results))))) - (cond-expand - (guile-3 - (with-exception-handler (lambda (exception) - (close-connection store) - (raise-exception exception)) - thunk)) - (else ;Guile 2.2 - (catch #t - thunk - (lambda (key . args) - (close-connection store) - (apply throw key args))))))) + (with-exception-handler (lambda (exception) + (close-connection store) + (raise-exception exception)) + thunk))) (define-syntax-rule (with-store store exp ...) "Bind STORE to an open connection to the store and evaluate EXPs; diff --git a/guix/swh.scm b/guix/swh.scm index 06d2957252..f6d5241e06 100644 --- a/guix/swh.scm +++ b/guix/swh.scm @@ -148,20 +148,12 @@ url (string-append url "/"))) -(cond-expand - (guile-3 - ;; XXX: Work around a bug in Guile 3.0.2 where #:verify-certificate? would - ;; be ignored (). - (define* (http-get* uri #:rest rest) - (apply http-request uri #:method 'GET rest)) - (define* (http-post* uri #:rest rest) - (apply http-request uri #:method 'POST rest))) - (else ;Guile 2.2 - ;; Guile 2.2 did not have #:verify-certificate? so ignore it. - (define* (http-get* uri #:key verify-certificate? streaming?) - (http-request uri #:method 'GET #:streaming? streaming?)) - (define* (http-post* uri #:key verify-certificate? streaming?) - (http-request uri #:method 'POST #:streaming? streaming?)))) +;; XXX: Work around a bug in Guile 3.0.2 where #:verify-certificate? would +;; be ignored (). +(define* (http-get* uri #:rest rest) + (apply http-request uri #:method 'GET rest)) +(define* (http-post* uri #:rest rest) + (apply http-request uri #:method 'POST rest)) (define %date-regexp ;; Match strings like "2014-11-17T22:09:38+01:00" or diff --git a/guix/ui.scm b/guix/ui.scm index 05b3f5f84c..6b0155f563 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -196,17 +196,11 @@ information, or #f if it could not be found." (stack-ref stack 1) ;skip the 'throw' frame last)))) -(cond-expand - (guile-3 - (define-syntax-rule (without-compiler-optimizations exp) - ;; Compile with the baseline compiler (-O1), which is much less expensive - ;; than -O2. - (parameterize (((@ (system base compile) default-optimization-level) 1)) - exp))) - (else - (define-syntax-rule (without-compiler-optimizations exp) - ;; No easy way to turn off optimizations on Guile 2.2. - exp))) +(define-syntax-rule (without-compiler-optimizations exp) + ;; Compile with the baseline compiler (-O1), which is much less expensive + ;; than -O2. + (parameterize (((@ (system base compile) default-optimization-level) 1)) + exp)) (define* (load* file user-module #:key (on-error 'nothing-special)) @@ -674,22 +668,17 @@ or variants of @code{~a} in the same profile.") or remove one of them from the profile.") name1 name2))))) -(cond-expand - (guile-3 - ;; On Guile 3.0, in 'call-with-error-handling' we need to re-raise. To - ;; preserve useful backtraces in case of unhandled errors, we want that to - ;; happen before the stack has been unwound, hence 'guard*'. - (define-syntax-rule (guard* (var clauses ...) exp ...) - "This variant of SRFI-34 'guard' does not unwind the stack before +;; On Guile 3.0, in 'call-with-error-handling' we need to re-raise. To +;; preserve useful backtraces in case of unhandled errors, we want that to +;; happen before the stack has been unwound, hence 'guard*'. +(define-syntax-rule (guard* (var clauses ...) exp ...) + "This variant of SRFI-34 'guard' does not unwind the stack before evaluating the tests and bodies of CLAUSES." - (with-exception-handler - (lambda (var) - (cond clauses ... (else (raise var)))) - (lambda () exp ...) - #:unwind? #f))) - (else - (define-syntax-rule (guard* (var clauses ...) exp ...) - (guard (var clauses ...) exp ...)))) + (with-exception-handler + (lambda (var) + (cond clauses ... (else (raise var)))) + (lambda () exp ...) + #:unwind? #f)) (define (call-with-error-handling thunk) "Call THUNK within a user-friendly error handler." @@ -822,10 +811,7 @@ directories:~{ ~a~}~%") ;; Furthermore, use of 'guard*' ensures that the stack has not ;; been unwound when we re-raise, since that would otherwise show ;; useless backtraces. - ((cond-expand - (guile-3 - ((exception-predicate &exception-with-kind-and-args) c)) - (else #f)) + (((exception-predicate &exception-with-kind-and-args) c) (raise c)) ((message-condition? c) -- cgit 1.4.1 From bdc298ecee15283451d3aa20a849dd7bb22c8538 Mon Sep 17 00:00:00 2001 From: Xinglu Chen Date: Wed, 2 Jun 2021 17:18:22 +0200 Subject: import: Add CHICKEN egg importer. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * guix/import/egg.scm: New file. * guix/scripts/import/egg.scm: New file. * tests/egg.scm: New file. * Makefile.am (MODULES, SCM_TESTS): Register them. * po/guix/POTFILES.in: Likewise. * guix/scripts/import.scm (importers): Add egg importer. * doc/guix.texi (Invoking guix import, Invoking guix refresh): Document it. Signed-off-by: Ludovic Courtès --- Makefile.am | 3 + doc/guix.texi | 24 +++ etc/news.scm | 1 + guix/import/egg.scm | 352 ++++++++++++++++++++++++++++++++++++++++++++ guix/scripts/import.scm | 4 +- guix/scripts/import/egg.scm | 107 ++++++++++++++ po/guix/POTFILES.in | 2 + tests/egg.scm | 132 +++++++++++++++++ 8 files changed, 623 insertions(+), 2 deletions(-) create mode 100644 guix/import/egg.scm create mode 100644 guix/scripts/import/egg.scm create mode 100644 tests/egg.scm (limited to 'doc') diff --git a/Makefile.am b/Makefile.am index 8db7d6a320..3e72c3ebd0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -248,6 +248,7 @@ MODULES = \ guix/import/cpan.scm \ guix/import/cran.scm \ guix/import/crate.scm \ + guix/import/egg.scm \ guix/import/elpa.scm \ guix/import/gem.scm \ guix/import/github.scm \ @@ -293,6 +294,7 @@ MODULES = \ guix/scripts/challenge.scm \ guix/scripts/import/crate.scm \ guix/scripts/import/cran.scm \ + guix/scripts/import/egg.scm \ guix/scripts/import/elpa.scm \ guix/scripts/import/gem.scm \ guix/scripts/import/gnu.scm \ @@ -449,6 +451,7 @@ SCM_TESTS = \ tests/debug-link.scm \ tests/derivations.scm \ tests/discovery.scm \ + tests/egg.scm \ tests/elpa.scm \ tests/file-systems.scm \ tests/gem.scm \ diff --git a/doc/guix.texi b/doc/guix.texi index 43198a0af1..ed442d3f9b 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -11600,6 +11600,28 @@ using this mode, the symbol of the package is made by appending the version to its name, so that multiple versions of the same package can coexist. @end table + +@item egg +@cindex egg +Import metadata for @uref{https://wiki.call-cc.org/eggs, CHICKEN eggs}. +The information is taken from @file{PACKAGE.egg} files found in the +@uref{git://code.call-cc.org/eggs-5-latest, eggs-5-latest} Git +repository. However, it does not provide all the information that we +need, there is no ``description'' field, and the licenses used are not +always precise (BSD is often used instead of BSD-N). + +@example +guix import egg sourcehut +@end example + +Additional options include: +@table @code +@item --recursive +@itemx -r +Traverse the dependency graph of the given upstream package recursively +and generate package expressions for all those packages that are not yet +in Guix. +@end table @end table The structure of the @command{guix import} code is modular. It would be @@ -11754,6 +11776,8 @@ the updater for KDE packages; the updater for X.org packages; @item kernel.org the updater for packages hosted on kernel.org; +@item egg +the updater for @uref{https://wiki.call-cc.org/eggs/, Egg} packages; @item elpa the updater for @uref{https://elpa.gnu.org/, ELPA} packages; @item cran diff --git a/etc/news.scm b/etc/news.scm index 65d83061df..f61c4d8ccf 100644 --- a/etc/news.scm +++ b/etc/news.scm @@ -14,6 +14,7 @@ ;; Copyright © 2021 Zhu Zihao ;; Copyright © 2021 Chris Marusich ;; Copyright © 2021 Maxime Devos +;; Copyright © 2021 Xinglu Chen ;; ;; Copying and distribution of this file, with or without modification, are ;; permitted in any medium without royalty provided the copyright notice and diff --git a/guix/import/egg.scm b/guix/import/egg.scm new file mode 100644 index 0000000000..26f8364732 --- /dev/null +++ b/guix/import/egg.scm @@ -0,0 +1,352 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2021 Xinglu Chen +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (guix import egg) + #:use-module (ice-9 ftw) + #:use-module (ice-9 match) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-71) + #:use-module (gcrypt hash) + #:use-module (guix git) + #:use-module (guix i18n) + #:use-module (guix base32) + #:use-module (guix diagnostics) + #:use-module (guix memoization) + #:use-module (guix packages) + #:use-module (guix upstream) + #:use-module (guix build-system) + #:use-module (guix build-system chicken) + #:use-module (guix store) + #:use-module ((guix download) #:select (download-to-store url-fetch)) + #:use-module (guix import utils) + #:use-module ((guix licenses) #:prefix license:) + #:export (egg->guix-package + egg-recursive-import + %egg-updater + + ;; For tests. + guix-package->egg-name)) + +;;; Commentary: +;;; +;;; (guix import egg) provides package importer for CHICKEN eggs. See the +;;; official specification format for eggs +;;; . +;;; +;;; The following happens under the hood: +;;; +;;; * is a Git repository that contains +;;; the latest version of all CHICKEN eggs. We look clone this repository +;;; and retrieve the latest version number, and the PACKAGE.egg file, which +;;; contains a list of lists containing metadata about the egg. +;;; +;;; * All the eggs are stored as tarballs at +;;; , so we grab the tarball for +;;; the egg from there. +;;; +;;; * The rest of the package fields will be parsed from the PACKAGE.egg file. +;;; +;;; Todos: +;;; +;;; * Support for CHICKEN 4? +;;; +;;; * Some packages will specify a specific version of a depencency in the +;;; PACKAGE.egg file, how should we handle this? +;;; +;;; Code: + + +;;; +;;; Egg metadata fetcher and helper functions. +;;; + +(define package-name-prefix "chicken-") + +(define %eggs-url + (make-parameter "https://code.call-cc.org/egg-tarballs/5")) + +(define %eggs-home-page + (make-parameter "https://wiki.call-cc.org/egg")) + +(define (egg-source-url name version) + "Return the URL to the source tarball for version VERSION of the CHICKEN egg +NAME." + (string-append (%eggs-url) "/" name "/" name "-" version ".tar.gz")) + +(define (egg-name->guix-name name) + "Return the package name for CHICKEN egg NAME." + (string-append package-name-prefix name)) + +(define (eggs-repository) + "Update or fetch the latest version of the eggs repository and return the path +to the repository." + (let* ((url "git://code.call-cc.org/eggs-5-latest") + (directory commit _ (update-cached-checkout url))) + directory)) + +(define (egg-directory name) + "Return the directory containing the source code for the egg NAME." + (let ((eggs-directory (eggs-repository))) + (string-append eggs-directory "/" name))) + +(define (find-latest-version name) + "Get the latest version of the egg NAME." + (let ((directory (scandir (egg-directory name)))) + (if directory + (last directory) + #f))) + +(define* (egg-metadata name #:optional file) + "Return the package metadata file for the egg NAME, or if FILE is specified, +return the package metadata in FILE." + (call-with-input-file (or file + (string-append (egg-directory name) "/" + (find-latest-version name) + "/" name ".egg")) + read)) + +(define (guix-name->egg-name name) + "Return the CHICKEN egg name corresponding to the Guix package NAME." + (if (string-prefix? package-name-prefix name) + (string-drop name (string-length package-name-prefix)) + name)) + +(define (guix-package->egg-name package) + "Return the CHICKEN egg name of the Guix CHICKEN PACKAGE." + (or (assq-ref (package-properties package) 'upstream-name) + (guix-name->egg-name (package-name package)))) + +(define (egg-package? package) + "Check if PACKAGE is an CHICKEN egg package." + (and (eq? (package-build-system package) chicken-build-system) + (string-prefix? package-name-prefix (package-name package)))) + +(define string->license + ;; Doesn't seem to use a specific format. + ;; + (match-lambda + ("GPL-2" 'license:gpl2) + ("GPL-2+" 'license:gpl2+) + ("GPL-3" 'license:gpl3) + ("GPL-3+" 'license:gpl3+) + ("GPL" 'license:gpl?) + ("AGPL-3" 'license:agpl3) + ("AGPL" 'license:agpl?) + ("LGPL-2.0" 'license:lgpl2.0) + ("LGPL-2.0+" 'license:lgpl2.0+) + ("LGPL-2.1" 'license:lgpl2.1) + ("LGPL-2.1+" 'license:lgpl2.1+) + ("LGPL-3" 'license:lgpl3) + ("LGPL-3" 'license:lgpl3+) + ("LGPL" 'license:lgpl?) + ("BSD-1-Clause" 'license:bsd-1) + ("BSD-2-Clause" 'license:bsd-2) + ("BSD-3-Clause" 'license:bsd-3) + ("BSD" 'license:bsd?) + ("MIT" 'license:expat) + ("ISC" 'license:isc) + ("Artistic-2" 'license:artistic2.0) + ("Apache-2.0" 'license:asl2.0) + ("Public Domain" 'license:public-domain) + ((x) (string->license x)) + ((lst ...) `(list ,@(map string->license lst))) + (_ #f))) + + +;;; +;;; Egg importer. +;;; + +(define* (egg->guix-package name #:key (file #f) (source #f)) + "Import CHICKEN egg NAME from and return a record type for the +egg, or #f on failure. FILE is the filepath to the NAME.egg file. SOURCE is +the a ``file-like'' object containing the source code corresonding to the egg. +If SOURCE is not specified, the tarball for the egg will be downloaded. + +Specifying the SOURCE argument is mainly useful for developing a CHICKEN egg +locally. Note that if FILE and SOURCE are specified, recursive import will +not work." + (define egg-content (if file + (egg-metadata name file) + (egg-metadata name))) + (if (not egg-content) + (values #f '()) ; egg doesn't exist + (let* ((version* (or (assoc-ref egg-content 'version) + (find-latest-version name))) + (version (if (list? version*) (first version*) version*)) + (source-url (if source #f (egg-source-url name version))) + (tarball (if source + #f + (with-store store + (download-to-store store source-url))))) + + (define egg-home-page + (string-append (%eggs-home-page) "/" name)) + + (define egg-synopsis + (match (assoc-ref egg-content 'synopsis) + ((synopsis) synopsis) + (_ #f))) + + (define egg-licenses + (let ((licenses* + (match (assoc-ref egg-content 'license) + ((license) + (map string->license (string-split license #\/))) + (#f + '())))) + (match licenses* + ((license) license) + ((license1 license2 ...) `(list ,@licenses*))))) + + (define (maybe-symbol->string sym) + (if (symbol? sym) (symbol->string sym) sym)) + + (define (prettify-system-dependency name) + ;; System dependencies sometimes have spaces and/or upper case + ;; letters in them. + ;; + ;; There will probably still be some weird edge cases. + (string-map (lambda (char) + (case char + ((#\space) #\-) + (else char))) + (maybe-symbol->string name))) + + (define* (egg-parse-dependency name #:key (system? #f)) + (define extract-name + (match-lambda + ((name version) name) + (name name))) + + (define (prettify-name name) + (if system? + (prettify-system-dependency name) + (maybe-symbol->string name))) + + (let ((name (prettify-name (extract-name name)))) + ;; Dependencies are sometimes specified as symbols and sometimes + ;; as strings + (list (string-append (if system? "" package-name-prefix) + name) + (list 'unquote + (string->symbol (string-append + (if system? "" package-name-prefix) + name)))))) + + (define egg-propagated-inputs + (let ((dependencies (assoc-ref egg-content 'dependencies))) + (if (list? dependencies) + (map egg-parse-dependency + dependencies) + '()))) + + ;; TODO: Or should these be propagated? + (define egg-inputs + (let ((dependencies (assoc-ref egg-content 'foreign-dependencies))) + (if (list? dependencies) + (map (lambda (name) + (egg-parse-dependency name #:system? #t)) + dependencies) + '()))) + + (define egg-native-inputs + (let* ((test-dependencies (or (assoc-ref egg-content + 'test-dependencies) + '())) + (build-dependencies (or (assoc-ref egg-content + 'build-dependencies) + '())) + (test+build-dependencies (append test-dependencies + build-dependencies))) + (match test+build-dependencies + ((_ _ ...) (map egg-parse-dependency + test+build-dependencies)) + (() '())))) + + ;; Copied from (guix import hackage). + (define (maybe-inputs input-type inputs) + (match inputs + (() + '()) + ((inputs ...) + (list (list input-type + (list 'quasiquote inputs)))))) + + (values + `(package + (name ,(egg-name->guix-name name)) + (version ,version) + (source + ,(if source + source + `(origin + (method url-fetch) + (uri ,source-url) + (sha256 + (base32 ,(if tarball + (bytevector->nix-base32-string + (file-sha256 tarball)) + "failed to download tar archive")))))) + (build-system chicken-build-system) + (arguments ,(list 'quasiquote (list #:egg-name name))) + ,@(maybe-inputs 'native-inputs egg-native-inputs) + ,@(maybe-inputs 'inputs egg-inputs) + ,@(maybe-inputs 'propagated-inputs egg-propagated-inputs) + (home-page ,egg-home-page) + (synopsis ,egg-synopsis) + (description #f) + (license ,egg-licenses)) + (filter (lambda (name) + (not (member name '("srfi-4")))) + (map (compose guix-name->egg-name first) + (append egg-propagated-inputs + egg-native-inputs))))))) + +(define egg->guix-package/m ;memoized variant + (memoize egg->guix-package)) + +(define (egg-recursive-import package-name) + (recursive-import package-name + #:repo->guix-package (lambda* (name #:key version repo) + (egg->guix-package/m name)) + #:guix-name egg-name->guix-name)) + + +;;; +;;; Updater. +;;; + +(define (latest-release package) + "Return an @code{} for the latest release of PACKAGE." + (let* ((egg-name (guix-package->egg-name package)) + (version (find-latest-version egg-name)) + (source-url (egg-source-url egg-name version))) + (upstream-source + (package (package-name package)) + (version version) + (urls (list source-url))))) + +(define %egg-updater + (upstream-updater + (name 'egg) + (description "Updater for CHICKEN egg packages") + (pred egg-package?) + (latest latest-release))) + +;;; egg.scm ends here diff --git a/guix/scripts/import.scm b/guix/scripts/import.scm index bbd9a3b190..f53d1ac1f4 100644 --- a/guix/scripts/import.scm +++ b/guix/scripts/import.scm @@ -76,8 +76,8 @@ rather than \\n." ;;; Entry point. ;;; -(define importers '("gnu" "pypi" "cpan" "hackage" "stackage" "elpa" "gem" - "go" "cran" "crate" "texlive" "json" "opam")) +(define importers '("gnu" "pypi" "cpan" "hackage" "stackage" "egg" "elpa" + "gem" "go" "cran" "crate" "texlive" "json" "opam")) (define (resolve-importer name) (let ((module (resolve-interface diff --git a/guix/scripts/import/egg.scm b/guix/scripts/import/egg.scm new file mode 100644 index 0000000000..7dbd6fcd5a --- /dev/null +++ b/guix/scripts/import/egg.scm @@ -0,0 +1,107 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2021 Xinglu Chen +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (guix scripts import egg) + #:use-module (guix ui) + #:use-module (guix utils) + #:use-module (guix scripts) + #:use-module (guix import egg) + #:use-module (guix scripts import) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-11) + #:use-module (srfi srfi-37) + #:use-module (ice-9 match) + #:use-module (ice-9 format) + #:export (guix-import-egg)) + + +;;; +;;; Command-line options. +;;; + +(define %default-options + '()) + +(define (show-help) + (display (G_ "Usage: guix import egg PACKAGE-NAME +Import and convert the egg package for PACKAGE-NAME.\n")) + (display (G_ " + -h, --help display this help and exit")) + (display (G_ " + -r, --recursive import packages recursively")) + (display (G_ " + -V, --version display version information and exit")) + (newline) + (show-bug-report-information)) + +(define %options + ;; Specification of the command-line options. + (cons* (option '(#\h "help") #f #f + (lambda args + (show-help) + (exit 0))) + (option '(#\V "version") #f #f + (lambda args + (show-version-and-exit "guix import egg"))) + (option '(#\r "recursive") #f #f + (lambda (opt name arg result) + (alist-cons 'recursive #t result))) + %standard-import-options)) + + +;;; +;;; Entry point. +;;; + +(define (guix-import-egg . args) + (define (parse-options) + ;; Return the alist of option values. + (args-fold* args %options + (lambda (opt name arg result) + (leave (G_ "~A: unrecognized option~%") name)) + (lambda (arg result) + (alist-cons 'argument arg result)) + %default-options)) + + (let* ((opts (parse-options)) + (repo (and=> (assoc-ref opts 'repo) string->symbol)) + (args (filter-map (match-lambda + (('argument . value) + value) + (_ #f)) + (reverse opts)))) + (match args + ((package-name) + (if (assoc-ref opts 'recursive) + ;; Recursive import + (map (match-lambda + ((and ('package ('name name) . rest) pkg) + `(define-public ,(string->symbol name) + ,pkg)) + (_ #f)) + (egg-recursive-import package-name)) + ;; Single import + (let ((sexp (egg->guix-package package-name))) + (unless sexp + (leave (G_ "failed to download meta-data for package '~a'~%") + package-name)) + sexp))) + (() + (leave (G_ "too few arguments~%"))) + ((many ...) + (leave (G_ "too many arguments~%")))))) diff --git a/po/guix/POTFILES.in b/po/guix/POTFILES.in index 727f820cca..14324b25de 100644 --- a/po/guix/POTFILES.in +++ b/po/guix/POTFILES.in @@ -7,6 +7,7 @@ gnu/system.scm gnu/services/shepherd.scm gnu/system/mapped-devices.scm gnu/system/shadow.scm +guix/import/egg.scm guix/import/opam.scm gnu/installer.scm gnu/installer/connman.scm @@ -100,6 +101,7 @@ guix/scripts/environment.scm guix/scripts/time-machine.scm guix/scripts/import/cpan.scm guix/scripts/import/crate.scm +guix/scripts/import/egg.scm guix/scripts/import/gem.scm guix/scripts/import/gnu.scm guix/scripts/import/go.scm diff --git a/tests/egg.scm b/tests/egg.scm new file mode 100644 index 0000000000..0884d8d429 --- /dev/null +++ b/tests/egg.scm @@ -0,0 +1,132 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2021 Xinglu Chen +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (test-eggs) + #:use-module (guix import egg) + #:use-module (guix gexp) + #:use-module (guix base32) + #:use-module (gcrypt hash) + #:use-module (guix tests) + #:use-module ((guix build syscalls) #:select (mkdtemp!)) + #:use-module ((guix build utils) #:select (delete-file-recursively mkdir-p which)) + #:use-module ((guix utils) #:select (call-with-temporary-output-file)) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-64) + #:use-module (web uri) + #:use-module (ice-9 match)) + +(define test-egg-1 + '((synopsis "Example egg") + (license "GPL-3/MIT") + (version "1.0.0") + (test-dependencies test srfi-1) + (foreign-dependencies libgit2) + (build-dependencies begin-syntax) + (dependencies datatype) + (author "John Doe"))) + +(define test-egg-2 + '((synopsis "Example egg") + (license "GPL-3+") + (version "0.3") + (test-dependencies test) + (foreign-dependencies libgit2) + (build-dependencies begin-syntax) + (dependencies datatype) + (author "Alice Bobson"))) + +(define test-egg-1-file "/tmp/guix-egg-1") +(define test-egg-2-file "/tmp/guix-egg-2") + +(test-begin "egg") + +(test-equal "guix-package->egg-name" + "bar" + (guix-package->egg-name + (dummy-package "dummy" + (name "chicken-bar")))) + +;; Copied from tests/hackage.scm +(define-syntax-rule (define-package-matcher name pattern) + (define* (name obj) + (match obj + (pattern #t) + (x (pk 'fail x #f))))) + +(define (eval-test-with-egg-file egg-name egg-test egg-file matcher) + (call-with-output-file egg-file + (lambda (port) + (write egg-test port))) + (matcher (egg->guix-package egg-name + #:file egg-file + #:source (plain-file + (string-append egg-name "-egg") + "content")))) + +(define-package-matcher match-chicken-foo + ('package + ('name "chicken-foo") + ('version "1.0.0") + ('source (? file-like? source)) + ('build-system 'chicken-build-system) + ('arguments ('quasiquote ('#:egg-name "foo"))) + ('native-inputs + ('quasiquote + (("chicken-test" ('unquote chicken-test)) + ("chicken-srfi-1" ('unquote chicken-srfi-1)) + ("chicken-begin-syntax" ('unquote chicken-begin-syntax))))) + ('inputs + ('quasiquote + (("libgit2" ('unquote libgit2))))) + ('propagated-inputs + ('quasiquote + (("chicken-datatype" ('unquote chicken-datatype))))) + ('home-page "https://wiki.call-cc.org/egg/foo") + ('synopsis "Example egg") + ('description #f) + ('license '(list license:gpl3 license:expat)))) + +(define-package-matcher match-chicken-bar + ('package + ('name "chicken-bar") + ('version "0.3") + ('source (? file-like? source)) + ('build-system 'chicken-build-system) + ('arguments ('quasiquote ('#:egg-name "bar"))) + ('native-inputs + ('quasiquote + (("chicken-test" ('unquote chicken-test)) + ("chicken-begin-syntax" ('unquote chicken-begin-syntax))))) + ('inputs + ('quasiquote + (("libgit2" ('unquote libgit2))))) + ('propagated-inputs + ('quasiquote + (("chicken-datatype" ('unquote chicken-datatype))))) + ('home-page "https://wiki.call-cc.org/egg/bar") + ('synopsis "Example egg") + ('description #f) + ('license 'license:gpl3+))) + +(test-assert "egg->guix-package local file, multiple licenses" + (eval-test-with-egg-file "foo" test-egg-1 test-egg-1-file match-chicken-foo)) + +(test-assert "egg->guix-package local file, single license" + (eval-test-with-egg-file "bar" test-egg-2 test-egg-2-file match-chicken-bar)) + +(test-end "egg") -- cgit 1.4.1 From ecbfa206091574f913a1914447bad79206eff548 Mon Sep 17 00:00:00 2001 From: Eric Brown Date: Sun, 30 May 2021 22:00:52 +0100 Subject: doc: Fix example iptables configuration. * doc/guix.texi (Networking Services): Allow established and related incoming connections in example iptables configuration. Signed-off-by: Arun Isaac --- doc/guix.texi | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index ed442d3f9b..eb64518a95 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -16450,6 +16450,7 @@ configuration rejecting all incoming connections except those to the ssh port :INPUT ACCEPT :FORWARD ACCEPT :OUTPUT ACCEPT +-A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT -A INPUT -p tcp --dport 22 -j ACCEPT -A INPUT -j REJECT --reject-with icmp-port-unreachable COMMIT @@ -16458,6 +16459,7 @@ COMMIT :INPUT ACCEPT :FORWARD ACCEPT :OUTPUT ACCEPT +-A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT -A INPUT -p tcp --dport 22 -j ACCEPT -A INPUT -j REJECT --reject-with icmp6-port-unreachable COMMIT -- cgit 1.4.1 From a9afff4beb830b344a59a6fd7e48335e5c9c3da5 Mon Sep 17 00:00:00 2001 From: Solene Rapenne Date: Sun, 30 May 2021 16:04:35 +0200 Subject: doc: Mention virtualization module and add missing closing parenthesis. * doc/contributing.texi (Submitting Patches): Mention virtualization module and add missing closing parenthesis. Signed-off-by: Mathieu Othacehe --- doc/contributing.texi | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/contributing.texi b/doc/contributing.texi index bebc8721a0..87719a4bbe 100644 --- a/doc/contributing.texi +++ b/doc/contributing.texi @@ -1018,13 +1018,14 @@ Make sure the package builds on your platform, using @code{guix build We recommend you also try building the package on other supported platforms. As you may not have access to actual hardware platforms, we recommend using the @code{qemu-binfmt-service-type} to emulate them. In -order to enable it, add the following service to the list of services in -your @code{operating-system} configuration: +order to enable it, add the @code{virtualization} service module and the +following service to the list of services in your @code{operating-system} +configuration: @lisp (service qemu-binfmt-service-type (qemu-binfmt-configuration - (platforms (lookup-qemu-platforms "arm" "aarch64")) + (platforms (lookup-qemu-platforms "arm" "aarch64")))) @end lisp Then reconfigure your system. -- cgit 1.4.1 From f7331f06dbabd855ac536ff0ec367bb5e25ea959 Mon Sep 17 00:00:00 2001 From: Matthew James Kraai Date: Sun, 6 Jun 2021 06:06:50 -0700 Subject: doc: Pluralize "package." * doc/contributing.texi (Submitting Patches): Pluralize "package." Signed-off-by: Tobias Geerinckx-Rice --- doc/contributing.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/contributing.texi b/doc/contributing.texi index 87719a4bbe..fa8c0cf3ba 100644 --- a/doc/contributing.texi +++ b/doc/contributing.texi @@ -1063,7 +1063,7 @@ and which optional dependencies should be used. In particular, avoid adding the @code{texlive-tiny} package or @code{texlive-union} procedure instead. @item -For important changes, check that dependent package (if applicable) are +For important changes, check that dependent packages (if applicable) are not affected by the change; @code{guix refresh --list-dependent @var{package}} will help you do that (@pxref{Invoking guix refresh}). -- cgit 1.4.1