diff --git a/.github/workflows/reuse.yml b/.github/workflows/reuse.yml new file mode 100644 index 00000000..167a3dcc --- /dev/null +++ b/.github/workflows/reuse.yml @@ -0,0 +1,13 @@ +name: REUSE Compliance + +on: [push, pull_request] + +permissions: + contents: read + +jobs: + reuse: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: fsfe/reuse-action@676e2d560c9a403aa252096d99fcab3e1132b0f5 # v6.0.0 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dcf67018..f220d699 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -60,6 +60,19 @@ If you're contributing code to the libvalkey project in any other form, includin sending a code fragment or patch via private email or public discussion groups, you need to ensure that the contribution is in accordance with the DCO. +## Licensing and REUSE compliance + +This project follows the [REUSE specification](https://reuse.software/) for licensing. +Copyright and license information for all files is declared in `REUSE.toml`. + +When adding new files: + +- If the file is a new contribution by the project (libvalkey contributors), no action is needed — the wildcard entry covers it. +- If the file originates from another project or has a different copyright holder, add a corresponding entry in `REUSE.toml`. +- If the file uses a license not already in `LICENSES/`, add the license text as `LICENSES/.txt`. + +The CI runs `reuse lint` to verify compliance on every push and pull request. + ## Coding conventions ### Code style diff --git a/LICENSES/BSD-2-Clause.txt b/LICENSES/BSD-2-Clause.txt new file mode 100644 index 00000000..f7eb17ab --- /dev/null +++ b/LICENSES/BSD-2-Clause.txt @@ -0,0 +1,24 @@ +BSD 2-Clause License + +Copyright (c) . All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. 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. + +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 HOLDER 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. diff --git a/LICENSES/BSD-3-Clause.txt b/LICENSES/BSD-3-Clause.txt new file mode 100644 index 00000000..d900bf51 --- /dev/null +++ b/LICENSES/BSD-3-Clause.txt @@ -0,0 +1,28 @@ +BSD 3-Clause License + +Copyright (c) . All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. 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. + +3. Neither the name of the copyright holder 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 HOLDER 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. diff --git a/LICENSES/FSFAP.txt b/LICENSES/FSFAP.txt new file mode 100644 index 00000000..77e9f451 --- /dev/null +++ b/LICENSES/FSFAP.txt @@ -0,0 +1,4 @@ +Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without any warranty. diff --git a/LICENSES/MIT.txt b/LICENSES/MIT.txt new file mode 100644 index 00000000..242da623 --- /dev/null +++ b/LICENSES/MIT.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) + +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. diff --git a/REUSE.toml b/REUSE.toml new file mode 100644 index 00000000..c821dad1 --- /dev/null +++ b/REUSE.toml @@ -0,0 +1,49 @@ +version = 1 + +# Based on hiredis (https://github.com/redis/hiredis) +# See individual files for detailed copyright information. +[[annotations]] +path = "**" +precedence = "aggregate" +SPDX-FileCopyrightText = "2024-present, libvalkey contributors" +SPDX-License-Identifier = "BSD-3-Clause" + +# Files originating from hiredis-vip (https://github.com/vipshop/hiredis-vip) +[[annotations]] +path = [ + "src/cluster.c", + "include/valkey/cluster.h", + "src/vkutil.c", + "src/vkutil.h", + "src/command.c", + "src/command.h", + "src/win32.h", +] +precedence = "aggregate" +SPDX-FileCopyrightText = [ + "2015-2017, Ieshen Zheng ", + "2020, Nick ", + "2020-2021, Bjorn Svensson ", + "2020-2021, Viktor Söderqvist ", + "2021, Red Hat", + "2024-present, libvalkey contributors", +] +SPDX-License-Identifier = "BSD-3-Clause" + +[[annotations]] +path = "include/valkey/adapters/qt.h" +precedence = "aggregate" +SPDX-FileCopyrightText = "2014, Pietro Cerutti " +SPDX-License-Identifier = "BSD-2-Clause" + +[[annotations]] +path = "src/ffc.h" +precedence = "aggregate" +SPDX-FileCopyrightText = "2021, The fast_float authors" +SPDX-License-Identifier = "MIT" + +[[annotations]] +path = "tests/scripts/simulated-valkey.pl" +precedence = "aggregate" +SPDX-FileCopyrightText = "2020, Ericsson Software Technology " +SPDX-License-Identifier = "FSFAP"