├── CODEOWNERS ├── .github └── workflows │ └── linting.yml ├── .markdownlint.yml ├── Makefile ├── README.md ├── docs ├── REQUIREMENTS.md └── proposals │ └── PROPOSAL_A.md ├── GOVERNANCE.md ├── CONTRIBUTING.md └── LICENSE /CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @dfr @samuelkarp @emaste @gtewallace 2 | -------------------------------------------------------------------------------- /.github/workflows/linting.yml: -------------------------------------------------------------------------------- 1 | name: Render and Lint Documentation 2 | 3 | on: 4 | pull_request: 5 | branches_ignore: [] 6 | 7 | jobs: 8 | build: 9 | runs-on: ubuntu-latest 10 | 11 | name: Linting 12 | steps: 13 | 14 | - uses: actions/checkout@v3 15 | 16 | - name: Lint 17 | run: | 18 | make lint 19 | -------------------------------------------------------------------------------- /.markdownlint.yml: -------------------------------------------------------------------------------- 1 | # all lists use a `-` 2 | MD004: 3 | style: dash 4 | 5 | # allow tabs in code blocks (for Go) 6 | MD010: 7 | code_blocks: false 8 | 9 | # disable line length, prefer one sentence per line for PRs 10 | MD013: false 11 | 12 | # emphasis with underscore (`_emphasis_`) 13 | MD049: 14 | style: "underscore" 15 | 16 | # bold with asterisk (`**bold**`) 17 | MD050: 18 | style: "asterisk" 19 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | DOCKER ?= $(shell command -v docker 2>/dev/null) 2 | MARKDOWN_LINT_VER?=latest 3 | 4 | default: lint 5 | 6 | .PHONY: lint 7 | lint: lint-md ## Run all linters 8 | 9 | .PHONY: lint-md 10 | lint-md: ## Run linting for markdown 11 | docker run --rm -v "$(PWD):/workdir:ro" docker.io/davidanson/markdownlint-cli2:$(MARKDOWN_LINT_VER) \ 12 | "**/*.md" 13 | 14 | .PHONY: help 15 | help: # Display help 16 | @awk -F ':|##' '/^[^\t].+?:.*?##/ { printf "\033[36m%-30s\033[0m %s\n", $$1, $$NF }' $(MAKEFILE_LIST) 17 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OCI Working Group: Template 2 | 3 | ## Mission Statement 4 | 5 | Define changes to existing specifications and new specifications needed to 6 | support the OCI runtime on the FreeBSD platform. 7 | 8 | ## Background 9 | 10 | Here is the [link](https://github.com/opencontainers/tob/blob/main/proposals/wg-freebsd-runtime.md) 11 | to the original proposal to create this working group. 12 | 13 | ## Governance 14 | 15 | Link to [governance](./GOVERNANCE.md) document. 16 | 17 | ## Meetings 18 | 19 | - WG Meeting: NEW NEW DAY AND TIME_[Monday at 11:30 Eastern](https://us06web.zoom.us/j/89400251044?pwd=bthdC5BOwQlahSaKlCxOFKSJ5PZba7.1)_ (bi-weekly beginning July 15, 2024). [Convert to your timezone](https://dateful.com/convert/...). 20 | - [Meeting notes and Agenda](https://hackmd.io/hq_NOVL4RZS7xYYMqfJ6-A). 21 | - [Archive of Past Minutes](./minutes). 22 | 23 | ## Documents 24 | 25 | The following documents are being produced by the working group: 26 | 27 | | Document | Description | 28 | |----------|-------------| 29 | | [Requirements](./docs/REQUIREMENTS.md) | A list of requirements identified by the WG | 30 | | [...](./docs/...) | _Description of the doc_ | 31 | 32 | ## Contributing 33 | 34 | Details for issues and pull requests are described in the [contributing guidelines](CONTRIBUTING.md). 35 | 36 | ## Organizers 37 | 38 | - Doug Rabson (@dfr) 39 | - Samuel Karp (@samuelkarp) 40 | - Ed Maste (@emaste) 41 | - Dave Cottlehuber (@dch) 42 | 43 | ## Contact 44 | 45 | - Slack: [#wg-freebsd-runtime](https://opencontainers.slack.com/messages/wg-freebsd-runtime) 46 | -------------------------------------------------------------------------------- /docs/REQUIREMENTS.md: -------------------------------------------------------------------------------- 1 | # Requirements 2 | 3 | This document contains a list of requirements identified 4 | to be considered in all proposals originating from this WG. 5 | 6 | The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" are to be interpreted as described in [RFC 2119](https://tools.ietf.org/html/rfc2119) (Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997). 7 | 8 | ## Definitions 9 | 10 | - **Namespace**: A namespace allows a container to have its own isolated 11 | instance of a system resource. When using FreeBSD jails, this can be network, 12 | UTS or IPC. 13 | 14 | ## User Stories 15 | 16 | 1. As a user, I want control over which namespaces are private to a container 17 | and which are shared with the host. 18 | 2. As a user, I want to be able to define groups of containers which share 19 | namespaces. 20 | 3. As a user, I want control over resources used by a container, in particular 21 | CPU, memory and possibly network usage. 22 | 4. As a user, I want control over which devices are available inside a 23 | container, for instance to allow a container access to GPU functions or other 24 | hardware. 25 | 5. As a user, I want control over whether a container can mount filesystems and 26 | which types of filesystems can be mounted. 27 | 6. As a user, I want containers to be able to support nesting, for instance to 28 | allow the use of engines such as Podman or containerd inside the 29 | container. 30 | -------------------------------------------------------------------------------- /GOVERNANCE.md: -------------------------------------------------------------------------------- 1 | # Working Group Governance 2 | 3 | ## Discussion 4 | 5 | - Discussions take place during [weekly meetings](./README.md#meetings) and in GitHub issues. 6 | 7 | Working group members and owners shall follow the [OCI code of conduct](https://github.com/opencontainers/.github/blob/master/CODE_OF_CONDUCT.md) 8 | 9 | ## Documentation 10 | 11 | - Consensus shall be documented in the form of GitHub issues that can be referenced in pull requests. 12 | 13 | ## Owner Duties 14 | 15 | The list of current owners shall be recorded in the [CODEOWNERS](./CODEOWNERS) document. 16 | 17 | - Owners shall be responsible for overseeing documentation of community decisions, consensus, and resolution of conflicts. 18 | - Owners shall provide timely feedback to requests for review and promptly merge approved Pull Requests. 19 | - Owners shall operate in good faith and trust in the community and in each other. 20 | - Owners shall keep the documentation, issues, and discussion topics as up-to-date as possible. 21 | - In the event an owner cannot perform their duties or have been inactive for a period of time, an interim or permanent replacement shall be nominated from the community. 22 | - Consensus on unblocking inactivity or deadlock must be reached in a community meeting and recorded in the meeting minutes. 23 | - Any member from the community may volunteer to be a owner as long as they pledge to follow the OCI code of conduct and perform these duties. 24 | 25 | ## Conflict Resolution 26 | 27 | - Conflicts that cannot be resolved within the group shall be referred to the OCI Technical Oversight Board (TOB) as per [section 5.xv](https://github.com/opencontainers/tob/blob/main/CHARTER.md#5-technical-developer-community) of the TOB Charter. 28 | - Resolution of the conflict shall be documented on this GitHub repository's issues which can be referred to in a pull request. 29 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | ## Issues 4 | 5 | Issues are welcome for discussing proposed changes or asking questions. 6 | 7 | ## Code style 8 | 9 | This project attempts to follow these principles: 10 | 11 | - Linters and other style formatting tools are used, please run `make lint` before committing changes. 12 | 13 | ## Pull requests 14 | 15 | PRs are welcome following the below guides: 16 | 17 | - For anything beyond a minor fix, opening an issue is suggested to discuss possible solutions. 18 | - Changes should be rebased on the main branch. 19 | - Changes should be squashed to a single commit per logical change. 20 | 21 | All changes must be signed (`git commit -s`) to indicate you agree to the [Developer Certificate or Origin](https://developercertificate.org/): 22 | 23 | ```text 24 | Developer Certificate of Origin 25 | Version 1.1 26 | 27 | Copyright (C) 2004, 2006 The Linux Foundation and its contributors. 28 | 29 | Everyone is permitted to copy and distribute verbatim copies of this 30 | license document, but changing it is not allowed. 31 | 32 | 33 | Developer's Certificate of Origin 1.1 34 | 35 | By making a contribution to this project, I certify that: 36 | 37 | (a) The contribution was created in whole or in part by me and I 38 | have the right to submit it under the open source license 39 | indicated in the file; or 40 | 41 | (b) The contribution is based upon previous work that, to the best 42 | of my knowledge, is covered under an appropriate open source 43 | license and I have the right under that license to submit that 44 | work with modifications, whether created in whole or in part 45 | by me, under the same open source license (unless I am 46 | permitted to submit under a different license), as indicated 47 | in the file; or 48 | 49 | (c) The contribution was provided directly to me by some other 50 | person who certified (a), (b) or (c) and I have not modified 51 | it. 52 | 53 | (d) I understand and agree that this project and the contribution 54 | are public and that a record of the contribution (including all 55 | personal information I submit with it, including my sign-off) is 56 | maintained indefinitely and may be redistributed consistent with 57 | this project or the open source license(s) involved. 58 | ``` 59 | 60 | The sign-off will include the following message in your commit: 61 | 62 | ```text 63 | Signed-off-by: Your Name 64 | ``` 65 | 66 | This needs to be your real name, no aliases please. 67 | -------------------------------------------------------------------------------- /docs/proposals/PROPOSAL_A.md: -------------------------------------------------------------------------------- 1 | # Proposal A - FreeBSD Jails 2 | 3 | This proposal recommends changes to describe the requirements for mapping an OCI 4 | runtime container to a corresponding FreeBSD jail. 5 | 6 | ## Modifications 7 | 8 | This suggests adding an object to the [FreeBSD-specific section](https://github.com/opencontainers/runtime-spec/blob/main/config.md#platform-specific-configuration) of the [container configuration](https://github.com/opencontainers/runtime-spec/blob/main/config.md) to describe the required parameters for the jail. 9 | 10 | ## Jail Configuration 11 | 12 | Jail parameters and devfs rules for the container's jail 13 | 14 | **`devices`** _(array of object, OPTIONAL)_ - devfs rules for this container. 15 | 16 | Each element is an object with the following fields: 17 | 18 | - **`path`** _(string, REQUIRED)_ - the device path relative to "/dev" 19 | - **`mode`** _(integer, OPTIONAL)_ - device permissions as an integer which is interpreted as in chmod(1). 20 | 21 | **`jail`** _(object, OPTIONAL)_ jail parameters for this container. 22 | 23 | The following parameters can be specified for for the container jail: 24 | 25 | - **`parent`** _(string, OPTIONAL)_ - parent jail. 26 | The value is the name of a jail which should be this container's parent (defaults to none). This can be used to share namespaces such as vnet with another container. 27 | - **`host`** _(string, OPTIONAL)_ - allow overriding hostname, domainname, hostuuid and hostid. 28 | The value can be "new" which allows these values to be overridden in the container or "inherit" to use the host values (or parent container values). If set to "new", the values for hostname and domainname are taken from the base config, if present. 29 | - **`ip4`** _(string, OPTIONAL)_ - control the availability of IPv4 addresses. 30 | This is typically left unset if the container has a vnet, set to "inherit" to allow access to host (or parent container) addresses or set to "disable" to stop use of IPv4 entirely. 31 | - **`ip6`** _(string, OPTIONAL)_ - control the availability of IPv6 addresses. 32 | This is typically left unset if the container has a vnet, set to "inherit" to allow access to host (or parent container) addresses or set to "disable" to stop use of IPv6 entirely. 33 | - **`vnet`** _(string, OPTIONAL)_ - control the vnet used for this container. 34 | The value can be "new" which causes a new vnet to be created for the container or "inherit" which shares the vnet for the parent container (or host if there is no parent). 35 | - **`sysvmsg`** _(string, OPTIONAL)_ - allow access to SYSV IPC message primitives. 36 | If set to "inherit", all IPC objects on the system are visible to this container, whether they were created by the container itself, the base system, or other containers. If set to "new", the container will have its own key namespace, and can only see the objects that it has created; the system (or parent container) has access to the container's objects, but not to its keys. If set to "disable", the container cannot perform any sysvmsg-related system calls. 37 | - **`sysvsem`** _(string, OPTIONAL)_ - allow access to SYSV IPC semaphore primitives, in the same manner as sysvmsg. 38 | - **`sysvshm`** _(string, OPTIONAL)_ - allow access to SYSV IPC shared memory primitives, in the same manner as sysvmsg. 39 | - **`enforceStatfs`** _(integer, OPTIONAL)_ - control visibility of mounts in the container. 40 | A value of 0 allows visibility of all host mounts, 1 allows visibility of mounts nested under the container's root and 2 only allows the container root to be visible. If unset, the default value is 2. 41 | - **`allow`** _(object, OPTIONAL)_ - Some restrictions of the container environment may be set on a per-container basis. With the exception of **`setHostname`** and **`reservedPorts`**, these boolean parameters are off by default. 42 | - **`setHostname`** _(bool, OPTIONAL)_ - Allow the container's hostname to be changed. 43 | - **`rawSockets`** _(bool, OPTIONAL)_ - Allow the container to use raw sockets to support network utilities such as ping and traceroute. 44 | - **`chflags`** _(bool, OPTIONAL)_ - Allow the system file flags to be changed. 45 | - **`mount`** _(array of strings, OPTIONAL)_ - Allow the listed filesystem types to be mounted and unmounted in the container. 46 | - **`quotas`** _(bool, OPTIONAL)_ - Allow the filesystem quotas to be changed in the container. 47 | - **`socketAf`** _(bool, OPTIONAL)_ - Allow socket types other than IPv4, IPv6 and unix. 48 | - **`reservedPorts`** _(bool, OPTIONAL)_ - Allow the jail to bind to ports lower than 1024. 49 | - **`suser`** _(bool, OPTIONAL)_ - The value of the jail's security.bsd.suser_enabled sysctl. The super-user will be disabled automatically if its parent system has it disabled. The super-user is enabled by default. 50 | 51 | ### Mapping from jail(8) config file 52 | 53 | This table shows how to map settings from a typical jail(8) config file to the proposed JSON format. 54 | 55 | | Jail parameter | JSON equivalent | 56 | | -------------- | -------------------- | 57 | | jid | - | 58 | | name | see below | 59 | | path | root.path | 60 | | ip4.addr | - | 61 | | ip4.saddrsel | - | 62 | | ip4 | freebsd.jail.ip4 | 63 | | ip6.addr | - | 64 | | ip6.saddrsel | - | 65 | | ip6 | freebsd.jail.ip6 | 66 | | vnet | freebsd.jail.vnet | 67 | | host.hostname | hostname | 68 | | host | freebsd.jail.host | 69 | | sysvmsg | freebsd.jail.sysvmsg | 70 | | sysvsem | freebsd.jail.sysvsem | 71 | | sysvshm | freebsd.jail.sysvshm | 72 | | securelevel | - | 73 | | devfs_ruleset | see below | 74 | | children.max | see below | 75 | | enforce_statfs | freebsd.jail.enforceStatfs | 76 | | persist | - | 77 | | parent | freebsd.jail.parent | 78 | | osrelease | - | 79 | | osreldate | - | 80 | | allow.set_hostname | freebsd.jail.allow.setHostname | 81 | | allow.sysvipc | freebsd.jail.allow.sysvipc | 82 | | allow.raw_sockers | freebsd.jail.allow.rawSockets | 83 | | allow.chflags | freebsd.jail.allow.chflags | 84 | | allow.mount | freebsd.jail.allow.mount | 85 | | allow.quotas | freebsd.jail.allow.quotas | 86 | | allow.read_msgbuf | - | 87 | | allow.socket_af | freebsd.jail.allow.socketAf | 88 | | allow.mlock | - | 89 | | allow.nfsd | - | 90 | | allow.reserved_ports | freebsd.jail.allow.reservedPorts | 91 | | allow.unprivileged_proc_debug | - | 92 | | allow.suser | freebsd.jail.allow.suser | 93 | | allow.mount.* | see below | 94 | 95 | The jail name is set to the create command's `container-id` argument. 96 | 97 | Network addresses are typically managed by the host (e.g. using CNI or netavark) to we do not include a mapping for `ip4.addr` or `ip6.addr`. 98 | 99 | The `devfs_ruleset` parameter is only required for jails which create new `devfs` mounts - typically OCI runtimes will mount `devfs` on the host. The value is a rule set number - these rule sets are defined on the host, typically via /etc/defaults/devfs.rules and /etc/default/devfs.rules or using the `devfs` command line utility. 100 | 101 | The `children.max` parameter is managed by the OCI runtime e.g when a new container shares namespaces with an existing container. 102 | 103 | The `allow.mount.*` parameter set is extensible - this proposal suggests representing allowed mount types as an array. As with `devfs`, typically the OCI runtime will manage mounts for the container by performing mount operations on the host. 104 | 105 | Jail parameters not supported by this runtime extension are marked with "-". These parameters will have their default values - see the jail(8) man page for details. 106 | 107 | ### Example 108 | 109 | An example config for a container with its own host and network namespaces. This 110 | container is allowed to see its own mounts and can use raw 111 | sockets. In addition to the minimal set of devices in the container devfs, 112 | `/dev/pf` is exposed, allowing the container to manage firewall rules etc. in its 113 | network namespace. 114 | 115 | ```json 116 | { 117 | "ociVersion": "1.1.0", 118 | "hostname": "mycontainer", 119 | "process": { 120 | "cwd": "/", 121 | "env": ["PATH=/bin:/sbin:/usr/bin:/usr/sbin"], 122 | "args": ["freebsd-version"] 123 | } 124 | "mounts": [ 125 | { 126 | "destination": "/dev", 127 | "options": ["ruleset=4"], 128 | "source": "devfs", 129 | "type": "devfs" 130 | }, 131 | { 132 | "destination": "/dev/fd", 133 | "source": "fdesc", 134 | "type": "fdescfs" 135 | } 136 | ], 137 | "root": { 138 | "path": "/path/to/container/root" 139 | }, 140 | "freebsd": { 141 | "devices": [ 142 | { 143 | "path": "pf", 144 | "mode": "0700", 145 | } 146 | ], 147 | "jail": { 148 | "host": "new", 149 | "vnet": "new", 150 | "enforceStatfs": 1, 151 | "allow": { 152 | "rawSockets": true, 153 | "chflags": true 154 | } 155 | } 156 | } 157 | } 158 | ``` 159 | 160 | This example shows a config for a container which is allowed to mount new tmpfs 161 | instances: 162 | 163 | ```json 164 | { 165 | "ociVersion": "1.1.0", 166 | "hostname": "mycontainer", 167 | "process": { 168 | "cwd": "/", 169 | "env": ["PATH=/bin:/sbin:/usr/bin:/usr/sbin"], 170 | "args": ["freebsd-version"] 171 | } 172 | "mounts": [ 173 | { 174 | "destination": "/dev", 175 | "options": ["ruleset=4"], 176 | "source": "devfs", 177 | "type": "devfs" 178 | }, 179 | { 180 | "destination": "/dev/fd", 181 | "source": "fdesc", 182 | "type": "fdescfs" 183 | } 184 | ], 185 | "root": { 186 | "path": "/path/to/container/root" 187 | }, 188 | "freebsd": { 189 | "jail": { 190 | "host": "new", 191 | "vnet": "new", 192 | "enforceStatfs": 1, 193 | "allow": { 194 | "rawSockets": true, 195 | "chflags": true, 196 | "mount": [ 197 | "tmpfs" 198 | ] 199 | } 200 | } 201 | } 202 | } 203 | ``` 204 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] The Linux Foundation 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | --------------------------------------------------------------------------------