{"action":"created","issue":{"url":"https://api.github.com/repos/chef/omnibus/issues/635","repository_url":"https://api.github.com/repos/chef/omnibus","labels_url":"https://api.github.com/repos/chef/omnibus/issues/635/labels{/name}","comments_url":"https://api.github.com/repos/chef/omnibus/issues/635/comments","events_url":"https://api.github.com/repos/chef/omnibus/issues/635/events","html_url":"https://github.com/chef/omnibus/pull/635","id":140114347,"number":635,"title":"License reporting in omnibus","user":{"login":"sersut","id":1695955,"avatar_url":"https://avatars.githubusercontent.com/u/1695955?v=3","gravatar_id":"","url":"https://api.github.com/users/sersut","html_url":"https://github.com/sersut","followers_url":"https://api.github.com/users/sersut/followers","following_url":"https://api.github.com/users/sersut/following{/other_user}","gists_url":"https://api.github.com/users/sersut/gists{/gist_id}","starred_url":"https://api.github.com/users/sersut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sersut/subscriptions","organizations_url":"https://api.github.com/users/sersut/orgs","repos_url":"https://api.github.com/users/sersut/repos","events_url":"https://api.github.com/users/sersut/events{/privacy}","received_events_url":"https://api.github.com/users/sersut/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chef/omnibus/labels/in%20progress","name":"in progress","color":"ededed"},{"url":"https://api.github.com/repos/chef/omnibus/labels/Signed%20CLA","name":"Signed CLA","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-03-11T07:54:49Z","updated_at":"2016-03-14T17:32:18Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/chef/omnibus/pulls/635","html_url":"https://github.com/chef/omnibus/pull/635","diff_url":"https://github.com/chef/omnibus/pull/635.diff","patch_url":"https://github.com/chef/omnibus/pull/635.patch"},"body":"This PR adds omnibus the ability to collect and report license information for projects and software components that are being included. I will try my best to describe this feature below but if you have more detailed questions, hit me directly and we can chat. \r\n\r\nThis features targets two main scenarios:\r\n\r\n* As an enterprise user; I would like to see 1) \"the list of software components\", 2) \"the licenses these components are using\" and 3) \"the actual files that are referred by these licenses\" for the package that I am installing, so that I can check these against our companies open source licensing policy and make sure we are compliant.\r\n* As a developer, I would like to be informed about the licenses of the software components that are going into the package that I am building, so that I can ensure we are not including a software component with a license that is incompatible with our license.\r\n\r\nThis PR contains the MVP of this feature. You can see [this gist](https://gist.github.com/sersut/e1012c38e55a3890232b) with an example output created with https://github.com/chef/omnibus-software/pull/620 and https://github.com/chef/chef-server/pull/775.\r\n\r\nHere is a high level summary of this feature:\r\n\r\n- Adds 2 new DSL methods to software:\r\n  - `license`: The name of the license software is using.\r\n  - `license_file`: File that are part of the license for the software. Can be a partial path relative to the software's source directory or a URL. Can be used multiple times if license has more than 1 file.\r\n- Adds 3 new DSL methods to project:\r\n  - `license`: The name of the license project is using.\r\n  - `license_file`: File that contains the text of the license project is using.\r\n  - `license_file_path`: Path of the file that will be created under `install_dir` which will contain license information for the project.\r\n- Adds a new post-build stage to the build command. During this stage omnibus does two things:\r\n  - It copies the license files specified by software definitions to `#{install_dir}/LICENSES`\r\n  - It creates a file at `license_file_path` specified by the project that contains:\r\n    - project's name, version and license name. \r\n    - license name and list of file paths that belong to the license for each software\r\n  - If you use the special license type `:project_license` in software definitions, we skip adding that software's license information to the main license file. We use this for things like, `preparation`, `private-chef-cookbooks`, `private-chef-ctl`, etc..\r\n- Updates the version manifest files with the license name of each software.\r\nThere are many features that are missing to fulfill the above mentioned scenarios. Some that we have thought of are:\r\n* Add warnings to omnibus build output for important cases like software config that is missing license, license files that do not exist anymore, etc. **(next item)**\r\n* Add logic to catch licenses of hidden dependencies like gems that are being installed from rubygems during `bundle install` command runs.\r\n\r\nComments, questions, suggestions, error cases I have missed are much appreciated :smile: \r\n\r\n/cc: @chef/omnibus-maintainers, @jamesc "},"comment":{"url":"https://api.github.com/repos/chef/omnibus/issues/comments/196425341","html_url":"https://github.com/chef/omnibus/pull/635#issuecomment-196425341","issue_url":"https://api.github.com/repos/chef/omnibus/issues/635","id":196425341,"user":{"login":"sersut","id":1695955,"avatar_url":"https://avatars.githubusercontent.com/u/1695955?v=3","gravatar_id":"","url":"https://api.github.com/users/sersut","html_url":"https://github.com/sersut","followers_url":"https://api.github.com/users/sersut/followers","following_url":"https://api.github.com/users/sersut/following{/other_user}","gists_url":"https://api.github.com/users/sersut/gists{/gist_id}","starred_url":"https://api.github.com/users/sersut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sersut/subscriptions","organizations_url":"https://api.github.com/users/sersut/orgs","repos_url":"https://api.github.com/users/sersut/repos","events_url":"https://api.github.com/users/sersut/events{/privacy}","received_events_url":"https://api.github.com/users/sersut/received_events","type":"User","site_admin":false},"created_at":"2016-03-14T17:32:18Z","updated_at":"2016-03-14T17:32:18Z","body":"Nice catch @scotthain will do. \r\n\r\n@adamedx uri's are currently supported. No need to have a different DSL method for it. "}}