diff --git a/debian/changelog b/debian/changelog index f606c07..fe908e3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +spark-store (3.0.3-14) stable; urgency=medium + + * Add pkexec policy: ssinstall + * Modify ssinistall script: Now will refuse run when no args are given or not run as root. + + -- shenmo Mon, 17 Jan 2022 00:00:00 +0800 + + + spark-store (3.0.3-13) stable; urgency=medium * Update the ssinstall script. Now support apt-fast and will temporarily increase the spark store source priority to 500 to make depends install correctly diff --git a/pkg/usr/share/polkit-1/actions/store.spark-app.ssinstall.policy b/pkg/usr/share/polkit-1/actions/store.spark-app.ssinstall.policy new file mode 100644 index 0000000..8bdc819 --- /dev/null +++ b/pkg/usr/share/polkit-1/actions/store.spark-app.ssinstall.policy @@ -0,0 +1,18 @@ + + + + Spark Store + x-package-repository + + 运行ssinstall需要权限 + 要使用ssinstall需要权限 + + yes + yes + yes + + /usr/local/bin/ssinstall + true + + diff --git a/spark-store-project.pro b/spark-store-project.pro index 6a23d9f..3c0945a 100644 --- a/spark-store-project.pro +++ b/spark-store-project.pro @@ -33,6 +33,9 @@ desktop.path = /usr/share/applications service.files += pkg/usr/lib/systemd/system/spark-update-notifier.service service.path = /usr/lib/systemd/system/ +polkit-1.files +=pkg/usr/share/polkit-1/actions/store.spark-app.ssinstall.policy +polkit-1.path = /usr/share/polkit-1/actions/ + icon.files += pkg/usr/share/icons/hicolor/scalable/apps/spark-store.svg icon.path = /usr/share/icons/hicolor/scalable/apps diff --git a/src/main.cpp b/src/main.cpp index d2bdfba..affd38d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -30,7 +30,7 @@ int main(int argc, char *argv[]) DAboutDialog dialog; a.setAboutDialog(&dialog); dialog.setLicense(QObject::tr("We publish this program under GPL V3")); - dialog.setVersion(DApplication::buildVersion("Version 3.0.3-13")); + dialog.setVersion(DApplication::buildVersion("Version 3.0.3-14")); dialog.setProductIcon(QIcon::fromTheme("spark-store")); // 设置Logo dialog.setProductName(QLabel::tr("Spark Store")); dialog.setDescription( @@ -51,7 +51,7 @@ int main(int argc, char *argv[]) a.setOrganizationName("spark-union"); a.setOrganizationDomain("https://www.deepinos.org/"); a.setApplicationName("Spark Store"); //不需要翻译,否则 ~/.local/share/ 下文件夹名称也被翻译为中文 - a.setApplicationVersion(DApplication::buildVersion("3.0.3-13")); + a.setApplicationVersion(DApplication::buildVersion("3.0.3-14")); a.setApplicationAcknowledgementPage("https://gitee.com/deepin-community-store/spark-store"); a.setApplicationDescription( QObject::tr( diff --git a/tool/ssinstall b/tool/ssinstall index 68bf34e..52bf1f7 100755 --- a/tool/ssinstall +++ b/tool/ssinstall @@ -3,6 +3,24 @@ echo "Spark Store Install script.星火商店安装脚本" +if [ $# -eq 0 ];then +echo "没有接收到参数,退出" +echo "用法:$0 deb路径" +exit +fi + +if [ "$(id -u)" != "0" ] +then + echo "ssinstall需要在root下运行"; + exit +fi + +if [ ! -f "$1" ] +then + echo "文件不存在" + exit +fi + DEPEND=`which apt-fast` isuos=`cat /etc/os-release | grep UnionTech` #临时提升星火源的优先级 @@ -30,4 +48,4 @@ dpkg -i $1 || apt-fast install -yf || dpkg -P $1 fi sed -i 's/500/400/g' /etc/apt/preferences.d/sparkstore -#恢复优先级 \ No newline at end of file +#恢复优先级