This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Disable Fedora's shebang mangling script when building the .rpm - #21964
Merged
sadick254 merged 1 commit intoFeb 15, 2021
Merged
Conversation
Fedora's script tries to coerce all shebangs to point to exact, system-provided binaries. For example: `#!/usr/bin/env sh` becomes `#!/usr/bin/sh`. Starting with Fedora 30, the script errors out when it encounters ambiguous, versionless `python` in shebangs. (`python2` and `python3` are allowed.) For example, this shebang causes an error: `#!/usr/bin/env python`. --- Disable this script for two reasons: 1) Fedora users should be able to build Atom without errors. 2) Consistent shebangs across builds of Atom on Ubuntu and Fedora. See: atom#21937 for more details. Fixes: atom#21937
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requirements for Contributing a Bug Fix (from template, click to expand):
Identify the Bug
Fixes: #21937
Description of the Change
Disable Fedora's shebang mangling script. (Which was being run when building the
.rpmpackage on Fedora.)A description of the script (click to expand)
Fedora's script tries to coerce all shebangs to point to exact, system-provided binaries.
For example:
#!/usr/bin/env shbecomes#!/usr/bin/sh.Starting with Fedora 30, the script errors out when it encounters ambiguous, versionless
pythonin shebangs. (python2andpython3are allowed.) For more about this error, see: #21937For example, this shebang line causes an error:
#!/usr/bin/env python.(There are a bunch of those in
node-gyp.)I'm proposing to disable this script, for two reasons:
.rpmpackage without errors..rpmpackage, regardless of building on Debian/Ubuntu or Fedora.See:
Possible Drawbacks
(This is mostly theoretical, as the
.rpmpackage is built on Ubuntu in CI, where the shebang mangling script has never been available in the first place and has never been run. This PR has no effect on the official.rpmbuilds, but rather would make manual builds on Fedora consistent with the ones from our CI.)Potential drawback for users who have been building on Fedora for some time already: Lets more
#!/usr/bin/envbe used in shebang lines, so in theory if someone has a wonkyshorpythonon their PATH it could cause bugs. However, it is ultimately the user's responsibility to set their environment in a usable way. (Most people don't put brokenshorpythonbinaries on their PATH.) We don't change those shebangs in the.debpackage, or the.rpmpackage built in CI, so I'd like to be consistent.Alternate Designs
pythonin shebangs topython3. Lets the shebang mangling script run without errors. (DeeDeeG@cf3de25 / Still a draft: Try to fix #21937 #21960)#!/usr/bin/env pythonfromnode-gyp.node-gypv8 release some time in the future, where shebangs are planned to havepython3instead ofpython. (Not possible until that is released!)I chose to disable the shebang mangling script entirely, for consistent shebangs regardless of building Atom on Fedora or Debian/Ubuntu.
Verification Process
Manually tested that the Atom
.rpmpackage builds and works correctly on Fedora with this change.apmcan still install packages with this change. The Atom.rpmpackage still builds on Ubuntu with this change.Release Notes
N/A