From Fedora Project Wiki
(New change proposal)
 
m (Small fixes)
Line 3: Line 3:
== Summary ==
== Summary ==


Split <code>/usr/bin/dtrace.py</code> from {{package|systemtap-sdt-devel}} to optimize many buildroots by removing Python where it's not needed.
Split <code>/usr/bin/dtrace.py</code> from <code>systemtap-sdt-devel</code> ({{package|systemtap}}) into a separate package to optimize many buildroots by removing unnecessary Python dependencies.


== Owner ==
== Owner ==
Line 37: Line 37:
== Detailed Description ==
== Detailed Description ==


Package {{package|systemtap-sdt-devel}} contains header files and one script <code>/usr/bin/dtrace.py</code> written in Python and using pycparser. Because of that, many packages with runtime or buildtime requirement on systemtap-sdt-devel have Python and pycparser unnecessarily installed even though they don't need the script (and Python interpreter) at all.
The package <code>systemtap-sdt-devel</code> currently contains header files and the script <code>/usr/bin/dtrace.py</code>, which is written in Python and uses pycparser. This results in unnecessary Python and pycparser installations for many packages that do not need the script (and many times Python at all), as they only require the header files.


Moreover, some important packages (like perl-devel) require systemtap-sdt-devel which means hundreds of packages have Python installed in their buildroots because of the single script they don't need.
Moreover, some important packages (like perl-devel) require systemtap-sdt-devel which means hundreds of Perl packages have Python installed in their buildroots because of the single script they don't need.


The idea was tested on all packages build-requiring perl-devel but don't build-requiring python-devel directly - 520 in total. And from that number:
The idea was tested on all packages build-requiring perl-devel but don't build-requiring python-devel directly - 520 in total. And from that number:


7 failed to build for unrelated reasons
- 7 failed to build for unrelated reasons
3 packages have python3-devel in buildroot (different reasons than systempat-sdt-devel)
- 3 packages have python3-devel in buildroot (different reasons than systempat-sdt-devel)
81 packages have python3-libs but not python3-devel (different reasons than systemtap-sdt-devel)
- 81 packages have python3-libs but not python3-devel (different reasons than systemtap-sdt-devel)


and finally, the rest - 436 packages - builds fine without the Python script in systemtap-sdt-devel and therefore without Python at all.
and finally, the rest - 436 packages - builds fine without the Python script in systemtap-sdt-devel and therefore without Python at all.


Another test rebuild of all packages directly build-requiring systemtap-sdt-devel identified these packages that need the dtrace script: glib2, sssd, qemu, python2.7, postgresql15, postgresql16, perl, php, mariadb10.11, and libvirt. Those will depend on a new package to which we move the script.
Further testing on packages directly requiring systemtap-sdt-devel identified the following needing the dtrace script:: glib2, sssd, qemu, python2.7, postgresql15, postgresql16, perl, php, mariadb10.11, and libvirt. Those will depend on a new package to which we move the script.


== Feedback ==
== Feedback ==


The idea has been [https://lists.fedorahosted.org/archives/list/devel@lists.fedoraproject.org/thread/4HKXN77BMFHRMXC7BU2HXECIKOI7B6CS/#4HKXN77BMFHRMXC7BU2HXECIKOI7B6CS proposed and positively accepted on the devel list].
The proposal has been positively received on the [https://lists.fedorahosted.org/archives/list/devel@lists.fedoraproject.org/thread/4HKXN77BMFHRMXC7BU2HXECIKOI7B6CS/#4HKXN77BMFHRMXC7BU2HXECIKOI7B6CS Fedora devel list].


== Benefit to Fedora ==
== Benefit to Fedora ==


There are hundreds of packages that don't need the <code>/usr/bin/dtrace.py</code> (and Python in general) to build. Their buildroots will be smaller and their builds faster.
By splitting the <code>/usr/bin/dtrace.py</code> script into a separate package, we reduce the buildroot size and improve build times for hundreds of packages that do not require Python.


== Scope ==
== Scope ==
* Proposal owners:
* Proposal owners:


1. Prepare a change for {{package|systemptap}} moving the script to <code>systemtap-sdt-dtrace</code> and requiring the new package from <code>systemtap-sdt-devel</code> for backward compatibility.
  1. Move the script to a new package <code>systemtap-sdt-dtrace</code> and update <code>systemtap-sdt-devel</code> to require this new package for backward compatibility.
2. Prepare changes for known affected packages switching or adding the new dependency on <code>systemtap-sdt-dtrace</code>.
  2. Update affected packages to depend on <code>systemtap-sdt-dtrace</code>.
3. Remove the backward-compatible requirement from <code>systemtap-sdt-devel</code>.
  3. Remove the backward-compatible requirement from <code>systemtap-sdt-devel</code>.


* Other developers: Review and merge proposed changes and report bugs.
* Other developers: Review and merge proposed changes, and report any bugs.


* Release engineering: N/A (not needed for this Change)
* Release engineering: N/A (not needed for this Change)
Line 80: Line 80:
== How To Test ==
== How To Test ==


Package maintainers can fix their packages proactively. The failed builds identifying packages requiring changes are available in [https://copr.fedorainfracloud.org/coprs/lbalhar/sdt-devel-no-dtrace/ COPR].
Package maintainers can proactively prepare their packages after the first step from the plan above is implemented. Failed builds identifying packages requiring changes are available in [https://copr.fedorainfracloud.org/coprs/lbalhar/sdt-devel-no-dtrace/ COPR].


Maintainers can also build and test their packages with the version of systemtap-sdt-devel from which the script has been removed.
Maintainers can also build and test their packages with the version of systemtap-sdt-devel from which the script has been removed.

Revision as of 06:55, 4 June 2024

Separate package for dtrace.py from systemtap-sdt-devel

Summary

Split /usr/bin/dtrace.py from systemtap-sdt-devel (systemtap) into a separate package to optimize many buildroots by removing unnecessary Python dependencies.

Owner

Current status

  • Targeted release: Fedora Linux 41
  • Last updated: 2024-06-04
  • [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

The package systemtap-sdt-devel currently contains header files and the script /usr/bin/dtrace.py, which is written in Python and uses pycparser. This results in unnecessary Python and pycparser installations for many packages that do not need the script (and many times Python at all), as they only require the header files.

Moreover, some important packages (like perl-devel) require systemtap-sdt-devel which means hundreds of Perl packages have Python installed in their buildroots because of the single script they don't need.

The idea was tested on all packages build-requiring perl-devel but don't build-requiring python-devel directly - 520 in total. And from that number:

- 7 failed to build for unrelated reasons - 3 packages have python3-devel in buildroot (different reasons than systempat-sdt-devel) - 81 packages have python3-libs but not python3-devel (different reasons than systemtap-sdt-devel)

and finally, the rest - 436 packages - builds fine without the Python script in systemtap-sdt-devel and therefore without Python at all.

Further testing on packages directly requiring systemtap-sdt-devel identified the following needing the dtrace script:: glib2, sssd, qemu, python2.7, postgresql15, postgresql16, perl, php, mariadb10.11, and libvirt. Those will depend on a new package to which we move the script.

Feedback

The proposal has been positively received on the Fedora devel list.

Benefit to Fedora

By splitting the /usr/bin/dtrace.py script into a separate package, we reduce the buildroot size and improve build times for hundreds of packages that do not require Python.

Scope

  • Proposal owners:
 1. Move the script to a new package systemtap-sdt-dtrace and update systemtap-sdt-devel to require this new package for backward compatibility.
 2. Update affected packages to depend on systemtap-sdt-dtrace.
 3. Remove the backward-compatible requirement from systemtap-sdt-devel.
  • Other developers: Review and merge proposed changes, and report any bugs.
  • Release engineering: N/A (not needed for this Change)
  • Policies and guidelines: N/A (not needed for this Change)
  • Trademark approval: N/A (not needed for this Change)
  • Alignment with the Fedora Strategy: N/A (not needed for this Change)

Upgrade/compatibility impact

How To Test

Package maintainers can proactively prepare their packages after the first step from the plan above is implemented. Failed builds identifying packages requiring changes are available in COPR.

Maintainers can also build and test their packages with the version of systemtap-sdt-devel from which the script has been removed.

User Experience

Regular distro users shouldn't notice any change.

Dependencies

Contingency Plan

  • Contingency mechanism: Change owner will revert the change in systemtap.
  • 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)

Release Notes