diff --git a/debian/changelog b/debian/changelog index 12fab0a..ed2782d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,8 @@ -spark-store (4.3.0-fix5) stable; urgency=medium +spark-store (4.3.1) UNRELEASED; urgency=medium -* 支持GXDE,重启空链接清理 - - -- shenmo <shenmo@spark-app.store> Sun, 5 Mar 2022 11:45:14 +0800 + * 修复自提权更新问题 + -- shenmo <shenmo@spark-app.store> Tue, 24 Sep 2024 11:27:08 +0800 spark-store (4.3.0-fix2) stable; urgency=medium diff --git a/pkg/usr/share/polkit-1/actions/store.spark-app.ss-do-upgrade-worker.policy b/pkg/usr/share/polkit-1/actions/store.spark-app.ss-do-upgrade.policy similarity index 70% rename from pkg/usr/share/polkit-1/actions/store.spark-app.ss-do-upgrade-worker.policy rename to pkg/usr/share/polkit-1/actions/store.spark-app.ss-do-upgrade.policy index 49c5000..d82d670 100644 --- a/pkg/usr/share/polkit-1/actions/store.spark-app.ss-do-upgrade-worker.policy +++ b/pkg/usr/share/polkit-1/actions/store.spark-app.ss-do-upgrade.policy @@ -4,15 +4,15 @@ <policyconfig> <vendor>Spark Store</vendor> <icon_name>x-package-repository</icon_name> - <action id="store.spark-app.ss-do-upgrade-worker"> - <description>运行ss-do-upgrade-worker需要权限</description> - <message>要使用ss-do-upgrade-worker需要权限</message> + <action id="store.spark-app.ss-do-upgrade"> + <description>运行ss-do-upgrade需要权限</description> + <message>要使用ss-do-upgrade需要权限</message> <defaults> <allow_any>yes</allow_any> <allow_inactive>yes</allow_inactive> <allow_active>yes</allow_active> </defaults> - <annotate key="org.freedesktop.policykit.exec.path">/opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh</annotate> + <annotate key="org.freedesktop.policykit.exec.path">/opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade.sh</annotate> <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate> </action> </policyconfig> diff --git a/tool/auto-install-policy/store.spark-app.ssinstall.policy b/pkg/usr/share/polkit-1/actions/store.spark-app.ssinstall.policy similarity index 100% rename from tool/auto-install-policy/store.spark-app.ssinstall.policy rename to pkg/usr/share/polkit-1/actions/store.spark-app.ssinstall.policy diff --git a/spark-store-project.pro b/spark-store-project.pro index f086c1c..c502258 100644 --- a/spark-store-project.pro +++ b/spark-store-project.pro @@ -46,7 +46,7 @@ desktop.path = /usr/share/applications/ service.files += pkg/usr/lib/systemd/system/spark-update-notifier.service service.path = /lib/systemd/system/ -polkit-1.files += pkg/usr/share/polkit-1/actions/store.spark-app.ss-do-upgrade-worker.policy +polkit-1.files += pkg/usr/share/polkit-1/actions/* polkit-1.path = /usr/share/polkit-1/actions/ icon.files += pkg/usr/share/icons diff --git a/tool/update-upgrade/ss-do-upgrade.sh b/tool/update-upgrade/ss-do-upgrade.sh index 2f3c99b..72be27a 100755 --- a/tool/update-upgrade/ss-do-upgrade.sh +++ b/tool/update-upgrade/ss-do-upgrade.sh @@ -1,8 +1,13 @@ #!/bin/bash +if [ "$(id -u)" != "0" ] ; then + pkexec "$0" "$@" + exit +fi trap "rm -f /tmp/spark-store/upgradeStatus.txt" EXIT source /opt/durapps/spark-store/bin/bashimport/transhell.amber load_transhell_debug + function get_name_from_desktop_file() { local app_name_in_desktop local name_orig