From 1d5b1a68bf43be318f5e06e3a2b4956145230f62 Mon Sep 17 00:00:00 2001 From: Raul Zamora Date: Tue, 19 Nov 2024 11:39:16 +0100 Subject: [PATCH] fix start process and packages --- .github/workflows/ci.yaml | 4 ++-- rockcraft.yaml | 16 +++++++++++----- scripts/start.sh | 6 +----- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index bcc80c3..4a0d4f3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -92,11 +92,11 @@ jobs: # skopeo sudo snap install --devmode --channel edge skopeo sudo snap install yq - + - name: Create local image run: | version="$(cat rockcraft.yaml | yq .version)" - + sudo skopeo \ --insecure-policy \ copy \ diff --git a/rockcraft.yaml b/rockcraft.yaml index d3d0044..fdef6eb 100644 --- a/rockcraft.yaml +++ b/rockcraft.yaml @@ -48,7 +48,13 @@ parts: opensearch-snap: plugin: nil stage-snaps: - - opensearch/2/edge + - opensearch/2/edge/core2404 + stage-packages: + - base-files + - python3-venv + - python3-yaml + - curl + - util-linux override-prime: | craftctl default @@ -81,8 +87,8 @@ parts: plugin: dump source: scripts organize: - start.sh: bin/start.sh - set_conf.py: bin/set_conf.py + start.sh: usr/bin/start.sh + set_conf.py: usr/bin/set_conf.py stage: - - bin/start.sh - - bin/set_conf.py + - usr/bin/start.sh + - usr/bin/set_conf.py diff --git a/scripts/start.sh b/scripts/start.sh index 4797afc..db23170 100755 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -88,8 +88,4 @@ sed -i "s@=logs/@=${OPENSEARCH_VARLOG}/@" "${OPENSEARCH_PATH_CONF}/jvm.options" cat "${conf}" -exec /usr/bin/setpriv \ - --clear-groups \ - --reuid opensearch \ - --regid opensearch \ - -- "${OPENSEARCH_BIN}"/opensearch +exec "${OPENSEARCH_BIN}"/opensearch