[MacPorts] #43466: textmate2 @2.0-alpha.9537 configure error - "Unknown signee" while downloading TextMate Bundles
#43466: textmate2 @2.0-alpha.9537 configure error - "Unknown signee" while downloading TextMate Bundles ------------------------------+-------------------------------- Reporter: david.hislop.1@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Keywords: | Port: textmate2 ------------------------------+-------------------------------- {{{sudo port install textmate2}}} fails during configure with an error {{{Unknown signee: 'org.textmate.msheets'}}}. The same error was reported in #42063 during discussion of a git fetch failure. I didn't see an obvious solution to the unknown signee error in that ticket, but maybe I missed it. This is the excerpt from main.log: {{{ :info:configure Downloading ‘https://api.textmate.org/bundles/default’… :info:configure CSSM_ModuleLoad(): CSSMERR_DL_MDS_ERROR :info:configure CSSM_ModuleLoad(): CSSMERR_DL_MDS_ERROR :info:configure CSSM_ModuleLoad(): CSSMERR_DL_MDS_ERROR :info:configure *** error importing key: No error. :info:configure *** download_etag(‘https://api.textmate.org/bundles/default’): Unknown signee: ‘org.textmate.msheets’. :info:configure *** error retrieving ‘https://api.textmate.org/bundles/default’ (no etag given) :info:configure *** failed to update source: ‘TextMate Bundles’ (https://api.textmate.org/bundles/default) :info:configure Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_editors_textmate2/textmate2/work/textmate-2.0-alpha.9537" && ./configure --prefix=/opt/local :info:configure Exit code: 1 }}} I've tried: {{{ sudo port clean textmate2 sudo port install textmate2 }}} with the same result. I also tried: {{{ sudo port uninstall --follow-dependents installed }}} and then re-installed all the previously-installed ports. textmate2 was the only one that failed. I've attached the main.log. -- Ticket URL: <https://trac.macports.org/ticket/43466> MacPorts <http://www.macports.org/> Ports system for OS X
#43466: textmate2 @2.0-alpha.9537 configure error - "Unknown signee" while downloading TextMate Bundles -------------------------------+------------------- Reporter: david.hislop.1@… | Owner: cal@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: textmate2 | -------------------------------+------------------- Changes (by ryandesign@…): * owner: macports-tickets@… => cal@… -- Ticket URL: <https://trac.macports.org/ticket/43466#comment:1> MacPorts <http://www.macports.org/> Ports system for OS X
#43466: textmate2 @2.0-alpha.9537 configure error - "Unknown signee" while downloading TextMate Bundles -------------------------------+------------------- Reporter: david.hislop.1@… | Owner: cal@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: textmate2 | -------------------------------+------------------- Comment (by cal@…): I cannot reproduce that. You might want to ask upstream or do some debugging yourself, since I really have not idea what's wrong there. Trying again later might be an option as well. -- Ticket URL: <https://trac.macports.org/ticket/43466#comment:2> MacPorts <http://www.macports.org/> Ports system for OS X
#43466: textmate2 @2.0-alpha.9537 configure error - "Unknown signee" while downloading TextMate Bundles -------------------------------+------------------- Reporter: david.hislop.1@… | Owner: cal@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: textmate2 | -------------------------------+------------------- Comment (by david.hislop.1@…): I fixed it and built TextMate successfully. Had to first fix a bug that was preventing an error message displaying correctly and then I hazarded a guess at the likely solution. In file key_chain.cc, the line {{{if(err = SecItemImport(data, NULL, &type, &format, 0, ¶ms, NULL, &items) == errSecSuccess)}}} causes variable {{{err}}} to be set to the result of the logical expression, whereas the intent is to set it to the return value of {{{SecItemImport}}}. Needs either parentheses or splitting into an assignment and an {{{if()}}}. I chose the latter as in the diff output below. Also, the [https://developer.apple.com/library/mac/documentation/security/Reference/key... -CH1g-SW49 documentation for SecItemImport] shows that the sequence of parameters {{{&type}}} and {{{&format}}} is wrong. I reversed them. These changes didn't fix the problem but at least showed that SecItemImport was returning {{{errSecAddinLoadFailed}}}. On a hunch, I changed both {{{&type}}} and {{{&format}}} to pass the "unknown" enum and that fixed the problem. I've included below the diff of the resulting changes, with a long comment added explaining that I didn't investigate whether both {{{&type}}} and {{{&format}}} needed to be changed or just one. If I had to guess, I'd say it was {{{&format}}}. I'll also pass this onto the TextMate list. Thanks for your help. I have no idea how this was working for you and not me. Wild guess: maybe your TextMate keychain has entries in it that mine doesn't and the build I was doing attempted to add one that's broken. {{{ *** /tmp/key_chain.cc 2014-06-12 15:55:45.000000000 +1000 --- /tmp/key_chain.cc_orig 2014-06-12 15:55:45.000000000 +1000 *************** *** 31,56 **** bool res = false; SecItemImportExportKeyParameters params = { .keyUsage = NULL, .keyAttributes = NULL }; ! /***************************************************** ! /* Specifying the expected Item Type and Format ! * caused SecItemImport to return ! * errSecAddinLoadFailed. ! * I didn't check whether it was due to both being ! * specified or just one. Setting to the Unknown enum ! * worked. ! * Original code on next two comment lines. ! /* SecExternalItemType type = kSecItemTypePublicKey; ! /* SecExternalFormat format = kSecFormatPEMSequence; ! * Updated code with both vars set to unknown on next ! * two lines. */ ! SecExternalFormat format = kSecFormatUnknown; ! SecExternalItemType type = kSecItemTypeUnknown; CFDataRef data = CFDataCreateWithBytesNoCopy(NULL, (const UInt8*)_key_data.data(), _key_data.size(), kCFAllocatorNull); CFArrayRef items = NULL; OSStatus err; ! err = SecItemImport(data, NULL, &format, &type, 0, ¶ms, NULL, &items); ! if(err == errSecSuccess) { _sec_key = (SecKeyRef)CFArrayGetValueAtIndex(items, 0); if(_sec_key != NULL) --- 31,43 ---- bool res = false; SecItemImportExportKeyParameters params = { .keyUsage = NULL, .keyAttributes = NULL }; ! SecExternalItemType type = kSecItemTypePublicKey; ! SecExternalFormat format = kSecFormatPEMSequence; CFDataRef data = CFDataCreateWithBytesNoCopy(NULL, (const UInt8*)_key_data.data(), _key_data.size(), kCFAllocatorNull); CFArrayRef items = NULL; OSStatus err; ! if(err = SecItemImport(data, NULL, &type, &format, 0, ¶ms, NULL, &items) == errSecSuccess) { _sec_key = (SecKeyRef)CFArrayGetValueAtIndex(items, 0); if(_sec_key != NULL) }}} -- Ticket URL: <https://trac.macports.org/ticket/43466#comment:3> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts