bug#56709: Channel opening failure with guix deploy

2023-01-18 Thread Thompson, David
Hello,

This problem is strangely transient.  I've seen it happen to others
when it wasn't happening to me with the same remote machine.  Now I am
having this problem again on 2 different servers that I manage.  I dug
around a bit and found that calls to 'open-remote-pipe*' from
guile-ssh have some chance of failure even though the SSH session is
fine. This procedure is called many times during a deploy, so the odds
are high that one of them will fail.  I got lucky once today and had a
deploy finish but that was after many failures.  I was able to unblock
myself by hacking call sites to repeatedly call 'open-remote-pipe*' in
a loop, like this:

(let loop ()
 (or (false-if-exception
  (apply open-remote-pipe* session OPEN_BOTH repl-command))
 (loop)))

I also added some 'pk' logging and found that 'open-remote-pipe*'
would typically succeed on the first or second try.  I think there
could be a bit more investigation done to better understand *why* this
happens in the first place, but as a resiliency tactic I think it
would be appropriate to write a wrapper procedure that retries a few
times before giving up.

Thoughts?

- Dave





bug#60927: gPodder database version field different when built using --with-latest

2023-01-18 Thread Tobias Geerinckx-Rice via Bug reports for GNU Guix

Hullo,

On 2023-01-18 9:13, Csepp wrote:

Haven't completely debugged this, but the symptoms are:
* running the packaged version doesn't work, blank scree, failed assert
on console about differing database schema version


I can't reproduce this, in either direction.  However, I didn't have an 
existing GPodder configuration or database, and I'm not even sure where 
those are kept.


If you do, could you grep for one of the hashes?

Kind regards,

T G-R

Sent from a Web browser.  Excuse or enjoy my brevity.





bug#25235: [PATCH v2 1/1] build-system/pyproject: Do not wrap native-inputs.

2023-01-18 Thread Maxim Cournoyer
Fixes .

* guix/build/pyproject-build-system.scm (wrap) [native-inputs]: New argument.
Filter out native inputs from the values in GUIX_PYTHONPATH.

---

Changes in v2:
- Add missing copyright line
- Rework wrap phase to avoid removing inputs found in both native-inputs and 
inputs
- Enclose wrap computations in an 'unless' form and streamline

 guix/build/pyproject-build-system.scm | 39 ---
 1 file changed, 24 insertions(+), 15 deletions(-)

diff --git a/guix/build/pyproject-build-system.scm 
b/guix/build/pyproject-build-system.scm
index a66c1fb34a..9da86bfc54 100644
--- a/guix/build/pyproject-build-system.scm
+++ b/guix/build/pyproject-build-system.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2021 Lars-Dominik Braun 
 ;;; Copyright © 2022 Marius Bakke 
+;;; Copyright © 2023 Maxim Cournoyer 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -445,7 +446,7 @@ (define* (add-install-to-pythonpath #:key native-inputs 
outputs
   "A phase that just wraps the 'add-installed-pythonpath' procedure."
   (add-installed-pythonpath native-inputs outputs))
 
-(define* (wrap #:key inputs outputs #:allow-other-keys)
+(define* (wrap #:key native-inputs inputs outputs #:allow-other-keys)
   (define (list-of-files dir)
 (find-files dir (lambda (file stat)
   (and (eq? 'regular (stat:type stat))
@@ -458,20 +459,28 @@ (define bindirs
  (string-append dir "/sbin"
 outputs))
 
-  ;; Do not require "guile" to be present in the package inputs
-  ;; even when there is nothing to wrap.
-  ;; Also, calculate (guile) only once to prevent some I/O.
-  (define %guile (delay (search-input-file inputs "bin/guile")))
-  (define (guile) (force %guile))
-
-  (let* ((var `("GUIX_PYTHONPATH" prefix
-,(search-path-as-string->list
-  (or (getenv "GUIX_PYTHONPATH") "")
-(for-each (lambda (dir)
-(let ((files (list-of-files dir)))
-  (for-each (cut wrap-script <> #:guile (guile) var)
-files)))
-  bindirs)))
+  (unless (null? bindirs)
+(let* ((guile (search-input-file inputs "bin/guile"))
+   (native-input-dirs (match native-inputs
+(((_ . dir) ...)
+ dir)))
+   (input-dirs (match inputs
+ (((_ . dir) ...)
+  dir)))
+   (build-inputs (lset-difference string=? native-input-dirs
+  input-dirs))
+   ;; A build input is an input listed in native-inputs and NOT in
+   ;; inputs.
+   (build-input? (lambda (x)
+   (any (cut string-prefix? <> x) build-inputs)))
+   (var `("GUIX_PYTHONPATH" prefix
+  ,(remove build-input? (search-path-as-string->list
+ (or (getenv "GUIX_PYTHONPATH") 
""))
+  (for-each (lambda (dir)
+  (let ((files (list-of-files dir)))
+(for-each (cut wrap-script <> #:guile guile var)
+  files)))
+bindirs
 
 (define* (rename-pth-file #:key name native-inputs outputs #:allow-other-keys
   #:rest args)
-- 
2.39.1






bug#25235: [PATCH v2 0/1] build-system/pyproject: Do not wrap native-inputs.

2023-01-18 Thread Maxim Cournoyer
This fixes a longstanding issue.  The fix is made trivial by the changes made
in #60847 adding cross-compilation support for the pyproject build system.
Additionally, it's based on #60868, which touches the wrap phase to use
wrap-script instead of wrap-program.

Changes in v2:
- Add missing copyright line
- Rework wrap phase to avoid removing inputs found in both native-inputs and
inputs
- Enclose wrap computations in an 'unless' form and streamline

Maxim Cournoyer (1):
  build-system/pyproject: Do not wrap native-inputs.

 guix/build/pyproject-build-system.scm | 39 ---
 1 file changed, 24 insertions(+), 15 deletions(-)


base-commit: 9da36aa1e207ff8a8fb2af8bc9442f9c935dc8db
-- 
2.39.1






bug#25235: [PATCH 1/1] build-system/pyproject: Do not wrap native-inputs.

2023-01-18 Thread Maxim Cournoyer
Hi Efraim,

Efraim Flashner  writes:

> I'm still on my first cup of coffee...
>
> If a python input is in inputs and in native-inputs would it be included
> in the wrapper or not? At first glance I'd say no. Does the search path
> do deduplication? If it doesn't then it'd work to only remove the first
> instance matching from native-input-dirs.

It wouldn't be included with the current simple logic, which simply
remove any native input from the items of GUIX_PYTHONPATH.  Good catch!
I'll send a v2 with the refined check.

-- 
Thanks,
Maxim





bug#25235: [PATCH 1/1] build-system/pyproject: Do not wrap native-inputs.

2023-01-18 Thread Efraim Flashner
I'm still on my first cup of coffee...

If a python input is in inputs and in native-inputs would it be included
in the wrapper or not? At first glance I'd say no. Does the search path
do deduplication? If it doesn't then it'd work to only remove the first
instance matching from native-input-dirs.

On Mon, Jan 16, 2023 at 04:29:19PM -0500, Maxim Cournoyer wrote:
> Fixes .
> 
> * guix/build/pyproject-build-system.scm (wrap) [native-inputs]: New argument.
> Filter out native inputs from the values in GUIX_PYTHONPATH.
> 
> ---
> 
>  guix/build/pyproject-build-system.scm | 16 
>  1 file changed, 12 insertions(+), 4 deletions(-)
> 
> diff --git a/guix/build/pyproject-build-system.scm 
> b/guix/build/pyproject-build-system.scm
> index a66c1fb34a..cd418f7ec9 100644
> --- a/guix/build/pyproject-build-system.scm
> +++ b/guix/build/pyproject-build-system.scm
> @@ -445,7 +445,7 @@ (define* (add-install-to-pythonpath #:key native-inputs 
> outputs
>"A phase that just wraps the 'add-installed-pythonpath' procedure."
>(add-installed-pythonpath native-inputs outputs))
>  
> -(define* (wrap #:key inputs outputs #:allow-other-keys)
> +(define* (wrap #:key native-inputs inputs outputs #:allow-other-keys)
>(define (list-of-files dir)
>  (find-files dir (lambda (file stat)
>(and (eq? 'regular (stat:type stat))
> @@ -464,9 +464,17 @@ (define bindirs
>(define %guile (delay (search-input-file inputs "bin/guile")))
>(define (guile) (force %guile))
>  
> -  (let* ((var `("GUIX_PYTHONPATH" prefix
> -,(search-path-as-string->list
> -  (or (getenv "GUIX_PYTHONPATH") "")
> +  ;; Use the same strategy to compute the native-input file names.
> +  (define %native-input-dirs (delay (match native-inputs
> +  (((_ . dir) ...)
> +   dir
> +  (define (native-input-dirs) (force %native-input-dirs))
> +
> +  (let ((var `("GUIX_PYTHONPATH" prefix
> +   ,(remove (lambda (x)
> +  (any (cut string-prefix? <> x) 
> (native-input-dirs)))
> +(search-path-as-string->list
> + (or (getenv "GUIX_PYTHONPATH") ""))
>  (for-each (lambda (dir)
>  (let ((files (list-of-files dir)))
>(for-each (cut wrap-script <> #:guile (guile) var)
> -- 
> 2.38.1
> 
> 
> 
> 

-- 
Efraim Flashner  אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted


signature.asc
Description: PGP signature


bug#60927: gPodder database version field different when built using --with-latest

2023-01-18 Thread Csepp
Haven't completely debugged this, but the symptoms are:
* running the packaged version doesn't work, blank scree, failed assert
on console about differing database schema version
* running the --with-latest version works, but Guix says it's already on
the latest version

I think it might be storing an incorrect version at build time, maybe
using its path as the version.