bug#52269: [PATCH] sitecustomize.py: Honor .pth files.
Hi Maxim, > +if not matching_sites: > +exit(0) are you sure about using `exit()` here? sitecustomize.py is imported during startup and this would simply quit the Python interpreter if GUIX_PYTHONPATH is not set, wouldn’t it? (Can’t test the change unfortunately, because it’s a massive rebuild.) > +# Move the entries that were appended to sys.path in front of Python's own > +# site-packages directory. This enables Guix packages to override Python's > +# bundled packages, such as 'pip'. > +python_site_index = sys.path.index(python_site) > +new_site_start_index = sys.path.index(matching_sites[0]) > +if python_site_index < new_site_start_index: > +sys.path = (sys.path[:python_site_index] > ++ sys.path[new_site_start_index:] > ++ sys.path[python_site_index:new_site_start_index]) This is unrelated to the pdb issue, right? I see that it’s necessary right now, but as suggested in #46848 I’d prefer unbundling setuptools/pip from python. (I’ll send a v3 of the patchset at some point.) Cheers, Lars
bug#52258: [cuirass] Fetch worker ensure-path exception.
Hello, > ice-9/boot-9.scm:1685:16: In procedure raise-exception: > ERROR: > 1. &nar-error: > file: #f > port: # Still not sure what's causing this issue, but I catched this exception in c832d1523d094b21e7c640115cd6158346bbc54d to keep the remote-server fetch thread alive. Thanks, Mathieu
bug#52284: Partially unifying packages and inferior packages
Hi, Maxime Devos skribis: > (define (inferior-package->package inf) > ;; TODO: somehow make sure no inheritance happens on this package > (package > (name (inferior-package-name inf)) > (version (inferior-package-version inf)) > (replacement (and=> (inferior-package-replacement inf) > inferior-package->package)) > (source #f) ; TODO > (build-system inferior-package-build-system) > (arguments `(#:inferior-package ,inf)) > (synopsis (inferior-package-synopsis inf)) > (description (inferior-package-description inf)) > (home-page (inferior-package-home-page inf)) > (location (inferior-package-location inf)) > (inputs (map inferior-inputs->inputs (inferior-package-inputs inf))) > (native-inputs (map inferior-inputs->inputs > (inferior-package-native-inputs inf))) > (propagated-inputs (map inferior-inputs->inputs > (inferior-package-propagated-inputs inf))) > (transitive-propagated-inputs (map inferior-inputs->inputs > (inferior-package-transitive-propagated-inputs inf))) > (native-search-paths (propagated-package-native-search-paths inf)) > (search-paths (propagated-package-search-paths inf)) > (license #f)) ; TODO That’s a clever hack! Longer-term, I think it would be nice(r) to use a type hierarchy somehow so instances can truly be used anywhere a is expected. Thanks, Ludo’.
bug#52321: festival can't do text-to-speech (Linux: can't open /dev/dsp)
Luis Felipe, Luis Felipe via Bug reports for GNU Guix 写道: UNEXPECTED RESULT There is no speech, and the following error is printed: Linux: can't open /dev/dsp Attached is a patch that makes Festival work with Linux (ALSA) by default… but it's a bit odd that we'd've been shipping a ‘broken’ Festival from day 0? (TIL that our default Linux-Libre configurations enable legacy OSS emulation so this could probably be made to work with the right modprobes. Still, this should not be required without good reason, and plenty of OSS-free kernels exist.) I'd like to hear from existing Festival/Guix users if any actually do. Until then, you can easily hack around it: $ cat < ~/.festivalrc (Parameter.set 'Audio_Method 'Audio_Command) (Parameter.set 'Audio_Command "aplay -q -c 1 -t raw -f s16 -r \$SR \$FILE") EOF $ echo sup | festival --tts From [0] of all places. aplay is part of alsa-utils. Kind regards, T G-R [0]: https://web.archive.org/web/20110522202347/http://ubuntuforums.org/showthread.php?t=171182&page=3 From 75c12a0838f4355c99ae3ee7f2bf8809be988f9f Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Mon, 6 Dec 2021 14:25:08 +0100 Subject: [PATCH] gnu: festival: Support ALSA output. * gnu/packages/speech.scm (festival)[arguments]: Add "LINUXAUDIO=alsa" to #:make-flags. [inputs]: Add alsa-lib. --- gnu/packages/speech.scm | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gnu/packages/speech.scm b/gnu/packages/speech.scm index cbc46b32b4..bb1a7b8187 100644 --- a/gnu/packages/speech.scm +++ b/gnu/packages/speech.scm @@ -347,7 +347,8 @@ (define-public festival "/bin/rm") (string-append "ECHO_N=" (assoc-ref %build-inputs "coreutils") -"/bin/printf \"%s\"")) +"/bin/printf \"%s\"") + "LINUXAUDIO=alsa") #:parallel-build? #f ; not supported #:modules ((guix build gnu-build-system) (guix build utils) @@ -505,7 +506,8 @@ (define-public festival (add-before 'configure 'bootstrap (lambda _ (invoke "autoreconf" "-vif")) (inputs - `(("ncurses" ,ncurses))) + `(("alsa-lib" ,alsa-lib) + ("ncurses" ,ncurses))) (native-inputs `(("autoconf" ,autoconf) ("automake" ,automake) -- 2.34.0 signature.asc Description: PGP signature
bug#52316: Package example from cookbook has bugs
Hi Maxime, On Sun, 05 Dec 2021 at 19:18, Maxime Devos wrote: > The example at > https://guix.gnu.org/cookbook/en/html_node/Extended-example.html has > two bugs: > > #:tests? is unconditionally set to #true. This is bad for cross- > compilation and --without-tests=PACKAGE reasons, and would be flagged > by the linter. For cross-compilation, yes. For ’--without-tests’, it is not an issue, IMHO, or why is it? > In the new 'check' phase, libgit2_clar is invoked unconditionally. This > would be flagged by the linter. Since it is an example showing non-trivial things, maybe it can be pedagogical to have something half good, if and only if, “guix lint” reports the half bad. And add an explanation. WDYT? > Also, not exactly a bug, but still bad practice: the web page suggests: > > #:make-flags (list (string-append "prefix=" (assoc-ref %outputs "out")) >"CC=gcc") > > however, hardcoding gcc is bad for cross-compilation reasons. It should > use (cc-for-target) instead. I agree. Cheers, simon
bug#52316: Package example from cookbook has bugs
Hi, zimoun schreef op ma 06-12-2021 om 15:30 [+0100]: > [] > > #:tests? is unconditionally set to #true. This is bad for cross- > > compilation and --without-tests=PACKAGE reasons, and would be > > flagged > > by the linter. > > For cross-compilation, yes. For ’--without-tests’, it is not an > issue, > IMHO, or why is it? I was mistaken, unconditional #true is unproblematic for --without- tests, because --without-tests replaces the #true by #false IIUC. > > In the new 'check' phase, libgit2_clar is invoked unconditionally. > > This > > would be flagged by the linter. > > Since it is an example showing non-trivial things, maybe it can be > pedagogical to have something half good, if and only if, “guix lint” > reports the half bad. And add an explanation. WDYT? I don't know what would be best from a pedagogical perspective: showing the right code directly (showing more non-trivial things and not showing any bugs, but possibly showing too much at once), or writing the half-right code (with a short comment telling there's a bug that will be explained later). The second thing doesn't seem bad to me, but IANAP (I am not a pedagogue). Greetings, Maxime
bug#52333: [PATCH] Remove extraneous references
Hi Guix, r-minimal keeps a record of build time inputs in a comment and in a libtool script. I don’t know if I may remove them all, but some of them seem to safe to remove, so that’s what the first patch does. While I removed texlive-union references from r-minimal, I noticed that python-nbconvert also does something undesirable: it retains references to xelatex and bibtex, but takes these from the texlive-union of the native-inputs. That seems like a mistake, so I added a regular texlive-bin input and embedded a reference to *that* instead of the texlive-union-wrapped scripts. -- Ricardo
bug#52333: [PATCH 2/2] gnu: r-minimal: Remove extraneous references.
* gnu/packages/statistics.scm (r-minimal)[arguments]: Remove references to native build-time tools. --- gnu/packages/statistics.scm | 39 - 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm index cf7a64ec7a..599d6a8fc3 100644 --- a/gnu/packages/statistics.scm +++ b/gnu/packages/statistics.scm @@ -403,12 +403,49 @@ (define-public r-minimal (arguments `(#:tests? #f ,@(substitute-keyword-arguments (package-arguments r-with-tests) + ((#:disallowed-references refs '()) +(cons perl refs)) ((#:configure-flags flags) ;; Do not build the recommended packages. The build system creates ;; random temporary directories and embeds their names in some ;; package files. We build these packages with the r-build-system ;; instead. -`(cons "--without-recommended-packages" ,flags))) +`(cons "--without-recommended-packages" ,flags)) + ((#:phases phases '%standard-phases) +`(modify-phases ,phases + (add-after 'install 'remove-extraneous-references + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (substitute* (string-append out "/lib/R/etc/Makeconf") + (("^# configure.*") +"# Removed to avoid extraneous references\n")) + (substitute* (string-append out "/lib/R/bin/libtool") + (((string-append + "(-L)?(" + (assoc-ref inputs "bzip2") + "|" + (assoc-ref inputs "perl") + "|" + (assoc-ref inputs "texlive") + "|" + (assoc-ref inputs "texlive-bin") + "|" + (assoc-ref inputs "texinfo") + "|" + (assoc-ref inputs "xz") + "|" + (format #false + "/gnu/store/[^-]+-(~{~a~^|~})-[^/]+" + '("glibc-utf8-locales" +"libselinux" +"libsepol" +"file" +"texlive-bin" +"util-macros" +"graphite2")) + "|" + "/gnu/store/[^-]+-glibc-[^-]+-static" + ")/lib")) "" (define-public rmath-standalone (package (inherit r-minimal) -- 2.34.0
bug#52333: [PATCH 1/2] gnu: python-nbconvert: Embed reference to texlive-bin, not texlive-union.
* gnu/packages/python-xyz.scm (python-nbconvert)[inputs]: Add texlive-bin. [arguments]: Embed reference to xelatex and bibtex from the texlive-bin, not the texlive-union. --- gnu/packages/python-xyz.scm | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 81b99e1d2e..602833c4f4 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -12117,14 +12117,15 @@ (define-public python-nbconvert `(#:phases (modify-phases %standard-phases (add-after 'unpack 'fix-paths-and-tests - (lambda _ + (lambda* (#:key inputs #:allow-other-keys) ;; Use pandoc binary from input. (substitute* "nbconvert/utils/pandoc.py" (("'pandoc'") (string-append "'" (which "pandoc") "'"))) ;; Same for LaTeX. - (substitute* "nbconvert/exporters/pdf.py" - (("\"xelatex\"") (string-append "\"" (which "xelatex") "\"")) - (("\"bibtex\"") (string-append "\"" (which "bibtex") "\""))) + (let ((texlive (assoc-ref inputs "texlive-bin"))) + (substitute* "nbconvert/exporters/pdf.py" + (("\"xelatex\"") (string-append "\"" texlive "/bin/xelatex\"")) + (("\"bibtex\"") (string-append "\"" texlive "/bin/bibtex\"" ;; Make sure tests are not skipped. (substitute* (find-files "." "test_.+\\.py$") (("@onlyif_cmds_exist\\(('(pandoc|xelatex)'(, )?)+\\)") "")) @@ -12158,6 +12159,7 @@ (define-public python-nbconvert (invoke "pytest" "-vv"))) (inputs `(("pandoc" ,pandoc) + ("texlive-bin" ,texlive-bin) ;; XXX: Disabled, needs substitute*. ;;("inkscape" ,inkscape) )) -- 2.34.0
bug#52338: Crawler bots are downloading substitutes
I noticed that some bots are downloading substitutes from ci.guix.gnu.org. We should add a robots.txt file to reduce this waste. Specifically, I see bots from Bing and Semrush: https://www.bing.com/bingbot.htm https://www.semrush.com/bot.html
bug#52338: [maintenance] hydra: berlin: Create robots.txt.
I tested that `guix system build` does succeed with this change, but I would like a review on whether the resulting Nginx configuration is correct, and if this is the correct path to disallow. It generates an Nginx location block like this: -- location /robots.txt { add_header Content-Type text/plain; return 200 "User-agent: * Disallow: /nar "; } -- * hydra/nginx/berlin.scm (berlin-locations): Add a robots.txt Nginx location. --- hydra/nginx/berlin.scm | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hydra/nginx/berlin.scm b/hydra/nginx/berlin.scm index 1f4b0be..3bb2129 100644 --- a/hydra/nginx/berlin.scm +++ b/hydra/nginx/berlin.scm @@ -174,7 +174,14 @@ PUBLISH-URL." (nginx-location-configuration (uri "/berlin.guixsd.org-export.pub") (body - (list "root /var/www/guix;")) + (list "root /var/www/guix;"))) + + (nginx-location-configuration + (uri "/robots.txt") + (body + (list + "add_header Content-Type text/plain;" + "return 200 \"User-agent: *\nDisallow: /nar/\n\";")) (define guix.gnu.org-redirect-locations (list -- 2.34.0
bug#51252: bug#52268: [PATCH core-updates-frozen] gnu: Add texlive-latex-luatex.
Hello Ludo, Em domingo, 5 de dezembro de 2021, às 12:40:33 -03, Ludovic Courtès escreveu: > Thiago Jung Bauermann skribis: > > Ricardo Wurmus suggested creating a new package to provide > > ‘lualatex.fmt’ for LuaTeX as a workaround. This is what this package > > does. > > > > Fixes https://issues.guix.gnu.org/51252. > > > > * gnu/packages/tex.scm (texlive-latex-luatex): New variable. > > Applied, thanks! > > I don’t fully understand the issue but it looks like a reasonable and > non-intrusive fix. Thank you! -- Thanks, Thiago
bug#52333: [PATCH 1/2] gnu: python-nbconvert: Embed reference to texlive-bin, not texlive-union.
Ricardo Wurmus writes: > * gnu/packages/python-xyz.scm (python-nbconvert)[inputs]: Add texlive-bin. > [arguments]: Embed reference to xelatex and bibtex from the texlive-bin, not > the texlive-union. This is a bad idea, because it breaks PDF conversion. I still think that the texlive stuff should be a regular input, not a native input, but however we do this: it’s not with this patch. -- Ricardo