F42 Change Proposal: Switch to git-core (self-contained)

Switch to git-core

This is a proposed Change for Fedora Linux.
This document represents a proposed Change. As part of the Changes process, proposals are publicly announced in order to receive community feedback. This proposal will only be implemented if approved by the Fedora Engineering Steering Committee.

Wiki
Announced

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

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

Packages to review

BuildRequire on git:

$ grep -E ‘^BuildRequires:\s*git$’ *.spec |cut -d “:” -f1 |sed ‘s:.spec::’
4Pane
accountsservice
adobe-mappings-cmap
adobe-mappings-pdf
ansible-bender
anthy-unicode
apptainer
audacity
bicon
booth
budgie-desktop
build2
buildbot
buildbox
cantera
capstone
clipit
clover2
cmake
compat-readline6
container-storage-setup
copr-rpmbuild
crawl
dc3dd
dcm2niix
delve
diffoscope
diff-so-fancy
ding-libs
dionaea
doctest
domoticz
dosbox-staging
dotnet8.0
dotnet9.0
doxygen
edk2
efivar
elixir
enigma
execstack
fedpkg
findutils
fprintd
fragments
freeipa
fros
gawk
gcab
gdb-gef
ghostscript
git-annex
git-cinnabar
git-cola
gmp
gnome-extensions-app
gnome-kiosk
gnome-shell-extension-background-logo
gnome-shell-extension-no-overview
gnome-shell-extensions
gnome-shell
gnulib
gotcha
gpicview
gqrx
grilo-plugins
grilo
grub2
gssproxy
hexchat-autoaway
hipblaslt
hipblas
hiprand
hpx
ibus-anthy
ibus-engine-gui-ci
ibus-input-pad
ibus-qt
ibus
iguanaIR
initscripts
intel-igc
jd
kmplot
krb5
libabigail
libblkio
libcdson
libcpuid
libemu
libfm
libfprint
libgovirt
libijs
libmongocrypt
libosinfo
libpcap
libptytty
libverto
libvirt
llama-cpp
logrotate
lxmusic
lxpanel
lxtask
lxterminal
maeparser
malcontent
mcomix3
mingw-pcre
mingw-pdcurses
mingw-portablexdr
mingw-spice-gtk
mingw-wine-gecko
minicom
mod_auth_gssapi
mokutil
mot-adms
mpdscribble
mpris-scrobbler
muon-meson
mysql-connector-java
nano
nbdkit
nekovm
netdata
netgen-mesher
newsboat
ngspice
nss-altfiles
numberstation
ocaml
oci-seccomp-bpf-hook
opencsd
osbuild-composer
osinfo-db-tools
ostree
pacemaker
pack
pam_wrapper
parted
pass-otp
pcmanfm
perl-Git-CPAN-Patch
perl-Git-Repository
perl-SOAP-WSDL
perl-Sys-Virt
pesign
polkit
poppler-data
procps-ng
psacct
psmisc
pure-ftpd
python-breathe
python-cookiecutter
python-dbusmock
python-dictdiffer
python-dictdiffer
python-gitapi
python-git-revise
python-google-auth
python-kdcproxy
python-murano-pkg-check
python-openshift
python-openshift
python-os-client-config
python-os-service-types
python-pdm-pep517
python-pyside6
python-rosdistro
python-rpmaut.spec
python-rsdclient
python-scikit-build-core
python-setuptools_git
python-shade
python-sphinxcontrib-programoutput
python-tinyrpc
python-vcstool
python-virtualbmc
python-vobject
python-yappi
qemu
qmc2
qtile-extras
qtl866
qtpass
racket
rbenv
rear
repo
reposurgeon
reuse
rocblas
rocrand
rpi-imager
rpkg-macros
rubygem-coveralls
rubygem-pdfkit
rubygem–core.spec
rubygem–expectations.spec
rubygem–mocks.spec
rubygem–support.spec
rubygem-sugarjar
rxvt-unicode
shadow-utils
sile
stargz-snapshotter
syslinux
sysstat
tcsh
timg
tito
tpm2-abrmd-selinux
transifex-client
udev-hid-bpf
umockdev
unclutter-xfixes
unixODBC-gui-qt
upower
urw-base35-fonts
vcs-diff-lint
vcsh
vhostmd
virt-what
vsftpd
vxl
vyper
wasmedge
web-eid
webkit2gtk4.0
webkitgtk
xmms2
xscreensaver
yajl
yara

Require on git:

grep -E ‘^Requires:\s*git$’ *.spec |cut -d “:” -f1 |sed ‘s:.spec::’
anjuta
bodhi-server
build2
build2
build2
buildstream-plugins
cekit
clang13
clang15
clang17
clang18
cmake-fedora
copr-rpmbuild
dgit
dist-git
eg
git2cl
git-archive-all
git-cola
git-crypt
git-evtag
git-extras
git-ftp
gitolite3
git-tools
gitweb-caching
kdevelop
llvm
multi-git-status
myrepos
nfsometer
packit
perl-App-grindperl
perl-Bisect-Perl-UsingGit
perl-Code-TidyAll
perl-Git-CPAN-Patch
perl-Git-CPAN-Patch
perl-Git-Repository
perl-Menlo
php-phpunit-git
php-phpunit-Version
php-sebastian-version3
php-sebastian-version4
pmbootstrap
pungi
python-diff-cover
python-gitapi
python-git-revise
python-git-revise
rancid
repo
rpkg-macros
rpmgrill
rubygem-sugarjar
snotes
source-to-image
teamgit
thunar-vcs-plugin
vcs-diff-lint
vcsh
xfce4-dev-tools

Feedback

This change has been already proposed for packit in PR1307, it was accepted upstream and will be part of F42.

In November 2020 a suggestion to switch to git-core was discussed in the Development list.

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

How To Test:

  • For those packages that have git as BuildRequire, testing the build can be automated using copr.
  • Plan would be to fork the packages, switch to git-core, commit in the fork and build it in Copr. If builds fine open a PR.
  • For those packages that have git as Require, switch package to use git-core and test git related functionality.

User Experience

Dependencies

None.

Contingency Plan

Contingency mechanism: N/A 
Contingency deadline: N/A
Blocks release? N/A 

Documentation

N/A (not a System Wide Change)

Release Notes

Last edited by @amoloney 2024-12-03T17:06:40Z

Last edited by @amoloney 2024-12-03T17:06:40Z

4 Likes

How do you feel about the proposal as written?

  • Strongly in favor
  • In favor, with reservations
  • Neutral
  • Opposed, but could be convinced
  • Strongly opposed
0 voters

If you are in favor but have reservations, or are opposed but something could change your mind, please explain in a reply.

We want everyone to be heard, but many posts repeating the same thing actually makes that harder. If you have something new to say, please say it. If, instead, you find someone has already covered what you’d like to express, please simply give that post a :heart: instead of reiterating. You can even do this by email, by replying with the heart emoji or just “+1”. This will make long topics easier to follow.

Please note that this is an advisory “straw poll” meant to gauge sentiment. It isn’t a vote or a scientific survey. See About the Change Proposals category for more about the Change Process and moderation policy.

Does it make sense to consider adding git-core to the buildroot by default?

Please don’t do that. We have spend years to get rid of most of the defaults, such as make, perl, etc. Every dependency should be spelled out explicitly. We should continue the effort to minimize the buildroot (by get e.g. getting out the compression libraries), not the other way around. And not just buildroot.

Of course I’d be happier if we had something more precise for dependency on executable then the package name, but that is different discussion.

4 Likes

In addition to grepping the specfiles, here we go:

BuildRequires:

$ repoquery -q --repo=rawhide{,-source} --whatrequires git | grep src$ | pkgname | sort | uniq
accountsservice
adobe-mappings-cmap
adobe-mappings-pdf
anthy-unicode
apfs-fuse
apptainer
audacity
bicon
booth
budgie-desktop
buildbox
build2
cantera
capstone
cbmc
clipit
clover2
cmake
compat-readline6
conky
container-storage-setup
copr-rpmbuild
copyq
crawl
cyrus-imapd
dcm2niix
dc3dd
delve
diffoscope
ding-libs
dionaea
doctest
domoticz
dosbox-staging
dotnet8.0
dotnet9.0
doxygen
dumpet
edk2
efibootmgr
efi-rpm-macros
efivar
elixir
enigma
envision
execstack
fedpkg
findutils
fprintd
fragments
fros
gawk
gcab
gdb-gef
ghostscript
git-annex
git-cinnabar
git-cola
git-lfs
gluster-block
gmp
gnome-desktop-testing
gnome-extensions-app
gnome-kiosk
gnome-shell
gnome-shell-extension-background-logo
gnome-shell-extension-no-overview
gnome-shell-extensions
gnulib
gotcha
gpicview
gqrx
grilo
grilo-plugins
groff
grub2
gssproxy
hexchat-autoaway
hipblas
hipblaslt
hiprand
hpx
ibus
ibus-anthy
ibus-engine-gui-ci
ibus-input-pad
ibus-qt
iguanaIR
initscripts
intel-igc
iscsi-initiator-utils
jd
kmplot
krb5
libabigail
libcdson
libcpuid
libemu
libfm
libfprint
libgovirt
libijs
libmongocrypt
libosinfo
libpcap
libptytty
libratbag
libverto
libvirt
libxkbcommon
linuxdoc-tools
llama-cpp
logrotate
lxmusic
lxpanel
lxtask
lxterminal
maeparser
malcontent
manifest-tool
mcomix3
mingw-pcre
mingw-pdcurses
mingw-portablexdr
mingw-spice-gtk
mingw-spice-protocol
mingw-wine-gecko
minicom
mod_auth_gssapi
mokutil
monodevelop
mot-adms
mpdscribble
mpris-scrobbler
mtr
muon-meson
mysql-connector-java
nano
nbdkit
nekovm
netdata
netgen-mesher
newsboat
ngspice
nss-altfiles
numberstation
ocaml
oci-seccomp-bpf-hook
opencsd
openmeeg
osbuild-composer
osinfo-db-tools
os-prober
ostree
pacemaker
pack
pam_wrapper
parted
pass-otp
pcmanfm
perl-Git-CPAN-Patch
perl-Git-Repository
perl-SOAP-WSDL
perl-Sys-Virt
pesign
plymouth
polkit
poppler-data
procps-ng
psacct
psmisc
public-inbox
pure-ftpd
python-breathe
python-cookiecutter
python-dbusmock
python-dictdiffer
python-gitapi
python-git-revise
python-google-auth
python-kdcproxy
python-murano-pkg-check
python-openshift
python-os-client-config
python-os-service-types
python-pdm-pep517
python-pyside6
python-rosdistro
python-rpmautospec
python-rsdclient
python-scikit-build-core
python-setuptools_git
python-shade
python-sphinxcontrib-programoutput
python-tinyrpc
python-vcstool
python-virtualbmc
python-vobject
python-yappi
qemu
qmc2
qtile-extras
qtl866
qtpass
racket
rcssserver
rear
repo
reposurgeon
reuse
Rex
rocblas
rocrand
rpi-imager
rpm-ostree
ruby
rubygem-coveralls
rubygem-pdfkit
rubygem-rspec-core
rubygem-rspec-expectations
rubygem-rspec-mocks
rubygem-rspec-support
rubygem-sugarjar
rxvt-unicode
shadow-utils
shim-unsigned-aarch64
shim-unsigned-x64
sigul
sile
simspark
starcal
stargz-snapshotter
steghide
syslinux
sysstat
tcsh
timg
tito
topgit
tpm2-abrmd-selinux
transifex-client
udev-hid-bpf
umockdev
unclutter-xfixes
unixODBC-gui-qt
upower
urw-base35-fonts
vcs-diff-lint
vcsh
vhostmd
virt-what
vsftpd
vxl
vyper
wasmedge
web-eid
webkitgtk
webkit2gtk4.0
xmms2
xscreensaver
yajl
yara
4Pane

Requires:

$ repoquery -q --repo=rawhide --whatrequires git --source | pkgname | sort | uniq
anjuta
atomic-reactor
bodhi-server
buildstream-plugins
build2
cekit
clang17
clang18
cmake-fedora
copr-rpmbuild
dgit
dist-git
eg
git
git-archive-all
git-cola
git-crypt
git-evtag
git-extras
git-ftp
git-octopus
gitolite3
git-secret
git-tools
gitweb-caching
git2cl
guilt
charliecloud
kdevelop
llvm
multi-git-status
myrepos
nfsometer
perl-App-grindperl
perl-Bisect-Perl-UsingGit
perl-Code-TidyAll
perl-Git-CPAN-Patch
perl-Git-Repository
perl-Menlo
php-phpunit-git
php-phpunit-Version
php-sebastian-version3
php-sebastian-version4
pmbootstrap
pungi
python-diff-cover
python-gitapi
python-git-revise
rancid
repo
rpmgrill
rubygem-sugarjar
snotes
source-to-image
sparkleshare
teamgit
texlive-base
thunar-vcs-plugin
topgit
vcs-diff-lint
vcsh
xfce4-dev-tools
The git rpm installs common set of tools which are usually using with
small amount of dependencies. To install all git packages, [...]
install the git-all meta-package
The git-core rpm installs really the core tools with minimal
dependencies. Install git package for common set of tools.

Faced with choosing one for an install environment, which one would you pick?

Indeed, git-core is not tailor made for this purpose. For example, it contains bash completion and prompt, (interactive) mergetools configuration, remote tools, web–browse and upload binaries. It is a good choice for a minimal “interactive” cli toolset.

So, if we go through the pain of reducing git (B)Rs to minimal ones for the build process resp. run-time (for a ton of specs), I’d rather take the time to do it right and not depend on the choices for git-core which may change and are not made for this purpose. So either explicit (/usr/bin/git) and such, or a curated separate subpackage at least for the buildroot.

1 Like

This change proposal has now been submitted to FESCo with ticket #3320 for voting.

To find out more, please visit our Changes Policy documentation.