{ "name": "opensearch", "version": "3.8.0", "summary": "OpenSearch search and analytics engine: one node on 127.0.0.1, without plugins, on the app's Java runtime", "category": "server", "license": "Apache-2.0", "homepage": "https://opensearch.org/", "source": { "url": "https://artifacts.opensearch.org/releases/core/opensearch/3.8.0/opensearch-min-3.8.0-linux-x64.tar.gz", "sha256": "fc4725c78a6c71c93160ea2d6b53ee5277ca86c946cc1e786162684e65161206" }, "watch": {"kind": "github-tag", "repo": "opensearch-project/OpenSearch", "tag_regex": "^([0-9]+\\.[0-9]+\\.[0-9]+)$", "checksum": "{source}.sha512"}, "deps": [ "temurin-jre" ], "env_packages": [], "static": false, "nss": false, "check": "pid= && trap '[ -z \"$pid\" ] || kill -9 \"$pid\" 2>/dev/null' EXIT && [ -x bin/opensearch ] && [ -f share/opensearch/lib/opensearch-3.8.0.jar ] && [ ! -e share/opensearch/jdk ] && for f in $(find share/opensearch etc/opensearch bin/opensearch -type f); do [ \"$(head -c 4 \"$f\" | od -An -tx1 | tr -d ' \\n')\" != 7f454c46 ] || { echo \"opensearch: $f is an ELF file\"; exit 1; }; done && t=$(mktemp -d) && chmod 755 \"$t\" && mkdir \"$t/data\" \"$t/logs\" \"$t/tmp\" \"$t/r\" && cp -R etc/opensearch \"$t/conf\" && chown -R 65534:65534 \"$t/data\" \"$t/logs\" \"$t/tmp\" \"$t/conf\" && P=$(free_port) && Q=$(free_port) && [ \"$P\" != \"$Q\" ] && export OPENSEARCH_DATA=\"$t/data\" OPENSEARCH_LOGS=\"$t/logs\" OPENSEARCH_TMPDIR=\"$t/tmp\" OPENSEARCH_HTTP_PORT=$P OPENSEARCH_TRANSPORT_PORT=$Q OPENSEARCH_JAVA_OPTS=\"-Xms256m -Xmx256m\" OPENSEARCH_PATH_CONF=\"$t/conf\" && { setpriv --reuid=65534 --regid=65534 --clear-groups env PATH=/nonexistent /bin/sh bin/opensearch > \"$t/out\" 2>&1 & } && pid=$! && for i in $(seq 1 150); do curl -s -m 2 \"http://127.0.0.1:$P/_cluster/health\" > \"$t/h\" 2>/dev/null && has '\"status\":\"green\"' < \"$t/h\" && break; kill -0 \"$pid\" 2>/dev/null || break; sleep 1; done && { has '\"status\":\"green\"' < \"$t/h\" || { echo \"opensearch: not green; the last lines of its output:\"; tail -n 20 \"$t/out\"; false; }; } && echo \"green after about $i s, on 127.0.0.1:$P, with PATH=/nonexistent\" && [ \"$(sed -n 's/^Uid:[[:space:]]*\\([0-9]*\\).*/\\1/p' \"/proc/$pid/status\")\" = 65534 ] && [ \"/proc/$pid/exe\" -ef java/bin/java ] && u=http://127.0.0.1:$P && j() { curl -s -m 30 -H 'content-type: application/json' \"$@\"; } && j -XPUT \"$u/bvs\" -d '{\"settings\":{\"number_of_replicas\":0},\"mappings\":{\"properties\":{\"title\":{\"type\":\"text\"},\"n\":{\"type\":\"integer\"},\"when\":{\"type\":\"date\"}}}}' | has '\"acknowledged\":true' && j -XPUT \"$u/bvs/_doc/1?refresh=true\" -d '{\"title\":\"Zażółć gęślą jaźń\",\"n\":1,\"when\":\"2026-09-29T10:00:00Z\"}' | has '\"result\":\"created\"' && j -XPOST \"$u/bvs/_update/1?refresh=true\" -d '{\"script\":{\"source\":\"ctx._source.n = params.n\",\"params\":{\"n\":7}}}' | has '\"result\":\"updated\"' && j \"$u/bvs/_search\" -d '{\"query\":{\"match\":{\"title\":\"gęślą\"}},\"aggs\":{\"s\":{\"sum\":{\"field\":\"n\"}},\"d\":{\"date_histogram\":{\"field\":\"when\",\"calendar_interval\":\"day\"}}}}' > \"$t/s\" && has '\"total\":{\"value\":1,' < \"$t/s\" && has '\"s\":{\"value\":7.0}' < \"$t/s\" && has '\"key_as_string\":\"2026-09-29T00:00:00.000Z\"' < \"$t/s\" && j \"$u/bvs/_search\" -d '{\"query\":{\"match\":{\"title\":\"nothing\"}}}' | has '\"total\":{\"value\":0,' && [ \"$(curl -s -o /dev/null -w '%{http_code}' -m 30 -H 'content-type: application/json' \"$u/bvs/_search\" -d '{\"query\":{\"nosuchquery\":{}}}')\" = 400 ] && curl -s -m 30 \"$u/_nodes/stats/jvm\" | has '\"heap_max_in_bytes\":268435456' && echo \"an index, a document (Polish text), an update script, a match, a sum, a date histogram; 400 for a bad query; heap 256 MB\" && { kill -TERM \"$pid\"; n=0; while grep -qs '^State:[[:space:]]*[^Z[:space:]]' \"/proc/$pid/status\" && [ $n -lt 300 ]; do sleep 0.2; n=$((n + 1)); done; [ $n -lt 300 ] || kill -KILL \"$pid\"; wait \"$pid\"; r=$?; pid=; echo \"SIGTERM: exit status $r after about $((n / 5)) s\"; [ $r = 143 ]; } && has '\\[bvs-node\\] closed' < \"$t/logs/bvs.log\" && ! grep -Eq \":$(printf '%04X' \"$P\") [0-9A-F]+:0000 0A \" /proc/net/tcp /proc/net/tcp6 && { OPENSEARCH_DATA=\"$t/r\" OPENSEARCH_LOGS=\"$t/r\" OPENSEARCH_TMPDIR=\"$t/r\" timeout -k 10 60 /bin/sh bin/opensearch > \"$t/root\" 2>&1; r=$?; [ $r != 0 ] && [ $r != 124 ] && [ $r != 137 ]; } && has 'can not run opensearch as root' < \"$t/root\" && { OPENSEARCH_TMPDIR=\"$t/none\" timeout -k 10 60 /bin/sh bin/opensearch > \"$t/notmp\" 2>&1; [ $? = 1 ]; } && has 'no folder' < \"$t/notmp\" && [ -f \"$t/conf/opensearch.keystore\" ] && { timeout -k 10 60 setpriv --reuid=65534 --regid=65534 --clear-groups env OPENSEARCH_PATH_CONF=\"$PREFIX/etc/opensearch\" /bin/sh bin/opensearch > \"$t/ro\" 2>&1; [ $? = 1 ]; } && has 'this account cannot write there' < \"$t/ro\"" }