{"action":"created","comment":{"url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/pulls/comments/25599503","id":25599503,"diff_hunk":"@@ -0,0 +1,50 @@\n+# Support whyrun\n+def whyrun_supported?\n+  true\n+end\n+\n+use_inline_resources\n+\n+# Create if doesn't exist, do not touch if fcontext is already registered\n+action :add do\n+  escaped_file_spec = Regexp.escape(new_resource.file_spec)\n+  noregex_file_spec = new_resource.file_spec.split(/(\\(\\/\\.\\*\\)\\?|\\.\\*)$/)[0]","path":"providers/fcontext.rb","position":11,"original_position":11,"commit_id":"9dcffdb5a7cae05c5789786c281eccce1dc3146e","original_commit_id":"9dcffdb5a7cae05c5789786c281eccce1dc3146e","user":{"login":"joerg","id":166924,"avatar_url":"https://avatars.githubusercontent.com/u/166924?v=3","gravatar_id":"","url":"https://api.github.com/users/joerg","html_url":"https://github.com/joerg","followers_url":"https://api.github.com/users/joerg/followers","following_url":"https://api.github.com/users/joerg/following{/other_user}","gists_url":"https://api.github.com/users/joerg/gists{/gist_id}","starred_url":"https://api.github.com/users/joerg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joerg/subscriptions","organizations_url":"https://api.github.com/users/joerg/orgs","repos_url":"https://api.github.com/users/joerg/repos","events_url":"https://api.github.com/users/joerg/events{/privacy}","received_events_url":"https://api.github.com/users/joerg/received_events","type":"User","site_admin":false},"body":"1: This is more of less pseudo-code. I somehow tested it, and it will work, but you know...\r\nHow could you ever expand a .* without checking the actual FS?\r\n2: If we'd use -R we could drop the find all along. ;)\r\n\r\nI think we have a plan. I'll try to get that ready within the next few hours.\r\n","created_at":"2015-03-02T13:59:59Z","updated_at":"2015-03-02T13:59:59Z","html_url":"https://github.com/BackSlasher/chef-selinuxpolicy/pull/3#discussion_r25599503","pull_request_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/pulls/comments/25599503"},"html":{"href":"https://github.com/BackSlasher/chef-selinuxpolicy/pull/3#discussion_r25599503"},"pull_request":{"href":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/pulls/3","id":29509757,"html_url":"https://github.com/BackSlasher/chef-selinuxpolicy/pull/3","diff_url":"https://github.com/BackSlasher/chef-selinuxpolicy/pull/3.diff","patch_url":"https://github.com/BackSlasher/chef-selinuxpolicy/pull/3.patch","issue_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/issues/3","number":3,"state":"open","locked":false,"title":"Add file context resource","user":{"login":"joerg","id":166924,"avatar_url":"https://avatars.githubusercontent.com/u/166924?v=3","gravatar_id":"","url":"https://api.github.com/users/joerg","html_url":"https://github.com/joerg","followers_url":"https://api.github.com/users/joerg/followers","following_url":"https://api.github.com/users/joerg/following{/other_user}","gists_url":"https://api.github.com/users/joerg/gists{/gist_id}","starred_url":"https://api.github.com/users/joerg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joerg/subscriptions","organizations_url":"https://api.github.com/users/joerg/orgs","repos_url":"https://api.github.com/users/joerg/repos","events_url":"https://api.github.com/users/joerg/events{/privacy}","received_events_url":"https://api.github.com/users/joerg/received_events","type":"User","site_admin":false},"body":"Basically this is a copy of the port provider for managing file resources. I had to create it to get mysql running which is why I added it as an example. The noregex_filespec for sure needs to be expanded but it fits all examples I have found so far.","created_at":"2015-02-18T09:01:59Z","updated_at":"2015-03-02T13:59:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d10b54d804547629b52d632129d043e8c9000ff6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/pulls/3/commits","review_comments_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/pulls/3/comments","review_comment_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/issues/3/comments","statuses_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/statuses/9dcffdb5a7cae05c5789786c281eccce1dc3146e","head":{"label":"ByteSource-net:master","ref":"master","sha":"9dcffdb5a7cae05c5789786c281eccce1dc3146e","user":{"login":"ByteSource-net","id":3234128,"avatar_url":"https://avatars.githubusercontent.com/u/3234128?v=3","gravatar_id":"","url":"https://api.github.com/users/ByteSource-net","html_url":"https://github.com/ByteSource-net","followers_url":"https://api.github.com/users/ByteSource-net/followers","following_url":"https://api.github.com/users/ByteSource-net/following{/other_user}","gists_url":"https://api.github.com/users/ByteSource-net/gists{/gist_id}","starred_url":"https://api.github.com/users/ByteSource-net/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ByteSource-net/subscriptions","organizations_url":"https://api.github.com/users/ByteSource-net/orgs","repos_url":"https://api.github.com/users/ByteSource-net/repos","events_url":"https://api.github.com/users/ByteSource-net/events{/privacy}","received_events_url":"https://api.github.com/users/ByteSource-net/received_events","type":"Organization","site_admin":false},"repo":{"id":30250809,"name":"chef-selinuxpolicy","full_name":"ByteSource-net/chef-selinuxpolicy","owner":{"login":"ByteSource-net","id":3234128,"avatar_url":"https://avatars.githubusercontent.com/u/3234128?v=3","gravatar_id":"","url":"https://api.github.com/users/ByteSource-net","html_url":"https://github.com/ByteSource-net","followers_url":"https://api.github.com/users/ByteSource-net/followers","following_url":"https://api.github.com/users/ByteSource-net/following{/other_user}","gists_url":"https://api.github.com/users/ByteSource-net/gists{/gist_id}","starred_url":"https://api.github.com/users/ByteSource-net/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ByteSource-net/subscriptions","organizations_url":"https://api.github.com/users/ByteSource-net/orgs","repos_url":"https://api.github.com/users/ByteSource-net/repos","events_url":"https://api.github.com/users/ByteSource-net/events{/privacy}","received_events_url":"https://api.github.com/users/ByteSource-net/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ByteSource-net/chef-selinuxpolicy","description":"Chef cookbook for managing SELinux policy settings","fork":true,"url":"https://api.github.com/repos/ByteSource-net/chef-selinuxpolicy","forks_url":"https://api.github.com/repos/ByteSource-net/chef-selinuxpolicy/forks","keys_url":"https://api.github.com/repos/ByteSource-net/chef-selinuxpolicy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ByteSource-net/chef-selinuxpolicy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ByteSource-net/chef-selinuxpolicy/teams","hooks_url":"https://api.github.com/repos/ByteSource-net/chef-selinuxpolicy/hooks","issue_events_url":"https://api.github.com/repos/ByteSource-net/chef-selinuxpolicy/issues/events{/number}","events_url":"https://api.github.com/repos/ByteSource-net/chef-selinuxpolicy/events","assignees_url":"https://api.github.com/repos/ByteSource-net/chef-selinuxpolicy/assignees{/user}","branches_url":"https://api.github.com/repos/ByteSource-net/chef-selinuxpolicy/branches{/branch}","tags_url":"https://api.github.com/repos/ByteSource-net/chef-selinuxpolicy/tags","blobs_url":"https://api.github.com/repos/ByteSource-net/chef-selinuxpolicy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ByteSource-net/chef-selinuxpolicy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ByteSource-net/chef-selinuxpolicy/git/refs{/sha}","trees_url":"https://api.github.com/repos/ByteSource-net/chef-selinuxpolicy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ByteSource-net/chef-selinuxpolicy/statuses/{sha}","languages_url":"https://api.github.com/repos/ByteSource-net/chef-selinuxpolicy/languages","stargazers_url":"https://api.github.com/repos/ByteSource-net/chef-selinuxpolicy/stargazers","contributors_url":"https://api.github.com/repos/ByteSource-net/chef-selinuxpolicy/contributors","subscribers_url":"https://api.github.com/repos/ByteSource-net/chef-selinuxpolicy/subscribers","subscription_url":"https://api.github.com/repos/ByteSource-net/chef-selinuxpolicy/subscription","commits_url":"https://api.github.com/repos/ByteSource-net/chef-selinuxpolicy/commits{/sha}","git_commits_url":"https://api.github.com/repos/ByteSource-net/chef-selinuxpolicy/git/commits{/sha}","comments_url":"https://api.github.com/repos/ByteSource-net/chef-selinuxpolicy/comments{/number}","issue_comment_url":"https://api.github.com/repos/ByteSource-net/chef-selinuxpolicy/issues/comments{/number}","contents_url":"https://api.github.com/repos/ByteSource-net/chef-selinuxpolicy/contents/{+path}","compare_url":"https://api.github.com/repos/ByteSource-net/chef-selinuxpolicy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ByteSource-net/chef-selinuxpolicy/merges","archive_url":"https://api.github.com/repos/ByteSource-net/chef-selinuxpolicy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ByteSource-net/chef-selinuxpolicy/downloads","issues_url":"https://api.github.com/repos/ByteSource-net/chef-selinuxpolicy/issues{/number}","pulls_url":"https://api.github.com/repos/ByteSource-net/chef-selinuxpolicy/pulls{/number}","milestones_url":"https://api.github.com/repos/ByteSource-net/chef-selinuxpolicy/milestones{/number}","notifications_url":"https://api.github.com/repos/ByteSource-net/chef-selinuxpolicy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ByteSource-net/chef-selinuxpolicy/labels{/name}","releases_url":"https://api.github.com/repos/ByteSource-net/chef-selinuxpolicy/releases{/id}","created_at":"2015-02-03T15:54:22Z","updated_at":"2015-02-18T08:56:59Z","pushed_at":"2015-02-18T08:56:59Z","git_url":"git://github.com/ByteSource-net/chef-selinuxpolicy.git","ssh_url":"git@github.com:ByteSource-net/chef-selinuxpolicy.git","clone_url":"https://github.com/ByteSource-net/chef-selinuxpolicy.git","svn_url":"https://github.com/ByteSource-net/chef-selinuxpolicy","homepage":null,"size":110,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"BackSlasher:master","ref":"master","sha":"db9d3f06493bea9042dce96506ab4000a5251289","user":{"login":"BackSlasher","id":7194491,"avatar_url":"https://avatars.githubusercontent.com/u/7194491?v=3","gravatar_id":"","url":"https://api.github.com/users/BackSlasher","html_url":"https://github.com/BackSlasher","followers_url":"https://api.github.com/users/BackSlasher/followers","following_url":"https://api.github.com/users/BackSlasher/following{/other_user}","gists_url":"https://api.github.com/users/BackSlasher/gists{/gist_id}","starred_url":"https://api.github.com/users/BackSlasher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BackSlasher/subscriptions","organizations_url":"https://api.github.com/users/BackSlasher/orgs","repos_url":"https://api.github.com/users/BackSlasher/repos","events_url":"https://api.github.com/users/BackSlasher/events{/privacy}","received_events_url":"https://api.github.com/users/BackSlasher/received_events","type":"User","site_admin":false},"repo":{"id":27542788,"name":"chef-selinuxpolicy","full_name":"BackSlasher/chef-selinuxpolicy","owner":{"login":"BackSlasher","id":7194491,"avatar_url":"https://avatars.githubusercontent.com/u/7194491?v=3","gravatar_id":"","url":"https://api.github.com/users/BackSlasher","html_url":"https://github.com/BackSlasher","followers_url":"https://api.github.com/users/BackSlasher/followers","following_url":"https://api.github.com/users/BackSlasher/following{/other_user}","gists_url":"https://api.github.com/users/BackSlasher/gists{/gist_id}","starred_url":"https://api.github.com/users/BackSlasher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BackSlasher/subscriptions","organizations_url":"https://api.github.com/users/BackSlasher/orgs","repos_url":"https://api.github.com/users/BackSlasher/repos","events_url":"https://api.github.com/users/BackSlasher/events{/privacy}","received_events_url":"https://api.github.com/users/BackSlasher/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/BackSlasher/chef-selinuxpolicy","description":"Chef cookbook for managing SELinux policy settings","fork":false,"url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy","forks_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/forks","keys_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/teams","hooks_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/hooks","issue_events_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/issues/events{/number}","events_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/events","assignees_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/assignees{/user}","branches_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/branches{/branch}","tags_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/tags","blobs_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/git/refs{/sha}","trees_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/statuses/{sha}","languages_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/languages","stargazers_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/stargazers","contributors_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/contributors","subscribers_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/subscribers","subscription_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/subscription","commits_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/commits{/sha}","git_commits_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/git/commits{/sha}","comments_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/comments{/number}","issue_comment_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/issues/comments{/number}","contents_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/contents/{+path}","compare_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/merges","archive_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/downloads","issues_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/issues{/number}","pulls_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/pulls{/number}","milestones_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/milestones{/number}","notifications_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/labels{/name}","releases_url":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/releases{/id}","created_at":"2014-12-04T13:57:11Z","updated_at":"2015-02-24T10:14:23Z","pushed_at":"2015-02-24T10:14:23Z","git_url":"git://github.com/BackSlasher/chef-selinuxpolicy.git","ssh_url":"git@github.com:BackSlasher/chef-selinuxpolicy.git","clone_url":"https://github.com/BackSlasher/chef-selinuxpolicy.git","svn_url":"https://github.com/BackSlasher/chef-selinuxpolicy","homepage":null,"size":310,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/pulls/3"},"html":{"href":"https://github.com/BackSlasher/chef-selinuxpolicy/pull/3"},"issue":{"href":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/issues/3"},"comments":{"href":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/BackSlasher/chef-selinuxpolicy/statuses/9dcffdb5a7cae05c5789786c281eccce1dc3146e"}}}}