diff --git a/.reuse/dep5 b/.reuse/dep5 new file mode 100644 index 000000000..5cbd807fe --- /dev/null +++ b/.reuse/dep5 @@ -0,0 +1,111 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Redict +Upstream-Contact: Drew DeVault +Source: https://redict.io + +# Trivial files +Files: .gitignore src/.gitignore tests/tmp/.gitignore .gitattributes +Copyright: 2024 Salvatore Sanfilippo +License: BSD-3-Clause + +Files: utils/hyperloglog/.gitignore tests/sentinel/tmp/.gitignore tests/cluster/tmp/.gitignore +Copyright: 2024 Salvatore Sanfilippo +License: BSD-3-Clause + +Files: src/modules/.gitignore utils/create-cluster/.gitignore utils/create-cluster/README +Copyright: 2024 Salvatore Sanfilippo +License: BSD-3-Clause + +Files: src/valgrind.sup +Copyright: 2024 Salvatore Sanfilippo +License: BSD-3-Clause + +Files: src/commands.def +Copyright: 2024 Salvatore Sanfilippo +License: BSD-3-Clause + +Files: redict.conf sentinel.conf tests/sentinel/tests/includes/sentinel.conf +Copyright: 2024 Salvatore Sanfilippo +License: BSD-3-Clause + +Files: *.md BUGS INSTALL MANIFESTO Makefile 00-RELEASENOTES +Copyright: 2024 Salvatore Sanfilippo +License: BSD-3-Clause + +Files: tests/assets/* +Copyright: 2024 Salvatore Sanfilippo +License: BSD-3-Clause + +Files: tests/modules/Makefile +Copyright: 2024 Salvatore Sanfilippo +License: BSD-3-Clause + +Files: deps/Makefile deps/README.md +Copyright: 2024 Salvatore Sanfilippo +License: BSD-3-Clause + +Files: utils/*.service utils/*.txt utils/lru/README +Copyright: 2024 Salvatore Sanfilippo +License: BSD-3-Clause + +# Other +Files: src/commands/* +Copyright: 2024 Salvatore Sanfilippo +License: BSD-3-Clause + +# Vendored dependencies +Files: deps/fpconv/* +Copyright: 2021 Redis Labs +License: BSL-1.0 + +Files: deps/fpconv/* +Copyright: 2013-2019 night-shift +License: BSL-1.0 + +Files: deps/fpconv/* +Copyright: 2009 Florian Loitsch < florian.loitsch at inria dot fr > +License: BSL-1.0 + +Files: deps/lua/* +Copyright: 1994-2012 Lua.org, PUC-Rio. +License: MIT + +Files: deps/linenoise/* +Copyright: 2010-2016, Salvatore Sanfilippo +License: BSD-2-Clause + +Files: deps/linenoise/* +Copyright: 2010-2013, Pieter Noordhuis +License: BSD-2-Clause + +Files: deps/jemalloc/* +Copyright: 2002-present Jason Evans +License: BSD-2-Clause + +Files: deps/jemalloc/* +Copyright: 2007-2012 Mozilla Foundation +License: BSD-2-Clause + +Files: deps/jemalloc/* +Copyright: 2009-present Facebook, Inc +License: BSD-2-Clause + +Files: deps/hiredis/* +Copyright: 2009-2011, Salvatore Sanfilippo +License: BSD-3-Clause + +Files: deps/hiredis/* +Copyright: 2010-2011, Pieter Noordhuis +License: BSD-3-Clause + +Files: deps/hdr_histogram/* +Copyright: 2012, 2013, 2014 Gil Tene +License: BSD-2-Clause + +Files: deps/hdr_histogram/* +Copyright: 2014 Michael Barker +License: BSD-2-Clause + +Files: deps/hdr_histogram/* +Copyright: 2014 Matt Warren +License: BSD-2-Clause diff --git a/LICENSES/BSD-2-Clause.txt b/LICENSES/BSD-2-Clause.txt new file mode 100644 index 000000000..5f662b354 --- /dev/null +++ b/LICENSES/BSD-2-Clause.txt @@ -0,0 +1,9 @@ +Copyright (c) + +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 000000000..a381681a1 --- /dev/null +++ b/LICENSES/BSD-3-Clause.txt @@ -0,0 +1,10 @@ +Copyright (c) 2006-2020, Salvatore Sanfilippo +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 Redis 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. diff --git a/LICENSES/BSL-1.0.txt b/LICENSES/BSL-1.0.txt new file mode 100644 index 000000000..2d87ab1a9 --- /dev/null +++ b/LICENSES/BSL-1.0.txt @@ -0,0 +1,7 @@ +Boost Software License - Version 1.0 - August 17th, 2003 + +Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following: + +The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor. + +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, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN 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/LICENSES/GPL-3.0-only.txt b/LICENSES/GPL-3.0-only.txt new file mode 100644 index 000000000..f6cdd22a6 --- /dev/null +++ b/LICENSES/GPL-3.0-only.txt @@ -0,0 +1,232 @@ +GNU GENERAL PUBLIC LICENSE +Version 3, 29 June 2007 + +Copyright © 2007 Free Software Foundation, Inc. + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + +Preamble + +The GNU General Public License is a free, copyleft license for software and other kinds of works. + +The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. + +To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. + +For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. + +Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. + +For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. + +Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. + +Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. + +The precise terms and conditions for copying, distribution and modification follow. + +TERMS AND CONDITIONS + +0. Definitions. + +“This License” refers to version 3 of the GNU General Public License. + +“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. + +“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. + +To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. + +A “covered work” means either the unmodified Program or a work based on the Program. + +To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. + +To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. + +An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. + +1. Source Code. +The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work. + +A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. + +The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. + +The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. + +The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. + +The Corresponding Source for a work in source code form is that same work. + +2. Basic Permissions. +All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. + +You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. + +Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. + +3. Protecting Users' Legal Rights From Anti-Circumvention Law. +No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. + +When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. + +4. Conveying Verbatim Copies. +You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. + +You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. + +5. Conveying Modified Source Versions. +You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”. + + c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. + +A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. + +6. Conveying Non-Source Forms. +You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: + + a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. + + d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. + +A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. + +A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. + +“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. + +If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). + +The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. + +Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. + +7. Additional Terms. +“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. + +When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. + +Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or authors of the material; or + + e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. + +All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. + +If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. + +Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. + +8. Termination. +You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). + +However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. + +Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. + +Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. + +9. Acceptance Not Required for Having Copies. +You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. + +10. Automatic Licensing of Downstream Recipients. +Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. + +An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. + +You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. + +11. Patents. +A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. + +A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. + +Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. + +In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. + +If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. + +If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. + +A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. + +Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. + +12. No Surrender of Others' Freedom. +If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. + +13. Use with the GNU Affero General Public License. +Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. + +14. Revised Versions of this License. +The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. + +If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. + +Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. + +15. Disclaimer of Warranty. +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +16. Limitation of Liability. +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +17. Interpretation of Sections 15 and 16. +If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + +If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box”. + +You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . + +The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . diff --git a/LICENSES/MIT.txt b/LICENSES/MIT.txt new file mode 100644 index 000000000..2071b23b0 --- /dev/null +++ b/LICENSES/MIT.txt @@ -0,0 +1,9 @@ +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/runtest b/runtest index 88617c1a6..7cefaed65 100755 --- a/runtest +++ b/runtest @@ -1,4 +1,8 @@ #!/bin/sh +# +# SPDX-FileCopyrightText: 2024 Redict Contributors +# +# SPDX-License-Identifier: GPL-3.0-only TCL_VERSIONS="8.5 8.6 8.7" TCLSH="" diff --git a/runtest-cluster b/runtest-cluster index e465ce186..d7f471e4d 100755 --- a/runtest-cluster +++ b/runtest-cluster @@ -1,4 +1,8 @@ #!/bin/sh +# +# SPDX-FileCopyrightText: 2024 Redict Contributors +# +# SPDX-License-Identifier: GPL-3.0-only TCL_VERSIONS="8.5 8.6 8.7" TCLSH="" diff --git a/runtest-moduleapi b/runtest-moduleapi index 910d581f2..a286325c6 100755 --- a/runtest-moduleapi +++ b/runtest-moduleapi @@ -1,4 +1,8 @@ #!/bin/sh +# +# SPDX-FileCopyrightText: 2024 Redict Contributors +# +# SPDX-License-Identifier: GPL-3.0-only TCL_VERSIONS="8.5 8.6 8.7" TCLSH="" [ -z "$MAKE" ] && MAKE=make diff --git a/runtest-sentinel b/runtest-sentinel index 60d8c3cea..0cf0b23b0 100755 --- a/runtest-sentinel +++ b/runtest-sentinel @@ -1,4 +1,8 @@ #!/bin/sh +# +# SPDX-FileCopyrightText: 2024 Redict Contributors +# +# SPDX-License-Identifier: GPL-3.0-only TCL_VERSIONS="8.5 8.6 8.7" TCLSH="" diff --git a/src/Makefile b/src/Makefile index 5bcb254e7..47f8f385f 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,16 +1,9 @@ -# Redict Makefile # Copyright (C) 2009 Salvatore Sanfilippo -# This file is released under the BSD license, see the COPYING file +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo # -# The Makefile composes the final FINAL_CFLAGS and FINAL_LDFLAGS using -# what is needed for Redict plus the standard CFLAGS and LDFLAGS passed. -# However when building the dependencies (Jemalloc, Lua, Hiredis, ...) -# CFLAGS and LDFLAGS are propagated to the dependencies, so to pass -# flags only to be used when compiling / linking Redict itself REDICT_CFLAGS -# and REDICT_LDFLAGS are used instead (this is the case of 'make gcov'). -# -# Dependencies are stored in the Makefile.dep file. To rebuild this file -# Just use 'make dep', but this is only needed by developers. +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only release_hdr := $(shell sh -c './mkreleasehdr.sh') uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') diff --git a/src/acl.c b/src/acl.c index 924328bab..226251242 100644 --- a/src/acl.c +++ b/src/acl.c @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2018, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2018, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" #include "sha256.h" diff --git a/src/adlist.c b/src/adlist.c index 06eca7c47..e02a15761 100644 --- a/src/adlist.c +++ b/src/adlist.c @@ -1,33 +1,9 @@ -/* adlist.c - A generic doubly linked list implementation - * - * Copyright (c) 2006-2010, Salvatore Sanfilippo - * 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 Redis 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. - */ - +// Copyright (c) 2006-2010, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include #include "adlist.h" diff --git a/src/adlist.h b/src/adlist.h index 7c5443769..cf2edd3e2 100644 --- a/src/adlist.h +++ b/src/adlist.h @@ -1,32 +1,9 @@ -/* adlist.h - A generic doubly linked list implementation - * - * Copyright (c) 2006-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2006-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef __ADLIST_H__ #define __ADLIST_H__ diff --git a/src/ae.c b/src/ae.c index b9aa3c30c..b8c8abfd1 100644 --- a/src/ae.c +++ b/src/ae.c @@ -1,34 +1,9 @@ -/* A simple event-driven programming library. Originally I wrote this code - * for the Jim's event-loop (Jim is a Tcl interpreter) but later translated - * it in form of a library for easy reuse. - * - * Copyright (c) 2006-2010, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2006-2010, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "ae.h" #include "anet.h" diff --git a/src/ae.h b/src/ae.h index 70ce8a2d5..671966cbe 100644 --- a/src/ae.h +++ b/src/ae.h @@ -1,34 +1,9 @@ -/* A simple event-driven programming library. Originally I wrote this code - * for the Jim's event-loop (Jim is a Tcl interpreter) but later translated - * it in form of a library for easy reuse. - * - * Copyright (c) 2006-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2006-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef __AE_H__ #define __AE_H__ diff --git a/src/ae_epoll.c b/src/ae_epoll.c index 493ffcad2..c5bc51fe9 100644 --- a/src/ae_epoll.c +++ b/src/ae_epoll.c @@ -1,33 +1,9 @@ -/* Linux epoll(2) based ae.c module - * - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ - +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include diff --git a/src/ae_evport.c b/src/ae_evport.c index 55393e96b..b751d5154 100644 --- a/src/ae_evport.c +++ b/src/ae_evport.c @@ -1,32 +1,9 @@ -/* ae.c module for illumos event ports. - * - * Copyright (c) 2012, Joyent, 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 Redis 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. - */ - +// Copyright (c) 2012, Joyent, Inc. All rights reserved. +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include #include diff --git a/src/ae_kqueue.c b/src/ae_kqueue.c index e8454245f..e09582bc3 100644 --- a/src/ae_kqueue.c +++ b/src/ae_kqueue.c @@ -1,33 +1,9 @@ -/* Kqueue(2)-based ae.c module - * - * Copyright (C) 2009 Harish Mallipeddi - harish.mallipeddi@gmail.com - * 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 Redis 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. - */ - +// Copyright (C) 2009 Harish Mallipeddi - harish.mallipeddi@gmail.com +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include #include diff --git a/src/ae_select.c b/src/ae_select.c index f8ef95966..edb2c962e 100644 --- a/src/ae_select.c +++ b/src/ae_select.c @@ -1,33 +1,9 @@ -/* Select()-based ae.c module. - * - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ - +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include #include diff --git a/src/anet.c b/src/anet.c index e4f9ecf37..30265791f 100644 --- a/src/anet.c +++ b/src/anet.c @@ -1,32 +1,9 @@ -/* anet.c -- Basic TCP socket stuff made a bit less boring - * - * Copyright (c) 2006-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2006-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "fmacros.h" diff --git a/src/anet.h b/src/anet.h index 08e01a4bc..44fb43802 100644 --- a/src/anet.h +++ b/src/anet.h @@ -1,32 +1,9 @@ -/* anet.c -- Basic TCP socket stuff made a bit less boring - * - * Copyright (c) 2006-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2006-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef ANET_H #define ANET_H diff --git a/src/aof.c b/src/aof.c index 9ffb7e5e3..c34472221 100644 --- a/src/aof.c +++ b/src/aof.c @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" #include "bio.h" diff --git a/src/asciilogo.h b/src/asciilogo.h index 6a0716a5a..a68c6e479 100644 --- a/src/asciilogo.h +++ b/src/asciilogo.h @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only const char *ascii_logo = " _._ \n" diff --git a/src/atomicvar.h b/src/atomicvar.h index 1cbfd5b9d..23e7b1cc4 100644 --- a/src/atomicvar.h +++ b/src/atomicvar.h @@ -1,78 +1,9 @@ -/* This file implements atomic counters using c11 _Atomic, __atomic or __sync - * macros if available, otherwise we will throw an error when compile. - * - * The exported interface is composed of the following macros: - * - * atomicIncr(var,count) -- Increment the atomic counter - * atomicGetIncr(var,oldvalue_var,count) -- Get and increment the atomic counter - * atomicIncrGet(var,newvalue_var,count) -- Increment and get the atomic counter new value - * atomicDecr(var,count) -- Decrement the atomic counter - * atomicGet(var,dstvar) -- Fetch the atomic counter value - * atomicSet(var,value) -- Set the atomic counter value - * atomicGetWithSync(var,value) -- 'atomicGet' with inter-thread synchronization - * atomicSetWithSync(var,value) -- 'atomicSet' with inter-thread synchronization - * - * Atomic operations on flags. - * Flag type can be int, long, long long or their unsigned counterparts. - * The value of the flag can be 1 or 0. - * - * atomicFlagGetSet(var,oldvalue_var) -- Get and set the atomic counter value - * - * NOTE1: __atomic* and _Atomic implementations can be actually elaborated to support any value by changing the - * hardcoded new value passed to __atomic_exchange* from 1 to @param count - * i.e oldvalue_var = atomic_exchange_explicit(&var, count). - * However, in order to be compatible with the __sync functions family, we can use only 0 and 1. - * The only exchange alternative suggested by __sync is __sync_lock_test_and_set, - * But as described by the gnu manual for __sync_lock_test_and_set(): - * https://gcc.gnu.org/onlinedocs/gcc/_005f_005fsync-Builtins.html - * "A target may support reduced functionality here by which the only valid value to store is the immediate constant 1. The exact value - * actually stored in *ptr is implementation defined." - * Hence, we can't rely on it for a any value other than 1. - * We eventually chose to implement this method with __sync_val_compare_and_swap since it satisfies functionality needed for atomicFlagGetSet - * (if the flag was 0 -> set to 1, if it's already 1 -> do nothing, but the final result is that the flag is set), - * and also it has a full barrier (__sync_lock_test_and_set has acquire barrier). - * - * NOTE2: Unlike other atomic type, which aren't guaranteed to be lock free, c11 atmoic_flag does. - * To check whether a type is lock free, atomic_is_lock_free() can be used. - * It can be considered to limit the flag type to atomic_flag to improve performance. - * - * Never use return value from the macros, instead use the AtomicGetIncr() - * if you need to get the current value and increment it atomically, like - * in the following example: - * - * long oldvalue; - * atomicGetIncr(myvar,oldvalue,1); - * doSomethingWith(oldvalue); - * - * ---------------------------------------------------------------------------- - * - * Copyright (c) 2015, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2015, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include #include "config.h" diff --git a/src/bio.c b/src/bio.c index 10ecf8db2..30557f8b1 100644 --- a/src/bio.c +++ b/src/bio.c @@ -1,64 +1,9 @@ -/* Background I/O service for Redis. - * - * This file implements operations that we need to perform in the background. - * Currently there is only a single operation, that is a background close(2) - * system call. This is needed as when the process is the last owner of a - * reference to a file closing it means unlinking it, and the deletion of the - * file is slow, blocking the server. - * - * In the future we'll either continue implementing new things we need or - * we'll switch to libeio. However there are probably long term uses for this - * file as we may want to put here Redis specific background tasks (for instance - * it is not impossible that we'll need a non blocking FLUSHDB/FLUSHALL - * implementation). - * - * DESIGN - * ------ - * - * The design is simple: We have a structure representing a job to perform, - * and several worker threads and job queues. Every job type is assigned to - * a specific worker thread, and a single worker may handle several different - * job types. - * Every thread waits for new jobs in its queue, and processes every job - * sequentially. - * - * Jobs handled by the same worker are guaranteed to be processed from the - * least-recently-inserted to the most-recently-inserted (older jobs processed - * first). - * - * Currently there is no way for the creator of the job to be notified about - * the completion of the operation, this will only be added when/if needed. - * - * ---------------------------------------------------------------------------- - * - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ - +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" #include "bio.h" diff --git a/src/bio.h b/src/bio.h index 0d1fe9b4b..4d7fbcb1e 100644 --- a/src/bio.h +++ b/src/bio.h @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef __BIO_H #define __BIO_H diff --git a/src/bitops.c b/src/bitops.c index 925c2a71d..032add56e 100644 --- a/src/bitops.c +++ b/src/bitops.c @@ -1,32 +1,9 @@ -/* Bit operations. - * - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" diff --git a/src/blocked.c b/src/blocked.c index ff915aab0..f0172abaa 100644 --- a/src/blocked.c +++ b/src/blocked.c @@ -1,64 +1,9 @@ -/* blocked.c - generic support for blocking operations like BLPOP & WAIT. - * - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - * - * --------------------------------------------------------------------------- - * - * API: - * - * blockClient() set the CLIENT_BLOCKED flag in the client, and set the - * specified block type 'btype' filed to one of BLOCKED_* macros. - * - * unblockClient() unblocks the client doing the following: - * 1) It calls the btype-specific function to cleanup the state. - * 2) It unblocks the client by unsetting the CLIENT_BLOCKED flag. - * 3) It puts the client into a list of just unblocked clients that are - * processed ASAP in the beforeSleep() event loop callback, so that - * if there is some query buffer to process, we do it. This is also - * required because otherwise there is no 'readable' event fired, we - * already read the pending commands. We also set the CLIENT_UNBLOCKED - * flag to remember the client is in the unblocked_clients list. - * - * processUnblockedClients() is called inside the beforeSleep() function - * to process the query buffer from unblocked clients and remove the clients - * from the blocked_clients queue. - * - * replyToBlockedClientTimedOut() is called by the cron function when - * a client blocked reaches the specified timeout (if the timeout is set - * to 0, no timeout is processed). - * It usually just needs to send a reply to the client. - * - * When implementing a new type of blocking operation, the implementation - * should modify unblockClient() and replyToBlockedClientTimedOut() in order - * to handle the btype-specific behavior of this two functions. - * If the blocking operation waits for certain keys to change state, the - * clusterRedirectBlockedClientIfNeeded() function should also be updated. - */ +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" #include "slowlog.h" diff --git a/src/call_reply.c b/src/call_reply.c index ccd1b36d4..2f1c1e69c 100644 --- a/src/call_reply.c +++ b/src/call_reply.c @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2009-2021, Redis Labs Ltd. - * 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 Redis 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. - */ +// Copyright (c) 2009-2021, Redis Labs Ltd. +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" #include "call_reply.h" diff --git a/src/call_reply.h b/src/call_reply.h index 657f24735..3d5650f6c 100644 --- a/src/call_reply.h +++ b/src/call_reply.h @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2009-2021, Redis Labs Ltd. - * 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 Redis 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. - */ +// Copyright (c) 2009-2021, Redis Labs Ltd. +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef SRC_CALL_REPLY_H_ #define SRC_CALL_REPLY_H_ diff --git a/src/childinfo.c b/src/childinfo.c index 1303dd043..8a60baa6f 100644 --- a/src/childinfo.c +++ b/src/childinfo.c @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2016, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2016, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" #include diff --git a/src/cli_commands.c b/src/cli_commands.c index e56d48cfa..0a135ddc4 100644 --- a/src/cli_commands.c +++ b/src/cli_commands.c @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #include #include "cli_commands.h" diff --git a/src/cli_commands.h b/src/cli_commands.h index c45839d60..e84f519c6 100644 --- a/src/cli_commands.h +++ b/src/cli_commands.h @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + /* This file is used by redict-cli in place of server.h when including commands.c * It contains alternative structs which omit the parts of the commands table * that are not suitable for redict-cli, e.g. the command proc. */ diff --git a/src/cli_common.c b/src/cli_common.c index 4198bb332..8d90a0c51 100644 --- a/src/cli_common.c +++ b/src/cli_common.c @@ -1,32 +1,9 @@ -/* CLI (command line interface) common methods - * - * Copyright (c) 2020, Redis Labs - * 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 Redis 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. - */ +// Copyright (c) 2020, Redis Labs +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "fmacros.h" #include "cli_common.h" diff --git a/src/cli_common.h b/src/cli_common.h index a5b8e44a2..173f7ca24 100644 --- a/src/cli_common.h +++ b/src/cli_common.h @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #ifndef __CLICOMMON_H #define __CLICOMMON_H diff --git a/src/cluster.c b/src/cluster.c index 2a9d33a57..b3bac34c9 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only /* * cluster.c contains the common parts of a clustering diff --git a/src/cluster.h b/src/cluster.h index f21f1e9c1..6ee571257 100644 --- a/src/cluster.h +++ b/src/cluster.h @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #ifndef __CLUSTER_H #define __CLUSTER_H diff --git a/src/cluster_legacy.c b/src/cluster_legacy.c index 196d7f389..b6a191246 100644 --- a/src/cluster_legacy.c +++ b/src/cluster_legacy.c @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only /* * cluster_legacy.c contains the implementation of the cluster API that is diff --git a/src/cluster_legacy.h b/src/cluster_legacy.h index 142d76807..00daece60 100644 --- a/src/cluster_legacy.h +++ b/src/cluster_legacy.h @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #ifndef CLUSTER_LEGACY_H #define CLUSTER_LEGACY_H diff --git a/src/commands.c b/src/commands.c index 5dcfe1973..a56d08ce2 100644 --- a/src/commands.c +++ b/src/commands.c @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #include "commands.h" #include "server.h" diff --git a/src/commands.h b/src/commands.h index 1eefab481..060394e39 100644 --- a/src/commands.h +++ b/src/commands.h @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #ifndef __REDIS_COMMANDS_H #define __REDIS_COMMANDS_H diff --git a/src/config.c b/src/config.c index 91ffe8891..70c62dc30 100644 --- a/src/config.c +++ b/src/config.c @@ -1,32 +1,9 @@ -/* Configuration file parsing and CONFIG GET/SET commands implementation. - * - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" #include "cluster.h" diff --git a/src/config.h b/src/config.h index 9e2db5ac6..149555ade 100644 --- a/src/config.h +++ b/src/config.h @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef __CONFIG_H #define __CONFIG_H diff --git a/src/connection.c b/src/connection.c index fd9d5d17a..9550475df 100644 --- a/src/connection.c +++ b/src/connection.c @@ -1,28 +1,9 @@ -/* ========================================================================== - * connection.c - connection layer framework - * -------------------------------------------------------------------------- - * Copyright (C) 2022 zhenwei pi - * - * 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. - * ========================================================================== - */ +// Copyright (C) 2022 zhenwei pi +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" #include "connection.h" diff --git a/src/connection.h b/src/connection.h index d0340d18f..54901f85b 100644 --- a/src/connection.h +++ b/src/connection.h @@ -1,32 +1,9 @@ - -/* - * Copyright (c) 2019, Redis Labs - * 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 Redis 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. - */ +// Copyright (c) 2019, Redis Labs +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef __REDIS_CONNECTION_H #define __REDIS_CONNECTION_H diff --git a/src/connhelpers.h b/src/connhelpers.h index b32e44dba..1cdfb993e 100644 --- a/src/connhelpers.h +++ b/src/connhelpers.h @@ -1,32 +1,9 @@ - -/* - * Copyright (c) 2019, Redis Labs - * 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 Redis 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. - */ +// Copyright (c) 2019, Redis Labs +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef __REDIS_CONNHELPERS_H #define __REDIS_CONNHELPERS_H diff --git a/src/crc16.c b/src/crc16.c index 7b8c1dad0..e40da4a54 100644 --- a/src/crc16.c +++ b/src/crc16.c @@ -1,33 +1,12 @@ #include "server.h" -/* - * Copyright 2001-2010 Georges Menie (www.menie.org) - * Copyright 2010-2012 Salvatore Sanfilippo (adapted to Redis coding style) - * 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 the University of California, Berkeley 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 REGENTS 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 REGENTS AND 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. - */ +// Copyright 2001-2010 Georges Menie (www.menie.org) +// Copyright 2010-2012 Salvatore Sanfilippo (adapted to Redis coding style) +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only /* CRC16 implementation according to CCITT standards. * diff --git a/src/crc16_slottable.h b/src/crc16_slottable.h index f25e2412e..308ecc448 100644 --- a/src/crc16_slottable.h +++ b/src/crc16_slottable.h @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #ifndef _CRC16_TABLE_H__ #define _CRC16_TABLE_H__ diff --git a/src/crc64.c b/src/crc64.c index 73e039145..29aad7dfe 100644 --- a/src/crc64.c +++ b/src/crc64.c @@ -1,30 +1,10 @@ -/* Copyright (c) 2014, Matt Stancliff - * Copyright (c) 2020, Amazon Web Services - * 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 Redis 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. */ +// Copyright (c) 2014, Matt Stancliff +// Copyright (c) 2020, Amazon Web Services +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "crc64.h" #include "crcspeed.h" diff --git a/src/crc64.h b/src/crc64.h index e0fccd98b..727fa0989 100644 --- a/src/crc64.h +++ b/src/crc64.h @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #ifndef CRC64_H #define CRC64_H diff --git a/src/crcspeed.c b/src/crcspeed.c index 9682d8e0b..9156005d3 100644 --- a/src/crcspeed.c +++ b/src/crcspeed.c @@ -1,31 +1,9 @@ -/* - * Copyright (C) 2013 Mark Adler - * Originally by: crc64.c Version 1.4 16 Dec 2013 Mark Adler - * Modifications by Matt Stancliff : - * - removed CRC64-specific behavior - * - added generation of lookup tables by parameters - * - removed inversion of CRC input/result - * - removed automatic initialization in favor of explicit initialization - - This software is provided 'as-is', without any express or implied - warranty. In no event will the author be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Mark Adler - madler@alumni.caltech.edu - */ +// Copyright (C) 2013 Mark Adler +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "crcspeed.h" diff --git a/src/crcspeed.h b/src/crcspeed.h index d7ee95ebb..ca8200b67 100644 --- a/src/crcspeed.h +++ b/src/crcspeed.h @@ -1,29 +1,9 @@ -/* Copyright (c) 2014, Matt Stancliff - * 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 Redis 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. */ +// Copyright (c) 2014, Matt Stancliff +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef CRCSPEED_H #define CRCSPEED_H diff --git a/src/db.c b/src/db.c index 82e61b496..d9ab9d0f8 100644 --- a/src/db.c +++ b/src/db.c @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" #include "cluster.h" diff --git a/src/debug.c b/src/debug.c index 9302f106a..8e4fe1417 100644 --- a/src/debug.c +++ b/src/debug.c @@ -1,32 +1,10 @@ -/* - * Copyright (c) 2009-2020, Salvatore Sanfilippo - * Copyright (c) 2020, Redis Labs, 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 Redis 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. - */ +// Copyright (c) 2009-2020, Salvatore Sanfilippo +// Copyright (c) 2020, Redis Labs, Inc +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" #include "util.h" diff --git a/src/debugmacro.h b/src/debugmacro.h index dcd79a33f..af7687bc3 100644 --- a/src/debugmacro.h +++ b/src/debugmacro.h @@ -1,34 +1,9 @@ -/* This file contains debugging macros to be used when investigating issues. - * - * ----------------------------------------------------------------------------- - * - * Copyright (c) 2016, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2016, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef _REDIS_DEBUGMACRO_H_ #define _REDIS_DEBUGMACRO_H_ diff --git a/src/defrag.c b/src/defrag.c index 40bba2d33..899c0e836 100644 --- a/src/defrag.c +++ b/src/defrag.c @@ -1,37 +1,9 @@ -/* - * Active memory defragmentation - * Try to find key / value allocations that need to be re-allocated in order - * to reduce external fragmentation. - * We do that by scanning the keyspace and for each pointer we have, we can try to - * ask the allocator if moving it to a new address will help reduce fragmentation. - * - * Copyright (c) 2020, Redis Labs, 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 Redis 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. - */ +// Copyright (c) 2020, Redis Labs, Inc +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" #include diff --git a/src/dict.c b/src/dict.c index 1ae02bcf6..8cb15c917 100644 --- a/src/dict.c +++ b/src/dict.c @@ -1,37 +1,9 @@ -/* Hash Tables Implementation. - * - * This file implements in memory hash tables with insert/del/replace/find/ - * get-random-element operations. Hash tables will auto resize if needed - * tables of power of two in size are used, collisions are handled by - * chaining. See the source code for more information... :) - * - * Copyright (c) 2006-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2006-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "fmacros.h" diff --git a/src/dict.h b/src/dict.h index b5dc1f19a..e347fc2c5 100644 --- a/src/dict.h +++ b/src/dict.h @@ -1,37 +1,9 @@ -/* Hash Tables Implementation. - * - * This file implements in-memory hash tables with insert/del/replace/find/ - * get-random-element operations. Hash tables will auto-resize if needed - * tables of power of two in size are used, collisions are handled by - * chaining. See the source code for more information... :) - * - * Copyright (c) 2006-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2006-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef __DICT_H #define __DICT_H diff --git a/src/endianconv.c b/src/endianconv.c index 8eb6b2228..85dbba04e 100644 --- a/src/endianconv.c +++ b/src/endianconv.c @@ -1,46 +1,9 @@ -/* endinconv.c -- Endian conversions utilities. - * - * This functions are never called directly, but always using the macros - * defined into endianconv.h, this way we define everything is a non-operation - * if the arch is already little endian. - * - * Redis tries to encode everything as little endian (but a few things that need - * to be backward compatible are still in big endian) because most of the - * production environments are little endian, and we have a lot of conversions - * in a few places because ziplists, intsets, zipmaps, need to be endian-neutral - * even in memory, since they are serialized on RDB files directly with a single - * write(2) without other additional steps. - * - * ---------------------------------------------------------------------------- - * - * Copyright (c) 2011-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ - +// Copyright (c) 2011-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include diff --git a/src/endianconv.h b/src/endianconv.h index bfe9b7d0a..8e16f6b06 100644 --- a/src/endianconv.h +++ b/src/endianconv.h @@ -1,34 +1,9 @@ -/* See endianconv.c top comments for more information - * - * ---------------------------------------------------------------------------- - * - * Copyright (c) 2011-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2011-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef __ENDIANCONV_H #define __ENDIANCONV_H diff --git a/src/eval.c b/src/eval.c index e91c114c1..5e6d6605f 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" #include "sha1.h" diff --git a/src/evict.c b/src/evict.c index f40612627..ea7768246 100644 --- a/src/evict.c +++ b/src/evict.c @@ -1,34 +1,9 @@ -/* Maxmemory directive handling (LRU eviction and other policies). - * - * ---------------------------------------------------------------------------- - * - * Copyright (c) 2009-2016, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2016, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" #include "bio.h" diff --git a/src/expire.c b/src/expire.c index 2092c5a09..64f17a633 100644 --- a/src/expire.c +++ b/src/expire.c @@ -1,34 +1,9 @@ -/* Implementation of EXPIRE (keys with fixed time to live). - * - * ---------------------------------------------------------------------------- - * - * Copyright (c) 2009-2016, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2016, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" diff --git a/src/fmacros.h b/src/fmacros.h index c5da4b734..9fa0b8964 100644 --- a/src/fmacros.h +++ b/src/fmacros.h @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef _REDIS_FMACRO_H #define _REDIS_FMACRO_H diff --git a/src/fmtargs.h b/src/fmtargs.h index e52d3b99c..f257a5b5e 100644 --- a/src/fmtargs.h +++ b/src/fmtargs.h @@ -1,27 +1,10 @@ -/* - * Copyright Redis Contributors. - * All rights reserved. - * SPDX-License-Identifier: BSD 3-Clause - * - * To make it easier to map each part of the format string with each argument, - * this file provides a way to write - * - * printf("a = %s, b = %s, c = %s\n", - * arg1, arg2, arg3); - * - * as - * - * printf(FMTARGS("a = %s, ", arg1, - * "b = %s, ", arg2, - * "c = %s\n", arg3)); - * - * FMTARGS is variadic macro which is implemented by passing on its arguments to - * two other variadic macros of which one extracts the odd (the formats) and the - * other extracts the even (the arguments). The definitions of these macros - * include counting the number of macro arguments. Therefore, they don't accept - * an unlimited number of arguments. Currently it is fixed to a maximum of 120 - * formats and arguments. - */ +// Copyright Redis Contributors. +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #ifndef FMTARGS_H #define FMTARGS_H diff --git a/src/function_lua.c b/src/function_lua.c index be79dc163..98e7fd16a 100644 --- a/src/function_lua.c +++ b/src/function_lua.c @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2021, Redis Ltd. - * 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 Redis 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. - */ +// Copyright (c) 2021, Redis Ltd. +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only /* * function_lua.c unit provides the Lua engine functionality. diff --git a/src/functions.c b/src/functions.c index 646ef6308..57060d0e0 100644 --- a/src/functions.c +++ b/src/functions.c @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2021, Redis Ltd. - * 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 Redis 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. - */ +// Copyright (c) 2021, Redis Ltd. +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "functions.h" #include "sds.h" diff --git a/src/functions.h b/src/functions.h index 1d91ca5e6..b3707c95f 100644 --- a/src/functions.h +++ b/src/functions.h @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2021, Redis Ltd. - * 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 Redis 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. - */ +// Copyright (c) 2021, Redis Ltd. +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef __FUNCTIONS_H_ #define __FUNCTIONS_H_ diff --git a/src/geo.c b/src/geo.c index 1004193e0..2a145a5a7 100644 --- a/src/geo.c +++ b/src/geo.c @@ -1,32 +1,10 @@ -/* - * Copyright (c) 2014, Matt Stancliff . - * Copyright (c) 2015-2016, Salvatore Sanfilippo . - * 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 Redis 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. - */ +// Copyright (c) 2014, Matt Stancliff . +// Copyright (c) 2015-2016, Salvatore Sanfilippo . +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "geo.h" #include "geohash_helper.h" diff --git a/src/geo.h b/src/geo.h index 79d0a6a4a..8aa608047 100644 --- a/src/geo.h +++ b/src/geo.h @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #ifndef __GEO_H__ #define __GEO_H__ diff --git a/src/geohash.c b/src/geohash.c index 2cbcf2875..b9ffe9761 100644 --- a/src/geohash.c +++ b/src/geohash.c @@ -1,33 +1,12 @@ -/* - * Copyright (c) 2013-2014, yinqiwen - * Copyright (c) 2014, Matt Stancliff . - * Copyright (c) 2015-2016, Salvatore Sanfilippo . - * 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 Redis 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. - */ +// Copyright (c) 2013-2014, yinqiwen +// Copyright (c) 2014, Matt Stancliff . +// Copyright (c) 2015-2016, Salvatore Sanfilippo . +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #include "geohash.h" /** diff --git a/src/geohash.h b/src/geohash.h index 4befb9303..e03ebba98 100644 --- a/src/geohash.h +++ b/src/geohash.h @@ -1,33 +1,11 @@ -/* - * Copyright (c) 2013-2014, yinqiwen - * Copyright (c) 2014, Matt Stancliff . - * Copyright (c) 2015, Salvatore Sanfilippo . - * 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 Redis 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. - */ +// Copyright (c) 2013-2014, yinqiwen +// Copyright (c) 2014, Matt Stancliff . +// Copyright (c) 2015, Salvatore Sanfilippo . +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef GEOHASH_H_ #define GEOHASH_H_ diff --git a/src/geohash_helper.c b/src/geohash_helper.c index a3816fbe3..965441685 100644 --- a/src/geohash_helper.c +++ b/src/geohash_helper.c @@ -1,33 +1,11 @@ -/* - * Copyright (c) 2013-2014, yinqiwen - * Copyright (c) 2014, Matt Stancliff . - * Copyright (c) 2015-2016, Salvatore Sanfilippo . - * 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 Redis 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. - */ +// Copyright (c) 2013-2014, yinqiwen +// Copyright (c) 2014, Matt Stancliff . +// Copyright (c) 2015-2016, Salvatore Sanfilippo . +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only /* This is a C++ to C conversion from the ardb project. * This file started out as: diff --git a/src/geohash_helper.h b/src/geohash_helper.h index 56c731fad..d71b823ed 100644 --- a/src/geohash_helper.h +++ b/src/geohash_helper.h @@ -1,33 +1,11 @@ -/* - * Copyright (c) 2013-2014, yinqiwen - * Copyright (c) 2014, Matt Stancliff . - * Copyright (c) 2015, Salvatore Sanfilippo . - * 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 Redis 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. - */ +// Copyright (c) 2013-2014, yinqiwen +// Copyright (c) 2014, Matt Stancliff . +// Copyright (c) 2015, Salvatore Sanfilippo . +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef GEOHASH_HELPER_HPP_ #define GEOHASH_HELPER_HPP_ diff --git a/src/hyperloglog.c b/src/hyperloglog.c index 4f6f1eb45..bd0183f1f 100644 --- a/src/hyperloglog.c +++ b/src/hyperloglog.c @@ -1,33 +1,9 @@ -/* hyperloglog.c - Redis HyperLogLog probabilistic cardinality approximation. - * This file implements the algorithm and the exported Redis commands. - * - * Copyright (c) 2014, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2014, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" diff --git a/src/intset.c b/src/intset.c index 56202b7f5..96b55789b 100644 --- a/src/intset.c +++ b/src/intset.c @@ -1,32 +1,10 @@ -/* - * Copyright (c) 2009-2012, Pieter Noordhuis - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2012, Pieter Noordhuis +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include #include diff --git a/src/intset.h b/src/intset.h index 41cc7b822..904e2e709 100644 --- a/src/intset.h +++ b/src/intset.h @@ -1,32 +1,10 @@ -/* - * Copyright (c) 2009-2012, Pieter Noordhuis - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2012, Pieter Noordhuis +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef __INTSET_H #define __INTSET_H diff --git a/src/kvstore.c b/src/kvstore.c index 86980104c..d63f2afc0 100644 --- a/src/kvstore.c +++ b/src/kvstore.c @@ -1,41 +1,10 @@ -/* - * Index-based KV store implementation - * This file implements a KV store comprised of an array of dicts (see dict.c) - * The purpose of this KV store is to have easy access to all keys that belong - * in the same dict (i.e. are in the same dict-index) - * - * For example, when Redis is running in cluster mode, we use kvstore to save - * all keys that map to the same hash-slot in a separate dict within the kvstore - * struct. - * This enables us to easily access all keys that map to a specific hash-slot. - * - * Copyright (c) Redis contributors. - * 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 Redis 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. - */ +// Copyright (c) Redis contributors. +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #include "fmacros.h" #include diff --git a/src/kvstore.h b/src/kvstore.h index bce45fe4c..56bb9e43d 100644 --- a/src/kvstore.h +++ b/src/kvstore.h @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #ifndef DICTARRAY_H_ #define DICTARRAY_H_ diff --git a/src/latency.c b/src/latency.c index 78744e458..921b37a74 100644 --- a/src/latency.c +++ b/src/latency.c @@ -1,37 +1,9 @@ -/* The latency monitor allows to easily observe the sources of latency - * in a Redis instance using the LATENCY command. Different latency - * sources are monitored, like disk I/O, execution of commands, fork - * system call, and so forth. - * - * ---------------------------------------------------------------------------- - * - * Copyright (c) 2014, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2014, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" #include "hdr_histogram.h" diff --git a/src/latency.h b/src/latency.h index 13503d5c0..c6d8b4505 100644 --- a/src/latency.h +++ b/src/latency.h @@ -1,35 +1,9 @@ -/* latency.h -- latency monitor API header file - * See latency.c for more information. - * - * ---------------------------------------------------------------------------- - * - * Copyright (c) 2014, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2014, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef __LATENCY_H #define __LATENCY_H diff --git a/src/lazyfree.c b/src/lazyfree.c index 80c4607d3..3c14d2ee7 100644 --- a/src/lazyfree.c +++ b/src/lazyfree.c @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #include "server.h" #include "bio.h" #include "atomicvar.h" diff --git a/src/listpack.c b/src/listpack.c index e725c5f80..3048992be 100644 --- a/src/listpack.c +++ b/src/listpack.c @@ -1,37 +1,10 @@ -/* Listpack -- A lists of strings serialization format - * - * This file implements the specification you can find at: - * - * https://github.com/antirez/listpack - * - * Copyright (c) 2017, Salvatore Sanfilippo - * Copyright (c) 2020, Redis Labs, 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 Redis 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. - */ +// Copyright (c) 2017, Salvatore Sanfilippo +// Copyright (c) 2020, Redis Labs, Inc +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include #include diff --git a/src/listpack.h b/src/listpack.h index a60f089f9..8bb072c6d 100644 --- a/src/listpack.h +++ b/src/listpack.h @@ -1,36 +1,9 @@ -/* Listpack -- A lists of strings serialization format - * - * This file implements the specification you can find at: - * - * https://github.com/antirez/listpack - * - * Copyright (c) 2017, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2017, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef __LISTPACK_H #define __LISTPACK_H diff --git a/src/listpack_malloc.h b/src/listpack_malloc.h index a8a81c35e..c9c7c9f10 100644 --- a/src/listpack_malloc.h +++ b/src/listpack_malloc.h @@ -1,33 +1,9 @@ -/* Listpack -- A lists of strings serialization format - * https://github.com/antirez/listpack - * - * Copyright (c) 2017, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2017, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only /* Allocator selection. * diff --git a/src/localtime.c b/src/localtime.c index 1cefdfa88..eceb8b4c3 100644 --- a/src/localtime.c +++ b/src/localtime.c @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2018, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2018, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include diff --git a/src/logreqres.c b/src/logreqres.c index 6e7621d35..a859b9207 100644 --- a/src/logreqres.c +++ b/src/logreqres.c @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2021, Redis Ltd. - * 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 Redis 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. - */ +// Copyright (c) 2021, Redis Ltd. +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only /* This file implements the interface of logging clients' requests and * responses into a file. diff --git a/src/lolwut.c b/src/lolwut.c index 584ce1ee5..f46f04f81 100644 --- a/src/lolwut.c +++ b/src/lolwut.c @@ -1,37 +1,9 @@ -/* - * Copyright (c) 2018, Salvatore Sanfilippo - * 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 Redis 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. - * - * ---------------------------------------------------------------------------- - * - * This file implements the LOLWUT command. The command should do something - * fun and interesting, and should be replaced by a new implementation at - * each new version of Redis. - */ +// Copyright (c) 2018, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" #include "lolwut.h" diff --git a/src/lolwut.h b/src/lolwut.h index 682d00531..491c943dd 100644 --- a/src/lolwut.h +++ b/src/lolwut.h @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2018-2019, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2018-2019, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only /* This structure represents our canvas. Drawing functions will take a pointer * to a canvas to write to it. Later the canvas can be rendered to a string diff --git a/src/lolwut5.c b/src/lolwut5.c index 8d927c0d5..95c8dfc00 100644 --- a/src/lolwut5.c +++ b/src/lolwut5.c @@ -1,37 +1,9 @@ -/* - * Copyright (c) 2018, Salvatore Sanfilippo - * 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 Redis 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. - * - * ---------------------------------------------------------------------------- - * - * This file implements the LOLWUT command. The command should do something - * fun and interesting, and should be replaced by a new implementation at - * each new version of Redis. - */ +// Copyright (c) 2018, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" #include "lolwut.h" diff --git a/src/lolwut6.c b/src/lolwut6.c index 0db909d8c..c1deee6a9 100644 --- a/src/lolwut6.c +++ b/src/lolwut6.c @@ -1,43 +1,9 @@ -/* - * Copyright (c) 2019, Salvatore Sanfilippo - * 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 Redis 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. - * - * ---------------------------------------------------------------------------- - * - * This file implements the LOLWUT command. The command should do something - * fun and interesting, and should be replaced by a new implementation at - * each new version of Redis. - * - * Thanks to Michele Hiki Falcone for the original image that inspired - * the image, part of his game, Plaguemon. - * - * Thanks to the Shhh computer art collective for the help in tuning the - * output to have a better artistic effect. - */ +// Copyright (c) 2019, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" #include "lolwut.h" diff --git a/src/lzf.h b/src/lzf.h index 45ddfa8da..54ba36d90 100644 --- a/src/lzf.h +++ b/src/lzf.h @@ -1,38 +1,9 @@ -/* - * Copyright (c) 2000-2008 Marc Alexander Lehmann - * - * Redistribution and use in source and binary forms, with or without modifica- - * tion, 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 AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- - * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO - * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- - * CIAL, 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 OTH- - * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Alternatively, the contents of this file may be used under the terms of - * the GNU General Public License ("GPL") version 2 or any later version, - * in which case the provisions of the GPL are applicable instead of - * the above. If you wish to allow the use of your version of this file - * only under the terms of the GPL and not to allow others to use your - * version of this file under the BSD license, indicate your decision - * by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL. If you do not delete the - * provisions above, a recipient may use your version of this file under - * either the BSD or the GPL. - */ +// Copyright (c) 2000-2008 Marc Alexander Lehmann +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef LZF_H #define LZF_H diff --git a/src/lzfP.h b/src/lzfP.h index 567f5a201..3471c454e 100644 --- a/src/lzfP.h +++ b/src/lzfP.h @@ -1,38 +1,9 @@ -/* - * Copyright (c) 2000-2007 Marc Alexander Lehmann - * - * Redistribution and use in source and binary forms, with or without modifica- - * tion, 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 AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- - * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO - * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- - * CIAL, 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 OTH- - * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Alternatively, the contents of this file may be used under the terms of - * the GNU General Public License ("GPL") version 2 or any later version, - * in which case the provisions of the GPL are applicable instead of - * the above. If you wish to allow the use of your version of this file - * only under the terms of the GPL and not to allow others to use your - * version of this file under the BSD license, indicate your decision - * by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL. If you do not delete the - * provisions above, a recipient may use your version of this file under - * either the BSD or the GPL. - */ +// Copyright (c) 2000-2007 Marc Alexander Lehmann +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef LZFP_h #define LZFP_h diff --git a/src/lzf_c.c b/src/lzf_c.c index 7cbbc82fa..a583fcbe9 100644 --- a/src/lzf_c.c +++ b/src/lzf_c.c @@ -1,38 +1,9 @@ -/* - * Copyright (c) 2000-2010 Marc Alexander Lehmann - * - * Redistribution and use in source and binary forms, with or without modifica- - * tion, 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 AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- - * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO - * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- - * CIAL, 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 OTH- - * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Alternatively, the contents of this file may be used under the terms of - * the GNU General Public License ("GPL") version 2 or any later version, - * in which case the provisions of the GPL are applicable instead of - * the above. If you wish to allow the use of your version of this file - * only under the terms of the GPL and not to allow others to use your - * version of this file under the BSD license, indicate your decision - * by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL. If you do not delete the - * provisions above, a recipient may use your version of this file under - * either the BSD or the GPL. - */ +// Copyright (c) 2000-2010 Marc Alexander Lehmann +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "lzfP.h" diff --git a/src/lzf_d.c b/src/lzf_d.c index ff32be892..50f9e896e 100644 --- a/src/lzf_d.c +++ b/src/lzf_d.c @@ -1,38 +1,9 @@ -/* - * Copyright (c) 2000-2010 Marc Alexander Lehmann - * - * Redistribution and use in source and binary forms, with or without modifica- - * tion, 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 AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- - * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO - * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- - * CIAL, 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 OTH- - * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Alternatively, the contents of this file may be used under the terms of - * the GNU General Public License ("GPL") version 2 or any later version, - * in which case the provisions of the GPL are applicable instead of - * the above. If you wish to allow the use of your version of this file - * only under the terms of the GPL and not to allow others to use your - * version of this file under the BSD license, indicate your decision - * by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL. If you do not delete the - * provisions above, a recipient may use your version of this file under - * either the BSD or the GPL. - */ +// Copyright (c) 2000-2010 Marc Alexander Lehmann +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "lzfP.h" diff --git a/src/memtest.c b/src/memtest.c index aebc20db2..aac108b68 100644 --- a/src/memtest.c +++ b/src/memtest.c @@ -1,31 +1,10 @@ -/* - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #include #include #include diff --git a/src/mkreleasehdr.sh b/src/mkreleasehdr.sh index 00414fff4..bdd54d507 100755 --- a/src/mkreleasehdr.sh +++ b/src/mkreleasehdr.sh @@ -1,4 +1,8 @@ #!/bin/sh +# +# SPDX-FileCopyrightText: 2024 Redict Contributors +# +# SPDX-License-Identifier: GPL-3.0-only GIT_SHA1=`(git show-ref --head --hash=8 2> /dev/null || echo 00000000) | head -n1` GIT_DIRTY=`git diff --no-ext-diff -- ../src ../deps 2> /dev/null | wc -l` BUILD_ID=`uname -n`"-"`date +%s` diff --git a/src/module.c b/src/module.c index fff78b6ee..796980d0e 100644 --- a/src/module.c +++ b/src/module.c @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2016, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2016, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only /* -------------------------------------------------------------------------- * Modules API documentation information diff --git a/src/modules/Makefile b/src/modules/Makefile index 18ed3cd5f..c10644120 100644 --- a/src/modules/Makefile +++ b/src/modules/Makefile @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only # find the OS uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') diff --git a/src/modules/helloacl.c b/src/modules/helloacl.c index 1d1e896db..c641ae803 100644 --- a/src/modules/helloacl.c +++ b/src/modules/helloacl.c @@ -1,35 +1,9 @@ -/* ACL API example - An example for performing custom synchronous and - * asynchronous password authentication. - * - * ----------------------------------------------------------------------------- - * - * Copyright 2019 Amazon.com, Inc. or its affiliates. - * 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 Redis 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. - */ +// Copyright 2019 Amazon.com, Inc. or its affiliates. +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "../redictmodule.h" #include diff --git a/src/modules/helloblock.c b/src/modules/helloblock.c index fa6c3acb1..5cff5a1cc 100644 --- a/src/modules/helloblock.c +++ b/src/modules/helloblock.c @@ -1,35 +1,9 @@ -/* Helloblock module -- An example of blocking command implementation - * with threads. - * - * ----------------------------------------------------------------------------- - * - * Copyright (c) 2016, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2016, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "../redictmodule.h" #include diff --git a/src/modules/hellocluster.c b/src/modules/hellocluster.c index 9752f13a3..566f9823b 100644 --- a/src/modules/hellocluster.c +++ b/src/modules/hellocluster.c @@ -1,34 +1,9 @@ -/* Helloworld cluster -- A ping/pong cluster API example. - * - * ----------------------------------------------------------------------------- - * - * Copyright (c) 2018, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2018, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "../redictmodule.h" #include diff --git a/src/modules/hellodict.c b/src/modules/hellodict.c index 61610477b..bca47c295 100644 --- a/src/modules/hellodict.c +++ b/src/modules/hellodict.c @@ -1,37 +1,9 @@ -/* Hellodict -- An example of modules dictionary API - * - * This module implements a volatile key-value store on top of the - * dictionary exported by the Redis modules API. - * - * ----------------------------------------------------------------------------- - * - * Copyright (c) 2018, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2018, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "../redictmodule.h" #include diff --git a/src/modules/hellohook.c b/src/modules/hellohook.c index 637bdb111..6629d9805 100644 --- a/src/modules/hellohook.c +++ b/src/modules/hellohook.c @@ -1,34 +1,9 @@ -/* Server hooks API example - * - * ----------------------------------------------------------------------------- - * - * Copyright (c) 2019, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2019, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "../redictmodule.h" #include diff --git a/src/modules/hellotimer.c b/src/modules/hellotimer.c index cd7295a4e..2eda98778 100644 --- a/src/modules/hellotimer.c +++ b/src/modules/hellotimer.c @@ -1,34 +1,9 @@ -/* Timer API example -- Register and handle timer events - * - * ----------------------------------------------------------------------------- - * - * Copyright (c) 2018, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2018, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "../redictmodule.h" #include diff --git a/src/modules/hellotype.c b/src/modules/hellotype.c index 5bb0b0ba2..8e7fd0f22 100644 --- a/src/modules/hellotype.c +++ b/src/modules/hellotype.c @@ -1,39 +1,9 @@ -/* This file implements a new module native data type called "HELLOTYPE". - * The data structure implemented is a very simple ordered linked list of - * 64 bit integers, in order to have something that is real world enough, but - * at the same time, extremely simple to understand, to show how the API - * works, how a new data type is created, and how to write basic methods - * for RDB loading, saving and AOF rewriting. - * - * ----------------------------------------------------------------------------- - * - * Copyright (c) 2016, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2016, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "../redictmodule.h" #include diff --git a/src/modules/helloworld.c b/src/modules/helloworld.c index eb9532fd7..dd3762f49 100644 --- a/src/modules/helloworld.c +++ b/src/modules/helloworld.c @@ -1,38 +1,9 @@ -/* Helloworld module -- A few examples of the Redis Modules API in the form - * of commands showing how to accomplish common tasks. - * - * This module does not do anything useful, if not for a few commands. The - * examples are designed in order to show the API. - * - * ----------------------------------------------------------------------------- - * - * Copyright (c) 2016, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2016, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "../redictmodule.h" #include diff --git a/src/monotonic.c b/src/monotonic.c index 06ba5e415..3600a25f1 100644 --- a/src/monotonic.c +++ b/src/monotonic.c @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #include "monotonic.h" #include #include diff --git a/src/monotonic.h b/src/monotonic.h index b465f90b1..c16d19bc9 100644 --- a/src/monotonic.h +++ b/src/monotonic.h @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #ifndef __MONOTONIC_H #define __MONOTONIC_H /* The monotonic clock is an always increasing clock source. It is unrelated to diff --git a/src/mt19937-64.c b/src/mt19937-64.c index a0c897ff6..aece0503d 100644 --- a/src/mt19937-64.c +++ b/src/mt19937-64.c @@ -1,58 +1,9 @@ -/* - A C-program for MT19937-64 (2004/9/29 version). - Coded by Takuji Nishimura and Makoto Matsumoto. - - This is a 64-bit version of Mersenne Twister pseudorandom number - generator. - - Before using, initialize the state by using init_genrand64(seed) - or init_by_array64(init_key, key_length). - - Copyright (C) 2004, Makoto Matsumoto and Takuji Nishimura, - 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. The names of its contributors may not 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. - - References: - T. Nishimura, ``Tables of 64-bit Mersenne Twisters'' - ACM Transactions on Modeling and - Computer Simulation 10. (2000) 348--357. - M. Matsumoto and T. Nishimura, - ``Mersenne Twister: a 623-dimensionally equidistributed - uniform pseudorandom number generator'' - ACM Transactions on Modeling and - Computer Simulation 8. (Jan. 1998) 3--30. - - Any feedback is very welcome. - http://www.math.hiroshima-u.ac.jp/~m-mat/MT/emt.html - email: m-mat @ math.sci.hiroshima-u.ac.jp (remove spaces) -*/ - +// Copyright (C) 2004, Makoto Matsumoto and Takuji Nishimura, +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "mt19937-64.h" #include diff --git a/src/mt19937-64.h b/src/mt19937-64.h index b98348fd4..b4fa84ec0 100644 --- a/src/mt19937-64.h +++ b/src/mt19937-64.h @@ -1,57 +1,9 @@ -/* - A C-program for MT19937-64 (2004/9/29 version). - Coded by Takuji Nishimura and Makoto Matsumoto. - - This is a 64-bit version of Mersenne Twister pseudorandom number - generator. - - Before using, initialize the state by using init_genrand64(seed) - or init_by_array64(init_key, key_length). - - Copyright (C) 2004, Makoto Matsumoto and Takuji Nishimura, - 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. The names of its contributors may not 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. - - References: - T. Nishimura, ``Tables of 64-bit Mersenne Twisters'' - ACM Transactions on Modeling and - Computer Simulation 10. (2000) 348--357. - M. Matsumoto and T. Nishimura, - ``Mersenne Twister: a 623-dimensionally equidistributed - uniform pseudorandom number generator'' - ACM Transactions on Modeling and - Computer Simulation 8. (Jan. 1998) 3--30. - - Any feedback is very welcome. - http://www.math.hiroshima-u.ac.jp/~m-mat/MT/emt.html - email: m-mat @ math.sci.hiroshima-u.ac.jp (remove spaces) -*/ +// Copyright (C) 2004, Makoto Matsumoto and Takuji Nishimura, +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef __MT19937_64_H #define __MT19937_64_H diff --git a/src/multi.c b/src/multi.c index a51687363..7277395cc 100644 --- a/src/multi.c +++ b/src/multi.c @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" diff --git a/src/networking.c b/src/networking.c index ef0309831..811fe6975 100644 --- a/src/networking.c +++ b/src/networking.c @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" #include "atomicvar.h" diff --git a/src/notify.c b/src/notify.c index 2881a48db..67623dc90 100644 --- a/src/notify.c +++ b/src/notify.c @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2013, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2013, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" diff --git a/src/object.c b/src/object.c index ee3564657..592d47a3e 100644 --- a/src/object.c +++ b/src/object.c @@ -1,32 +1,9 @@ -/* Redis Object implementation. - * - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" #include "functions.h" diff --git a/src/pqsort.c b/src/pqsort.c index fab54e026..278493b05 100644 --- a/src/pqsort.c +++ b/src/pqsort.c @@ -1,10 +1,9 @@ -/* The following is the NetBSD libc qsort implementation modified in order to - * support partial sorting of ranges for Redis. - * - * Copyright(C) 2009-2012 Salvatore Sanfilippo. All rights reserved. - * - * The original copyright notice follows. */ - +// Copyright(C) 2009-2012 Salvatore Sanfilippo. All rights reserved. +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only /* $NetBSD: qsort.c,v 1.19 2009/01/30 23:38:44 lukem Exp $ */ diff --git a/src/pqsort.h b/src/pqsort.h index 824ab5c09..bf9b7e3a8 100644 --- a/src/pqsort.h +++ b/src/pqsort.h @@ -1,34 +1,9 @@ -/* The following is the NetBSD libc qsort implementation modified in order to - * support partial sorting of ranges for Redis. - * - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - * - * See the pqsort.c file for the original copyright notice. */ +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef __PQSORT_H #define __PQSORT_H diff --git a/src/pubsub.c b/src/pubsub.c index b6db719b6..5576fc826 100644 --- a/src/pubsub.c +++ b/src/pubsub.c @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" #include "cluster.h" diff --git a/src/quicklist.c b/src/quicklist.c index a1050dc77..603d3a67f 100644 --- a/src/quicklist.c +++ b/src/quicklist.c @@ -1,32 +1,9 @@ -/* quicklist.c - A doubly linked list of listpacks - * - * Copyright (c) 2014, Matt Stancliff - * 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 start the above copyright notice, - * this quicklist of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this quicklist of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Redis 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. - */ +// Copyright (c) 2014, Matt Stancliff +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include #include /* for memcpy */ diff --git a/src/quicklist.h b/src/quicklist.h index c4b07e0c0..164419814 100644 --- a/src/quicklist.h +++ b/src/quicklist.h @@ -1,32 +1,9 @@ -/* quicklist.h - A generic doubly linked quicklist implementation - * - * Copyright (c) 2014, Matt Stancliff - * 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 quicklist of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this quicklist of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Redis 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. - */ +// Copyright (c) 2014, Matt Stancliff +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include // for UINTPTR_MAX diff --git a/src/rand.c b/src/rand.c index e1e98e63b..4dc85b83c 100644 --- a/src/rand.c +++ b/src/rand.c @@ -1,45 +1,9 @@ -/* Pseudo random number generation functions derived from the drand48() - * function obtained from pysam source code. - * - * This functions are used in order to replace the default math.random() - * Lua implementation with something having exactly the same behavior - * across different systems (by default Lua uses libc's rand() that is not - * required to implement a specific PRNG generating the same sequence - * in different systems if seeded with the same integer). - * - * The original code appears to be under the public domain. - * I modified it removing the non needed functions and all the - * 1960-style C coding stuff... - * - * ---------------------------------------------------------------------------- - * - * Copyright (c) 2010-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2010-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include diff --git a/src/rand.h b/src/rand.h index 9884915a9..e2e69a5ba 100644 --- a/src/rand.h +++ b/src/rand.h @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef REDIS_RANDOM_H #define REDIS_RANDOM_H diff --git a/src/rax.c b/src/rax.c index 232e159dc..97f18941f 100644 --- a/src/rax.c +++ b/src/rax.c @@ -1,34 +1,9 @@ -/* Rax -- A radix tree implementation. - * - * Version 1.2 -- 7 February 2019 - * - * Copyright (c) 2017-2019, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2017-2019, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include #include diff --git a/src/rax.h b/src/rax.h index c58c28b2c..7e2365a1d 100644 --- a/src/rax.h +++ b/src/rax.h @@ -1,32 +1,9 @@ -/* Rax -- A radix tree implementation. - * - * Copyright (c) 2017-2018, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2017-2018, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef RAX_H #define RAX_H diff --git a/src/rax_malloc.h b/src/rax_malloc.h index 9295985c6..1ee01c651 100644 --- a/src/rax_malloc.h +++ b/src/rax_malloc.h @@ -1,32 +1,9 @@ -/* Rax -- A radix tree implementation. - * - * Copyright (c) 2017, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2017, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only /* Allocator selection. * diff --git a/src/rdb.c b/src/rdb.c index b6ad6711d..f65052fe5 100644 --- a/src/rdb.c +++ b/src/rdb.c @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" #include "lzf.h" /* LZF compression library */ diff --git a/src/rdb.h b/src/rdb.h index 3b7d639bb..7ebd942c9 100644 --- a/src/rdb.h +++ b/src/rdb.h @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef __RDB_H #define __RDB_H diff --git a/src/redict-benchmark.c b/src/redict-benchmark.c index 7c43a5c6a..98d9f5d9b 100644 --- a/src/redict-benchmark.c +++ b/src/redict-benchmark.c @@ -1,32 +1,9 @@ -/* Redis benchmark utility. - * - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "fmacros.h" diff --git a/src/redict-check-aof.c b/src/redict-check-aof.c index 0e0def8a7..c0c916de8 100644 --- a/src/redict-check-aof.c +++ b/src/redict-check-aof.c @@ -1,32 +1,10 @@ -/* - * Copyright (c) 2009-2012, Pieter Noordhuis - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2012, Pieter Noordhuis +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" diff --git a/src/redict-check-rdb.c b/src/redict-check-rdb.c index 65ac2587b..a670843ae 100644 --- a/src/redict-check-rdb.c +++ b/src/redict-check-rdb.c @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2016, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2016, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "mt19937-64.h" #include "server.h" diff --git a/src/redict-cli.c b/src/redict-cli.c index 52bec492a..2e5dccc02 100644 --- a/src/redict-cli.c +++ b/src/redict-cli.c @@ -1,32 +1,9 @@ -/* Redis CLI (command line interface) - * - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "fmacros.h" diff --git a/src/redict-trib.rb b/src/redict-trib.rb index 519e5c8d5..be08df0e3 100755 --- a/src/redict-trib.rb +++ b/src/redict-trib.rb @@ -1,4 +1,8 @@ #!/usr/bin/env ruby +# +# SPDX-FileCopyrightText: 2024 Redict Contributors +# +# SPDX-License-Identifier: GPL-3.0-only def colorized(str, color) return str if !(ENV['TERM'] || '')["xterm"] diff --git a/src/redictassert.c b/src/redictassert.c index e778c3bd4..98fd827c8 100644 --- a/src/redictassert.c +++ b/src/redictassert.c @@ -1,39 +1,9 @@ -/* redisassert.c -- Implement the default _serverAssert and _serverPanic which - * simply print stack trace to standard error stream. - * - * This file is shared by those modules that try to print some logs about stack trace - * but don't have their own implementations of functions in redictassert.h. - * - * ---------------------------------------------------------------------------- - * - * Copyright (c) 2021, Andy Pan and Redis Labs - * 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 Redis 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. - */ - +// Copyright (c) 2021, Andy Pan and Redis Labs +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include #include diff --git a/src/redictassert.h b/src/redictassert.h index a3f95da09..c859b8e70 100644 --- a/src/redictassert.h +++ b/src/redictassert.h @@ -1,39 +1,9 @@ -/* redisassert.h -- Drop in replacements assert.h that prints the stack trace - * in the Redis logs. - * - * This file should be included instead of "assert.h" inside libraries used by - * Redis that are using assertions, so instead of Redis disappearing with - * SIGABORT, we get the details and stack trace inside the log file. - * - * ---------------------------------------------------------------------------- - * - * Copyright (c) 2006-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2006-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef __REDIS_ASSERT_H__ #define __REDIS_ASSERT_H__ diff --git a/src/redictmodule.h b/src/redictmodule.h index d381e6433..4336d6cc5 100644 --- a/src/redictmodule.h +++ b/src/redictmodule.h @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #ifndef REDISMODULE_H #define REDISMODULE_H diff --git a/src/release.c b/src/release.c index adc7e55dd..bc71e23da 100644 --- a/src/release.c +++ b/src/release.c @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only /* Every time the Redis Git SHA1 or Dirty status changes only this small * file is recompiled, as we access this information in all the other diff --git a/src/replication.c b/src/replication.c index 28677ac49..cb4bc3fbd 100644 --- a/src/replication.c +++ b/src/replication.c @@ -1,33 +1,9 @@ -/* Asynchronous replication implementation. - * - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ - +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" #include "cluster.h" diff --git a/src/resp_parser.c b/src/resp_parser.c index b92a74cff..633ec24b9 100644 --- a/src/resp_parser.c +++ b/src/resp_parser.c @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2009-2021, Redis Labs Ltd. - * 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 Redis 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. - */ +// Copyright (c) 2009-2021, Redis Labs Ltd. +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only /* ---------------------------------------------------------------------------------------- * A RESP parser for parsing replies returned by RM_Call or Lua's diff --git a/src/resp_parser.h b/src/resp_parser.h index 0b5c8e22c..04ed648e1 100644 --- a/src/resp_parser.h +++ b/src/resp_parser.h @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2021, Redis Labs Ltd. - * 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 Redis 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. - */ +// Copyright (c) 2021, Redis Labs Ltd. +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef SRC_RESP_PARSER_H_ #define SRC_RESP_PARSER_H_ diff --git a/src/rio.c b/src/rio.c index eaf88d25f..4c267b1d7 100644 --- a/src/rio.c +++ b/src/rio.c @@ -1,49 +1,10 @@ -/* rio.c is a simple stream-oriented I/O abstraction that provides an interface - * to write code that can consume/produce data using different concrete input - * and output devices. For instance the same rdb.c code using the rio - * abstraction can be used to read and write the RDB format using in-memory - * buffers or files. - * - * A rio object provides the following methods: - * read: read from stream. - * write: write to stream. - * tell: get the current offset. - * - * It is also possible to set a 'checksum' method that is used by rio.c in order - * to compute a checksum of the data written or read, or to query the rio object - * for the current checksum. - * - * ---------------------------------------------------------------------------- - * - * Copyright (c) 2009-2012, Pieter Noordhuis - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ - +// Copyright (c) 2009-2012, Pieter Noordhuis +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "fmacros.h" #include "fpconv_dtoa.h" diff --git a/src/rio.h b/src/rio.h index 9dd59d32b..198bf0d07 100644 --- a/src/rio.h +++ b/src/rio.h @@ -1,33 +1,10 @@ -/* - * Copyright (c) 2009-2012, Pieter Noordhuis - * Copyright (c) 2009-2019, Salvatore Sanfilippo - * 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 Redis 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. - */ - +// Copyright (c) 2009-2012, Pieter Noordhuis +// Copyright (c) 2009-2019, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef __REDIS_RIO_H #define __REDIS_RIO_H diff --git a/src/script.c b/src/script.c index 4a6461c0b..7477533ac 100644 --- a/src/script.c +++ b/src/script.c @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2009-2021, Redis Ltd. - * 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 Redis 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. - */ +// Copyright (c) 2009-2021, Redis Ltd. +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" #include "script.h" diff --git a/src/script.h b/src/script.h index caf95ef95..6bb1b637c 100644 --- a/src/script.h +++ b/src/script.h @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2009-2021, Redis Ltd. - * 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 Redis 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. - */ +// Copyright (c) 2009-2021, Redis Ltd. +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef __SCRIPT_H_ #define __SCRIPT_H_ diff --git a/src/script_lua.c b/src/script_lua.c index ace80c292..f660a7e39 100644 --- a/src/script_lua.c +++ b/src/script_lua.c @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2009-2021, Redis Ltd. - * 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 Redis 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. - */ +// Copyright (c) 2009-2021, Redis Ltd. +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "script_lua.h" #include "fpconv_dtoa.h" diff --git a/src/script_lua.h b/src/script_lua.h index 4c2b34804..e57ef669c 100644 --- a/src/script_lua.h +++ b/src/script_lua.h @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2009-2021, Redis Ltd. - * 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 Redis 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. - */ +// Copyright (c) 2009-2021, Redis Ltd. +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef __SCRIPT_LUA_H_ #define __SCRIPT_LUA_H_ diff --git a/src/sds.c b/src/sds.c index ed34368fe..1806c5ee2 100644 --- a/src/sds.c +++ b/src/sds.c @@ -1,34 +1,11 @@ -/* SDSLib 2.0 -- A C dynamic strings library - * - * Copyright (c) 2006-2015, Salvatore Sanfilippo - * Copyright (c) 2015, Oran Agra - * Copyright (c) 2015, Redis Labs, 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 Redis 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. - */ +// Copyright (c) 2006-2015, Salvatore Sanfilippo +// Copyright (c) 2015, Oran Agra +// Copyright (c) 2015, Redis Labs, Inc +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include #include diff --git a/src/sds.h b/src/sds.h index 208eaa210..c0450c64e 100644 --- a/src/sds.h +++ b/src/sds.h @@ -1,34 +1,11 @@ -/* SDSLib 2.0 -- A C dynamic strings library - * - * Copyright (c) 2006-2015, Salvatore Sanfilippo - * Copyright (c) 2015, Oran Agra - * Copyright (c) 2015, Redis Labs, 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 Redis 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. - */ +// Copyright (c) 2006-2015, Salvatore Sanfilippo +// Copyright (c) 2015, Oran Agra +// Copyright (c) 2015, Redis Labs, Inc +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef __SDS_H #define __SDS_H diff --git a/src/sdsalloc.h b/src/sdsalloc.h index a1c5584f0..5188a3280 100644 --- a/src/sdsalloc.h +++ b/src/sdsalloc.h @@ -1,33 +1,10 @@ -/* SDSLib 2.0 -- A C dynamic strings library - * - * Copyright (c) 2006-2015, Salvatore Sanfilippo - * Copyright (c) 2015, Redis Labs, 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 Redis 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. - */ +// Copyright (c) 2006-2015, Salvatore Sanfilippo +// Copyright (c) 2015, Redis Labs, Inc +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only /* SDS allocator selection. * diff --git a/src/sentinel.c b/src/sentinel.c index 4cff7bd3d..2e1d9e85d 100644 --- a/src/sentinel.c +++ b/src/sentinel.c @@ -1,32 +1,9 @@ -/* Redis Sentinel implementation - * - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" #include "hiredis.h" diff --git a/src/server.c b/src/server.c index 8f9a4eafc..a490036bd 100644 --- a/src/server.c +++ b/src/server.c @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2009-2016, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2016, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" #include "monotonic.h" diff --git a/src/server.h b/src/server.h index 8a30b3c8d..7dc6e8ab1 100644 --- a/src/server.h +++ b/src/server.h @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef __REDIS_H #define __REDIS_H diff --git a/src/setcpuaffinity.c b/src/setcpuaffinity.c index 77b162103..1c163c975 100644 --- a/src/setcpuaffinity.c +++ b/src/setcpuaffinity.c @@ -1,28 +1,10 @@ -/* ========================================================================== - * setcpuaffinity.c - Linux/BSD setcpuaffinity. - * -------------------------------------------------------------------------- - * Copyright (C) 2020 zhenwei pi - * - * 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. - * ========================================================================== - */ +// Copyright (C) 2020 zhenwei pi +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif diff --git a/src/setproctitle.c b/src/setproctitle.c index 019402348..577e61293 100644 --- a/src/setproctitle.c +++ b/src/setproctitle.c @@ -1,30 +1,12 @@ -/* ========================================================================== - * setproctitle.c - Linux/Darwin setproctitle. - * -------------------------------------------------------------------------- - * Copyright (C) 2010 William Ahern - * Copyright (C) 2013 Salvatore Sanfilippo - * Copyright (C) 2013 Stam He - * - * 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. - * ========================================================================== - */ +// Copyright (C) 2010 William Ahern +// Copyright (C) 2013 Salvatore Sanfilippo +// Copyright (C) 2013 Stam He +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif diff --git a/src/sha1.c b/src/sha1.c index 4d8c14094..645654ff4 100644 --- a/src/sha1.c +++ b/src/sha1.c @@ -1,3 +1,8 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only /* from valgrind tests */ diff --git a/src/sha1.h b/src/sha1.h index a6cb6e885..dc370cbec 100644 --- a/src/sha1.h +++ b/src/sha1.h @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #ifndef SHA1_H #define SHA1_H /* ================ sha1.h ================ */ diff --git a/src/sha256.c b/src/sha256.c index 3b53c45c4..4ac92a5a9 100644 --- a/src/sha256.c +++ b/src/sha256.c @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + /********************************************************************* * Filename: sha256.c * Author: Brad Conte (brad AT bradconte.com) diff --git a/src/sha256.h b/src/sha256.h index a0d90a714..321b58a48 100644 --- a/src/sha256.h +++ b/src/sha256.h @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + /********************************************************************* * Filename: sha256.h * Author: Brad Conte (brad AT bradconte.com) diff --git a/src/siphash.c b/src/siphash.c index a62d5c061..182030517 100644 --- a/src/siphash.c +++ b/src/siphash.c @@ -1,44 +1,12 @@ -/* - SipHash reference C implementation +// Copyright (c) 2012-2014 Daniel J. Bernstein +// Copyright (c) 2012-2016 Jean-Philippe Aumasson +// Copyright (c) 2017 Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only - Copyright (c) 2012-2016 Jean-Philippe Aumasson - - Copyright (c) 2012-2014 Daniel J. Bernstein - Copyright (c) 2017 Salvatore Sanfilippo - - To the extent possible under law, the author(s) have dedicated all copyright - and related and neighboring rights to this software to the public domain - worldwide. This software is distributed without any warranty. - - You should have received a copy of the CC0 Public Domain Dedication along - with this software. If not, see - . - - ---------------------------------------------------------------------------- - - This version was modified by Salvatore Sanfilippo - in the following ways: - - 1. We use SipHash 1-2. This is not believed to be as strong as the - suggested 2-4 variant, but AFAIK there are not trivial attacks - against this reduced-rounds version, and it runs at the same speed - as Murmurhash2 that we used previously, while the 2-4 variant slowed - down Redis by a 4% figure more or less. - 2. Hard-code rounds in the hope the compiler can optimize it more - in this raw from. Anyway we always want the standard 2-4 variant. - 3. Modify the prototype and implementation so that the function directly - returns an uint64_t value, the hash itself, instead of receiving an - output buffer. This also means that the output size is set to 8 bytes - and the 16 bytes output code handling was removed. - 4. Provide a case insensitive variant to be used when hashing strings that - must be considered identical by the hash table regardless of the case. - If we don't have directly a case insensitive hash function, we need to - perform a text transformation in some temporary buffer, which is costly. - 5. Remove debugging code. - 6. Modified the original test.c file to be a stand-alone function testing - the function in the new form (returning an uint64_t) using just the - relevant test vector. - */ #include #include #include diff --git a/src/slowlog.c b/src/slowlog.c index a68064af2..b16ce7185 100644 --- a/src/slowlog.c +++ b/src/slowlog.c @@ -1,43 +1,9 @@ -/* Slowlog implements a system that is able to remember the latest N - * queries that took more than M microseconds to execute. - * - * The execution time to reach to be logged in the slow log is set - * using the 'slowlog-log-slower-than' config directive, that is also - * readable and writable using the CONFIG SET/GET command. - * - * The slow queries log is actually not "logged" in the Redis log file - * but is accessible thanks to the SLOWLOG command. - * - * ---------------------------------------------------------------------------- - * - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ - +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" #include "slowlog.h" diff --git a/src/slowlog.h b/src/slowlog.h index 6a00d1202..97adc273b 100644 --- a/src/slowlog.h +++ b/src/slowlog.h @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef __SLOWLOG_H__ #define __SLOWLOG_H__ diff --git a/src/socket.c b/src/socket.c index 775d56d37..b43da8b14 100644 --- a/src/socket.c +++ b/src/socket.c @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2019, Redis Labs - * 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 Redis 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. - */ +// Copyright (c) 2019, Redis Labs +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" #include "connhelpers.h" diff --git a/src/solarisfixes.h b/src/solarisfixes.h index 3e53ba67c..c67965107 100644 --- a/src/solarisfixes.h +++ b/src/solarisfixes.h @@ -1,32 +1,9 @@ -/* Solaris specific fixes. - * - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #if defined(__sun) diff --git a/src/sort.c b/src/sort.c index bd1f10064..bc7dce7c4 100644 --- a/src/sort.c +++ b/src/sort.c @@ -1,33 +1,9 @@ -/* SORT command and helper functions. - * - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ - +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" #include "pqsort.h" /* Partial qsort for SORT+LIMIT */ diff --git a/src/sparkline.c b/src/sparkline.c index 4c0f2b81f..c38d9e9df 100644 --- a/src/sparkline.c +++ b/src/sparkline.c @@ -1,34 +1,9 @@ -/* sparkline.c -- ASCII Sparklines - * This code is modified from http://github.com/antirez/aspark and adapted - * in order to return SDS strings instead of outputting directly to - * the terminal. - * - * --------------------------------------------------------------------------- - * - * Copyright(C) 2011-2014 Salvatore Sanfilippo - * 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. - * - * 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. - */ +// Copyright(C) 2011-2014 Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" diff --git a/src/sparkline.h b/src/sparkline.h index 6025d2b98..ef4e821b1 100644 --- a/src/sparkline.h +++ b/src/sparkline.h @@ -1,31 +1,9 @@ -/* sparkline.h -- ASCII Sparklines header file - * - * --------------------------------------------------------------------------- - * - * Copyright(C) 2011-2014 Salvatore Sanfilippo - * 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. - * - * 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. - */ +// Copyright(C) 2011-2014 Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef __SPARKLINE_H #define __SPARKLINE_H diff --git a/src/stream.h b/src/stream.h index bfc165440..67fa13f16 100644 --- a/src/stream.h +++ b/src/stream.h @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #ifndef STREAM_H #define STREAM_H diff --git a/src/strl.c b/src/strl.c index f73cf796c..c5922ec63 100644 --- a/src/strl.c +++ b/src/strl.c @@ -1,18 +1,10 @@ -/* - * Copyright (c) 1998, 2015 Todd C. Miller - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ +// Copyright (c) 1998, 2015 Todd C. Miller +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #include /* diff --git a/src/syncio.c b/src/syncio.c index b2843d5fb..d5258f356 100644 --- a/src/syncio.c +++ b/src/syncio.c @@ -1,32 +1,9 @@ -/* Synchronous socket and file I/O operations useful across the core. - * - * Copyright (c) 2009-2010, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2010, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" diff --git a/src/syscheck.c b/src/syscheck.c index 939d4640e..da22b6c58 100644 --- a/src/syscheck.c +++ b/src/syscheck.c @@ -1,32 +1,11 @@ -/* - * Copyright (c) 2022, Redis Ltd. - * Copyright (c) 2016, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2016, Salvatore Sanfilippo +// Copyright (c) 2022, Redis Ltd. +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #include "fmacros.h" #include "config.h" #include "syscheck.h" diff --git a/src/syscheck.h b/src/syscheck.h index 096f0f5e6..560b4f05c 100644 --- a/src/syscheck.h +++ b/src/syscheck.h @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2022, Redis Ltd. - * 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 Redis 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. - */ +// Copyright (c) 2022, Redis Ltd. +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef __SYSCHECK_H #define __SYSCHECK_H diff --git a/src/t_hash.c b/src/t_hash.c index ff8746384..c71d2d0d9 100644 --- a/src/t_hash.c +++ b/src/t_hash.c @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" #include diff --git a/src/t_list.c b/src/t_list.c index d93193749..4256deea0 100644 --- a/src/t_list.c +++ b/src/t_list.c @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" diff --git a/src/t_set.c b/src/t_set.c index 24e7b0e7d..5fb4431a9 100644 --- a/src/t_set.c +++ b/src/t_set.c @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" #include "intset.h" /* Compact integer set structure */ diff --git a/src/t_stream.c b/src/t_stream.c index ee37f9780..ac972cd34 100644 --- a/src/t_stream.c +++ b/src/t_stream.c @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2017, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2017, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" #include "endianconv.h" diff --git a/src/t_string.c b/src/t_string.c index 2bce3acc8..b82063610 100644 --- a/src/t_string.c +++ b/src/t_string.c @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" #include /* isnan(), isinf() */ diff --git a/src/t_zset.c b/src/t_zset.c index 6d4edd212..f0e8447c3 100644 --- a/src/t_zset.c +++ b/src/t_zset.c @@ -1,32 +1,10 @@ -/* - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * Copyright (c) 2009-2012, Pieter Noordhuis - * 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 Redis 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. - */ +// Copyright (c) 2009-2012, Pieter Noordhuis +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only /*----------------------------------------------------------------------------- * Sorted set API diff --git a/src/testhelp.h b/src/testhelp.h index d5be80e79..f0b867582 100644 --- a/src/testhelp.h +++ b/src/testhelp.h @@ -1,40 +1,9 @@ -/* This is a really minimal testing framework for C. - * - * Example: - * - * test_cond("Check if 1 == 1", 1==1) - * test_cond("Check if 5 > 10", 5 > 10) - * test_report() - * - * ---------------------------------------------------------------------------- - * - * Copyright (c) 2010-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2010-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef __TESTHELP_H #define __TESTHELP_H diff --git a/src/threads_mngr.c b/src/threads_mngr.c index 01080c822..d286cfd6b 100644 --- a/src/threads_mngr.c +++ b/src/threads_mngr.c @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2021, Redis Ltd. - * 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 Redis 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. - */ +// Copyright (c) 2021, Redis Ltd. +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "threads_mngr.h" /* Anti-warning macro... */ diff --git a/src/threads_mngr.h b/src/threads_mngr.h index 8d76386a8..e41c808ac 100644 --- a/src/threads_mngr.h +++ b/src/threads_mngr.h @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2021, Redis Ltd. - * 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 Redis 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. - */ +// Copyright (c) 2021, Redis Ltd. +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #pragma once diff --git a/src/timeout.c b/src/timeout.c index eb971dcdc..a0efb2849 100644 --- a/src/timeout.c +++ b/src/timeout.c @@ -1,30 +1,9 @@ -/* Copyright (c) 2009-2020, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2020, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" #include "cluster.h" diff --git a/src/tls.c b/src/tls.c index 0d326558f..ce9c07ac7 100644 --- a/src/tls.c +++ b/src/tls.c @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2019, Redis Labs - * 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 Redis 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. - */ +// Copyright (c) 2019, Redis Labs +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #define REDISMODULE_CORE_MODULE /* A module that's part of the redis core, uses server.h too. */ diff --git a/src/tracking.c b/src/tracking.c index 429770065..c89217e84 100644 --- a/src/tracking.c +++ b/src/tracking.c @@ -1,32 +1,9 @@ -/* tracking.c - Client side caching: keys tracking and invalidation - * - * Copyright (c) 2019, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2019, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" diff --git a/src/unix.c b/src/unix.c index eb5850765..99b401ef7 100644 --- a/src/unix.c +++ b/src/unix.c @@ -1,28 +1,9 @@ -/* ========================================================================== - * unix.c - unix socket connection implementation - * -------------------------------------------------------------------------- - * Copyright (C) 2022 zhenwei pi - * - * 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. - * ========================================================================== - */ +// Copyright (C) 2022 zhenwei pi +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "server.h" #include "connection.h" diff --git a/src/util.c b/src/util.c index 938e3d16f..57b7f8f19 100644 --- a/src/util.c +++ b/src/util.c @@ -1,32 +1,10 @@ -/* - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * Copyright (c) 2012, Twitter, 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 Redis 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. - */ +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// Copyright (c) 2012, Twitter, Inc. +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "fmacros.h" #include "fpconv_dtoa.h" diff --git a/src/util.h b/src/util.h index 8a47f96ac..57b1719c6 100644 --- a/src/util.h +++ b/src/util.h @@ -1,31 +1,9 @@ -/* - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef __REDIS_UTIL_H #define __REDIS_UTIL_H diff --git a/src/version.h b/src/version.h index 864ec0c72..e64fcd325 100644 --- a/src/version.h +++ b/src/version.h @@ -1,2 +1,8 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #define REDICT_VERSION "255.255.255" #define REDICT_VERSION_NUM 0x00ffffff diff --git a/src/ziplist.c b/src/ziplist.c index db73d9966..e1bf24206 100644 --- a/src/ziplist.c +++ b/src/ziplist.c @@ -1,184 +1,11 @@ -/* The ziplist is a specially encoded dually linked list that is designed - * to be very memory efficient. It stores both strings and integer values, - * where integers are encoded as actual integers instead of a series of - * characters. It allows push and pop operations on either side of the list - * in O(1) time. However, because every operation requires a reallocation of - * the memory used by the ziplist, the actual complexity is related to the - * amount of memory used by the ziplist. - * - * ---------------------------------------------------------------------------- - * - * ZIPLIST OVERALL LAYOUT - * ====================== - * - * The general layout of the ziplist is as follows: - * - * ... - * - * NOTE: all fields are stored in little endian, if not specified otherwise. - * - * is an unsigned integer to hold the number of bytes that - * the ziplist occupies, including the four bytes of the zlbytes field itself. - * This value needs to be stored to be able to resize the entire structure - * without the need to traverse it first. - * - * is the offset to the last entry in the list. This allows - * a pop operation on the far side of the list without the need for full - * traversal. - * - * is the number of entries. When there are more than - * 2^16-2 entries, this value is set to 2^16-1 and we need to traverse the - * entire list to know how many items it holds. - * - * is a special entry representing the end of the ziplist. - * Is encoded as a single byte equal to 255. No other normal entry starts - * with a byte set to the value of 255. - * - * ZIPLIST ENTRIES - * =============== - * - * Every entry in the ziplist is prefixed by metadata that contains two pieces - * of information. First, the length of the previous entry is stored to be - * able to traverse the list from back to front. Second, the entry encoding is - * provided. It represents the entry type, integer or string, and in the case - * of strings it also represents the length of the string payload. - * So a complete entry is stored like this: - * - * - * - * Sometimes the encoding represents the entry itself, like for small integers - * as we'll see later. In such a case the part is missing, and we - * could have just: - * - * - * - * The length of the previous entry, , is encoded in the following way: - * If this length is smaller than 254 bytes, it will only consume a single - * byte representing the length as an unsigned 8 bit integer. When the length - * is greater than or equal to 254, it will consume 5 bytes. The first byte is - * set to 254 (FE) to indicate a larger value is following. The remaining 4 - * bytes take the length of the previous entry as value. - * - * So practically an entry is encoded in the following way: - * - * - * - * Or alternatively if the previous entry length is greater than 253 bytes - * the following encoding is used: - * - * 0xFE <4 bytes unsigned little endian prevlen> - * - * The encoding field of the entry depends on the content of the - * entry. When the entry is a string, the first 2 bits of the encoding first - * byte will hold the type of encoding used to store the length of the string, - * followed by the actual length of the string. When the entry is an integer - * the first 2 bits are both set to 1. The following 2 bits are used to specify - * what kind of integer will be stored after this header. An overview of the - * different types and encodings is as follows. The first byte is always enough - * to determine the kind of entry. - * - * |00pppppp| - 1 byte - * String value with length less than or equal to 63 bytes (6 bits). - * "pppppp" represents the unsigned 6 bit length. - * |01pppppp|qqqqqqqq| - 2 bytes - * String value with length less than or equal to 16383 bytes (14 bits). - * IMPORTANT: The 14 bit number is stored in big endian. - * |10000000|qqqqqqqq|rrrrrrrr|ssssssss|tttttttt| - 5 bytes - * String value with length greater than or equal to 16384 bytes. - * Only the 4 bytes following the first byte represents the length - * up to 2^32-1. The 6 lower bits of the first byte are not used and - * are set to zero. - * IMPORTANT: The 32 bit number is stored in big endian. - * |11000000| - 3 bytes - * Integer encoded as int16_t (2 bytes). - * |11010000| - 5 bytes - * Integer encoded as int32_t (4 bytes). - * |11100000| - 9 bytes - * Integer encoded as int64_t (8 bytes). - * |11110000| - 4 bytes - * Integer encoded as 24 bit signed (3 bytes). - * |11111110| - 2 bytes - * Integer encoded as 8 bit signed (1 byte). - * |1111xxxx| - (with xxxx between 0001 and 1101) immediate 4 bit integer. - * Unsigned integer from 0 to 12. The encoded value is actually from - * 1 to 13 because 0000 and 1111 can not be used, so 1 should be - * subtracted from the encoded 4 bit value to obtain the right value. - * |11111111| - End of ziplist special entry. - * - * Like for the ziplist header, all the integers are represented in little - * endian byte order, even when this code is compiled in big endian systems. - * - * EXAMPLES OF ACTUAL ZIPLISTS - * =========================== - * - * The following is a ziplist containing the two elements representing - * the strings "2" and "5". It is composed of 15 bytes, that we visually - * split into sections: - * - * [0f 00 00 00] [0c 00 00 00] [02 00] [00 f3] [02 f6] [ff] - * | | | | | | - * zlbytes zltail zllen "2" "5" end - * - * The first 4 bytes represent the number 15, that is the number of bytes - * the whole ziplist is composed of. The second 4 bytes are the offset - * at which the last ziplist entry is found, that is 12, in fact the - * last entry, that is "5", is at offset 12 inside the ziplist. - * The next 16 bit integer represents the number of elements inside the - * ziplist, its value is 2 since there are just two elements inside. - * Finally "00 f3" is the first entry representing the number 2. It is - * composed of the previous entry length, which is zero because this is - * our first entry, and the byte F3 which corresponds to the encoding - * |1111xxxx| with xxxx between 0001 and 1101. We need to remove the "F" - * higher order bits 1111, and subtract 1 from the "3", so the entry value - * is "2". The next entry has a prevlen of 02, since the first entry is - * composed of exactly two bytes. The entry itself, F6, is encoded exactly - * like the first entry, and 6-1 = 5, so the value of the entry is 5. - * Finally the special entry FF signals the end of the ziplist. - * - * Adding another element to the above string with the value "Hello World" - * allows us to show how the ziplist encodes small strings. We'll just show - * the hex dump of the entry itself. Imagine the bytes as following the - * entry that stores "5" in the ziplist above: - * - * [02] [0b] [48 65 6c 6c 6f 20 57 6f 72 6c 64] - * - * The first byte, 02, is the length of the previous entry. The next - * byte represents the encoding in the pattern |00pppppp| that means - * that the entry is a string of length , so 0B means that - * an 11 bytes string follows. From the third byte (48) to the last (64) - * there are just the ASCII characters for "Hello World". - * - * ---------------------------------------------------------------------------- - * - * Copyright (c) 2009-2012, Pieter Noordhuis - * Copyright (c) 2009-2017, Salvatore Sanfilippo - * Copyright (c) 2020, Redis Labs, 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 Redis 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. - */ +// Copyright (c) 2009-2012, Pieter Noordhuis +// Copyright (c) 2009-2017, Salvatore Sanfilippo +// Copyright (c) 2020, Redis Labs, Inc +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include #include diff --git a/src/ziplist.h b/src/ziplist.h index f210ba6c9..52a6a8c58 100644 --- a/src/ziplist.h +++ b/src/ziplist.h @@ -1,32 +1,10 @@ -/* - * Copyright (c) 2009-2012, Pieter Noordhuis - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2012, Pieter Noordhuis +// Copyright (c) 2009-2012, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef _ZIPLIST_H #define _ZIPLIST_H diff --git a/src/zipmap.c b/src/zipmap.c index 4e984ba6d..db2652952 100644 --- a/src/zipmap.c +++ b/src/zipmap.c @@ -1,44 +1,9 @@ -/* String -> String Map data structure optimized for size. - * This file implements a data structure mapping strings to other strings - * implementing an O(n) lookup data structure designed to be very memory - * efficient. - * - * The Redis Hash type uses this data structure for hashes composed of a small - * number of elements, to switch to a hash table once a given number of - * elements is reached. - * - * Given that many times Redis Hashes are used to represent objects composed - * of few fields, this is a very big win in terms of used memory. - * - * -------------------------------------------------------------------------- - * - * Copyright (c) 2009-2010, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2010, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only /* Memory layout of a zipmap, for the map "foo" => "bar", "hello" => "world": * diff --git a/src/zipmap.h b/src/zipmap.h index 482c96ddd..98e069195 100644 --- a/src/zipmap.h +++ b/src/zipmap.h @@ -1,36 +1,9 @@ -/* String -> String Map data structure optimized for size. - * - * See zipmap.c for more info. - * - * -------------------------------------------------------------------------- - * - * Copyright (c) 2009-2010, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2010, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef _ZIPMAP_H #define _ZIPMAP_H diff --git a/src/zmalloc.c b/src/zmalloc.c index 9ea8e2fd4..5af8d101c 100644 --- a/src/zmalloc.c +++ b/src/zmalloc.c @@ -1,32 +1,9 @@ -/* zmalloc - total amount of allocated memory aware version of malloc() - * - * Copyright (c) 2009-2010, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2010, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "fmacros.h" #include "config.h" diff --git a/src/zmalloc.h b/src/zmalloc.h index 461d0d1ac..00fded7d4 100644 --- a/src/zmalloc.h +++ b/src/zmalloc.h @@ -1,32 +1,9 @@ -/* zmalloc - total amount of allocated memory aware version of malloc() - * - * Copyright (c) 2009-2010, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2009-2010, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #ifndef __ZMALLOC_H #define __ZMALLOC_H diff --git a/tests/cluster/cluster.tcl b/tests/cluster/cluster.tcl index 15a391693..562fc89a7 100644 --- a/tests/cluster/cluster.tcl +++ b/tests/cluster/cluster.tcl @@ -1,8 +1,9 @@ -# Cluster-specific test functions. -# # Copyright (C) 2014 Salvatore Sanfilippo antirez@gmail.com -# This software is released under the BSD License. See the COPYING file for -# more information. +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only # Track cluster configuration as created by create_cluster below set ::cluster_master_nodes 0 diff --git a/tests/cluster/run.tcl b/tests/cluster/run.tcl index 839b933d5..d93e58df1 100644 --- a/tests/cluster/run.tcl +++ b/tests/cluster/run.tcl @@ -1,6 +1,9 @@ -# Cluster test suite. Copyright (C) 2014 Salvatore Sanfilippo antirez@gmail.com -# This software is released under the BSD License. See the COPYING file for -# more information. +# Copyright (C) 2014 Salvatore Sanfilippo antirez@gmail.com +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only cd tests/cluster source cluster.tcl diff --git a/tests/cluster/tests/00-base.tcl b/tests/cluster/tests/00-base.tcl index f1f8943a7..18f044bc4 100644 --- a/tests/cluster/tests/00-base.tcl +++ b/tests/cluster/tests/00-base.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Check the basic monitoring and failover capabilities. source "../tests/includes/init-tests.tcl" diff --git a/tests/cluster/tests/01-faildet.tcl b/tests/cluster/tests/01-faildet.tcl index 8c7bdf575..584a46911 100644 --- a/tests/cluster/tests/01-faildet.tcl +++ b/tests/cluster/tests/01-faildet.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Check the basic monitoring and failover capabilities. source "../tests/includes/init-tests.tcl" diff --git a/tests/cluster/tests/02-failover.tcl b/tests/cluster/tests/02-failover.tcl index 9a14e5580..5bb152bdb 100644 --- a/tests/cluster/tests/02-failover.tcl +++ b/tests/cluster/tests/02-failover.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Check the basic monitoring and failover capabilities. source "../tests/includes/init-tests.tcl" diff --git a/tests/cluster/tests/03-failover-loop.tcl b/tests/cluster/tests/03-failover-loop.tcl index 941842720..7e66429a1 100644 --- a/tests/cluster/tests/03-failover-loop.tcl +++ b/tests/cluster/tests/03-failover-loop.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Failover stress test. # In this test a different node is killed in a loop for N # iterations. The test checks that certain properties diff --git a/tests/cluster/tests/04-resharding.tcl b/tests/cluster/tests/04-resharding.tcl index 5d0293b7d..76efba3e6 100644 --- a/tests/cluster/tests/04-resharding.tcl +++ b/tests/cluster/tests/04-resharding.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Failover stress test. # In this test a different node is killed in a loop for N # iterations. The test checks that certain properties diff --git a/tests/cluster/tests/05-slave-selection.tcl b/tests/cluster/tests/05-slave-selection.tcl index 078d614fa..05de13117 100644 --- a/tests/cluster/tests/05-slave-selection.tcl +++ b/tests/cluster/tests/05-slave-selection.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Slave selection test # Check the algorithm trying to pick the slave with the most complete history. diff --git a/tests/cluster/tests/06-slave-stop-cond.tcl b/tests/cluster/tests/06-slave-stop-cond.tcl index 9771f8766..bdfbef965 100644 --- a/tests/cluster/tests/06-slave-stop-cond.tcl +++ b/tests/cluster/tests/06-slave-stop-cond.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Slave stop condition test # Check that if there is a disconnection time limit, the slave will not try # to failover its master. diff --git a/tests/cluster/tests/07-replica-migration.tcl b/tests/cluster/tests/07-replica-migration.tcl index 3559fffe5..7841e3971 100644 --- a/tests/cluster/tests/07-replica-migration.tcl +++ b/tests/cluster/tests/07-replica-migration.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Replica migration test. # Check that orphaned masters are joined by replicas of masters having # multiple replicas attached, according to the migration barrier settings. diff --git a/tests/cluster/tests/08-update-msg.tcl b/tests/cluster/tests/08-update-msg.tcl index 2e10a1be9..100d3f6c6 100644 --- a/tests/cluster/tests/08-update-msg.tcl +++ b/tests/cluster/tests/08-update-msg.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Test UPDATE messages sent by other nodes when the currently authorirative # master is unavailable. The test is performed in the following steps: # diff --git a/tests/cluster/tests/09-pubsub.tcl b/tests/cluster/tests/09-pubsub.tcl index e62b91c4b..ef7762746 100644 --- a/tests/cluster/tests/09-pubsub.tcl +++ b/tests/cluster/tests/09-pubsub.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Test PUBLISH propagation across the cluster. source "../tests/includes/init-tests.tcl" diff --git a/tests/cluster/tests/10-manual-failover.tcl b/tests/cluster/tests/10-manual-failover.tcl index a0288d60b..543636bab 100644 --- a/tests/cluster/tests/10-manual-failover.tcl +++ b/tests/cluster/tests/10-manual-failover.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Check the manual failover source "../tests/includes/init-tests.tcl" diff --git a/tests/cluster/tests/11-manual-takeover.tcl b/tests/cluster/tests/11-manual-takeover.tcl index ee01db110..d42c24bf2 100644 --- a/tests/cluster/tests/11-manual-takeover.tcl +++ b/tests/cluster/tests/11-manual-takeover.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Manual takeover test source "../tests/includes/init-tests.tcl" diff --git a/tests/cluster/tests/12-replica-migration-2.tcl b/tests/cluster/tests/12-replica-migration-2.tcl index e75cfe99d..4de81642f 100644 --- a/tests/cluster/tests/12-replica-migration-2.tcl +++ b/tests/cluster/tests/12-replica-migration-2.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Replica migration test #2. # # Check that the status of master that can be targeted by replica migration diff --git a/tests/cluster/tests/12.1-replica-migration-3.tcl b/tests/cluster/tests/12.1-replica-migration-3.tcl index 2d45baf70..81c000a4e 100644 --- a/tests/cluster/tests/12.1-replica-migration-3.tcl +++ b/tests/cluster/tests/12.1-replica-migration-3.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Replica migration test #2. # # Check that if 'cluster-allow-replica-migration' is set to 'no', slaves do not diff --git a/tests/cluster/tests/13-no-failover-option.tcl b/tests/cluster/tests/13-no-failover-option.tcl index f5d693efb..63f701842 100644 --- a/tests/cluster/tests/13-no-failover-option.tcl +++ b/tests/cluster/tests/13-no-failover-option.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Check that the no-failover option works source "../tests/includes/init-tests.tcl" diff --git a/tests/cluster/tests/14-consistency-check.tcl b/tests/cluster/tests/14-consistency-check.tcl index 4ee091c6c..364b9bffb 100644 --- a/tests/cluster/tests/14-consistency-check.tcl +++ b/tests/cluster/tests/14-consistency-check.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + source "../tests/includes/init-tests.tcl" source "../../../tests/support/cli.tcl" diff --git a/tests/cluster/tests/15-cluster-slots.tcl b/tests/cluster/tests/15-cluster-slots.tcl index 2b5237a5c..34ee7ad55 100644 --- a/tests/cluster/tests/15-cluster-slots.tcl +++ b/tests/cluster/tests/15-cluster-slots.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + source "../tests/includes/init-tests.tcl" proc cluster_allocate_mixedSlots {n} { diff --git a/tests/cluster/tests/16-transactions-on-replica.tcl b/tests/cluster/tests/16-transactions-on-replica.tcl index ffae986b3..9584933d2 100644 --- a/tests/cluster/tests/16-transactions-on-replica.tcl +++ b/tests/cluster/tests/16-transactions-on-replica.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Check basic transactions on a replica. source "../tests/includes/init-tests.tcl" diff --git a/tests/cluster/tests/17-diskless-load-swapdb.tcl b/tests/cluster/tests/17-diskless-load-swapdb.tcl index 84fbb1619..f6cd353a5 100644 --- a/tests/cluster/tests/17-diskless-load-swapdb.tcl +++ b/tests/cluster/tests/17-diskless-load-swapdb.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Check that replica keys and keys to slots map are right after failing to diskless load using SWAPDB. source "../tests/includes/init-tests.tcl" diff --git a/tests/cluster/tests/18-info.tcl b/tests/cluster/tests/18-info.tcl index 68c62d357..c6707ef0e 100644 --- a/tests/cluster/tests/18-info.tcl +++ b/tests/cluster/tests/18-info.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Check cluster info stats source "../tests/includes/init-tests.tcl" diff --git a/tests/cluster/tests/19-cluster-nodes-slots.tcl b/tests/cluster/tests/19-cluster-nodes-slots.tcl index 77faec912..a314c58e0 100644 --- a/tests/cluster/tests/19-cluster-nodes-slots.tcl +++ b/tests/cluster/tests/19-cluster-nodes-slots.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Optimize CLUSTER NODES command by generating all nodes slot topology firstly source "../tests/includes/init-tests.tcl" diff --git a/tests/cluster/tests/20-half-migrated-slot.tcl b/tests/cluster/tests/20-half-migrated-slot.tcl index 4e3eebc88..31af47329 100644 --- a/tests/cluster/tests/20-half-migrated-slot.tcl +++ b/tests/cluster/tests/20-half-migrated-slot.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Tests for fixing migrating slot at all stages: # 1. when migration is half inited on "migrating" node # 2. when migration is half inited on "importing" node diff --git a/tests/cluster/tests/21-many-slot-migration.tcl b/tests/cluster/tests/21-many-slot-migration.tcl index e45f2eea1..44f2a6a41 100644 --- a/tests/cluster/tests/21-many-slot-migration.tcl +++ b/tests/cluster/tests/21-many-slot-migration.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Tests for many simultaneous migrations. # TODO: Test is currently disabled until it is stabilized (fixing the test diff --git a/tests/cluster/tests/22-replica-in-sync.tcl b/tests/cluster/tests/22-replica-in-sync.tcl index b5645aa75..14efb494f 100644 --- a/tests/cluster/tests/22-replica-in-sync.tcl +++ b/tests/cluster/tests/22-replica-in-sync.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + source "../tests/includes/init-tests.tcl" test "Create a 1 node cluster" { diff --git a/tests/cluster/tests/25-pubsubshard-slot-migration.tcl b/tests/cluster/tests/25-pubsubshard-slot-migration.tcl index 03d0f4a80..565924943 100644 --- a/tests/cluster/tests/25-pubsubshard-slot-migration.tcl +++ b/tests/cluster/tests/25-pubsubshard-slot-migration.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + source "../tests/includes/init-tests.tcl" test "Create a 3 nodes cluster" { diff --git a/tests/cluster/tests/26-pubsubshard.tcl b/tests/cluster/tests/26-pubsubshard.tcl index a7e996acc..eb831bb15 100644 --- a/tests/cluster/tests/26-pubsubshard.tcl +++ b/tests/cluster/tests/26-pubsubshard.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Test PUBSUB shard propagation in a cluster slot. source "../tests/includes/init-tests.tcl" diff --git a/tests/cluster/tests/28-cluster-shards.tcl b/tests/cluster/tests/28-cluster-shards.tcl index 6cebb4213..c6432cc0e 100644 --- a/tests/cluster/tests/28-cluster-shards.tcl +++ b/tests/cluster/tests/28-cluster-shards.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + source "../tests/includes/init-tests.tcl" # Initial slot distribution. diff --git a/tests/cluster/tests/29-slot-migration-response.tcl b/tests/cluster/tests/29-slot-migration-response.tcl index 923c5df7e..181d9d345 100644 --- a/tests/cluster/tests/29-slot-migration-response.tcl +++ b/tests/cluster/tests/29-slot-migration-response.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Tests for the response of slot migrations. source "../tests/includes/init-tests.tcl" diff --git a/tests/cluster/tests/helpers/onlydots.tcl b/tests/cluster/tests/helpers/onlydots.tcl index 0296ecb46..7edf5a7f6 100644 --- a/tests/cluster/tests/helpers/onlydots.tcl +++ b/tests/cluster/tests/helpers/onlydots.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Read the standard input and only shows dots in the output, filtering out # all the other characters. Designed to avoid bufferization so that when # we get the output of redict-trib and want to show just the dots, we'll see diff --git a/tests/cluster/tests/includes/init-tests.tcl b/tests/cluster/tests/includes/init-tests.tcl index 5a106ecd5..155a4e234 100644 --- a/tests/cluster/tests/includes/init-tests.tcl +++ b/tests/cluster/tests/includes/init-tests.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Initialization tests -- most units will start including this. test "(init) Restart killed instances" { diff --git a/tests/cluster/tests/includes/utils.tcl b/tests/cluster/tests/includes/utils.tcl index c55b6090a..f29e6cc85 100644 --- a/tests/cluster/tests/includes/utils.tcl +++ b/tests/cluster/tests/includes/utils.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + source "../../../tests/support/cli.tcl" proc config_set_all_nodes {keyword value} { diff --git a/tests/helpers/bg_block_op.tcl b/tests/helpers/bg_block_op.tcl index 395eabfc8..c2176370e 100644 --- a/tests/helpers/bg_block_op.tcl +++ b/tests/helpers/bg_block_op.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + source tests/support/redict.tcl source tests/support/util.tcl diff --git a/tests/helpers/bg_complex_data.tcl b/tests/helpers/bg_complex_data.tcl index e37d9cf3c..6574d8539 100644 --- a/tests/helpers/bg_complex_data.tcl +++ b/tests/helpers/bg_complex_data.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + source tests/support/redict.tcl source tests/support/util.tcl diff --git a/tests/helpers/fake_redict_node.tcl b/tests/helpers/fake_redict_node.tcl index 2ca20c970..725da3df8 100644 --- a/tests/helpers/fake_redict_node.tcl +++ b/tests/helpers/fake_redict_node.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # A fake Redict node for replaying predefined/expected traffic with a client. # # Usage: tclsh fake_redict_node.tcl PORT COMMAND REPLY [ COMMAND REPLY [ ... ] ] diff --git a/tests/helpers/gen_write_load.tcl b/tests/helpers/gen_write_load.tcl index 4dddc76f1..ba0137bff 100644 --- a/tests/helpers/gen_write_load.tcl +++ b/tests/helpers/gen_write_load.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + source tests/support/redict.tcl set ::tlsdir "tests/tls" diff --git a/tests/instances.tcl b/tests/instances.tcl index fbbf1bd05..a4ad9c69a 100644 --- a/tests/instances.tcl +++ b/tests/instances.tcl @@ -1,11 +1,9 @@ -# Multi-instance test framework. -# This is used in order to test Sentinel and Redict Cluster, and provides -# basic capabilities for spawning and handling N parallel Redict / Sentinel -# instances. -# # Copyright (C) 2014 Salvatore Sanfilippo antirez@gmail.com -# This software is released under the BSD License. See the COPYING file for -# more information. +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only package require Tcl 8.5 diff --git a/tests/integration/aof-multi-part.tcl b/tests/integration/aof-multi-part.tcl index debf81b22..559e53220 100644 --- a/tests/integration/aof-multi-part.tcl +++ b/tests/integration/aof-multi-part.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + source tests/support/aofmanifest.tcl set defaults {appendonly {yes} appendfilename {appendonly.aof} appenddirname {appendonlydir} auto-aof-rewrite-percentage {0}} set server_path [tmpdir server.multi.aof] diff --git a/tests/integration/aof-race.tcl b/tests/integration/aof-race.tcl index 56f4286f1..54645e295 100644 --- a/tests/integration/aof-race.tcl +++ b/tests/integration/aof-race.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + source tests/support/aofmanifest.tcl set defaults { appendonly {yes} appendfilename {appendonly.aof} appenddirname {appendonlydir} aof-use-rdb-preamble {no} } set server_path [tmpdir server.aof] diff --git a/tests/integration/aof.tcl b/tests/integration/aof.tcl index b8ca6a25b..bdf01f178 100644 --- a/tests/integration/aof.tcl +++ b/tests/integration/aof.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + source tests/support/aofmanifest.tcl set defaults { appendonly {yes} appendfilename {appendonly.aof} appenddirname {appendonlydir} auto-aof-rewrite-percentage {0}} set server_path [tmpdir server.aof] diff --git a/tests/integration/block-repl.tcl b/tests/integration/block-repl.tcl index 52b4a53ea..7782f208d 100644 --- a/tests/integration/block-repl.tcl +++ b/tests/integration/block-repl.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Test replication of blocking lists and zset operations. # Unlike stream operations such operations are "pop" style, so they consume # the list or sorted set, and must be replicated correctly. diff --git a/tests/integration/convert-ziplist-hash-on-load.tcl b/tests/integration/convert-ziplist-hash-on-load.tcl index c8265b25a..5de28b4af 100644 --- a/tests/integration/convert-ziplist-hash-on-load.tcl +++ b/tests/integration/convert-ziplist-hash-on-load.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + tags {"external:skip"} { # Copy RDB with ziplist encoded hash to server path diff --git a/tests/integration/convert-ziplist-zset-on-load.tcl b/tests/integration/convert-ziplist-zset-on-load.tcl index 0fbb20138..36f689d7e 100644 --- a/tests/integration/convert-ziplist-zset-on-load.tcl +++ b/tests/integration/convert-ziplist-zset-on-load.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + tags {"external:skip"} { # Copy RDB with ziplist encoded hash to server path diff --git a/tests/integration/convert-zipmap-hash-on-load.tcl b/tests/integration/convert-zipmap-hash-on-load.tcl index f7eda0e06..8eb04f97d 100644 --- a/tests/integration/convert-zipmap-hash-on-load.tcl +++ b/tests/integration/convert-zipmap-hash-on-load.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + tags {"external:skip"} { # Copy RDB with zipmap encoded hash to server path diff --git a/tests/integration/corrupt-dump-fuzzer.tcl b/tests/integration/corrupt-dump-fuzzer.tcl index c1502348c..0661e61fd 100644 --- a/tests/integration/corrupt-dump-fuzzer.tcl +++ b/tests/integration/corrupt-dump-fuzzer.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # tests of corrupt listpack payload with valid CRC # The fuzzer can cause corrupt the state in many places, which could diff --git a/tests/integration/corrupt-dump.tcl b/tests/integration/corrupt-dump.tcl index d8537f0c5..3d42abc52 100644 --- a/tests/integration/corrupt-dump.tcl +++ b/tests/integration/corrupt-dump.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # tests of corrupt ziplist payload with valid CRC # * setting crash-memcheck-enabled to no to avoid issues with valgrind # * setting use-exit-on-panic to yes so that valgrind can search for leaks diff --git a/tests/integration/dismiss-mem.tcl b/tests/integration/dismiss-mem.tcl index 7ed75fea0..4025ddf22 100644 --- a/tests/integration/dismiss-mem.tcl +++ b/tests/integration/dismiss-mem.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # The tests of this file aim to get coverage on all the "dismiss" methods # that dismiss all data-types memory in the fork child. like client query # buffer, client output buffer and replication backlog. diff --git a/tests/integration/failover.tcl b/tests/integration/failover.tcl index 5648f65b9..c478477c7 100644 --- a/tests/integration/failover.tcl +++ b/tests/integration/failover.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server {tags {"failover external:skip"} overrides {save {}}} { start_server {overrides {save {}}} { start_server {overrides {save {}}} { diff --git a/tests/integration/logging.tcl b/tests/integration/logging.tcl index e3e85f4d0..122e18b1c 100644 --- a/tests/integration/logging.tcl +++ b/tests/integration/logging.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + tags {"external:skip"} { set system_name [string tolower [exec uname -s]] diff --git a/tests/integration/psync2-master-restart.tcl b/tests/integration/psync2-master-restart.tcl index 6f7a31d21..ab8a1baeb 100644 --- a/tests/integration/psync2-master-restart.tcl +++ b/tests/integration/psync2-master-restart.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server {tags {"psync2 external:skip"}} { start_server {} { start_server {} { diff --git a/tests/integration/psync2-pingoff.tcl b/tests/integration/psync2-pingoff.tcl index 7a9130403..e7a179e11 100644 --- a/tests/integration/psync2-pingoff.tcl +++ b/tests/integration/psync2-pingoff.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # These tests were added together with the meaningful offset implementation # in redict 6.0.0, which was later abandoned in 6.0.4, they used to test that # servers are able to PSYNC with replicas even if the replication stream has diff --git a/tests/integration/psync2-reg.tcl b/tests/integration/psync2-reg.tcl index cda256f58..21c720cfc 100644 --- a/tests/integration/psync2-reg.tcl +++ b/tests/integration/psync2-reg.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Issue 3899 regression test. # We create a chain of three instances: master -> slave -> slave2 # and continuously break the link while traffic is generated by diff --git a/tests/integration/psync2.tcl b/tests/integration/psync2.tcl index 19a3e73bc..fbc84d066 100644 --- a/tests/integration/psync2.tcl +++ b/tests/integration/psync2.tcl @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only proc show_cluster_status {} { uplevel 1 { diff --git a/tests/integration/rdb.tcl b/tests/integration/rdb.tcl index eba8e6190..6bba9360e 100644 --- a/tests/integration/rdb.tcl +++ b/tests/integration/rdb.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + tags {"rdb external:skip"} { set server_path [tmpdir "server.rdb-encoding-test"] diff --git a/tests/integration/redict-benchmark.tcl b/tests/integration/redict-benchmark.tcl index 62454a445..48bd433cf 100644 --- a/tests/integration/redict-benchmark.tcl +++ b/tests/integration/redict-benchmark.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + source tests/support/benchmark.tcl source tests/support/cli.tcl diff --git a/tests/integration/redict-cli.tcl b/tests/integration/redict-cli.tcl index 3e2274150..cbfdb0278 100644 --- a/tests/integration/redict-cli.tcl +++ b/tests/integration/redict-cli.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + source tests/support/cli.tcl if {$::singledb} { diff --git a/tests/integration/replication-2.tcl b/tests/integration/replication-2.tcl index c18ff24fc..285e8e947 100644 --- a/tests/integration/replication-2.tcl +++ b/tests/integration/replication-2.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server {tags {"repl external:skip"}} { start_server {} { test {First server should have role slave after SLAVEOF} { diff --git a/tests/integration/replication-3.tcl b/tests/integration/replication-3.tcl index f53a05abc..1a312001a 100644 --- a/tests/integration/replication-3.tcl +++ b/tests/integration/replication-3.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server {tags {"repl external:skip"}} { start_server {} { test {First server should have role slave after SLAVEOF} { diff --git a/tests/integration/replication-4.tcl b/tests/integration/replication-4.tcl index 4370080b0..02c8de635 100644 --- a/tests/integration/replication-4.tcl +++ b/tests/integration/replication-4.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server {tags {"repl network external:skip singledb:skip"} overrides {save {}}} { start_server { overrides {save {}}} { diff --git a/tests/integration/replication-buffer.tcl b/tests/integration/replication-buffer.tcl index a173f2158..9d133d017 100644 --- a/tests/integration/replication-buffer.tcl +++ b/tests/integration/replication-buffer.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # This test group aims to test that all replicas share one global replication buffer, # two replicas don't make replication buffer size double, and when there is no replica, # replica buffer will shrink. diff --git a/tests/integration/replication-psync.tcl b/tests/integration/replication-psync.tcl index dc1df0fa6..a9716ccd8 100644 --- a/tests/integration/replication-psync.tcl +++ b/tests/integration/replication-psync.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Creates a master-slave pair and breaks the link continuously to force # partial resyncs attempts, all this while flooding the master with # write queries. diff --git a/tests/integration/replication.tcl b/tests/integration/replication.tcl index 07c80f4e0..2bee65b80 100644 --- a/tests/integration/replication.tcl +++ b/tests/integration/replication.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + proc log_file_matches {log pattern} { set fp [open $log r] set content [read $fp] diff --git a/tests/integration/shutdown.tcl b/tests/integration/shutdown.tcl index 0362e596a..82a6af654 100644 --- a/tests/integration/shutdown.tcl +++ b/tests/integration/shutdown.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # This test suite tests shutdown when there are lagging replicas connected. # Fill up the OS socket send buffer for the replica connection 1M at a time. diff --git a/tests/modules/aclcheck.c b/tests/modules/aclcheck.c index dfa3e2a3c..7440c45d3 100644 --- a/tests/modules/aclcheck.c +++ b/tests/modules/aclcheck.c @@ -1,3 +1,8 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "redictmodule.h" #include diff --git a/tests/modules/auth.c b/tests/modules/auth.c index d3b450e68..d2f92ec60 100644 --- a/tests/modules/auth.c +++ b/tests/modules/auth.c @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + /* define macros for having usleep */ #define _BSD_SOURCE #define _DEFAULT_SOURCE diff --git a/tests/modules/basics.c b/tests/modules/basics.c index e1cb7816b..949053d44 100644 --- a/tests/modules/basics.c +++ b/tests/modules/basics.c @@ -1,34 +1,9 @@ -/* Module designed to test the Redis modules subsystem. - * - * ----------------------------------------------------------------------------- - * - * Copyright (c) 2016, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2016, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "redictmodule.h" #include diff --git a/tests/modules/blockedclient.c b/tests/modules/blockedclient.c index e871ae6a6..b5e84e7b1 100644 --- a/tests/modules/blockedclient.c +++ b/tests/modules/blockedclient.c @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + /* define macros for having usleep */ #define _BSD_SOURCE #define _DEFAULT_SOURCE diff --git a/tests/modules/blockonbackground.c b/tests/modules/blockonbackground.c index 5c1f94c20..9d643715d 100644 --- a/tests/modules/blockonbackground.c +++ b/tests/modules/blockonbackground.c @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #define _XOPEN_SOURCE 700 #include "redictmodule.h" #include diff --git a/tests/modules/blockonkeys.c b/tests/modules/blockonkeys.c index 96cb2b887..827cc84a8 100644 --- a/tests/modules/blockonkeys.c +++ b/tests/modules/blockonkeys.c @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #include "redictmodule.h" #include diff --git a/tests/modules/cmdintrospection.c b/tests/modules/cmdintrospection.c index 99560fdfc..e079ce5d2 100644 --- a/tests/modules/cmdintrospection.c +++ b/tests/modules/cmdintrospection.c @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #include "redictmodule.h" #define UNUSED(V) ((void) V) diff --git a/tests/modules/commandfilter.c b/tests/modules/commandfilter.c index af5f03757..0e99bf7a3 100644 --- a/tests/modules/commandfilter.c +++ b/tests/modules/commandfilter.c @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #include "redictmodule.h" #include diff --git a/tests/modules/crash.c b/tests/modules/crash.c index 058dd2754..fdb402722 100644 --- a/tests/modules/crash.c +++ b/tests/modules/crash.c @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #include "redictmodule.h" #include diff --git a/tests/modules/datatype.c b/tests/modules/datatype.c index f0a963098..be96fbb20 100644 --- a/tests/modules/datatype.c +++ b/tests/modules/datatype.c @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + /* This module current tests a small subset but should be extended in the future * for general ModuleDataType coverage. */ diff --git a/tests/modules/datatype2.c b/tests/modules/datatype2.c index 60035edc8..772be8a2f 100644 --- a/tests/modules/datatype2.c +++ b/tests/modules/datatype2.c @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + /* This module is used to test a use case of a module that stores information * about keys in global memory, and relies on the enhanced data type callbacks to * get key name and dbid on various operations. diff --git a/tests/modules/defragtest.c b/tests/modules/defragtest.c index ef5684fae..967037b0f 100644 --- a/tests/modules/defragtest.c +++ b/tests/modules/defragtest.c @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + /* A module that implements defrag callback mechanisms. */ diff --git a/tests/modules/eventloop.c b/tests/modules/eventloop.c index 9634a17b8..1393526f0 100644 --- a/tests/modules/eventloop.c +++ b/tests/modules/eventloop.c @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + /* This module contains four tests : * 1- test.sanity : Basic tests for argument validation mostly. * 2- test.sendbytes : Creates a pipe and registers its fds to the event loop, diff --git a/tests/modules/fork.c b/tests/modules/fork.c index b5a9e24c9..b84588028 100644 --- a/tests/modules/fork.c +++ b/tests/modules/fork.c @@ -1,3 +1,8 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only /* define macros for having usleep */ #define _BSD_SOURCE diff --git a/tests/modules/getchannels.c b/tests/modules/getchannels.c index 2d966d4dd..614b573c3 100644 --- a/tests/modules/getchannels.c +++ b/tests/modules/getchannels.c @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #include "redictmodule.h" #include #include diff --git a/tests/modules/getkeys.c b/tests/modules/getkeys.c index 443fdc99f..2f89f713d 100644 --- a/tests/modules/getkeys.c +++ b/tests/modules/getkeys.c @@ -1,3 +1,8 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "redictmodule.h" #include diff --git a/tests/modules/hash.c b/tests/modules/hash.c index 8d75f362c..66a99195c 100644 --- a/tests/modules/hash.c +++ b/tests/modules/hash.c @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #include "redictmodule.h" #include #include diff --git a/tests/modules/hooks.c b/tests/modules/hooks.c index 1218c2128..7d4cbf929 100644 --- a/tests/modules/hooks.c +++ b/tests/modules/hooks.c @@ -1,34 +1,9 @@ -/* This module is used to test the server events hooks API. - * - * ----------------------------------------------------------------------------- - * - * Copyright (c) 2019, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2019, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "redictmodule.h" #include diff --git a/tests/modules/infotest.c b/tests/modules/infotest.c index 2fecc8c04..8d0db3321 100644 --- a/tests/modules/infotest.c +++ b/tests/modules/infotest.c @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #include "redictmodule.h" #include diff --git a/tests/modules/keyspace_events.c b/tests/modules/keyspace_events.c index aa74563db..b19303d57 100644 --- a/tests/modules/keyspace_events.c +++ b/tests/modules/keyspace_events.c @@ -1,34 +1,9 @@ -/* This module is used to test the server keyspace events API. - * - * ----------------------------------------------------------------------------- - * - * Copyright (c) 2020, Meir Shpilraien - * 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 Redis 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. - */ +// Copyright (c) 2020, Meir Shpilraien +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #define _BSD_SOURCE #define _DEFAULT_SOURCE /* For usleep */ diff --git a/tests/modules/keyspecs.c b/tests/modules/keyspecs.c index fa848812c..dcdbd92a6 100644 --- a/tests/modules/keyspecs.c +++ b/tests/modules/keyspecs.c @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #include "redictmodule.h" #define UNUSED(V) ((void) V) diff --git a/tests/modules/list.c b/tests/modules/list.c index 4d49aa0a0..c5e209a64 100644 --- a/tests/modules/list.c +++ b/tests/modules/list.c @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #include "redictmodule.h" #include #include diff --git a/tests/modules/mallocsize.c b/tests/modules/mallocsize.c index 2c9d6990b..252f9f83c 100644 --- a/tests/modules/mallocsize.c +++ b/tests/modules/mallocsize.c @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #include "redictmodule.h" #include #include diff --git a/tests/modules/misc.c b/tests/modules/misc.c index 69e4e1d7a..720f24025 100644 --- a/tests/modules/misc.c +++ b/tests/modules/misc.c @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #include "redictmodule.h" #include diff --git a/tests/modules/moduleauthtwo.c b/tests/modules/moduleauthtwo.c index 220b61e7d..47e276aef 100644 --- a/tests/modules/moduleauthtwo.c +++ b/tests/modules/moduleauthtwo.c @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #include "redictmodule.h" #include diff --git a/tests/modules/moduleconfigs.c b/tests/modules/moduleconfigs.c index dacb2dfe0..a37a0368a 100644 --- a/tests/modules/moduleconfigs.c +++ b/tests/modules/moduleconfigs.c @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #include "redictmodule.h" #include int mutable_bool_val; diff --git a/tests/modules/moduleconfigstwo.c b/tests/modules/moduleconfigstwo.c index baca0420a..f58e8d873 100644 --- a/tests/modules/moduleconfigstwo.c +++ b/tests/modules/moduleconfigstwo.c @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #include "redictmodule.h" #include diff --git a/tests/modules/postnotifications.c b/tests/modules/postnotifications.c index 9c6c56229..2941a75b8 100644 --- a/tests/modules/postnotifications.c +++ b/tests/modules/postnotifications.c @@ -1,34 +1,9 @@ -/* This module is used to test the server post keyspace jobs API. - * - * ----------------------------------------------------------------------------- - * - * Copyright (c) 2020, Meir Shpilraien - * 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 Redis 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. - */ +// Copyright (c) 2020, Meir Shpilraien +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only /* This module allow to verify 'RedisModule_AddPostNotificationJob' by registering to 3 * key space event: diff --git a/tests/modules/propagate.c b/tests/modules/propagate.c index b7553a17a..cb2400077 100644 --- a/tests/modules/propagate.c +++ b/tests/modules/propagate.c @@ -1,41 +1,9 @@ -/* This module is used to test the propagation (replication + AOF) of - * commands, via the RedisModule_Replicate() interface, in asynchronous - * contexts, such as callbacks not implementing commands, and thread safe - * contexts. - * - * We create a timer callback and a threads using a thread safe context. - * Using both we try to propagate counters increments, and later we check - * if the replica contains the changes as expected. - * - * ----------------------------------------------------------------------------- - * - * Copyright (c) 2019, Salvatore Sanfilippo - * 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 Redis 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. - */ +// Copyright (c) 2019, Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "redictmodule.h" #include diff --git a/tests/modules/publish.c b/tests/modules/publish.c index 2955381d8..6a7ac3d21 100644 --- a/tests/modules/publish.c +++ b/tests/modules/publish.c @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #include "redictmodule.h" #include #include diff --git a/tests/modules/rdbloadsave.c b/tests/modules/rdbloadsave.c index 1a32ad20d..35455c484 100644 --- a/tests/modules/rdbloadsave.c +++ b/tests/modules/rdbloadsave.c @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #include "redictmodule.h" #include diff --git a/tests/modules/reply.c b/tests/modules/reply.c index 168fd5f1e..79b342a12 100644 --- a/tests/modules/reply.c +++ b/tests/modules/reply.c @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + /* * A module the tests RM_ReplyWith family of commands */ diff --git a/tests/modules/scan.c b/tests/modules/scan.c index c015047c0..aeee7228e 100644 --- a/tests/modules/scan.c +++ b/tests/modules/scan.c @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #include "redictmodule.h" #include diff --git a/tests/modules/stream.c b/tests/modules/stream.c index f0bc6f77e..fd23adb15 100644 --- a/tests/modules/stream.c +++ b/tests/modules/stream.c @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #include "redictmodule.h" #include diff --git a/tests/modules/subcommands.c b/tests/modules/subcommands.c index 4cf69d5bf..13a24ffe1 100644 --- a/tests/modules/subcommands.c +++ b/tests/modules/subcommands.c @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #include "redictmodule.h" #define UNUSED(V) ((void) V) diff --git a/tests/modules/test_lazyfree.c b/tests/modules/test_lazyfree.c index 2b9565029..c51a95f17 100644 --- a/tests/modules/test_lazyfree.c +++ b/tests/modules/test_lazyfree.c @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + /* This module emulates a linked list for lazyfree testing of modules, which is a simplified version of 'hellotype.c' */ diff --git a/tests/modules/testrdb.c b/tests/modules/testrdb.c index 09784ffc1..88d1c06a5 100644 --- a/tests/modules/testrdb.c +++ b/tests/modules/testrdb.c @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #include "redictmodule.h" #include diff --git a/tests/modules/timer.c b/tests/modules/timer.c index 3b38bc24a..f4fbcd448 100644 --- a/tests/modules/timer.c +++ b/tests/modules/timer.c @@ -1,3 +1,8 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include "redictmodule.h" diff --git a/tests/modules/usercall.c b/tests/modules/usercall.c index aac567712..62c76fce8 100644 --- a/tests/modules/usercall.c +++ b/tests/modules/usercall.c @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #include "redictmodule.h" #include #include diff --git a/tests/modules/zset.c b/tests/modules/zset.c index d42699f45..64b6cef3b 100644 --- a/tests/modules/zset.c +++ b/tests/modules/zset.c @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #include "redictmodule.h" #include #include diff --git a/tests/sentinel/run.tcl b/tests/sentinel/run.tcl index 12a180c34..e51fab467 100644 --- a/tests/sentinel/run.tcl +++ b/tests/sentinel/run.tcl @@ -1,6 +1,9 @@ -# Sentinel test suite. Copyright (C) 2014 Salvatore Sanfilippo antirez@gmail.com -# This software is released under the BSD License. See the COPYING file for -# more information. +# Copyright (C) 2014 Salvatore Sanfilippo antirez@gmail.com +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only cd tests/sentinel source ../instances.tcl diff --git a/tests/sentinel/tests/00-base.tcl b/tests/sentinel/tests/00-base.tcl index 94c0a5335..06ffe4641 100644 --- a/tests/sentinel/tests/00-base.tcl +++ b/tests/sentinel/tests/00-base.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Check the basic monitoring and failover capabilities. source "../tests/includes/start-init-tests.tcl" source "../tests/includes/init-tests.tcl" diff --git a/tests/sentinel/tests/01-conf-update.tcl b/tests/sentinel/tests/01-conf-update.tcl index f04f3ebec..0091e3144 100644 --- a/tests/sentinel/tests/01-conf-update.tcl +++ b/tests/sentinel/tests/01-conf-update.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Test Sentinel configuration consistency after partitions heal. source "../tests/includes/init-tests.tcl" diff --git a/tests/sentinel/tests/02-slaves-reconf.tcl b/tests/sentinel/tests/02-slaves-reconf.tcl index 26f712f63..9c138f5de 100644 --- a/tests/sentinel/tests/02-slaves-reconf.tcl +++ b/tests/sentinel/tests/02-slaves-reconf.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Check that slaves are reconfigured at a latter time if they are partitioned. # # Here we should test: diff --git a/tests/sentinel/tests/03-runtime-reconf.tcl b/tests/sentinel/tests/03-runtime-reconf.tcl index a8caed9f6..aa516868e 100644 --- a/tests/sentinel/tests/03-runtime-reconf.tcl +++ b/tests/sentinel/tests/03-runtime-reconf.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Test runtime reconfiguration command SENTINEL SET. source "../tests/includes/init-tests.tcl" set num_sentinels [llength $::sentinel_instances] diff --git a/tests/sentinel/tests/04-slave-selection.tcl b/tests/sentinel/tests/04-slave-selection.tcl index 3d2ca6484..023a1ef2b 100644 --- a/tests/sentinel/tests/04-slave-selection.tcl +++ b/tests/sentinel/tests/04-slave-selection.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Test slave selection algorithm. # # This unit should test: diff --git a/tests/sentinel/tests/05-manual.tcl b/tests/sentinel/tests/05-manual.tcl index 9fdb03625..228887455 100644 --- a/tests/sentinel/tests/05-manual.tcl +++ b/tests/sentinel/tests/05-manual.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Test manual failover source "../tests/includes/init-tests.tcl" diff --git a/tests/sentinel/tests/06-ckquorum.tcl b/tests/sentinel/tests/06-ckquorum.tcl index 36c3dc650..a8f737caf 100644 --- a/tests/sentinel/tests/06-ckquorum.tcl +++ b/tests/sentinel/tests/06-ckquorum.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Test for the SENTINEL CKQUORUM command source "../tests/includes/init-tests.tcl" diff --git a/tests/sentinel/tests/07-down-conditions.tcl b/tests/sentinel/tests/07-down-conditions.tcl index feebc506e..5900a829d 100644 --- a/tests/sentinel/tests/07-down-conditions.tcl +++ b/tests/sentinel/tests/07-down-conditions.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Test conditions where an instance is considered to be down source "../tests/includes/init-tests.tcl" diff --git a/tests/sentinel/tests/08-hostname-conf.tcl b/tests/sentinel/tests/08-hostname-conf.tcl index 676bb3b45..838d9729d 100644 --- a/tests/sentinel/tests/08-hostname-conf.tcl +++ b/tests/sentinel/tests/08-hostname-conf.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + source "../tests/includes/utils.tcl" proc set_redict_announce_ip {addr} { diff --git a/tests/sentinel/tests/09-acl-support.tcl b/tests/sentinel/tests/09-acl-support.tcl index a754dacf5..ff3b17a25 100644 --- a/tests/sentinel/tests/09-acl-support.tcl +++ b/tests/sentinel/tests/09-acl-support.tcl @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only source "../tests/includes/init-tests.tcl" diff --git a/tests/sentinel/tests/10-replica-priority.tcl b/tests/sentinel/tests/10-replica-priority.tcl index bf0d14355..93048ce8a 100644 --- a/tests/sentinel/tests/10-replica-priority.tcl +++ b/tests/sentinel/tests/10-replica-priority.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + source "../tests/includes/init-tests.tcl" test "Check acceptable replica-priority values" { diff --git a/tests/sentinel/tests/11-port-0.tcl b/tests/sentinel/tests/11-port-0.tcl index a3e8bdba1..b55127bf7 100644 --- a/tests/sentinel/tests/11-port-0.tcl +++ b/tests/sentinel/tests/11-port-0.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + source "../tests/includes/init-tests.tcl" test "Start/Stop sentinel on same port with a different runID should not change the total number of sentinels" { diff --git a/tests/sentinel/tests/12-master-reboot.tcl b/tests/sentinel/tests/12-master-reboot.tcl index e204bf3ab..fed6bea05 100644 --- a/tests/sentinel/tests/12-master-reboot.tcl +++ b/tests/sentinel/tests/12-master-reboot.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Check the basic monitoring and failover capabilities. source "../tests/includes/init-tests.tcl" diff --git a/tests/sentinel/tests/13-info-command.tcl b/tests/sentinel/tests/13-info-command.tcl index b1b013c4f..6d0450e29 100644 --- a/tests/sentinel/tests/13-info-command.tcl +++ b/tests/sentinel/tests/13-info-command.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + source "../tests/includes/init-tests.tcl" test "info command with at most one argument" { diff --git a/tests/sentinel/tests/14-debug-command.tcl b/tests/sentinel/tests/14-debug-command.tcl index dccb992a9..320bbfffb 100644 --- a/tests/sentinel/tests/14-debug-command.tcl +++ b/tests/sentinel/tests/14-debug-command.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + source "../tests/includes/init-tests.tcl" test "Sentinel debug test with arguments and without argument" { diff --git a/tests/sentinel/tests/15-config-set-config-get.tcl b/tests/sentinel/tests/15-config-set-config-get.tcl index f9831f8e8..5b0afad99 100644 --- a/tests/sentinel/tests/15-config-set-config-get.tcl +++ b/tests/sentinel/tests/15-config-set-config-get.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + source "../tests/includes/init-tests.tcl" test "SENTINEL CONFIG SET and SENTINEL CONFIG GET handles multiple variables" { diff --git a/tests/sentinel/tests/helpers/check_leaked_fds.tcl b/tests/sentinel/tests/helpers/check_leaked_fds.tcl index 482b3e0d5..f7e85eaf7 100755 --- a/tests/sentinel/tests/helpers/check_leaked_fds.tcl +++ b/tests/sentinel/tests/helpers/check_leaked_fds.tcl @@ -1,4 +1,11 @@ #!/usr/bin/env tclsh + +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # # This script detects file descriptors that have leaked from a parent process. # diff --git a/tests/sentinel/tests/includes/init-tests.tcl b/tests/sentinel/tests/includes/init-tests.tcl index 8677e488b..51158c66a 100644 --- a/tests/sentinel/tests/includes/init-tests.tcl +++ b/tests/sentinel/tests/includes/init-tests.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Initialization tests -- most units will start including this. source "../tests/includes/utils.tcl" diff --git a/tests/sentinel/tests/includes/start-init-tests.tcl b/tests/sentinel/tests/includes/start-init-tests.tcl index b0523506a..f9af631dd 100644 --- a/tests/sentinel/tests/includes/start-init-tests.tcl +++ b/tests/sentinel/tests/includes/start-init-tests.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + test "(start-init) Flush config and compare rewrite config file lines" { foreach_sentinel_id id { assert_match "OK" [S $id SENTINEL FLUSHCONFIG] diff --git a/tests/sentinel/tests/includes/utils.tcl b/tests/sentinel/tests/includes/utils.tcl index 893b52cfb..2afbee8a5 100644 --- a/tests/sentinel/tests/includes/utils.tcl +++ b/tests/sentinel/tests/includes/utils.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + proc restart_killed_instances {} { foreach type {redict sentinel} { foreach_${type}_id id { diff --git a/tests/support/aofmanifest.tcl b/tests/support/aofmanifest.tcl index c82f92e4c..827e980ec 100644 --- a/tests/support/aofmanifest.tcl +++ b/tests/support/aofmanifest.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set ::base_aof_sufix ".base" set ::incr_aof_sufix ".incr" set ::manifest_suffix ".manifest" diff --git a/tests/support/benchmark.tcl b/tests/support/benchmark.tcl index 9127b5c42..d7bc0c4ee 100644 --- a/tests/support/benchmark.tcl +++ b/tests/support/benchmark.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + proc redictbenchmark_tls_config {testsdir} { set tlsdir [file join $testsdir tls] set cert [file join $tlsdir client.crt] diff --git a/tests/support/cli.tcl b/tests/support/cli.tcl index acb124fcb..a59dea640 100644 --- a/tests/support/cli.tcl +++ b/tests/support/cli.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + proc redictcli_tls_config {testsdir} { set tlsdir [file join $testsdir tls] set cert [file join $tlsdir client.crt] diff --git a/tests/support/cluster.tcl b/tests/support/cluster.tcl index ff6af82a3..af6c7435b 100644 --- a/tests/support/cluster.tcl +++ b/tests/support/cluster.tcl @@ -1,13 +1,9 @@ -# Tcl redict cluster client as a wrapper of redict.rb. # Copyright (C) 2014 Salvatore Sanfilippo -# Released under the BSD license like Redict itself +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo # -# Example usage: -# -# set c [redict_cluster {127.0.0.1:6379 127.0.0.1:6380}] -# $c set foo -# $c get foo -# $c close +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only package require Tcl 8.5 package provide redict_cluster 0.1 diff --git a/tests/support/cluster_util.tcl b/tests/support/cluster_util.tcl index 516046647..e0f9d6d9e 100644 --- a/tests/support/cluster_util.tcl +++ b/tests/support/cluster_util.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Cluster helper functions # Check if cluster configuration is consistent. diff --git a/tests/support/redict.tcl b/tests/support/redict.tcl index 9b8646a8e..0514a8f7b 100644 --- a/tests/support/redict.tcl +++ b/tests/support/redict.tcl @@ -1,29 +1,9 @@ -# Tcl client library - used by the Redict test # Copyright (C) 2009-2014 Salvatore Sanfilippo -# Released under the BSD license like Redict itself +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo # -# Example usage: -# -# set r [redict 127.0.0.1 6379] -# $r lpush mylist foo -# $r lpush mylist bar -# $r lrange mylist 0 -1 -# $r close -# -# Non blocking usage example: -# -# proc handlePong {r type reply} { -# puts "PONG $type '$reply'" -# if {$reply ne "PONG"} { -# $r ping [list handlePong] -# } -# } -# -# set r [redict] -# $r blocking 0 -# $r get fo [list handlePong] -# -# vwait forever +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only package require Tcl 8.5 package provide redict 0.1 diff --git a/tests/support/response_transformers.tcl b/tests/support/response_transformers.tcl index 3cc70f497..53dd1bec6 100644 --- a/tests/support/response_transformers.tcl +++ b/tests/support/response_transformers.tcl @@ -1,18 +1,9 @@ -# Tcl client library - used by the Redict test # Copyright (C) 2009-2023 Redict Ltd. -# Released under the BSD license like Redict itself +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo # -# This file contains a bunch of commands whose purpose is to transform -# a RESP3 response to RESP2 -# Why is it needed? -# When writing the reply_schema part in COMMAND DOCS we decided to use -# the existing tests in order to verify the schemas (see logreqres.c) -# The problem was that many tests were relying on the RESP2 structure -# of the response (e.g. HRANDFIELD WITHVALUES in RESP2: {f1 v1 f2 v2} -# vs. RESP3: {{f1 v1} {f2 v2}}). -# Instead of adjusting the tests to expect RESP3 responses (a lot of -# changes in many files) we decided to transform the response to RESP2 -# when running with --force-resp3 +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only package require Tcl 8.5 diff --git a/tests/support/server.tcl b/tests/support/server.tcl index 8fdd0d4a1..86c961b47 100644 --- a/tests/support/server.tcl +++ b/tests/support/server.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set ::global_overrides {} set ::tags {} set ::valgrind_errors {} diff --git a/tests/support/test.tcl b/tests/support/test.tcl index 1d693d74c..48b6cd642 100644 --- a/tests/support/test.tcl +++ b/tests/support/test.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set ::num_tests 0 set ::num_passed 0 set ::num_failed 0 diff --git a/tests/support/tmpfile.tcl b/tests/support/tmpfile.tcl index 809f58730..08915a8d2 100644 --- a/tests/support/tmpfile.tcl +++ b/tests/support/tmpfile.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set ::tmpcounter 0 set ::tmproot "./tests/tmp" file mkdir $::tmproot diff --git a/tests/support/util.tcl b/tests/support/util.tcl index 38e3e5c8a..fc5dfb594 100644 --- a/tests/support/util.tcl +++ b/tests/support/util.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + proc randstring {min max {type binary}} { set len [expr {$min+int(rand()*($max-$min+1))}] set output {} diff --git a/tests/test_helper.tcl b/tests/test_helper.tcl index df3d81cd1..119763266 100644 --- a/tests/test_helper.tcl +++ b/tests/test_helper.tcl @@ -1,6 +1,9 @@ -# Redict test suite. Copyright (C) 2009 Salvatore Sanfilippo antirez@gmail.com -# This software is released under the BSD License. See the COPYING file for -# more information. +# Copyright (C) 2009 Salvatore Sanfilippo antirez@gmail.com +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only package require Tcl 8.5 diff --git a/tests/unit/acl-v2.tcl b/tests/unit/acl-v2.tcl index 3c796bb3b..02cfa39e3 100644 --- a/tests/unit/acl-v2.tcl +++ b/tests/unit/acl-v2.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server {tags {"acl external:skip"}} { set r2 [redict_client] test {Test basic multiple selectors} { diff --git a/tests/unit/acl.tcl b/tests/unit/acl.tcl index 644616032..f720be3f9 100644 --- a/tests/unit/acl.tcl +++ b/tests/unit/acl.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server {tags {"acl external:skip"}} { test {Connections start with the default user} { r ACL WHOAMI diff --git a/tests/unit/aofrw.tcl b/tests/unit/aofrw.tcl index cc7545265..04e3afc10 100644 --- a/tests/unit/aofrw.tcl +++ b/tests/unit/aofrw.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # This unit has the potential to create huge .reqres files, causing log-req-res-validator.py to run for a very long time... # Since this unit doesn't do anything worth validating, reply_schema-wise, we decided to skip it start_server {tags {"aofrw external:skip logreqres:skip"} overrides {save {}}} { diff --git a/tests/unit/auth.tcl b/tests/unit/auth.tcl index 2b0c31bc9..49ae2921d 100644 --- a/tests/unit/auth.tcl +++ b/tests/unit/auth.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server {tags {"auth external:skip"}} { test {AUTH fails if there is no password configured server side} { catch {r auth foo} err diff --git a/tests/unit/bitfield.tcl b/tests/unit/bitfield.tcl index eae544a28..9f3025451 100644 --- a/tests/unit/bitfield.tcl +++ b/tests/unit/bitfield.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server {tags {"bitops"}} { test {BITFIELD signed SET and GET basics} { r del bits diff --git a/tests/unit/bitops.tcl b/tests/unit/bitops.tcl index c3a555864..04f82a5e0 100644 --- a/tests/unit/bitops.tcl +++ b/tests/unit/bitops.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Compare Redict commands against Tcl implementations of the same commands. proc count_bits s { binary scan $s b* bits diff --git a/tests/unit/client-eviction.tcl b/tests/unit/client-eviction.tcl index 7d6f52bb7..e4274405e 100644 --- a/tests/unit/client-eviction.tcl +++ b/tests/unit/client-eviction.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + tags {"external:skip logreqres:skip"} { # Get info about a redict client connection: diff --git a/tests/unit/cluster/announced-endpoints.tcl b/tests/unit/cluster/announced-endpoints.tcl index becba2270..1c1f74a3c 100644 --- a/tests/unit/cluster/announced-endpoints.tcl +++ b/tests/unit/cluster/announced-endpoints.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_cluster 2 2 {tags {external:skip cluster}} { test "Test change cluster-announce-port and cluster-announce-tls-port at runtime" { diff --git a/tests/unit/cluster/cli.tcl b/tests/unit/cluster/cli.tcl index e4faa50da..7843222e4 100644 --- a/tests/unit/cluster/cli.tcl +++ b/tests/unit/cluster/cli.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Primitive tests on cluster-enabled redict using redict-cli source tests/support/cli.tcl diff --git a/tests/unit/cluster/cluster-response-tls.tcl b/tests/unit/cluster/cluster-response-tls.tcl index 7c7446007..ded43a723 100644 --- a/tests/unit/cluster/cluster-response-tls.tcl +++ b/tests/unit/cluster/cluster-response-tls.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + source tests/support/cluster.tcl proc get_port_from_moved_error {e} { diff --git a/tests/unit/cluster/failure-marking.tcl b/tests/unit/cluster/failure-marking.tcl index c4746c826..9fa6abe5f 100644 --- a/tests/unit/cluster/failure-marking.tcl +++ b/tests/unit/cluster/failure-marking.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Test a single primary can mark replica as `fail` start_cluster 1 1 {tags {external:skip cluster}} { diff --git a/tests/unit/cluster/hostnames.tcl b/tests/unit/cluster/hostnames.tcl index f31824062..ebecd8d0f 100644 --- a/tests/unit/cluster/hostnames.tcl +++ b/tests/unit/cluster/hostnames.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + proc get_slot_field {slot_output shard_id node_id attrib_id} { return [lindex [lindex [lindex $slot_output $shard_id] $node_id] $attrib_id] } diff --git a/tests/unit/cluster/human-announced-nodename.tcl b/tests/unit/cluster/human-announced-nodename.tcl index a595ca632..b65f31b47 100644 --- a/tests/unit/cluster/human-announced-nodename.tcl +++ b/tests/unit/cluster/human-announced-nodename.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Check if cluster's view of human announced nodename is reported in logs start_cluster 3 0 {tags {external:skip cluster}} { test "Set cluster human announced nodename and let it propagate" { diff --git a/tests/unit/cluster/links.tcl b/tests/unit/cluster/links.tcl index d1180ff45..b7bbaecef 100644 --- a/tests/unit/cluster/links.tcl +++ b/tests/unit/cluster/links.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + proc get_links_with_peer {this_instance_id peer_nodename} { set links [R $this_instance_id cluster links] set links_with_peer {} diff --git a/tests/unit/cluster/misc.tcl b/tests/unit/cluster/misc.tcl index cd66697c4..0657e7cba 100644 --- a/tests/unit/cluster/misc.tcl +++ b/tests/unit/cluster/misc.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_cluster 2 2 {tags {external:skip cluster}} { test {Key lazy expires during key migration} { R 0 DEBUG SET-ACTIVE-EXPIRE 0 diff --git a/tests/unit/cluster/multi-slot-operations.tcl b/tests/unit/cluster/multi-slot-operations.tcl index cc7bb7ae0..26f5aedfb 100644 --- a/tests/unit/cluster/multi-slot-operations.tcl +++ b/tests/unit/cluster/multi-slot-operations.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # This test uses a custom slot allocation for testing proc cluster_allocate_with_continuous_slots_local {n} { R 0 cluster ADDSLOTSRANGE 0 3276 diff --git a/tests/unit/cluster/scripting.tcl b/tests/unit/cluster/scripting.tcl index 76aa882e8..746e96a45 100644 --- a/tests/unit/cluster/scripting.tcl +++ b/tests/unit/cluster/scripting.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_cluster 1 0 {tags {external:skip cluster}} { test {Eval scripts with shebangs and functions default to no cross slots} { diff --git a/tests/unit/cluster/slot-ownership.tcl b/tests/unit/cluster/slot-ownership.tcl index 0f3e3cc4f..8ccec9020 100644 --- a/tests/unit/cluster/slot-ownership.tcl +++ b/tests/unit/cluster/slot-ownership.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_cluster 2 2 {tags {external:skip cluster}} { test "Verify that slot ownership transfer through gossip propagates deletes to replicas" { diff --git a/tests/unit/dump.tcl b/tests/unit/dump.tcl index c9b486ee9..e22ed4aa6 100644 --- a/tests/unit/dump.tcl +++ b/tests/unit/dump.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server {tags {"dump"}} { test {DUMP / RESTORE are able to serialize / unserialize a simple key} { r set foo bar diff --git a/tests/unit/expire.tcl b/tests/unit/expire.tcl index 38c747a2c..fce4dd981 100644 --- a/tests/unit/expire.tcl +++ b/tests/unit/expire.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server {tags {"expire"}} { test {EXPIRE - set timeouts multiple times} { r set x foobar diff --git a/tests/unit/functions.tcl b/tests/unit/functions.tcl index 6af99f152..3b0ded30f 100644 --- a/tests/unit/functions.tcl +++ b/tests/unit/functions.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + proc get_function_code {args} { return [format "#!%s name=%s\nredis.register_function('%s', function(KEYS, ARGV)\n %s \nend)" [lindex $args 0] [lindex $args 1] [lindex $args 2] [lindex $args 3]] } diff --git a/tests/unit/geo.tcl b/tests/unit/geo.tcl index e682a5de5..09af2cda0 100644 --- a/tests/unit/geo.tcl +++ b/tests/unit/geo.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Helper functions to simulate search-in-radius in the Tcl side in order to # verify the Redict implementation with a fuzzy test. proc geo_degrad deg {expr {$deg*(atan(1)*8/360)}} diff --git a/tests/unit/hyperloglog.tcl b/tests/unit/hyperloglog.tcl index 6fc047b4d..28881eac2 100644 --- a/tests/unit/hyperloglog.tcl +++ b/tests/unit/hyperloglog.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server {tags {"hll"}} { test {HyperLogLog self test passes} { catch {r pfselftest} e diff --git a/tests/unit/info-command.tcl b/tests/unit/info-command.tcl index 86966e97e..0a29f9094 100644 --- a/tests/unit/info-command.tcl +++ b/tests/unit/info-command.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server {tags {"info and its relative command"}} { test "info command with at most one sub command" { foreach arg {"" "all" "default" "everything"} { diff --git a/tests/unit/info.tcl b/tests/unit/info.tcl index e6a476ce7..658833f96 100644 --- a/tests/unit/info.tcl +++ b/tests/unit/info.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + proc cmdstat {cmd} { return [cmdrstat $cmd r] } diff --git a/tests/unit/introspection-2.tcl b/tests/unit/introspection-2.tcl index 8e79eb179..914935429 100644 --- a/tests/unit/introspection-2.tcl +++ b/tests/unit/introspection-2.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + proc cmdstat {cmd} { return [cmdrstat $cmd r] } diff --git a/tests/unit/introspection.tcl b/tests/unit/introspection.tcl index 383821a98..df5314f14 100644 --- a/tests/unit/introspection.tcl +++ b/tests/unit/introspection.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server {tags {"introspection"}} { test "PING" { assert_equal {PONG} [r ping] diff --git a/tests/unit/keyspace.tcl b/tests/unit/keyspace.tcl index 31130e4c6..e882ea641 100644 --- a/tests/unit/keyspace.tcl +++ b/tests/unit/keyspace.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server {tags {"keyspace"}} { test {DEL against a single item} { r set x foo diff --git a/tests/unit/latency-monitor.tcl b/tests/unit/latency-monitor.tcl index 9e714c119..f8e05df6f 100644 --- a/tests/unit/latency-monitor.tcl +++ b/tests/unit/latency-monitor.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server {tags {"latency-monitor needs:latency"}} { # Set a threshold high enough to avoid spurious latency events. r config set latency-monitor-threshold 200 diff --git a/tests/unit/lazyfree.tcl b/tests/unit/lazyfree.tcl index 17f460003..f2fdf1c72 100644 --- a/tests/unit/lazyfree.tcl +++ b/tests/unit/lazyfree.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server {tags {"lazyfree"}} { test "UNLINK can reclaim memory in background" { set orig_mem [s used_memory] diff --git a/tests/unit/limits.tcl b/tests/unit/limits.tcl index e3ab4e2e8..58b68095f 100644 --- a/tests/unit/limits.tcl +++ b/tests/unit/limits.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server {tags {"limits network external:skip"} overrides {maxclients 10}} { if {$::tls} { set expected_code "*I/O error*" diff --git a/tests/unit/maxmemory.tcl b/tests/unit/maxmemory.tcl index b6cbdb254..7ebbf1adc 100644 --- a/tests/unit/maxmemory.tcl +++ b/tests/unit/maxmemory.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server {tags {"maxmemory" "external:skip"}} { r config set maxmemory 11mb r config set maxmemory-policy allkeys-lru diff --git a/tests/unit/memefficiency.tcl b/tests/unit/memefficiency.tcl index 89e12604e..a26fad131 100644 --- a/tests/unit/memefficiency.tcl +++ b/tests/unit/memefficiency.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + proc test_memory_efficiency {range} { r flushall set rd [redict_deferring_client] diff --git a/tests/unit/moduleapi/aclcheck.tcl b/tests/unit/moduleapi/aclcheck.tcl index 1ea09a232..dcf1b6d2c 100644 --- a/tests/unit/moduleapi/aclcheck.tcl +++ b/tests/unit/moduleapi/aclcheck.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/aclcheck.so] start_server {tags {"modules acl"}} { diff --git a/tests/unit/moduleapi/async_rm_call.tcl b/tests/unit/moduleapi/async_rm_call.tcl index 9b46b0b0c..bd77475c0 100644 --- a/tests/unit/moduleapi/async_rm_call.tcl +++ b/tests/unit/moduleapi/async_rm_call.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/blockedclient.so] set testmodule2 [file normalize tests/modules/postnotifications.so] set testmodule3 [file normalize tests/modules/blockonkeys.so] diff --git a/tests/unit/moduleapi/auth.tcl b/tests/unit/moduleapi/auth.tcl index e81b6b42e..d9cb17f31 100644 --- a/tests/unit/moduleapi/auth.tcl +++ b/tests/unit/moduleapi/auth.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/auth.so] start_server {tags {"modules"}} { diff --git a/tests/unit/moduleapi/basics.tcl b/tests/unit/moduleapi/basics.tcl index 042e3474a..05a3e859d 100644 --- a/tests/unit/moduleapi/basics.tcl +++ b/tests/unit/moduleapi/basics.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/basics.so] start_server {tags {"modules"}} { diff --git a/tests/unit/moduleapi/blockedclient.tcl b/tests/unit/moduleapi/blockedclient.tcl index 7d12d3763..fea01e2b9 100644 --- a/tests/unit/moduleapi/blockedclient.tcl +++ b/tests/unit/moduleapi/blockedclient.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/blockedclient.so] start_server {tags {"modules"}} { diff --git a/tests/unit/moduleapi/blockonbackground.tcl b/tests/unit/moduleapi/blockonbackground.tcl index ade4ddb35..6e34cb509 100644 --- a/tests/unit/moduleapi/blockonbackground.tcl +++ b/tests/unit/moduleapi/blockonbackground.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/blockonbackground.so] source tests/support/util.tcl diff --git a/tests/unit/moduleapi/blockonkeys.tcl b/tests/unit/moduleapi/blockonkeys.tcl index 70204cea3..70e6ba920 100644 --- a/tests/unit/moduleapi/blockonkeys.tcl +++ b/tests/unit/moduleapi/blockonkeys.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/blockonkeys.so] start_server {tags {"modules"}} { diff --git a/tests/unit/moduleapi/cluster.tcl b/tests/unit/moduleapi/cluster.tcl index 2bacb2c3d..e26d36a19 100644 --- a/tests/unit/moduleapi/cluster.tcl +++ b/tests/unit/moduleapi/cluster.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Primitive tests on cluster-enabled redict with modules source tests/support/cli.tcl diff --git a/tests/unit/moduleapi/cmdintrospection.tcl b/tests/unit/moduleapi/cmdintrospection.tcl index 9f9bdce16..2401e5420 100644 --- a/tests/unit/moduleapi/cmdintrospection.tcl +++ b/tests/unit/moduleapi/cmdintrospection.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/cmdintrospection.so] start_server {tags {"modules"}} { diff --git a/tests/unit/moduleapi/commandfilter.tcl b/tests/unit/moduleapi/commandfilter.tcl index 67d9f2f4d..9594353c7 100644 --- a/tests/unit/moduleapi/commandfilter.tcl +++ b/tests/unit/moduleapi/commandfilter.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/commandfilter.so] start_server {tags {"modules"}} { diff --git a/tests/unit/moduleapi/crash.tcl b/tests/unit/moduleapi/crash.tcl index dedbb1a1e..fa32ed832 100644 --- a/tests/unit/moduleapi/crash.tcl +++ b/tests/unit/moduleapi/crash.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # This file is used to test certain crash edge cases to make sure they produce # correct stack traces for debugging. set testmodule [file normalize tests/modules/crash.so] diff --git a/tests/unit/moduleapi/datatype.tcl b/tests/unit/moduleapi/datatype.tcl index e8d8b5d06..724731c04 100644 --- a/tests/unit/moduleapi/datatype.tcl +++ b/tests/unit/moduleapi/datatype.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/datatype.so] start_server {tags {"modules"}} { diff --git a/tests/unit/moduleapi/datatype2.tcl b/tests/unit/moduleapi/datatype2.tcl index 95acc9a5a..6a6dcc4bd 100644 --- a/tests/unit/moduleapi/datatype2.tcl +++ b/tests/unit/moduleapi/datatype2.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/datatype2.so] start_server {tags {"modules"}} { diff --git a/tests/unit/moduleapi/defrag.tcl b/tests/unit/moduleapi/defrag.tcl index fc9b85cb7..b59dc99ff 100644 --- a/tests/unit/moduleapi/defrag.tcl +++ b/tests/unit/moduleapi/defrag.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/defragtest.so] start_server {tags {"modules"} overrides {{save ""}}} { diff --git a/tests/unit/moduleapi/eventloop.tcl b/tests/unit/moduleapi/eventloop.tcl index 81e01cae0..cb79c9bc1 100644 --- a/tests/unit/moduleapi/eventloop.tcl +++ b/tests/unit/moduleapi/eventloop.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/eventloop.so] start_server {tags {"modules"}} { diff --git a/tests/unit/moduleapi/fork.tcl b/tests/unit/moduleapi/fork.tcl index 9d1f9c184..a6ae8fc07 100644 --- a/tests/unit/moduleapi/fork.tcl +++ b/tests/unit/moduleapi/fork.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/fork.so] start_server {tags {"modules"}} { diff --git a/tests/unit/moduleapi/getchannels.tcl b/tests/unit/moduleapi/getchannels.tcl index e8f557dcc..54c2e3ef9 100644 --- a/tests/unit/moduleapi/getchannels.tcl +++ b/tests/unit/moduleapi/getchannels.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/getchannels.so] start_server {tags {"modules"}} { diff --git a/tests/unit/moduleapi/getkeys.tcl b/tests/unit/moduleapi/getkeys.tcl index b84bb0f73..ad1873a6e 100644 --- a/tests/unit/moduleapi/getkeys.tcl +++ b/tests/unit/moduleapi/getkeys.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/getkeys.so] start_server {tags {"modules"}} { diff --git a/tests/unit/moduleapi/hash.tcl b/tests/unit/moduleapi/hash.tcl index 116b1c512..c1eed4907 100644 --- a/tests/unit/moduleapi/hash.tcl +++ b/tests/unit/moduleapi/hash.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/hash.so] start_server {tags {"modules"}} { diff --git a/tests/unit/moduleapi/hooks.tcl b/tests/unit/moduleapi/hooks.tcl index f6226c6fe..f51195978 100644 --- a/tests/unit/moduleapi/hooks.tcl +++ b/tests/unit/moduleapi/hooks.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/hooks.so] tags "modules" { diff --git a/tests/unit/moduleapi/infotest.tcl b/tests/unit/moduleapi/infotest.tcl index 05f7f382b..1fa508cab 100644 --- a/tests/unit/moduleapi/infotest.tcl +++ b/tests/unit/moduleapi/infotest.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/infotest.so] # Return value for INFO property diff --git a/tests/unit/moduleapi/infra.tcl b/tests/unit/moduleapi/infra.tcl index 1140e5ad5..105438b15 100644 --- a/tests/unit/moduleapi/infra.tcl +++ b/tests/unit/moduleapi/infra.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/infotest.so] test {modules config rewrite} { diff --git a/tests/unit/moduleapi/keyspace_events.tcl b/tests/unit/moduleapi/keyspace_events.tcl index 0da98b4ce..9cb7c3797 100644 --- a/tests/unit/moduleapi/keyspace_events.tcl +++ b/tests/unit/moduleapi/keyspace_events.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/keyspace_events.so] tags "modules" { diff --git a/tests/unit/moduleapi/keyspecs.tcl b/tests/unit/moduleapi/keyspecs.tcl index 9e68e9732..e992e28b2 100644 --- a/tests/unit/moduleapi/keyspecs.tcl +++ b/tests/unit/moduleapi/keyspecs.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/keyspecs.so] start_server {tags {"modules"}} { diff --git a/tests/unit/moduleapi/list.tcl b/tests/unit/moduleapi/list.tcl index 11f3b7534..aab3284db 100644 --- a/tests/unit/moduleapi/list.tcl +++ b/tests/unit/moduleapi/list.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/list.so] # The following arguments can be passed to args: diff --git a/tests/unit/moduleapi/mallocsize.tcl b/tests/unit/moduleapi/mallocsize.tcl index 359a7ae44..f03313454 100644 --- a/tests/unit/moduleapi/mallocsize.tcl +++ b/tests/unit/moduleapi/mallocsize.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/mallocsize.so] diff --git a/tests/unit/moduleapi/misc.tcl b/tests/unit/moduleapi/misc.tcl index 4be922f7e..d13053d5d 100644 --- a/tests/unit/moduleapi/misc.tcl +++ b/tests/unit/moduleapi/misc.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/misc.so] start_server {overrides {save {900 1}} tags {"modules"}} { diff --git a/tests/unit/moduleapi/moduleauth.tcl b/tests/unit/moduleapi/moduleauth.tcl index 7b34beedf..463159f6d 100644 --- a/tests/unit/moduleapi/moduleauth.tcl +++ b/tests/unit/moduleapi/moduleauth.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/auth.so] set testmoduletwo [file normalize tests/modules/moduleauthtwo.so] set miscmodule [file normalize tests/modules/misc.so] diff --git a/tests/unit/moduleapi/moduleconfigs.tcl b/tests/unit/moduleapi/moduleconfigs.tcl index 5e428f518..324213d53 100644 --- a/tests/unit/moduleapi/moduleconfigs.tcl +++ b/tests/unit/moduleapi/moduleconfigs.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/moduleconfigs.so] set testmoduletwo [file normalize tests/modules/moduleconfigstwo.so] diff --git a/tests/unit/moduleapi/postnotifications.tcl b/tests/unit/moduleapi/postnotifications.tcl index 7e48c7bc3..7fb442123 100644 --- a/tests/unit/moduleapi/postnotifications.tcl +++ b/tests/unit/moduleapi/postnotifications.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/postnotifications.so] tags "modules" { diff --git a/tests/unit/moduleapi/propagate.tcl b/tests/unit/moduleapi/propagate.tcl index 86bc49e88..c01654030 100644 --- a/tests/unit/moduleapi/propagate.tcl +++ b/tests/unit/moduleapi/propagate.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/propagate.so] set miscmodule [file normalize tests/modules/misc.so] set keyspace_events [file normalize tests/modules/keyspace_events.so] diff --git a/tests/unit/moduleapi/publish.tcl b/tests/unit/moduleapi/publish.tcl index adb778548..c02f8c1d4 100644 --- a/tests/unit/moduleapi/publish.tcl +++ b/tests/unit/moduleapi/publish.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/publish.so] start_server {tags {"modules"}} { diff --git a/tests/unit/moduleapi/rdbloadsave.tcl b/tests/unit/moduleapi/rdbloadsave.tcl index 647e89b9f..0ebf5da3f 100644 --- a/tests/unit/moduleapi/rdbloadsave.tcl +++ b/tests/unit/moduleapi/rdbloadsave.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/rdbloadsave.so] start_server {tags {"modules"}} { diff --git a/tests/unit/moduleapi/reply.tcl b/tests/unit/moduleapi/reply.tcl index 5bba34367..4b24fd8fc 100644 --- a/tests/unit/moduleapi/reply.tcl +++ b/tests/unit/moduleapi/reply.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/reply.so] start_server {tags {"modules"}} { diff --git a/tests/unit/moduleapi/scan.tcl b/tests/unit/moduleapi/scan.tcl index 1efd6ac55..4f196e59d 100644 --- a/tests/unit/moduleapi/scan.tcl +++ b/tests/unit/moduleapi/scan.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/scan.so] start_server {tags {"modules"}} { diff --git a/tests/unit/moduleapi/stream.tcl b/tests/unit/moduleapi/stream.tcl index ca8eba814..cbb3b8b62 100644 --- a/tests/unit/moduleapi/stream.tcl +++ b/tests/unit/moduleapi/stream.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/stream.so] start_server {tags {"modules"}} { diff --git a/tests/unit/moduleapi/subcommands.tcl b/tests/unit/moduleapi/subcommands.tcl index 62de593e7..77f489177 100644 --- a/tests/unit/moduleapi/subcommands.tcl +++ b/tests/unit/moduleapi/subcommands.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/subcommands.so] start_server {tags {"modules"}} { diff --git a/tests/unit/moduleapi/test_lazyfree.tcl b/tests/unit/moduleapi/test_lazyfree.tcl index c617f8729..897ef0ed7 100644 --- a/tests/unit/moduleapi/test_lazyfree.tcl +++ b/tests/unit/moduleapi/test_lazyfree.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/test_lazyfree.so] start_server {tags {"modules"}} { diff --git a/tests/unit/moduleapi/testrdb.tcl b/tests/unit/moduleapi/testrdb.tcl index 89b1cbf02..e07ec42f4 100644 --- a/tests/unit/moduleapi/testrdb.tcl +++ b/tests/unit/moduleapi/testrdb.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # This module can be configure with multiple options given as flags on module load time # 0 - not aux fields will be declared (this is the default) # 1 << 0 - use aux_save2 api diff --git a/tests/unit/moduleapi/timer.tcl b/tests/unit/moduleapi/timer.tcl index 4e9dd0f09..e9395f69d 100644 --- a/tests/unit/moduleapi/timer.tcl +++ b/tests/unit/moduleapi/timer.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/timer.so] start_server {tags {"modules"}} { diff --git a/tests/unit/moduleapi/usercall.tcl b/tests/unit/moduleapi/usercall.tcl index 7d752dc65..119b911a4 100644 --- a/tests/unit/moduleapi/usercall.tcl +++ b/tests/unit/moduleapi/usercall.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/usercall.so] set test_script_set "#!lua diff --git a/tests/unit/moduleapi/zset.tcl b/tests/unit/moduleapi/zset.tcl index b6ab41d5f..8e5f49815 100644 --- a/tests/unit/moduleapi/zset.tcl +++ b/tests/unit/moduleapi/zset.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set testmodule [file normalize tests/modules/zset.so] start_server {tags {"modules"}} { diff --git a/tests/unit/multi.tcl b/tests/unit/multi.tcl index 52fe6342c..e1010f5bc 100644 --- a/tests/unit/multi.tcl +++ b/tests/unit/multi.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + proc wait_for_dbsize {size} { set r2 [redict_client] wait_for_condition 50 100 { diff --git a/tests/unit/networking.tcl b/tests/unit/networking.tcl index 08507b0f5..0f1bc04d6 100644 --- a/tests/unit/networking.tcl +++ b/tests/unit/networking.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + source tests/support/cli.tcl test {CONFIG SET port number} { diff --git a/tests/unit/obuf-limits.tcl b/tests/unit/obuf-limits.tcl index 1402b2a5e..67def781e 100644 --- a/tests/unit/obuf-limits.tcl +++ b/tests/unit/obuf-limits.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server {tags {"obuf-limits external:skip logreqres:skip"}} { test {CONFIG SET client-output-buffer-limit} { set oldval [lindex [r config get client-output-buffer-limit] 1] diff --git a/tests/unit/oom-score-adj.tcl b/tests/unit/oom-score-adj.tcl index 4c32a318f..d08759b1f 100644 --- a/tests/unit/oom-score-adj.tcl +++ b/tests/unit/oom-score-adj.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set system_name [string tolower [exec uname -s]] if {$system_name eq {linux}} { diff --git a/tests/unit/other.tcl b/tests/unit/other.tcl index ee8590318..328cccf25 100644 --- a/tests/unit/other.tcl +++ b/tests/unit/other.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server {tags {"other"}} { if {$::force_failure} { # This is used just for test suite development purposes. diff --git a/tests/unit/pause.tcl b/tests/unit/pause.tcl index c37e804ce..964874b0e 100644 --- a/tests/unit/pause.tcl +++ b/tests/unit/pause.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server {tags {"pause network"}} { test "Test read commands are not blocked by client pause" { r client PAUSE 100000 WRITE diff --git a/tests/unit/printver.tcl b/tests/unit/printver.tcl index 544251e82..29bbfa083 100644 --- a/tests/unit/printver.tcl +++ b/tests/unit/printver.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server {} { set i [r info] regexp {redict_version:(.*?)\r\n} $i - version diff --git a/tests/unit/protocol.tcl b/tests/unit/protocol.tcl index 3d812f5bb..b9c73c53a 100644 --- a/tests/unit/protocol.tcl +++ b/tests/unit/protocol.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server {tags {"protocol network"}} { test "Handle an empty query" { reconnect diff --git a/tests/unit/pubsub.tcl b/tests/unit/pubsub.tcl index 378359baf..ac0ecfb92 100644 --- a/tests/unit/pubsub.tcl +++ b/tests/unit/pubsub.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server {tags {"pubsub network"}} { if {$::singledb} { set db 0 diff --git a/tests/unit/pubsubshard.tcl b/tests/unit/pubsubshard.tcl index 2e7a39428..15305445b 100644 --- a/tests/unit/pubsubshard.tcl +++ b/tests/unit/pubsubshard.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server {tags {"pubsubshard external:skip"}} { test "SPUBLISH/SSUBSCRIBE basics" { set rd1 [redict_deferring_client] diff --git a/tests/unit/querybuf.tcl b/tests/unit/querybuf.tcl index a02b4d193..af9033978 100644 --- a/tests/unit/querybuf.tcl +++ b/tests/unit/querybuf.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + proc client_idle_sec {name} { set clients [split [r client list] "\r\n"] set c [lsearch -inline $clients *name=$name*] diff --git a/tests/unit/quit.tcl b/tests/unit/quit.tcl index 50ccab186..6c3a2a104 100644 --- a/tests/unit/quit.tcl +++ b/tests/unit/quit.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server {tags {"quit"}} { test "QUIT returns OK" { diff --git a/tests/unit/replybufsize.tcl b/tests/unit/replybufsize.tcl index 1a7859f2f..0d16d6e89 100644 --- a/tests/unit/replybufsize.tcl +++ b/tests/unit/replybufsize.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + proc get_reply_buffer_size {cname} { set clients [split [string trim [r client list]] "\r\n"] diff --git a/tests/unit/scan.tcl b/tests/unit/scan.tcl index 0d440e979..ab45060c8 100644 --- a/tests/unit/scan.tcl +++ b/tests/unit/scan.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + proc test_scan {type} { test "{$type} SCAN basic" { r flushdb diff --git a/tests/unit/scripting.tcl b/tests/unit/scripting.tcl index c0b771fb5..610acd67e 100644 --- a/tests/unit/scripting.tcl +++ b/tests/unit/scripting.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + foreach is_eval {0 1} { if {$is_eval == 1} { diff --git a/tests/unit/shutdown.tcl b/tests/unit/shutdown.tcl index 9f0fb946d..9fa69b1f7 100644 --- a/tests/unit/shutdown.tcl +++ b/tests/unit/shutdown.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server {tags {"shutdown external:skip"}} { test {Temp rdb will be deleted if we use bg_unlink when shutdown} { for {set i 0} {$i < 20} {incr i} { diff --git a/tests/unit/slowlog.tcl b/tests/unit/slowlog.tcl index b0a0ee3da..8b9b92024 100644 --- a/tests/unit/slowlog.tcl +++ b/tests/unit/slowlog.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server {tags {"slowlog"} overrides {slowlog-log-slower-than 1000000}} { test {SLOWLOG - check that it starts with an empty log} { if {$::external} { diff --git a/tests/unit/sort.tcl b/tests/unit/sort.tcl index 95363cf6b..6f76f2979 100644 --- a/tests/unit/sort.tcl +++ b/tests/unit/sort.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server { tags {"sort"} overrides { diff --git a/tests/unit/tls.tcl b/tests/unit/tls.tcl index 288dc68cc..ae69ec1a3 100644 --- a/tests/unit/tls.tcl +++ b/tests/unit/tls.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server {tags {"tls"}} { if {$::tls} { package require tls diff --git a/tests/unit/tracking.tcl b/tests/unit/tracking.tcl index e32010ee8..68544b02d 100644 --- a/tests/unit/tracking.tcl +++ b/tests/unit/tracking.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # logreqres:skip because it seems many of these tests rely heavily on RESP2 start_server {tags {"tracking network logreqres:skip"}} { # Create a deferred client we'll use to redirect invalidation diff --git a/tests/unit/type/hash.tcl b/tests/unit/type/hash.tcl index 84e9a5ba5..60b8dfec5 100644 --- a/tests/unit/type/hash.tcl +++ b/tests/unit/type/hash.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server {tags {"hash"}} { test {HSET/HLEN - Small hash creation} { array set smallhash {} diff --git a/tests/unit/type/incr.tcl b/tests/unit/type/incr.tcl index 4bc130bcb..1e63b49af 100644 --- a/tests/unit/type/incr.tcl +++ b/tests/unit/type/incr.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server {tags {"incr"}} { test {INCR against non existing key} { set res {} diff --git a/tests/unit/type/list-2.tcl b/tests/unit/type/list-2.tcl index 5874a9028..9a6a1ed23 100644 --- a/tests/unit/type/list-2.tcl +++ b/tests/unit/type/list-2.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server { tags {"list"} overrides { diff --git a/tests/unit/type/list-3.tcl b/tests/unit/type/list-3.tcl index 45df5939d..157f92ad5 100644 --- a/tests/unit/type/list-3.tcl +++ b/tests/unit/type/list-3.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + proc generate_cmd_on_list_key {key} { set op [randomInt 7] set small_signed_count [expr 5-[randomInt 10]] diff --git a/tests/unit/type/list-common.tcl b/tests/unit/type/list-common.tcl index b393737c9..80c9af0e9 100644 --- a/tests/unit/type/list-common.tcl +++ b/tests/unit/type/list-common.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # We need a value to make sure the list has the right encoding when it is inserted. array set largevalue {} set largevalue(listpack) "hello" diff --git a/tests/unit/type/list.tcl b/tests/unit/type/list.tcl index 07877e447..d110043b9 100644 --- a/tests/unit/type/list.tcl +++ b/tests/unit/type/list.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # check functionality compression of plain and packed nodes start_server [list overrides [list save ""] ] { r config set list-compress-depth 2 diff --git a/tests/unit/type/set.tcl b/tests/unit/type/set.tcl index aa69f9bc2..4cfbd5296 100644 --- a/tests/unit/type/set.tcl +++ b/tests/unit/type/set.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server { tags {"set"} overrides { diff --git a/tests/unit/type/stream-cgroups.tcl b/tests/unit/type/stream-cgroups.tcl index a1ba1ca5e..af3b95916 100644 --- a/tests/unit/type/stream-cgroups.tcl +++ b/tests/unit/type/stream-cgroups.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server { tags {"stream"} } { diff --git a/tests/unit/type/stream.tcl b/tests/unit/type/stream.tcl index cf0c79ab1..707bff190 100644 --- a/tests/unit/type/stream.tcl +++ b/tests/unit/type/stream.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # return value is like strcmp() and similar. proc streamCompareID {a b} { if {$a eq $b} {return 0} diff --git a/tests/unit/type/string.tcl b/tests/unit/type/string.tcl index 610b5653f..2c44f12c8 100644 --- a/tests/unit/type/string.tcl +++ b/tests/unit/type/string.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server {tags {"string"}} { test {SET and GET an item} { r set x foobar diff --git a/tests/unit/type/zset.tcl b/tests/unit/type/zset.tcl index f7eb1a0ea..634a9674d 100644 --- a/tests/unit/type/zset.tcl +++ b/tests/unit/type/zset.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + start_server {tags {"zset"}} { proc create_zset {key items} { r del $key diff --git a/tests/unit/violations.tcl b/tests/unit/violations.tcl index 783f306d1..e28678bfc 100644 --- a/tests/unit/violations.tcl +++ b/tests/unit/violations.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # One XADD with one huge 5GB field # Expected to fail resulting in an empty stream run_solo {violations} { diff --git a/tests/unit/wait.tcl b/tests/unit/wait.tcl index 8c3ab53b8..e81e26054 100644 --- a/tests/unit/wait.tcl +++ b/tests/unit/wait.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + source tests/support/cli.tcl start_server {tags {"wait network external:skip"}} { diff --git a/utils/build-static-symbols.tcl b/utils/build-static-symbols.tcl index e634cbe0f..376e01f07 100644 --- a/utils/build-static-symbols.tcl +++ b/utils/build-static-symbols.tcl @@ -1,8 +1,9 @@ -# Build a symbol table for static symbols of redis.c -# Useful to get stack traces on segfault without a debugger. See redis.c -# for more information. -# # Copyright(C) 2009 Salvatore Sanfilippo, under the BSD license. +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only set fd [open redis.c] set symlist {} diff --git a/utils/cluster_fail_time.tcl b/utils/cluster_fail_time.tcl index 87399495f..3805047fa 100644 --- a/utils/cluster_fail_time.tcl +++ b/utils/cluster_fail_time.tcl @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # This simple script is used in order to estimate the average PFAIL->FAIL # state switch after a failure. diff --git a/utils/corrupt_rdb.c b/utils/corrupt_rdb.c index df9c93ed8..230375d37 100644 --- a/utils/corrupt_rdb.c +++ b/utils/corrupt_rdb.c @@ -1,8 +1,9 @@ -/* Trivia program to corrupt an RDB file in order to check the RDB check - * program behavior and effectiveness. - * - * Copyright (C) 2016 Salvatore Sanfilippo. - * This software is released in the 3-clause BSD license. */ +// Copyright (C) 2016 Salvatore Sanfilippo. +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include #include diff --git a/utils/create-cluster/create-cluster b/utils/create-cluster/create-cluster index dd2008331..75e602bfd 100755 --- a/utils/create-cluster/create-cluster +++ b/utils/create-cluster/create-cluster @@ -1,4 +1,8 @@ #!/bin/bash +# +# SPDX-FileCopyrightText: 2024 Redict Contributors +# +# SPDX-License-Identifier: GPL-3.0-only SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" diff --git a/utils/gen-test-certs.sh b/utils/gen-test-certs.sh index 6bc9d8607..763972eae 100755 --- a/utils/gen-test-certs.sh +++ b/utils/gen-test-certs.sh @@ -1,5 +1,11 @@ #!/bin/bash +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Generate some test certificates which are used by the regression test suite: # # tests/tls/ca.{crt,key} Self signed CA certificate. diff --git a/utils/generate-command-code.py b/utils/generate-command-code.py index 2d7cc5b0d..562e2f2e0 100755 --- a/utils/generate-command-code.py +++ b/utils/generate-command-code.py @@ -1,4 +1,11 @@ #!/usr/bin/env python3 + +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + import glob import json import os diff --git a/utils/generate-commands-json.py b/utils/generate-commands-json.py index 23782ea22..355bc6ee6 100755 --- a/utils/generate-commands-json.py +++ b/utils/generate-commands-json.py @@ -1,4 +1,11 @@ #!/usr/bin/env python3 + +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + import argparse import json import os diff --git a/utils/generate-fmtargs.py b/utils/generate-fmtargs.py index e16cc368f..876b7191e 100755 --- a/utils/generate-fmtargs.py +++ b/utils/generate-fmtargs.py @@ -1,5 +1,11 @@ #!/usr/bin/env python3 +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Outputs the generated part of src/fmtargs.h MAX_ARGS = 120 diff --git a/utils/generate-module-api-doc.rb b/utils/generate-module-api-doc.rb index 8829434bc..ff741d583 100755 --- a/utils/generate-module-api-doc.rb +++ b/utils/generate-module-api-doc.rb @@ -1,4 +1,11 @@ #!/usr/bin/env ruby + +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # coding: utf-8 # gendoc.rb -- Converts the top-comments inside module.c to modules API # reference documentation in markdown format. diff --git a/utils/graphs/commits-over-time/genhtml.tcl b/utils/graphs/commits-over-time/genhtml.tcl index c4b4e0989..32c037559 100755 --- a/utils/graphs/commits-over-time/genhtml.tcl +++ b/utils/graphs/commits-over-time/genhtml.tcl @@ -1,5 +1,11 @@ #!/usr/bin/env tclsh +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # Load commits history as "sha1 unixtime". set commits [exec git log unstable {--pretty="%H %at"}] set raw_tags [exec git tag] diff --git a/utils/hyperloglog/hll-err.rb b/utils/hyperloglog/hll-err.rb index 2c71ac5ef..632d31376 100644 --- a/utils/hyperloglog/hll-err.rb +++ b/utils/hyperloglog/hll-err.rb @@ -1,7 +1,9 @@ -# hll-err.rb - Copyright (C) 2014 Salvatore Sanfilippo -# BSD license, See the COPYING file for more information. +# Copyright (C) 2014 Salvatore Sanfilippo +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo # -# Check error of HyperLogLog Redis implementation for different set sizes. +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only require 'rubygems' require 'redis' diff --git a/utils/hyperloglog/hll-gnuplot-graph.rb b/utils/hyperloglog/hll-gnuplot-graph.rb index 6c7596d17..4f50d838b 100644 --- a/utils/hyperloglog/hll-gnuplot-graph.rb +++ b/utils/hyperloglog/hll-gnuplot-graph.rb @@ -1,9 +1,9 @@ -# hll-err.rb - Copyright (C) 2014 Salvatore Sanfilippo -# BSD license, See the COPYING file for more information. +# Copyright (C) 2014 Salvatore Sanfilippo +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo # -# This program is suited to output average and maximum errors of -# the Redis HyperLogLog implementation in a format suitable to print -# graphs using gnuplot. +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only require 'rubygems' require 'redis' diff --git a/utils/install_server.sh b/utils/install_server.sh index efda7da1c..b33bdf26c 100755 --- a/utils/install_server.sh +++ b/utils/install_server.sh @@ -1,52 +1,13 @@ #!/bin/sh # Copyright 2011 Dvir Volk . All rights reserved. +# SPDX-FileCopyrightText: 2011 Dvir Volk +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo # -# 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 ``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 Dvir Volk 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. -# -################################################################################ -# -# Service installer for redis server, runs interactively by default. -# -# To run this script non-interactively (for automation/provisioning purposes), -# feed the variables into the script. Any missing variables will be prompted! -# Tip: Environment variables also support command substitution (see REDIS_EXECUTABLE) -# -# Example: -# -# sudo REDIS_PORT=1234 \ -# REDIS_CONFIG_FILE=/etc/redis/1234.conf \ -# REDIS_LOG_FILE=/var/log/redis_1234.log \ -# REDIS_DATA_DIR=/var/lib/redis/1234 \ -# REDIS_EXECUTABLE=`command -v redis-server` ./utils/install_server.sh -# -# This generates a redis config file and an /etc/init.d script, and installs them. -# -# /!\ This script should be run as root -# -# NOTE: This script will not work on Mac OSX. -# It supports Debian and Ubuntu Linux. -# -################################################################################ +# SPDX-License-Identifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only die () { echo "ERROR: $1. Aborting!" diff --git a/utils/lru/lfu-simulation.c b/utils/lru/lfu-simulation.c index 60105e55b..2c883e9aa 100644 --- a/utils/lru/lfu-simulation.c +++ b/utils/lru/lfu-simulation.c @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + #include #include #include diff --git a/utils/lru/test-lru.rb b/utils/lru/test-lru.rb index d511e206f..89b0d69af 100644 --- a/utils/lru/test-lru.rb +++ b/utils/lru/test-lru.rb @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + require 'rubygems' require 'redis' diff --git a/utils/redis-copy.rb b/utils/redis-copy.rb index 7c5c52dd6..46144ed92 100644 --- a/utils/redis-copy.rb +++ b/utils/redis-copy.rb @@ -1,10 +1,9 @@ -# redis-copy.rb - Copyright (C) 2009-2010 Salvatore Sanfilippo -# BSD license, See the COPYING file for more information. +# Copyright (C) 2009-2010 Salvatore Sanfilippo +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo # -# Copy the whole dataset from one Redis instance to another one -# -# WARNING: this utility is deprecated and serves as a legacy adapter -# for the more-robust redis-copy gem. +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only require 'shellwords' diff --git a/utils/redis-sha1.rb b/utils/redis-sha1.rb index 6a8b4f358..e9f67cd55 100644 --- a/utils/redis-sha1.rb +++ b/utils/redis-sha1.rb @@ -1,12 +1,9 @@ -# redis-sha1.rb - Copyright (C) 2009 Salvatore Sanfilippo -# BSD license, See the COPYING file for more information. +# Copyright (C) 2009 Salvatore Sanfilippo +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo # -# Performs the SHA1 sum of the whole dataset. -# This is useful to spot bugs in persistence related code and to make sure -# Slaves and Masters are in SYNC. -# -# If you hack this code make sure to sort keys and set elements as this are -# unsorted elements. Otherwise the sum may differ with equal dataset. +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only require 'rubygems' require 'redis' diff --git a/utils/redis_init_script b/utils/redis_init_script index 006db87e5..9294870e7 100755 --- a/utils/redis_init_script +++ b/utils/redis_init_script @@ -1,5 +1,9 @@ #!/bin/sh # +# SPDX-FileCopyrightText: 2024 Redict Contributors +# +# SPDX-License-Identifier: GPL-3.0-only +# # Simple Redis init.d script conceived to work on Linux systems # as it does use of the /proc filesystem. diff --git a/utils/redis_init_script.tpl b/utils/redis_init_script.tpl index 2e5b61301..63172f193 100755 --- a/utils/redis_init_script.tpl +++ b/utils/redis_init_script.tpl @@ -1,3 +1,7 @@ +# +# SPDX-FileCopyrightText: 2024 Redict Contributors +# +# SPDX-License-Identifier: GPL-3.0-only case "$1" in start) diff --git a/utils/releasetools/01_create_tarball.sh b/utils/releasetools/01_create_tarball.sh index 366a61e2c..58988980a 100755 --- a/utils/releasetools/01_create_tarball.sh +++ b/utils/releasetools/01_create_tarball.sh @@ -1,4 +1,11 @@ #!/bin/sh + +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + if [ $# != "1" ] then echo "Usage: ./utils/releasetools/01_create_tarball.sh " diff --git a/utils/releasetools/02_upload_tarball.sh b/utils/releasetools/02_upload_tarball.sh index ef1e777cc..f6ecff0f1 100755 --- a/utils/releasetools/02_upload_tarball.sh +++ b/utils/releasetools/02_upload_tarball.sh @@ -1,4 +1,11 @@ #!/bin/bash + +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + if [ $# != "1" ] then echo "Usage: ./utils/releasetools/02_upload_tarball.sh " diff --git a/utils/releasetools/03_test_release.sh b/utils/releasetools/03_test_release.sh index 493d0b74c..8025e8c68 100755 --- a/utils/releasetools/03_test_release.sh +++ b/utils/releasetools/03_test_release.sh @@ -1,4 +1,11 @@ #!/bin/sh + +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + set -e if [ $# != "1" ] then diff --git a/utils/releasetools/04_release_hash.sh b/utils/releasetools/04_release_hash.sh index d93292803..f4f330b19 100755 --- a/utils/releasetools/04_release_hash.sh +++ b/utils/releasetools/04_release_hash.sh @@ -1,4 +1,11 @@ #!/bin/bash + +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + if [ $# != "1" ] then echo "Usage: ./utils/releasetools/04_release_hash.sh " diff --git a/utils/releasetools/changelog.tcl b/utils/releasetools/changelog.tcl index 2288794bb..e8ce3a99d 100755 --- a/utils/releasetools/changelog.tcl +++ b/utils/releasetools/changelog.tcl @@ -1,5 +1,11 @@ #!/usr/bin/env tclsh +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + if {[llength $::argv] != 2 && [llength $::argv] != 3} { puts "Usage: $::argv0 \[\]" exit 1 diff --git a/utils/reply_schema_linter.js b/utils/reply_schema_linter.js index e2358d4b9..f5e6760cc 100644 --- a/utils/reply_schema_linter.js +++ b/utils/reply_schema_linter.js @@ -1,3 +1,9 @@ +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only + function validate_schema(command_schema) { var error_status = false const Ajv = require("ajv/dist/2019") diff --git a/utils/req-res-log-validator.py b/utils/req-res-log-validator.py index 46c110019..20dba7446 100755 --- a/utils/req-res-log-validator.py +++ b/utils/req-res-log-validator.py @@ -1,4 +1,11 @@ #!/usr/bin/env python3 + +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + import os import glob import json diff --git a/utils/speed-regression.tcl b/utils/speed-regression.tcl index bf35c7db4..97219520c 100755 --- a/utils/speed-regression.tcl +++ b/utils/speed-regression.tcl @@ -1,6 +1,11 @@ #!/usr/bin/env tclsh8.5 + # Copyright (C) 2011 Salvatore Sanfilippo -# Released under the BSD license like Redis itself +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only source ../tests/support/redis.tcl set ::port 12123 diff --git a/utils/srandmember/showdist.rb b/utils/srandmember/showdist.rb index 243585700..258eeaffb 100644 --- a/utils/srandmember/showdist.rb +++ b/utils/srandmember/showdist.rb @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + require 'redis' r = Redis.new diff --git a/utils/srandmember/showfreq.rb b/utils/srandmember/showfreq.rb index 625519c5d..3d4e90576 100644 --- a/utils/srandmember/showfreq.rb +++ b/utils/srandmember/showfreq.rb @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + require 'redis' r = Redis.new diff --git a/utils/tracking_collisions.c b/utils/tracking_collisions.c index f52111173..ab76954e8 100644 --- a/utils/tracking_collisions.c +++ b/utils/tracking_collisions.c @@ -1,25 +1,9 @@ -/* This is a small program used in order to understand the collision rate - * of CRC64 (ISO version) VS other stronger hashing functions in the context - * of hashing keys for the Redis "tracking" feature (client side caching - * assisted by the server). - * - * The program attempts to hash keys with common names in the form of - * - * prefix: - * - * And counts the resulting collisions generated in the 24 bits of output - * needed for the tracking feature invalidation table (16 millions + entries) - * - * Compile with: - * - * cc -O2 ./tracking_collisions.c ../src/crc64.c ../src/sha1.c - * ./a.out - * - * -------------------------------------------------------------------------- - * - * Copyright (C) 2019 Salvatore Sanfilippo - * This code is released under the BSD 2 clause license. - */ +// Copyright (C) 2019 Salvatore Sanfilippo +// SPDX-FileCopyrightText: 2024 Redict Contributors +// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +// +// SPDX-License-Identifier: BSD-3-Clause +// SPDX-License-Identifier: GPL-3.0-only #include #include diff --git a/utils/whatisdoing.sh b/utils/whatisdoing.sh index 68d7f7cca..ffe905e3e 100755 --- a/utils/whatisdoing.sh +++ b/utils/whatisdoing.sh @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2024 Redict Contributors +# SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo +# +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: GPL-3.0-only + # This script is from http://poormansprofiler.org/ # # NOTE: Instead of using this script, you should use the Redis