Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Commit

Permalink
[vendir] package script needed changes for signing
Browse files Browse the repository at this point in the history
  • Loading branch information
Clayton Burlison committed Mar 9, 2017
1 parent 58e12bf commit df4a992
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions vendir/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def pkg(root,
output,
identifier=CONFIG['pkgid'],
install_location='/',
signing=CONFIG['pb_extra_args'],
sign=CONFIG['sign_cert_cn'],
ownership='recommended'
):
"""
Expand All @@ -30,12 +30,15 @@ def pkg(root,
cmd = ['/usr/bin/pkgbuild', '--root', root,
'--install-location', install_location,
'--identifier', identifier,
signing,
'--version', version,
'--ownership', ownership,
output]
# In case we aren't signing the page remove the empty element
cmd.remove('')
'--ownership', ownership]
# When sign_cert_cn are passed we should sign the package
if sign:
cmd.append('--sign')
cmd.append(sign)
# Always append the output path so signing will work
cmd.append(output)
print(cmd)
proc = subprocess.Popen(cmd, shell=False, bufsize=-1,
stdin=subprocess.PIPE,
stdout=sys.stdout, stderr=subprocess.PIPE)
Expand Down

0 comments on commit df4a992

Please sign in to comment.