Created attachment 211323 [details] [patch] fix some stage-qa findings as of the latest rust update, ports r524658 ... ====> Running Q/A tests (stage-qa) Error: '/usr/bin/env python' is an invalid shebang you need USES=shebangfix for 'lib/rustlib/src/rust/src/libcore/unicode/unicode.py' Error: '/usr/bin/env python' is an invalid shebang you need USES=shebangfix for 'lib/rustlib/src/rust/src/libcore/unicode/printable.py' Warning: Possible REINPLACE_CMD issues sed failed: file content unchanged from backup: src/librustc_llvm/build.rs sed failed: file content unchanged from backup: src/bootstrap/native.rs *** Error code 1 Stop. make[1]: stopped in /usr/ports/lang/rust These are the options settings: % make showconfig ===> The following configuration options are available for rust-1.41.0: DOCS=on: Build and/or install documentation GDB=on: Install ports gdb (necessary for debugging rust programs) SOURCES=on: Install source files ===> Use 'make config' to modify these settings The attached patch adds knobs to do fix-shebang for the .py files and removes the [now] unnecessary sed(1) from post-patch.
The reinplace_cmd is needed for ppc64 elfv1, see lang/rust/files/powerpc64-elfv1/*
Created attachment 211380 [details] [patch] fix some stage-qa findings (v2) (In reply to Mikael Urankar from comment #1) Ah. I didn't look for %CC% more than 1 level deep in files/. Updated patch.
(In reply to John Hein from comment #2) No need to use += It seems there is a leading whitespace for SHEBANG_FILES. You can list the files without using quotes, you also need a tab between = and the file name. Can you reformat the patch?
A commit references this bug: Author: tobik Date: Thu Feb 6 20:51:20 UTC 2020 New revision: 525449 URL: https://svnweb.freebsd.org/changeset/ports/525449 Log: lang/rust: Silence stage-qa warnings when building with SOURCES=on PR: 243850 Changes: head/lang/rust/Makefile
(In reply to Mikael Urankar from comment #3) The weird formatting is because the patch was missing a line wiith SOURCES_VARS - see patch below: ======================================== --- Makefile (revision 525454) +++ Makefile (working copy) @@ -74,6 +74,13 @@ _RUST_STD_BOOTSTRAP= ${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}/rust-std-${RUST_BOOTSTRAP_VERSION_${ARCH}:U${RUST_BOOTSTRAP_VERSION}}-${_RUST_TARGET} _CARGO_BOOTSTRAP= ${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}/cargo-${CARGO_BOOTSTRAP_VERSION_${ARCH}:U${CARGO_BOOTSTRAP_VERSION}}-${_RUST_TARGET} +SOURCES_USES= shebangfix +SOURCES_VARS= \ + SHEBANG_FILES+="\ + src/libcore/unicode/printable.py \ + src/libcore/unicode/unicode.py \ + " + .include <bsd.port.pre.mk> .if exists(${PATCHDIR}/libgit2) ======================================== But tobik's commit fixes it by chmod'ing every src/ file with 444 permissions. Since qa.sh's shebang check only cares about files w/exec bits, his change solves the shebang check errors - just in a different way (leaves the "bad" shebang, but it doesn't matter since the files are not executable). I'll close this.