{"action":"closed","number":965,"pull_request":{"url":"https://api.github.com/repos/freedomofpress/securedrop/pulls/965","id":32301639,"html_url":"https://github.com/freedomofpress/securedrop/pull/965","diff_url":"https://github.com/freedomofpress/securedrop/pull/965.diff","patch_url":"https://github.com/freedomofpress/securedrop/pull/965.patch","issue_url":"https://api.github.com/repos/freedomofpress/securedrop/issues/965","number":965,"state":"closed","locked":false,"title":"Mark GRUB as manually installed (fixes #945)","user":{"login":"ageis","id":1161532,"avatar_url":"https://avatars.githubusercontent.com/u/1161532?v=3","gravatar_id":"","url":"https://api.github.com/users/ageis","html_url":"https://github.com/ageis","followers_url":"https://api.github.com/users/ageis/followers","following_url":"https://api.github.com/users/ageis/following{/other_user}","gists_url":"https://api.github.com/users/ageis/gists{/gist_id}","starred_url":"https://api.github.com/users/ageis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ageis/subscriptions","organizations_url":"https://api.github.com/users/ageis/orgs","repos_url":"https://api.github.com/users/ageis/repos","events_url":"https://api.github.com/users/ageis/events{/privacy}","received_events_url":"https://api.github.com/users/ageis/received_events","type":"User","site_admin":false},"body":"This is intended to fix and address #945. Ultimately I came up with two equally viable solutions and decided to go with the simpler one, but I'll describe them here.\r\n\r\n@dolanjs had suggested simply setting the `grub-pc` package to be installed. This makes sense at first, however if you put that before the autoremove task then it has no effect - grub-pc is already installed, and so it's still marked as automatically installed and Ansible doesn't set it as manually installed which is what we really need. It still gets removed - so then you would have to think about removing GRUB first and then re-installing it afterward, which doesn't really make sense.\r\n\r\nSo here's another idea. We could create a file named `99grub` in `/etc/apt/apt.conf.d` with the following contents:\r\n```\r\nAPT\r\n{\r\n  NeverAutoRemove\r\n  {\r\n  \"^grub.*\";\r\n  };\r\n\r\n};\r\n```\r\nThis has the expected effect that any GRUB packages are never auto-removed. You don't even have to `update_cache=true`, just install that config any time before you run autoremove and it just works. However, although we already have a number of custom config files in our playbooks, this is ultimately more complexity, and one extra file, than we really need.\r\n\r\nSo the simplest thing to do is to use `apt-mark` to mark grub-pc as manually installed, which will \"prevent the package from being automatically removed if no other packages depend on it.\" This is what I did in the commit and it works very well.","created_at":"2015-03-31T08:45:05Z","updated_at":"2015-04-01T18:11:24Z","closed_at":"2015-04-01T18:11:24Z","merged_at":"2015-04-01T18:11:24Z","merge_commit_sha":"2bb7b85fa244a13970a6aad17aac888a9dd53bf0","assignee":null,"milestone":{"url":"https://api.github.com/repos/freedomofpress/securedrop/milestones/8","html_url":"https://github.com/freedomofpress/securedrop/milestones/0.3.2","labels_url":"https://api.github.com/repos/freedomofpress/securedrop/milestones/8/labels","id":1038845,"number":8,"title":"0.3.2","description":"","creator":{"login":"garrettr","id":407302,"avatar_url":"https://avatars.githubusercontent.com/u/407302?v=3","gravatar_id":"","url":"https://api.github.com/users/garrettr","html_url":"https://github.com/garrettr","followers_url":"https://api.github.com/users/garrettr/followers","following_url":"https://api.github.com/users/garrettr/following{/other_user}","gists_url":"https://api.github.com/users/garrettr/gists{/gist_id}","starred_url":"https://api.github.com/users/garrettr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garrettr/subscriptions","organizations_url":"https://api.github.com/users/garrettr/orgs","repos_url":"https://api.github.com/users/garrettr/repos","events_url":"https://api.github.com/users/garrettr/events{/privacy}","received_events_url":"https://api.github.com/users/garrettr/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":6,"state":"open","created_at":"2015-03-25T17:39:44Z","updated_at":"2015-04-01T18:11:24Z","due_on":"2015-04-06T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/freedomofpress/securedrop/pulls/965/commits","review_comments_url":"https://api.github.com/repos/freedomofpress/securedrop/pulls/965/comments","review_comment_url":"https://api.github.com/repos/freedomofpress/securedrop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/freedomofpress/securedrop/issues/965/comments","statuses_url":"https://api.github.com/repos/freedomofpress/securedrop/statuses/89b1e3f9c209b3614e038aff8dd4afd19ad6bc50","head":{"label":"ageis:grub-fix","ref":"grub-fix","sha":"89b1e3f9c209b3614e038aff8dd4afd19ad6bc50","user":{"login":"ageis","id":1161532,"avatar_url":"https://avatars.githubusercontent.com/u/1161532?v=3","gravatar_id":"","url":"https://api.github.com/users/ageis","html_url":"https://github.com/ageis","followers_url":"https://api.github.com/users/ageis/followers","following_url":"https://api.github.com/users/ageis/following{/other_user}","gists_url":"https://api.github.com/users/ageis/gists{/gist_id}","starred_url":"https://api.github.com/users/ageis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ageis/subscriptions","organizations_url":"https://api.github.com/users/ageis/orgs","repos_url":"https://api.github.com/users/ageis/repos","events_url":"https://api.github.com/users/ageis/events{/privacy}","received_events_url":"https://api.github.com/users/ageis/received_events","type":"User","site_admin":false},"repo":{"id":32413457,"name":"securedrop","full_name":"ageis/securedrop","owner":{"login":"ageis","id":1161532,"avatar_url":"https://avatars.githubusercontent.com/u/1161532?v=3","gravatar_id":"","url":"https://api.github.com/users/ageis","html_url":"https://github.com/ageis","followers_url":"https://api.github.com/users/ageis/followers","following_url":"https://api.github.com/users/ageis/following{/other_user}","gists_url":"https://api.github.com/users/ageis/gists{/gist_id}","starred_url":"https://api.github.com/users/ageis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ageis/subscriptions","organizations_url":"https://api.github.com/users/ageis/orgs","repos_url":"https://api.github.com/users/ageis/repos","events_url":"https://api.github.com/users/ageis/events{/privacy}","received_events_url":"https://api.github.com/users/ageis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ageis/securedrop","description":"GitHub repository for the SecureDrop whistleblower platform. Do not submit tips here!","fork":true,"url":"https://api.github.com/repos/ageis/securedrop","forks_url":"https://api.github.com/repos/ageis/securedrop/forks","keys_url":"https://api.github.com/repos/ageis/securedrop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ageis/securedrop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ageis/securedrop/teams","hooks_url":"https://api.github.com/repos/ageis/securedrop/hooks","issue_events_url":"https://api.github.com/repos/ageis/securedrop/issues/events{/number}","events_url":"https://api.github.com/repos/ageis/securedrop/events","assignees_url":"https://api.github.com/repos/ageis/securedrop/assignees{/user}","branches_url":"https://api.github.com/repos/ageis/securedrop/branches{/branch}","tags_url":"https://api.github.com/repos/ageis/securedrop/tags","blobs_url":"https://api.github.com/repos/ageis/securedrop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ageis/securedrop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ageis/securedrop/git/refs{/sha}","trees_url":"https://api.github.com/repos/ageis/securedrop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ageis/securedrop/statuses/{sha}","languages_url":"https://api.github.com/repos/ageis/securedrop/languages","stargazers_url":"https://api.github.com/repos/ageis/securedrop/stargazers","contributors_url":"https://api.github.com/repos/ageis/securedrop/contributors","subscribers_url":"https://api.github.com/repos/ageis/securedrop/subscribers","subscription_url":"https://api.github.com/repos/ageis/securedrop/subscription","commits_url":"https://api.github.com/repos/ageis/securedrop/commits{/sha}","git_commits_url":"https://api.github.com/repos/ageis/securedrop/git/commits{/sha}","comments_url":"https://api.github.com/repos/ageis/securedrop/comments{/number}","issue_comment_url":"https://api.github.com/repos/ageis/securedrop/issues/comments{/number}","contents_url":"https://api.github.com/repos/ageis/securedrop/contents/{+path}","compare_url":"https://api.github.com/repos/ageis/securedrop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ageis/securedrop/merges","archive_url":"https://api.github.com/repos/ageis/securedrop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ageis/securedrop/downloads","issues_url":"https://api.github.com/repos/ageis/securedrop/issues{/number}","pulls_url":"https://api.github.com/repos/ageis/securedrop/pulls{/number}","milestones_url":"https://api.github.com/repos/ageis/securedrop/milestones{/number}","notifications_url":"https://api.github.com/repos/ageis/securedrop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ageis/securedrop/labels{/name}","releases_url":"https://api.github.com/repos/ageis/securedrop/releases{/id}","created_at":"2015-03-17T18:51:07Z","updated_at":"2015-03-21T00:23:07Z","pushed_at":"2015-03-31T08:28:33Z","git_url":"git://github.com/ageis/securedrop.git","ssh_url":"git@github.com:ageis/securedrop.git","clone_url":"https://github.com/ageis/securedrop.git","svn_url":"https://github.com/ageis/securedrop","homepage":"https://freedom.press/securedrop","size":32780,"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":"freedomofpress:develop","ref":"develop","sha":"6e5ad8b1144b55ba4859491a72def88145f3648e","user":{"login":"freedomofpress","id":5388147,"avatar_url":"https://avatars.githubusercontent.com/u/5388147?v=3","gravatar_id":"","url":"https://api.github.com/users/freedomofpress","html_url":"https://github.com/freedomofpress","followers_url":"https://api.github.com/users/freedomofpress/followers","following_url":"https://api.github.com/users/freedomofpress/following{/other_user}","gists_url":"https://api.github.com/users/freedomofpress/gists{/gist_id}","starred_url":"https://api.github.com/users/freedomofpress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freedomofpress/subscriptions","organizations_url":"https://api.github.com/users/freedomofpress/orgs","repos_url":"https://api.github.com/users/freedomofpress/repos","events_url":"https://api.github.com/users/freedomofpress/events{/privacy}","received_events_url":"https://api.github.com/users/freedomofpress/received_events","type":"Organization","site_admin":false},"repo":{"id":3156820,"name":"securedrop","full_name":"freedomofpress/securedrop","owner":{"login":"freedomofpress","id":5388147,"avatar_url":"https://avatars.githubusercontent.com/u/5388147?v=3","gravatar_id":"","url":"https://api.github.com/users/freedomofpress","html_url":"https://github.com/freedomofpress","followers_url":"https://api.github.com/users/freedomofpress/followers","following_url":"https://api.github.com/users/freedomofpress/following{/other_user}","gists_url":"https://api.github.com/users/freedomofpress/gists{/gist_id}","starred_url":"https://api.github.com/users/freedomofpress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freedomofpress/subscriptions","organizations_url":"https://api.github.com/users/freedomofpress/orgs","repos_url":"https://api.github.com/users/freedomofpress/repos","events_url":"https://api.github.com/users/freedomofpress/events{/privacy}","received_events_url":"https://api.github.com/users/freedomofpress/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/freedomofpress/securedrop","description":"GitHub repository for the SecureDrop whistleblower platform. Do not submit tips here!","fork":false,"url":"https://api.github.com/repos/freedomofpress/securedrop","forks_url":"https://api.github.com/repos/freedomofpress/securedrop/forks","keys_url":"https://api.github.com/repos/freedomofpress/securedrop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/freedomofpress/securedrop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/freedomofpress/securedrop/teams","hooks_url":"https://api.github.com/repos/freedomofpress/securedrop/hooks","issue_events_url":"https://api.github.com/repos/freedomofpress/securedrop/issues/events{/number}","events_url":"https://api.github.com/repos/freedomofpress/securedrop/events","assignees_url":"https://api.github.com/repos/freedomofpress/securedrop/assignees{/user}","branches_url":"https://api.github.com/repos/freedomofpress/securedrop/branches{/branch}","tags_url":"https://api.github.com/repos/freedomofpress/securedrop/tags","blobs_url":"https://api.github.com/repos/freedomofpress/securedrop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/freedomofpress/securedrop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/freedomofpress/securedrop/git/refs{/sha}","trees_url":"https://api.github.com/repos/freedomofpress/securedrop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/freedomofpress/securedrop/statuses/{sha}","languages_url":"https://api.github.com/repos/freedomofpress/securedrop/languages","stargazers_url":"https://api.github.com/repos/freedomofpress/securedrop/stargazers","contributors_url":"https://api.github.com/repos/freedomofpress/securedrop/contributors","subscribers_url":"https://api.github.com/repos/freedomofpress/securedrop/subscribers","subscription_url":"https://api.github.com/repos/freedomofpress/securedrop/subscription","commits_url":"https://api.github.com/repos/freedomofpress/securedrop/commits{/sha}","git_commits_url":"https://api.github.com/repos/freedomofpress/securedrop/git/commits{/sha}","comments_url":"https://api.github.com/repos/freedomofpress/securedrop/comments{/number}","issue_comment_url":"https://api.github.com/repos/freedomofpress/securedrop/issues/comments{/number}","contents_url":"https://api.github.com/repos/freedomofpress/securedrop/contents/{+path}","compare_url":"https://api.github.com/repos/freedomofpress/securedrop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/freedomofpress/securedrop/merges","archive_url":"https://api.github.com/repos/freedomofpress/securedrop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/freedomofpress/securedrop/downloads","issues_url":"https://api.github.com/repos/freedomofpress/securedrop/issues{/number}","pulls_url":"https://api.github.com/repos/freedomofpress/securedrop/pulls{/number}","milestones_url":"https://api.github.com/repos/freedomofpress/securedrop/milestones{/number}","notifications_url":"https://api.github.com/repos/freedomofpress/securedrop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/freedomofpress/securedrop/labels{/name}","releases_url":"https://api.github.com/repos/freedomofpress/securedrop/releases{/id}","created_at":"2012-01-11T19:57:55Z","updated_at":"2015-04-01T15:59:09Z","pushed_at":"2015-04-01T18:11:24Z","git_url":"git://github.com/freedomofpress/securedrop.git","ssh_url":"git@github.com:freedomofpress/securedrop.git","clone_url":"https://github.com/freedomofpress/securedrop.git","svn_url":"https://github.com/freedomofpress/securedrop","homepage":"https://freedom.press/securedrop","size":39031,"stargazers_count":1417,"watchers_count":1417,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":231,"mirror_url":null,"open_issues_count":136,"forks":231,"open_issues":136,"watchers":1417,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/freedomofpress/securedrop/pulls/965"},"html":{"href":"https://github.com/freedomofpress/securedrop/pull/965"},"issue":{"href":"https://api.github.com/repos/freedomofpress/securedrop/issues/965"},"comments":{"href":"https://api.github.com/repos/freedomofpress/securedrop/issues/965/comments"},"review_comments":{"href":"https://api.github.com/repos/freedomofpress/securedrop/pulls/965/comments"},"review_comment":{"href":"https://api.github.com/repos/freedomofpress/securedrop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/freedomofpress/securedrop/pulls/965/commits"},"statuses":{"href":"https://api.github.com/repos/freedomofpress/securedrop/statuses/89b1e3f9c209b3614e038aff8dd4afd19ad6bc50"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"garrettr","id":407302,"avatar_url":"https://avatars.githubusercontent.com/u/407302?v=3","gravatar_id":"","url":"https://api.github.com/users/garrettr","html_url":"https://github.com/garrettr","followers_url":"https://api.github.com/users/garrettr/followers","following_url":"https://api.github.com/users/garrettr/following{/other_user}","gists_url":"https://api.github.com/users/garrettr/gists{/gist_id}","starred_url":"https://api.github.com/users/garrettr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garrettr/subscriptions","organizations_url":"https://api.github.com/users/garrettr/orgs","repos_url":"https://api.github.com/users/garrettr/repos","events_url":"https://api.github.com/users/garrettr/events{/privacy}","received_events_url":"https://api.github.com/users/garrettr/received_events","type":"User","site_admin":false},"comments":2,"review_comments":0,"commits":1,"additions":3,"deletions":0,"changed_files":1}}