unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* 'guix reconfigure' fail to build 'rsnapshot'
@ 2021-07-17 16:07 Simon Josefsson via
  2021-07-17 17:49 ` brice
  2021-07-17 17:55 ` Tobias Geerinckx-Rice
  0 siblings, 2 replies; 5+ messages in thread
From: Simon Josefsson via @ 2021-07-17 16:07 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 1796 bytes --]

Hi!  Since some time, 'guix reconfigure' on my machine fails:

building /gnu/store/chilbs792mqssmi726zmvff5zg49gija-provenance.drv...
building /gnu/store/9skvgwsl0vxccv5sbgvqimkhk3938v8y-rsnapshot-1.4.4.drv...
\ 'check' phasebuilder for `/gnu/store/9skvgwsl0vxccv5sbgvqimkhk3938v8y-rsnapshot-1.4.4.drv' failed with exit code 1
build of /gnu/store/9skvgwsl0vxccv5sbgvqimkhk3938v8y-rsnapshot-1.4.4.drv failed
View build log at '/var/log/guix/drvs/9s/kvgwsl0vxccv5sbgvqimkhk3938v8y-rsnapshot-1.4.4.drv.bz2'.
cannot build derivation `/gnu/store/a9kw0xkbx6wy0w893b4kzzrxh3a5lnx6-profile.drv': 1 dependencies couldn't be built
building /gnu/store/89hsi8xglfybbvrjrqf0zhkg546ahjyd-shepherd-console-font-tty1.scm.drv...
cannot build derivation `/gnu/store/mx5zqmx388ixzr55rzak59wfygpyn6fm-system.drv': 1 dependencies couldn't be built
guix system: error: build of `/gnu/store/mx5zqmx388ixzr55rzak59wfygpyn6fm-system.drv' failed
root@hamster ~# bzcat /var/log/guix/drvs/9s/kvgwsl0vxccv5sbgvqimkhk3938v8y-rsnapshot-1.4.4.drv.bz2|tail 
  Failed test:  1
  Non-zero exit status: 1
t/cmd-post_pre-exec/cmd-post_pre-exec.t                                    (Wstat: 256 Tests: 4 Failed: 1)
  Failed test:  4
  Non-zero exit status: 1
Files=12, Tests=38,  3 wallclock secs ( 0.04 usr  0.01 sys +  1.51 cusr  0.23 csys =  1.79 CPU)
Result: FAIL
Failed 2/12 test programs. 2/38 subtests failed.
make: *** [Makefile:938: test] Error 255
command "make" "test" failed with status 2
root@hamster ~# 

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.

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

Thanks,
/Simon

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 255 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 'guix reconfigure' fail to build 'rsnapshot'
  2021-07-17 16:07 'guix reconfigure' fail to build 'rsnapshot' Simon Josefsson via
@ 2021-07-17 17:49 ` brice
  2021-07-17 18:00   ` Tobias Geerinckx-Rice
  2021-07-17 19:04   ` Simon Josefsson via
  2021-07-17 17:55 ` Tobias Geerinckx-Rice
  1 sibling, 2 replies; 5+ messages in thread
From: brice @ 2021-07-17 17:49 UTC (permalink / raw)
  To: Simon Josefsson; +Cc: help-guix

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 'guix reconfigure' fail to build 'rsnapshot'
  2021-07-17 16:07 'guix reconfigure' fail to build 'rsnapshot' Simon Josefsson via
  2021-07-17 17:49 ` brice
@ 2021-07-17 17:55 ` Tobias Geerinckx-Rice
  1 sibling, 0 replies; 5+ messages in thread
From: Tobias Geerinckx-Rice @ 2021-07-17 17:55 UTC (permalink / raw)
  To: Simon Josefsson; +Cc: help-guix

Simon,

On 2021-07-17 18:07, Simon Josefsson via wrote:
> Hi!  Since some time, 'guix reconfigure' on my machine fails:

Thanks!  Fixed on master.

> aren't all packages built centrally

Yes: <http://ci.guix.gnu.org/jobset/master>.

> to make sure things build?

It doesn't do more than try to build things (yet).

Kind regards,

T G-R

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 'guix reconfigure' fail to build 'rsnapshot'
  2021-07-17 17:49 ` brice
@ 2021-07-17 18:00   ` Tobias Geerinckx-Rice
  2021-07-17 19:04   ` Simon Josefsson via
  1 sibling, 0 replies; 5+ messages in thread
From: Tobias Geerinckx-Rice @ 2021-07-17 18:00 UTC (permalink / raw)
  To: brice; +Cc: Simon Josefsson, help-guix

On 2021-07-17 19:49, brice@waegenei.re wrote:
> 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---

This is probably cleaner if you've verified that the tests are still 
run.  LGTM!

Kind regards,

T G-R

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 'guix reconfigure' fail to build 'rsnapshot'
  2021-07-17 17:49 ` brice
  2021-07-17 18:00   ` Tobias Geerinckx-Rice
@ 2021-07-17 19:04   ` Simon Josefsson via
  1 sibling, 0 replies; 5+ messages in thread
From: Simon Josefsson via @ 2021-07-17 19:04 UTC (permalink / raw)
  To: brice; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 1034 bytes --]

brice@waegenei.re writes:

> 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

Hi Brice.  May thanks for this excellent walk-through, I followed the
steps locally here to learn, hoping my next problem follows the same
pattern.

/Simon

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 255 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-07-17 19:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-17 16:07 'guix reconfigure' fail to build 'rsnapshot' Simon Josefsson via
2021-07-17 17:49 ` brice
2021-07-17 18:00   ` Tobias Geerinckx-Rice
2021-07-17 19:04   ` Simon Josefsson via
2021-07-17 17:55 ` Tobias Geerinckx-Rice

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).