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

[bldr-build] Add fix_shebang, pkg_interpreter_for #231

Merged
merged 1 commit into from
Feb 23, 2016

Conversation

jtimberman
Copy link
Contributor

This commit introduces the fix_shebang and pkg_interpreter_for functions.

  • fix_shebang is used to modify hardcoded shebang lines in interpreted scripts to use the paths in the INTERPRETERS metadata
  • pkg_interpreter_for finds the specified interpreter in the INTERPRETERS metadata for the given package
  • We now support adding pkg_interpreters in plan.sh to specify binaries of interpreters provided by the package
  • The interpreters are added to the new INTERPRETERS metadata

@chef-delivery
Copy link
Contributor

This PR has passed 'Verify' and is ready for review and approval!
Use: '@delivery approve' when code review is complete.

1 similar comment
@chef-delivery
Copy link
Contributor

This PR has passed 'Verify' and is ready for review and approval!
Use: '@delivery approve' when code review is complete.

#
# For a single target:
#
# fix_shebang node_modules/.bin/concurrent chef/coreutils:bin/env
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fnichol what do you think about this being a : rather than 3 arguments? I think I like it, but it's a new introduction to the API. Might be too much magic. @jtimberman ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#f16ffff

@jtimberman jtimberman force-pushed the jtimberman/fix-shebang branch from 6161546 to f16ffff Compare February 23, 2016 04:35
@chef-delivery
Copy link
Contributor

This PR has passed 'Verify' and is ready for review and approval!
Use: '@delivery approve' when code review is complete.

# ### pkg_interpreters
# An array of binaries that are used as interpreters in shebang lines for scripts.
# ```
# pkg_interpreters=(bash sh)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly need to update the example with the relative path to the binary? For example in the bash Plan it was pkg_interpreters=(bin/bash bin/sh)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already updated on my local branch 😁

@jtimberman jtimberman force-pushed the jtimberman/fix-shebang branch from f16ffff to f1f55e0 Compare February 23, 2016 20:00
@chef-delivery
Copy link
Contributor

This PR has passed 'Verify' and is ready for review and approval!
Use: '@delivery approve' when code review is complete.

This commit introduces the fix_shebang and pkg_interpreter_for functions.

* fix_shebang is used to modify hardcoded shebang lines in interpreted
  scripts to use the paths in the INTERPRETERS metadata
* pkg_interpreter_for finds the specified interpreter in the
  INTERPRETERS metadata for the given package
* We now support adding pkg_interpreters in plan.sh to specify
  binaries of interpreters provided by the package
* The interpreters are added to the new INTERPRETERS metadata

Expose the interpreters using the subdirectory of their binary, for
example bin/bash, because some packages may have directories besides
bin where their interpreters are such as sbin or libexec.
@jtimberman jtimberman force-pushed the jtimberman/fix-shebang branch from f1f55e0 to 421e2c5 Compare February 23, 2016 20:10
@chef-delivery
Copy link
Contributor

This PR has passed 'Verify' and is ready for review and approval!
Use: '@delivery approve' when code review is complete.

@fnichol
Copy link
Collaborator

fnichol commented Feb 23, 2016

gif-keyboard-14315108556891444189

@fnichol
Copy link
Collaborator

fnichol commented Feb 23, 2016

@delivery approve

chef-delivery added a commit that referenced this pull request Feb 23, 2016
Merged change fbb04470-c138-49af-9648-d308ba2e6678

From review branch jtimberman/fix-shebang into master

Signed-off-by: fnichol <[email protected]>
@chef-delivery chef-delivery merged commit 11ae39b into master Feb 23, 2016
@chef-delivery chef-delivery deleted the jtimberman/fix-shebang branch February 23, 2016 20:17
@chef-delivery
Copy link
Contributor

This PR has passed 'Acceptance' and is ready to be delivered!
Use: '@delivery deliver' when validated in acceptance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants