{"action":"opened","issue":{"url":"https://api.github.com/repos/open-power-host-os/builds/issues/111","repository_url":"https://api.github.com/repos/open-power-host-os/builds","labels_url":"https://api.github.com/repos/open-power-host-os/builds/issues/111/labels{/name}","comments_url":"https://api.github.com/repos/open-power-host-os/builds/issues/111/comments","events_url":"https://api.github.com/repos/open-power-host-os/builds/issues/111/events","html_url":"https://github.com/open-power-host-os/builds/issues/111","id":189663316,"number":111,"title":"[RFC] Package's YAML syntax to download source","user":{"login":"snowcrshd","id":831084,"avatar_url":"https://avatars.githubusercontent.com/u/831084?v=3","gravatar_id":"","url":"https://api.github.com/users/snowcrshd","html_url":"https://github.com/snowcrshd","followers_url":"https://api.github.com/users/snowcrshd/followers","following_url":"https://api.github.com/users/snowcrshd/following{/other_user}","gists_url":"https://api.github.com/users/snowcrshd/gists{/gist_id}","starred_url":"https://api.github.com/users/snowcrshd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snowcrshd/subscriptions","organizations_url":"https://api.github.com/users/snowcrshd/orgs","repos_url":"https://api.github.com/users/snowcrshd/repos","events_url":"https://api.github.com/users/snowcrshd/events{/privacy}","received_events_url":"https://api.github.com/users/snowcrshd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-16T10:43:54Z","updated_at":"2016-11-16T10:43:54Z","closed_at":null,"body":"As I was working on issue #97, some things came to my attention and I would like to discuss them here.\r\n\r\nI'd like to add special syntax to our packages' YAML files in order to download the source files\r\nnecessary to build the RPM packages. I believe we should support the follow source files download use cases:\r\n\r\n1. Clone from a Git repository (probably the vast majority of our use cases)\r\n2. Clone from a Mercurial repository\r\n3. Download a tarball file from a URL\r\n4. A general command syntax to cover anything that does not fall in the previously mentioned use cases.\r\n\r\nBelow I list the proposed syntax for each case.\r\n\r\n1. Clone from a Git repository (probably the vast majority of our use cases)\r\n```\r\nPackage:\r\n name: 'servicelog'\r\n source:\r\n   git: url='https://github.com/open-power-host-os/servicelog.git' branch='hostos-devel'  commit_id='7d33cd3'\r\n   tar: src='servicelog' dest='servicelog.tar.gz'\r\n files:\r\n  centos:\r\n   '7.2':\r\n    spec: 'centOS/7.2/servicelog.spec'\r\n    dependencies:\r\n       - 'libservicelog'\r\n```\r\n\r\n2. Clone from a Mercurial repository\r\n```\r\nPackage:\r\n name: 'python-six'\r\n source:\r\n   hg: url='https://bitbucket.org/gutworth/six' branch='foo' changeset_id='7e95bb'\r\n   tar: src='six' dest='python-six.tar.gz'\r\n files:\r\n  centos:\r\n   '7.2':\r\n    spec: 'centOS/7.2/python-six.spec'\r\n    dependencies:\r\n       ...\r\n```\r\n\r\n3. Download a tarball file from a URL\r\n```\r\nPackage:\r\n name: 'python-foo'\r\n source:\r\n   url: src='https://example.com/foo.tar.gz' dest='python-foo.tar.gz' md5sum='3858f62230ac3c915f300c664312c63f'\r\n files:\r\n  centos:\r\n   '7.2':\r\n    spec: 'centOS/7.2/python-six.spec'\r\n    dependencies:\r\n       ...\r\n```\r\n\r\n4. A general command syntax to cover anything that does not fall in the previously mentioned use cases.\r\n```\r\nPackage:\r\n name: 'python-bar'\r\n source:\r\n   commands:\r\n     - curl http://example.com/bar.zip --output bar.zip\r\n     - unzip bar.zip\r\n     - cd  bar\r\n     - ./configure\r\n   tar: src='bar' dest='python-bar.tar.gz'\r\n files:\r\n  centos:\r\n   '7.2':\r\n    spec: 'centOS/7.2/python-six.spec'\r\n    dependencies:\r\n       ...\r\n```\r\n\r\nObviously, we should avoid to use the last form (4) as much as possible. But it is best to get all our bases covered, I think.\r\n\r\nWhat do you guys think of this syntax? Maybe there are other cases we should cover?\r\n\r\n@maurorodrigues @olavphibm @fabianorosas @mopsfelder"}}
{"actor":{"display_login":"snowcrshd"}}