{"action":"created","comment":{"url":"https://api.github.com/repos/openSUSE/open-build-service/pulls/comments/243250579","pull_request_review_id":186968741,"id":243250579,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MzI1MDU3OQ==","diff_hunk":"@@ -0,0 +1,221 @@\n+#!/usr/bin/perl\n+\n+use strict;\n+use warnings;\n+use File::Path qw/make_path/;\n+use File::Temp;\n+use File::Find;\n+use POSIX qw/strftime/;\n+use Data::Dumper;\n+use Getopt::Long;\n+use Digest::SHA qw/sha256_hex/;\n+BEGIN {\n+  unshift @::INC, '/usr/lib/obs/server';\n+}\n+\n+use BSConfiguration;\n+\n+sub printlog {\n+  my $t = strftime(\"[%Y-%m-%d %H:%M:%S]\", localtime);\n+  print \"$t - @_\\n\";\n+}\n+\n+sub create_dir {\n+  if (-d $_[0]) {\n+    printlog(\"Directory $_[0] already exists\");\n+  } else {\n+    printlog(\"Creating directory $_[0]\");\n+    make_path($_[0]);\n+  }\n+}\n+\n+\n+my $DOCKER_IMAGE      = $BSConfig::docker_image || 'obs-source-service';\n+my $DOCKER_CUSTOM_OPT = $BSConfig::docker_custom_opt;\n+my $SERVICES_DIR      = $BSConfig::servicetempdir;\n+my $OBS_SERVICE_BUNDLE_GEMS_MIRROR_URL = $BSConfig::gems_mirror;\n+my $SSH_CMD           = \"\";\n+my $WITH_NET          = 0;\n+my $LOGDIR            = \"/srv/obs/service/log/\";\n+my $LOGFILE           = \"$LOGDIR/cservice.log\";\n+open(CPERR, \">&STDERR\");\n+open(CPOUT, \">&STDOUT\");\n+open(STDERR, \">>\", $LOGFILE) || die \"Error stderr: $!\";\n+open(STDOUT, \">>\", $LOGFILE) || die \"Error stdout$!\";\n+close CPERR;\n+close CPOUT;\n+my $LINK              = \"\";\n+my $SCM_COMMAND       = 0;\n+my $COMMAND           = shift @ARGV || die \"No command given!\\n\";\n+# $COMMAND =~ s/.*\\/(.*)$/$1/;\n+\n+printlog(\"$0 called\");\n+printlog(\"$COMMAND called\");\n+printlog(\"ARGV  - @ARGV\");\n+printlog(\"Running in debug mode\") if $ENV{DOCKER_DEBUG};\n+\n+make_path($LOGDIR);\n+\n+if ($COMMAND  =~ /\\/(download_url|download_src_package|update_source|download_files|generator_pom|snapcraft|kiwi_import|appimage)$/) {\n+  $WITH_NET =1;\n+} elsif ($COMMAND  =~ /\\/(bundle_gems)/) {\n+  $LINK = \"--link $BSConfig::geminabox_container\" if $BSConfig::geminabox_container;\n+  $WITH_NET  = 1;\n+} elsif ($COMMAND  =~ /(tar_scm|obs_scm)/) {\n+  $SCM_COMMAND=1;\n+  $WITH_NET=1\n+}\n+\n+my $PARAM_SCM;\n+my $PARAM_URL;\n+my $OUTDIR;\n+my @ARGS;\n+#GetOptions (\n+#  \"scm=s\"  => \\$PARAM_SCM,\n+#  \"url=s\"  => \\$PARAM_URL,\n+#  \"outdir=s\" => \\$OUTDIR,\n+#);\n+\n+while (my $arg = shift @ARGV) {\n+  if ($arg =~ /^--url(?:=(.+))?$/) {\n+     $PARAM_URL =  ($1) ? $2 : $ARGV[0];\n+  } \n+  if ($arg =~ /^--outdir$/) {\n+     $OUTDIR = shift @ARGV;\n+  } else {\n+    $arg =~ s/'/\\'/g;\n+    my $opt = shift @ARGV;\n+    $opt =~ s/'/\\'/g;\n+    $COMMAND = \"$COMMAND '$arg' '$opt'\";\n+    printlog(\"DEBUG COMMAND: $COMMAND\");\n+  }\n+}\n+\n+die \"ERROR: no outdir given!\\n\" unless $OUTDIR;\n+\n+my @oparts = split /\\//, $OUTDIR;\n+pop @oparts;\n+my $MOUNTDIR = join'/', @oparts;","path":"src/backend/cservice","position":98,"original_position":98,"commit_id":"8f21ccfc1c6189f43b3da0aa81de40b3b0bbf27e","original_commit_id":"8f21ccfc1c6189f43b3da0aa81de40b3b0bbf27e","user":{"login":"mlschroe","id":946612,"node_id":"MDQ6VXNlcjk0NjYxMg==","avatar_url":"https://avatars1.githubusercontent.com/u/946612?v=4","gravatar_id":"","url":"https://api.github.com/users/mlschroe","html_url":"https://github.com/mlschroe","followers_url":"https://api.github.com/users/mlschroe/followers","following_url":"https://api.github.com/users/mlschroe/following{/other_user}","gists_url":"https://api.github.com/users/mlschroe/gists{/gist_id}","starred_url":"https://api.github.com/users/mlschroe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlschroe/subscriptions","organizations_url":"https://api.github.com/users/mlschroe/orgs","repos_url":"https://api.github.com/users/mlschroe/repos","events_url":"https://api.github.com/users/mlschroe/events{/privacy}","received_events_url":"https://api.github.com/users/mlschroe/received_events","type":"User","site_admin":false},"body":"Doesn't perl have some easy way to do a dirname?","created_at":"2018-12-20T12:13:26Z","updated_at":"2018-12-20T12:13:26Z","html_url":"https://github.com/openSUSE/open-build-service/pull/6679#discussion_r243250579","pull_request_url":"https://api.github.com/repos/openSUSE/open-build-service/pulls/6679","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/openSUSE/open-build-service/pulls/comments/243250579"},"html":{"href":"https://github.com/openSUSE/open-build-service/pull/6679#discussion_r243250579"},"pull_request":{"href":"https://api.github.com/repos/openSUSE/open-build-service/pulls/6679"}}},"pull_request":{"url":"https://api.github.com/repos/openSUSE/open-build-service/pulls/6679","id":240127756,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQwMTI3NzU2","html_url":"https://github.com/openSUSE/open-build-service/pull/6679","diff_url":"https://github.com/openSUSE/open-build-service/pull/6679.diff","patch_url":"https://github.com/openSUSE/open-build-service/pull/6679.patch","issue_url":"https://api.github.com/repos/openSUSE/open-build-service/issues/6679","number":6679,"state":"open","locked":false,"title":"[backend] new wrapper script for docker jailed services","user":{"login":"M0ses","id":1991473,"node_id":"MDQ6VXNlcjE5OTE0NzM=","avatar_url":"https://avatars3.githubusercontent.com/u/1991473?v=4","gravatar_id":"","url":"https://api.github.com/users/M0ses","html_url":"https://github.com/M0ses","followers_url":"https://api.github.com/users/M0ses/followers","following_url":"https://api.github.com/users/M0ses/following{/other_user}","gists_url":"https://api.github.com/users/M0ses/gists{/gist_id}","starred_url":"https://api.github.com/users/M0ses/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/M0ses/subscriptions","organizations_url":"https://api.github.com/users/M0ses/orgs","repos_url":"https://api.github.com/users/M0ses/repos","events_url":"https://api.github.com/users/M0ses/events{/privacy}","received_events_url":"https://api.github.com/users/M0ses/received_events","type":"User","site_admin":false},"body":"refactored shell based wrapper to perl\r\n\r\n","created_at":"2018-12-20T10:52:04Z","updated_at":"2018-12-20T12:13:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"723b882aaa3c6e4365d65d9d49f0bf36e54f34fa","assignee":null,"assignees":[],"requested_reviewers":[{"login":"adrianschroeter","id":1067148,"node_id":"MDQ6VXNlcjEwNjcxNDg=","avatar_url":"https://avatars3.githubusercontent.com/u/1067148?v=4","gravatar_id":"","url":"https://api.github.com/users/adrianschroeter","html_url":"https://github.com/adrianschroeter","followers_url":"https://api.github.com/users/adrianschroeter/followers","following_url":"https://api.github.com/users/adrianschroeter/following{/other_user}","gists_url":"https://api.github.com/users/adrianschroeter/gists{/gist_id}","starred_url":"https://api.github.com/users/adrianschroeter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrianschroeter/subscriptions","organizations_url":"https://api.github.com/users/adrianschroeter/orgs","repos_url":"https://api.github.com/users/adrianschroeter/repos","events_url":"https://api.github.com/users/adrianschroeter/events{/privacy}","received_events_url":"https://api.github.com/users/adrianschroeter/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":21922533,"node_id":"MDU6TGFiZWwyMTkyMjUzMw==","url":"https://api.github.com/repos/openSUSE/open-build-service/labels/Backend%20%F0%9F%A4%96","name":"Backend 🤖","color":"66FFcc","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/openSUSE/open-build-service/pulls/6679/commits","review_comments_url":"https://api.github.com/repos/openSUSE/open-build-service/pulls/6679/comments","review_comment_url":"https://api.github.com/repos/openSUSE/open-build-service/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openSUSE/open-build-service/issues/6679/comments","statuses_url":"https://api.github.com/repos/openSUSE/open-build-service/statuses/8f21ccfc1c6189f43b3da0aa81de40b3b0bbf27e","head":{"label":"M0ses:cservice","ref":"cservice","sha":"8f21ccfc1c6189f43b3da0aa81de40b3b0bbf27e","user":{"login":"M0ses","id":1991473,"node_id":"MDQ6VXNlcjE5OTE0NzM=","avatar_url":"https://avatars3.githubusercontent.com/u/1991473?v=4","gravatar_id":"","url":"https://api.github.com/users/M0ses","html_url":"https://github.com/M0ses","followers_url":"https://api.github.com/users/M0ses/followers","following_url":"https://api.github.com/users/M0ses/following{/other_user}","gists_url":"https://api.github.com/users/M0ses/gists{/gist_id}","starred_url":"https://api.github.com/users/M0ses/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/M0ses/subscriptions","organizations_url":"https://api.github.com/users/M0ses/orgs","repos_url":"https://api.github.com/users/M0ses/repos","events_url":"https://api.github.com/users/M0ses/events{/privacy}","received_events_url":"https://api.github.com/users/M0ses/received_events","type":"User","site_admin":false},"repo":{"id":44260120,"node_id":"MDEwOlJlcG9zaXRvcnk0NDI2MDEyMA==","name":"open-build-service","full_name":"M0ses/open-build-service","private":false,"owner":{"login":"M0ses","id":1991473,"node_id":"MDQ6VXNlcjE5OTE0NzM=","avatar_url":"https://avatars3.githubusercontent.com/u/1991473?v=4","gravatar_id":"","url":"https://api.github.com/users/M0ses","html_url":"https://github.com/M0ses","followers_url":"https://api.github.com/users/M0ses/followers","following_url":"https://api.github.com/users/M0ses/following{/other_user}","gists_url":"https://api.github.com/users/M0ses/gists{/gist_id}","starred_url":"https://api.github.com/users/M0ses/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/M0ses/subscriptions","organizations_url":"https://api.github.com/users/M0ses/orgs","repos_url":"https://api.github.com/users/M0ses/repos","events_url":"https://api.github.com/users/M0ses/events{/privacy}","received_events_url":"https://api.github.com/users/M0ses/received_events","type":"User","site_admin":false},"html_url":"https://github.com/M0ses/open-build-service","description":"A generic system to build and distribute packages from sources in an automatic, consistent and reproducible way. Release your software for a wide range of operating systems and hardware architectures.","fork":true,"url":"https://api.github.com/repos/M0ses/open-build-service","forks_url":"https://api.github.com/repos/M0ses/open-build-service/forks","keys_url":"https://api.github.com/repos/M0ses/open-build-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/M0ses/open-build-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/M0ses/open-build-service/teams","hooks_url":"https://api.github.com/repos/M0ses/open-build-service/hooks","issue_events_url":"https://api.github.com/repos/M0ses/open-build-service/issues/events{/number}","events_url":"https://api.github.com/repos/M0ses/open-build-service/events","assignees_url":"https://api.github.com/repos/M0ses/open-build-service/assignees{/user}","branches_url":"https://api.github.com/repos/M0ses/open-build-service/branches{/branch}","tags_url":"https://api.github.com/repos/M0ses/open-build-service/tags","blobs_url":"https://api.github.com/repos/M0ses/open-build-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/M0ses/open-build-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/M0ses/open-build-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/M0ses/open-build-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/M0ses/open-build-service/statuses/{sha}","languages_url":"https://api.github.com/repos/M0ses/open-build-service/languages","stargazers_url":"https://api.github.com/repos/M0ses/open-build-service/stargazers","contributors_url":"https://api.github.com/repos/M0ses/open-build-service/contributors","subscribers_url":"https://api.github.com/repos/M0ses/open-build-service/subscribers","subscription_url":"https://api.github.com/repos/M0ses/open-build-service/subscription","commits_url":"https://api.github.com/repos/M0ses/open-build-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/M0ses/open-build-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/M0ses/open-build-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/M0ses/open-build-service/issues/comments{/number}","contents_url":"https://api.github.com/repos/M0ses/open-build-service/contents/{+path}","compare_url":"https://api.github.com/repos/M0ses/open-build-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/M0ses/open-build-service/merges","archive_url":"https://api.github.com/repos/M0ses/open-build-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/M0ses/open-build-service/downloads","issues_url":"https://api.github.com/repos/M0ses/open-build-service/issues{/number}","pulls_url":"https://api.github.com/repos/M0ses/open-build-service/pulls{/number}","milestones_url":"https://api.github.com/repos/M0ses/open-build-service/milestones{/number}","notifications_url":"https://api.github.com/repos/M0ses/open-build-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/M0ses/open-build-service/labels{/name}","releases_url":"https://api.github.com/repos/M0ses/open-build-service/releases{/id}","deployments_url":"https://api.github.com/repos/M0ses/open-build-service/deployments","created_at":"2015-10-14T16:11:51Z","updated_at":"2018-12-20T10:38:04Z","pushed_at":"2018-12-20T10:49:36Z","git_url":"git://github.com/M0ses/open-build-service.git","ssh_url":"git@github.com:M0ses/open-build-service.git","clone_url":"https://github.com/M0ses/open-build-service.git","svn_url":"https://github.com/M0ses/open-build-service","homepage":"http://openbuildservice.org/","size":64850,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"openSUSE:master","ref":"master","sha":"c5d34def3ec876735ddc78f10dc985b4e9bea2e0","user":{"login":"openSUSE","id":623819,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyMzgxOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/623819?v=4","gravatar_id":"","url":"https://api.github.com/users/openSUSE","html_url":"https://github.com/openSUSE","followers_url":"https://api.github.com/users/openSUSE/followers","following_url":"https://api.github.com/users/openSUSE/following{/other_user}","gists_url":"https://api.github.com/users/openSUSE/gists{/gist_id}","starred_url":"https://api.github.com/users/openSUSE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openSUSE/subscriptions","organizations_url":"https://api.github.com/users/openSUSE/orgs","repos_url":"https://api.github.com/users/openSUSE/repos","events_url":"https://api.github.com/users/openSUSE/events{/privacy}","received_events_url":"https://api.github.com/users/openSUSE/received_events","type":"Organization","site_admin":false},"repo":{"id":2046192,"node_id":"MDEwOlJlcG9zaXRvcnkyMDQ2MTky","name":"open-build-service","full_name":"openSUSE/open-build-service","private":false,"owner":{"login":"openSUSE","id":623819,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyMzgxOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/623819?v=4","gravatar_id":"","url":"https://api.github.com/users/openSUSE","html_url":"https://github.com/openSUSE","followers_url":"https://api.github.com/users/openSUSE/followers","following_url":"https://api.github.com/users/openSUSE/following{/other_user}","gists_url":"https://api.github.com/users/openSUSE/gists{/gist_id}","starred_url":"https://api.github.com/users/openSUSE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openSUSE/subscriptions","organizations_url":"https://api.github.com/users/openSUSE/orgs","repos_url":"https://api.github.com/users/openSUSE/repos","events_url":"https://api.github.com/users/openSUSE/events{/privacy}","received_events_url":"https://api.github.com/users/openSUSE/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/openSUSE/open-build-service","description":"A generic system to build and distribute packages from sources in an automatic, consistent and reproducible way. Release your software for a wide range of operating systems and hardware architectures.","fork":false,"url":"https://api.github.com/repos/openSUSE/open-build-service","forks_url":"https://api.github.com/repos/openSUSE/open-build-service/forks","keys_url":"https://api.github.com/repos/openSUSE/open-build-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openSUSE/open-build-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openSUSE/open-build-service/teams","hooks_url":"https://api.github.com/repos/openSUSE/open-build-service/hooks","issue_events_url":"https://api.github.com/repos/openSUSE/open-build-service/issues/events{/number}","events_url":"https://api.github.com/repos/openSUSE/open-build-service/events","assignees_url":"https://api.github.com/repos/openSUSE/open-build-service/assignees{/user}","branches_url":"https://api.github.com/repos/openSUSE/open-build-service/branches{/branch}","tags_url":"https://api.github.com/repos/openSUSE/open-build-service/tags","blobs_url":"https://api.github.com/repos/openSUSE/open-build-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openSUSE/open-build-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openSUSE/open-build-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/openSUSE/open-build-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openSUSE/open-build-service/statuses/{sha}","languages_url":"https://api.github.com/repos/openSUSE/open-build-service/languages","stargazers_url":"https://api.github.com/repos/openSUSE/open-build-service/stargazers","contributors_url":"https://api.github.com/repos/openSUSE/open-build-service/contributors","subscribers_url":"https://api.github.com/repos/openSUSE/open-build-service/subscribers","subscription_url":"https://api.github.com/repos/openSUSE/open-build-service/subscription","commits_url":"https://api.github.com/repos/openSUSE/open-build-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/openSUSE/open-build-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/openSUSE/open-build-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/openSUSE/open-build-service/issues/comments{/number}","contents_url":"https://api.github.com/repos/openSUSE/open-build-service/contents/{+path}","compare_url":"https://api.github.com/repos/openSUSE/open-build-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openSUSE/open-build-service/merges","archive_url":"https://api.github.com/repos/openSUSE/open-build-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openSUSE/open-build-service/downloads","issues_url":"https://api.github.com/repos/openSUSE/open-build-service/issues{/number}","pulls_url":"https://api.github.com/repos/openSUSE/open-build-service/pulls{/number}","milestones_url":"https://api.github.com/repos/openSUSE/open-build-service/milestones{/number}","notifications_url":"https://api.github.com/repos/openSUSE/open-build-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openSUSE/open-build-service/labels{/name}","releases_url":"https://api.github.com/repos/openSUSE/open-build-service/releases{/id}","deployments_url":"https://api.github.com/repos/openSUSE/open-build-service/deployments","created_at":"2011-07-14T06:52:57Z","updated_at":"2018-12-20T11:02:04Z","pushed_at":"2018-12-20T10:52:05Z","git_url":"git://github.com/openSUSE/open-build-service.git","ssh_url":"git@github.com:openSUSE/open-build-service.git","clone_url":"https://github.com/openSUSE/open-build-service.git","svn_url":"https://github.com/openSUSE/open-build-service","homepage":"http://openbuildservice.org/","size":65556,"stargazers_count":410,"watchers_count":410,"language":"Ruby","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":263,"mirror_url":null,"archived":false,"open_issues_count":566,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":263,"open_issues":566,"watchers":410,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openSUSE/open-build-service/pulls/6679"},"html":{"href":"https://github.com/openSUSE/open-build-service/pull/6679"},"issue":{"href":"https://api.github.com/repos/openSUSE/open-build-service/issues/6679"},"comments":{"href":"https://api.github.com/repos/openSUSE/open-build-service/issues/6679/comments"},"review_comments":{"href":"https://api.github.com/repos/openSUSE/open-build-service/pulls/6679/comments"},"review_comment":{"href":"https://api.github.com/repos/openSUSE/open-build-service/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openSUSE/open-build-service/pulls/6679/commits"},"statuses":{"href":"https://api.github.com/repos/openSUSE/open-build-service/statuses/8f21ccfc1c6189f43b3da0aa81de40b3b0bbf27e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mlschroe"}}