GNU bug report logs - #54232
[PATCH] gnu: python-daemon: Fix build by temporarily disabling the tests.

Previous Next

Package: guix-patches;

Reported by: Attila Lendvai <attila <at> lendvai.name>

Date: Thu, 3 Mar 2022 11:00:01 UTC

Severity: normal

Tags: patch

Done: Maxime Devos <maximedevos <at> telenet.be>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 54232 in the body.
You can then email your comments to 54232 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#54232; Package guix-patches. (Thu, 03 Mar 2022 11:00:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Attila Lendvai <attila <at> lendvai.name>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 03 Mar 2022 11:00:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Attila Lendvai <attila <at> lendvai.name>
To: guix-patches <at> gnu.org
Cc: Attila Lendvai <attila <at> lendvai.name>
Subject: [PATCH] gnu: python-daemon: Fix build by temporarily disabling the
 tests.
Date: Thu,  3 Mar 2022 11:58:52 +0100
A test is failing due to a new version of a dependency (`safe_hasattr` was
deleted from `testtools.helpers`).  Disable tests until the next release.

Also point the origin to the github repo instead of pypy.
---
 gnu/packages/python-xyz.scm | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index c05502388e..3c9463b2c8 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -4163,14 +4163,17 @@ (define-public python-daemon
     (version "2.3.0")
     (source
      (origin
-       (method url-fetch)
-       (uri (pypi-uri "python-daemon" version))
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://pagure.io/python-daemon.git")
+             (commit (string-append "release/" version))))
+       (file-name (git-file-name name version))
        (sha256
-        (base32
-         "1bxfn2bq56sd4w0nm9mqy8y0905m7fc8vmhnjxlrf49vcbqr7adx"))))
+        (base32 "1ysynb1m9vsww2nmhcypkk08xwifc3gw5yq10h1a1i11yn27w4y6"))))
     (build-system python-build-system)
     (arguments
-     `(#:phases
+     `(#:tests? #false ; TODO reenable; tests got fixed after v2.3.0
+       #:phases
        (modify-phases %standard-phases
          (add-before 'check 'adjust-tests
            (lambda _
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#54232; Package guix-patches. (Thu, 03 Mar 2022 12:34:02 GMT) Full text and rfc822 format available.

Message #8 received at 54232 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Attila Lendvai <attila <at> lendvai.name>, 54232 <at> debbugs.gnu.org
Subject: Re: [bug#54232] [PATCH] gnu: python-daemon: Fix build by
 temporarily disabling the tests.
Date: Thu, 03 Mar 2022 13:33:37 +0100
[Message part 1 (text/plain, inline)]
Attila Lendvai schreef op do 03-03-2022 om 11:58 [+0100]:
> A test is failing due to a new version of a dependency (`safe_hasattr` was
> deleted from `testtools.helpers`).

How about

  (a) Only disabling this single failing test instead of the whole test
      suite

or

  (b) Replacing 'python-testtools' by a previous version of
      'python-testtools' in the 'native-inputs'

or

  (c) Adding the change upstream made to accomodate the new version
      to the 'patches' field of the origin,

and adding a comment pointing to the upstream report or commit fixing
things?

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#54232; Package guix-patches. (Thu, 03 Mar 2022 14:22:02 GMT) Full text and rfc822 format available.

Message #11 received at 54232 <at> debbugs.gnu.org (full text, mbox):

From: Attila Lendvai <attila <at> lendvai.name>
To: 54232 <at> debbugs.gnu.org
Cc: Attila Lendvai <attila <at> lendvai.name>
Subject: [PATCH 1/2] gnu: python-daemon: Use the git repo as source instead of
 pypi.
Date: Thu,  3 Mar 2022 15:19:29 +0100
---

err... either i got confused, or someone (or was that me?) injected a
substitute* to get rid of the problematic call, so the tests work.

either way, this patch now reduces to the following: converting
the source to come from the git repo instead of pypi.

if that is not desirable, then feel free to close it.

and sorry for the noise!

 gnu/packages/python-xyz.scm | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index c05502388e..c49cb97122 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -4163,11 +4163,13 @@ (define-public python-daemon
     (version "2.3.0")
     (source
      (origin
-       (method url-fetch)
-       (uri (pypi-uri "python-daemon" version))
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://pagure.io/python-daemon.git")
+             (commit (string-append "release/" version))))
+       (file-name (git-file-name name version))
        (sha256
-        (base32
-         "1bxfn2bq56sd4w0nm9mqy8y0905m7fc8vmhnjxlrf49vcbqr7adx"))))
+        (base32 "1ysynb1m9vsww2nmhcypkk08xwifc3gw5yq10h1a1i11yn27w4y6"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#54232; Package guix-patches. (Thu, 03 Mar 2022 14:32:02 GMT) Full text and rfc822 format available.

Message #14 received at 54232 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Attila Lendvai <attila <at> lendvai.name>, 54232 <at> debbugs.gnu.org
Subject: Re: [bug#54232] [PATCH 1/2] gnu: python-daemon: Use the git repo as
 source instead of pypi.
Date: Thu, 03 Mar 2022 15:30:56 +0100
[Message part 1 (text/plain, inline)]
Attila Lendvai schreef op do 03-03-2022 om 15:19 [+0100]:
>      (source
>       (origin
> -       (method url-fetch)
> -       (uri (pypi-uri "python-daemon" version))
> +       (method git-fetch)
> +       (uri (git-reference
> +             (url "https://pagure.io/python-daemon.git")
> +             (commit (string-append "release/" version))))
> +       (file-name (git-file-name name version))
>         (sha256
> -        (base32
> -         "1bxfn2bq56sd4w0nm9mqy8y0905m7fc8vmhnjxlrf49vcbqr7adx"))))
> +        (base32 "1ysynb1m9vsww2nmhcypkk08xwifc3gw5yq10h1a1i11yn27w4y6"))))

I'm not opposed to building things from version control more often
(it makes things like "--with-commit" work more often).  However,
this seems more a change to discuss at guix-devel@.

Also, how does this address the test failure?  The pypi and git are at
the same version. Did upstream adjust the 'release/2.3.0' tag in place
or something?

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#54232; Package guix-patches. (Thu, 03 Mar 2022 14:44:02 GMT) Full text and rfc822 format available.

Message #17 received at 54232 <at> debbugs.gnu.org (full text, mbox):

From: Attila Lendvai <attila <at> lendvai.name>
To: Maxime Devos <maximedevos <at> telenet.be>
Cc: 54232 <at> debbugs.gnu.org
Subject: Re: [bug#54232] [PATCH 1/2] gnu: python-daemon: Use the git repo as
 source instead of pypi.
Date: Thu, 03 Mar 2022 14:42:59 +0000
> Also, how does this address the test failure? The pypi and git are at
> the same version. Did upstream adjust the 'release/2.3.0' tag in place
> or something?

sorry for not being clear enough! sending this patch was essentially a mistake: the tests do work fine.

probably i have added the disabling of the test prior to the SUBSTITUTE* (that
is basically a backport of the fix commit in upstream), and when i rebased some
pending changes, then i mistakenly included the now irrelevant disabling.

feel free to apply or reject this as you see fit. it's not important for me to
build from git, even though i also find it better. probably the software
heritage archives also work better with git.

--
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
“A man goes to a foreign country and kills somebody who's not aggressing against him; in a Hawaiian shirt he's a criminal, in a green costume he's a hero who gets a parade and a pension. So that, as a culture, we remain in a state of moral insanity. To point out these contradictions to people in society is to be labeled insane. This is how insane society remains, that anybody who points out logical opposites in the most essential human topic of ethics, is considered to be insane.”
	— Stefan Molyneux (1966–)





Reply sent to Maxime Devos <maximedevos <at> telenet.be>:
You have taken responsibility. (Thu, 03 Mar 2022 14:47:02 GMT) Full text and rfc822 format available.

Notification sent to Attila Lendvai <attila <at> lendvai.name>:
bug acknowledged by developer. (Thu, 03 Mar 2022 14:47:02 GMT) Full text and rfc822 format available.

Message #22 received at 54232-done <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Attila Lendvai <attila <at> lendvai.name>
Cc: 54232-done <at> debbugs.gnu.org
Subject: Re: [bug#54232] [PATCH 1/2] gnu: python-daemon: Use the git repo as
 source instead of pypi.
Date: Thu, 03 Mar 2022 15:46:15 +0100
[Message part 1 (text/plain, inline)]
Attila Lendvai schreef op do 03-03-2022 om 14:42 [+0000]:
> > Also, how does this address the test failure? The pypi and git are
> > at
> > the same version. Did upstream adjust the 'release/2.3.0' tag in
> > place
> > or something?
> 
> sorry for not being clear enough! sending this patch was essentially
> a mistake: the tests do work fine.
> 
> probably i have added the disabling of the test prior to the
> SUBSTITUTE* (that
> is basically a backport of the fix commit in upstream), and when i
> rebased some
> pending changes, then i mistakenly included the now irrelevant
> disabling.
> 
> feel free to apply or reject this as you see fit. it's not important
> for me to build from git, even though i also find it better. probably
> the software heritage archives also work better with git.

They do support tarballs to some degree, and disarchive to some degree
compensates for mismatches.  I don't know how well this works in
practice.

Anyway, I'm closing for now, but if it is discussed on guix-devel@ with
a positive conclusion, feel free to reopen.

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#54232; Package guix-patches. (Thu, 03 Mar 2022 23:53:01 GMT) Full text and rfc822 format available.

Message #25 received at 54232-done <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: Maxime Devos <maximedevos <at> telenet.be>, Attila Lendvai <attila <at> lendvai.name>
Cc: 54232-done <at> debbugs.gnu.org
Subject: Re: bug#54232: [PATCH 1/2] gnu: python-daemon: Use the git repo as
 source instead of pypi.
Date: Fri, 04 Mar 2022 00:48:14 +0100
Hi Maxime and Attila,

On Thu, 03 Mar 2022 at 15:46, Maxime Devos <maximedevos <at> telenet.be> wrote:

>> feel free to apply or reject this as you see fit. it's not important
>> for me to build from git, even though i also find it better. probably
>> the software heritage archives also work better with git.
>
> They do support tarballs to some degree, and disarchive to some degree
> compensates for mismatches.  I don't know how well this works in
> practice.

FYI, a quick picture on how it works. :-)

For source using ’git-fetch’, archival on Software Heritage (SWH) is
done using :

    guix lint -c archival <pkg>

and if later the URL for the repository is unavailable, then Guix
automatically sends a cooking requests to SWH and fetch from it there.
Basically the machinery works.  The failure are issues on SWH side or
not enough information on Guix side (see lengthy thread tag vs commit
hash for details of one typical issue :-))

For source using ’url-fetch’, archival on SWH is done via:

    http://guix.gnu.org/sources.json

The file is periodically builds on Guix side and periodically ingested
by SWH.  It lists all the “tarball“ URL locations for one Guix revision.

To keep it short, a tarball contains content (say source code itself)
and meta (say compression level or others).  SWH only preserves content
and drops meta.  Therefore, later it is not possible to rebuild from
their SWH data the exact same tarball and thus checksum mismatches.

The workaround is Disarchive.  It stores this ’meta’ in the database:

    http://disarchive.guix.gnu.org/

and thus using both (content from SWH and meta from Disarchive), the
exact same tarball is rebuilt.  This Disarchive database is periodically
updated by CI Cuirass.

If later the source URL is down, then Guix automatically sends a request
to SWH and Disarchive database ending by reassembling the both elements
of the required tarball.

Basically, the machinery works too.  Not all compression format are
supported.  Among other many other details.

(Note we name Disarchive both the tools to disassemble / reassemble and
also the database; where it can be misleading, sometimes. :-))


The plan is to have a better story for all.

Hope that helps and spread the word. ;-)

Cheers,
simon

PS: I have not talked about ’hg-fetch’ or ’svn-fetch’. ;-)




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 01 Apr 2022 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 140 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.