Compare commits

...

6 Commits

Author SHA1 Message Date
32c74bc5a0 fix: can not install depends 2024-11-05 18:26:21 +08:00
ce34fc763f fix: 安装速度降低 2024-11-05 15:24:53 +08:00
85823fdc23 update tool/apt-fast/ss-apt-fast.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2024-10-29 12:08:59 +00:00
5f12494b95 update debian/source/format.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2024-10-29 09:15:26 +00:00
8be23ff5f4 bumpversion 2024-10-29 17:10:04 +08:00
b060000028 fix: Update require password 2024-10-29 17:09:05 +08:00
7 changed files with 37 additions and 35 deletions

5
debian/changelog vendored
View File

@@ -1,6 +1,7 @@
spark-store (4.3.2.1) UNRELEASED; urgency=medium spark-store (4.3.3) UNRELEASED; urgency=medium
* 修复 aptss policy / aptss search 需要root的问题 * 修复点击更新需要输入密码的问题
* 修复安装速度下降的问题
-- shenmo <shenmo@spark-app.store> Tue, 24 Sep 2024 11:27:08 +0800 -- shenmo <shenmo@spark-app.store> Tue, 24 Sep 2024 11:27:08 +0800

View File

@@ -1 +1 @@
1.0 3.0 (native)

View File

@@ -52,7 +52,7 @@ for argument in "$@"; do
option="source" option="source"
root=0 root=0
;; ;;
changelog|search|policy) changelog|search|policy|show)
root=0 root=0
;; ;;
esac esac

View File

@@ -123,7 +123,7 @@ DEBPATH=$(realpath "$1")
exit "$try_run_ret" exit "$try_run_ret"
fi fi
aptss install "$DEBPATH" -yf --reinstall dpkg -i "$DEBPATH" || aptss install "$DEBPATH" -yf
if [ "$?" = "0" ] && [ "$2" = "--delete-after-install" ]; then if [ "$?" = "0" ] && [ "$2" = "--delete-after-install" ]; then
if dpkg -s "$package_name" >/dev/null 2>&1; then if dpkg -s "$package_name" >/dev/null 2>&1; then

View File

@@ -166,7 +166,7 @@ if [ ! -z "$IS_SHA512SUM_CHECKED" ]; then
exit "$try_run_ret" exit "$try_run_ret"
fi fi
aptss install "$DEBPATH" -yf --reinstall dpkg -i "$DEBPATH" || aptss install "$DEBPATH" -yf
unlock_file "$DEBPATH" unlock_file "$DEBPATH"

View File

@@ -2,7 +2,11 @@
# We use sudo twice to avoid ACE bug here # We use sudo twice to avoid ACE bug here
# https://gitee.com/amber-ce/amber-ce-bookworm/commit/43e1a1599ede474b37e41aa10c53fd8afc4d35a1 # https://gitee.com/amber-ce/amber-ce-bookworm/commit/43e1a1599ede474b37e41aa10c53fd8afc4d35a1
function zenity() { #!/bin/bash
# We use sudo twice to avoid ACE bug here
# https://gitee.com/amber-ce/amber-ce-bookworm/commit/43e1a1599ede474b37e41aa10c53fd8afc4d35a1
function zenity_prompt() {
if [[ -e /usr/bin/garma ]]; then if [[ -e /usr/bin/garma ]]; then
garma "$@" garma "$@"
else else
@@ -10,36 +14,33 @@ function zenity() {
fi fi
} }
# 检查sudo是否需要密码 # 检查sudo是否需要密码
if sudo sudo -n true 2>/dev/null; then if sudo -n true 2>/dev/null; then
echo "sudo 无需密码,继续执行" echo "sudo 无需密码,继续执行"
else else
# 循环输入密码直到成功或用户取消
# 循环输入密码直到成功或用户取消 while true; do
while true; do
# 使用zenity弹出密码输入框 # 使用zenity弹出密码输入框
PASSWORD=$(zenity --password --title="需要sudo权限" ) PASSWORD=$(zenity_prompt --password --title="需要sudo权限")
# 检查用户是否取消输入 # 检查用户是否取消输入
if [ -z "$PASSWORD" ]; then if [ -z "$PASSWORD" ]; then
zenity --error --text="操作已取消" zenity_prompt --error --text="操作已取消"
exit 1 exit 1
fi fi
# 尝试使用输入的密码执行sudo命令 # 尝试使用输入的密码执行sudo命令
echo "$PASSWORD" | sudo sudo -S true 2>/dev/null echo "$PASSWORD" | sudo -S -v 2>/dev/null
# 检查sudo是否成功 # 检查sudo是否成功
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
echo "密码正确,继续执行" echo "密码正确,继续执行"
break break
else else
zenity --error --text="密码错误,请重新输入" zenity_prompt --error --text="密码错误,请重新输入"
fi fi
done done
fi fi
# 使用sudo命令执行目标程序
echo "$PASSWORD" | sudo sudo -S "$@" echo "$PASSWORD" | sudo sudo -S "$@"

View File

@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
if [ "$(id -u)" != "0" ] ; then if [ "$(id -u)" != "0" ] ; then
if [[ IS_ACE_ENV="1" ]];then if [ "$IS_ACE_ENV" = "1" ];then
/opt/durapps/spark-store/bin/store-helper/pass-auth.sh "$0" "$@" /opt/durapps/spark-store/bin/store-helper/pass-auth.sh "$0" "$@"
else else
pkexec "$0" "$@" pkexec "$0" "$@"