{"action":"opened","number":190,"pull_request":{"url":"https://api.github.com/repos/osxfuse/osxfuse/pulls/190","id":27729850,"html_url":"https://github.com/osxfuse/osxfuse/pull/190","diff_url":"https://github.com/osxfuse/osxfuse/pull/190.diff","patch_url":"https://github.com/osxfuse/osxfuse/pull/190.patch","issue_url":"https://api.github.com/repos/osxfuse/osxfuse/issues/190","number":190,"state":"open","locked":false,"title":"Improvements to disk image creation","user":{"login":"fhgwright","id":9580772,"avatar_url":"https://avatars.githubusercontent.com/u/9580772?v=3","gravatar_id":"","url":"https://api.github.com/users/fhgwright","html_url":"https://github.com/fhgwright","followers_url":"https://api.github.com/users/fhgwright/followers","following_url":"https://api.github.com/users/fhgwright/following{/other_user}","gists_url":"https://api.github.com/users/fhgwright/gists{/gist_id}","starred_url":"https://api.github.com/users/fhgwright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fhgwright/subscriptions","organizations_url":"https://api.github.com/users/fhgwright/orgs","repos_url":"https://api.github.com/users/fhgwright/repos","events_url":"https://api.github.com/users/fhgwright/events{/privacy}","received_events_url":"https://api.github.com/users/fhgwright/received_events","type":"User","site_admin":false},"body":"The current build system sets up the default window parameters by running Finder via AppleScript.  Aside from the annoying (and initially puzzling) flashes during the build, this has a number of disadvantages:\r\n\r\n1) It means that the otherwise purely command-line-oriented build procedure may not work over an SSH connection. I say *may* not work because AppleScript is perfectly willing to go outside the process tree to find an instance of Finder running under the current user ID, which seems like rather inappropriate default behavior, but that's another story.\r\n\r\n2) It appears to incorporate uninitialized memory into the resulting .DS_Store file, leaking some information about the build machine in the process.  This also makes the contents of the file nonreproducible.\r\n\r\n3) Since that mechanism is designed primarily for use with interactive users, it doesn't have a well-defined way to be certain that the state is correct on disk (as evidenced by the delays that have been added to that code in the master branch).\r\n\r\nSince all the settings are contained in the .DS_Store file, and since the window parameters are rarely changed, a way to *mostly* avoid the need to run Finder in the build is to capture a copy of a .DS_Store file with the proper setup, and then simply copy it into the disk image in normal builds.  This also means that issue # 2 can be ameliorated by using a \"near virgin\" Finder to create the file.\r\n\r\nThis approach doesn't eliminate the uncertainty as to when the .DS_Store file can be trusted to be up to date.  Currently, it adds a 5-second delay to the end of the Finder commands, and then waits until after the syncs to grab the copy.  A slightly safer approach might be to remount the final image and grab it from there, but that would be more complicated.  Fortunately, once a copy has been determined to be OK, all subsequent builds using it will be OK as well, which is a good deal more deterministic than the present approach.\r\n\r\nThis pull request includes three commits (which I've tested here):\r\n\r\n1) Adding code to implement the above.  Note that most of the diff is just an indentation change.  It includes setting up the binary attribute for the xDS_Store file, but not the file itself.\r\n\r\n2) Adding code to remove the superfluous .Trashes directory.\r\n\r\n3) Adding an xDS_Store file based on the current settings (and created in a \"sanitized\" environment).\r\n","created_at":"2015-01-21T02:02:01Z","updated_at":"2015-01-21T02:02:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/osxfuse/osxfuse/pulls/190/commits","review_comments_url":"https://api.github.com/repos/osxfuse/osxfuse/pulls/190/comments","review_comment_url":"https://api.github.com/repos/osxfuse/osxfuse/pulls/comments/{number}","comments_url":"https://api.github.com/repos/osxfuse/osxfuse/issues/190/comments","statuses_url":"https://api.github.com/repos/osxfuse/osxfuse/statuses/7404d43d7e8e8a6a55b0a37d5203026caaf7fa07","head":{"label":"fhgwright:osxfuse-2","ref":"osxfuse-2","sha":"7404d43d7e8e8a6a55b0a37d5203026caaf7fa07","user":{"login":"fhgwright","id":9580772,"avatar_url":"https://avatars.githubusercontent.com/u/9580772?v=3","gravatar_id":"","url":"https://api.github.com/users/fhgwright","html_url":"https://github.com/fhgwright","followers_url":"https://api.github.com/users/fhgwright/followers","following_url":"https://api.github.com/users/fhgwright/following{/other_user}","gists_url":"https://api.github.com/users/fhgwright/gists{/gist_id}","starred_url":"https://api.github.com/users/fhgwright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fhgwright/subscriptions","organizations_url":"https://api.github.com/users/fhgwright/orgs","repos_url":"https://api.github.com/users/fhgwright/repos","events_url":"https://api.github.com/users/fhgwright/events{/privacy}","received_events_url":"https://api.github.com/users/fhgwright/received_events","type":"User","site_admin":false},"repo":{"id":26615958,"name":"osxfuse","full_name":"fhgwright/osxfuse","owner":{"login":"fhgwright","id":9580772,"avatar_url":"https://avatars.githubusercontent.com/u/9580772?v=3","gravatar_id":"","url":"https://api.github.com/users/fhgwright","html_url":"https://github.com/fhgwright","followers_url":"https://api.github.com/users/fhgwright/followers","following_url":"https://api.github.com/users/fhgwright/following{/other_user}","gists_url":"https://api.github.com/users/fhgwright/gists{/gist_id}","starred_url":"https://api.github.com/users/fhgwright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fhgwright/subscriptions","organizations_url":"https://api.github.com/users/fhgwright/orgs","repos_url":"https://api.github.com/users/fhgwright/repos","events_url":"https://api.github.com/users/fhgwright/events{/privacy}","received_events_url":"https://api.github.com/users/fhgwright/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fhgwright/osxfuse","description":"FUSE for OS X allows you to extend OS X via third party file systems.","fork":true,"url":"https://api.github.com/repos/fhgwright/osxfuse","forks_url":"https://api.github.com/repos/fhgwright/osxfuse/forks","keys_url":"https://api.github.com/repos/fhgwright/osxfuse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fhgwright/osxfuse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fhgwright/osxfuse/teams","hooks_url":"https://api.github.com/repos/fhgwright/osxfuse/hooks","issue_events_url":"https://api.github.com/repos/fhgwright/osxfuse/issues/events{/number}","events_url":"https://api.github.com/repos/fhgwright/osxfuse/events","assignees_url":"https://api.github.com/repos/fhgwright/osxfuse/assignees{/user}","branches_url":"https://api.github.com/repos/fhgwright/osxfuse/branches{/branch}","tags_url":"https://api.github.com/repos/fhgwright/osxfuse/tags","blobs_url":"https://api.github.com/repos/fhgwright/osxfuse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fhgwright/osxfuse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fhgwright/osxfuse/git/refs{/sha}","trees_url":"https://api.github.com/repos/fhgwright/osxfuse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fhgwright/osxfuse/statuses/{sha}","languages_url":"https://api.github.com/repos/fhgwright/osxfuse/languages","stargazers_url":"https://api.github.com/repos/fhgwright/osxfuse/stargazers","contributors_url":"https://api.github.com/repos/fhgwright/osxfuse/contributors","subscribers_url":"https://api.github.com/repos/fhgwright/osxfuse/subscribers","subscription_url":"https://api.github.com/repos/fhgwright/osxfuse/subscription","commits_url":"https://api.github.com/repos/fhgwright/osxfuse/commits{/sha}","git_commits_url":"https://api.github.com/repos/fhgwright/osxfuse/git/commits{/sha}","comments_url":"https://api.github.com/repos/fhgwright/osxfuse/comments{/number}","issue_comment_url":"https://api.github.com/repos/fhgwright/osxfuse/issues/comments/{number}","contents_url":"https://api.github.com/repos/fhgwright/osxfuse/contents/{+path}","compare_url":"https://api.github.com/repos/fhgwright/osxfuse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fhgwright/osxfuse/merges","archive_url":"https://api.github.com/repos/fhgwright/osxfuse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fhgwright/osxfuse/downloads","issues_url":"https://api.github.com/repos/fhgwright/osxfuse/issues{/number}","pulls_url":"https://api.github.com/repos/fhgwright/osxfuse/pulls{/number}","milestones_url":"https://api.github.com/repos/fhgwright/osxfuse/milestones{/number}","notifications_url":"https://api.github.com/repos/fhgwright/osxfuse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fhgwright/osxfuse/labels{/name}","releases_url":"https://api.github.com/repos/fhgwright/osxfuse/releases{/id}","created_at":"2014-11-14T01:14:11Z","updated_at":"2015-01-21T01:00:10Z","pushed_at":"2015-01-21T01:09:57Z","git_url":"git://github.com/fhgwright/osxfuse.git","ssh_url":"git@github.com:fhgwright/osxfuse.git","clone_url":"https://github.com/fhgwright/osxfuse.git","svn_url":"https://github.com/fhgwright/osxfuse","homepage":"http://osxfuse.github.io/","size":1396,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"osxfuse-2"}},"base":{"label":"osxfuse:osxfuse-2","ref":"osxfuse-2","sha":"76b3a54f401cf611ad0602c5659d421ca7250157","user":{"login":"osxfuse","id":838036,"avatar_url":"https://avatars.githubusercontent.com/u/838036?v=3","gravatar_id":"","url":"https://api.github.com/users/osxfuse","html_url":"https://github.com/osxfuse","followers_url":"https://api.github.com/users/osxfuse/followers","following_url":"https://api.github.com/users/osxfuse/following{/other_user}","gists_url":"https://api.github.com/users/osxfuse/gists{/gist_id}","starred_url":"https://api.github.com/users/osxfuse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osxfuse/subscriptions","organizations_url":"https://api.github.com/users/osxfuse/orgs","repos_url":"https://api.github.com/users/osxfuse/repos","events_url":"https://api.github.com/users/osxfuse/events{/privacy}","received_events_url":"https://api.github.com/users/osxfuse/received_events","type":"Organization","site_admin":false},"repo":{"id":1867347,"name":"osxfuse","full_name":"osxfuse/osxfuse","owner":{"login":"osxfuse","id":838036,"avatar_url":"https://avatars.githubusercontent.com/u/838036?v=3","gravatar_id":"","url":"https://api.github.com/users/osxfuse","html_url":"https://github.com/osxfuse","followers_url":"https://api.github.com/users/osxfuse/followers","following_url":"https://api.github.com/users/osxfuse/following{/other_user}","gists_url":"https://api.github.com/users/osxfuse/gists{/gist_id}","starred_url":"https://api.github.com/users/osxfuse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osxfuse/subscriptions","organizations_url":"https://api.github.com/users/osxfuse/orgs","repos_url":"https://api.github.com/users/osxfuse/repos","events_url":"https://api.github.com/users/osxfuse/events{/privacy}","received_events_url":"https://api.github.com/users/osxfuse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/osxfuse/osxfuse","description":"FUSE for OS X extends OS X by adding support for FUSE file systems","fork":false,"url":"https://api.github.com/repos/osxfuse/osxfuse","forks_url":"https://api.github.com/repos/osxfuse/osxfuse/forks","keys_url":"https://api.github.com/repos/osxfuse/osxfuse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/osxfuse/osxfuse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/osxfuse/osxfuse/teams","hooks_url":"https://api.github.com/repos/osxfuse/osxfuse/hooks","issue_events_url":"https://api.github.com/repos/osxfuse/osxfuse/issues/events{/number}","events_url":"https://api.github.com/repos/osxfuse/osxfuse/events","assignees_url":"https://api.github.com/repos/osxfuse/osxfuse/assignees{/user}","branches_url":"https://api.github.com/repos/osxfuse/osxfuse/branches{/branch}","tags_url":"https://api.github.com/repos/osxfuse/osxfuse/tags","blobs_url":"https://api.github.com/repos/osxfuse/osxfuse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/osxfuse/osxfuse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/osxfuse/osxfuse/git/refs{/sha}","trees_url":"https://api.github.com/repos/osxfuse/osxfuse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/osxfuse/osxfuse/statuses/{sha}","languages_url":"https://api.github.com/repos/osxfuse/osxfuse/languages","stargazers_url":"https://api.github.com/repos/osxfuse/osxfuse/stargazers","contributors_url":"https://api.github.com/repos/osxfuse/osxfuse/contributors","subscribers_url":"https://api.github.com/repos/osxfuse/osxfuse/subscribers","subscription_url":"https://api.github.com/repos/osxfuse/osxfuse/subscription","commits_url":"https://api.github.com/repos/osxfuse/osxfuse/commits{/sha}","git_commits_url":"https://api.github.com/repos/osxfuse/osxfuse/git/commits{/sha}","comments_url":"https://api.github.com/repos/osxfuse/osxfuse/comments{/number}","issue_comment_url":"https://api.github.com/repos/osxfuse/osxfuse/issues/comments/{number}","contents_url":"https://api.github.com/repos/osxfuse/osxfuse/contents/{+path}","compare_url":"https://api.github.com/repos/osxfuse/osxfuse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/osxfuse/osxfuse/merges","archive_url":"https://api.github.com/repos/osxfuse/osxfuse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/osxfuse/osxfuse/downloads","issues_url":"https://api.github.com/repos/osxfuse/osxfuse/issues{/number}","pulls_url":"https://api.github.com/repos/osxfuse/osxfuse/pulls{/number}","milestones_url":"https://api.github.com/repos/osxfuse/osxfuse/milestones{/number}","notifications_url":"https://api.github.com/repos/osxfuse/osxfuse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/osxfuse/osxfuse/labels{/name}","releases_url":"https://api.github.com/repos/osxfuse/osxfuse/releases{/id}","created_at":"2011-06-08T19:59:24Z","updated_at":"2015-01-20T07:23:43Z","pushed_at":"2015-01-11T22:21:33Z","git_url":"git://github.com/osxfuse/osxfuse.git","ssh_url":"git@github.com:osxfuse/osxfuse.git","clone_url":"https://github.com/osxfuse/osxfuse.git","svn_url":"https://github.com/osxfuse/osxfuse","homepage":"http://osxfuse.github.io/","size":2582,"stargazers_count":1446,"watchers_count":1446,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":67,"mirror_url":null,"open_issues_count":45,"forks":67,"open_issues":45,"watchers":1446,"default_branch":"osxfuse-2"}},"_links":{"self":{"href":"https://api.github.com/repos/osxfuse/osxfuse/pulls/190"},"html":{"href":"https://github.com/osxfuse/osxfuse/pull/190"},"issue":{"href":"https://api.github.com/repos/osxfuse/osxfuse/issues/190"},"comments":{"href":"https://api.github.com/repos/osxfuse/osxfuse/issues/190/comments"},"review_comments":{"href":"https://api.github.com/repos/osxfuse/osxfuse/pulls/190/comments"},"review_comment":{"href":"https://api.github.com/repos/osxfuse/osxfuse/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/osxfuse/osxfuse/pulls/190/commits"},"statuses":{"href":"https://api.github.com/repos/osxfuse/osxfuse/statuses/7404d43d7e8e8a6a55b0a37d5203026caaf7fa07"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":3,"additions":34,"deletions":20,"changed_files":3}}