Bug 1602168

Summary: rust-src requires python2
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: rustAssignee: Josh Stone <jistone>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 29CC: igor.raits, jistone, rust-sig, TicoTimo
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-08-15 16:26:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1285816    

Description Miro Hrončok 2018-07-17 23:32:18 UTC
Description of problem:
rust-src requires /usr/bin/python2

Version-Release number of selected component (if applicable):
rust-src-0:1.27.1-2.fc29


[~]$ dnf repoquery --requires rust-src
/bin/bash
/bin/sh
/usr/bin/bash
/usr/bin/python2

From the build logs of rust-1.27.1-3.fc29:

+ /usr/lib/rpm/redhat/brp-mangle-shebangs
*** WARNING: ./usr/lib/rustlib/src/rust/src/stdsimd/ci/run-docker.sh is executable but has empty or no shebang, removing executable bit
mangling shebang in /usr/lib/rustlib/src/rust/src/liblibc/ci/emscripten-entry.sh from /usr/bin/env bash to #!/usr/bin/bash
*** WARNING: ./usr/lib/rustlib/src/rust/src/liblibc/ci/run-docker.sh is executable but has empty or no shebang, removing executable bit
*** WARNING: mangling shebang in /usr/lib/rustlib/src/rust/src/jemalloc/scripts/gen_travis.py from #!/usr/bin/env python to #!/usr/bin/python2. This will become an ERROR, fix it manually!
*** WARNING: mangling shebang in /usr/lib/rustlib/src/rust/src/libcore/unicode/unicode.py from #!/usr/bin/env python to #!/usr/bin/python2. This will become an ERROR, fix it manually!
*** WARNING: ./usr/lib/rustlib/src/rust/src/libcompiler_builtins/ci/run.sh is executable but has empty or no shebang, removing executable bit
*** WARNING: mangling shebang in /usr/lib/rustlib/src/rust/src/libcompiler_builtins/compiler-rt/lib/dfsan/scripts/build-libc-list.py from #!/usr/bin/env python to #!/usr/bin/python2. This will become an ERROR, fix it manually!
*** WARNING: mangling shebang in /usr/lib/rustlib/src/rust/src/libcompiler_builtins/compiler-rt/lib/asan/scripts/asan_symbolize.py from #!/usr/bin/env python to #!/usr/bin/python2. This will become an ERROR, fix it manually!
*** WARNING: mangling shebang in /usr/lib/rustlib/src/rust/src/libcompiler_builtins/compiler-rt/lib/fuzzer/scripts/unbalanced_allocs.py from #!/usr/bin/env python to #!/usr/bin/python2. This will become an ERROR, fix it manually!
*** WARNING: mangling shebang in /usr/lib/rustlib/src/rust/src/libcompiler_builtins/compiler-rt/lib/sanitizer_common/scripts/sancov.py from #!/usr/bin/env python to #!/usr/bin/python2. This will become an ERROR, fix it manually!
*** WARNING: mangling shebang in /usr/lib/rustlib/src/rust/src/libcompiler_builtins/compiler-rt/lib/sanitizer_common/scripts/litlint.py from #!/usr/bin/env python to #!/usr/bin/python2. This will become an ERROR, fix it manually!
*** WARNING: mangling shebang in /usr/lib/rustlib/src/rust/src/libcompiler_builtins/compiler-rt/lib/sanitizer_common/scripts/cpplint.py from #!/usr/bin/env python to #!/usr/bin/python2. This will become an ERROR, fix it manually!
*** WARNING: mangling shebang in /usr/lib/rustlib/src/rust/src/libcompiler_builtins/compiler-rt/lib/sanitizer_common/scripts/gen_dynamic_list.py from #!/usr/bin/env python to #!/usr/bin/python2. This will become an ERROR, fix it manually!
*** WARNING: mangling shebang in /usr/lib/rustlib/src/rust/src/libcompiler_builtins/compiler-rt/lib/sanitizer_common/scripts/litlint_test.py from #!/usr/bin/python to #!/usr/bin/python2. This will become an ERROR, fix it manually!

https://koji.fedoraproject.org/koji/buildinfo?buildID=1124691


Maybe the shebangs need to be changed to /usr/bin/python3 instead?

Comment 1 Josh Stone 2018-07-18 02:46:40 UTC
I think we should probably just filter-requires the whole path.  The rust-src package is just for tools like "racer" and "rls" for IDEs, but none of the scripts therein ever need to be executed.

We shouldn't need such scripts present at all really, but trying to filter it down is a chore that I don't think will be worthwhile.

Comment 2 Igor Raits 2018-07-18 06:11:39 UTC
just remove `ci` and `scripts` directories?

Comment 3 Jan Kurik 2018-08-14 09:52:27 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle.
Changing version to '29'.