├── clt_tests ├── dind │ └── Dockerfile ├── tests │ ├── base │ │ ├── init.sql │ │ ├── manticore-indexer-all.conf │ │ ├── manticore-indexer-postgres.conf │ │ ├── init.recb │ │ └── manticore-indexer-desired.conf │ ├── simple.rec │ ├── simple-with-network-host.rec │ ├── config-flexible-with-default-conf.rec │ ├── plain-indexes-all.rec │ ├── plain-indexes-only-crontab.rec │ ├── test-extra.rec │ ├── config-flexible-with-custom-conf.rec │ ├── plain-indexes-desired.rec │ ├── test-one-liner.rec │ ├── plain-indexes-crontab.rec │ ├── plain-indexes-crontab2.rec │ ├── test-ukrainian-morphology.rec │ ├── test-postgres-docker.rec │ ├── query_log_to_stdout.rec │ └── test-backup-restore.rec └── readme.md ├── .patterns ├── .github ├── ISSUE_TEMPLATE │ ├── config.yml │ ├── feature_request.yml │ ├── support_request.yml │ └── bug_report.yml └── workflows │ └── tests.yml ├── .clt └── patterns ├── NOTICE ├── .mysql_history ├── LICENSE ├── component-licenses ├── README.MD ├── manticore-executor-license ├── manticore-columnar-library-license ├── manticore-search-license ├── manticoresearch-backup-license └── manticoresearch-buddy-license ├── manticore.conf.sh ├── docker-entrypoint.sh ├── Dockerfile └── README.md /clt_tests/dind/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM docker:dind 2 | 3 | RUN apk update && apk add bash procps 4 | -------------------------------------------------------------------------------- /.patterns: -------------------------------------------------------------------------------- 1 | COMMITDATE [a-z0-9]{7,9}@[0-9]{6,8} 2 | SEMVER_EXT (0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][a-zA-Z0-9-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][a-zA-Z0-9-]*))*))?(?:\+([a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*))? 3 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | contact_links: 2 | - name: "Manticore Team's professional services" 3 | about: "Looking for a faster solution to your issues with Manticore? Manticore Team can help." 4 | url: "https://manticoresearch.com/services" 5 | -------------------------------------------------------------------------------- /clt_tests/tests/base/init.sql: -------------------------------------------------------------------------------- 1 | \c api_db; 2 | 3 | CREATE TABLE a_block_element ( 4 | id SERIAL PRIMARY KEY, 5 | name VARCHAR NOT NULL, 6 | text JSONB 7 | ); 8 | 9 | INSERT INTO a_block_element (name, text) VALUES 10 | ('Element 1', '{"key1": "value1"}'), 11 | ('Element 2', '{"key2": "value2"}'); -------------------------------------------------------------------------------- /.clt/patterns: -------------------------------------------------------------------------------- 1 | DATETIME [0-9]{4}\-[0-9]{2}\-[0-9]{2}\s[0-9]{2}:[0-9]{2}:[0-9]{2} 2 | NUMBER [0-9]+ 3 | COMMITDATE [a-z0-9]{7,9}@[0-9]{6,8} 4 | SEMVER_EXT (0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][a-zA-Z0-9-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][a-zA-Z0-9-]*))*))?(?:\+([a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*))? -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Manticore Search docker image includes: 2 | - Manticore Search (GPLv3) 3 | - Manticore Columnar Library (Apache 2.0) 4 | - Manticore Executor (PHP License 3.01) 5 | - Docker image packaging scripts (entrypoint scripts and related files) (MIT License) 6 | 7 | Each component operates independently, and its original license applies. 8 | 9 | For full license details, see the ./component-licenses/README.md file. -------------------------------------------------------------------------------- /clt_tests/tests/simple.rec: -------------------------------------------------------------------------------- 1 | ––– block: ./base/init ––– 2 | ––– input ––– 3 | docker run --rm --name=manticore --quiet -d manticoresoftware/manticore:current 4 | ––– output ––– 5 | #!/[0-9a-z]+/!# 6 | ––– input ––– 7 | if timeout 5 grep -qm1 'accepting connections' <(docker logs -f manticore); then echo 'accepting connections'; else echo 'Timeout failed'; fi 8 | ––– output ––– 9 | accepting connections 10 | ––– input ––– 11 | docker stop manticore 12 | ––– output ––– 13 | #!/[0-9a-z]+/!# 14 | -------------------------------------------------------------------------------- /clt_tests/tests/base/manticore-indexer-all.conf: -------------------------------------------------------------------------------- 1 | searchd { 2 | listen = 9306:mysql41 3 | listen = /var/run/mysqld/mysqld.sock:mysql41 4 | log = searchd.log 5 | pid_file = searchd.pid 6 | binlog_path = 7 | 8 | } 9 | 10 | source src { 11 | type = csvpipe 12 | csvpipe_command = echo "1,abc" && echo "2,abc" && echo "3,abc abc" 13 | csvpipe_field = f 14 | } 15 | 16 | index idx1 { 17 | type = plain 18 | source = src 19 | path = idx1 20 | stored_fields = f 21 | } -------------------------------------------------------------------------------- /clt_tests/tests/simple-with-network-host.rec: -------------------------------------------------------------------------------- 1 | ––– block: ./base/init ––– 2 | ––– input ––– 3 | docker run --rm --name=manticore --network=host --quiet -d manticoresoftware/manticore:current 4 | ––– output ––– 5 | #!/[0-9a-z]+/!# 6 | ––– input ––– 7 | if timeout 5 grep -qm1 'accepting connections' <(docker logs -f manticore); then echo 'accepting connections'; else echo 'Manticore failed to start properly in 10 seconds'; fi 8 | ––– output ––– 9 | accepting connections 10 | ––– input ––– 11 | docker stop manticore 12 | ––– output ––– 13 | #!/[0-9a-z]+/!# 14 | -------------------------------------------------------------------------------- /clt_tests/tests/base/manticore-indexer-postgres.conf: -------------------------------------------------------------------------------- 1 | source text_src { 2 | type = pgsql 3 | sql_host = postgres 4 | sql_user = postgres 5 | sql_pass = qazQASD! 6 | sql_db = api_db 7 | sql_port = 5432 8 | sql_query = SELECT id, name from a_block_element 9 | } 10 | 11 | index text_idx { 12 | type = plain 13 | source = text_src 14 | path = /var/lib/manticore/data 15 | } 16 | 17 | searchd { 18 | listen = 127.0.0.1:9312 19 | listen = 127.0.0.1:9306:mysql 20 | listen = 127.0.0.1:9308:http 21 | pid_file = /var/run/manticore/searchd.pid 22 | } -------------------------------------------------------------------------------- /clt_tests/tests/base/init.recb: -------------------------------------------------------------------------------- 1 | ––– input ––– 2 | export PATH=$PATH:/usr/sbin 3 | ––– output ––– 4 | ––– input ––– 5 | (dockerd > /var/log/dockerd.log 2>&1 &) > /dev/null 6 | ––– output ––– 7 | ––– input ––– 8 | if timeout 60 grep -qm1 'API listen on /var/run/docker.sock' <(tail -n 0 -f /var/log/dockerd.log); then echo 'Done'; else echo 'Timeout failed'; fi 9 | ––– output ––– 10 | Done 11 | ––– input ––– 12 | docker ps 13 | ––– output ––– 14 | CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 15 | ––– input ––– 16 | docker build --build-arg="DEV=1" -t manticoresoftware/manticore:current /docker/ > /dev/null 2>&1; echo $? 17 | ––– output ––– 18 | 0 19 | -------------------------------------------------------------------------------- /.mysql_history: -------------------------------------------------------------------------------- 1 | _HiStOrY_V2_ 2 | SELECT * FROM films WHERE MATCH('"shark monkey boy robot"/2') AND release_year IN(2006,2007) AND rental_rate BETWEEN 2.0 and 3.0; 3 | SELECT title, HIGHLIGHT({},'description') FROM films WHERE MATCH('"shark monkey boy robot"/2'); 4 | SELECT * FROM films WHERE MATCH('" shark monkey boy robot "/2'); 5 | SELECT * FROM films WHERE MATCH('Emotional drama') FACET release_year FACET category_id; 6 | SELECT * FROM films WHERE MATCH('Emotional drama') GROUP BY release_year; 7 | SELECT * FROM films WHERE MATCH('Emotional drama -dog -shark'); 8 | SELECT * FROM films WHERE MATCH('Emotional drama'); 9 | SELECT * FROM films; 10 | DESCRIBE films; 11 | SHOW TABLES; 12 | SOURCE /sandbox.sql 13 | -------------------------------------------------------------------------------- /clt_tests/tests/base/manticore-indexer-desired.conf: -------------------------------------------------------------------------------- 1 | searchd { 2 | listen = 9306:mysql41 3 | listen = /var/run/mysqld/mysqld.sock:mysql41 4 | log = searchd.log 5 | pid_file = searchd.pid 6 | binlog_path = 7 | 8 | } 9 | 10 | source src { 11 | type = csvpipe 12 | csvpipe_command = echo "1,abc" && echo "2,abc" && echo "3,abc abc" 13 | csvpipe_field = f 14 | } 15 | 16 | index idx1 { 17 | type = plain 18 | source = src 19 | path = idx1 20 | stored_fields = f 21 | } 22 | 23 | 24 | index idx2 { 25 | type = plain 26 | source = src 27 | path = idx2 28 | stored_fields = f 29 | } 30 | 31 | 32 | index idx3 { 33 | type = plain 34 | source = src 35 | path = idx3 36 | stored_fields = f 37 | } -------------------------------------------------------------------------------- /.github/workflows/tests.yml: -------------------------------------------------------------------------------- 1 | name: Testing 2 | on: 3 | push: 4 | branches: [main, master] 5 | pull_request: 6 | concurrency: 7 | group: tests_${{ github.ref }} 8 | cancel-in-progress: true 9 | jobs: 10 | tests: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - name: Checkout 14 | uses: actions/checkout@v4 15 | - name: Build test kit 16 | uses: docker/build-push-action@v5 17 | with: 18 | push: false 19 | tags: manticoresoftware/manticore-dind:latest 20 | context: ./clt_tests/dind/ 21 | - uses: manticoresoftware/clt@0.7.3 22 | with: 23 | image: manticoresoftware/manticore-dind:latest 24 | test_prefix: clt_tests/tests/ 25 | run_args: --privileged -v ".:/docker/" 26 | -------------------------------------------------------------------------------- /clt_tests/readme.md: -------------------------------------------------------------------------------- 1 | # CLT Tests 2 | 3 | ## Directory Structure 4 | 5 | * **dind** - Contains an image with Bash and Docker in Docker (DinD). 6 | * **tests** - Contains Continuous Integration Tests (CLT). 7 | 8 | ## Test Procedure 9 | 10 | To ensure the robustness of our Docker commands within the image, we generate the latest image from the development branch located in the `base/init` block. This image is tagged as `manticoresoftware/manticore:current`. If you intend to run our image, please use a command similar to the one provided below: 11 | ```bash 12 | docker run --name manticore --rm -d manticoresearch/manticore:current 13 | ``` 14 | This command will help you launch and manage the Manticore image with the necessary environment variables. 15 | 16 | ## Run test example 17 | 18 | ```bash 19 | docker build -t manticoresoftware/manticore-dind:latest ./clt_tests/dind/ 20 | CLT_RUN_ARGS="-v $(pwd):/docker --privileged" clt test -d -t ./clt_tests/tests/simple.rec manticoresoftware/manticore-dind:latest 21 | ``` 22 | -------------------------------------------------------------------------------- /clt_tests/tests/config-flexible-with-default-conf.rec: -------------------------------------------------------------------------------- 1 | ––– block: ./base/init ––– 2 | ––– input ––– 3 | docker run -d -e searchd_max_packet_size=64m -e "common_lemmatizer_base=/usr/share/manticore/" --name manticore manticoresoftware/manticore:current 4 | ––– output ––– 5 | #!/[0-9a-z]+/!# 6 | ––– input ––– 7 | if timeout 5 grep -qm1 'accepting connections' <(docker logs -f manticore); then echo 'accepting connections'; else echo 'Manticore failed to start properly in 10 seconds'; fi 8 | ––– output ––– 9 | accepting connections 10 | ––– input ––– 11 | docker exec manticore cat /etc/manticoresearch/manticore.conf.debug | sort 12 | ––– output ––– 13 | data_dir = /var/lib/manticore 14 | lemmatizer_base = /usr/share/manticore/ 15 | listen = /var/run/mysqld/mysqld.sock:mysql41 16 | listen = 172.18.0.2:9312 17 | listen = 172.18.0.2:9315-9325:replication 18 | listen = 9306:mysql41 19 | listen = 9308:http 20 | max_packet_size = 64m 21 | pid_file = /run/manticore/searchd.pid 22 | common { 23 | searchd { 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /clt_tests/tests/plain-indexes-all.rec: -------------------------------------------------------------------------------- 1 | ––– block: ./base/init ––– 2 | ––– input ––– 3 | docker run -d -e CREATE_PLAIN_TABLES=1 --name manticore -v $(pwd)/clt_tests/tests/base/manticore-indexer-all.conf:/etc/manticoresearch/manticore.conf manticoresoftware/manticore:current 4 | ––– output ––– 5 | #!/[0-9a-z]+/!# 6 | ––– input ––– 7 | if timeout 5 grep -qm1 'accepting connections' <(docker logs -f manticore); then echo 'accepting connections'; else echo 'Manticore failed to start properly in 10 seconds'; fi 8 | ––– output ––– 9 | accepting connections 10 | ––– input ––– 11 | docker exec manticore mysql -e "SHOW TABLES\G;" 12 | ––– output ––– 13 | *************************** 1. row *************************** 14 | Table: idx1 15 | Type: local 16 | ––– input ––– 17 | docker exec manticore mysql -e "SELECT * FROM idx1\G;" 18 | ––– output ––– 19 | *************************** 1. row *************************** 20 | id: 1 21 | f: abc 22 | *************************** 2. row *************************** 23 | id: 2 24 | f: abc 25 | *************************** 3. row *************************** 26 | id: 3 27 | f: abc abc 28 | -------------------------------------------------------------------------------- /clt_tests/tests/plain-indexes-only-crontab.rec: -------------------------------------------------------------------------------- 1 | ––– block: ./base/init ––– 2 | ––– input ––– 3 | docker run -d -e "CREATE_PLAIN_TABLES=idx1:* * * * *" --name manticore -v $(pwd)/clt_tests/tests/base/manticore-indexer-desired.conf:/etc/manticoresearch/manticore.conf manticoresoftware/manticore:current 4 | ––– output ––– 5 | #!/[0-9a-z]+/!# 6 | ––– input ––– 7 | if timeout 5 grep -qm1 'accepting connections' <(docker logs -f manticore); then echo 'accepting connections'; else echo 'Timeout failed'; fi 8 | ––– output ––– 9 | accepting connections 10 | ––– input ––– 11 | docker exec manticore ls | grep idx | sort 12 | ––– output ––– 13 | ––– input ––– 14 | if timeout 65 grep -qm1 'Indexer_idx1: rotating tables: successfully sent SIGHUP to searchd' <(docker logs -f manticore); then echo 'Cron job done'; else echo 'Cron job not run in 65 seconds'; fi 15 | ––– output ––– 16 | Cron job done 17 | ––– input ––– 18 | docker exec manticore ls | grep idx | sort 19 | ––– output ––– 20 | idx1.new.spa 21 | idx1.new.spd 22 | idx1.new.spds 23 | idx1.new.spe 24 | idx1.new.sph 25 | idx1.new.sphi 26 | idx1.new.spi 27 | idx1.new.spidx 28 | idx1.new.spm 29 | idx1.new.spp 30 | idx1.new.spt -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright © 2020-2024 Manticore Software Ltd. 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the “Software”), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included 12 | in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 20 | IN THE SOFTWARE. -------------------------------------------------------------------------------- /clt_tests/tests/test-extra.rec: -------------------------------------------------------------------------------- 1 | ––– block: ./base/init ––– 2 | ––– input ––– 3 | docker run --rm --name manticore -v /tmp/idx:/var/lib/manticore -d manticoresoftware/manticore:current 4 | ––– output ––– 5 | #!/[0-9a-z]{40}$/!# 6 | ––– input ––– 7 | if timeout 60 grep -qEm1 "columnar.*?secondary.*?knn" <(docker logs -f manticore 2>&1); then echo 'Done'; else echo 'Not found'; fi 8 | ––– output ––– 9 | Done 10 | ––– input ––– 11 | docker exec manticore manticore-executor -v 12 | ––– output ––– 13 | PHP %{SEMVER} (cli) (built: #!/[a-zA-Z]{3}/!# #!/[0-9]+/!# %{YEAR} #!/[0-9]{2}:[0-9]{2}:[0-9]{2}/!#) (NTS) 14 | Copyright (c) The PHP Group 15 | Zend Engine #!/v[0-9]+\.[0-9]+\.[0-9]+/!#, Copyright (c) Zend Technologies 16 | ––– input ––– 17 | docker exec manticore ls /usr/share/manticore/modules/lib_manticore_columnar.so /usr/share/manticore/modules/lib_manticore_secondary.so /usr/share/manticore/modules/lib_manticore_knn.so /usr/share/manticore/modules/libgalera_manticore.so 18 | ––– output ––– 19 | /usr/share/manticore/modules/lib_manticore_columnar.so 20 | /usr/share/manticore/modules/lib_manticore_knn.so 21 | /usr/share/manticore/modules/lib_manticore_secondary.so 22 | /usr/share/manticore/modules/libgalera_manticore.so 23 | ––– input ––– 24 | docker exec manticore mysql -e "create cluster abc"; echo $? 25 | ––– output ––– 26 | 0 -------------------------------------------------------------------------------- /clt_tests/tests/config-flexible-with-custom-conf.rec: -------------------------------------------------------------------------------- 1 | ––– block: ./base/init ––– 2 | ––– input ––– 3 | echo "" > /tmp/manticore.conf;echo $? 4 | ––– output ––– 5 | 0 6 | ––– input ––– 7 | docker run --name manticore -v "/tmp/manticore.conf:/etc/manticoresearch/manticore.conf" -d -e searchd_data_dir=/var/lib/manticore -e searchd_log=/var/log/manticore/searchd.log -e searchd_max_packet_size=128M -e searchd_pid_file=/var/run/manticore/searchd.pid -e searchd_query_log_format=sphinxql -e 'searchd_listen=9306:mysql41|/var/run/mysqld/mysqld.sock:mysql41|9312|0.0.0.0:9308:http|$ip:9315-9325:replication' manticoresoftware/manticore:current 8 | ––– output ––– 9 | #!/[0-9a-z]+/!# 10 | ––– input ––– 11 | if timeout 5 grep -qm1 'accepting connections' <(docker logs -f manticore); then echo 'accepting connections'; else echo 'Manticore failed to start properly in 10 seconds'; fi 12 | ––– output ––– 13 | accepting connections 14 | ––– input ––– 15 | docker exec manticore cat /etc/manticoresearch/manticore.conf.debug | sort 16 | ––– output ––– 17 | data_dir = /var/lib/manticore 18 | listen = /var/run/mysqld/mysqld.sock:mysql41 19 | listen = 0.0.0.0:9308:http 20 | listen = 172.18.0.2:9315-9325:replication 21 | listen = 9306:mysql41 22 | listen = 9312 23 | log = /var/log/manticore/searchd.log 24 | max_packet_size = 128M 25 | pid_file = /var/run/manticore/searchd.pid 26 | query_log_format = sphinxql 27 | searchd { 28 | } -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.yml: -------------------------------------------------------------------------------- 1 | name: 🌟 Feature Request 2 | description: Submit a proposal for a new Manticore Search docker feature or enhancement 3 | body: 4 | - type: textarea 5 | id: proposal 6 | attributes: 7 | label: "Proposal:" 8 | description: > 9 | Please describe your proposal in detail. 10 | Include why you believe this feature should be added to Manticore Search docker image and what use cases it supports. 11 | If applicable, add any examples or code snippets inside triple backticks to clarify your proposal. 12 | validations: 13 | required: true 14 | - type: markdown 15 | attributes: 16 | value: "## Thank you for completing the form! If you are interested in sponsoring the development of this feature, consider our [professional services](https://manticoresearch.com/services/)." 17 | - type: textarea 18 | id: checklist 19 | attributes: 20 | label: "Checklist:" 21 | description: > 22 | **For Manticore Team Use Only** — Please do not edit this section. This checklist will be completed by the Manticore team as they manage the issue. 23 | value: | 24 | To be completed by the assignee. Check off tasks that have been completed or are not applicable. 25 |
26 | 27 | - [ ] Implementation completed 28 | - [ ] Tests developed 29 | - [ ] Documentation updated 30 | - [ ] Documentation reviewed 31 | - [ ] Changelog updated 32 | 33 |
34 | validations: 35 | required: true 36 | -------------------------------------------------------------------------------- /clt_tests/tests/plain-indexes-desired.rec: -------------------------------------------------------------------------------- 1 | ––– block: ./base/init ––– 2 | ––– input ––– 3 | docker run -d -e "CREATE_PLAIN_TABLES=idx1;idx2" --name manticore -v $(pwd)/clt_tests/tests/base/manticore-indexer-desired.conf:/etc/manticoresearch/manticore.conf manticoresoftware/manticore:current 4 | ––– output ––– 5 | #!/[0-9a-z]+/!# 6 | ––– input ––– 7 | if timeout 5 grep -qm1 'accepting connections' <(docker logs -f manticore); then echo 'accepting connections'; else echo 'Manticore failed to start properly in 10 seconds'; fi 8 | ––– output ––– 9 | accepting connections 10 | ––– input ––– 11 | docker exec manticore mysql -e "SHOW TABLES\G;" 12 | ––– output ––– 13 | *************************** 1. row *************************** 14 | Table: idx1 15 | Type: local 16 | *************************** 2. row *************************** 17 | Table: idx2 18 | Type: local 19 | ––– input ––– 20 | docker exec manticore mysql -e "SELECT * FROM idx1\G;" 21 | ––– output ––– 22 | *************************** 1. row *************************** 23 | id: 1 24 | f: abc 25 | *************************** 2. row *************************** 26 | id: 2 27 | f: abc 28 | *************************** 3. row *************************** 29 | id: 3 30 | f: abc abc 31 | ––– input ––– 32 | docker exec manticore mysql -e "SELECT * FROM idx2\G;" 33 | ––– output ––– 34 | *************************** 1. row *************************** 35 | id: 1 36 | f: abc 37 | *************************** 2. row *************************** 38 | id: 2 39 | f: abc 40 | *************************** 3. row *************************** 41 | id: 3 42 | f: abc abc -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/support_request.yml: -------------------------------------------------------------------------------- 1 | name: ❓ Support Request 2 | description: Need help with Manticore Search? Submit your questions here! 3 | body: 4 | - type: checkboxes 5 | id: dev 6 | attributes: 7 | label: "Confirmation Checklist:" 8 | description: > 9 | Before submitting your request, we ask that you confirm the following items to ensure that you receive the most effective support: 10 | options: 11 | - label: "You have searched for an answer in [the manual](https://manual.manticoresearch.com/)." 12 | - label: "You have considered using [the forum](https://forum.manticoresearch.com/) for general discussions, which can be more suitable for non-urgent or broad queries." 13 | - label: "You are aware of our community support channels on [Slack](https://slack.manticoresearch.com/), [Telegram EN](https://t.me/manticoresearch_en), and [Telegram RU](https://t.me/manticore_chat), where you can interact with other users and our developers." 14 | - label: "You know about Manticore Team's [professional services](https://manticoresearch.com/services). Engaging with our experts through a support subscription can significantly accelerate resolution times and provide tailored solutions to your specific needs." 15 | validations: 16 | required: true 17 | - type: textarea 18 | id: question 19 | attributes: 20 | label: "Your question:" 21 | description: > 22 | Please provide detailed information about your question to ensure prompt and accurate help! 23 | validations: 24 | required: true 25 | - type: markdown 26 | attributes: 27 | value: "## Thank you for completing the form! If you need immediate, dedicated support or a long-term support subscription, consider using our [professional services](https://manticoresearch.com/services)." 28 | -------------------------------------------------------------------------------- /clt_tests/tests/test-one-liner.rec: -------------------------------------------------------------------------------- 1 | ––– block: ./base/init ––– 2 | ––– input ––– 3 | docker run --name manticore --rm -d manticoresoftware/manticore:current && echo "Waiting for Manticore docker to start. Consider mapping the data_dir to make it start faster next time" && until docker logs manticore 2>&1 | grep -q "accepting connections"; do sleep 1; echo -n .; done && echo $? 4 | ––– output ––– 5 | #!/[a-z0-9]{40}$/!# 6 | Waiting for Manticore docker to start. Consider mapping the data_dir to make it start faster next time 7 | #!/.*\.0$/!# 8 | ––– input ––– 9 | docker exec manticore mysql -e "source /sandbox.sql" 10 | ––– output ––– 11 | ––– input ––– 12 | docker exec manticore mysql -e "SHOW TABLES\G" 13 | ––– output ––– 14 | *************************** 1. row *************************** 15 | Table: films 16 | Type: rt 17 | ––– input ––– 18 | docker exec manticore mysql -e "SELECT * FROM films LIMIT 3\G" 19 | ––– output ––– 20 | *************************** 1. row *************************** 21 | id: 19 22 | title: AMADEUS HOLY 23 | description: A Emotional Display of a Pioneer And a Technical Writer who must Battle a Man in A Baloon 24 | category_id: 1 25 | release_year: 2008 26 | rental_rate: 0.990000 27 | *************************** 2. row *************************** 28 | id: 21 29 | title: AMERICAN CIRCUS 30 | description: A Insightful Drama of a Girl And a Astronaut who must Face a Database Administrator in A Shark Tank 31 | category_id: 1 32 | release_year: 2009 33 | rental_rate: 4.990000 34 | *************************** 3. row *************************** 35 | id: 29 36 | title: ANTITRUST TOMATOES 37 | description: A Fateful Yarn of a Womanizer And a Feminist who must Succumb a Database Administrator in Ancient India 38 | category_id: 1 39 | release_year: 2005 40 | rental_rate: 2.990000 41 | -------------------------------------------------------------------------------- /clt_tests/tests/plain-indexes-crontab.rec: -------------------------------------------------------------------------------- 1 | ––– block: ./base/init ––– 2 | ––– input ––– 3 | docker run -d -e "CREATE_PLAIN_TABLES=idx1;idx2:* * * * *" --name manticore -v $(pwd)/clt_tests/tests/base/manticore-indexer-desired.conf:/etc/manticoresearch/manticore.conf manticoresoftware/manticore:current 4 | ––– output ––– 5 | #!/[0-9a-z]+/!# 6 | ––– input ––– 7 | if timeout 5 grep -qm1 'accepting connections' <(docker logs -f manticore); then echo 'accepting connections'; else echo 'Timeout failed'; fi 8 | ––– output ––– 9 | accepting connections 10 | ––– input ––– 11 | docker exec manticore mysql -e "SELECT * FROM idx1\G;" 12 | ––– output ––– 13 | *************************** 1. row *************************** 14 | id: 1 15 | f: abc 16 | *************************** 2. row *************************** 17 | id: 2 18 | f: abc 19 | *************************** 3. row *************************** 20 | id: 3 21 | f: abc abc 22 | ––– input ––– 23 | docker exec manticore ls | grep idx | sort 24 | ––– output ––– 25 | idx1.spa 26 | idx1.spd 27 | idx1.spds 28 | idx1.spe 29 | idx1.sph 30 | idx1.sphi 31 | idx1.spi 32 | idx1.spidx 33 | idx1.spl 34 | idx1.spm 35 | idx1.spp 36 | idx1.spt 37 | ––– input ––– 38 | if timeout 65 grep -qm1 'Indexer_idx2: rotating tables: successfully sent SIGHUP to searchd' <(docker logs -f manticore); then echo 'Cron job done'; else echo 'Cron job not run in 65 seconds'; fi 39 | ––– output ––– 40 | Cron job done 41 | ––– input ––– 42 | docker exec manticore ls | grep idx | sort 43 | ––– output ––– 44 | idx1.spa 45 | idx1.spd 46 | idx1.spds 47 | idx1.spe 48 | idx1.sph 49 | idx1.sphi 50 | idx1.spi 51 | idx1.spidx 52 | idx1.spl 53 | idx1.spm 54 | idx1.spp 55 | idx1.spt 56 | idx2.new.spa 57 | idx2.new.spd 58 | idx2.new.spds 59 | idx2.new.spe 60 | idx2.new.sph 61 | idx2.new.sphi 62 | idx2.new.spi 63 | idx2.new.spidx 64 | idx2.new.spm 65 | idx2.new.spp 66 | idx2.new.spt -------------------------------------------------------------------------------- /clt_tests/tests/plain-indexes-crontab2.rec: -------------------------------------------------------------------------------- 1 | ––– block: ./base/init ––– 2 | ––– input ––– 3 | docker run -d -e "CREATE_PLAIN_TABLES=idx1:* * * * *;idx2" --name manticore -v $(pwd)/clt_tests/tests/base/manticore-indexer-desired.conf:/etc/manticoresearch/manticore.conf manticoresoftware/manticore:current 4 | ––– output ––– 5 | #!/[0-9a-z]+/!# 6 | ––– input ––– 7 | if timeout 5 grep -qm1 'accepting connections' <(docker logs -f manticore); then echo 'accepting connections'; else echo 'Timeout failed'; fi 8 | ––– output ––– 9 | accepting connections 10 | ––– input ––– 11 | docker exec manticore mysql -e "SELECT * FROM idx2\G;" 12 | ––– output ––– 13 | *************************** 1. row *************************** 14 | id: 1 15 | f: abc 16 | *************************** 2. row *************************** 17 | id: 2 18 | f: abc 19 | *************************** 3. row *************************** 20 | id: 3 21 | f: abc abc 22 | ––– input ––– 23 | docker exec manticore ls | grep idx | sort 24 | ––– output ––– 25 | idx2.spa 26 | idx2.spd 27 | idx2.spds 28 | idx2.spe 29 | idx2.sph 30 | idx2.sphi 31 | idx2.spi 32 | idx2.spidx 33 | idx2.spl 34 | idx2.spm 35 | idx2.spp 36 | idx2.spt 37 | ––– input ––– 38 | if timeout 65 grep -qm1 'Indexer_idx1: rotating tables: successfully sent SIGHUP to searchd' <(docker logs -f manticore); then echo 'Cron job done'; else echo 'Cron job not run in 65 seconds'; fi 39 | ––– output ––– 40 | Cron job done 41 | ––– input ––– 42 | docker exec manticore ls | grep idx | sort 43 | ––– output ––– 44 | idx1.new.spa 45 | idx1.new.spd 46 | idx1.new.spds 47 | idx1.new.spe 48 | idx1.new.sph 49 | idx1.new.sphi 50 | idx1.new.spi 51 | idx1.new.spidx 52 | idx1.new.spm 53 | idx1.new.spp 54 | idx1.new.spt 55 | idx2.spa 56 | idx2.spd 57 | idx2.spds 58 | idx2.spe 59 | idx2.sph 60 | idx2.sphi 61 | idx2.spi 62 | idx2.spidx 63 | idx2.spl 64 | idx2.spm 65 | idx2.spp 66 | idx2.spt -------------------------------------------------------------------------------- /clt_tests/tests/test-ukrainian-morphology.rec: -------------------------------------------------------------------------------- 1 | ––– block: ./base/init ––– 2 | ––– input ––– 3 | docker run -d --name manticore manticoresoftware/manticore:current 4 | ––– output ––– 5 | #!/[0-9a-z]+/!# 6 | ––– input ––– 7 | if timeout 5 grep -qm1 'accepting connections' <(docker logs -f manticore); then echo 'accepting connections'; else echo 'Manticore failed to start properly in 10 seconds'; fi 8 | ––– output ––– 9 | accepting connections 10 | ––– input ––– 11 | docker exec manticore mysql -h0 -P9306 -e "CREATE TABLE test_uk (id bigint, content text) rt_mem_limit = '256M' morphology = 'lemmatize_uk' charset_table = '0..9, A..Z->a..z, _, a..z, U+0410..U+042F->U+0430..U+044F, U+0430..U+044F, U+0454, U+0456, U+0457, U+0491';" 12 | ––– output ––– 13 | ––– input ––– 14 | docker exec manticore mysql -h0 -P9306 -e "INSERT INTO test_uk (id, content) VALUES (1, 'бігаю'), (2, 'муркотіти'), (3, 'їжа');" 15 | ––– output ––– 16 | ––– input ––– 17 | docker exec manticore mysql -h0 -P9306 -e "CALL KEYWORDS('бігаю', 'test_uk');" 18 | ––– output ––– 19 | +------+------------+--------------+ 20 | | qpos | tokenized | normalized | 21 | +------+------------+--------------+ 22 | | 1 | бігаю | бігати | 23 | +------+------------+--------------+ 24 | ––– input ––– 25 | docker exec manticore mysql -h0 -P9306 -e "CALL KEYWORDS('їжа', 'test_uk');" 26 | ––– output ––– 27 | +------+-----------+------------+ 28 | | qpos | tokenized | normalized | 29 | +------+-----------+------------+ 30 | | 1 | їжа | їжа | 31 | +------+-----------+------------+ 32 | ––– input ––– 33 | docker exec manticore mysql -h0 -P9306 -e "SELECT * FROM test_uk WHERE MATCH('бігати');" 34 | ––– output ––– 35 | +------+------------+ 36 | | id | content | 37 | +------+------------+ 38 | | 1 | бігаю | 39 | +------+------------+ 40 | ––– input ––– 41 | docker stop manticore 42 | ––– output ––– 43 | #!/[0-9a-z]+/!# 44 | -------------------------------------------------------------------------------- /clt_tests/tests/test-postgres-docker.rec: -------------------------------------------------------------------------------- 1 | ––– block: ./base/init ––– 2 | ––– input ––– 3 | docker network create app-network --driver bridge > /dev/null; echo $? 4 | ––– output ––– 5 | 0 6 | ––– input ––– 7 | docker run -d --name postgres --network app-network -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=qazQASD! -e POSTGRES_DB=api_db -p 5432:5432 -v $(pwd)/clt_tests/tests/base/init.sql:/docker-entrypoint-initdb.d/init.sql postgres:latest > /dev/null 2>&1; echo $? 8 | ––– output ––– 9 | 0 10 | ––– input ––– 11 | timeout 35 grep -m2 'database system is ready to accept connections' <(docker logs -f postgres 2>&1) 12 | ––– output ––– 13 | #!/\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}\.\d{3}/!# UTC [%{NUMBER}] LOG: database system is ready to accept connections 14 | #!/\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}\.\d{3}/!# UTC [%{NUMBER}] LOG: database system is ready to accept connections 15 | ––– input ––– 16 | docker run -d -e CREATE_PLAIN_TABLES=1 --name manticore --network app-network -v $(pwd)/clt_tests/tests/base/manticore-indexer-postgres.conf:/etc/manticoresearch/manticore.conf manticoresoftware/manticore:current 17 | ––– output ––– 18 | #!/[0-9a-z]+/!# 19 | ––– input ––– 20 | if timeout 60 grep -qm1 'accepting connections' <(docker logs -f manticore); then echo 'accepting connections'; else echo 'Manticore failed to start properly in 60 seconds'; fi 21 | ––– output ––– 22 | accepting connections 23 | ––– input ––– 24 | docker exec manticore mysql -h0 -P9306 -e "SHOW TABLES\G;" 25 | ––– output ––– 26 | *************************** 1. row *************************** 27 | Table: text_idx 28 | Type: local 29 | ––– input ––– 30 | docker exec manticore mysql -h0 -P9306 -e "SELECT * FROM text_idx\G;" 31 | ––– output ––– 32 | *************************** 1. row *************************** 33 | id: 1 34 | name: Element 1 35 | *************************** 2. row *************************** 36 | id: 2 37 | name: Element 2 38 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.yml: -------------------------------------------------------------------------------- 1 | name: 🐞 Bug Report 2 | description: Submit a bug report for Manticore Search docker 3 | labels: bug 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: | 8 | Thank you for submitting a bug report. We appreciate your effort to provide detailed information. Please answer the following questions to help us identify and fix the bug. Thank you! 9 | - type: textarea 10 | id: proposal 11 | attributes: 12 | label: "Bug Description:" 13 | description: > 14 | Describe the bug in detail. Include a [Minimal Reproducible Example](https://en.wikipedia.org/wiki/Minimal_reproducible_example) (MRE) if possible. Place any code blocks within triple backticks: 15 | value: | 16 | ```bash 17 | # Example code block; replace with your code if applicable 18 | ``` 19 | validations: 20 | required: true 21 | - type: input 22 | id: version 23 | attributes: 24 | label: "Docker image version:" 25 | description: > 26 | Provide the version of Manticore Search docker image you are using. 27 | validations: 28 | required: true 29 | - type: dropdown 30 | id: dev 31 | attributes: 32 | label: "Have you tried the latest development version?" 33 | multiple: false 34 | options: 35 | - "Yes" 36 | - "No" 37 | - type: markdown 38 | attributes: 39 | value: "## Thank you for completing the form! For an expedited solution, consider our [professional services](https://manticoresearch.com/services/)." 40 | - type: textarea 41 | id: checklist 42 | attributes: 43 | label: "Internal Checklist:" 44 | description: > 45 | **For Manticore Team Use Only** — Please do not edit this section. This checklist will be completed by the Manticore team as they manage the issue. 46 | value: | 47 | To be completed by the assignee. Check off tasks that have been completed or are not applicable. 48 |
49 | 50 | - [ ] Implementation completed 51 | - [ ] Tests developed 52 | - [ ] Documentation updated 53 | - [ ] Documentation reviewed 54 | - [ ] Changelog updated 55 | 56 |
57 | validations: 58 | required: true 59 | -------------------------------------------------------------------------------- /component-licenses/README.MD: -------------------------------------------------------------------------------- 1 | # Component Licenses 2 | 3 | The **Docker image for Manticore Search** includes multiple third-party components, each distributed under its respective open-source license. This document provides an overview of these components, their sources, and licensing details. 4 | 5 | ## Manticore Search 6 | 7 | **Website:** [Manticore Search](https://manticoresearch.com) 8 | **Source:** [GitHub Repository](https://github.com/manticoresoftware/manticoresearch) 9 | 10 | **Copyright:** 11 | ```plaintext 12 | Copyright (c) 2020-2024, Manticore Software LTD 13 | All rights reserved. 14 | ``` 15 | **License:** [GPL v3 or later](https://raw.githubusercontent.com/manticoresoftware/manticoresearch/master/LICENSE) 16 | 17 | ## Manticore Columnar Library 18 | 19 | **Source:** [GitHub Repository](https://github.com/manticoresoftware/columnar) 20 | 21 | Manticore Search can leverage the **Manticore Columnar Library** to enhance storage efficiency and query performance. The library is dynamically loaded at runtime 22 | 23 | **License:** [Apache 2.0](https://raw.githubusercontent.com/manticoresoftware/columnar/master/LICENSE) 24 | 25 | --- 26 | 27 | ## Manticore Executor 28 | 29 | **Source:** [GitHub Repository](https://github.com/manticoresoftware/executor) 30 | 31 | Manticore Executor is a custom PHP build utilized by Manticore Buddy for query processing. 32 | 33 | **License:** Distributed under the PHP 3.01 license, as included in the [manticore-executor-license](./manticore-executor-license) file. 34 | 35 | --- 36 | 37 | ## Manticore Search Backup 38 | 39 | **Source:** [GitHub Repository](https://github.com/manticoresoftware/manticoresearch-backup) 40 | 41 | Manticore Search Backup is a tool used for managing Manticore Search backups. 42 | 43 | **License:** Distributed under the GPLv3 open-source license, included in the [manticoresearch-backup-license](./manticoresearch-backup-license) file. 44 | 45 | --- 46 | 47 | ## Manticore Search Buddy 48 | 49 | **Source:** [GitHub Repository](https://github.com/manticoresoftware/manticoresearch-buddy) 50 | 51 | Manticore Buddy is a sidecar for Manticore Search, written in PHP, which helps with various tasks. 52 | 53 | **License:** Distributed under the open-source GPLv3 license, included in the [manticoresearch-buddy-license](./manticoresearch-buddy-license) file. 54 | 55 | --- 56 | 57 | For more details on Manticore Search licensing, refer to the [Manticore Search License](https://github.com/manticoresoftware/manticoresearch/blob/master/LICENSE). 58 | 59 | -------------------------------------------------------------------------------- /manticore.conf.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ $(grep -e "#!\/bin\/sh" -e "#!\/bin\/bash" /etc/manticoresearch/manticore.conf) ]]; then 4 | executableConfig=1 5 | fi 6 | 7 | if [ -z $executableConfig ]; then 8 | conf=$(cat /etc/manticoresearch/manticore.conf) 9 | else 10 | conf=$(bash /etc/manticoresearch/manticore.conf) 11 | fi 12 | 13 | if [ -z "$searchd_listen" ]; then 14 | confHash=$(md5sum /etc/manticoresearch/manticore.conf | awk '{print $1}') 15 | expectedConfHash=$(cat /manticore.conf.md5) 16 | 17 | if [[ "$confHash" == "$expectedConfHash" ]]; then 18 | export searchd_listen='9306:mysql41|/var/run/mysqld/mysqld.sock:mysql41|9308:http|$ip:9312|$ip:9315-9325:replication' 19 | fi 20 | fi 21 | 22 | while IFS='=' read -r envVariable value; do 23 | if [[ "${envVariable}" == searchd_* ]]; then 24 | hasSearchdEnv=1 25 | elif [[ "${envVariable}" == common_* ]]; then 26 | hasCommonEnv=1 27 | fi 28 | done < <(env) 29 | 30 | 31 | 32 | if [[ -n $hasCommonEnv && ! $(echo $conf | grep -E "common\s*{") ]]; then 33 | conf="$(echo "${conf}") 34 | common { 35 | }" 36 | fi 37 | 38 | 39 | if [[ -n $hasSearchdEnv && ! $(echo $conf | grep -E "searchd\s*{") ]]; then 40 | conf="$(echo "${conf}") 41 | searchd { 42 | }" 43 | fi 44 | 45 | if hostname -I > /dev/null 2>&1; then 46 | hostip=$(hostname -I|cut -d\ -f 1) 47 | elif hostname -i > /dev/null 2>&1; then 48 | hostip=$(hostname -i|rev|cut -d\ -f 1|rev) 49 | else 50 | hostip="0.0.0.0" 51 | fi 52 | 53 | while IFS='=' read -r envVariable value; do 54 | 55 | if [[ "${envVariable}" == searchd_* || "${envVariable}" == common_* ]]; then 56 | 57 | if [[ "${envVariable}" == searchd_* ]]; then 58 | section="searchd" 59 | else 60 | section="common" 61 | fi 62 | 63 | value=$(echo ${!envVariable} | sed 's/\//\\\//g') 64 | cleaned_key=$(echo $envVariable | sed "s/${section}_//") 65 | 66 | if [[ $cleaned_key == 'listen' ]]; then 67 | conf=$(echo "${conf}" | sed -e "s/^\s*listen\s*=.*$//g" | sed -r '/^\s*$/d') 68 | IFS='|' read -ra LISTEN_VALUES <<<"$value" 69 | count=0 70 | 71 | for i in "${LISTEN_VALUES[@]}"; do 72 | i=${i/\$ip/$hostip} 73 | if [[ $count == 0 ]]; then 74 | value=$i 75 | else 76 | value="$value\n listen = $i" 77 | fi 78 | count=$((count + 1)) 79 | done 80 | fi 81 | 82 | pattern="\s*${cleaned_key}\s*=" 83 | if [[ ${conf} =~ $pattern ]]; then 84 | conf=$(echo "${conf}" | sed -e "s/^\s*${cleaned_key}\s*=.*$/ ${cleaned_key} = ${value}/g") 85 | else 86 | conf=$(echo "${conf}" | sed -e "/^\s*${section}\s*{/a \ ${cleaned_key} = ${value}") 87 | fi 88 | 89 | fi 90 | 91 | done < <(env) 92 | 93 | 94 | echo "${conf}" > /etc/manticoresearch/manticore.conf.debug 95 | echo "${conf}" 96 | -------------------------------------------------------------------------------- /component-licenses/manticore-executor-license: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------- 2 | The PHP License, version 3.01 3 | Copyright (c) 1999 - 2019 The PHP Group. All rights reserved. 4 | -------------------------------------------------------------------- 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, is permitted provided that the following conditions 8 | are met: 9 | 10 | 1. Redistributions of source code must retain the above copyright 11 | notice, this list of conditions and the following disclaimer. 12 | 13 | 2. Redistributions in binary form must reproduce the above copyright 14 | notice, this list of conditions and the following disclaimer in 15 | the documentation and/or other materials provided with the 16 | distribution. 17 | 18 | 3. The name "PHP" must not be used to endorse or promote products 19 | derived from this software without prior written permission. For 20 | written permission, please contact group@php.net. 21 | 22 | 4. Products derived from this software may not be called "PHP", nor 23 | may "PHP" appear in their name, without prior written permission 24 | from group@php.net. You may indicate that your software works in 25 | conjunction with PHP by saying "Foo for PHP" instead of calling 26 | it "PHP Foo" or "phpfoo" 27 | 28 | 5. The PHP Group may publish revised and/or new versions of the 29 | license from time to time. Each version will be given a 30 | distinguishing version number. 31 | Once covered code has been published under a particular version 32 | of the license, you may always continue to use it under the terms 33 | of that version. You may also choose to use such covered code 34 | under the terms of any subsequent version of the license 35 | published by the PHP Group. No one other than the PHP Group has 36 | the right to modify the terms applicable to covered code created 37 | under this License. 38 | 39 | 6. Redistributions of any form whatsoever must retain the following 40 | acknowledgment: 41 | "This product includes PHP software, freely available from 42 | ". 43 | 44 | THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND 45 | ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 46 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 47 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP 48 | DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 49 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 50 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 51 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 52 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 53 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 54 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 55 | OF THE POSSIBILITY OF SUCH DAMAGE. 56 | 57 | -------------------------------------------------------------------- 58 | 59 | This software consists of voluntary contributions made by many 60 | individuals on behalf of the PHP Group. 61 | 62 | The PHP Group can be contacted via Email at group@php.net. 63 | 64 | For more information on the PHP Group and the PHP project, 65 | please see . 66 | 67 | PHP includes the Zend Engine, freely available at 68 | . -------------------------------------------------------------------------------- /docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eo pipefail 3 | 4 | # check to see if this file is being run or sourced from another script 5 | _is_sourced() { 6 | # https://unix.stackexchange.com/a/215279 7 | [ "${#FUNCNAME[@]}" -ge 2 ] && 8 | [ "${FUNCNAME[0]}" = '_is_sourced' ] && 9 | [ "${FUNCNAME[1]}" = 'source' ] 10 | } 11 | _searchd_want_help() { 12 | local arg 13 | for arg; do 14 | case "$arg" in 15 | -'?' | --help | -h | -v) 16 | return 0 17 | ;; 18 | esac 19 | done 20 | return 1 21 | } 22 | 23 | docker_setup_env() { 24 | 25 | GREEN='\033[0;32m' 26 | RED='\033[0;31m' 27 | NC='\033[0m' # No Color 28 | 29 | if [ "$QUERY_LOG_TO_STDOUT" = "true" ] || [ "$QUERY_LOG_TO_STDOUT" = "1" ]; then 30 | export searchd_query_log=/var/log/manticore/query.log 31 | [ ! -f /var/log/manticore/query.log ] && ln -sf /dev/stdout /var/log/manticore/query.log 32 | fi 33 | 34 | if [ ! -f /etc/ssl/cert.pem ]; then 35 | for cert in "/etc/ssl/certs/ca-certificates.crt" \ 36 | "/etc/pki/tls/certs/ca-bundle.crt" \ 37 | "/etc/ssl/ca-bundle.pem" \ 38 | "/etc/pki/tls/cacert.pem" \ 39 | "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem"; do 40 | if [ -f "$cert" ]; then 41 | ln -s "$cert" /etc/ssl/cert.pem 42 | break 43 | fi 44 | done 45 | fi 46 | 47 | if [[ -n ${CREATE_PLAIN_TABLES} && ${CREATE_PLAIN_TABLES} != "1" ]]; then 48 | 49 | INDEXER_TABLES_LIST="" 50 | 51 | IFS=';' read -ra ITM <<<"${CREATE_PLAIN_TABLES}" 52 | for item in "${ITM[@]}"; do 53 | 54 | IFS=':' read -ra LINE <<<"$item" 55 | 56 | if [ -z "${LINE[1]}" ]; then 57 | INDEXER_TABLES_LIST+=" ${LINE[0]}" 58 | continue 59 | fi 60 | 61 | if [[ ! "${LINE[1]}" =~ ^([0-9,\-\/\*]+ )([0-9,\-\/\*]+ )([0-9,\-\/\*]+ )([0-9,\-\/\*]+ )([0-9,\-\/\*]+)$ ]]; then 62 | echo -e "${RED}Error:${NC} Wrong crontab syntax ${RED}${LINE[1]}${NC} for table: ${LINE[0]}" 63 | continue 64 | fi 65 | 66 | md5=$(echo -n ${LINE[0]} | md5sum | awk '{print $1}') 67 | echo "${LINE[1]} cd /var/lib/manticore && flock -w 0 /tmp/${md5}.lock indexer --rotate ${LINE[0]} | sed \"s/.*/$(date): Indexer_${LINE[0]}: &/\" >> /proc/1/fd/1" >> /etc/cron.d/manticore 68 | CRONTAB_AFFECTED=1 69 | done 70 | 71 | if [ -n "$CRONTAB_AFFECTED" ]; then 72 | crontab /etc/cron.d/manticore 73 | cron -f & 74 | fi 75 | 76 | if [ -n "$INDEXER_TABLES_LIST" ]; then 77 | indexer $INDEXER_TABLES_LIST 78 | fi 79 | fi 80 | 81 | if [[ "${CREATE_PLAIN_TABLES}" == "1" ]]; then 82 | indexer --all 83 | fi 84 | 85 | } 86 | 87 | _main() { 88 | # first arg is `h` or some `--option` 89 | 90 | if [ "${1#-}" != "$1" ]; then 91 | set -- searchd "$@" 92 | fi 93 | 94 | if ([ "$1" = 'searchd' ] || [ "$1" = 'indexer' ]) && ! _searchd_want_help "@"; then 95 | # allow the container to be started with `--user` 96 | if [ "$(id -u)" = '0' ]; then 97 | find /var/lib/manticore /var/log/manticore /var/run/manticore /etc/manticoresearch /dev/stdout \! -user manticore -exec chown manticore:manticore '{}' + 98 | exec gosu manticore "$0" "$@" 99 | fi 100 | fi 101 | 102 | if ! _searchd_want_help "@"; then 103 | docker_setup_env "$@" 104 | fi 105 | 106 | BACKUP_INIT_FOLDER="/docker-entrypoint-initdb.d" 107 | 108 | if [ -f "${BACKUP_INIT_FOLDER}/versions.json" ]; then 109 | if [ -f /var/lib/manticore/manticore.json ]; then 110 | echo "Warning: Backup is available for restore, but it's being skipped because it's already initialized or the data directory is not empty." 111 | else 112 | # Check if manticore-backup is installed 113 | if ! command -v manticore-backup > /dev/null; then 114 | echo -e "${RED}manticore-backup isn't installed${NC}" 115 | exit 1 116 | fi 117 | 118 | find ${BACKUP_INIT_FOLDER}/config -type f -exec sh -c 'rm -f "${1#/docker-entrypoint-initdb.d/config}"' sh {} \; 119 | find ${BACKUP_INIT_FOLDER}/state -type f -exec sh -c 'rm -f "${1#/docker-entrypoint-initdb.d/state}"' sh {} \; 120 | 121 | manticore-backup --version 122 | manticore-backup --force --backup-dir='/' --restore='docker-entrypoint-initdb.d' 123 | fi 124 | fi 125 | 126 | exec "$@" 127 | } 128 | 129 | # If we are sourced from elsewhere, don't perform any further actions 130 | if ! _is_sourced; then 131 | _main "$@" 132 | fi 133 | -------------------------------------------------------------------------------- /clt_tests/tests/query_log_to_stdout.rec: -------------------------------------------------------------------------------- 1 | ––– block: ./base/init ––– 2 | ––– input ––– 3 | docker run -d -e QUERY_LOG_TO_STDOUT=true --name manticore manticoresoftware/manticore:current 4 | ––– output ––– 5 | #!/[0-9a-z]+/!# 6 | ––– input ––– 7 | if timeout 60 grep -qm1 'accepting connections' <(docker logs -f manticore); then echo 'accepting connections'; else echo 'Timeout failed'; fi 8 | ––– output ––– 9 | accepting connections 10 | ––– input ––– 11 | docker exec manticore mysql -e "CREATE TABLE a; SELECT * FROM a;" 12 | ––– output ––– 13 | ––– input ––– 14 | docker logs manticore | grep "SELECT \* FROM a;" 15 | ––– output ––– 16 | /* #!/[A-Za-z]+/!# #!/[A-Za-z]+/!# %{NUMBER} #!/[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}/!# %{YEAR} conn %{NUMBER} ((local)) real #!/[0-9]{1}\.[0-9]{3}/!# wall #!/[0-9]{1}\.[0-9]{3}/!# found %{NUMBER} */ SELECT * FROM a; 17 | ––– input ––– 18 | docker stop manticore && docker rm manticore 19 | ––– output ––– 20 | #!/[0-9a-z]+/!# 21 | #!/[0-9a-z]+/!# 22 | ––– input ––– 23 | docker run -d -e QUERY_LOG_TO_STDOUT=1 --name manticore manticoresoftware/manticore:current 24 | ––– output ––– 25 | #!/[0-9a-z]+/!# 26 | ––– input ––– 27 | if timeout 60 grep -qm1 'accepting connections' <(docker logs -f manticore); then echo 'accepting connections'; else echo 'Timeout failed'; fi 28 | ––– output ––– 29 | accepting connections 30 | ––– input ––– 31 | docker exec manticore mysql -e "CREATE TABLE a; SELECT * FROM a;" 32 | ––– output ––– 33 | ––– input ––– 34 | docker logs manticore | grep "SELECT \* FROM a;" 35 | ––– output ––– 36 | /* #!/[A-Za-z]+/!# #!/[A-Za-z]+/!# %{NUMBER} #!/[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}/!# %{YEAR} conn %{NUMBER} ((local)) real #!/[0-9]{1}\.[0-9]{3}/!# wall #!/[0-9]{1}\.[0-9]{3}/!# found %{NUMBER} */ SELECT * FROM a; 37 | ––– input ––– 38 | docker stop manticore && docker rm manticore 39 | ––– output ––– 40 | #!/[0-9a-z]+/!# 41 | #!/[0-9a-z]+/!# 42 | ––– input ––– 43 | docker run -d -e QUERY_LOG_TO_STDOUT="true" --name manticore manticoresoftware/manticore:current 44 | ––– output ––– 45 | #!/[0-9a-z]+/!# 46 | ––– input ––– 47 | if timeout 60 grep -qm1 'accepting connections' <(docker logs -f manticore); then echo 'accepting connections'; else echo 'Timeout failed'; fi 48 | ––– output ––– 49 | accepting connections 50 | ––– input ––– 51 | docker exec manticore mysql -e "CREATE TABLE a; SELECT * FROM a;" 52 | ––– output ––– 53 | ––– input ––– 54 | docker logs manticore | grep "SELECT \* FROM a;" 55 | ––– output ––– 56 | /* #!/[A-Za-z]+/!# #!/[A-Za-z]+/!# %{NUMBER} #!/[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}/!# %{YEAR} conn %{NUMBER} ((local)) real #!/[0-9]{1}\.[0-9]{3}/!# wall #!/[0-9]{1}\.[0-9]{3}/!# found %{NUMBER} */ SELECT * FROM a; 57 | ––– input ––– 58 | docker stop manticore && docker rm manticore 59 | ––– output ––– 60 | #!/[0-9a-z]+/!# 61 | #!/[0-9a-z]+/!# 62 | ––– input ––– 63 | docker run -d -e QUERY_LOG_TO_STDOUT="1" --name manticore manticoresoftware/manticore:current 64 | ––– output ––– 65 | #!/[0-9a-z]+/!# 66 | ––– input ––– 67 | if timeout 60 grep -qm1 'accepting connections' <(docker logs -f manticore); then echo 'accepting connections'; else echo 'Timeout failed'; fi 68 | ––– output ––– 69 | accepting connections 70 | ––– input ––– 71 | docker exec manticore mysql -e "CREATE TABLE a; SELECT * FROM a;" 72 | ––– output ––– 73 | ––– input ––– 74 | docker logs manticore | grep "SELECT \* FROM a;" 75 | ––– output ––– 76 | /* #!/[A-Za-z]+/!# #!/[A-Za-z]+/!# %{NUMBER} #!/[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}/!# %{YEAR} conn %{NUMBER} ((local)) real #!/[0-9]{1}\.[0-9]{3}/!# wall #!/[0-9]{1}\.[0-9]{3}/!# found %{NUMBER} */ SELECT * FROM a; 77 | ––– input ––– 78 | docker stop manticore && docker rm manticore 79 | ––– output ––– 80 | #!/[0-9a-z]+/!# 81 | #!/[0-9a-z]+/!# 82 | ––– input ––– 83 | docker run -d -e QUERY_LOG_TO_STDOUT=false --name manticore manticoresoftware/manticore:current 84 | ––– output ––– 85 | #!/[0-9a-z]+/!# 86 | ––– input ––– 87 | if timeout 60 grep -qm1 'accepting connections' <(docker logs -f manticore); then echo 'accepting connections'; else echo 'Timeout failed'; fi 88 | ––– output ––– 89 | accepting connections 90 | ––– input ––– 91 | docker exec manticore mysql -e "CREATE TABLE a; SELECT * FROM a;" 92 | ––– output ––– 93 | ––– input ––– 94 | docker logs manticore | grep "SELECT \* FROM a;" 95 | ––– output ––– 96 | ––– input ––– 97 | docker stop manticore && docker rm manticore 98 | ––– output ––– 99 | #!/[0-9a-z]+/!# 100 | #!/[0-9a-z]+/!# 101 | ––– input ––– 102 | docker run -d -e QUERY_LOG_TO_STDOUT=abc --name manticore manticoresoftware/manticore:current 103 | ––– output ––– 104 | #!/[0-9a-z]+/!# 105 | ––– input ––– 106 | if timeout 60 grep -qm1 'accepting connections' <(docker logs -f manticore); then echo 'accepting connections'; else echo 'Timeout failed'; fi 107 | ––– output ––– 108 | accepting connections 109 | ––– input ––– 110 | docker exec manticore mysql -e "CREATE TABLE a; SELECT * FROM a;" 111 | ––– output ––– 112 | ––– input ––– 113 | docker logs manticore | grep "SELECT \* FROM a;" 114 | ––– output ––– 115 | ––– input ––– 116 | docker stop manticore && docker rm manticore 117 | ––– output ––– 118 | #!/[0-9a-z]+/!# 119 | #!/[0-9a-z]+/!# 120 | ––– input ––– 121 | docker run -d --name manticore manticoresoftware/manticore:current 122 | ––– output ––– 123 | #!/[0-9a-z]+/!# 124 | ––– input ––– 125 | if timeout 60 grep -qm1 'accepting connections' <(docker logs -f manticore); then echo 'accepting connections'; else echo 'Timeout failed'; fi 126 | ––– output ––– 127 | accepting connections 128 | ––– input ––– 129 | docker exec manticore mysql -e "CREATE TABLE a; SELECT * FROM a;" 130 | ––– output ––– 131 | ––– input ––– 132 | docker logs manticore | grep "SELECT \* FROM a;" 133 | ––– output ––– 134 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:noble as initial 2 | 3 | ARG TARGETPLATFORM 4 | 5 | ARG DEV 6 | ARG DAEMON_URL 7 | ARG DEBIAN_FRONTEND=noninteractive 8 | 9 | RUN groupadd -r manticore && useradd -r -g manticore manticore 10 | 11 | ENV GOSU_VERSION 1.11 12 | 13 | ENV DAEMON_URL ${DAEMON_URL:-"https://repo.manticoresearch.com/repository/manticoresearch_jammy/dists/jammy/main/binary-_ARCH_64/manticore-server_15.1.0-25120511-b13699a92__ARCH_64.deb \ 14 | https://repo.manticoresearch.com/repository/manticoresearch_jammy/dists/jammy/main/binary-_ARCH_64/manticore-server-core_15.1.0-25120511-b13699a92__ARCH_64.deb \ 15 | https://repo.manticoresearch.com/repository/manticoresearch_jammy/dists/jammy/main/binary-_ARCH_64/manticore-backup_1.9.6+25070510-5247d066_all.deb \ 16 | https://repo.manticoresearch.com/repository/manticoresearch_jammy/dists/jammy/main/binary-_ARCH_64/manticore-buddy_3.40.2+25112823-27a2f87e_all.deb \ 17 | https://repo.manticoresearch.com/repository/manticoresearch_jammy/dists/jammy/main/binary-_ARCH_64/manticore-tools_15.1.0-25120511-b13699a92__ARCH_64.deb \ 18 | https://repo.manticoresearch.com/repository/manticoresearch_jammy/dists/jammy/main/binary-_ARCH_64/manticore-common_15.1.0-25120511-b13699a92_all.deb \ 19 | https://repo.manticoresearch.com/repository/manticoresearch_jammy/dists/jammy/main/binary-_ARCH_64/manticore_15.1.0-25120511-b13699a92__ARCH_64.deb \ 20 | https://repo.manticoresearch.com/repository/manticoresearch_jammy/dists/jammy/main/binary-_ARCH_64/manticore-dev_15.1.0-25120511-b13699a92_all.deb \ 21 | https://repo.manticoresearch.com/repository/manticoresearch_jammy/dists/jammy/main/binary-_ARCH_64/manticore-icudata-65l.deb \ 22 | https://repo.manticoresearch.com/repository/manticoresearch_jammy/dists/jammy/main/binary-_ARCH_64/manticore-load_1.19.0+25063014-1ff59652_all.deb \ 23 | https://repo.manticoresearch.com/repository/manticoresearch_jammy/dists/jammy/main/binary-_ARCH_64/manticore-language-packs_1.0.13-250708-1e9c2cd_all.deb \ 24 | https://repo.manticoresearch.com/repository/manticoresearch_jammy/dists/jammy/main/binary-_ARCH_64/manticore-tzdata_1.0.1-250708-4dfa71e_all.deb \ 25 | https://repo.manticoresearch.com/repository/manticoresearch_jammy/dists/jammy/main/binary-_ARCH_64/manticore-executor_1.3.6+25102902-defbddd7__ARCH_64.deb \ 26 | https://repo.manticoresearch.com/repository/manticoresearch_jammy/dists/jammy/main/binary-_ARCH_64/manticore-galera_3.37__ARCH_64.deb \ 27 | https://repo.manticoresearch.com/repository/manticoresearch_jammy/dists/jammy/main/binary-_ARCH_64/manticore-columnar-lib_9.0.0+25113009-b7e9e683__ARCH_64.deb \ 28 | https://repo.manticoresearch.com/repository/manticoresearch_jammy/dists/jammy/main/binary-_ARCH_64/manticore-lemmatizer-uk_1.0.3__ARCH_64.deb"} 29 | # TODO: add manticore-load to the next release 30 | 31 | RUN if [ -z "$DAEMON_URL" ] ; then \ 32 | echo "WARNING: DAEMON_URL is empty"; \ 33 | elif [ ! -z "${DAEMON_URL##*_ARCH_*}" ] ; then \ 34 | echo "ERROR: DAEMON_URL is not empty, but no _ARCH_ placeholder found in daemon URL"; \ 35 | exit 1; \ 36 | fi 37 | 38 | RUN set -x \ 39 | && if [ "$TARGETPLATFORM" = "linux/arm64" ] ; then export ARCH="arm"; else export ARCH="amd"; fi \ 40 | && echo "Start building image for linux/${ARCH}64 architecture" \ 41 | && mkdir /etc/ssl/ \ 42 | && chown -R manticore:manticore /etc/ssl/ \ 43 | && apt-get -y update && apt-get -y install --no-install-recommends ca-certificates \ 44 | binutils wget gnupg xz-utils dirmngr locales tzdata cron && rm -rf /var/lib/apt/lists/* \ 45 | && locale-gen --lang en_US \ 46 | && wget -q -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ 47 | && wget -q -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ 48 | && export GNUPGHOME="$(mktemp -d)" \ 49 | && gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ 50 | && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ 51 | && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ 52 | && rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \ 53 | && chmod +x /usr/local/bin/gosu \ 54 | && gosu nobody true \ 55 | && apt-get update && apt-get -y install libexpat1 libodbc2 libpq5 openssl libcurl4 libcrypto++8 libmysqlclient21 mysql-client \ 56 | && apt-get -y purge --auto-remove \ 57 | && rm -f /usr/bin/mariabackup /usr/bin/mysqlslap /usr/bin/mysqladmin /usr/bin/mysqlimport \ 58 | /usr/bin/mysqlshow /usr/bin/mbstream /usr/bin/mysql_waitpid /usr/bin/innotop /usr/bin/mysqlaccess /usr/bin/mytop \ 59 | /usr/bin/mysqlreport /usr/bin/mysqldumpslow /usr/bin/mysql_find_rows /usr/bin/mysql_fix_extensions \ 60 | /usr/bin/mysql_embedded /usr/bin/mysqlcheck 61 | 62 | # The below is to make sure the following is never taken from cache 63 | ADD "https://www.random.org/cgi-bin/randbyte?nbytes=10&format=h" skipcache 64 | 65 | # Add any .deb or .ddeb packages in the current dir to install them all later 66 | #ADD *deb /packages/ 67 | 68 | RUN if [ "$TARGETPLATFORM" = "linux/arm64" ] ; then export ARCH="arm"; else export ARCH="amd"; fi \ 69 | && if [ "${DEV}" = "1" ]; then \ 70 | echo "2nd step of building dev image for linux/${ARCH}64 architecture" \ 71 | && wget -q https://repo.manticoresearch.com/manticore-dev-repo.noarch.deb \ 72 | && dpkg -i manticore-dev-repo.noarch.deb \ 73 | && apt-key adv --fetch-keys 'https://repo.manticoresearch.com/GPG-KEY-manticore' && apt-get -y update \ 74 | && apt-get -y install manticore manticore-extra manticore-load manticore-lemmatizer-uk manticore-language-packs;\ 75 | elif [ ! -z "$DAEMON_URL" ]; then \ 76 | echo "2nd step of building release image for linux/${ARCH}64 architecture" \ 77 | && echo "ARCH: ${ARCH}" \ 78 | && echo $DAEMON_URL | sed "s/_ARCH_/$ARCH/g" \ 79 | && wget -q $(echo $DAEMON_URL | sed "s/_ARCH_/$ARCH/g") \ 80 | && apt-get -y install ./manticore*deb \ 81 | && rm *.deb ; \ 82 | fi 83 | RUN if [ -d "/packages/" ]; then apt -y install /packages/*deb; fi \ 84 | && mkdir -p /var/run/manticore \ 85 | && mkdir /docker-entrypoint-initdb.d \ 86 | && apt-get -y purge --auto-remove \ 87 | && rm -rf /var/lib/apt/lists/* \ 88 | && rm -fr /packages \ 89 | && rm -f /usr/bin/spelldump /usr/bin/wordbreaker \ 90 | && mkdir -p /var/run/mysqld/ \ 91 | && chown -R manticore:manticore /docker-entrypoint-initdb.d /var/lib/manticore/ /var/run/mysqld/ /usr/share/manticore/ \ 92 | /usr/share/manticore/modules/ /usr/share/doc/manticore-galera/ /var/run/manticore \ 93 | && echo "\n[mysql]\nsilent\nwait\ntable\n" >> /etc/mysql/my.cnf \ 94 | && wget -q https://repo.manticoresearch.com/repository/morphology/en.pak.tgz?docker_build=1 -O /tmp/en.pak.tgz \ 95 | && wget -q https://repo.manticoresearch.com/repository/morphology/de.pak.tgz?docker_build=1 -O /tmp/de.pak.tgz \ 96 | && wget -q https://repo.manticoresearch.com/repository/morphology/ru.pak.tgz?docker_build=1 -O /tmp/ru.pak.tgz \ 97 | && tar -xf /tmp/en.pak.tgz -C /usr/share/manticore/ \ 98 | && tar -xf /tmp/de.pak.tgz -C /usr/share/manticore/ \ 99 | && tar -xf /tmp/ru.pak.tgz -C /usr/share/manticore/ \ 100 | && rm /tmp/*.pak.tgz 101 | 102 | # Installing the Ukrainian Lemmatizer using the working Jammy approach 103 | RUN apt-get update && apt-get install -y software-properties-common curl && \ 104 | add-apt-repository -y ppa:deadsnakes/ppa && \ 105 | apt-get update && \ 106 | apt-get install -y python3.9 python3.9-dev python3.9-distutils && \ 107 | curl https://bootstrap.pypa.io/get-pip.py | python3.9 && \ 108 | python3.9 -m pip install pymorphy2 pymorphy2-dicts-uk && \ 109 | apt-get clean && rm -rf /var/lib/apt/lists/* 110 | 111 | COPY manticore.conf.sh /etc/manticoresearch/ 112 | RUN sed -i '/log = \/var\/log\/manticore\/searchd.log/d;/query_log = \/var\/log\/manticore\/query.log/d' /etc/manticoresearch/manticore.conf 113 | RUN md5sum /etc/manticoresearch/manticore.conf | awk '{print $1}' > /manticore.conf.md5 114 | COPY sandbox.sql /sandbox.sql 115 | COPY .mysql_history /root/.mysql_history 116 | COPY component-licenses /licenses 117 | 118 | COPY docker-entrypoint.sh /usr/local/bin/ 119 | RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh 120 | 121 | RUN touch /etc/cron.d/manticore /var/run/crond.pid && \ 122 | chown manticore:manticore /etc/cron.d/manticore /var/run/crond.pid && \ 123 | chmod gu+s /usr/sbin/cron 124 | 125 | FROM scratch 126 | COPY --from=initial / / 127 | WORKDIR /var/lib/manticore 128 | VOLUME /var/lib/manticore 129 | ENTRYPOINT ["docker-entrypoint.sh"] 130 | EXPOSE 9306 131 | EXPOSE 9308 132 | EXPOSE 9312 133 | ENV LANG C.UTF-8 134 | ENV LC_ALL C.UTF-8 135 | ENV PYTHONWARNINGS "ignore::UserWarning:pymorphy2.analyzer" 136 | ENV MANTICORE_CONFIG "/etc/manticoresearch/manticore.conf.sh|/etc/manticoresearch/manticore.conf" 137 | CMD ["searchd", "-c", "/etc/manticoresearch/manticore.conf.sh", "--nodetach"] 138 | 139 | # How to build manually: 140 | # Prepare builder: 141 | # docker buildx create --use 142 | # 143 | # Dev version: 144 | # Build and load to local registry: 145 | # docker buildx build --progress=plain --build-arg DEV=1 --load --platform linux/amd64 --tag manticore:dev . 146 | # Build multi-arch and push to remote registry: 147 | # docker buildx build --progress=plain --build-arg DEV=1 --push --platform linux/amd64,linux/arm64 --tag username/manticore:dev . 148 | # Release version: 149 | # docker buildx build --build-arg DEV=0 --progress plain --push --platform linux/arm64,linux/amd64 --tag manticoresearch/manticore:6.3.2 --tag manticoresearch/manticore:latest . 150 | # 151 | # With empty urls assuming *deb in the local dir: 152 | # docker buildx build --progress=plain --build-arg DEV=0 --build-arg DAEMON_URL="" --build-arg --load --platform linux/amd64 --tag username/manticore:local . 153 | -------------------------------------------------------------------------------- /component-licenses/manticore-columnar-library-license: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. -------------------------------------------------------------------------------- /clt_tests/tests/test-backup-restore.rec: -------------------------------------------------------------------------------- 1 | ––– block: ./base/init ––– 2 | ––– input ––– 3 | docker run --rm --name manticore -v /tmp/idx:/var/lib/manticore -d manticoresoftware/manticore:current 4 | ––– output ––– 5 | #!/[0-9a-z]{40}$/!# 6 | ––– input ––– 7 | if timeout 60 grep -qEm1 "columnar.*?secondary.*?knn" <(docker logs -f manticore 2>&1); then echo 'Done'; else echo 'Not found'; fi 8 | ––– output ––– 9 | Done 10 | ––– input ––– 11 | docker exec manticore manticore-executor -v 12 | ––– output ––– 13 | PHP %{SEMVER} (cli) (built: #!/[a-zA-Z]{3}/!# #!/[0-9]+/!# %{YEAR} #!/[0-9]{2}:[0-9]{2}:[0-9]{2}/!#) (NTS) 14 | Copyright (c) The PHP Group 15 | Zend Engine #!/v[0-9]+\.[0-9]+\.[0-9]+/!#, Copyright (c) Zend Technologies 16 | ––– input ––– 17 | docker exec manticore wget -q https://raw.githubusercontent.com/manticoresoftware/manticoresearch-backup/main/test/clt-tests/dumps/tables.sql 18 | ––– output ––– 19 | ––– input ––– 20 | docker exec manticore bash -c "mysql < ./tables.sql" 21 | ––– output ––– 22 | ––– input ––– 23 | docker exec manticore mysql -e "show tables" 24 | ––– output ––– 25 | +---------------------+-------------+ 26 | | Table | Type | 27 | +---------------------+-------------+ 28 | | distributed_index | distributed | 29 | | rt_with_columnar | rt | 30 | | rt_without_columnar | rt | 31 | | test | rt | 32 | +---------------------+-------------+ 33 | ––– input ––– 34 | docker exec manticore mysql -e "show create table distributed_index" 35 | ––– output ––– 36 | +-------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 37 | | Table | Create Table | 38 | +-------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 39 | | distributed_index | CREATE TABLE distributed_index type='distributed' local='rt_with_columnar' local='rt_without_columnar' agent='127.0.0.1:9312:plain_with_columnar, plain_without_columnar' | 40 | +-------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 41 | ––– input ––– 42 | docker exec manticore mysql -e "show create table rt_with_columnar" 43 | ––– output ––– 44 | +------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 45 | | Table | Create Table | 46 | +------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 47 | | rt_with_columnar | CREATE TABLE rt_with_columnar ( 48 | id bigint, 49 | title text, 50 | category_id integer, 51 | price float, 52 | description string attribute engine='columnar', 53 | tags multi, 54 | attributes json 55 | ) | 56 | +------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 57 | ––– input ––– 58 | docker exec manticore mysql -e "show create table rt_without_columnar" 59 | ––– output ––– 60 | +---------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ 61 | | Table | Create Table | 62 | +---------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ 63 | | rt_without_columnar | CREATE TABLE rt_without_columnar ( 64 | id bigint, 65 | title text, 66 | category_id integer, 67 | price float, 68 | description string attribute, 69 | tags multi, 70 | attributes json 71 | ) | 72 | +---------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ 73 | ––– input ––– 74 | docker exec manticore mysql -e "show create table test" 75 | ––– output ––– 76 | +-------+--------------------------------------------------------------------------------------------------------------------------+ 77 | | Table | Create Table | 78 | +-------+--------------------------------------------------------------------------------------------------------------------------+ 79 | | test | CREATE TABLE test ( 80 | id bigint, 81 | title text, 82 | image_vector float_vector knn_type='hnsw' knn_dims='4' hnsw_similarity='L2' 83 | ) | 84 | +-------+--------------------------------------------------------------------------------------------------------------------------+ 85 | ––– input ––– 86 | docker exec manticore manticore-backup --backup-dir=/tmp 87 | ––– output ––– 88 | Copyright (c) %{YEAR}-%{YEAR}, Manticore Software LTD (https://manticoresearch.com) 89 | Manticore config file: /etc/manticoresearch/manticore.conf.sh 90 | Tables to backup: all tables 91 | Backup dir: /tmp 92 | Manticore config 93 | endpoint = http://127.0.0.1:9308 94 | Manticore config 95 | endpoint = http://127.0.0.1:9312 96 | Manticore versions: 97 | manticore: %{SEMVER} %{COMMITDATE}#!/(\s*dev)*/!# 98 | columnar: %{SEMVER} %{COMMITDATE} 99 | secondary: %{SEMVER} %{COMMITDATE} 100 | knn: %{SEMVER} %{COMMITDATE} 101 | buddy: %{SEMVER_EXT} 102 | %{DATETIME} [Info] Starting the backup... 103 | %{DATETIME} [Info] Backing up config files... 104 | %{DATETIME} [Info] config files - OK 105 | %{DATETIME} [Info] Backing up global state files... 106 | %{DATETIME} [Info] global state files – OK 107 | %{DATETIME} [Info] Backing up tables... 108 | %{DATETIME} [Info] distributed_index (distributed)... 109 | %{DATETIME} [Info] SKIP 110 | %{DATETIME} [Info] rt_with_columnar (rt) [#!/[0-9]{1}\.[0-9]{3}/!#K]... 111 | %{DATETIME} [Info] OK 112 | %{DATETIME} [Info] rt_without_columnar (rt) [#!/[0-9]{1}\.[0-9]{3}/!#K]... 113 | %{DATETIME} [Info] OK 114 | %{DATETIME} [Info] test (rt) [%{NUMBER}B]... 115 | %{DATETIME} [Info] OK 116 | %{DATETIME} [Info] Running sync 117 | %{DATETIME} [Info] OK 118 | %{DATETIME} [Info] You can find backup here: /tmp/backup-%{NUMBER} 119 | %{DATETIME} [Info] Elapsed time: #!/([0-9]+\.[0-9]+|0)/!#s 120 | %{DATETIME} [Info] Done 121 | ––– input ––– 122 | BACKUP_NAME=$(docker exec manticore ls /tmp/ | grep backup-*) 123 | ––– output ––– 124 | ––– input ––– 125 | docker cp manticore:/tmp/$BACKUP_NAME /tmp/$BACKUP_NAME > /dev/null 2>&1; echo $? 126 | ––– output ––– 127 | 0 128 | ––– input ––– 129 | chmod -R 777 /tmp/$BACKUP_NAME 130 | ––– output ––– 131 | ––– input ––– 132 | docker stop manticore 133 | ––– output ––– 134 | manticore 135 | ––– input ––– 136 | docker ps 137 | ––– output ––– 138 | CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 139 | ––– input ––– 140 | if timeout 60 sh -c 'while docker ps -a | grep -qE "Up"; do sleep 1; done'; then echo 'successful'; else echo 'not successful'; fi 141 | ––– output ––– 142 | successful 143 | ––– input ––– 144 | docker run -d --name manticore -v /tmp/$BACKUP_NAME:/docker-entrypoint-initdb.d manticoresoftware/manticore:current 145 | ––– output ––– 146 | #!/[0-9a-z]{40}$/!# 147 | ––– input ––– 148 | if timeout 60 grep -qEm1 "accepting connections" <(docker logs -f manticore 2>&1); then echo 'Manticore is running'; else echo 'Failed to start Manticore'; docker logs manticore; fi 149 | ––– output ––– 150 | Manticore is running 151 | ––– input ––– 152 | docker exec manticore mysql -e "show tables" 153 | ––– output ––– 154 | +---------------------+-------------+ 155 | | Table | Type | 156 | +---------------------+-------------+ 157 | | distributed_index | distributed | 158 | | rt_with_columnar | rt | 159 | | rt_without_columnar | rt | 160 | | test | rt | 161 | +---------------------+-------------+ 162 | ––– input ––– 163 | docker exec manticore mysql -e "show create table distributed_index" 164 | ––– output ––– 165 | +-------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 166 | | Table | Create Table | 167 | +-------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 168 | | distributed_index | CREATE TABLE distributed_index type='distributed' local='rt_with_columnar' local='rt_without_columnar' agent='127.0.0.1:9312:plain_with_columnar, plain_without_columnar' | 169 | +-------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 170 | ––– input ––– 171 | docker exec manticore mysql -e "show create table rt_with_columnar" 172 | ––– output ––– 173 | +------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 174 | | Table | Create Table | 175 | +------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 176 | | rt_with_columnar | CREATE TABLE rt_with_columnar ( 177 | id bigint, 178 | title text, 179 | category_id integer, 180 | price float, 181 | description string attribute engine='columnar', 182 | tags multi, 183 | attributes json 184 | ) | 185 | +------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 186 | ––– input ––– 187 | docker exec manticore mysql -e "show create table rt_without_columnar" 188 | ––– output ––– 189 | +---------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ 190 | | Table | Create Table | 191 | +---------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ 192 | | rt_without_columnar | CREATE TABLE rt_without_columnar ( 193 | id bigint, 194 | title text, 195 | category_id integer, 196 | price float, 197 | description string attribute, 198 | tags multi, 199 | attributes json 200 | ) | 201 | +---------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ 202 | ––– input ––– 203 | docker exec manticore mysql -e "show create table test" 204 | ––– output ––– 205 | +-------+--------------------------------------------------------------------------------------------------------------------------+ 206 | | Table | Create Table | 207 | +-------+--------------------------------------------------------------------------------------------------------------------------+ 208 | | test | CREATE TABLE test ( 209 | id bigint, 210 | title text, 211 | image_vector float_vector knn_type='hnsw' knn_dims='4' hnsw_similarity='L2' 212 | ) | 213 | +-------+--------------------------------------------------------------------------------------------------------------------------+ 214 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Manticore Search Docker image 2 | 3 | This is the git repo of official [Docker image](https://hub.docker.com/r/manticoresearch/manticore/) for [Manticore Search](https://github.com/manticoresoftware/manticoresearch). 4 | 5 | ❗ Please note: This is a development version repo. For the latest release's information, refer to the readme at https://github.com/manticoresoftware/docker/tree/docker-15.1.0 6 | 7 | Manticore Search is an easy to use open source fast database for search. It helps thousands of companies from small to large, such as Craigslist, to search and filter petabytes of text data on a single or hundreds of nodes, do stream full-text filtering, add auto-complete, spell correction, more-like-this, faceting and other search-related technologies to their websites and applications. 8 | 9 | The default configuration includes a sample Real-Time index and listens on the default ports: 10 | * `9306` for connections from a MySQL client 11 | * `9308` for connections via HTTP 12 | * `9312` for connections via a binary protocol (e.g. in case you run a cluster) 13 | 14 | The image comes with libraries for easy indexing data from MySQL, PostgreSQL XML and CSV files. 15 | 16 | # How to run Manticore Search Docker image 17 | 18 | ## Quick usage 19 | 20 | The below is the simplest way to start Manticore in a container and log in to it via the mysql client: 21 | 22 | ```bash 23 | docker run --name manticore --rm -d manticoresearch/manticore && echo "Waiting for Manticore docker to start. Consider mapping the data_dir to make it start faster next time" && until docker logs manticore 2>&1 | grep -q "accepting connections"; do sleep 1; echo -n .; done && echo && docker exec -it manticore mysql && docker stop manticore 24 | ``` 25 | 26 | Note that upon exiting the MySQL client, the Manticore container will be stopped and removed, resulting in no saved data. For information on using Manticore in a production environment, please see below. 27 | 28 | The image comes with a sample table that can be loaded like this: 29 | 30 | ```sql 31 | mysql> source /sandbox.sql 32 | ``` 33 | 34 | Also, the mysql client has several sample queries in its history that you can run on the above table, just use Up/Down keys in the client to see and run them. 35 | 36 | ## Production use 37 | 38 | 39 | ### Ports and mounting points 40 | 41 | For data persistence the folder `/var/lib/manticore/` should be mounted to local storage or other desired storage engine. 42 | 43 | The configuration file within the instance can be found at `/etc/manticoresearch/manticore.conf`. To apply custom settings, ensure that this file is mounted to your own configuration file. Additionally, configuration parameters can be set [through environment variables](#configuring-manticore-search-with-docker). 44 | 45 | It is **important to note** that configuring certain parameters through environment variables takes precedence. 46 | For example, if you set `-e searchd_listen='19306:mysql'` via environments and concurrently include `listen = 9306:mysql` in the configuration, the search functionality will ultimately listen on port `19306` for SQL connections. 47 | 48 | The ports are 9306/9308/9312 for SQL/HTTP/Binary, expose them depending on how you are going to use Manticore. For example: 49 | 50 | ```bash 51 | docker run --name manticore -v $(pwd)/data:/var/lib/manticore -p 127.0.0.1:9306:9306 -p 127.0.0.1:9308:9308 -d manticoresearch/manticore 52 | ``` 53 | 54 | or 55 | 56 | ```bash 57 | docker run --name manticore -v $(pwd)/manticore.conf:/etc/manticoresearch/manticore.conf -v $(pwd)/data:/var/lib/manticore/ -p 127.0.0.1:9306:9306 -p 127.0.0.1:9308:9308 -d manticoresearch/manticore 58 | ``` 59 | 60 | Make sure to remove `127.0.0.1:` if you want the ports to be available for external hosts. 61 | 62 | 63 | The Manticore Search Docker image comes with pre-installed [Manticore Columnar Library](https://github.com/manticoresoftware/columnar) and [Manticore Buddy](https://github.com/manticoresoftware/manticoresearch-buddy) 64 | 65 | ### Docker-compose 66 | 67 | In many cases, you may want to use Manticore in conjunction with other images specified in a Docker Compose YAML file. Below is the minimal recommended configuration for Manticore Search in a docker-compose.yml file: 68 | 69 | ```yaml 70 | version: '2.2' 71 | 72 | services: 73 | manticore: 74 | container_name: manticore 75 | image: manticoresearch/manticore 76 | restart: always 77 | ports: 78 | - 127.0.0.1:9306:9306 79 | - 127.0.0.1:9308:9308 80 | ulimits: 81 | nproc: 65535 82 | nofile: 83 | soft: 65535 84 | hard: 65535 85 | memlock: 86 | soft: -1 87 | hard: -1 88 | volumes: 89 | - ./data:/var/lib/manticore 90 | # - ./manticore.conf:/etc/manticoresearch/manticore.conf # uncomment if you use a custom config 91 | ``` 92 | 93 | Besides using the exposed ports 9306 and 9308, you can log into the instance by running `docker-compose exec manticore mysql`. 94 | 95 | ### HTTP protocol 96 | 97 | HTTP protocol is exposed on port 9308. You can map the port locally and connect using curl.: 98 | 99 | ```bash 100 | docker run --name manticore -p 9308:9308 -d manticoresearch/manticore 101 | ``` 102 | 103 | 104 | Create a table: 105 | 106 | 107 | ```bash 108 | curl -X POST 'http://127.0.0.1:9308/sql' -d 'mode=raw&query=CREATE TABLE testrt ( title text, content text, gid integer)' 109 | ``` 110 | 111 | 112 | Insert a document: 113 | 114 | 115 | ```bash 116 | curl -X POST 'http://127.0.0.1:9308/json/insert' -d'{"index":"testrt","id":1,"doc":{"title":"Hello","content":"world","gid":1}}' 117 | ``` 118 | 119 | 120 | Perform a simple search: 121 | 122 | 123 | ```bash 124 | curl -X POST 'http://127.0.0.1:9308/json/search' -d '{"index":"testrt","query":{"match":{"*":"hello world"}}}' 125 | ``` 126 | 127 | 128 | ### Logging 129 | 130 | By default, the server is set to send its logging to `/dev/stdout`, which can be viewed from the host with: 131 | 132 | 133 | ```bash 134 | docker logs manticore 135 | ``` 136 | 137 | The query log can be diverted to Docker log by passing the variable `QUERY_LOG_TO_STDOUT=true`. 138 | 139 | 140 | ### Multi-node cluster with replication 141 | 142 | Here is a simple `docker-compose.yml` for defining a two node cluster: 143 | 144 | ```yaml 145 | version: '2.2' 146 | 147 | services: 148 | 149 | manticore-1: 150 | image: manticoresearch/manticore 151 | restart: always 152 | ulimits: 153 | nproc: 65535 154 | nofile: 155 | soft: 65535 156 | hard: 65535 157 | memlock: 158 | soft: -1 159 | hard: -1 160 | networks: 161 | - manticore 162 | manticore-2: 163 | image: manticoresearch/manticore 164 | restart: always 165 | ulimits: 166 | nproc: 65535 167 | nofile: 168 | soft: 65535 169 | hard: 65535 170 | memlock: 171 | soft: -1 172 | hard: -1 173 | networks: 174 | - manticore 175 | networks: 176 | manticore: 177 | driver: bridge 178 | ``` 179 | * Start it: `docker-compose up` 180 | * Create a cluster: 181 | ```sql 182 | $ docker-compose exec manticore-1 mysql 183 | 184 | mysql> CREATE TABLE testrt ( title text, content text, gid integer); 185 | 186 | mysql> CREATE CLUSTER posts; 187 | Query OK, 0 rows affected (0.24 sec) 188 | 189 | mysql> ALTER CLUSTER posts ADD testrt; 190 | Query OK, 0 rows affected (0.07 sec) 191 | 192 | MySQL [(none)]> exit 193 | Bye 194 | ``` 195 | * Join to the the cluster on the 2nd instance 196 | ```sql 197 | $ docker-compose exec manticore-2 mysql 198 | 199 | mysql> JOIN CLUSTER posts AT 'manticore-1:9312'; 200 | mysql> INSERT INTO posts:testrt(title,content,gid) VALUES('hello','world',1); 201 | Query OK, 1 row affected (0.00 sec) 202 | 203 | MySQL [(none)]> exit 204 | Bye 205 | ``` 206 | * If you now go back to the first instance you'll see the new record: 207 | ```sql 208 | $ docker-compose exec manticore-1 mysql 209 | 210 | MySQL [(none)]> select * from testrt; 211 | +---------------------+------+-------+---------+ 212 | | id | gid | title | content | 213 | +---------------------+------+-------+---------+ 214 | | 3891565839006040065 | 1 | hello | world | 215 | +---------------------+------+-------+---------+ 216 | 1 row in set (0.00 sec) 217 | 218 | MySQL [(none)]> exit 219 | Bye 220 | ``` 221 | 222 | ## Memory locking and limits 223 | 224 | It's recommended to overwrite the default ulimits of docker for the Manticore instance: 225 | 226 | ```bash 227 | --ulimit nofile=65536:65536 228 | ``` 229 | 230 | For best performance, table components can be "mlocked" into memory. When Manticore is run under Docker, the instance requires additional privileges to allow memory locking. The following options must be added when running the instance: 231 | 232 | ```bash 233 | --cap-add=IPC_LOCK --ulimit memlock=-1:-1 234 | ``` 235 | 236 | ## Configuring Manticore Search with Docker 237 | 238 | If you want to run Manticore with a custom configuration that includes table definitions, you will need to mount the configuration to the instance: 239 | 240 | ```bash 241 | docker run --name manticore -v $(pwd)/manticore.conf:/etc/manticoresearch/manticore.conf -v $(pwd)/data/:/var/lib/manticore -p 127.0.0.1:9306:9306 -d manticoresearch/manticore 242 | ``` 243 | 244 | **Important**: When mounting a custom configuration file, avoid using `127.0.0.1:` in the `listen` directives within your configuration file. The container might not have `127.0.0.1` available, which can cause connection issues. Instead, use `0.0.0.0` or omit the IP address entirely. For example, use `listen = 9306:mysql` instead of `listen = 127.0.0.1:9306:mysql`. You can still control external access by binding ports when running the container (e.g., `-p 127.0.0.1:9306:9306`). 245 | 246 | Take into account that Manticore search inside the container is run under user `manticore`. Performing operations with table files (like creating or rotating plain tables) should be also done under `manticore`. Otherwise the files will be created under `root` and the search daemon won't have rights to open them. For example here is how you can rotate all tables: 247 | 248 | ```bash 249 | docker exec -it manticore gosu manticore indexer --all --rotate 250 | ``` 251 | 252 | You can also set individual `searchd` and `common` configuration settings using Docker environment variables. 253 | 254 | The settings must be prefixed with their section name, example for in case of `mysql_version_string` the variable must be named `searchd_mysql_version_string`: 255 | 256 | 257 | ```bash 258 | docker run --name manticore -p 127.0.0.1:9306:9306 -e searchd_mysql_version_string='5.5.0' -d manticoresearch/manticore 259 | ``` 260 | 261 | If you intend to enable the own `listen` directive, utilize the `searchd_listen` environment variable. 262 | 263 | You can specify multiple interfaces separated by a semicolon (`|`). To exclusively listen on a network address, employ the `$ip` variable (internally retrieved from `hostname -i`) as an address alias. 264 | 265 | For example, using `-e searchd_listen='9312|9316:http|9307:mysql|$ip:5443:mysql_vip'` will configure the instance to listen for binary/replication on port `9312`, SQL on port `9307`, SQL VIP on port `5443` (restricted to the instance's IP, such as 172.17.0.2), and HTTP JSON on port `9316`. 266 | 267 | **Attention**: Setting this variable overrides the default listeners, so make sure to enable all the types of listeners you may need, including the binary listener for replication (it won't work without it). 268 | 269 | ```bash 270 | $ docker run --rm -p 1188:9307 -e searchd_mysql_version_string='5.5.0' -e searchd_listen='9316:http|9307:mysql|$ip:5443:mysql_vip' manticoresearch/manticore 271 | [Mon Feb 19 10:12:20.501 2024] [1] using config file '/etc/manticoresearch/manticore.conf.sh' (297 chars)... 272 | starting daemon version '6.2.13 56aaf1f55@24021713 dev (columnar 2.2.5 8c90c1f@240217) (secondary 2.2.5 8c90c1f@240217) (knn 2.2.5 8c90c1f@240217)' ... 273 | listening on all interfaces for sphinx and http(s), port=9316 274 | listening on all interfaces for mysql, port=9307 275 | listening on 172.17.0.2:5443 for VIP mysql 276 | prereading 0 tables 277 | preread 0 tables in 0.000 sec 278 | accepting connections 279 | ``` 280 | 281 | ### Startup flags 282 | 283 | To start Manticore with custom startup flags, specify them as arguments when using docker run. Ensure you do not include the `searchd` command and include the `--nodetach` flag. Here's an example: 284 | ```bash 285 | docker run --name manticore --rm manticoresearch/manticore:latest --replay-flags=ignore-trx-errors --nodetach 286 | ``` 287 | 288 | ### Running under non-root 289 | By default, the main Manticore process `searchd` is running under user `manticore` inside the container, but the script which runs on starting the container is run under your default docker user which in most cases is `root`. If that's not what you want you can use `docker ... --user manticore` or `user: manticore` in docker compose yaml to make everything run under `manticore`. Read below about possible volume permissions issue you can get and how to solve it. 290 | 291 | 292 | ### Building plain tables 293 | 294 | There are several methods to build plain tables from your custom configuration file. There's the `CREATE_PLAIN_TABLES` (`docker run -e CREATE_PLAIN_TABLES=...`) evironment variable for that. 295 | 296 | 1) **Build all plain tables on startup:** 297 | Simply set the environment variable to `CREATE_PLAIN_TABLES=1`. 298 | 299 | 2) **Build specific tables on startup:** 300 | To initiate indexing for specific tables, use the following syntax: `CREATE_PLAIN_TABLES=tbl1;tbl2`. 301 | 302 | 3) **Scheduled building of specific tables:** 303 | Schedule indexing tasks for specific tables using the format `CREATE_PLAIN_TABLES={table name}:{schedule in cron format}`. 304 | * For a single table, use: `CREATE_PLAIN_TABLES=tbl:* * * * *`. 305 | * To index multiple tables, format it like this: `CREATE_PLAIN_TABLES=tbl:* * * * *;tbl2:*/5 2 * * *`. 306 | 307 | 4) **Combining scheduled and startup table rebuilding:** 308 | To combine scheduled building with the indexing of desired tables on startup, use this format: `CREATE_PLAIN_TABLES=tbl:* * * * *;tbl2:*/5 2 * * *;deltaTable;tbl3`. 309 | 310 | # Backup and restore 311 | 312 | ### Full backup 313 | 314 | 315 | Creating a **full backup** is a straightforward process. Simply run the following command: 316 | 317 | ```bash 318 | docker exec -it CONTAINER-ID manticore-backup --backup-dir=/tmp 319 | ``` 320 | This command will generate a backup in your `/tmp/` directory. 321 | 322 | ```bash 323 | $ ls /tmp/ | grep backup-* 324 | backup-20230509133521 325 | ``` 326 | Inside this folder, you will find your backup. 327 | 328 | ### Restore full dump 329 | 330 | 331 | To restore your full backup on startup, you need to mount your backup to the `/docker-entrypoint-initdb.d` folder. 332 | 333 | Please note that you should mount the content of your backup, not the backup folder itself (e.g., `backup-202307..`). 334 | 335 | The backup will be restored if the data directory is empty. Otherwise, it will be skipped, even if it's mounted on the second launch or any other time. Once the backup is restored, the daemon will start. 336 | 337 | ### Creating SQL dumps 338 | 339 | `manticore-backup` creates a physical backup. If you prefer a logical backup, you can use `mysqldump` in the container. For that use `docker exec` to log in to the container and run the tool. Here's an example: 340 | 341 | ```bash 342 | docker exec some-mysql sh -c 'exec mysqldump' > /some/path/on/your/host/dump.sql 343 | ``` 344 | 345 | ### Restore SQL dumps 346 | 347 | For restoring data from an sql file created by `mysqldump`, you can use the `docker exec` command with the `-i` flag like this: 348 | 349 | ```bash 350 | docker exec -i MANTICORE_CONTAINER sh -c 'exec mysql' < /some/path/on/your/host/dump.sql 351 | ``` 352 | 353 | # Building docker image with buildx 354 | 355 | To build multi-arch images, we use the buildx docker plugin. Before building, follow these steps: 356 | 357 | ```bash 358 | docker buildx create --name manticore_build --platform linux/amd64,linux/arm64 359 | docker buildx use manticore_build 360 | docker run --rm --privileged multiarch/qemu-user-static --reset -p yes 361 | ``` 362 | 363 | Once the above steps are completed, run the following `build` and `push` commands: 364 | 365 | ```bash 366 | docker buildx build --push --build-arg DEV=1 --platform linux/arm64,linux/amd64 --tag manticoresearch/manticore:$BUILD_TAG . 367 | ``` 368 | 369 | # Troubleshooting 370 | 371 | ### Permissions issue with a mounted volume 372 | 373 | In case you are running Manticore Search docker under non-root (using `docker ... --user manticore` or `user: manticore` in docker compose yaml), you can face a permissions issue, for example: 374 | ```bash 375 | FATAL: directory /var/lib/manticore write error: failed to open /var/lib/manticore/tmp: Permission denied 376 | ``` 377 | This can happen because the user which is used to run processes inside the container may have no permissions to modify the directory you have mounted to the container. To fix it you can `chown` or `chmod` the mounted directory. If you run the container under user `manticore` you need to do: 378 | ```bash 379 | chown -R 999:999 data 380 | ``` 381 | 382 | since user `manticore` has ID 999 inside the container. 383 | 384 | # Issues 385 | 386 | For reporting issues, please use the [issue tracker](https://github.com/manticoresoftware/docker/issues). 387 | 388 | ## License Notice 389 | 390 | This Docker image includes multiple independent components, each with its own license: 391 | 392 | 1. [Manticore Search](https://github.com/manticoresoftware/manticoresearch), [Manticore Buddy](https://github.com/manticoresoftware/manticoresearch-buddy), [Manticore Backup](http://github.com/manticoresoftware/manticoresearch-backup): [GPLv3](https://www.gnu.org/licenses/gpl-3.0.html) 393 | 2. [Manticore Columnar Library](http://github.com/manticoresoftware/columnar): [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) 394 | 3. [Manticore Executor](http://github.com/manticoresoftware/executor): [PHP License 3.01](https://www.php.net/license/3_01.txt) 395 | 4. Docker image packaging scripts (Dockerfile, entrypoint scripts, and related files) (MIT License) 396 | 397 | Each component group operates as a standalone module, and its respective license applies. 398 | 399 | More info in the [component licenses](./component-licenses/NOTICE). 400 | -------------------------------------------------------------------------------- /component-licenses/manticore-search-license: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . -------------------------------------------------------------------------------- /component-licenses/manticoresearch-backup-license: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . -------------------------------------------------------------------------------- /component-licenses/manticoresearch-buddy-license: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . --------------------------------------------------------------------------------