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

Always render run script with chpst #1240

Merged
merged 1 commit into from
Sep 15, 2016
Merged

Always render run script with chpst #1240

merged 1 commit into from
Sep 15, 2016

Conversation

jtimberman
Copy link
Contributor

This commit makes two primary changes to the build script:

  • The run script generated from pkg_svc_run in the plan will always
    render with chpst set to run with pkg_svc_user and pkg_svc_group
  • The generated run script no longer prefixes the pkg_svc_run command
    with "$pkg_prefix"

These changes are necessary to ensure that the sane default for built
packages does the right thing for the most cases. We assume that the
binary used in the pkg_svc_run will be in a bin dir defined in the plan
so it ends up in the PATH.

Additionally, we need some other changes:

  • Update plans to reflect this change in the various components' plans
  • The proxy package can now use pkg_svc_run instead of having its own
    run hook

Signed-off-by: jtimberman [email protected]

This commit makes two primary changes to the build script:

- The run script generated from pkg_svc_run in the plan will always
  render with chpst set to run with pkg_svc_user and pkg_svc_group
- The generated run script no longer prefixes the pkg_svc_run command
  with "$pkg_prefix"

These changes are necessary to ensure that the sane default for built
packages does the right thing for the most cases. We assume that the
binary used in the pkg_svc_run will be in a bin dir defined in the plan
so it ends up in the PATH.

Additionally, we need some other changes:

- Update plans to reflect this change in the various components' plans
- The proxy package can now use pkg_svc_run instead of having its own
  run hook

Signed-off-by: jtimberman <[email protected]>
if [[ -n "$pkg_svc_user" && "${pkg_svc_user}" != "root" ]]; then
cat <<EOT >> $pkg_prefix/run
# We use chpst to ensure that the script works outside `hab-sup`
# for debugging purposes, or under a `hab-director`.
Copy link
Contributor

Choose a reason for hiding this comment

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

🍰

Copy link
Contributor Author

Choose a reason for hiding this comment

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

🚀 🍰

@bookshelfdave
Copy link
Contributor

👍

@reset reset merged commit 2553bea into master Sep 15, 2016
@reset reset removed the In Progress label Sep 15, 2016
@jtimberman jtimberman deleted the jtimberman/always-chpst branch September 15, 2016 21:23
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.

4 participants