From e7d15f903db65a5d36e75535017a9ee450e4cd2c Mon Sep 17 00:00:00 2001 From: shenmo Date: Mon, 21 Oct 2024 02:45:13 +0800 Subject: [PATCH 1/4] fix: abandon dpkg --- tool/ssaudit | 3 +-- tool/ssinstall | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tool/ssaudit b/tool/ssaudit index 0c529ea..733e08d 100755 --- a/tool/ssaudit +++ b/tool/ssaudit @@ -122,8 +122,7 @@ DEBPATH=$(realpath "$1") exit "$try_run_ret" fi - dpkg --force-conflicts -i "$DEBPATH" - aptss install "$DEBPATH" -yf + aptss install "$DEBPATH" -yf --reinstall if [ "$?" = "0" ] && [ "$2" = "--delete-after-install" ]; then if dpkg -s "$package_name" >/dev/null 2>&1; then diff --git a/tool/ssinstall b/tool/ssinstall index 5ca76da..df21047 100755 --- a/tool/ssinstall +++ b/tool/ssinstall @@ -165,8 +165,7 @@ if [ ! -z "$IS_SHA512SUM_CHECKED" ]; then exit "$try_run_ret" fi - dpkg --force-conflicts -i "$DEBPATH" - aptss install "$DEBPATH" -yf + aptss install "$DEBPATH" -yf --reinstall unlock_file "$DEBPATH" From bab1b1cb0a714e7cca361b6e5597a0beda47875e Mon Sep 17 00:00:00 2001 From: shenmo Date: Fri, 25 Oct 2024 13:10:25 +0800 Subject: [PATCH 2/4] fix: In ACE you can't use updater --- tool/store-helper/pass-auth.sh | 45 ++++++++++++++++++++++++++++ tool/update-upgrade/ss-do-upgrade.sh | 8 +++-- 2 files changed, 51 insertions(+), 2 deletions(-) create mode 100755 tool/store-helper/pass-auth.sh diff --git a/tool/store-helper/pass-auth.sh b/tool/store-helper/pass-auth.sh new file mode 100755 index 0000000..f858cea --- /dev/null +++ b/tool/store-helper/pass-auth.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# We use sudo twice to avoid ACE bug here +# https://gitee.com/amber-ce/amber-ce-bookworm/commit/43e1a1599ede474b37e41aa10c53fd8afc4d35a1 + +function zenity() { + if [[ -e /usr/bin/garma ]]; then + garma "$@" + else + $(command -v zenity) "$@" + fi +} + + + +# 检查sudo是否需要密码 +if sudo sudo -n true 2>/dev/null; then + echo "sudo 无需密码,继续执行" + +else + +# 循环输入密码直到成功或用户取消 +while true; do + # 使用zenity弹出密码输入框 + PASSWORD=$(zenity --password --title="需要sudo权限" ) + + # 检查用户是否取消输入 + if [ -z "$PASSWORD" ]; then + zenity --error --text="操作已取消" + exit 1 + fi + + # 尝试使用输入的密码执行sudo命令 + echo "$PASSWORD" | sudo sudo -S true 2>/dev/null + + # 检查sudo是否成功 + if [ $? -eq 0 ]; then + echo "密码正确,继续执行" + break + else + zenity --error --text="密码错误,请重新输入" + fi +done +fi + +echo "$PASSWORD" | sudo sudo -S "$@" diff --git a/tool/update-upgrade/ss-do-upgrade.sh b/tool/update-upgrade/ss-do-upgrade.sh index 2b72ba4..191198d 100755 --- a/tool/update-upgrade/ss-do-upgrade.sh +++ b/tool/update-upgrade/ss-do-upgrade.sh @@ -1,7 +1,11 @@ #!/bin/bash if [ "$(id -u)" != "0" ] ; then - pkexec "$0" "$@" - exit + if [[ IS_ACE_ENV="1" ]];then + /opt/durapps/spark-store/bin/store-helper/pass-auth.sh "$0" "$@" + else + pkexec "$0" "$@" + exit + fi fi trap "rm -f /tmp/spark-store/upgradeStatus.txt" EXIT source /opt/durapps/spark-store/bin/bashimport/transhell.amber From 81ab122d6b99f26c744302bcc76b1d26150717f6 Mon Sep 17 00:00:00 2001 From: shenmo Date: Mon, 28 Oct 2024 21:59:25 +0800 Subject: [PATCH 3/4] fix: now we don't need root to policy/search --- tool/apt-fast/ss-apt-fast | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/apt-fast/ss-apt-fast b/tool/apt-fast/ss-apt-fast index c051823..b4de6f4 100755 --- a/tool/apt-fast/ss-apt-fast +++ b/tool/apt-fast/ss-apt-fast @@ -52,7 +52,7 @@ for argument in "$@"; do option="source" root=0 ;; - changelog) + changelog|search|policy) root=0 ;; esac From ed3db298067e2128d3cb226f7a91b9323f62b7e9 Mon Sep 17 00:00:00 2001 From: shenmo Date: Mon, 28 Oct 2024 22:04:40 +0800 Subject: [PATCH 4/4] add: GXDE Builder --- .github/workflows/program-builder.yml | 13 +++++++++++++ debian/changelog | 6 ++++++ translations/spark-store_en.ts | 16 ++++++++-------- translations/spark-store_es.ts | 16 ++++++++-------- translations/spark-store_fr.ts | 16 ++++++++-------- translations/spark-store_zh_CN.ts | 16 ++++++++-------- translations/spark-store_zh_TW.ts | 16 ++++++++-------- 7 files changed, 59 insertions(+), 40 deletions(-) create mode 100644 .github/workflows/program-builder.yml diff --git a/.github/workflows/program-builder.yml b/.github/workflows/program-builder.yml new file mode 100644 index 0000000..664aba2 --- /dev/null +++ b/.github/workflows/program-builder.yml @@ -0,0 +1,13 @@ +name: Building Program +run-name: Building ${{ GITHUB.REPOSITORY }} + +on: + workflow_dispatch: + push: + tags: + - "*" + +jobs: + call: + uses: GXDE-OS/GXDE/.github/workflows/building-deb.yml@master + secrets: inherit diff --git a/debian/changelog b/debian/changelog index 1ff90df..db0848b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +spark-store (4.3.2.1) UNRELEASED; urgency=medium + + * 修复 aptss policy / aptss search 需要root的问题 + + -- shenmo Tue, 24 Sep 2024 11:27:08 +0800 + spark-store (4.3.2.0) UNRELEASED; urgency=medium * 后续更新请从4.3.2.0版本号开始,4.3.2版本仅用于GXDE测试 diff --git a/translations/spark-store_en.ts b/translations/spark-store_en.ts index 1f16de4..1ffe140 100644 --- a/translations/spark-store_en.ts +++ b/translations/spark-store_en.ts @@ -481,28 +481,28 @@ - + Submit App - + Submit App with client(Recommanded) - + Settings - + APP Upgrade and Install Settings - + Spark Store @@ -537,7 +537,7 @@ - + Show MainWindow @@ -658,12 +658,12 @@ TitleBarMenu - + About - + Exit diff --git a/translations/spark-store_es.ts b/translations/spark-store_es.ts index bd55a84..8e18552 100644 --- a/translations/spark-store_es.ts +++ b/translations/spark-store_es.ts @@ -481,28 +481,28 @@ Actualización de app - + Submit App Presentación de la aplicación - + Submit App with client(Recommanded) Enviar la aplicación al cliente (recomendación) - + Settings Configuración - + APP Upgrade and Install Settings Actualización e instalación de app - + Spark Store SPARK Store @@ -537,7 +537,7 @@ Descargar lista - + Show MainWindow Mostrar la ventana principal @@ -658,12 +658,12 @@ TitleBarMenu - + About Sobre - + Exit Exportaciones diff --git a/translations/spark-store_fr.ts b/translations/spark-store_fr.ts index 35e9239..fb30b54 100644 --- a/translations/spark-store_fr.ts +++ b/translations/spark-store_fr.ts @@ -481,28 +481,28 @@ Mise à niveau app - + Submit App Soumettre une application - + Submit App with client(Recommanded) Soumettre une demande au client (recommandé) - + Settings Paramètres - + APP Upgrade and Install Settings Paramètres de mise à niveau et d'installation de l'app - + Spark Store Le Spark store @@ -537,7 +537,7 @@ Télécharger la Liste - + Show MainWindow Afficher la fenêtre principale @@ -658,12 +658,12 @@ TitleBarMenu - + About À propos - + Exit Exportations diff --git a/translations/spark-store_zh_CN.ts b/translations/spark-store_zh_CN.ts index f295e7b..2ff43eb 100644 --- a/translations/spark-store_zh_CN.ts +++ b/translations/spark-store_zh_CN.ts @@ -481,28 +481,28 @@ 更新 - + Submit App 投递应用 - + Submit App with client(Recommanded) 使用本地投稿器投递应用(推荐) - + Settings 设置 - + APP Upgrade and Install Settings 应用更新和安装设置 - + Spark Store 星火应用商店 @@ -537,7 +537,7 @@ 下载列表 - + Show MainWindow 显示主窗口 @@ -658,12 +658,12 @@ TitleBarMenu - + About 关于 - + Exit 退出 diff --git a/translations/spark-store_zh_TW.ts b/translations/spark-store_zh_TW.ts index 0e0ea9b..3a2a5ea 100644 --- a/translations/spark-store_zh_TW.ts +++ b/translations/spark-store_zh_TW.ts @@ -481,28 +481,28 @@ 軟體更新 - + Submit App 上傳軟體 - + Submit App with client(Recommanded) 從客戶端上傳軟體(推薦的) - + Settings 設定 - + APP Upgrade and Install Settings 軟體升級 和 安裝設定 - + Spark Store 星火应用商店 @@ -537,7 +537,7 @@ 下载列表 - + Show MainWindow 显示主窗口 @@ -658,12 +658,12 @@ TitleBarMenu - + About 关于 - + Exit 退出