[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'guix reconfigure' fail to build 'rsnapshot'

From: brice
Subject: Re: 'guix reconfigure' fail to build 'rsnapshot'
Date: Sat, 17 Jul 2021 19:49:27 +0200
User-agent: SOGoMail 5.1.1

Hello Simon,

On 17 July, 2021 18:07 CEST, Simon Josefsson via <> wrote:

> How can I fix this?  Is this something unique on my machine, or does it
> indicate a bug in the packaging of 'rsnapshot'?  I'm not sure how to
> proceed with debugging.

Let's see, Cuirass says this packaged failed to build since the 20th of
June¹ on the branch master for all the systems. So it's not just you
that aren't able to build it.

The build for x86_64_linux², is for the version 1.4.4 of rsnapshot and we
also see that the previous successfully build (and the only one) date from
March 11 for version 1.4.3 and dependencies haven't changed between those
tow build. So an update of the package from 1.4.3 to 1.4.4 probably caused that.

If we want to find that specific commit, this build is part of the
evaluation #50819⁴for the commit d027858e70c4a37aca90b1d4ecb2f0421a95d987⁵.
The great-father of that commit is the one updating rsnapshot “gnu:
rsnapshot: Update to 1.4.4.”⁶. Now that we know what broke the package,
just a plain update, we can start trying to fix the failing build.

First we go back to our failing build² and have a look in its log⁷. At the
end of it there is 2 failing tests t/backup_exec/backup_exec.t and
t/cmd-post_pre-exec/cmd-post_pre-exec.t. That's what we need to repair or
disable. Now we need to build it locally and inspect it more in depth, we
do that with “guix build rsnapshot --keep-failed --no-offload” and
obviously it fail as expected and guix guide us to the build directory

To find out why thoses 2 tests ae failing we are gonna run them manually.
We change directory to
“/tmp/guix-build-rsnapshot-1.4.4.drv-0/rsnapshot-1.4.4” the failed build
and find the build “rsnapshot“ program in it but it's not executable, so we
make it so “chmod +x rsnapshot”. Then we inspect the build tests

--8<---------------cut here---------------start------------->8---
$ cat t/backup_exec/backup_exec.t

use strict;
use Test::More tests => 2;
use SysWrap;

# Ensure passing behavior
ok(2 == rsnapshot("-c 
# Ensure failing behavior
ok(1 == rsnapshot("-c 
--8<---------------cut here---------------end--------------->8---

Seems that it just call rsnapshot with some argument, let's do it manually:

--8<---------------cut here---------------start------------->8---
$ ./rsnapshot -c 
drwxr-xr-x   1 root root   16 06-05 15:11 /usr
hello world!
hello world!
Can't exec 
 No such file or directory at ./rsnapshot line 4427.
rsnapshot encountered an error! The program was invoked with these options:
./rsnapshot -c \
ERROR: get_retval() was passed -1, a number is required
--8<---------------cut here---------------end--------------->8---

It is the path to "true" which is wrong, it contains “/gun/store” twice:
The configure script did not build that path properly by itself, maybe we can
specify it directly. If we have a look to the rsnapshot definition⁸ we see the
"check" phase modifying the path for those program; while the changelog
for 1.4.4⁹ say the added option for setting their paths « - Minor tidy up rel
configure options --with-test-(true|false). Refs #189 (#248) ».

Maybe removing our substitution will fix our build issue:
--8<---------------cut here---------------start------------->8---
@@ -526,15 +526,6 @@ rdiff-backup is easy to use and settings have sensible 
        (modify-phases %standard-phases
          (replace 'check
            (lambda _
-             (substitute* '("t/cmd-post_pre-exec/conf/pre-true-post-true.conf"
-                            "t/backup_exec/conf/backup_exec_fail.conf"
-                            "t/backup_exec/conf/backup_exec.conf")
-               (("/bin/true") (which "true"))
-               (("/bin/false") (which "false")))
-             ;; Disable a test that tries to connect to localhost on port 22.
-             (delete-file "t/ssh_args/")
              (invoke "make" "test"))))))
      `(("perl" ,perl)
--8<---------------cut here---------------end--------------->8---

Oh! It worked, nice! I'll push it later.

On 17 July, 2021 18:07 CEST, Simon Josefsson via <> wrote:

> How come others haven't noticed this, aren't all packages built
> centrally to make sure things build?

Guix's QA is a work in progress. I hope this long explanation can help you do
the same for the inevitable new failing build you will encounter.


- Brice

reply via email to

[Prev in Thread] Current Thread [Next in Thread]