Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fedora 28: /usr/bin/python shebang not allowed #7360

Closed
tonyhutter opened this issue Mar 28, 2018 · 0 comments · Fixed by #7399
Closed

Fedora 28: /usr/bin/python shebang not allowed #7360

tonyhutter opened this issue Mar 28, 2018 · 0 comments · Fixed by #7399
Labels
Type: Building Indicates an issue related to building binaries

Comments

@tonyhutter
Copy link
Contributor

System information

Type Version/Name
Distribution Name Fedora
Distribution Version 28
Linux Kernel 4.16
Architecture x86-64
ZFS Version master
SPL Version master

Describe the problem you're observing

The newest Fedora packaging rules print warnings for scripts using the #!/usr/bin/python shebang:

$ make pkg-utils
...
*** WARNING: mangling shebang in /usr/bin/arc_summary.py from #!/usr/bin/python to #!/usr/bin/python2. This will become an ERROR, fix it manually!
*** WARNING: mangling shebang in /usr/bin/dbufstat.py from #!/usr/bin/python to #!/usr/bin/python2. This will become an ERROR, fix it manually!
*** WARNING: mangling shebang in /usr/bin/arcstat.py from #!/usr/bin/python to #!/usr/bin/python2. This will become an ERROR, fix it manually!

In cases where a script is compatible with both python2 and python3, Fedora wants us to choose python3. Fedora policy: https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3

Python's policy is that new scripts should use python2 or python3, but scripts that are compatible with both may use /usr/bin/python. Python policy: https://www.python.org/dev/peps/pep-0394/

It seems we have a few options:

  1. Use python3 like Fedora wants.
  2. Use __brp_mangle_shebangs_exclude_from to exclude the existing individual python files, and make all new python files use python3.
  3. Use __brp_mangle_shebangs_exclude to exclude all python scripts.

__brp_mangle_shebangs_* info:
https://src.fedoraproject.org/rpms/redhat-rpm-config/c/fb05a239d287661af7ac5e3e7fd5eaa74abc3561?branch=master

Describe how to reproduce the problem

$ make pkg-utils in Fedora 28

Include any warning/errors/backtraces from the system logs

@tonyhutter tonyhutter added the Type: Building Indicates an issue related to building binaries label Mar 28, 2018
tonyhutter added a commit to tonyhutter/zfs that referenced this issue Apr 6, 2018
The newest Fedora packaging rules print warnings for scripts using the

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

Fedora wants all cross compatible scripts to pick python3.  Since we
don't want our users to have to pick a specific version of python, we
exclude our scripts from the RPM build check.

Signed-off-by: Tony Hutter <[email protected]>
Closes: openzfs#7360
tonyhutter added a commit to tonyhutter/zfs that referenced this issue Apr 6, 2018
The newest Fedora packaging rules print warnings for scripts using the
/usr/bin/python shebang:

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

Fedora wants all cross compatible scripts to pick python3.  Since we
don't want our users to have to pick a specific version of python, we
exclude our scripts from the RPM build check.

Signed-off-by: Tony Hutter <[email protected]>
Closes: openzfs#7360
behlendorf pushed a commit that referenced this issue Apr 6, 2018
The newest Fedora packaging rules print warnings for scripts using the
/usr/bin/python shebang:

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

Fedora wants all cross compatible scripts to pick python3.  Since we
don't want our users to have to pick a specific version of python, we
exclude our scripts from the RPM build check.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Giuseppe Di Natale <[email protected]>
Signed-off-by: Tony Hutter <[email protected]>
Closes #7360 
Closes #7399
tonyhutter added a commit to tonyhutter/zfs that referenced this issue Apr 16, 2018
The newest Fedora packaging rules print warnings for scripts using the
/usr/bin/python shebang:

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

Fedora wants all cross compatible scripts to pick python3.  Since we
don't want our users to have to pick a specific version of python, we
exclude our scripts from the RPM build check.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Giuseppe Di Natale <[email protected]>
Signed-off-by: Tony Hutter <[email protected]>
Closes openzfs#7360 
Closes openzfs#7399
tonyhutter added a commit to tonyhutter/zfs that referenced this issue May 4, 2018
The newest Fedora packaging rules print warnings for scripts using the
/usr/bin/python shebang:

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

Fedora wants all cross compatible scripts to pick python3.  Since we
don't want our users to have to pick a specific version of python, we
exclude our scripts from the RPM build check.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Giuseppe Di Natale <[email protected]>
Signed-off-by: Tony Hutter <[email protected]>
Closes openzfs#7360 
Closes openzfs#7399
tonyhutter added a commit that referenced this issue May 10, 2018
The newest Fedora packaging rules print warnings for scripts using the
/usr/bin/python shebang:

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

Fedora wants all cross compatible scripts to pick python3.  Since we
don't want our users to have to pick a specific version of python, we
exclude our scripts from the RPM build check.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Giuseppe Di Natale <[email protected]>
Signed-off-by: Tony Hutter <[email protected]>
Closes #7360
Closes #7399
behlendorf added a commit to behlendorf/zfs that referenced this issue Oct 12, 2018
Include zts-report.py is the __brp_mangle_shebangs_exclude_from
to resolve build failures in Fedora 28 and newer.

Signed-off-by: Brian Behlendorf <[email protected]>
Requires-builders: style|build|arch|distro|unstable
Issue openzfs#7360
behlendorf added a commit to behlendorf/zfs that referenced this issue Oct 12, 2018
Include zts-report.py is the __brp_mangle_shebangs_exclude_from
to resolve build failures in Fedora 28 and newer.

Signed-off-by: Brian Behlendorf <[email protected]>
Requires-builders: unstable
Issue openzfs#7360
behlendorf added a commit to behlendorf/zfs that referenced this issue Oct 13, 2018
Include zts-report.py is the __brp_mangle_shebangs_exclude_from
to resolve build failures in Fedora 28 and newer.

Signed-off-by: Brian Behlendorf <[email protected]>
Requires-builders: style arch distro test coverage unstable
Issue openzfs#7360
behlendorf added a commit that referenced this issue Oct 15, 2018
Include zts-report.py is the __brp_mangle_shebangs_exclude_from
to resolve build failures in Fedora 28 and newer.

Reviewed-by: Giuseppe Di Natale <[email protected]>
Reviewed-by: George Melikov <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #8020
Issue #7360
ghfields pushed a commit to ghfields/zfs that referenced this issue Oct 29, 2018
Include zts-report.py is the __brp_mangle_shebangs_exclude_from
to resolve build failures in Fedora 28 and newer.

Reviewed-by: Giuseppe Di Natale <[email protected]>
Reviewed-by: George Melikov <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#8020
Issue openzfs#7360
GregorKopka pushed a commit to GregorKopka/zfs that referenced this issue Jan 7, 2019
Include zts-report.py is the __brp_mangle_shebangs_exclude_from
to resolve build failures in Fedora 28 and newer.

Reviewed-by: Giuseppe Di Natale <[email protected]>
Reviewed-by: George Melikov <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#8020
Issue openzfs#7360
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Building Indicates an issue related to building binaries
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant