From 9f23c2b381e0512b1672681fa11129351adbce87 Mon Sep 17 00:00:00 2001 From: zty199 <46324746+zty199@users.noreply.github.com> Date: Fri, 11 Aug 2023 23:23:22 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20#I7R2L5=20=E6=9B=B4=E6=96=B0=E6=98=9F?= =?UTF-8?q?=E7=81=AB=E5=95=86=E5=BA=97=E6=97=B6=E4=B8=8D=E5=86=8D=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E6=89=93=E5=BC=80=E6=9B=B4=E6=96=B0=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit prerm 脚本中添加判断,upgrade 时将更新提示 service 文件改名添加 bak,以此作为升级判断依据;postinst 脚本中判断 bak 文件存在时,优先判断更新提示服务是否为 enable 状态,若被 disable 则不再自启(若为 inactive 状态则同理不再重启服务) Log: 修改 prerm 和 postinst 实现更新时判断更新提示服务是否需要重新设置自启;修改 debian/changelog,消除编译打包警告 --- debian/changelog | 62 +++++++++++++++++++++++++++---------- debian/spark-store.postinst | 45 +++++++++++++++++---------- debian/spark-store.prerm | 41 ++++++++++++++++-------- 3 files changed, 101 insertions(+), 47 deletions(-) diff --git a/debian/changelog b/debian/changelog index 7a3f2fe..943b706 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,69 +1,83 @@ spark-store (4.2.6.6) stable; urgency=medium + * 调整:文案修改:安装失败后引导查看详情而不是重新安装 * 修复:dpkg阻塞出现漏掉的安装失败,现在在安装后检测是否安装 * 修复:UOS专业版上安装成功仍然显示失败的问题:方式:忽略E:等消息,仅检查脚本报错 * 调整:卸载应用时采用autopurge以一并卸载依赖 - -- shenmo + -- shenmo Sun, 5 Mar 2022 11:45:14 +0800 + spark-store (4.2.6.5) stable; urgency=medium + * 调整:ssaudit安装结束时会提示安装结束 - -- shenmo + -- shenmo Sun, 5 Mar 2022 11:45:14 +0800 + spark-store (4.2.6.4) stable; urgency=medium + * 修复:关于页面的入口过时 - -- shenmo + -- shenmo Sun, 5 Mar 2022 11:45:14 +0800 spark-store (4.2.6.3) stable; urgency=medium + * 修复:部分下载统计线路失效 - -- shenmo - + -- shenmo Sun, 5 Mar 2022 11:45:14 +0800 spark-store (4.2.6.2) stable; urgency=medium + * 新增:支持arm架构搜索 - -- shenmo + -- shenmo Sun, 5 Mar 2022 11:45:14 +0800 spark-store (4.2.6.1) stable; urgency=medium + * 修复:mint下更新检测不正常 - -- shenmo + -- shenmo Sun, 5 Mar 2022 11:45:14 +0800 spark-store (4.2.6) stable; urgency=medium + * 修复:截图加载失败时点击闪退 - -- shenmo + -- shenmo Sun, 5 Mar 2022 11:45:14 +0800 spark-store (4.2.5.1) stable; urgency=medium + * 调整:重写了spark-dstore-patch,速度提升,尤其对机械硬盘下 * 调整:优化了aptss源文件同步策略 - -- shenmo + -- shenmo Sun, 5 Mar 2022 11:45:14 +0800 spark-store (4.2.5) stable; urgency=medium + * 修复:ssinstall在文件不存在时仍然报安装成功 * 修复:删除不再需要的依赖:libc6-dev * 在aarch64架构安装时也启用32位支持 - -- shenmo + -- shenmo Sun, 5 Mar 2022 11:45:14 +0800 + spark-store (4.2.4) stable; urgency=medium + * 修复:ssinstall校验失败的时候仍然提示安装成功 * 新增:ssinstall可以自动刷新ssupdate以防止仓库更新中导致的安装校验失败 * 修复:在不受支持的平台安装应用时弹出提示不正确 - -- shenmo + -- shenmo Sun, 5 Mar 2022 11:45:14 +0800 + spark-store (4.2.3.3) stable; urgency=medium + * aptss 不再使用bwrap,去除依赖,支持容器中启动 * aptss 支持非root模式启动 * aptss 添加transhell支持 @@ -74,27 +88,30 @@ spark-store (4.2.3.3) stable; urgency=medium * 4.3 roadmap 实现,在浏览不支持的应用时会出现提示 * 4.3 roadmap 实现,在下载文件夹没有读写权限时会出现提示 - -- shenmo + -- shenmo Sun, 5 Mar 2022 11:45:14 +0800 spark-store (4.2.3.2~Reason10) stable; urgency=medium + * 完成除web外大部分功能适配 * 修复依赖不完整的问题 - -- shenmo + -- shenmo Sun, 5 Mar 2022 11:45:14 +0800 spark-store (4.2.3.2~Reason9) stable; urgency=medium + * sender-d.sh * ssinstall和ssaudit的安装测试转到upgrade-worker - -- shenmo + -- shenmo Sun, 5 Mar 2022 11:45:14 +0800 spark-store (4.2.3.2~Reason8) stable; urgency=medium + * sender-d改用cpp重写,在aarch64上稳定运行 - -- shenmo + -- shenmo Sun, 5 Mar 2022 11:45:14 +0800 spark-store (4.2.3.2~Reason7) stable; urgency=medium @@ -103,36 +120,44 @@ spark-store (4.2.3.2~Reason7) stable; urgency=medium * ssinstall在发现无法安装后尝试先进行下aptss update * 修复:安装商店后首次启动无法安装任何软件 - -- shenmo + -- shenmo Sun, 5 Mar 2022 11:45:14 +0800 spark-store (4.2.3.2~Reason5) stable; urgency=medium + * aptss 不再使用bwrap,去除依赖,支持容器中启动 * aptss 支持非root模式启动 * aptss 添加transhell支持 * 关于界面自动获取分支名称 * 现在安装成功则自动删除安装包 - -- shenmo + -- shenmo Sun, 5 Mar 2022 11:45:14 +0800 + + spark-store (4.2.3.2~Reason3) stable; urgency=medium + * 现在可在x86上编译,使用同一套代码 * 暂时在aarch64上使用旧web----等待柚子 * 空间,疾疫,现在是静谧 -- shenmo Sun, 5 Mar 2022 11:45:14 +0800 + spark-store (4.2.3.2~only-for-test1) stable; urgency=medium + * 注意!!!!!! 此版本仅为启动测试,还需要进一步完善——hardcode需要改善——关于web界面的调用方式需要在柚子做好之后修改成新的 * fix: hardcode * fix: sender-d -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (4.2.3.1) stable; urgency=medium * 修复: ssinstall验证签名出错 -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (4.2.3) stable; urgency=medium * 修复: 编译依赖不全 * 修复: prerm导致的dpkg崩溃 @@ -142,12 +167,14 @@ spark-store (4.2.3) stable; urgency=medium -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (4.2.3~test4) stable; urgency=medium * 修复: aptss 无法安装 -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (4.2.3~test3) stable; urgency=medium * 调整:打包时从 debian/changelog 自动获取构建版本号并写入关于窗口保证与deb一致 @@ -159,6 +186,7 @@ spark-store (4.2.3~test3) stable; urgency=medium -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (4.2.3~test2) stable; urgency=medium * 调整:开启安装包加固 diff --git a/debian/spark-store.postinst b/debian/spark-store.postinst index ad43268..c44acc1 100755 --- a/debian/spark-store.postinst +++ b/debian/spark-store.postinst @@ -4,23 +4,23 @@ case "$1" in configure) case `arch` in - x86_64) - echo "Enabling i386 arch..." - dpkg --add-architecture i386 - ;; - aarch64) - echo "Enabling armhf arch..." - dpkg --add-architecture armhf - ;; - *) - echo "Unknown architecture, skip enable 32-bit arch" - ;; + x86_64) + echo "Enabling i386 arch..." + dpkg --add-architecture i386 + ;; + + aarch64) + echo "Enabling armhf arch..." + dpkg --add-architecture armhf + ;; + + *) + echo "Unknown architecture, skip enable 32-bit arch" + ;; esac - mkdir -p /var/lib/aptss/lists - # Remove the sources.list file rm -f /etc/apt/sources.list.d/sparkstore.list @@ -39,8 +39,6 @@ case "$1" in # Create symbol links for SSINSTALL ln -s -f /opt/durapps/spark-store/bin/auto-install-policy/store.spark-app.ssinstall.policy /usr/share/polkit-1/actions/store.spark-app.ssinstall.policy - - # Install key mkdir -p /tmp/spark-store-install/ cp -f /opt/durapps/spark-store/bin/spark-store.asc /tmp/spark-store-install/spark-store.asc @@ -52,8 +50,21 @@ case "$1" in #aptss ssupdate # Start upgrade detect service - systemctl enable spark-update-notifier - systemctl start spark-update-notifier + systemctl daemon-reload + # Do NOT enable upgrade detect service if disabled by user + if [ ! -f "/usr/lib/systemd/system/spark-update-notifier.service.bak" ] ; then + systemctl enable spark-update-notifier + systemctl start spark-update-notifier + else + if [ $(systemctl is-enabled spark-update-notifier.service) = "enabled" ] ; then + systemctl reenable spark-update-notifier + if [ $(systemctl is-active spark-update-notifier.service) = "active" ] ; then + systemctl restart spark-update-notifier + fi + fi + + rm -f /usr/lib/systemd/system/spark-update-notifier.service.bak + fi # Update certain caches update-icon-caches /usr/share/icons/hicolor || true diff --git a/debian/spark-store.prerm b/debian/spark-store.prerm index e6c39ca..42b4d8a 100755 --- a/debian/spark-store.prerm +++ b/debian/spark-store.prerm @@ -1,16 +1,20 @@ #!/bin/bash + function notify-send() { - #Detect the user using such display + # Detect the user using such display local user=$(who | awk '{print $1}' | head -n 1) - #Detect the id of the user + # Detect the id of the user local uid=$(id -u $user) - sudo -u $user DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$uid/bus notify-send "$@" + sudo -u $user DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$uid/bus notify-send "$@" } -if [ "$1" = "remove" ] || [ "$1" = "purge" ] ; then +if [ "$1" = "remove" -o "$1" = "purge" ] ; then + echo "$1" + echo "卸载操作,进行配置清理" + # Remove residual symbol links rm -f /usr/local/bin/spark-store rm -f /usr/local/bin/ssinstall @@ -22,8 +26,6 @@ if [ "$1" = "remove" ] || [ "$1" = "purge" ] ; then rm -rf /etc/aptss/ rm -rf /var/lib/aptss/ - - # Remove residual symbol links to stop upgrade detect rm -f /etc/xdg/autostart/spark-update-notifier.desktop @@ -39,13 +41,26 @@ if [ "$1" = "remove" ] || [ "$1" = "purge" ] ; then rm -f /etc/apt/trusted.gpg.d/spark-store.gpg apt-key del '9D9A A859 F750 24B1 A1EC E16E 0E41 D354 A29A 440C' else - echo "非卸载操作,不进行配置清理" - if [ ! -z "`pidof spark-store`" ];then - echo "关闭已有 spark-store.." - notify-send "正在升级星火商店" "请在升级结束后重启星火商店" -i spark-store - killall spark-store - else - echo "继续安装 spark-store.." + if [ ! -z "`pidof spark-store`" ] ; then + echo "关闭已有 spark-store.." + notify-send "正在升级星火商店" "请在升级结束后重启星火商店" -i spark-store + killall spark-store + fi +fi + +if [ "$1" = "upgrade" ] ; then + echo "非卸载操作,不进行配置清理" + + if [ -f "/usr/lib/systemd/system/spark-update-notifier.service" ] ; then + mv -f /usr/lib/systemd/system/spark-update-notifier.service /usr/lib/systemd/system/spark-update-notifier.service.bak + fi + + if [ ! -z "`pidof spark-store`" ] ; then + echo "关闭已有 spark-store..." + notify-send "正在升级星火商店" "请在升级结束后重启星火商店" -i spark-store + killall spark-store + else + echo "继续安装 spark-store..." fi fi