Summary: | lang/go14: fix shebangs after update to go1.4-bootstrap-20171003 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | John Hein <jcfyecrayz> | ||||||||
Component: | Individual Port(s) | Assignee: | Julien Laffaye <jlaffaye> | ||||||||
Status: | Closed Overcome By Events | ||||||||||
Severity: | Affects Some People | CC: | dmgk, jlaffaye | ||||||||
Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(jlaffaye) |
||||||||
Version: | Latest | ||||||||||
Hardware: | Any | ||||||||||
OS: | Any | ||||||||||
Attachments: |
|
Created attachment 205820 [details]
patch file
An extended version of the patch that
- Fixes QA errors
- Trims stuff not needed for building/testing or lang/go bootstrapping
- Fixes test target
Passes poudriere testport on 120a, 120i, 112a
A commit references this bug: Author: jlaffaye Date: Fri Jul 19 09:20:50 UTC 2019 New revision: 506918 URL: https://svnweb.freebsd.org/changeset/ports/506918 Log: lang/go14: fixes QA errors and remove unneeded files PR: 239154 Submitted by: Dmitri Goutnik <dg@syrec.org> Changes: head/lang/go14/Makefile head/lang/go14/pkg-plist That's better if none of those files (that are now no longer installed) are needed. Thanks, Dmitri. One nitpick left that I noticed... src/runtime/mknacl.sh still has /bin/bash. stage-qa doesn't find it because there are no execute permissions on the installed file. But it should be fixed or not installed if not needed. Re-opening. After the commit, there were still errors due to running make.bash with /bin/sh ('type -t' is a bashism). It's not serious, but it should be fixed. The patch (attached next) also fixes the issue from comment 3. Created attachment 205992 [details]
[patch] run bash script with bash rather than /bin/sh
make.bash has some bash-isms, so use bash rather than /bin/sh.
Fix bad shebang for mknacl.sh
(In reply to John Hein from comment #4) By the way, the errors due to using type -t you see during the build are: -t: not found -t: not found (In reply to John Hein from comment #6) Hi John, I would be hesitant to add bash to BUILD_DEPENDS, given that sh is already able to run make.bash (despite some warnings). Perhaps it would make sense to patch make.bash instead and replace `$(type -t foo)` with `$(type foo 2>/dev/null)` which seems to be a good enough approximation. lang/go was switched to the new bootstrap and lang/go14 was removed by r528577. |
Created attachment 205710 [details] [patch] fix g014 shebangs for bash scripts 'make -C /usr/ports/lang/go14 stage-qa' gives this error: Error: '/bin/bash' is an invalid shebang you need USES=shebangfix for 'go14/misc/makerelease/darwin/scripts/postinstall' Error: '/bin/bash' is an invalid shebang you need USES=shebangfix for 'go14/misc/makerelease/darwin/scripts/preinstall' The attached patch fixes it. One could also develop a patch to skip installing the files as I believe they probably aren't needed for the freebsd port. But this patch seemed easy and the files involved are tiny, so removing them from the package doesn't save (much) space.