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

Implement deep signing for macOS Notarization #924

Merged
merged 1 commit into from
Jan 23, 2020
Merged

Implement deep signing for macOS Notarization #924

merged 1 commit into from
Jan 23, 2020

Conversation

jonsmorrow
Copy link
Contributor

Description

This change adds deep signing of libraries and binaries to the pakacking process for the pkg packager. It aso enables the hardened runtime for binaries. In order to deep sign we have to know where a software definition will install binaries and libraries. To facilite this lib_dirs and bin_dirs functions have been added to the software definition. These two functions return defaults that match standard omnibus locations, but allow individual software defs to override if they do something different.

Bumps major version since signing deep signing is a major change.

Signed-off-by: Jon Morrow jmorrow@chef.io


Maintainers

Please ensure that you check for:

  • [] If this change impacts git cache validity, it bumps the git cache
    serial number
  • [] If this change impacts compatibility with omnibus-software, the
    corresponding change is reviewed and there is a release plan
  • [] If this change impacts compatibility with the omnibus cookbook, the
    corresponding change is reviewed and there is a release plan

log.debug(log_key) { " Signing: #{binary}" }
sign_binary(binary, true)
end
libraries.merge binaries
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the reason for merging the binaries into the libraries here after already processing the libraries?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nothing specific. In one iteration of the code I think i may have been logging/displaying the list of things we signed. I guess I left it as a way for the caller to determine if anything was signed.

* Adds deep signing of libraries and binaries to the pakacking process for the pkg packager.
* Enables the hardened runtime for binaries.
* Adds --preserve-xattr flag to pkgbuild so signing is preserved through packaging and install.*

In order to deep sign we have to know where a software definition will install binaries and libraries. To facilite this lib_dirs and bin_dirs functions have been added to the software definition. These two functions return defaults that match standard omnibus locations, but allow individual software defs to override if they do something different.

Bumps major version since signing deep signing is a major change.

Signed-off-by: Jon Morrow <jmorrow@chef.io>
Copy link
Contributor

@tyler-ball tyler-ball left a comment

Choose a reason for hiding this comment

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

This sounds like what we have talked about in the past. Allow software authors to list the libs/bins they want signed, and if they have not we search for those in some common locations

@tas50 tas50 merged commit 5902ed1 into master Jan 23, 2020
@chef-expeditor chef-expeditor bot deleted the jm/deep_sign branch January 23, 2020 17:22
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.

3 participants