)]}'
{
  "commit": "6ef931b950d5b9477dba0e278b7006ae327e12f7",
  "tree": "1a727d7e2145dd5e12b51eb379c431e9c0594271",
  "parents": [
    "4f937afbd2d5090d68319daaf330d7cc3d6960a4"
  ],
  "author": {
    "name": "Chris Bracken",
    "email": "chris@bracken.jp",
    "time": "Tue Aug 06 22:15:51 2024 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Tue Aug 06 22:15:51 2024 -0700"
  },
  "message": "[macOS] Fix COPY step on macOS 15 Sequoia (#884)\n\nmacOS build fails on Sequoia beta 2 and later (verified in public beta 3\r\nas well) hosts during COPY step when copying files with the `restricted`\r\nextended attribute set.\r\n\r\nThe problem appears to be due to the `-a` (archive) option, which is an\r\nalias for `-RpP`. Of these, the `-p` option appears to be the source of\r\nthe problem. This flag attempts to preserve file metadata including\r\nAccess Control Lists and Extended Attributes. However, the `restricted`\r\nextended attribute is not settable when System Integrity Protection\r\n(SIP) is enabled, which it is by default.\r\n\r\nThis appears to be a change in the implementation of `cp` in macOS 15\r\nSequoia beta 2 and later. Previous versions would fail to copy the\r\nattribute, but continue without failing. The current version appears to\r\nfail if it cannot set any extended attribute.\r\n\r\nTwo alternatives to the previous `cp -af` step:\r\n* Use `cp -Rf`. This succeeds but file metadata such as\r\n  creation time, modification time, etc. are not preserved.\r\n* Use `rsync -a`. rsync\u0027s -a flag also copies metadata but on a\r\n  best-efforts basis and doesn\u0027t error out when it fails to set the\r\n  restricted attribute.\r\n\r\nOf the two, the latter more closely approximates the previous behaviour.\r\n\r\nThe `rm -rf` step can be replaced with `rsync`\u0027s `--delete` option; with\r\nthe default `--delete-before` behaviour, this replicates the function of\r\nthe `rm -rf`.\r\n\r\nFixes: https://github.com/flutter/flutter/issues/152978\r\n\r\n## Pre-launch Checklist\r\n\r\n- [X] I read the [Contributor Guide] and followed the process outlined\r\nthere for submitting PRs.\r\n- [X] I read the [Tree Hygiene] wiki page, which explains my\r\nresponsibilities.\r\n- [X] I read the [Flutter Style Guide] _recently_, and have followed its\r\nadvice.\r\n- [X] I signed the [CLA].\r\n- [X] I listed at least one issue that this PR fixes in the description\r\nabove.\r\n- [X] I updated/added relevant documentation (doc comments with `///`).\r\n- [X] I added new tests to check the change I am making, or this PR is\r\n[test-exempt].\r\n- [X] All existing and new tests are passing.\r\n\r\nIf you need help, consider asking for advice on the #hackers-new channel\r\non [Discord].\r\n\r\n\u003c!-- Links --\u003e\r\n[Contributor Guide]:\r\nhttps://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#overview\r\n[Tree Hygiene]:\r\nhttps://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md\r\n[test-exempt]:\r\nhttps://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#tests\r\n[Flutter Style Guide]:\r\nhttps://github.com/flutter/flutter/blob/master/docs/contributing/Style-guide-for-Flutter-repo.md\r\n[CLA]: https://cla.developers.google.com/\r\n[flutter/tests]: https://github.com/flutter/tests\r\n[breaking change policy]:\r\nhttps://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#handling-breaking-changes\r\n[Discord]:\r\nhttps://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "7e9db051b5aa0a953450e6b3cca7ac8185c38602",
      "old_mode": 33188,
      "old_path": "build/toolchain/mac/BUILD.gn",
      "new_id": "b1f21b080dc256698edb0aa2900f6ae4156e86b8",
      "new_mode": 33188,
      "new_path": "build/toolchain/mac/BUILD.gn"
    }
  ]
}
