Skip to content
This repository was archived by the owner on Sep 5, 2025. It is now read-only.

Commit 68f27fd

Browse files
committed
Add MacOS signing
This utilizes changes in Vanagon to enable signing locally, instead of shipping files to a signing server. Details for how to set this up given the appropriate certs/keys can be found on the wiki. With the changes from OpenVoxProject/vanagon#13, when the VANAGON_FORCE_SIGNING env var is set, vanagon will attempt the signing flow as noted in that PR. Otherwise, it will skip signing entirely. In order for signing to succeed, you must run the build on a VM that contains: - A keychain created by root that contains the Developer Application and Installer identities (cert + key), and a Notarization profile. - SIGNING_KEYCHAIN set to the name/location of the keychain - SIGNING_KEYCHAIN_PW set to the password to unlock the keychain - APPLICATION_SIGNING_CERT set to the description of the application signing identity - INSTALLER_SIGNING_CERT set to the description of the installer signing identity - NOTARY_PROFILE set to the name of the profile set up with a user account tied to the above signing identities At some point, we may move all this out of vanagon and put it back in here, but since this should never really change and the only thing we're signing right now is the agent for MacOS, this works well enough.
1 parent cadb921 commit 68f27fd

File tree

3 files changed

+12
-15
lines changed

3 files changed

+12
-15
lines changed

.github/workflows/checks.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ jobs:
1313
rake_checks:
1414
name: Rake Checks
1515
runs-on: ubuntu-latest
16-
strategy:
17-
matrix:
18-
check: [ 'rubocop', 'commits' ]
1916
steps:
2017
- name: Checkout current PR
2118
uses: actions/checkout@v4
@@ -29,4 +26,4 @@ jobs:
2926
run: |
3027
gem update --system --silent --no-document
3128
bundle install --jobs 4 --retry 3
32-
- run: bundle exec rake ${{ matrix.check }} --trace
29+
- run: bundle exec rake rubocop --trace

configs/projects/openvox-agent.rb

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,6 @@
2121
metadata_uri = File.join(runtime_details['location'], "#{proj.settings[:puppet_runtime_basename]}.json")
2222
proj.inherit_yaml_settings(settings_uri, sha1sum_uri, metadata_uri: metadata_uri)
2323

24-
if platform.is_macos?
25-
proj.extra_file_to_sign File.join(proj.bindir, 'puppet')
26-
proj.extra_file_to_sign File.join(proj.bindir, 'pxp-agent')
27-
proj.extra_file_to_sign File.join(proj.bindir, 'wrapper.sh')
28-
proj.signing_hostname 'osx-signer-prod-3.delivery.puppetlabs.net'
29-
proj.signing_username 'jenkins'
30-
proj.signing_command 'security -q unlock-keychain -p \$$OSX_SIGNING_KEYCHAIN_PW \$$OSX_SIGNING_KEYCHAIN; codesign --timestamp --keychain \$$OSX_SIGNING_KEYCHAIN -vfs \"\$$OSX_CODESIGNING_CERT\"'
31-
end
32-
3324
if platform.is_fedora? || platform.name =~ /el-10/
3425
proj.package_override("# Disable check-rpaths since /opt/* is not a valid path\n%global __brp_check_rpaths %{nil}")
3526
proj.package_override("# Disable the removal of la files, they are still required\n%global __brp_remove_la_files %{nil}")
@@ -88,7 +79,11 @@
8879
proj.setting(:service_conf, File.join(proj.install_root, 'service_conf'))
8980

9081
proj.description "The OpenVox Agent package contains all of the elements needed to run the agent, including ruby and facter."
91-
proj.version_from_git
82+
if ENV['OPENVOX_AGENT_VERSION']
83+
proj.version ENV['OPENVOX_AGENT_VERSION']
84+
else
85+
proj.version_from_git
86+
end
9287
proj.write_version_file File.join(proj.prefix, 'VERSION')
9388
proj.license "See components"
9489
proj.vendor "Vox Pupuli <[email protected]>"

tasks/build.rake

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@ namespace :vox do
1717
engine = platform =~ /^(osx|windows)-/ ? 'local' : 'docker'
1818
cmd = "bundle exec build #{project} #{platform} --engine #{engine}"
1919

20-
FileUtils.rm_rf('C:/ProgramFiles64Folder') if platform =~ /^windows-/
20+
if platform =~ /^windows-/
21+
FileUtils.rm_rf('C:/ProgramFiles64Folder')
22+
else
23+
FileUtils.rm_rf('/opt/puppetlabs')
24+
FileUtils.rm_rf('/etc/puppetlabs')
25+
end
2126

2227
run_command(cmd, silent: false, print_command: true, report_status: true)
2328
end

0 commit comments

Comments
 (0)