{"action":"created","comment":{"url":"https://api.github.com/repos/pyinstaller/pyinstaller/pulls/comments/54336356","id":54336356,"diff_hunk":"@@ -637,12 +637,28 @@ def assemble(self):\n         exe = checkCache(exe, strip=self.strip, upx=self.upx)\n         self.copy(exe, outf)\n         if self.append_pkg:\n-            logger.info(\"Appending archive to EXE %s\", self.name)\n-            self.copy(self.pkg.name, outf)\n+            if is_linux:\n+                outf.close()\n+                logger.info(\"Appending archive to ELF section in EXE %s\", self.name)\n+                retcode, stdout, stderr = exec_command_all(*['objcopy',\n+                                                             '--add-section',\n+                                                             'pydata=%s' % self.pkg.name, \n+                                                             self.name])\n+                logger.debug(\"objcopy:%i\", retcode)\n+                logger.debug(stdout)\n+                logger.debug(stderr)\n+                if retcode != 0:\n+                    raise SystemError(\"objcopy Failure\")\n+            else:\n+                # Fall back to just append on end of file\n+                logger.info(\"Appending archive to EXE %s\", self.name)\n+                self.copy(self.pkg.name, outf)\n+                outf.close()\n         else:\n+            outf.close()\n             logger.info(\"Copying archive to %s\", self.pkgname)\n             shutil.copy(self.pkg.name, self.pkgname)\n-        outf.close()\n+            ","path":"PyInstaller/building/api.py","position":42,"original_position":42,"commit_id":"39f8d2da9b3de8d0e2d11ad7d5b736a760fd4c11","original_commit_id":"39f8d2da9b3de8d0e2d11ad7d5b736a760fd4c11","user":{"login":"htgoebel","id":784161,"avatar_url":"https://avatars.githubusercontent.com/u/784161?v=3","gravatar_id":"","url":"https://api.github.com/users/htgoebel","html_url":"https://github.com/htgoebel","followers_url":"https://api.github.com/users/htgoebel/followers","following_url":"https://api.github.com/users/htgoebel/following{/other_user}","gists_url":"https://api.github.com/users/htgoebel/gists{/gist_id}","starred_url":"https://api.github.com/users/htgoebel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htgoebel/subscriptions","organizations_url":"https://api.github.com/users/htgoebel/orgs","repos_url":"https://api.github.com/users/htgoebel/repos","events_url":"https://api.github.com/users/htgoebel/events{/privacy}","received_events_url":"https://api.github.com/users/htgoebel/received_events","type":"User","site_admin":false},"body":"extraneous white-space?","created_at":"2016-02-27T17:42:32Z","updated_at":"2016-02-27T17:42:32Z","html_url":"https://github.com/pyinstaller/pyinstaller/pull/1831#discussion_r54336356","pull_request_url":"https://api.github.com/repos/pyinstaller/pyinstaller/pulls/1831","_links":{"self":{"href":"https://api.github.com/repos/pyinstaller/pyinstaller/pulls/comments/54336356"},"html":{"href":"https://github.com/pyinstaller/pyinstaller/pull/1831#discussion_r54336356"},"pull_request":{"href":"https://api.github.com/repos/pyinstaller/pyinstaller/pulls/1831"}}},"pull_request":{"url":"https://api.github.com/repos/pyinstaller/pyinstaller/pulls/1831","id":59813108,"html_url":"https://github.com/pyinstaller/pyinstaller/pull/1831","diff_url":"https://github.com/pyinstaller/pyinstaller/pull/1831.diff","patch_url":"https://github.com/pyinstaller/pyinstaller/pull/1831.patch","issue_url":"https://api.github.com/repos/pyinstaller/pyinstaller/issues/1831","number":1831,"state":"open","locked":false,"title":"Use objcopy to create a vaild ELF file","user":{"login":"garthy","id":1085290,"avatar_url":"https://avatars.githubusercontent.com/u/1085290?v=3","gravatar_id":"","url":"https://api.github.com/users/garthy","html_url":"https://github.com/garthy","followers_url":"https://api.github.com/users/garthy/followers","following_url":"https://api.github.com/users/garthy/following{/other_user}","gists_url":"https://api.github.com/users/garthy/gists{/gist_id}","starred_url":"https://api.github.com/users/garthy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garthy/subscriptions","organizations_url":"https://api.github.com/users/garthy/orgs","repos_url":"https://api.github.com/users/garthy/repos","events_url":"https://api.github.com/users/garthy/events{/privacy}","received_events_url":"https://api.github.com/users/garthy/received_events","type":"User","site_admin":false},"body":"Use objcopy to create a valid ELF file. This stops prelink stripping off the archive. \r\n\r\nhttps://github.com/pyinstaller/pyinstaller/issues/1812","created_at":"2016-02-18T15:17:32Z","updated_at":"2016-02-27T17:42:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"95ce9828d24e7d08f5cd073813ffea6916388bcb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/pyinstaller/pyinstaller/pulls/1831/commits","review_comments_url":"https://api.github.com/repos/pyinstaller/pyinstaller/pulls/1831/comments","review_comment_url":"https://api.github.com/repos/pyinstaller/pyinstaller/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pyinstaller/pyinstaller/issues/1831/comments","statuses_url":"https://api.github.com/repos/pyinstaller/pyinstaller/statuses/39f8d2da9b3de8d0e2d11ad7d5b736a760fd4c11","head":{"label":"garthy:valid_elf_file","ref":"valid_elf_file","sha":"39f8d2da9b3de8d0e2d11ad7d5b736a760fd4c11","user":{"login":"garthy","id":1085290,"avatar_url":"https://avatars.githubusercontent.com/u/1085290?v=3","gravatar_id":"","url":"https://api.github.com/users/garthy","html_url":"https://github.com/garthy","followers_url":"https://api.github.com/users/garthy/followers","following_url":"https://api.github.com/users/garthy/following{/other_user}","gists_url":"https://api.github.com/users/garthy/gists{/gist_id}","starred_url":"https://api.github.com/users/garthy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garthy/subscriptions","organizations_url":"https://api.github.com/users/garthy/orgs","repos_url":"https://api.github.com/users/garthy/repos","events_url":"https://api.github.com/users/garthy/events{/privacy}","received_events_url":"https://api.github.com/users/garthy/received_events","type":"User","site_admin":false},"repo":{"id":52011258,"name":"pyinstaller","full_name":"garthy/pyinstaller","owner":{"login":"garthy","id":1085290,"avatar_url":"https://avatars.githubusercontent.com/u/1085290?v=3","gravatar_id":"","url":"https://api.github.com/users/garthy","html_url":"https://github.com/garthy","followers_url":"https://api.github.com/users/garthy/followers","following_url":"https://api.github.com/users/garthy/following{/other_user}","gists_url":"https://api.github.com/users/garthy/gists{/gist_id}","starred_url":"https://api.github.com/users/garthy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garthy/subscriptions","organizations_url":"https://api.github.com/users/garthy/orgs","repos_url":"https://api.github.com/users/garthy/repos","events_url":"https://api.github.com/users/garthy/events{/privacy}","received_events_url":"https://api.github.com/users/garthy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/garthy/pyinstaller","description":"PyInstaller official GIT repository ","fork":true,"url":"https://api.github.com/repos/garthy/pyinstaller","forks_url":"https://api.github.com/repos/garthy/pyinstaller/forks","keys_url":"https://api.github.com/repos/garthy/pyinstaller/keys{/key_id}","collaborators_url":"https://api.github.com/repos/garthy/pyinstaller/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/garthy/pyinstaller/teams","hooks_url":"https://api.github.com/repos/garthy/pyinstaller/hooks","issue_events_url":"https://api.github.com/repos/garthy/pyinstaller/issues/events{/number}","events_url":"https://api.github.com/repos/garthy/pyinstaller/events","assignees_url":"https://api.github.com/repos/garthy/pyinstaller/assignees{/user}","branches_url":"https://api.github.com/repos/garthy/pyinstaller/branches{/branch}","tags_url":"https://api.github.com/repos/garthy/pyinstaller/tags","blobs_url":"https://api.github.com/repos/garthy/pyinstaller/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/garthy/pyinstaller/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/garthy/pyinstaller/git/refs{/sha}","trees_url":"https://api.github.com/repos/garthy/pyinstaller/git/trees{/sha}","statuses_url":"https://api.github.com/repos/garthy/pyinstaller/statuses/{sha}","languages_url":"https://api.github.com/repos/garthy/pyinstaller/languages","stargazers_url":"https://api.github.com/repos/garthy/pyinstaller/stargazers","contributors_url":"https://api.github.com/repos/garthy/pyinstaller/contributors","subscribers_url":"https://api.github.com/repos/garthy/pyinstaller/subscribers","subscription_url":"https://api.github.com/repos/garthy/pyinstaller/subscription","commits_url":"https://api.github.com/repos/garthy/pyinstaller/commits{/sha}","git_commits_url":"https://api.github.com/repos/garthy/pyinstaller/git/commits{/sha}","comments_url":"https://api.github.com/repos/garthy/pyinstaller/comments{/number}","issue_comment_url":"https://api.github.com/repos/garthy/pyinstaller/issues/comments{/number}","contents_url":"https://api.github.com/repos/garthy/pyinstaller/contents/{+path}","compare_url":"https://api.github.com/repos/garthy/pyinstaller/compare/{base}...{head}","merges_url":"https://api.github.com/repos/garthy/pyinstaller/merges","archive_url":"https://api.github.com/repos/garthy/pyinstaller/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/garthy/pyinstaller/downloads","issues_url":"https://api.github.com/repos/garthy/pyinstaller/issues{/number}","pulls_url":"https://api.github.com/repos/garthy/pyinstaller/pulls{/number}","milestones_url":"https://api.github.com/repos/garthy/pyinstaller/milestones{/number}","notifications_url":"https://api.github.com/repos/garthy/pyinstaller/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/garthy/pyinstaller/labels{/name}","releases_url":"https://api.github.com/repos/garthy/pyinstaller/releases{/id}","deployments_url":"https://api.github.com/repos/garthy/pyinstaller/deployments","created_at":"2016-02-18T14:05:42Z","updated_at":"2016-02-18T14:05:44Z","pushed_at":"2016-02-22T15:12:19Z","git_url":"git://github.com/garthy/pyinstaller.git","ssh_url":"git@github.com:garthy/pyinstaller.git","clone_url":"https://github.com/garthy/pyinstaller.git","svn_url":"https://github.com/garthy/pyinstaller","homepage":"http://www.pyinstaller.org","size":32343,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"develop"}},"base":{"label":"pyinstaller:develop","ref":"develop","sha":"e99e4833ffd22d26306581271deefa8eead87db8","user":{"login":"pyinstaller","id":1215332,"avatar_url":"https://avatars.githubusercontent.com/u/1215332?v=3","gravatar_id":"","url":"https://api.github.com/users/pyinstaller","html_url":"https://github.com/pyinstaller","followers_url":"https://api.github.com/users/pyinstaller/followers","following_url":"https://api.github.com/users/pyinstaller/following{/other_user}","gists_url":"https://api.github.com/users/pyinstaller/gists{/gist_id}","starred_url":"https://api.github.com/users/pyinstaller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyinstaller/subscriptions","organizations_url":"https://api.github.com/users/pyinstaller/orgs","repos_url":"https://api.github.com/users/pyinstaller/repos","events_url":"https://api.github.com/users/pyinstaller/events{/privacy}","received_events_url":"https://api.github.com/users/pyinstaller/received_events","type":"Organization","site_admin":false},"repo":{"id":2835111,"name":"pyinstaller","full_name":"pyinstaller/pyinstaller","owner":{"login":"pyinstaller","id":1215332,"avatar_url":"https://avatars.githubusercontent.com/u/1215332?v=3","gravatar_id":"","url":"https://api.github.com/users/pyinstaller","html_url":"https://github.com/pyinstaller","followers_url":"https://api.github.com/users/pyinstaller/followers","following_url":"https://api.github.com/users/pyinstaller/following{/other_user}","gists_url":"https://api.github.com/users/pyinstaller/gists{/gist_id}","starred_url":"https://api.github.com/users/pyinstaller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyinstaller/subscriptions","organizations_url":"https://api.github.com/users/pyinstaller/orgs","repos_url":"https://api.github.com/users/pyinstaller/repos","events_url":"https://api.github.com/users/pyinstaller/events{/privacy}","received_events_url":"https://api.github.com/users/pyinstaller/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pyinstaller/pyinstaller","description":"PyInstaller official GIT repository ","fork":false,"url":"https://api.github.com/repos/pyinstaller/pyinstaller","forks_url":"https://api.github.com/repos/pyinstaller/pyinstaller/forks","keys_url":"https://api.github.com/repos/pyinstaller/pyinstaller/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pyinstaller/pyinstaller/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pyinstaller/pyinstaller/teams","hooks_url":"https://api.github.com/repos/pyinstaller/pyinstaller/hooks","issue_events_url":"https://api.github.com/repos/pyinstaller/pyinstaller/issues/events{/number}","events_url":"https://api.github.com/repos/pyinstaller/pyinstaller/events","assignees_url":"https://api.github.com/repos/pyinstaller/pyinstaller/assignees{/user}","branches_url":"https://api.github.com/repos/pyinstaller/pyinstaller/branches{/branch}","tags_url":"https://api.github.com/repos/pyinstaller/pyinstaller/tags","blobs_url":"https://api.github.com/repos/pyinstaller/pyinstaller/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pyinstaller/pyinstaller/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pyinstaller/pyinstaller/git/refs{/sha}","trees_url":"https://api.github.com/repos/pyinstaller/pyinstaller/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pyinstaller/pyinstaller/statuses/{sha}","languages_url":"https://api.github.com/repos/pyinstaller/pyinstaller/languages","stargazers_url":"https://api.github.com/repos/pyinstaller/pyinstaller/stargazers","contributors_url":"https://api.github.com/repos/pyinstaller/pyinstaller/contributors","subscribers_url":"https://api.github.com/repos/pyinstaller/pyinstaller/subscribers","subscription_url":"https://api.github.com/repos/pyinstaller/pyinstaller/subscription","commits_url":"https://api.github.com/repos/pyinstaller/pyinstaller/commits{/sha}","git_commits_url":"https://api.github.com/repos/pyinstaller/pyinstaller/git/commits{/sha}","comments_url":"https://api.github.com/repos/pyinstaller/pyinstaller/comments{/number}","issue_comment_url":"https://api.github.com/repos/pyinstaller/pyinstaller/issues/comments{/number}","contents_url":"https://api.github.com/repos/pyinstaller/pyinstaller/contents/{+path}","compare_url":"https://api.github.com/repos/pyinstaller/pyinstaller/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pyinstaller/pyinstaller/merges","archive_url":"https://api.github.com/repos/pyinstaller/pyinstaller/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pyinstaller/pyinstaller/downloads","issues_url":"https://api.github.com/repos/pyinstaller/pyinstaller/issues{/number}","pulls_url":"https://api.github.com/repos/pyinstaller/pyinstaller/pulls{/number}","milestones_url":"https://api.github.com/repos/pyinstaller/pyinstaller/milestones{/number}","notifications_url":"https://api.github.com/repos/pyinstaller/pyinstaller/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pyinstaller/pyinstaller/labels{/name}","releases_url":"https://api.github.com/repos/pyinstaller/pyinstaller/releases{/id}","deployments_url":"https://api.github.com/repos/pyinstaller/pyinstaller/deployments","created_at":"2011-11-23T11:05:56Z","updated_at":"2016-02-27T13:31:50Z","pushed_at":"2016-02-27T16:56:18Z","git_url":"git://github.com/pyinstaller/pyinstaller.git","ssh_url":"git@github.com:pyinstaller/pyinstaller.git","clone_url":"https://github.com/pyinstaller/pyinstaller.git","svn_url":"https://github.com/pyinstaller/pyinstaller","homepage":"http://www.pyinstaller.org","size":39730,"stargazers_count":1574,"watchers_count":1574,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":397,"mirror_url":null,"open_issues_count":171,"forks":397,"open_issues":171,"watchers":1574,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/pyinstaller/pyinstaller/pulls/1831"},"html":{"href":"https://github.com/pyinstaller/pyinstaller/pull/1831"},"issue":{"href":"https://api.github.com/repos/pyinstaller/pyinstaller/issues/1831"},"comments":{"href":"https://api.github.com/repos/pyinstaller/pyinstaller/issues/1831/comments"},"review_comments":{"href":"https://api.github.com/repos/pyinstaller/pyinstaller/pulls/1831/comments"},"review_comment":{"href":"https://api.github.com/repos/pyinstaller/pyinstaller/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pyinstaller/pyinstaller/pulls/1831/commits"},"statuses":{"href":"https://api.github.com/repos/pyinstaller/pyinstaller/statuses/39f8d2da9b3de8d0e2d11ad7d5b736a760fd4c11"}}}}