bug#67572: tests fail for python-sphinx-prompt

2023-12-01 Thread Lars-Dominik Braun
Hi,

> All 12 of the tests for python-sphinx-prompt fail:
> 
>   https://ci.guix.gnu.org/build/2678884/log/raw

fixed by commit 877086a8649a86f1556bddd430e9478b2562f365.

Cheers,
Lars






bug#53547: Error sending email with OpenSMTPD, fatal: time_to_text: bsnprintf

2023-12-01 Thread Timmy Douglas via Bug reports for GNU Guix
Tobias Geerinckx-Rice  writes:

> [snip]
> I'm running opensmtpd@7.4.0p1.  Have you tried that yet?
>
> Guix would certainly accept a patch to fix a bug, but I'm also 
> paranoid and would prefer to first see some response from upstream 
> that this is the correct diagnosis.


So I found a workaround on my computer with that script that didn't seem
to repro. If I set TZ=UTC instead of what I had
(TZ=America/Los_Angeles), I was able to make that script work. I should
be able to propagate that to mcron and work around the issue...


What I tried before that:

When I straced sendmail earlier I saw this:

[pid 29134] newfstatat(5, "", {st_mode=S_IFSOCK|0777, st_size=0, ...}, 
AT_EMPTY_PATH) = 0
[pid 29134] read(5, "220 localhost ESMTP OpenSMTPD\r\n", 4096) = 31
[pid 29134] write(5, "EHLO localhost\r\n", 16) = 16
[pid 29134] read(5, "250-localhost Hello localhost [l"..., 4096) = 128
[pid 29134] write(5, "MAIL FROM:  \r\n", 31) = 31
[pid 29134] read(5, "250 2.0.0 Ok\r\n", 4096) = 14
[pid 29134] write(5, "RCPT TO: \r\n", 27) = 27
[pid 29134] read(5, "250 2.1.5 Destination address va"..., 4096) = 51
[pid 29134] write(5, "DATA\r\n", 6) = 6
[pid 29134] read(5, "354 Enter mail, end with \".\" on "..., 4096) = 50
[pid 29134] write(2, "sendmail: time_to_text: bsnprint"..., 34sendmail: 
time_to_text: bsnprintf
) = 34
[pid 29134] write(5, "From: timmy \r\n", 31) = 31
[pid 29134] exit_group(1)   = ?

It looks like the code of the sendmail client will try to add a Date
header if one wasn't passed to the client. (smtp_session.c:2647)

I was able to send an email directly with telnet, so that verified the
code wasn't on the server. I tried throwing together a standalone repro
(below), but didn't have any luck reproducing it. With opensmtpd's
sendmail being setgid, I didn't really feel like debugging further.

// compile with
// gcc ./a.c
// run with
// ./a.out
#include 
#include 
#include 
#include 

int
bsnprintf(char *str, size_t size, const char *format, ...)
{
int ret;
va_list ap;

va_start(ap, format);
ret = vsnprintf(str, size, format, ap);
va_end(ap);
if (ret < 0 || (size_t)ret >= size)
return 0;

return 1;
}


const char *
time_to_text(time_t when)
{
struct tm *lt;
static char buf[40];
const char *day[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
const char *month[] = {"Jan","Feb","Mar","Apr","May","Jun",
 "Jul","Aug","Sep","Oct","Nov","Dec"};
const char *tz;
long offset;

lt = localtime();
if (lt == NULL || when == 0)
perror("time_to_text: localtime");

#if 1
offset = lt->tm_gmtoff;
tz = lt->tm_zone;
#elif 0
offset = lt->tm_isdst > 0 ? altzone : timezone;
tz = lt->tm_isdst > 0 ? tzname[1] : tzname[0];
#endif

/* We do not use strftime because it is subject to locale substitution*/
if (!bsnprintf(buf, sizeof(buf),
"%s, %d %s %d %02d:%02d:%02d %c%02d%02d (%s)",
day[lt->tm_wday], lt->tm_mday, month[lt->tm_mon],
lt->tm_year + 1900,
lt->tm_hour, lt->tm_min, lt->tm_sec,
offset >= 0 ? '+' : '-',
abs((int)offset / 3600),
abs((int)offset % 3600) / 60,
tz))
perror("time_to_text: bsnprintf");
else
  {
printf("'%s'", buf);
  }
return buf;
}

int main(int argc, char** argv){
time_t now=time(NULL);
time_to_text(now);
struct tm *lt=localtime();
}





bug#67575: guix-daemon assertion failure upon substitution failure

2023-12-01 Thread Ludovic Courtès
On a build machine running ‘cuirass remote-server’ with
/gnu/store/5g4c9kii8l50lw23s7yb2a4bvc7qzw5d-guix-1.4.0-10.4dfdd82/bin/guix-daemon
(from Guix commit 2ab5e449246f98b049888dde3c310f5b4a0a64a2), I see these
‘cuirass remote-worker’ errors:

--8<---cut here---start->8---
2023-11-27 06:49:54 CwQfwEE3: building derivation 
`/gnu/store/rivlxrqr10g3kj9knyz7i41aq1vzxn9z-r-ecoregime-0.1.3.drv' (system: 
x86_64-linux)
2023-11-27 06:50:11 error: CwQfwEE3: unexpected error while building 
'/gnu/store/rivlxrqr10g3kj9knyz7i41aq1vzxn9z-r-ecoregime-0.1.3.drv': 
#< file: #f port: #>
[…]
2023-11-27 07:00:58 CwQfwEE3: building derivation 
`/gnu/store/b5qrpwpx5sbmlj5f7nx6wknnkczadjcn-r-cpp-0.1.0.drv' (system: 
x86_64-linux)
2023-11-27 07:01:20 error: CwQfwEE3: unexpected error while building 
'/gnu/store/b5qrpwpx5sbmlj5f7nx6wknnkczadjcn-r-cpp-0.1.0.drv': #< 
file: #f port: #>
--8<---cut here---end--->8---

… corresponding to these guix-daemon messages:

--8<---cut here---start->8---
2023-11-27 06:49:54 accepted connection from pid 14007, user root
2023-11-27 06:50:11 guix-daemon: nix/libstore/build.cc:3322: void 
nix::Worker::childTerminated(pid_t, bool): Assertion `i != children.end()' 
failed.
[…]
2023-11-27 07:00:58 accepted connection from pid 14007, user root
2023-11-27 07:01:20 guix-daemon: nix/libstore/build.cc:3322: void 
nix::Worker::childTerminated(pid_t, bool): Assertion `i != children.end()' 
failed.
--8<---cut here---end--->8---

The corresponding build log (sent by ‘cuirass remote-worker’ to the
server):

--8<---cut here---start->8---
$ zcat /var/cache/cuirass/remote/rivlxrqr10g3kj9knyz7i41aq1vzxn9z.log.gz |tail
@ substituter-started 
/gnu/store/gymm7n27rfhyz83zx3lw0bwg4m6alpzw-ecoregime_0.1.3.tar.gz substitute
guix substitute: warning: while fetching 
https://ci.guix.gnu.org/nar/gymm7n27rfhyz83zx3lw0bwg4m6alpzw-ecoregime_0.1.3.tar.gz:
 server is somewhat slow
guix substitute: warning: try `--no-substitutes' if the problem persists
retrying download of 
'/gnu/store/gymm7n27rfhyz83zx3lw0bwg4m6alpzw-ecoregime_0.1.3.tar.gz' with other 
substitute URLs...
guix substitute: warning: while fetching 
https://ci.guix.gnu.org/nar/gymm7n27rfhyz83zx3lw0bwg4m6alpzw-ecoregime_0.1.3.tar.gz:
 server is somewhat slow
guix substitute: warning: try `--no-substitutes' if the problem persists
guix substitute: error: failed to find alternative substitute for 
'/gnu/store/gymm7n27rfhyz83zx3lw0bwg4m6alpzw-ecoregime_0.1.3.tar.gz'
fetching path 
`/gnu/store/gymm7n27rfhyz83zx3lw0bwg4m6alpzw-ecoregime_0.1.3.tar.gz' (empty 
status: '')
@ substituter-failed 
/gnu/store/gymm7n27rfhyz83zx3lw0bwg4m6alpzw-ecoregime_0.1.3.tar.gz  fetching 
path `/gnu/store/gymm7n27rfhyz83zx3lw0bwg4m6alpzw-ecoregime_0.1.3.tar.gz' 
(empty status: '')
fetching path `/gnu/store/yiqzanx7vb8s0sj9h15p2llxwrkv0xzh-r-descriptio-1.2'...

$ zcat /var/cache/cuirass/remote/b5qrpwpx5sbmlj5f7nx6wknnkczadjcn.log.gz |tail
substitute: updating substitutes from 'http://194.199.1.1:5557'... 100.0%
guix substitute: warning: while fetching 
https://ci.guix.gnu.org/nar/iqi6s452hqy3k3n335c5v9nb6wq8h9nn-CPP_0.1.0.tar.gz: 
server is somewhat slow
guix substitute: warning: try `--no-substitutes' if the problem persists
retrying download of 
'/gnu/store/iqi6s452hqy3k3n335c5v9nb6wq8h9nn-CPP_0.1.0.tar.gz' with other 
substitute URLs...
guix substitute: warning: while fetching 
https://ci.guix.gnu.org/nar/iqi6s452hqy3k3n335c5v9nb6wq8h9nn-CPP_0.1.0.tar.gz: 
server is somewhat slow
guix substitute: warning: try `--no-substitutes' if the problem persists
guix substitute: error: failed to find alternative substitute for 
'/gnu/store/iqi6s452hqy3k3n335c5v9nb6wq8h9nn-CPP_0.1.0.tar.gz'
fetching path `/gnu/store/iqi6s452hqy3k3n335c5v9nb6wq8h9nn-CPP_0.1.0.tar.gz' 
(empty status: '')
@ substituter-failed 
/gnu/store/iqi6s452hqy3k3n335c5v9nb6wq8h9nn-CPP_0.1.0.tar.gz  fetching path 
`/gnu/store/iqi6s452hqy3k3n335c5v9nb6wq8h9nn-CPP_0.1.0.tar.gz' (empty status: 
'')
fetching path `/gnu/store/b7rnd5y4zsc1995h0a8w294pzdgbmhr9-mc2d_0.2.0.tar.gz'...
--8<---cut here---end--->8---

In both cases, “failed to find alternative substitute” leads ‘guix
substitute’ to exit, which guix-daemon doesn’t really cope with.

Ludo’.





bug#67565: (No Subject)

2023-12-01 Thread Attila Lendvai
hrm, i tried to reproduce it just now on the same machine, and i couldn't.

not sure it's relevant, but my router is overloaded, and sometimes DNS 
resolution, and other things break. looking at the test it shouldn't matter as 
it deals with the loopback device.

-- 
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
“If one rejects laissez faire on account of man's fallibility and moral 
weakness, one must for the same reason also reject every kind of government 
action.”
— Ludwig von Mises (1881–1973), 'Planning for Freedom' (1952)






bug#67572: tests fail for python-sphinx-prompt

2023-12-01 Thread Vagrant Cascadian
On 2023-12-01, Vagrant Cascadian wrote:
> All 12 of the tests for python-sphinx-prompt fail:
>
>   https://ci.guix.gnu.org/build/2678884/log/raw
>
> I tried updating python-sphinx-prompt to the newer 1.8.x version, which
> switched to pyproject and poetry, but may require a newer version of
> poetry. Someone else with more experience packaging python might want to
> give it a try...

I also tried updating to the 1.7.0 version, and that managed to get
*some* of the tests to pass. I could not get 1.8.0 to build at all;
maybe needs new python-poetry-core version?

diff --git a/gnu/packages/sphinx.scm b/gnu/packages/sphinx.scm
index eee1f1c4a8..2a8f35d387 100644
--- a/gnu/packages/sphinx.scm
+++ b/gnu/packages/sphinx.scm
@@ -625,7 +625,7 @@ (define-public python-sphinx-repoze-autointerface
 (define-public python-sphinx-prompt
   (package
 (name "python-sphinx-prompt")
-(version "1.5.0")
+(version "1.7.0")
 (source
  (origin
(method git-fetch)   ; no source release in PyPI
@@ -634,8 +634,8 @@ (define-public python-sphinx-prompt
  (commit version)))
(file-name (git-file-name name version))
(sha256
-(base32 "0x9wmgf04rzivbzp7jv1b7fkhkpi02lpk5w1qf4i7bcgih00ym8a"
-(build-system python-build-system)
+(base32 "0hq2apa5dgznbqnnlvykhwq74jcnjfl7gzmkncj8q1mwqm558z7x"
+(build-system pyproject-build-system)
 (arguments
  `(#:phases
(modify-phases %standard-phases
@@ -645,7 +645,7 @@ (define-public python-sphinx-prompt
(add-installed-pythonpath inputs outputs)
(invoke "python" "-m" "pytest")))
 (native-inputs
- (list python-pytest python-sphinx))
+ (list python-pytest python-sphinx python-poetry-core))
 (home-page "https://github.com/sbrunner/sphinx-prompt;)
 (synopsis "Sphinx directive to add unselectable prompt")
 (description

live well,
  vagrant


signature.asc
Description: PGP signature


bug#67572: tests fail for python-sphinx-prompt

2023-12-01 Thread Vagrant Cascadian
X-Debbugs-Cc: Lars-Dominik Braun , jg...@dismail.de, Marius Bakke 
, Munyoki Kilyungi 

All 12 of the tests for python-sphinx-prompt fail:

  https://ci.guix.gnu.org/build/2678884/log/raw

I tried updating python-sphinx-prompt to the newer 1.8.x version, which
switched to pyproject and poetry, but may require a newer version of
poetry. Someone else with more experience packaging python might want to
give it a try...

live well,
  vagrant


signature.asc
Description: PGP signature


bug#67461: build of /gnu/store/xnwy976yzkvxh2virzf2yrhr28c04075-python-matplotlib-3.5.2.drv failed

2023-12-01 Thread Simon Tournier
Hi,

Thanks for the report.

On Sun, 26 Nov 2023 at 20:29, francismb via Bug reports for GNU Guix 
 wrote:

> Generation 64 Nov 26 2023 15:12:35(current)
>guix 176440c

[...]

> build of
> /gnu/store/xnwy976yzkvxh2virzf2yrhr28c04075-python-matplotlib-3.5.2.drv
> failed

The substitutes is available on ci.guix.gnu.org.

--8<---cut here---start->8---
$ guix time-machine --commit=176440c056fdde6da98b11720989b1ed060ec97c \
   -- weather python-matplotlib
computing 1 package derivations for x86_64-linux...
looking for 1 store items on https://ci.guix.gnu.org...
https://ci.guix.gnu.org ☀
  100.0% substitutes available (1 out of 1)
  at least 48.7 MiB of nars (compressed)
  59.1 MiB on disk (uncompressed)
  0.181 seconds per request (0.2 seconds in total)
  5.5 requests per second

  at least 1,000 queued builds
  aarch64-linux: 992 (99.2%)
  powerpc64le-linux: 5 (.5%)
  x86_64-linux: 3 (.3%)
  build rate: 13.47 builds per hour
  x86_64-linux: 9.34 builds per hour
  i686-linux: 2.11 builds per hour
  powerpc64le-linux: 2.06 builds per hour
  aarch64-linux: 0.49 builds per hour
looking for 1 store items on https://bordeaux.guix.gnu.org...
https://bordeaux.guix.gnu.org ⛈
  0.0% substitutes available (0 out of 1)
  unknown substitute sizes
  0.0 MiB on disk (uncompressed)
  0.112 seconds per request (0.1 seconds in total)
  8.9 requests per second
  'https://bordeaux.guix.gnu.org/api/queue?nr=1000' returned 504 ("Gateway 
Time-out")
--8<---cut here---end--->8---

And I cannot reproduce on my machine.  One example of such try:

--8<---cut here---start->8---
$ guix time-machine --commit=176440c056fdde6da98b11720989b1ed060ec97c \
   -- build python-matplotlib --no-grafts -d
/gnu/store/xnwy976yzkvxh2virzf2yrhr28c04075-python-matplotlib-3.5.2.drv

$ guix build 
/gnu/store/xnwy976yzkvxh2virzf2yrhr28c04075-python-matplotlib-3.5.2.drv
/gnu/store/1jv6qvrxwmh8mf6ykgs5aqrqn859b841-python-matplotlib-3.5.2
--8<---cut here---end--->8---

And, if --check is applied, I get:

guix build: error: derivation 
`/gnu/store/xnwy976yzkvxh2virzf2yrhr28c04075-python-matplotlib-3.5.2.drv'
may not be deterministic: output 
`/gnu/store/1jv6qvrxwmh8mf6ykgs5aqrqn859b841-python-matplotlib-3.5.2' differs

which means it builds fine on my machine.

Well, I do not know where the issue could come from.

Cheers,
simon





bug#67566: Package cube fails to build

2023-12-01 Thread Philippe SWARTVAGHER

Hello,

On an up-to-date Guix version, the package cube fails to build:

guix build cube

[...]

checking Qt specification... linux-g++
checking for Qt's version...
configure: error: Cannot detect Qt's version.
configure: error: ./configure failed for build-backend

This impacts the package scorep-openmpi, which depends on cube.

And while solving this bug, cube could be updated to version 4.8.2

Thanks!

--
Philippe SWARTVAGHER
Assistant Professor @ ENSEIRB-MATMECA
Research team Topal @ Inria Bordeaux-Sud Ouest






bug#67565: shepherd: FAIL: tests/close-on-exec.sh

2023-12-01 Thread Attila Lendvai
make check TESTS="tests/close-on-exec.sh"

fails for me in shepherd.

it's the same with master, with v0.10.2, and with v0.10.1.

i didn't check other revisions.

the log file is attached.

HTH,

-- 
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
You cannot enslave a mind that knows itself, that values itself, that 
understands itself.
+ shepherd --version
shepherd (GNU Shepherd) 0.10.2
Copyright (C) 2023 the Shepherd authors
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
+ herd --version
herd (GNU Shepherd) 0.10.2
Copyright (C) 2023 the Shepherd authors
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
+ socket=t-socket-12913
+ conf=t-conf-12913
+ log=t-log-12913
+ pid=t-pid-12913
+ c_file=t-count-file-descriptors-12913.c
+ exe=/home/alendvai/workspace/guix/shepherd/t-count-file-descriptors-12913
+ fd_count=/home/alendvai/workspace/guix/shepherd/t-fd-count-12913
+ herd='herd -s t-socket-12913'
+ trap 'cat t-log-12913 || true; rm -f t-socket-12913 t-conf-12913 t-log-12913 /home/alendvai/workspace/guix/shepherd/t-fd-count-12913 t-count-file-descriptors-12913.c /home/alendvai/workspace/guix/shepherd/t-count-file-descriptors-12913;
  test -f t-pid-12913 && kill `cat t-pid-12913` || true; rm -f t-pid-12913' EXIT
+ '[' -d /proc/self/fd ']'
+ cat
+ gcc -Wall t-count-file-descriptors-12913.c -o /home/alendvai/workspace/guix/shepherd/t-count-file-descriptors-12913
+ /home/alendvai/workspace/guix/shepherd/t-count-file-descriptors-12913
0 -> /dev/pts/1
1 -> /home/alendvai/workspace/guix/shepherd/tests/close-on-exec.log
2 -> /home/alendvai/workspace/guix/shepherd/tests/close-on-exec.log
3 -> /proc/12945/fd
+ cat
++ type -P sleep
+ rm -f t-pid-12913 /home/alendvai/workspace/guix/shepherd/t-fd-count-12913
+ test -f t-pid-12913
+ sleep 0.3
+ shepherd -I -s t-socket-12913 -c t-conf-12913 -l t-log-12913 --pid=t-pid-12913
Starting service root...
Service root started.
Service root running with value #t.
Service root has been started.
Configuration successfully loaded from 't-conf-12913'.
+ test -f t-pid-12913
++ cat t-pid-12913
+ shepherd_pid=12949
+ kill -0 12949
+ herd -s t-socket-12913 start inetd-ctor
Starting service inetd-ctor...
Service inetd-ctor started.
Service inetd-ctor running with value (#).
Service inetd-ctor has been started.
+ ls -l /proc/12949/fd
total 0
lr-x-- 1 alendvai users 64 Nov 17 21:46 0 -> /dev/null
l-wx-- 1 alendvai users 64 Nov 17 21:46 1 -> /home/alendvai/workspace/guix/shepherd/tests/close-on-exec.log
lrwx-- 1 alendvai users 64 Nov 17 21:46 10 -> anon_inode:[signalfd]
l-wx-- 1 alendvai users 64 Nov 17 21:46 11 -> pipe:[16921055]
lr-x-- 1 alendvai users 64 Nov 17 21:46 12 -> pipe:[16920173]
l-wx-- 1 alendvai users 64 Nov 17 21:46 13 -> pipe:[16920173]
lrwx-- 1 alendvai users 64 Nov 17 21:46 14 -> anon_inode:[eventpoll]
lrwx-- 1 alendvai users 64 Nov 17 21:46 15 -> socket:[16920174]
lrwx-- 1 alendvai users 64 Nov 17 21:46 17 -> socket:[16920178]
l-wx-- 1 alendvai users 64 Nov 17 21:46 2 -> /home/alendvai/workspace/guix/shepherd/tests/close-on-exec.log
lr-x-- 1 alendvai users 64 Nov 17 21:46 3 -> pipe:[16918174]
l-wx-- 1 alendvai users 64 Nov 17 21:46 4 -> pipe:[16918174]
lr-x-- 1 alendvai users 64 Nov 17 21:46 5 -> /home/alendvai/workspace/guix/shepherd/shepherd
l-wx-- 1 alendvai users 64 Nov 17 21:46 6 -> /home/alendvai/workspace/guix/shepherd/t-log-12913
lr-x-- 1 alendvai users 64 Nov 17 21:46 7 -> pipe:[16920172]
l-wx-- 1 alendvai users 64 Nov 17 21:46 8 -> pipe:[16920172]
lr-x-- 1 alendvai users 64 Nov 17 21:46 9 -> pipe:[16921055]
+ herd -s t-socket-12913 start system-ctor
Starting service system-ctor...
Service system-ctor has been started.
+ herd -s t-socket-12913 status system-ctor
Status of system-ctor:
  It is stopped (one-shot).
  It is enabled.
  Provides (system-ctor).
  Requires ().
  Will not be respawned.
+ test -f /home/alendvai/workspace/guix/shepherd/t-fd-count-12913
++ cat /home/alendvai/workspace/guix/shepherd/t-fd-count-12913
+ test 4 -eq 4
+ herd -s t-socket-12913 start forkexec-ctor
Starting service forkexec-ctor...
Service forkexec-ctor started.
Service forkexec-ctor running with value 13000.
Service forkexec-ctor has been started.
+ herd -s t-socket-12913 status forkexec-ctor
Status of forkexec-ctor:
  It is running since 21:46:15 (0 seconds ago).
  Running value is 13000.
  It is enabled.
  Provides (forkexec-ctor).
  Requires ().
  Will not be respawned.
++ herd -s t-socket-12913 status forkexec-ctor
++ grep 'Running value'
++ sed '-es/^.* \([0-9]\+\)\.$/\1/g'
+ pid=13000
+ kill -0 13000
+ ls -l /proc/13000/fd
total 0
lr-x-- 1 alendvai users 64 Nov 17 21:46 0 -> /dev/null
l-wx-- 1