komira
Licensed under the Apache License, Version 2.0 (see LICENSE).

This file records third-party material that text committed to this repository
is derived from, the third-party code compiled into the native files of the
Python wheel, and, in its last section, the third-party runtime that the
bundled flavour of the wheel carries and its external flavour and the conda
packages built from this repository depend on.
Material that
is only built or tested against (the C and C++ libraries of third_party/, the
toolchains) is fetched from pinned archives at build time and is not
committed; each is under its own license, which its archive carries.

Generated clients: text derived from Apache-2.0 inputs
------------------------------------------------------

The files under `src/*/generated/*/` are written by the generators of
tools/build/proto-codegen (see docs/design/generated_sources.md). Each file's
first lines name its generator and, where the generator pins them, the
sha256 of each input. Not every generated library derives from third-party
input: those generated from komira's own `.proto` files and models (for
example plan_proto, and records_db in db_sqlite) are komira's
own text. The inputs
themselves are not committed here; the archives are pinned by sha256 and
fetched at build time.

1. AWS clients (`komira_aws_*`). Generated from the AWS service models
   (`service-2.json`) and endpoint rulesets of botocore, pinned in
   third_party/botocore/BUCK (version and archive sha256 there). botocore is
   licensed under the Apache License, Version 2.0, and its NOTICE reads:

       Botocore
       Copyright 2012-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.

   (The rest of botocore's NOTICE concerns the vendorized parts of the
   `requests` and `urllib3` libraries and a bundle of CA root certificates
   inside botocore's Python code and data; none of that is read or
   reproduced here.) botocore's LICENSE.txt and NOTICE are extracted
   unmodified from the archive as `//third_party/botocore:files[LICENSE.txt]`
   and `[NOTICE]`.

2. Google Cloud clients (`komira_gcp_*`) and the modules of their googleapis
   protos. Generated from the `.proto` files of
   https://github.com/googleapis/googleapis (Apache License, Version 2.0; it
   ships no NOTICE), at the commit pinned in tools/vendor/googleapis/BUCK.
   The archive's LICENSE is extracted unmodified as
   `//tools/vendor/googleapis:googleapis[LICENSE]`. The copyright holder
   is Google LLC: the headers of the pinned protos read "Copyright <year>
   Google LLC" and the Apache-2.0 notice (checked on google/type/expr.proto,
   google/iam/v1/iam_policy.proto and
   google/cloud/secretmanager/v1/service.proto). The generated Mojo does not
   carry that header; this entry is where the attribution is.

The Apache License, Version 2.0 is at http://www.apache.org/licenses/LICENSE-2.0
and in the LICENSE file of this repository. The generated files are modified
forms of the inputs' definitions (their structure re-expressed as Mojo); they
are distributed here under the same license as the rest of komira.

Third-party code inside the native files
----------------------------------------

Two of the native owner libraries that libkomira links, and that the wheel
carries, hold third-party code compiled in (docs/design/wheel_licence_audit.md
lists every native file of the wheel). The other native files are komira's own
code, except the three Mojo runtime libraries the bundled flavour carries,
which are Modular's (the last section). Redistributed here in binary form, with the notices their licenses
require.

1. snappy 1.3.1, statically linked into `libkomira_compression_native.so.1`.
   BSD-3-Clause. Pinned in third_party/snappy/BUCK.

       Copyright 2011, Google Inc.
       All rights reserved.

       Redistribution and use in source and binary forms, with or without
       modification, are permitted provided that the following conditions are
       met:

           * Redistributions of source code must retain the above copyright
       notice, this list of conditions and the following disclaimer.
           * Redistributions in binary form must reproduce the above
       copyright notice, this list of conditions and the following disclaimer
       in the documentation and/or other materials provided with the
       distribution.
           * Neither the name of Google Inc. nor the names of its
       contributors may be used to endorse or promote products derived from
       this software without specific prior written permission.

       THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
       "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
       LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
       A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
       OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
       SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
       LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
       DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
       THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
       (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
       OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

   The archive's COPYING is extracted unmodified as
   `//third_party/snappy:src[COPYING]`; it is the text above.

2. Brotli 1.1.0 (the decoder only), statically linked into
   `libkomira_parquet_codec_native.so.1` with its symbols prefixed
   `komira_brotli_`. MIT. Pinned in third_party/brotli/BUCK.

       Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors.

       Permission is hereby granted, free of charge, to any person obtaining
       a copy of this software and associated documentation files (the
       "Software"), to deal in the Software without restriction, including
       without limitation the rights to use, copy, modify, merge, publish,
       distribute, sublicense, and/or sell copies of the Software, and to
       permit persons to whom the Software is furnished to do so, subject to
       the following conditions:

       The above copyright notice and this permission notice shall be
       included in all copies or substantial portions of the Software.

       THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
       EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
       MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
       NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
       LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
       OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
       WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

   The archive's LICENSE is extracted unmodified as
   `//third_party/brotli:src[LICENSE]`; it is the text above.

3. LLVM libc++ and libc++abi, from the Zig toolchain that builds the
   libraries, statically linked into `libkomira_compression_native.so.1`
   (snappy is C++) with their symbols local to it. Apache License, Version
   2.0 with LLVM Exceptions. The exception lets object code that embeds parts
   of the software be redistributed without the conditions of sections 4(a),
   4(b) and 4(d) of the License; it is recorded here regardless. The Apache
   License text is in LICENSE.

None of the other libraries the wheel's files need at run time is carried: not
the C++ runtime the Mojo runtime libraries need (libstdc++.so.6, libgcc_s.so.1),
not the system's glibc (`libc.so.6`, `libpthread.so.0`), and not the codec
libraries libz, liblz4, libzstd, libbz2 and liblzma, which komira opens by name
from the host when a file uses that codec. The libraries it does not carry
include no aws-lc, s2n-tls or other TLS library: none is linked.

The Mojo runtime: Modular's libraries, carried in the bundled wheel
-------------------------------------------------------------------

komira's libraries, the shared library libkomira among them, are compiled
by Modular's Mojo compiler and need the Mojo runtime libraries when they are
loaded (libKGENCompilerRTShared, libAsyncRTRuntimeGlobals and
libMSupportGlobals; .so on Linux, .dylib on macOS). These libraries are
Modular's, are not part of this repository, and are not covered by its
Apache License grant.

The Python wheel `komira` is built in two flavours (python/flavour.bzl), and a
release publishes one of them.

The bundled flavour carries these three files, unmodified, at
`komira/_lib/lib/`: libKGENCompilerRTShared.so, libAsyncRTRuntimeGlobals.so
and libMSupportGlobals.so, taken from the Mojo compiler package that compiled
libkomira (Modular's conda package `mojo-compiler` 1.0.0, pinned by sha256 in
tools/build/platforms/table.bzl). It carries no other file of Modular's.

The external flavour carries none of them and no other file of Modular's. It
declares a dependency on Modular's PyPI package `mojo-compiler` at the
compiler version libkomira was built with, which the user's package installer
fetches from PyPI under the licence that package declares, and it loads the
three libraries from where that package installs them. Its
License-Expression is `Apache-2.0`, and it carries LICENSE and this file
only. The paragraph below is about the bundled flavour.

The licence those files are distributed under is the one their package
states. That package's metadata declares `LicenseRef-Modular-Proprietary`,
and its licence file, `info/licenses/LICENSE`, is the Modular Community
License Terms; its `info/licenses/Third-Party-Notices` lists the third-party
components of Modular's software. Neither file, nor the three libraries,
states the Apache License: Modular's statement that Mojo is licensed under
the Apache License v2.0 with LLVM Exceptions is made for the source code it
publishes, and the package of these binary files does not repeat it. The
bundled wheel carries both files, unmodified, as `.dist-info/licenses/MODULAR_LICENSE`
and `.dist-info/licenses/MODULAR_THIRD_PARTY_NOTICES`, and its
License-Expression is `Apache-2.0 AND LicenseRef-Modular-Proprietary`: komira's
own files under the first, the three Mojo runtime libraries under the second.
docs/design/mojo_runtime_pypi_vs_conda.md records where each statement was
read.

komira's conda packages carry none of these libraries. Each declares a
dependency on Modular's `mojo-compiler` conda package at the compiler version
the libraries were built with, and the user's package installer fetches that
package from Modular's channel under the licence that package declares. A
conda package carries only LICENSE.

`mojo_bundle` outputs (tools/build/package), such as the base image under
packaging/images, also carry the Mojo runtime libraries in their `lib/`.
