From a5f31d220c8ed0e40b422613ebe9d3895681bd83 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 18 Nov 2026 22:14:49 +0000 Subject: [PATCH 1/2] Update aaronleopold/stump Docker tag to v0.1.14 --- apps/stump/0.1.10/docker-compose.yml | 2 +- apps/stump/0.1.13/docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/stump/0.1.10/docker-compose.yml b/apps/stump/0.1.10/docker-compose.yml index 804e83e3f..7532aa2a6 100644 --- a/apps/stump/0.1.10/docker-compose.yml +++ b/apps/stump/0.1.10/docker-compose.yml @@ -1,6 +1,6 @@ services: stump: - image: aaronleopold/stump:0.1.12 + image: aaronleopold/stump:0.1.14 container_name: ${CONTAINER_NAME} restart: always networks: diff --git a/apps/stump/0.1.13/docker-compose.yml b/apps/stump/0.1.13/docker-compose.yml index 4b4c2c4da..7532aa2a6 100644 --- a/apps/stump/0.1.13/docker-compose.yml +++ b/apps/stump/0.1.13/docker-compose.yml @@ -1,6 +1,6 @@ services: stump: - image: aaronleopold/stump:0.1.13 + image: aaronleopold/stump:0.1.14 container_name: ${CONTAINER_NAME} restart: always networks: From 79fd434b0fee40c0838c315c03b8e34a37839039 Mon Sep 17 00:00:00 2001 From: github-action update-app-version Date: Wed, 18 Nov 2026 22:15:10 +0000 Subject: [PATCH 2/2] Update app version [skip ci] --- apps/stump/0.1.10/docker-compose.yml | 2 +- apps/stump/0.1.13/docker-compose.yml | 2 +- apps/stump/0.1.14/.env.sample | 5 + apps/stump/0.1.14/data.yml | 67 +++++++++++++ apps/stump/0.1.14/data/.gitkeep | 1 + apps/stump/0.1.14/docker-compose.yml | 23 +++++ apps/stump/0.1.14/scripts/init.sh | 2 + apps/stump/0.1.14/scripts/uninstall.sh | 8 ++ apps/stump/0.1.14/scripts/upgrade.sh | 133 +++++++++++++++++++++++++ 9 files changed, 241 insertions(+), 2 deletions(-) create mode 100644 apps/stump/0.1.14/.env.sample create mode 100644 apps/stump/0.1.14/data.yml create mode 100644 apps/stump/0.1.14/data/.gitkeep create mode 100644 apps/stump/0.1.14/docker-compose.yml create mode 100755 apps/stump/0.1.14/scripts/init.sh create mode 100755 apps/stump/0.1.14/scripts/uninstall.sh create mode 100755 apps/stump/0.1.14/scripts/upgrade.sh diff --git a/apps/stump/0.1.10/docker-compose.yml b/apps/stump/0.1.10/docker-compose.yml index 7532aa2a6..804e83e3f 100644 --- a/apps/stump/0.1.10/docker-compose.yml +++ b/apps/stump/0.1.10/docker-compose.yml @@ -1,6 +1,6 @@ services: stump: - image: aaronleopold/stump:0.1.14 + image: aaronleopold/stump:0.1.12 container_name: ${CONTAINER_NAME} restart: always networks: diff --git a/apps/stump/0.1.13/docker-compose.yml b/apps/stump/0.1.13/docker-compose.yml index 7532aa2a6..4b4c2c4da 100644 --- a/apps/stump/0.1.13/docker-compose.yml +++ b/apps/stump/0.1.13/docker-compose.yml @@ -1,6 +1,6 @@ services: stump: - image: aaronleopold/stump:0.1.14 + image: aaronleopold/stump:0.1.13 container_name: ${CONTAINER_NAME} restart: always networks: diff --git a/apps/stump/0.1.14/.env.sample b/apps/stump/0.1.14/.env.sample new file mode 100644 index 000000000..66f0ac691 --- /dev/null +++ b/apps/stump/0.1.14/.env.sample @@ -0,0 +1,5 @@ +CONTAINER_NAME=stump +PANEL_APP_PORT_HTTP=10801 +CONFIG_PATH=./data/config +LIBRARY_PATH=./data/library +TZ=Asia/Shanghai diff --git a/apps/stump/0.1.14/data.yml b/apps/stump/0.1.14/data.yml new file mode 100644 index 000000000..ba5a4ff52 --- /dev/null +++ b/apps/stump/0.1.14/data.yml @@ -0,0 +1,67 @@ +additionalProperties: + formFields: + - default: 10801 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: HTTP Port + labelZh: HTTP 端口 + label: + en: HTTP Port + zh: HTTP 端口 + zh-Hant: HTTP 埠 + ja: HTTP ポート + ko: HTTP 포트 + ru: HTTP-порт + ms: Port HTTP + pt-br: Porta HTTP + required: true + rule: paramPort + type: number + - default: ./data/config + edit: true + envKey: CONFIG_PATH + labelEn: Config Directory + labelZh: 配置目录 + label: + en: Config Directory + zh: 配置目录 + zh-Hant: 設定目錄 + ja: 設定ディレクトリ + ko: 설정 디렉터리 + ru: Каталог конфигурации + ms: Direktori konfigurasi + pt-br: Diretorio de configuracao + required: true + type: text + - default: ./data/library + edit: true + envKey: LIBRARY_PATH + labelEn: Library Directory + labelZh: 书库目录 + label: + en: Library Directory + zh: 书库目录 + zh-Hant: 書庫目錄 + ja: ライブラリディレクトリ + ko: 라이브러리 디렉터리 + ru: Каталог библиотеки + ms: Direktori pustaka + pt-br: Diretorio da biblioteca + required: true + type: text + - default: Asia/Shanghai + edit: true + envKey: TZ + labelEn: Timezone + labelZh: 时区 + label: + en: Timezone + zh: 时区 + zh-Hant: 時區 + ja: タイムゾーン + ko: 시간대 + ru: Часовой пояс + ms: Zon waktu + pt-br: Fuso horario + required: true + type: text diff --git a/apps/stump/0.1.14/data/.gitkeep b/apps/stump/0.1.14/data/.gitkeep new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/apps/stump/0.1.14/data/.gitkeep @@ -0,0 +1 @@ + diff --git a/apps/stump/0.1.14/docker-compose.yml b/apps/stump/0.1.14/docker-compose.yml new file mode 100644 index 000000000..7532aa2a6 --- /dev/null +++ b/apps/stump/0.1.14/docker-compose.yml @@ -0,0 +1,23 @@ +services: + stump: + image: aaronleopold/stump:0.1.14 + container_name: ${CONTAINER_NAME} + restart: always + networks: + - 1panel-network + ports: + - "${PANEL_APP_PORT_HTTP}:10801" + environment: + - PUID=1000 + - PGID=1000 + - TZ=${TZ} + - STUMP_CONFIG_DIR=/config + volumes: + - "${CONFIG_PATH}:/config" + - "${LIBRARY_PATH}:/data" + labels: + createdBy: "Apps" + +networks: + 1panel-network: + external: true diff --git a/apps/stump/0.1.14/scripts/init.sh b/apps/stump/0.1.14/scripts/init.sh new file mode 100755 index 000000000..6e877466e --- /dev/null +++ b/apps/stump/0.1.14/scripts/init.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +set -euo pipefail diff --git a/apps/stump/0.1.14/scripts/uninstall.sh b/apps/stump/0.1.14/scripts/uninstall.sh new file mode 100755 index 000000000..5c199242b --- /dev/null +++ b/apps/stump/0.1.14/scripts/uninstall.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +set -euo pipefail + +if command -v docker-compose >/dev/null 2>&1; then + docker-compose down --remove-orphans +else + docker compose down --remove-orphans +fi diff --git a/apps/stump/0.1.14/scripts/upgrade.sh b/apps/stump/0.1.14/scripts/upgrade.sh new file mode 100755 index 000000000..d1f513361 --- /dev/null +++ b/apps/stump/0.1.14/scripts/upgrade.sh @@ -0,0 +1,133 @@ +#!/usr/bin/env bash +set -euo pipefail + +ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)" +ENV_FILE="${ENV_FILE:-${ROOT_DIR}/.env}" +TMP_FILE="" + +fail() { + printf '%s\n' "$1" >&2 + exit 1 +} + +cleanup() { + if [[ -n "$TMP_FILE" && -e "$TMP_FILE" ]]; then + unlink -- "$TMP_FILE" + fi +} + +trap cleanup EXIT HUP INT TERM + +read_env_value() { + local key="$1" + local value="" + + if [[ -f "$ENV_FILE" ]]; then + value="$(awk -v key="$key" ' + $0 ~ "^[[:space:]]*" key "[[:space:]]*=" { + line = $0 + sub("^[[:space:]]*" key "[[:space:]]*=[[:space:]]*", "", line) + value = line + } + END { print value } + ' "$ENV_FILE")" + fi + + if [[ ${#value} -ge 2 && "${value:0:1}" == '"' && "${value: -1}" == '"' ]]; then + value="${value:1:${#value}-2}" + elif [[ ${#value} -ge 2 && "${value:0:1}" == "'" && "${value: -1}" == "'" ]]; then + value="${value:1:${#value}-2}" + fi + printf '%s\n' "$value" +} + +configured_value() { + local key="$1" + local default_value="$2" + local value + value="${!key:-}" + if [[ -z "$value" ]]; then + value="$(read_env_value "$key")" + fi + printf '%s\n' "${value:-$default_value}" +} + +resolve_app_path() { + local key="$1" + local raw="$2" + local clean candidate resolved current part + local -a parts=() + case "$raw" in + ""|/*|.|..|../*|*/../*|*/..) echo "unsafe ${key} path" >&2; return 1 ;; + esac + if [[ "$raw" =~ [[:cntrl:]] ]]; then + echo "unsafe ${key} path" >&2 + return 1 + fi + clean="${raw#./}" + [[ -n "$clean" ]] || { echo "unsafe ${key} path" >&2; return 1; } + command -v realpath >/dev/null 2>&1 || { echo "realpath is required" >&2; return 1; } + candidate="$ROOT_DIR/$clean" + resolved="$(realpath -m -- "$candidate")" || { echo "unsafe ${key} path" >&2; return 1; } + case "$resolved" in + "$ROOT_DIR"/*) ;; + *) echo "unsafe ${key} path" >&2; return 1 ;; + esac + current="$ROOT_DIR" + IFS='/' read -r -a parts <<< "$clean" + for part in "${parts[@]}"; do + [[ -z "$part" || "$part" == "." ]] && continue + current="$current/$part" + if [[ -L "$current" ]]; then + echo "unsafe ${key} path" >&2 + return 1 + fi + done + printf '%s\n' "$resolved" +} + +config_path="$(configured_value CONFIG_PATH "./data/config")" +[[ "$config_path" != *'$'* ]] || fail "unsafe CONFIG_PATH path" +[[ "$config_path" != *'`'* ]] || fail "unsafe CONFIG_PATH path" +[[ "$config_path" != *';'* ]] || fail "unsafe CONFIG_PATH path" +[[ "$config_path" != *'&'* ]] || fail "unsafe CONFIG_PATH path" +[[ "$config_path" != *'|'* ]] || fail "unsafe CONFIG_PATH path" +[[ "$config_path" != *'<'* ]] || fail "unsafe CONFIG_PATH path" +[[ "$config_path" != *'>'* ]] || fail "unsafe CONFIG_PATH path" +[[ "$config_path" != *'('* ]] || fail "unsafe CONFIG_PATH path" +[[ "$config_path" != *')'* ]] || fail "unsafe CONFIG_PATH path" +config_dir="$(resolve_app_path CONFIG_PATH "$config_path")" +config_file="$config_dir/Stump.toml" +[[ ! -L "$config_file" ]] || fail "Stump.toml must not be a symbolic link" +[[ ! -e "$config_file" ]] && exit 0 +[[ -f "$config_file" ]] || fail "Stump.toml must be a regular file" + +# Stump 0.1.9 replaced the old config loader. The generated 0.1.7 file has +# one field that no longer exists; removing only that obsolete field preserves +# the database and every user-configured setting. +if ! grep -Eq '^[[:space:]]*profile[[:space:]]*=' -- "$config_file"; then + exit 0 +fi + +backup_file="${config_file}.pre-v0.1.9" +if [[ -e "$backup_file" || -L "$backup_file" ]]; then + [[ ! -L "$backup_file" && -f "$backup_file" ]] || fail "migration backup is not a regular file" + cmp -s -- "$backup_file" "$config_file" || fail "migration backup already exists with different contents" +else + cp -p -- "$config_file" "$backup_file" +fi + +TMP_FILE="$(mktemp "${config_file}.tmp.XXXXXX")" +awk ' + /^[[:space:]]*profile[[:space:]]*=/ { removed = 1; next } + { print } + END { + if (!removed) exit 2 + } +' "$config_file" > "$TMP_FILE" || fail "failed to migrate Stump.toml" + +grep -Eq '^[[:space:]]*profile[[:space:]]*=' -- "$TMP_FILE" && fail "obsolete profile setting remains" +chmod --reference="$config_file" "$TMP_FILE" +chown --reference="$config_file" "$TMP_FILE" +mv -f -- "$TMP_FILE" "$config_file" +TMP_FILE=""