Skip to content

system.licenses table #2890

Closed
Closed

Description

@filimonov

Most of open licenses require adding component license to final software distibution.

The common way to satisfy that requirement is to add "Licenses for Third-Party Components" section to LICENSE file (which is a part of ClickHouse distribution). Look for samples

Also quite nice and popular is simple listing of used 3rd party components with their licences without full text, just as a small listing https://softwareengineering.stackexchange.com/questions/234511/what-is-the-best-practice-for-arranging-third-party-library-licenses-paperwork

Activity

  1. added
    comp-documentation
    on Aug 17, 2018
  2. alexey-milovidov commented on Aug 17, 2018

    @alexey-milovidov
    Member

    Please clarify the requirement according to specific licenses (and quote the definition of "final software distibution").

  3. filimonov commented on Aug 17, 2018

    @filimonov
    ContributorAuthor
    Boost https://github.com/ClickHouse-Extras/boost/blob/2d5cb2c86f61126f4e1efe9ab97332efd44e7dea/LICENSE_1_0.txt#L10 Boost
    capnproto https://github.com/capnproto/capnproto/blob/7173ab638fdf144032411dc69fb1082cd473e08f/LICENSE#L1-L5 MIT
    cctz https://github.com/google/cctz/blob/4f9776a310f4952454636363def82c2bf6641d5f/LICENSE.txt Apache
    cityhash https://github.com/yandex/ClickHouse/blob/master/contrib/cityhash102/COPYING MIT
    double-conversion https://github.com/google/double-conversion/blob/cf2f0f3d547dc73b4612028a155b80536902ba02/LICENSE BSD 3
    googletest https://github.com/google/googletest/blob/d175c8bf823e709d570772b038757fadf63bc632/googletest/LICENSE
    jemalloc https://github.com/jemalloc/jemalloc/blob/41b7372eadee941b9164751b8d4963f915d3ceae/COPYING MIT
    libbtrie https://github.com/yandex/ClickHouse/blob/master/contrib/libbtrie/LICENSE MIT
    libcpuid https://github.com/yandex/ClickHouse/blob/master/contrib/libcpuid/COPYING MIT
    libdivide https://github.com/yandex/ClickHouse/blob/master/contrib/libdivide/LICENSE.txt https://github.com/ridiculousfish/libdivide/blob/master/LICENSE.txt
    libfarmhash https://github.com/yandex/ClickHouse/blob/master/contrib/libfarmhash/COPYING
    libmetrohash https://github.com/yandex/ClickHouse/blob/master/contrib/libmetrohash/LICENSE MIT
    libpcg-random https://github.com/yandex/ClickHouse/blob/master/contrib/libpcg-random/LICENSE-APACHE.txt Apache
    librdkafka https://github.com/edenhill/librdkafka/blob/7478b5ef16aadd6543fe38bc6a2deb895c70da98/LICENSE +3rd party https://github.com/edenhill/librdkafka/blob/7478b5ef16aadd6543fe38bc6a2deb895c70da98/LICENSES.txt
    libsparsehash https://github.com/yandex/ClickHouse/blob/master/contrib/libsparsehash/COPYING MIT
    libtcmalloc https://github.com/yandex/ClickHouse/blob/master/contrib/libtcmalloc/COPYING MIT
    libunwind https://github.com/yandex/ClickHouse/blob/master/contrib/libunwind/COPYING
    llvm + cmake + ll https://github.com/ClickHouse-Extras/llvm/blob/163def217817c90fb982a6daf384744d8472b92b/llvm/LICENSE.TXT
    lz4 https://github.com/lz4/lz4/blob/c10863b98e1503af90616ae99725ecd120265dfb/LICENSE (!) AWARE - don't use anything from outside of lib subfolder - it's GPL. BSD 2 Clause
    mariadb-connector-c https://github.com/MariaDB/mariadb-connector-c/blob/a0fd36cc5a5313414a5a2ebe9322577a29b4782a/COPYING.LIB LGPL (!!)
    murmurhash https://github.com/yandex/ClickHouse/blob/master/contrib/murmurhash/LICENSE
    poco https://github.com/ClickHouse-Extras/poco/blob/3df947389e6d9654919002797bdd86ed190b3963/LICENSE Boost
    re2 https://github.com/google/re2/blob/7cf8b88e8f70f97fd4926b56aa87e7f53b2717e0/LICENSE MIT
    libressl https://github.com/ClickHouse-Extras/ssl/blob/de02224a42c69e3d8c9112c82018816f821878d0/COPYING
    UnixODBC https://github.com/ClickHouse-Extras/UnixODBC/blob/b0ad30f7f6289c12b76f04bfb9d466374bb32168/COPYING LGPL
    zlib-ng https://github.com/ClickHouse-Extras/zlib-ng/blob/9173b89d46799582d20a30578e0aa9788bc7d6e1/LICENSE.md
    zstd-cmake https://github.com/yandex/ClickHouse/blob/8bc30c8b91d027093821dcdd0a2015dc4f93070f/contrib/zstd-cmake/CMakeLists.txt
    zstd https://github.com/facebook/zstd/blob/255597502c3a4ef150abc964e376d4202a8c2929/LICENSE
    sumbur hash https://github.com/yandex/ClickHouse/blob/924cc3451f97f4fbc15c83eb2b341cacb168806c/libs/libconsistent-hashing/mailru/sumbur.h MIT
    libglibc-compatibility/musl https://github.com/yandex/ClickHouse/blob/096fec65048aefd665651ba7f7ff5ddd4f684aea/libs/libglibc-compatibility/musl/COPYRIGHT MIT
    memrchr https://github.com/yandex/ClickHouse/blob/fbe7df73a24733f4ce0b133cb83b8acf962398a3/libs/libcommon/include/port/memrchr.h
    libmemcpy https://github.com/yandex/ClickHouse/blob/096fec65048aefd665651ba7f7ff5ddd4f684aea/libs/libmemcpy/impl/LICENSE MIT
    libpocoext https://github.com/yandex/ClickHouse/blob/137ad95929ee016cc6d3c03bccb5586941c163ff/libs/libpocoext/src/LevelFilterChannel.cpp
    docker-multiarch https://github.com/yandex/ClickHouse/blob/589899ac25089132ffa78365d289675807416345/ci/docker-multiarch/LICENSE MIT
  4. filimonov commented on Aug 17, 2018

    @filimonov
    ContributorAuthor

    Please clarify the requirement according to specific licenses (and quote the definition of "final software distibution").

    Generally most of licenses just force you to add copyright notice to "all copies or substantial portions of Software". So if you distribute some software in binary form (separate from sources) you shall include it, otherwise you're distributing the copy (in compiled form) without copyright notice :\

    Most often it's done either by putting it in LICENSE file, or in LICENSE-3RD-PARTY file (disributed with binary), or in About screen. In firefox for example it's in about:license, in chrome in chrome://credits/ etc.
    In ClickHouse you can create a system.credits table :D

  5. alexey-milovidov commented on Aug 19, 2018

    @alexey-milovidov
    Member

    We can implement system.licenses table with the list of components that was actually linked into the server. This is like to about:license page in Firefox and chrome://credits in Chromium.
    Also it will be nice to have system.contributors with the list of all contributors from the git log.

  6. changed the title [-]List 3rd party component licenses in ClickHouse license file[/-] [+]system.licenses table[/+] on Aug 2, 2019
  7. added and removed
    comp-documentation
    on Aug 2, 2019
  8. deleted a comment from stale on Dec 15, 2019
  9. alexey-milovidov commented on Dec 15, 2019

    @alexey-milovidov
    Member

    List of third-party libraries:

    milovidov@milovidov-Latitude-E7470:~/work/ClickHouse/build$ cat licenses.sh 
    #!/bin/bash
    
    jq --raw-output '.[].file' compile_commands.json | xargs dirname | sort | uniq | while read file
    do
        echo -n '.' 1>&2
    
        DIR=$file
        while [[ "$DIR" != '/' ]]
        do
            license=$(ls -1 "$DIR" | grep -iE '^(LICENSE|COPYING)' | sort -rV | head -n1)
            if [[ -n "$license" ]]
            then
                echo "$DIR/$license"
                break;
            fi
    
            DIR=$(readlink -f "$DIR/..")
        done
    done | sort | uniq
    

    (it cannot find header-only libraries)

    List of derived code in ClickHouse sources:

    milovidov@milovidov-Latitude-E7470:~/work/ClickHouse/build$ find ../dbms -name '*.h' -or -name '*.cpp' | xargs grep -iP '\bCopyright\b' | less
    
    milovidov@milovidov-Latitude-E7470:~/work/ClickHouse/build$ find ../libs -name '*.h' -or -name '*.cpp' | xargs grep -iP '\bCopyright\b' | less
    
  10. added a commit that references this issue on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions