git send-email missing perl packages

  • Done
  • quality assurance status badge
Details
One participant
  • Simon Tournier
Owner
unassigned
Submitted by
Simon Tournier
Severity
normal
Merged with
S
S
Simon Tournier wrote on 4 Sep 20:57 +0200
(address . bug-guix@gnu.org)
87msknw8ko.fsf@gmail.com
Hi,

Using Guix 7fa9df4, I get the error:

Toggle snippet (4 lines)
Not using SSL_VERIFY_PEER due to out-of-date IO::Socket::SSL.
To use SSL please install IO::Socket::SSL with version>=2.007 at /gnu/store/v6bivyjbg6bj07s8iqfzdm6hpvypc0p1-perl-5.36.0/lib/perl5/5.36.0/Net/SMTP.pm line 268.

when running “git send-email”. I have not investigated yet why it
fails. I notice this:

Toggle snippet (10 lines)
$ guix gc --references $(readlink -f ~/.guix-profile/libexec/git-core/git-send-email)
/gnu/store/0yavjaj47a0g3lyw33q2m9whgl588ww7-perl-net-ssleay-1.92
/gnu/store/9wx8rvz984cizp3cq4ng2n1qlk2f1kkh-git-2.45.2
/gnu/store/h2vmf9krw1xmhdd5m52wqs0d7m2ryhxv-perl-gssapi-0.28
/gnu/store/pkd5amfn4wcqrd85x49035nhq8kxy906-perl-uri-5.05
/gnu/store/v6bivyjbg6bj07s8iqfzdm6hpvypc0p1-perl-5.36.0
/gnu/store/x47i4yafqxdav838aykda9c2hhhn9sa4-bash-minimal-5.1.16
/gnu/store/z542qwhy7nnzq7iyjpfxpib2vcx04j0r-git-2.45.2-send-email

which the package perl-io-socket-ssl seems missing.

To be precise, using my previous generation, I get:

bash-minimal-5.1.16
git-2.41.0
git-2.41.0-send-email
perl-5.36.0
perl-authen-sasl-2.16
perl-digest-hmac-1.04
perl-gssapi-0.28
perl-io-socket-ssl-2.081
perl-net-smtp-ssl-1.04
perl-net-ssleay-1.92
perl-uri-5.05

and now, I get:

bash-minimal-5.1.16
git-2.45.2
git-2.45.2-send-email
perl-5.36.0
perl-gssapi-0.28
perl-net-ssleay-1.92
perl-uri-5.05

So the difference reads:

perl-authen-sasl-2.16
perl-digest-hmac-1.04
perl-io-socket-ssl-2.081
perl-net-smtp-ssl-1.04

Other said, if I run:

guix shell git git:send-email \
perl \
perl-authen-sasl perl-digest-hmac perl-io-socket-ssl perl-net-smtp-ssl

then the error is gone.

Cheers,
simon
S
S
Simon Tournier wrote on 5 Sep 04:27 +0200
(address . 73030@debbugs.gnu.org)
875xrax2aw.fsf@gmail.com
Hi,

Using the fix https://issues.guix.gnu.org/73034, I get this error:

Toggle snippet (3 lines)
Need MIME::Base64 and Authen::SASL todo auth at /gnu/store/imnyk8h2s6qfwd602n5vqxax8h33j2k5-git-2.45.2-send-email/libexec/git-core/.git-send-email-real line 1655.

My bad!

The issue is that ’package-transitive-propagated-inputs’ does not return
the package itself but only the dependent ones. Hence the explicit
dependents packages themselves are therefore missing.

Here, the snippet that fixes.

Toggle snippet (20 lines)
scheme@(guix-user)> ,pp (delete-duplicates
(let ((these-inputs
(list (this-package-input "perl-authen-sasl")
(this-package-input "perl-net-smtp-ssl")
(this-package-input "perl-io-socket-ssl"))))
(append
these-inputs
(map last
(append-map
package-transitive-propagated-inputs
these-inputs)))))
$4 = (#<package perl-authen-sasl@2.16 gnu/packages/web.scm:2476 72f60a906f20>
#<package perl-net-smtp-ssl@1.04 gnu/packages/web.scm:4512 72f60a9169a0>
#<package perl-io-socket-ssl@2.081 gnu/packages/web.scm:4206 72f60a90f160>
#<package perl-digest-hmac@1.04 gnu/packages/perl.scm:4029 72f60df5e420>
#<package perl-gssapi@0.28 gnu/packages/web.scm:3527 72f60a90c580>
#<package perl-uri@5.05 gnu/packages/web.scm:4819 72f60a916160>
#<package perl-net-ssleay@1.92 gnu/packages/tls.scm:819 72f60a7f3e70>)

compared to:

(assoc-ref inputs "perl-authen-sasl")
(assoc-ref inputs "perl-net-smtp-ssl")
(assoc-ref inputs "perl-io-socket-ssl")
(assoc-ref inputs "perl-gssapi")
(assoc-ref inputs "perl-digest-hmac")
(assoc-ref inputs "perl-uri")
(assoc-ref inputs "perl-net-ssleay")

Therefore, see v2.

Cheers,
simon
S
S
Simon Tournier wrote on 5 Sep 04:03 +0200
Re: bug#73030: git send-email missing perl packages [partially FIXED]
(address . 73030@debbugs.gnu.org)
87cylix3et.fsf@gmail.com
Hi,


Explanation below.

On Wed, 04 Sep 2024 at 20:57, Simon Tournier <zimon.toutoune@gmail.com> wrote:

Toggle quote (5 lines)
> --8<---------------cut here---------------start------------->8---
> Not using SSL_VERIFY_PEER due to out-of-date IO::Socket::SSL.
> To use SSL please install IO::Socket::SSL with version>=2.007 at /gnu/store/v6bivyjbg6bj07s8iqfzdm6hpvypc0p1-perl-5.36.0/lib/perl5/5.36.0/Net/SMTP.pm line 268.
> --8<---------------cut here---------------end--------------->8---

It is a regression introduced in core-updates, recently merged,

f2886044: gnu: git: Remove labels and use gexps.

Well, it was not straightforward to spot the bug. :-) Especially when
’git bisect’ is useless. Therefore, I locally reverted all the 8
suspicious commits modifying packages as git or git-minimal and then
investigated one by one.

Once the culprit had been identified, it was easier to spot the
unexpected part. Roughly, this snippet:

;; Tell 'git-send-email' where perl modules are.
(wrap-program git-se*
`("PERL5LIB" ":" prefix
,(map (lambda (o) (string-append o "/lib/perl5/site_perl"))
(list
,@(transitive-input-references
'inputs
(map (lambda (l)
(assoc l (package-inputs this-package)))
'("perl-authen-sasl"
"perl-net-smtp-ssl"
"perl-io-socket-ssl")))))))

had been translated into:

;; Tell 'git-send-email' where perl modules are.
(wrap-program git-se*
`("PERL5LIB" ":" prefix
,(search-path-as-list
'("lib/perl5/site_perl")
'#$(delete-duplicates
(append-map
(compose last package-transitive-propagated-inputs)
(list (this-package-input "perl-authen-sasl")
(this-package-input "perl-net-smtp-ssl")
(this-package-input "perl-io-socket-ssl")))))))

The former essentially reads:

Toggle snippet (18 lines)
scheme@(guix-user)> ,use(gnu packages version-control)
scheme@(guix-user)> (define this-package git)
scheme@(guix-user)> ,pp (transitive-input-references
'inputs
(map (lambda (l)
(assoc l (package-inputs this-package)))
'("perl-authen-sasl"
"perl-net-smtp-ssl"
"perl-io-socket-ssl")))
$1 = ((assoc-ref inputs "perl-authen-sasl")
(assoc-ref inputs "perl-net-smtp-ssl")
(assoc-ref inputs "perl-io-socket-ssl")
(assoc-ref inputs "perl-gssapi")
(assoc-ref inputs "perl-digest-hmac")
(assoc-ref inputs "perl-uri")
(assoc-ref inputs "perl-net-ssleay"))

and the last essentially reads:

Toggle snippet (15 lines)
scheme@(guix-user)> ,use(srfi srfi-1)
scheme@(guix-user)> (define (this-package-input name) (or (lookup-package-input this-package name) (lookup-package-native-input this-package name)))
scheme@(guix-user)> ,pp (append-map
(compose last package-transitive-propagated-inputs)
(list (this-package-input "perl-authen-sasl")
(this-package-input "perl-net-smtp-ssl")
(this-package-input "perl-io-socket-ssl")))
$2 = ("perl-gssapi"
#<package perl-gssapi@0.28 gnu/packages/web.scm:3527 72334030c580>
"perl-net-ssleay"
#<package perl-net-ssleay@1.92 gnu/packages/tls.scm:819 72333ffc8e70>
"perl-uri"
#<package perl-uri@5.05 gnu/packages/web.scm:4819 723340318160>)

Because ’last’ is applied before ’append-map’, it keeps only the last
elements of all the propagated-inputs for each of the 3. For instance:

Toggle snippet (4 lines)
scheme@(guix-user)> (package-transitive-propagated-inputs (this-package-input "perl-authen-sasl"))
$3 = (("perl-digest-hmac" #<package perl-digest-hmac@1.04 gnu/packages/perl.scm:4029 72333e2ba420>) ("perl-gssapi" #<package perl-gssapi@0.28 gnu/packages/web.scm:3527 72334030c580>))

When what is needed is all the package objects. Therefore, it’s not
possible to compose.

Toggle snippet (14 lines)
scheme@(guix-user)> ,pp (map last (append-map
package-transitive-propagated-inputs
(list (this-package-input "perl-authen-sasl")
(this-package-input "perl-net-smtp-ssl")
(this-package-input "perl-io-socket-ssl"))))
$4 = (#<package perl-digest-hmac@1.04 gnu/packages/perl.scm:4029 72333e2ba420>
#<package perl-gssapi@0.28 gnu/packages/web.scm:3527 72334030c580>
#<package perl-io-socket-ssl@2.081 gnu/packages/web.scm:4206 723340310160>
#<package perl-uri@5.05 gnu/packages/web.scm:4819 723340318160>
#<package perl-net-ssleay@1.92 gnu/packages/tls.scm:819 72333ffc8e70>
#<package perl-net-ssleay@1.92 gnu/packages/tls.scm:819 72333ffc8e70>
#<package perl-uri@5.05 gnu/packages/web.scm:4819 723340318160>)

I guess that’s the same story for 'gitweb.cgi'.


Cheers,
simon
S
S
Simon Tournier wrote on 9 Sep 14:09 +0200
control message for bug #73076
(address . control@debbugs.gnu.org)
87seu91123.fsf@gmail.com
merge 73076 73030
quit
S
S
Simon Tournier wrote on 9 Sep 14:10 +0200
Re: bug#73076: Inputs for git:send-email
87plpd10zk.fsf@gmail.com
Hi Andreas,

On Fri, 06 Sep 2024 at 18:15, Andreas Enge <andreas@enge.fr> wrote:

Toggle quote (2 lines)
> I think this may be a consequence of the recent core-updates merge.


Fixed by acba6223b5268ece0c6cb4b1ce346f5dc5e8affc.

Closing.

Cheers,
simon
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 73030@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 73030
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch