unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: brice@waegenei.re
To: "Simon Josefsson" <simon@josefsson.org>
Cc: help-guix@gnu.org
Subject: Re: 'guix reconfigure' fail to build 'rsnapshot'
Date: Sat, 17 Jul 2021 19:49:27 +0200	[thread overview]
Message-ID: <3987-60f31800-ed-3bd98f40@168269356> (raw)
In-Reply-To: <87pmvglyag.fsf@latte.josefsson.org>

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	other threads:[~2021-07-17 17:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-17 16:07 'guix reconfigure' fail to build 'rsnapshot' Simon Josefsson via
2021-07-17 17:49 ` brice [this message]
2021-07-17 18:00   ` Tobias Geerinckx-Rice
2021-07-17 19:04   ` Simon Josefsson via
2021-07-17 17:55 ` Tobias Geerinckx-Rice

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3987-60f31800-ed-3bd98f40@168269356 \
    --to=brice@waegenei.re \
    --cc=help-guix@gnu.org \
    --cc=simon@josefsson.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).