From a5a9bc091a8e6049701f6d883e1a0e0617f974b4 Mon Sep 17 00:00:00 2001 From: ZF sun <34314687@qq.com> Date: Mon, 17 Nov 2025 09:55:05 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=8F=AF=E4=BB=A5=E6=AD=A3=E5=B8=B8?= =?UTF-8?q?=E7=94=9F=E6=88=90=E8=A1=A5=E4=B8=81=E5=8C=85=E5=8F=8A=E5=9B=9E?= =?UTF-8?q?=E6=BB=9A=E5=8C=85=E5=8F=8A=E7=AD=BE=E5=90=8D=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/patch_tools/install_patch_system.sh | 14 ++++++++++---- scripts/patch_tools/patch_config.sh | 8 ++++---- scripts/patch_tools/patch_generator.sh | 3 ++- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/scripts/patch_tools/install_patch_system.sh b/scripts/patch_tools/install_patch_system.sh index 026182ad9..2098333dd 100644 --- a/scripts/patch_tools/install_patch_system.sh +++ b/scripts/patch_tools/install_patch_system.sh @@ -73,9 +73,11 @@ install_dependencies() { local dependencies=( "tar" "gzip" + "bzip2" "jq" "gpg" "bc" + "gnupg" ) for dep in "${dependencies[@]}"; do @@ -93,17 +95,21 @@ install_dependencies() { fi # 关键依赖 - local keys_deps = " coreutils findutils util-linux " + local keys_deps=( + "coreutils" + "findutils" + "util-linux" + ) if command -v apt-get >/dev/null 2>&1; then # Debian/Ubuntu $sudo_prefix apt-get update - $sudo_prefix apt-get install -y $keys_deps $(printf "%s " "${dependencies[@]}") + $sudo_prefix apt-get install -y $(printf "%s " "${keys_deps[@]}") $(printf "%s " "${dependencies[@]}") elif command -v yum >/dev/null 2>&1; then # CentOS/RHEL - $sudo_prefix yum install -y $keys_deps $(printf "%s " "${dependencies[@]}") + $sudo_prefix yum install -y $(printf "%s " "${keys_deps[@]}") $(printf "%s " "${dependencies[@]}") else - warn "无法自动安装依赖,请手动安装: $keys_deps $(printf "%s " "${dependencies[@]}")" + warn "无法自动安装依赖,请手动安装: $(printf "%s " "${keys_deps[@]}") $(printf "%s " "${dependencies[@]}")" fi # 安装GPG(用于签名验证) diff --git a/scripts/patch_tools/patch_config.sh b/scripts/patch_tools/patch_config.sh index 7b8e7c1ce..b1df68f82 100644 --- a/scripts/patch_tools/patch_config.sh +++ b/scripts/patch_tools/patch_config.sh @@ -6,10 +6,10 @@ # ============================================================================== # 基础配置 -PATCH_NAME="security-hotfix-2025" +PATCH_NAME="upgrade-hotfix" PATCH_VERSION="1.0.0" -PATCH_DESCRIPTION="紧急安全漏洞修复" -PATCH_AUTHOR="企业DevOps团队" +PATCH_DESCRIPTION="紧急升级修复" +PATCH_AUTHOR="devops" PATCH_EMAIL="devops@aigc-quickapp.com" # ============================================================================== @@ -103,7 +103,7 @@ PER_FILE_OPTIMIZATION=true # 是否对每个文件单独压缩 # ============================================================================== # 安全配置 -SIGNING_ENABLED=true # 是否启用签名 +SIGNING_ENABLED=false # 是否启用签名 SIGNING_ALGORITHM="rsa" # 签名算法,rsa, ecdsa PRIVATE_KEY="/etc/patch/keys/private.pem" # 私钥文件路径 PUBLIC_KEY="/etc/patch/keys/public.pem" # 公钥文件路径 diff --git a/scripts/patch_tools/patch_generator.sh b/scripts/patch_tools/patch_generator.sh index 892812421..0008b8f59 100644 --- a/scripts/patch_tools/patch_generator.sh +++ b/scripts/patch_tools/patch_generator.sh @@ -687,7 +687,8 @@ sign_package() { info "开始签名补丁包" if command -v gpg >/dev/null 2>&1; then - if gpg --batch --yes --detach-sign \ + if gpg --homedir "/etc/patch/keys" \ + --batch --yes --detach-sign \ --local-user "$PATCH_AUTHOR" \ --output "${package_path}.sig" \ "$package_path"; then