Switch to git-core
Summary
Packages that only require git
binary should depend on git-core
and not on the git
package.
Owner
- Name: Mikel Olasagasti
- Email: mikel at olasagasti.info
Current status
- Targeted release: Fedora Linux 42
- Last updated: 2024-11-18
- [Announced]
- [<will be assigned by the Wrangler> Discussion thread]
- FESCo issue: <will be assigned by the Wrangler>
- Tracker bug: <will be assigned by the Wrangler>
- Release notes tracker: <will be assigned by the Wrangler>
Detailed Description
Many package have either requirement or build requirement for the git
binary. The git
package is complex and is divided in mulitple subpackages. The subpackage that contains the git
binary, that is enough for most of the use cases, is part of the git-core
subpackage.
In a fresh rawhide image git-core
package installs 10 packages and requires 8 MiB, while git
package requires 77 packages and 19 MiB.
The proposed change would be to open Pull Requests against each package to switch to git-core
and, when possible, test it before the PR is accepted.
Currently around 230 packages have git
as BuildRequires
and another 60 as Requires
. Verified using latest spec archive snapshot available.
$ cd /tmp/ $ wget https://src.fedoraproject.org/lookaside/rpm-specs-latest.tar.xz $ tar xf rpm-specs-latest.tar.xz $ cd /tmp/rpm-specs $ grep -E '^BuildRequires:\s*git$' *.spec |wc -l 236 $ grep -E '^Requires:\s*git$' *.spec |wc -l 61
- Installing
git-core
# dnf install git-core Updating and loading repositories: Repositories loaded. Package Arch Version Repository Size Installing: git-core x86_64 2.47.0-1.fc42 rawhide 22.6 MiB Installing dependencies: expat x86_64 2.6.4-1.fc42 rawhide 285.5 KiB less x86_64 668-1.fc42 rawhide 406.4 KiB libcbor x86_64 0.11.0-2.fc41 rawhide 73.9 KiB libedit x86_64 3.1-53.20240808cvs.fc41 rawhide 244.1 KiB libfdisk x86_64 2.40.2-8.fc42 rawhide 362.9 KiB libfido2 x86_64 1.15.0-2.fc41 rawhide 238.2 KiB openssh x86_64 9.9p1-5.fc42 rawhide 1.4 MiB openssh-clients x86_64 9.9p1-5.fc42 rawhide 2.7 MiB util-linux x86_64 2.40.2-8.fc42 rawhide 3.7 MiB Transaction Summary: Installing: 10 packages Total size of inbound packages is 8 MiB. Need to download 8 MiB. After this operation, 32 MiB extra will be used (install 32 MiB, remove 0 B).
- Installing
git
# dnf install git Updating and loading repositories: Repositories loaded. Package Arch Version Repository Size Installing: git x86_64 2.47.0-1.fc42 rawhide 85.2 KiB Installing dependencies: expat x86_64 2.6.4-1.fc42 rawhide 285.5 KiB git-core x86_64 2.47.0-1.fc42 rawhide 22.6 MiB git-core-doc noarch 2.47.0-1.fc42 rawhide 17.2 MiB groff-base x86_64 1.23.0-7.fc41 rawhide 3.8 MiB less x86_64 668-1.fc42 rawhide 406.4 KiB libcbor x86_64 0.11.0-2.fc41 rawhide 73.9 KiB libedit x86_64 3.1-53.20240808cvs.fc41 rawhide 244.1 KiB libfdisk x86_64 2.40.2-8.fc42 rawhide 362.9 KiB libfido2 x86_64 1.15.0-2.fc41 rawhide 238.2 KiB ncurses x86_64 6.5-2.20240629.fc41 rawhide 627.3 KiB openssh x86_64 9.9p1-5.fc42 rawhide 1.4 MiB openssh-clients x86_64 9.9p1-5.fc42 rawhide 2.7 MiB perl-AutoLoader noarch 5.74-512.fc42 rawhide 20.5 KiB perl-B x86_64 1.89-512.fc42 rawhide 498.0 KiB perl-Carp noarch 1.54-511.fc41 rawhide 46.6 KiB perl-Class-Struct noarch 0.68-512.fc42 rawhide 25.4 KiB perl-Data-Dumper x86_64 2.189-512.fc41 rawhide 111.7 KiB perl-Digest noarch 1.20-511.fc41 rawhide 35.3 KiB perl-Digest-MD5 x86_64 2.59-5.fc41 rawhide 59.8 KiB perl-DynaLoader x86_64 1.56-512.fc42 rawhide 32.1 KiB perl-Encode x86_64 4:3.21-511.fc41 rawhide 4.7 MiB perl-Errno x86_64 1.38-512.fc42 rawhide 8.4 KiB perl-Error noarch 1:0.17029-16.fc41 rawhide 77.3 KiB perl-Exporter noarch 5.78-511.fc41 rawhide 54.3 KiB perl-Fcntl x86_64 1.18-512.fc42 rawhide 49.0 KiB perl-File-Basename noarch 2.86-512.fc42 rawhide 14.0 KiB perl-File-Find noarch 1.44-512.fc42 rawhide 41.9 KiB perl-File-Path noarch 2.18-511.fc41 rawhide 63.5 KiB perl-File-Temp noarch 1:0.231.100-511.fc41 rawhide 162.3 KiB perl-File-stat noarch 1.14-512.fc42 rawhide 12.5 KiB perl-FileHandle noarch 2.05-512.fc42 rawhide 9.3 KiB perl-Getopt-Long noarch 1:2.58-2.fc41 rawhide 144.5 KiB perl-Getopt-Std noarch 1.14-512.fc42 rawhide 11.2 KiB perl-Git noarch 2.47.0-1.fc42 rawhide 64.0 KiB perl-HTTP-Tiny noarch 0.090-1.fc42 rawhide 154.4 KiB perl-IO x86_64 1.55-512.fc42 rawhide 151.1 KiB perl-IO-Socket-IP noarch 0.42-512.fc41 rawhide 98.7 KiB perl-IO-Socket-SSL noarch 2.089-1.fc42 rawhide 703.3 KiB perl-IPC-Open3 noarch 1.22-512.fc42 rawhide 22.5 KiB perl-MIME-Base32 noarch 1.303-21.fc41 rawhide 30.7 KiB perl-MIME-Base64 x86_64 3.16-511.fc41 rawhide 46.1 KiB perl-Net-SSLeay x86_64 1.94-7.fc41 rawhide 1.3 MiB perl-POSIX x86_64 2.20-512.fc42 rawhide 235.1 KiB perl-PathTools x86_64 3.91-511.fc41 rawhide 180.0 KiB perl-Pod-Escapes noarch 1:1.07-511.fc41 rawhide 24.9 KiB perl-Pod-Perldoc noarch 3.28.01-512.fc41 rawhide 163.7 KiB perl-Pod-Simple noarch 1:3.45-511.fc41 rawhide 560.9 KiB perl-Pod-Usage noarch 4:2.03-511.fc41 rawhide 84.8 KiB perl-Scalar-List-Utils x86_64 5:1.68-1.fc42 rawhide 148.9 KiB perl-SelectSaver noarch 1.02-512.fc42 rawhide 2.2 KiB perl-Socket x86_64 4:2.038-511.fc41 rawhide 124.0 KiB perl-Storable x86_64 1:3.32-511.fc41 rawhide 232.4 KiB perl-Symbol noarch 1.09-512.fc42 rawhide 6.8 KiB perl-Term-ANSIColor noarch 5.01-512.fc41 rawhide 97.5 KiB perl-Term-Cap noarch 1.18-511.fc41 rawhide 29.3 KiB perl-TermReadKey x86_64 2.38-23.fc41 rawhide 64.1 KiB perl-Text-ParseWords noarch 3.31-511.fc41 rawhide 13.6 KiB perl-Text-Tabs+Wrap noarch 2024.001-511.fc41 rawhide 22.6 KiB perl-Time-Local noarch 2:1.350-511.fc41 rawhide 69.0 KiB perl-URI noarch 5.31-1.fc42 rawhide 257.0 KiB perl-base noarch 2.27-512.fc42 rawhide 12.5 KiB perl-constant noarch 1.33-512.fc41 rawhide 26.2 KiB perl-if noarch 0.61.000-512.fc42 rawhide 5.8 KiB perl-interpreter x86_64 4:5.40.0-512.fc42 rawhide 122.3 KiB perl-lib x86_64 0.65-512.fc42 rawhide 8.5 KiB perl-libnet noarch 3.15-512.fc41 rawhide 289.4 KiB perl-libs x86_64 4:5.40.0-512.fc42 rawhide 9.9 MiB perl-locale noarch 1.12-512.fc42 rawhide 6.5 KiB perl-mro x86_64 1.29-512.fc42 rawhide 45.6 KiB perl-overload noarch 1.37-512.fc42 rawhide 71.5 KiB perl-overloading noarch 0.02-512.fc42 rawhide 4.8 KiB perl-parent noarch 1:0.242-1.fc42 rawhide 10.0 KiB perl-podlators noarch 1:6.0.2-2.fc41 rawhide 317.5 KiB perl-vars noarch 1.05-512.fc42 rawhide 3.9 KiB util-linux x86_64 2.40.2-8.fc42 rawhide 3.7 MiB Installing weak dependencies: perl-NDBM_File x86_64 1.17-512.fc42 rawhide 32.5 KiB Transaction Summary: Installing: 77 packages Total size of inbound packages is 19 MiB. Need to download 19 MiB. After this operation, 75 MiB extra will be used (install 75 MiB, remove 0 B).
Feedback
This change has been already proposed for packit
in PR1307, that was accepted upstream and will be part of F42.
Benefit to Fedora
For users it will reduce the amount of packages installed as transient dependency of the main package.
For developers it should make builds a few seconds faster. Tests with podman on a local machine (i7-1270P) show 1 to 6 seconds less are required to install git-core
vs git
.
Scope
- Proposal owners:
- Other developers:
- Release engineering: #Releng issue number
- Policies and guidelines: N/A (not needed for this Change)
- Trademark approval: N/A (not needed for this Change)
- Alignment with the Fedora Strategy:
Upgrade/compatibility impact
Early Testing (Optional)
Do you require 'QA Blueprint' support? Y/N
How To Test
- Switch package to use
git-core
and test git related functionality.
User Experience
Dependencies
None.
Contingency Plan
- Contingency mechanism: (What to do? Who will do it?) N/A (not a System Wide Change)
- Contingency deadline: N/A (not a System Wide Change)
- Blocks release? N/A (not a System Wide Change)
Documentation
N/A (not a System Wide Change)