Bug 2166718 - git-email fails to install on ELN due to missing dependency
Summary: git-email fails to install on ELN due to missing dependency
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: git
Version: 38
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jonathan Wright
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-02 18:01 UTC by Davide Cavalca
Modified: 2024-05-07 16:06 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-05-07 16:06:08 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Davide Cavalca 2023-02-02 18:01:35 UTC
Description of problem:
The git-email package is not currently installable on ELN due to perl(Email::Valid) missing.


Version-Release number of selected component (if applicable):
2.39.1-1.eln125.1

How reproducible:
always

Steps to Reproduce:
1. mock -r fedora-eln-x86_64 --install git-email

Actual results:
Error: 
 Problem: conflicting requests
  - nothing provides perl(Email::Valid) needed by git-email-2.39.1-1.eln125.1.noarch
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

Expected results:
The package should install.

Additional info:

Comment 1 Todd Zullinger 2023-02-02 18:27:59 UTC
The perl(Email::Valid) requirement was added in 4414f61 (add more git-email perl dependencies, 2021-11-13).

Has anyone asked for perl-Email-Valid to be branched for epel9?  It's already in epel7 and epel8.

Since it's been there for well over a year without anyone noticing, I think we ought to wait a bit and see if the perl-Email-Valid maintainers (or epel wranglers) are willing to branch it for epel9.

Comment 2 Todd Zullinger 2023-02-02 18:38:44 UTC
I filed a request to branch perl-Email-Valid for epel9 (rhbz#2166725).

Comment 3 Ondřej Pohořelský 2023-02-03 08:03:22 UTC
Just for the record, IMO it is ok to drop perl(Email::Valid) dependency as there is a fallback that covers most of the regex this package is providing.
https://github.com/git/git/blob/2fc9e9ca3c7505bc60069f11e7ef09b1aeeee473/git-send-email.perl#L1148

Comment 4 Davide Cavalca 2023-02-03 08:04:51 UTC
To be clear, this ticket is for ELN (https://docs.fedoraproject.org/en-US/eln/), not EPEL. We can certainly branch perl-Email-Valid for epel9, but to be clear git-email installs fine on RHEL 9 because the package there doesn't have this dependency (see https://gitlab.com/redhat/centos-stream/rpms/git/-/blob/c9s/git.spec#L433).

Comment 5 Todd Zullinger 2023-02-03 17:36:58 UTC
Is there any chance that perl-Email-Valid will be added to ELN?  If not, I can add `%if ! 0%{?eln}` around the dependency (after waiting a bit to see if it'll be branched for EPEL, to avoid making a similar change a week later).  I much prefer to keep git building for EPEL as close to Fedora; I use that personally and know many others who rebuild git from the Fedora packages for various RHEL-alike systems.

I do know it's got a fallback, but that creates needless differences in the behavior on Fedora and EPEL, which I'd like to avoid where possible.  It would be ideal if they were either hard dependencies or removed entirely, I think.  There was a patch submitted upstream¹ due to some discussion in #2046203.  There were some comments on the patch and how to improve it, but that was not followed-up by the author or anyone else.

¹ http://public-inbox.org/git/20220620004427.3586240-1-trawets@amazon.com/T/#u

Comment 6 Stephen Gallagher 2023-02-03 17:50:20 UTC
ELN is not EPEL. ELN is (for all intents and purposes) an early preview of RHEL 10.

So what we're asking for here is whether we should include perl-Email-Valid in RHEL 10 or if it is acceptable to trim off this dependency. If there's a fully-functional fallback, I'm inclined to say we should use that and reduce our dependency chain.

Put another way: Since this package doesn't depend on perl-Email-Valid in RHEL 9, let's not require it to do so in RHEL 10 either. Just conditionalize it with `%if ! 0%{rhel}`. (Please do not use %{eln}, it's only intended for VERY restricted uses where ELN and RHEL 10 will differ. ELN's build configuration sets %{rhel} to 10.

Comment 7 Ondřej Pohořelský 2023-02-03 20:48:33 UTC
In RHEL9, I've removed this require, because I didn't want to add a new dependency for something a basic regex can cover.
And I don't like the idea of introducing this package to RHEL 10 either. 
So +1 on removal of the dependency in ELN.

Comment 8 Todd Zullinger 2023-02-03 21:09:59 UTC
Alright, I'll apply the following in the near future, presuming it looks alright to everyone:

commit 7c34cec
Author: Todd Zullinger <tmz>
Date:   Fri Feb 3 15:56:49 2023 -0500

    drop perl Email::Valid dep on RHEL (#2166718)
    
    The git send-email command uses Email::Valid to check addresses.  If
    Email::Valid is not present, it falls back to a more basic regex match
    (which is not nearly as thorough as the checks Email::Valid performs).
    
    While Fedora (and EPEL 7/8 provide perl-Email-Valid, RHEL does not and
    does not wish to add the dependency.  Make it easier for RHEL to fork &
    sync from us by making the dependency conditional.
    
    References:
    https://bugzilla.redhat.com/2020487
    https://bugzilla.redhat.com/2046203
    http://public-inbox.org/git/20220620004427.3586240-1-trawets@amazon.com/T/#u
    4414f61 (add more git-email perl dependencies, 2021-11-13)

diff --git a/git.spec b/git.spec
index 373235d..127f94a 100644
--- a/git.spec
+++ b/git.spec
@@ -81,7 +81,7 @@
 
 Name:           git
 Version:        2.39.1
-Release:        1%{?rcrev}%{?dist}.1
+Release:        2%{?rcrev}%{?dist}
 Summary:        Fast Version Control System
 License:        BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT
 URL:            https://git-scm.com/
@@ -390,7 +390,10 @@ BuildArch:      noarch
 Requires:       git = %{version}-%{release}
 Requires:       perl(Authen::SASL)
 Requires:       perl(Cwd)
+%if ! 0%{?rhel}
+# RHEL lacks perl-Email-Valid (rhbz#2166718)
 Requires:       perl(Email::Valid)
+%endif
 Requires:       perl(File::Spec)
 Requires:       perl(File::Spec::Functions)
 Requires:       perl(File::Temp)
@@ -1032,6 +1035,9 @@ rmdir --ignore-fail-on-non-empty "$testdir"
 %{?with_docs:%{_pkgdocdir}/git-svn.html}
 
 %changelog
+* Fri Feb 03 2023 Todd Zullinger <tmz> - 2.39.1-2
+- drop perl Email::Valid dep on RHEL (#2166718)
+
 * Thu Jan 19 2023 Fedora Release Engineering <releng> - 2.39.1-1.1
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

Comment 9 Davide Cavalca 2023-02-05 11:48:25 UTC
Looks good to me, thank you!

Comment 10 Ben Cotton 2023-02-07 15:12:25 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 38 development cycle.
Changing version to 38.

Comment 11 Fedora Admin user for bugzilla script actions 2023-10-04 00:09:54 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 12 Aoife Moloney 2024-05-07 15:56:38 UTC
This message is a reminder that Fedora Linux 38 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 38 on 2024-05-21.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '38'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 38 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 13 Stephen Gallagher 2024-05-07 16:06:08 UTC
This was fixed long ago.


Note You need to log in before you can comment on or make changes to this bug.