Bug 217453 - devel/bazel: Incomplete shebang file list
Summary: devel/bazel: Incomplete shebang file list
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Carlos J. Puga Medina
URL:
Keywords: patch, patch-ready
Depends on:
Blocks:
 
Reported: 2017-03-01 16:30 UTC by Dan McGregor
Modified: 2017-03-03 14:54 UTC (History)
2 users (show)

See Also:
aehlig: maintainer-feedback+


Attachments
More shebang entries for devel/bazel. (765 bytes, patch)
2017-03-01 16:30 UTC, Dan McGregor
no flags Details | Diff
Fixed way of having more shebang fixes (985 bytes, patch)
2017-03-03 08:12 UTC, Klaus Aehlig
aehlig: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dan McGregor 2017-03-01 16:30:10 UTC
Created attachment 180394 [details]
More shebang entries for devel/bazel.

devel/bazel doesn't update enough files in the shebang list. This causes (at least) the gerrit build to fail looking for /bin/bash. I've attached a more complete list of files to fix.

It also fixes the expected location of bazelrc after the update to 0.4.4.

With this, and the update to shells/bash in bug 217451, gerrit builds on FreeBSD without modification.
Comment 1 Klaus Aehlig 2017-03-01 22:44:11 UTC
Comment on attachment 180394 [details]
More shebang entries for devel/bazel.

Your observation is absolutely correct. Thanks for the patch.
Can some committer please commit it? Thanks.
Comment 2 Carlos J. Puga Medina freebsd_committer freebsd_triage 2017-03-02 10:24:20 UTC
Take.
Comment 3 Carlos J. Puga Medina freebsd_committer freebsd_triage 2017-03-02 16:56:12 UTC
It fails to install on 10.3/i386

===>   Generating temporary packing list
/bin/cp /wrkdirs/usr/ports/devel/bazel/work/bazel-0.4.4/output/bazel /wrkdirs/usr/ports/devel/bazel/work/stage/usr/local/bin
cp: /wrkdirs/usr/ports/devel/bazel/work/bazel-0.4.4/output/bazel: No such file or directory
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/bazel

http://sprunge.us/cYLf
Comment 4 Klaus Aehlig 2017-03-03 08:12:42 UTC
Created attachment 180456 [details]
Fixed way of having more shebang fixes

Thanks for noting the build failure. I should have been more carefully when reviewing the patch. The provided SHEBANG_REGEX also matches the file
third_party/grpc/grpc-stub-0.15.0.jar which should not be touched.

The attached patch has a correct regex. It also bumps the PORTREVISION, as the
fix affects the built binary.
Comment 5 Carlos J. Puga Medina freebsd_committer freebsd_triage 2017-03-03 10:13:44 UTC
(In reply to Klaus Aehlig from comment #4)

LGTM, but I would make another change to make portlint happy.

 -48,7 +49,7 @@
 	${LOCALBASE}/bin/bash ./compile.sh)
 
 do-install:
-	${CP} ${WRKSRC}/output/bazel ${STAGEDIR}${PREFIX}/bin
+	${INSTALL_PROGRAM} ${WRKSRC}/output/bazel ${STAGEDIR}${PREFIX}/bin
 	@${MKDIR} ${STAGEDIR}${ETCDIR}
 	${INSTALL_DATA} ${WRKSRC}/scripts/packages/debian/bazel.bazelrc ${STAGEDIR}${ETCDIR}/bazel.bazelrc.sample
Comment 6 commit-hook freebsd_committer freebsd_triage 2017-03-03 14:53:26 UTC
A commit references this bug:

Author: cpm
Date: Fri Mar  3 14:52:54 UTC 2017
New revision: 435344
URL: https://svnweb.freebsd.org/changeset/ports/435344

Log:
  - Use SHEBANG_REGEX instead of SHEBANG_FILES. Update the list of files to fix.
  - Bump PORTREVISION

  PR:		217453
  Submitted by:	Dan McGregor <dan.mcgregor@usask.ca>
  Approved by:	Klaus Aehlig <aelig@linta.de> (maintainer)

Changes:
  head/devel/bazel/Makefile
Comment 7 Carlos J. Puga Medina freebsd_committer freebsd_triage 2017-03-03 14:54:37 UTC
Committed!

Thanks