help-guix
[Top][All Lists]
Advanced

[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 <help-guix@gnu.org> 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
“/tmp/guix-build-rsnapshot-1.4.4.drv-1”.

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
#!/gnu/store/8zvc5mvk0xm3ygrxsgpyy5ilxb5rzjry-perl-5.30.2/bin/perl

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

# Ensure passing behavior
ok(2 == rsnapshot("-c 
/tmp/guix-build-rsnapshot-1.4.4.drv-0/rsnapshot-1.4.4//t//backup_exec/conf/backup_exec.conf
 hourly"));
# Ensure failing behavior
ok(1 == rsnapshot("-c 
/tmp/guix-build-rsnapshot-1.4.4.drv-0/rsnapshot-1.4.4//t//backup_exec/conf/backup_exec_fail.conf
 hourly"));
--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 
/tmp/guix-build-rsnapshot-1.4.4.drv-0/rsnapshot-1.4.4//t//backup_exec/conf/backup_exec.conf
 hourly
drwxr-xr-x   1 root root   16 06-05 15:11 /usr
hello world!
hello world!
Can't exec 
"/gnu/store/57xj5gcy1jbl9ai2lnrqnpr0dald9i65-coreutils-8.32/gnu/store/57xj5gcy1jbl9ai2lnrqnpr0dald9i65-coreutils-8.32/bin/true":
 No such file or directory at ./rsnapshot line 4427.
----------------------------------------------------------------------------
rsnapshot encountered an error! The program was invoked with these options:
./rsnapshot -c \
    
/tmp/guix-build-rsnapshot-1.4.4.drv-0/rsnapshot-1.4.4//t//backup_exec/conf/backup_exec.conf
 \
    hourly
----------------------------------------------------------------------------
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:
« 
/gnu/store/57xj5gcy1jbl9ai2lnrqnpr0dald9i65-coreutils-8.32/gnu/store/57xj5gcy1jbl9ai2lnrqnpr0dald9i65-coreutils-8.32/bin/true
 ».
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 
defaults.")
        (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/ssh_args.t.in")
-
              (invoke "make" "test"))))))
     (inputs
      `(("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 <help-guix@gnu.org> 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.

¹ http://ci.guix.gnu.org/search?query=rsnapshot
² http://ci.guix.gnu.org/build/619949/details
³ http://ci.guix.gnu.org/build/44883/detailshttp://ci.guix.gnu.org/eval/50819https://git.savannah.gnu.org/cgit/guix.git/log/?id=d027858e70c4a37aca90b1d4ecb2f0421a95d987https://git.savannah.gnu.org/cgit/guix.git/commit/?id=df68e5c65ae015639566baf5cce1faf96a2d0ed4http://ci.guix.gnu.org/build/619949/log/rawhttps://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/backup.scm#n527https://github.com/rsnapshot/rsnapshot/blob/master/ChangeLog#L15

Cheers,
- Brice




reply via email to

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