8.7 KiB
Executable File
8.7 KiB
Executable File
Rules for declaring the compliance licenses used by a package.
license
license(name, copyright_notice, license_kinds, license_text, namespace, package_name, package_url, package_version)
ATTRIBUTES
| Name | Description | Type | Mandatory | Default |
|---|---|---|---|---|
| name | A unique name for this target. | Name | required | |
| copyright_notice | Copyright notice. | String | optional | "" |
| license_kinds | License kind(s) of this license. If multiple license kinds are listed in the LICENSE file, and they all apply, then all should be listed here. If the user can choose a single one of many, then only list one here. | List of labels | optional | [] |
| license_text | The license file. | Label | optional | LICENSE |
| namespace | A human readable name used to organize licenses into categories. This is used in google3 to differentiate third party licenses used for compliance versus internal licenses used by SLAsan for internal teams' SLAs. | String | optional | "" |
| package_name | A human readable name identifying this package. This may be used to produce an index of OSS packages used by an applicatation. | String | optional | "" |
| package_url | The URL this instance of the package was download from. This may be used to produce an index of OSS packages used by an applicatation. | String | optional | "" |
| package_version | A human readable version string identifying this package. This may be used to produce an index of OSS packages used by an applicatation. It should be a value that increases over time, rather than a commit hash. | String | optional | "" |
Proof of concept. License restriction.
license_kind
license_kind(name, canonical_text, conditions, long_name, url)
ATTRIBUTES
| Name | Description | Type | Mandatory | Default |
|---|---|---|---|---|
| name | A unique name for this target. | Name | required | |
| canonical_text | File containing the canonical text for this license. Must be UTF-8 encoded. | Label | optional | None |
| conditions | Conditions to be met when using software under this license. Conditions are defined by the organization using this license. | List of strings | required | |
| long_name | Human readable long name of license. | String | optional | "" |
| url | URL pointing to canonical license definition | String | optional | "" |
Rules for declaring metadata about a package.
package_info
package_info(name, package_name, package_url, package_version)
ATTRIBUTES
| Name | Description | Type | Mandatory | Default |
|---|---|---|---|---|
| name | A unique name for this target. | Name | required | |
| package_name | A human readable name identifying this package. This may be used to produce an index of OSS packages used by an applicatation. | String | optional | "" |
| package_url | The URL this instance of the package was download from. This may be used to produce an index of OSS packages used by an applicatation. | String | optional | "" |
| package_version | A human readable version string identifying this package. This may be used to produce an index of OSS packages used by an applicatation. It should be a value that increases over time, rather than a commit hash. | String | optional | "" |
Providers for license rules.
LicenseInfo
LicenseInfo(copyright_notice, label, license_kinds, license_text, namespace, package_name, package_url, package_version)
Provides information about a license instance.
FIELDS
Providers for license rules.
LicenseKindInfo
LicenseKindInfo(conditions, label, long_name, name)
Provides information about a license_kind instance.
FIELDS
Providers for license rules.
PackageInfo
PackageInfo(type, label, package_name, package_url, package_version)
Provides information about a package.
FIELDS