{"action":"created","comment":{"url":"https://api.github.com/repos/quattor/configuration-modules-core/pulls/comments/101891861","pull_request_review_id":22636901,"id":101891861,"diff_hunk":"@@ -0,0 +1,385 @@\n+#${PMpre} NCM::Component::spma::apt${PMpost}\n+\n+=head1 NAME\n+\n+NCM::Component::spma::apt - NCM SPMA backend for apt\n+\n+=head1 SYNOPSIS\n+\n+This document describes how to control the behaviour of the package manager itself.\n+For information on how to manage packages with Quattor, please check\n+L<http://quattor.org/documentation/2013/04/05/package-management.html>.\n+\n+=head1 DESCRIPTION\n+\n+apt.pm implements an apt backend for ncm-spma, the approach taken is to defer as much work as possible to apt.\n+\n+A single SPMA run consists of the following steps:\n+\n+=over\n+\n+=item\n+\n+Setup source directory if required\n+\n+=item\n+\n+Remove sources that are not found in the profile\n+\n+=item\n+\n+Update source cache from upstream sources\n+\n+=item\n+\n+Upgrade already installed packages\n+\n+=item\n+\n+Install packages specified in the profile that are not installed\n+\n+=item\n+\n+Mark any packages installed but not in the profile as automatically installed\n+\n+=item\n+\n+Ask apt to remove all automatically installed packages that are not satisfying dependencies of other packages\n+\n+=back\n+\n+Support for groups (tasks) is not currently provided.\n+\n+=head1 RESOURCES\n+\n+Only a very minimal schema is implemented.\n+\n+Sources listed under C</software/repositories> will be configured,\n+URLs should be followed by the suite and sections required e.g. http://example.org/debian unstable main\n+\n+Packages listed under C</software/packages> will be installed, version and architecture locking (including multiarch) is fully implemented.\n+\n+=cut\n+\n+use strict;\n+use warnings;\n+use parent qw(NCM::Component CAF::Path);\n+use CAF::Process;\n+use CAF::FileWriter;\n+use CAF::FileEditor;\n+use EDG::WP4::CCM::Path qw(escape unescape);\n+use EDG::WP4::CCM::TextRender;\n+use NCM::Component::spma::yum;\n+use CAF::Object qw(SUCCESS);\n+use Set::Scalar;\n+use File::Path qw(mkpath);\n+use Text::Glob qw(match_glob);\n+use Readonly;\n+\n+Readonly::Scalar my $DIR_SOURCES => \"/etc/apt/sources.list.d\";","path":"ncm-spma/src/main/perl/spma/apt.pm","position":79,"original_position":79,"commit_id":"f7c3b491c30cd7befcc9219dedccb9ded01c1a5b","original_commit_id":"f7c3b491c30cd7befcc9219dedccb9ded01c1a5b","user":{"login":"stdweird","id":1517606,"avatar_url":"https://avatars.githubusercontent.com/u/1517606?v=3","gravatar_id":"","url":"https://api.github.com/users/stdweird","html_url":"https://github.com/stdweird","followers_url":"https://api.github.com/users/stdweird/followers","following_url":"https://api.github.com/users/stdweird/following{/other_user}","gists_url":"https://api.github.com/users/stdweird/gists{/gist_id}","starred_url":"https://api.github.com/users/stdweird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stdweird/subscriptions","organizations_url":"https://api.github.com/users/stdweird/orgs","repos_url":"https://api.github.com/users/stdweird/repos","events_url":"https://api.github.com/users/stdweird/events{/privacy}","received_events_url":"https://api.github.com/users/stdweird/received_events","type":"User","site_admin":false},"body":"you can  drop the `::Scalar`","created_at":"2017-02-18T12:11:18Z","updated_at":"2017-02-18T12:11:18Z","html_url":"https://github.com/quattor/configuration-modules-core/pull/821#discussion_r101891861","pull_request_url":"https://api.github.com/repos/quattor/configuration-modules-core/pulls/821","_links":{"self":{"href":"https://api.github.com/repos/quattor/configuration-modules-core/pulls/comments/101891861"},"html":{"href":"https://github.com/quattor/configuration-modules-core/pull/821#discussion_r101891861"},"pull_request":{"href":"https://api.github.com/repos/quattor/configuration-modules-core/pulls/821"}}},"pull_request":{"url":"https://api.github.com/repos/quattor/configuration-modules-core/pulls/821","id":79021985,"html_url":"https://github.com/quattor/configuration-modules-core/pull/821","diff_url":"https://github.com/quattor/configuration-modules-core/pull/821.diff","patch_url":"https://github.com/quattor/configuration-modules-core/pull/821.patch","issue_url":"https://api.github.com/repos/quattor/configuration-modules-core/issues/821","number":821,"state":"open","locked":false,"title":"ncm-spma: Add backend for apt","user":{"login":"jrha","id":323309,"avatar_url":"https://avatars.githubusercontent.com/u/323309?v=3","gravatar_id":"","url":"https://api.github.com/users/jrha","html_url":"https://github.com/jrha","followers_url":"https://api.github.com/users/jrha/followers","following_url":"https://api.github.com/users/jrha/following{/other_user}","gists_url":"https://api.github.com/users/jrha/gists{/gist_id}","starred_url":"https://api.github.com/users/jrha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrha/subscriptions","organizations_url":"https://api.github.com/users/jrha/orgs","repos_url":"https://api.github.com/users/jrha/repos","events_url":"https://api.github.com/users/jrha/events{/privacy}","received_events_url":"https://api.github.com/users/jrha/received_events","type":"User","site_admin":false},"body":"Add a SPMA backend for configuring debian derived systems using apt,\nthis should be considered a technology preview.\n\nThe code currently manages source lists (repositories) and packages and not much else.\n\nTested at RAL on Ubuntu 14.04.4 LTS and Linux Mint 17.3 Rosa.\n\nBased on and depends on #716, so it might be better to wait until that is merged before attempting too much of a review.\n","created_at":"2016-07-27T13:17:27Z","updated_at":"2017-02-18T12:11:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8cd58903d22e752d92b002c823c064f38110a841","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/quattor/configuration-modules-core/pulls/821/commits","review_comments_url":"https://api.github.com/repos/quattor/configuration-modules-core/pulls/821/comments","review_comment_url":"https://api.github.com/repos/quattor/configuration-modules-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/quattor/configuration-modules-core/issues/821/comments","statuses_url":"https://api.github.com/repos/quattor/configuration-modules-core/statuses/f7c3b491c30cd7befcc9219dedccb9ded01c1a5b","head":{"label":"jrha:spma-apt","ref":"spma-apt","sha":"f7c3b491c30cd7befcc9219dedccb9ded01c1a5b","user":{"login":"jrha","id":323309,"avatar_url":"https://avatars.githubusercontent.com/u/323309?v=3","gravatar_id":"","url":"https://api.github.com/users/jrha","html_url":"https://github.com/jrha","followers_url":"https://api.github.com/users/jrha/followers","following_url":"https://api.github.com/users/jrha/following{/other_user}","gists_url":"https://api.github.com/users/jrha/gists{/gist_id}","starred_url":"https://api.github.com/users/jrha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrha/subscriptions","organizations_url":"https://api.github.com/users/jrha/orgs","repos_url":"https://api.github.com/users/jrha/repos","events_url":"https://api.github.com/users/jrha/events{/privacy}","received_events_url":"https://api.github.com/users/jrha/received_events","type":"User","site_admin":false},"repo":{"id":9372871,"name":"configuration-modules-core","full_name":"jrha/configuration-modules-core","owner":{"login":"jrha","id":323309,"avatar_url":"https://avatars.githubusercontent.com/u/323309?v=3","gravatar_id":"","url":"https://api.github.com/users/jrha","html_url":"https://github.com/jrha","followers_url":"https://api.github.com/users/jrha/followers","following_url":"https://api.github.com/users/jrha/following{/other_user}","gists_url":"https://api.github.com/users/jrha/gists{/gist_id}","starred_url":"https://api.github.com/users/jrha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrha/subscriptions","organizations_url":"https://api.github.com/users/jrha/orgs","repos_url":"https://api.github.com/users/jrha/repos","events_url":"https://api.github.com/users/jrha/events{/privacy}","received_events_url":"https://api.github.com/users/jrha/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jrha/configuration-modules-core","description":"Core NCM components for Quattor","fork":true,"url":"https://api.github.com/repos/jrha/configuration-modules-core","forks_url":"https://api.github.com/repos/jrha/configuration-modules-core/forks","keys_url":"https://api.github.com/repos/jrha/configuration-modules-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jrha/configuration-modules-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jrha/configuration-modules-core/teams","hooks_url":"https://api.github.com/repos/jrha/configuration-modules-core/hooks","issue_events_url":"https://api.github.com/repos/jrha/configuration-modules-core/issues/events{/number}","events_url":"https://api.github.com/repos/jrha/configuration-modules-core/events","assignees_url":"https://api.github.com/repos/jrha/configuration-modules-core/assignees{/user}","branches_url":"https://api.github.com/repos/jrha/configuration-modules-core/branches{/branch}","tags_url":"https://api.github.com/repos/jrha/configuration-modules-core/tags","blobs_url":"https://api.github.com/repos/jrha/configuration-modules-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jrha/configuration-modules-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jrha/configuration-modules-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/jrha/configuration-modules-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jrha/configuration-modules-core/statuses/{sha}","languages_url":"https://api.github.com/repos/jrha/configuration-modules-core/languages","stargazers_url":"https://api.github.com/repos/jrha/configuration-modules-core/stargazers","contributors_url":"https://api.github.com/repos/jrha/configuration-modules-core/contributors","subscribers_url":"https://api.github.com/repos/jrha/configuration-modules-core/subscribers","subscription_url":"https://api.github.com/repos/jrha/configuration-modules-core/subscription","commits_url":"https://api.github.com/repos/jrha/configuration-modules-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/jrha/configuration-modules-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/jrha/configuration-modules-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/jrha/configuration-modules-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/jrha/configuration-modules-core/contents/{+path}","compare_url":"https://api.github.com/repos/jrha/configuration-modules-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jrha/configuration-modules-core/merges","archive_url":"https://api.github.com/repos/jrha/configuration-modules-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jrha/configuration-modules-core/downloads","issues_url":"https://api.github.com/repos/jrha/configuration-modules-core/issues{/number}","pulls_url":"https://api.github.com/repos/jrha/configuration-modules-core/pulls{/number}","milestones_url":"https://api.github.com/repos/jrha/configuration-modules-core/milestones{/number}","notifications_url":"https://api.github.com/repos/jrha/configuration-modules-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jrha/configuration-modules-core/labels{/name}","releases_url":"https://api.github.com/repos/jrha/configuration-modules-core/releases{/id}","deployments_url":"https://api.github.com/repos/jrha/configuration-modules-core/deployments","created_at":"2013-04-11T14:56:15Z","updated_at":"2015-04-28T14:14:16Z","pushed_at":"2017-02-17T18:09:08Z","git_url":"git://github.com/jrha/configuration-modules-core.git","ssh_url":"git@github.com:jrha/configuration-modules-core.git","clone_url":"https://github.com/jrha/configuration-modules-core.git","svn_url":"https://github.com/jrha/configuration-modules-core","homepage":null,"size":11442,"stargazers_count":0,"watchers_count":0,"language":"Perl","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":"master"}},"base":{"label":"quattor:master","ref":"master","sha":"4a77011d3bea5f06952e36f044d1a2b0530080bd","user":{"login":"quattor","id":1557169,"avatar_url":"https://avatars.githubusercontent.com/u/1557169?v=3","gravatar_id":"","url":"https://api.github.com/users/quattor","html_url":"https://github.com/quattor","followers_url":"https://api.github.com/users/quattor/followers","following_url":"https://api.github.com/users/quattor/following{/other_user}","gists_url":"https://api.github.com/users/quattor/gists{/gist_id}","starred_url":"https://api.github.com/users/quattor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quattor/subscriptions","organizations_url":"https://api.github.com/users/quattor/orgs","repos_url":"https://api.github.com/users/quattor/repos","events_url":"https://api.github.com/users/quattor/events{/privacy}","received_events_url":"https://api.github.com/users/quattor/received_events","type":"Organization","site_admin":false},"repo":{"id":6471233,"name":"configuration-modules-core","full_name":"quattor/configuration-modules-core","owner":{"login":"quattor","id":1557169,"avatar_url":"https://avatars.githubusercontent.com/u/1557169?v=3","gravatar_id":"","url":"https://api.github.com/users/quattor","html_url":"https://github.com/quattor","followers_url":"https://api.github.com/users/quattor/followers","following_url":"https://api.github.com/users/quattor/following{/other_user}","gists_url":"https://api.github.com/users/quattor/gists{/gist_id}","starred_url":"https://api.github.com/users/quattor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quattor/subscriptions","organizations_url":"https://api.github.com/users/quattor/orgs","repos_url":"https://api.github.com/users/quattor/repos","events_url":"https://api.github.com/users/quattor/events{/privacy}","received_events_url":"https://api.github.com/users/quattor/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/quattor/configuration-modules-core","description":"Node Configuration Manager Components for Everyone","fork":false,"url":"https://api.github.com/repos/quattor/configuration-modules-core","forks_url":"https://api.github.com/repos/quattor/configuration-modules-core/forks","keys_url":"https://api.github.com/repos/quattor/configuration-modules-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/quattor/configuration-modules-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/quattor/configuration-modules-core/teams","hooks_url":"https://api.github.com/repos/quattor/configuration-modules-core/hooks","issue_events_url":"https://api.github.com/repos/quattor/configuration-modules-core/issues/events{/number}","events_url":"https://api.github.com/repos/quattor/configuration-modules-core/events","assignees_url":"https://api.github.com/repos/quattor/configuration-modules-core/assignees{/user}","branches_url":"https://api.github.com/repos/quattor/configuration-modules-core/branches{/branch}","tags_url":"https://api.github.com/repos/quattor/configuration-modules-core/tags","blobs_url":"https://api.github.com/repos/quattor/configuration-modules-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/quattor/configuration-modules-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/quattor/configuration-modules-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/quattor/configuration-modules-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/quattor/configuration-modules-core/statuses/{sha}","languages_url":"https://api.github.com/repos/quattor/configuration-modules-core/languages","stargazers_url":"https://api.github.com/repos/quattor/configuration-modules-core/stargazers","contributors_url":"https://api.github.com/repos/quattor/configuration-modules-core/contributors","subscribers_url":"https://api.github.com/repos/quattor/configuration-modules-core/subscribers","subscription_url":"https://api.github.com/repos/quattor/configuration-modules-core/subscription","commits_url":"https://api.github.com/repos/quattor/configuration-modules-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/quattor/configuration-modules-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/quattor/configuration-modules-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/quattor/configuration-modules-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/quattor/configuration-modules-core/contents/{+path}","compare_url":"https://api.github.com/repos/quattor/configuration-modules-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/quattor/configuration-modules-core/merges","archive_url":"https://api.github.com/repos/quattor/configuration-modules-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/quattor/configuration-modules-core/downloads","issues_url":"https://api.github.com/repos/quattor/configuration-modules-core/issues{/number}","pulls_url":"https://api.github.com/repos/quattor/configuration-modules-core/pulls{/number}","milestones_url":"https://api.github.com/repos/quattor/configuration-modules-core/milestones{/number}","notifications_url":"https://api.github.com/repos/quattor/configuration-modules-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/quattor/configuration-modules-core/labels{/name}","releases_url":"https://api.github.com/repos/quattor/configuration-modules-core/releases{/id}","deployments_url":"https://api.github.com/repos/quattor/configuration-modules-core/deployments","created_at":"2012-10-31T09:08:07Z","updated_at":"2016-10-24T10:45:01Z","pushed_at":"2017-02-17T18:09:10Z","git_url":"git://github.com/quattor/configuration-modules-core.git","ssh_url":"git@github.com:quattor/configuration-modules-core.git","clone_url":"https://github.com/quattor/configuration-modules-core.git","svn_url":"https://github.com/quattor/configuration-modules-core","homepage":"www.quattor.org","size":11628,"stargazers_count":7,"watchers_count":7,"language":"Perl","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":34,"mirror_url":null,"open_issues_count":123,"forks":34,"open_issues":123,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/quattor/configuration-modules-core/pulls/821"},"html":{"href":"https://github.com/quattor/configuration-modules-core/pull/821"},"issue":{"href":"https://api.github.com/repos/quattor/configuration-modules-core/issues/821"},"comments":{"href":"https://api.github.com/repos/quattor/configuration-modules-core/issues/821/comments"},"review_comments":{"href":"https://api.github.com/repos/quattor/configuration-modules-core/pulls/821/comments"},"review_comment":{"href":"https://api.github.com/repos/quattor/configuration-modules-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/quattor/configuration-modules-core/pulls/821/commits"},"statuses":{"href":"https://api.github.com/repos/quattor/configuration-modules-core/statuses/f7c3b491c30cd7befcc9219dedccb9ded01c1a5b"}}}}
{"actor":{"display_login":"stdweird"}}