Closed g-bougard closed 10 months ago
Hi,
I was facing a wrong syntax when using apple_id + password method to submit a package for notarization testing GLPI-Agent MacOSX packaging:
... 2023-11-02T16:05:20.6942050Z munkipkg: Removing component package pkg/build/GLPI-Agent-1.6-gitd4f4205a_x86_64.pkg 2023-11-02T16:05:20.6946390Z munkipkg: Renaming distribution package pkg/build/Dist-GLPI-Agent-1.6-gitd4f4205a_x86_64.pkg to pkg/build/GLPI-Agent-1.6-gitd4f4205a_x86_64.pkg 2023-11-02T16:05:20.6949630Z munkipkg: Uploading package to Apple notary service 2023-11-02T16:05:20.6951420Z main() 2023-11-02T16:05:20.6953570Z File "/Users/runner/work/glpi-agent/glpi-agent/contrib/macosx/./munkipkg", line 1314, in main 2023-11-02T16:05:20.6956050Z result = build(arguments[0], options) 2023-11-02T16:05:20.6957650Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2023-11-02T16:05:20.6959990Z File "/Users/runner/work/glpi-agent/glpi-agent/contrib/macosx/./munkipkg", line 936, in build 2023-11-02T16:05:20.6962560Z request_id = upload_to_notary(build_info, options) 2023-11-02T16:05:20.6964380Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2023-11-02T16:05:20.6967080Z File "/Users/runner/work/glpi-agent/glpi-agent/contrib/macosx/./munkipkg", line 737, in upload_to_notary 2023-11-02T16:05:20.6969760Z add_authentication_options(cmd, build_info) 2023-11-02T16:05:20.6972660Z File "/Users/runner/work/glpi-agent/glpi-agent/contrib/macosx/./munkipkg", line 705, in add_authentication_options 2023-11-02T16:05:20.6975370Z cmd.extend( 2023-11-02T16:05:20.6987240Z TypeError: list.extend() takes exactly one argument (4 given) 2023-11-02T16:05:20.7124790Z ##[error]Process completed with exit code 1.
This is an extract of the build from here: https://github.com/g-bougard/glpi-agent/actions/runs/6734996680/job/18307142900 The lines may be wrong as I'm using a patch to support distribution options. But this involves no change regarding notarization upload.
The problem is indeed in that code: https://github.com/munki/munki-pkg/blob/5817f6aa528f24f9880155d48781dbb6a238e739/munkipkg#L690
cmd.extend( '--apple-id', build_info['notarization_info']['apple_id'], '--password', build_info['notarization_info']['password'] )
Which should better be:
cmd.extend( [ '--apple-id', build_info['notarization_info']['apple_id'], '--password', build_info['notarization_info']['password'] ] )
The command options are now correct and the command is started. I'm then having another problem I'll try to figure out, but this syntax problem is clearly wrong.
Is this issue addressed by the merge? If so, please close it.
Fixed by #70
Hi,
I was facing a wrong syntax when using apple_id + password method to submit a package for notarization testing GLPI-Agent MacOSX packaging:
This is an extract of the build from here: https://github.com/g-bougard/glpi-agent/actions/runs/6734996680/job/18307142900 The lines may be wrong as I'm using a patch to support distribution options. But this involves no change regarding notarization upload.
The problem is indeed in that code: https://github.com/munki/munki-pkg/blob/5817f6aa528f24f9880155d48781dbb6a238e739/munkipkg#L690
Which should better be:
The command options are now correct and the command is started. I'm then having another problem I'll try to figure out, but this syntax problem is clearly wrong.