Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add functionality to extract Debian license data from copyright text #499

Closed
rnjudge opened this issue Nov 22, 2019 · 5 comments
Closed
Assignees
Labels
assigned This issue has been assigned to someone who is actively working on it super Super issue - other issues are linked to this one
Milestone

Comments

@rnjudge
Copy link
Contributor

rnjudge commented Nov 22, 2019

Describe the Feature
Debian packages do not contain license metadata. Instead, the license information is contained in the copyright text. This results in an empty license list when you run Tern with the default output against a Debian image/BaseOS.

Use Cases
This would be helpful for the default output of Tern, primarily when running against Debian base images.

Implementation Changes
Add a function that can parse the copyright text for the licenses in a Debian image and report it as the "License" field for a package.

@rnjudge rnjudge added the super Super issue - other issues are linked to this one label Nov 25, 2019
@nishakm nishakm added this to the Near Future milestone Feb 6, 2020
@nishakm
Copy link
Contributor

nishakm commented Feb 6, 2020

I was introduced to this project and I think it would be a good option to either incorporate or use as a dependency: https://github.com/nexB/debut

@nishakm nishakm added the GSoC For Google Summer of Code label Mar 27, 2020
@mukultaneja
Copy link
Contributor

@nishakm, I would like to work on this issue.

@nishakm nishakm removed the GSoC For Google Summer of Code label Apr 3, 2020
@nishakm
Copy link
Contributor

nishakm commented Apr 3, 2020

@rnjudge OK to reassign to @mukultaneja?

@rnjudge
Copy link
Contributor Author

rnjudge commented Apr 3, 2020

Sure!

@rnjudge rnjudge added the assigned This issue has been assigned to someone who is actively working on it label Apr 20, 2020
nishakm pushed a commit to nishakm/tern that referenced this issue May 20, 2020
A package will typically have many files within it which may have
different licenses that govern their distribution. This is why
debian typically contains all the licenses in their copyright text
rather than declare a package license. This change adds a pkg_licenses
property which is a list of strings that represent licenses within a
package. Tests for the new property are also added.

This is work towards tern-tools#499

Signed-off-by: mukultaneja <[email protected]>
Signed-off-by: Nisha K <[email protected]>
nishakm pushed a commit to nishakm/tern that referenced this issue May 20, 2020
We use a new pip package "debut" to parse Debian style copyright
texts.

- Added debut as a requirement.
- Added functions in common.py to parse the copyright texts and to
  collect a list of licenses for each package to be filled in a
  Package object.
- Added functions in the default generator to list all the package
  licenses found.
- Added a check for "deb" package format in order to parse the
  copyright text so this functionality is restricted to deb style
  packages only.

Fixes tern-tools#499

Signed-off-by: mukultaneja [email protected]
Signed-off-by: Nisha K <[email protected]>
nishakm pushed a commit to nishakm/tern that referenced this issue May 20, 2020
We use a new pip package "debut" to parse Debian style copyright
texts.

- Added debut as a requirement.
- Added functions in common.py to parse the copyright texts and to
  collect a list of licenses for each package to be filled in a
  Package object.
- Added functions in the default generator to list all the package
  licenses found.
- Added a check for "deb" package format in order to parse the
  copyright text so this functionality is restricted to deb style
  packages only.

Fixes tern-tools#499

Signed-off-by: mukultaneja <[email protected]>
Signed-off-by: Nisha K <[email protected]>
nishakm pushed a commit to nishakm/tern that referenced this issue May 20, 2020
A package will typically have many files within it which may have
different licenses that govern their distribution. This is why
debian typically contains all the licenses in their copyright text
rather than declare a package license. This change adds a pkg_licenses
property which is a list of strings that represent licenses within a
package. Tests for the new property are also added.

This is work towards tern-tools#499

Signed-off-by: mukultaneja <[email protected]>
Signed-off-by: Nisha K <[email protected]>
@rnjudge rnjudge modified the milestones: Near Future, Release 2.1.0 May 20, 2020
@rnjudge
Copy link
Contributor Author

rnjudge commented May 20, 2020

This issue was resolved with PR #694.

rnjudge pushed a commit to rnjudge/tern that referenced this issue Jun 5, 2020
A package will typically have many files within it which may have
different licenses that govern their distribution. This is why
debian typically contains all the licenses in their copyright text
rather than declare a package license. This change adds a pkg_licenses
property which is a list of strings that represent licenses within a
package. Tests for the new property are also added.

This is work towards tern-tools#499

Signed-off-by: mukultaneja <[email protected]>
Signed-off-by: Nisha K <[email protected]>
rnjudge pushed a commit to rnjudge/tern that referenced this issue Jun 5, 2020
We use a new pip package "debut" to parse Debian style copyright
texts.

- Added debut as a requirement.
- Added functions in common.py to parse the copyright texts and to
  collect a list of licenses for each package to be filled in a
  Package object.
- Added functions in the default generator to list all the package
  licenses found.
- Added a check for "deb" package format in order to parse the
  copyright text so this functionality is restricted to deb style
  packages only.

Fixes tern-tools#499

Signed-off-by: mukultaneja <[email protected]>
Signed-off-by: Nisha K <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assigned This issue has been assigned to someone who is actively working on it super Super issue - other issues are linked to this one
Projects
None yet
Development

No branches or pull requests

3 participants