{
  "id": "cmake/cpack-dmg-signing-failure",
  "signature": "CMake Error: CPack DMG: Code signing failed with error code 1",
  "signature_zh": "CMake 错误：CPack DMG：代码签名失败，错误代码为 1",
  "regex": "CMake Error: CPack DMG: Code signing failed with error code \\d+",
  "domain": "cmake",
  "category": "build_error",
  "subcategory": null,
  "root_cause": "CPack DMG generator attempted to sign the disk image but the signing identity or entitlements are missing or invalid.",
  "root_cause_type": "generic",
  "root_cause_zh": "CPack DMG 生成器尝试对磁盘映像进行签名，但签名身份或授权缺失或无效。",
  "versions": [
    {
      "version": "cmake 3.27.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "cmake 3.28.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "cmake 3.29.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Reinstall Xcode Command Line Tools",
      "why_fails": "Xcode tools are usually not the issue; the problem is a missing or expired signing certificate, not the tools themselves.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "Set CPACK_DMG_DS_STORE to an empty path",
      "why_fails": "This only changes the DS_Store file location, not the signing process; signing still fails.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Set CPACK_DMG_SKIP_CODESIGN to TRUE in CMakeLists.txt before including CPack:\n\nset(CPACK_DMG_SKIP_CODESIGN TRUE)\ninclude(CPack)",
      "success_rate": 0.9,
      "how": "Set CPACK_DMG_SKIP_CODESIGN to TRUE in CMakeLists.txt before including CPack:\n\nset(CPACK_DMG_SKIP_CODESIGN TRUE)\ninclude(CPack)",
      "condition": "",
      "sources": []
    },
    {
      "action": "Ensure a valid signing identity is available by running:\n\nsecurity find-identity -v -p basic\n\nThen set CPACK_DMG_SIGNING_IDENTITY to the matching identity string:\n\nset(CPACK_DMG_SIGNING_IDENTITY \"Developer ID Application: Your Name (TEAMID)\")",
      "success_rate": 0.85,
      "how": "Ensure a valid signing identity is available by running:\n\nsecurity find-identity -v -p basic\n\nThen set CPACK_DMG_SIGNING_IDENTITY to the matching identity string:\n\nset(CPACK_DMG_SIGNING_IDENTITY \"Developer ID Application: Your Name (TEAMID)\")",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "在 CMakeLists.txt 中，在包含 CPack 之前设置 CPACK_DMG_SKIP_CODESIGN 为 TRUE：\n\nset(CPACK_DMG_SKIP_CODESIGN TRUE)\ninclude(CPack)",
    "通过运行以下命令确保存在有效的签名身份：\n\nsecurity find-identity -v -p basic\n\n然后将 CPACK_DMG_SIGNING_IDENTITY 设置为匹配的身份字符串：\n\nset(CPACK_DMG_SIGNING_IDENTITY \"Developer ID Application: Your Name (TEAMID)\")"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://cmake.org/cmake/help/latest/module/CPackDMG.html",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.75,
  "resolvable": "partial",
  "first_seen": "2023-11-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}