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

[macosx-*] Improve DRYness & correctness of Mac templates. #389

Merged
merged 1 commit into from
Jul 3, 2015

Conversation

fnichol
Copy link
Contributor

@fnichol fnichol commented Jul 3, 2015

The following improvements are made in this commit:

  • Using the template user variable to replace repetition of
    "macosx-10.*" style strings throughout
  • Bump the minimum version of Packer from 0.6.0 to 0.7.0
  • Supply a HOME_DIR environment variable for provisioner scripts to
    use
  • Remove the optional autologin logic, which wasn't being triggered by
    default leading to less behavior "tuning knobs" in the templates
  • Remove now-unused user variables arch and autologin
  • Add consistent _README user variable to explain how to obtain and
    prepare the base disk image
  • Rename all template names from "macosx-10.*" to "chef/macosx-10.*"
  • Extract the iso_checksum_type into a user variable and reference it
    in the templates
  • Call all provider scripts with sh -eux which will: (e) exit
    immediately if a command exists with a non-zero exit status, (u)
    treats unset variables as a error, and (x) outputs the command and its
    expanded arguments or associated word list
  • Ensure that all the provider shell scripts are more conservatively
    bourne shell friendly
  • Add a call to VMware's vmware-tools-cli disk shrink command in
    scripts/macosx/minimize.sh if the provider is vmware-based

The following improvements are made in this commit:

* Using the `template` user variable to replace repetition of
  `"macosx-10.*"` style strings throughout
* Bump the minimum version of Packer from 0.6.0 to 0.7.0
* Supply a `HOME_DIR` environment variable for provisioner scripts to
  use
* Remove the optional autologin logic, which wasn't being triggered by
  default leading to less behavior "tuning knobs" in the templates
* Remove now-unused user variables `arch` and `autologin`
* Add consistent `_README` user variable to explain how to obtain and
  prepare the base disk image
* Rename all template names from `"macosx-10.*"` to `"chef/macosx-10.*"`
* Extract the `iso_checksum_type` into a user variable and reference it
  in the templates
* Call all provider scripts with `sh -eux` which will: (e) exit
  immediately if a command exists with a non-zero exit status, (u)
  treats unset variables as a error, and (x) outputs the command and its
  expanded arguments or associated word list
* Ensure that all the provider shell scripts are more conservatively
  bourne shell friendly
* Add a call to VMware's `vmware-tools-cli disk shrink` command in
  `scripts/macosx/minimize.sh` if the provider is vmware-based
@fnichol fnichol self-assigned this Jul 3, 2015
fnichol added a commit that referenced this pull request Jul 3, 2015
[macosx-*] Improve DRYness & correctness of Mac templates.
@fnichol fnichol merged commit 13d9182 into master Jul 3, 2015
@fnichol fnichol removed the Reviewing label Jul 3, 2015
@fnichol fnichol deleted the refactor-mac-templates branch July 3, 2015 01:29
@fnichol fnichol removed their assignment Jul 3, 2015
@tas50 tas50 added Type: Enhancement Adds new functionality. and removed Improvement labels Jan 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Adds new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants