From Fedora Project Wiki
(Initial page)
 
m (releng issue)
Line 118: Line 118:
<!-- What work do other developers have to accomplish to complete the feature in time for release?  Is it a large change affecting many parts of the distribution or is it a very isolated change? What are those changes?-->
<!-- What work do other developers have to accomplish to complete the feature in time for release?  Is it a large change affecting many parts of the distribution or is it a very isolated change? What are those changes?-->


* Release engineering: [https://pagure.io/releng/issues #Releng issue number] (a check of an impact with Release Engineering is needed) <!-- REQUIRED FOR SYSTEM WIDE AS WELL AS FOR SELF CONTAINED CHANGES -->
* Release engineering: [https://pagure.io/releng/issue/7679 #7679] (a check of an impact with Release Engineering is needed) <!-- REQUIRED FOR SYSTEM WIDE AS WELL AS FOR SELF CONTAINED CHANGES -->
<!-- Does this feature require coordination with release engineering (e.g. changes to installer image generation or update package delivery)?  Is a mass rebuild required?  include a link to the releng issue.  
<!-- Does this feature require coordination with release engineering (e.g. changes to installer image generation or update package delivery)?  Is a mass rebuild required?  include a link to the releng issue.  
The issue is required to be filed prior to feature submission, to ensure that someone is on board to do any process development work and testing, and that all changes make it into the pipeline; a bullet point in a change is not sufficient communication -->
The issue is required to be filed prior to feature submission, to ensure that someone is on board to do any process development work and testing, and that all changes make it into the pipeline; a bullet point in a change is not sufficient communication -->

Revision as of 13:43, 14 August 2018



Make ambiguous python shebangs error

Summary

The /usr/lib/rpm/redhat/brp-mangle-shebangs buildroot policy script will be changed to make the build fail when it sees an ambiguous python shebang (such as #!/usr/bin/python or #!/usr/bin/env python). It currently says This will become an ERROR for 2 Fedora releases.

Owner

  • Name: Miro Hrončok
  • Email: <mhroncok@redhat.com>
  • Release notes owner:

Current status

  • Targeted release: Fedora 30
  • Last updated: 2018-08-14
  • Tracker bug: <will be assigned by the Wrangler>

Detailed Description

The buildroot policy script in /usr/lib/rpm/redhat/brp-mangle-shebangs currently changes all python shebangs to python2 with a message like:

*** WARNING: mangling shebang in /usr/bin/taskotron_result from #!/usr/bin/python to #!/usr/bin/python2. This will become an ERROR, fix it manually!

We will change it to:

*** ERROR: ambiguous python shebang in /usr/bin/taskotron_result: #!/usr/bin/python. Change it to python3 (or python2) explicitly.

The script will exit with nonzero exit code, rendering the build failed.

The warning and a promis of the error was there for 2 releases (28 and 29).

There are standard mechanics to avoid this buildroot policy script or to block certain files form it. Those remain intact by this change. For details see Shebang lines and BuildRoot Policy Scripts sections of the packaging guidelines.

Benefit to Fedora

Packagers will be notified by build error if they accidentally have python2 shebangs (and python2 dependency) they didn't anticipated. It's up to them to decide what to do with such files, no automation can know.

Scope

  • Other developers: fix their packages if they fail because of this
  • Release engineering: #7679 (a check of an impact with Release Engineering is needed)
  • Trademark approval: N/A (not needed for this Change)

Upgrade/compatibility impact

N/A (not a System Wide Change)

How To Test

Have an RPM package that tries to ship files with ambiguous python shebang. Observe the warning on Fedora 29 and the error on Fedora 30.

User Experience

Users should not notice this, expect there might be less unneeded python2 dependencies created by accident.

Dependencies

N/A (not a System Wide Change)

Contingency Plan

  • Contingency mechanism: 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), Yes/No
  • Blocks product? product

Documentation

The Python Packaging Guidelines will be the documentation.

Release Notes

TBD