diff --git a/.gitee/callback.py b/.gitee/callback.py index b52d702..6abf80e 100644 --- a/.gitee/callback.py +++ b/.gitee/callback.py @@ -7,7 +7,7 @@ import json sha = os.getenv("GIT_COMMIT") # sha = '48fed26c51a8c42554e45f72f43e49703e04c97f' #get sha from environment -url = "https://gitee.com/api/v5/repos/deepin-community-store/spark-store/commits/{}/comments".format(sha) +url = "https://gitee.com/api/v5/repos/spark-store-project/spark-store/commits/{}/comments".format(sha) token = os.getenv("gitee_token") diff --git a/.workflow/pipeline-dtk-build-aarch64.yml b/.workflow/pipeline-dtk-build-aarch64.yml index 77495d2..1f25618 100644 --- a/.workflow/pipeline-dtk-build-aarch64.yml +++ b/.workflow/pipeline-dtk-build-aarch64.yml @@ -34,7 +34,7 @@ stages: - tar -xf DEBIANARM.tar.xz - mkdir -p DEBIAN/root/build-spark - mv ../spark-store-git DEBIAN/root/build-spark/spark-store - - wget https://gitee.com/deepin-community-store/repo_auto_update_script/raw/master/spark-build-aarch64.sh && mv spark-build-aarch64.sh DEBIAN/root + - wget https://gitee.com/spark-store-project/repo_auto_update_script/raw/master/spark-build-aarch64.sh && mv spark-build-aarch64.sh DEBIAN/root - mv /usr/bin/qemu-aarch64-static DEBIAN/ - chroot DEBIAN /qemu-aarch64-static /bin/bash /root/spark-build-aarch64.sh - '' diff --git a/DOCS/json-api-doc.md b/DOCS/json-api-doc.md index 859132d..5af00c2 100644 --- a/DOCS/json-api-doc.md +++ b/DOCS/json-api-doc.md @@ -30,7 +30,7 @@ `{SOURCE_URL}/{ARCH}/{CATOGARY}/applist.json` 说明:SOURCE_URL:线路链接,目前推荐 https://cdn.d.store.deepinos.org.cn,你也可以使用其他的星火线路 ARCH:架构文件夹 x86是store或amd64-store,arm是aarch64-store。特别的,如果你使用非https://cdn.d.store.deepinos.org.cn的线路,你可能会发现amd64-store会返回404,因为不是所有的服务器都支持软连接 -CATOGARY:分类目录。参考 https://gitee.com/deepin-community-store/spark-store/blob/dev/DOCS/spk-doc.md 中 store 直达的对应关系 +CATOGARY:分类目录。参考 https://gitee.com/spark-store-project/spark-store/blob/dev/DOCS/spk-doc.md 中 store 直达的对应关系 例子:https://cdn.d.store.deepinos.org.cn/aarch64-store/tools/applist.json diff --git a/DOCS/内网部署.md b/DOCS/内网部署.md index 1686d3d..7fa01ec 100644 --- a/DOCS/内网部署.md +++ b/DOCS/内网部署.md @@ -4,4 +4,4 @@ 为方便使用(其实是早期屎山使然),请将仓库放置于 `/home/ftp/spark-store` -仓库管理相关代码请移步 [这里](https://gitee.com/deepin-community-store/repo_auto_update_script),update.sh请联系 @shenmo 获取 \ No newline at end of file +仓库管理相关代码请移步 [这里](https://gitee.com/spark-store-project/repo_auto_update_script),update.sh请联系 @shenmo 获取 \ No newline at end of file diff --git a/FAQ.md b/FAQ.md index 3ec114b..8eb13a8 100644 --- a/FAQ.md +++ b/FAQ.md @@ -8,7 +8,7 @@ The Spark App Store is an application store aimed at Linux users and supports mu ### Communication and Feedback **Q: Where can I join the community group?** -**A:** You can click [here](https://www.deepinos.org/) to enter the main communication platform of the Spark Store. +**A:** You can click [here](https://bbs.spark-app.store/) to enter the main communication platform of the Spark Store. > ⚠️ If the above link doesn't work, you can also join our QQ groups as an alternative. The group numbers are 872690351 and 865927727. We also offer forums for communication. #### Differences Between arm64 and amd64 @@ -79,12 +79,12 @@ Linux: ### Reporting Issues and Removing Apps **Q: Some apps are outdated or inactive, and I want them removed** -**A:** You can report issues [here](https://gitee.com/deepin-community-store/software_-issue). +**A:** You can report issues [here](https://gitee.com/spark-store-project/software_-issue). --- ### Installing Spark App Store -If you wish to install the Spark App Store, please visit the [Release page](https://gitee.com/deepin-community-store/spark-store/releases), find the latest version, and choose the package suitable for your current system. +If you wish to install the Spark App Store, please visit the [Release page](https://gitee.com/spark-store-project/spark-store/releases), find the latest version, and choose the package suitable for your current system. > ⚠️ Special Note: If you are using Debian10/Debian11 or Ubuntu 20.04, you may need to download additional dependency packages. After downloading, unzip multiple times until you see the software user guide. For operating systems later than Ubuntu 22.04, you do not need to install dependency packages. Just follow the steps above to install the main program directly. diff --git a/FAQ.zh.md b/FAQ.zh.md index 0a91f2d..1c45e07 100644 --- a/FAQ.zh.md +++ b/FAQ.zh.md @@ -8,7 +8,7 @@ ### 交流与反馈 **Q: 在哪进交流群?** -**A:** 你可以点击[这里](https://www.deepinos.org/)进入星火商店的主交流平台。 +**A:** 你可以点击[这里](https://bbs.spark-app.store/)进入星火商店的主交流平台。 > ⚠️ 如果上面的链接无法使用,你还可以加入我们的 QQ 群作为备选方案,群号是 872690351 和 865927727。我们还提供论坛作为交流平台。 arm64与amd64的区别 @@ -78,12 +78,12 @@ Linux: ### 报告问题和应用下架 **Q: 有些应用已经过时或者失效了,我想让他下架** -**A:** 你可以前往 [这里](https://gitee.com/deepin-community-store/software_-issue) 报告问题。 +**A:** 你可以前往 [这里](https://gitee.com/spark-store-project/software_-issue) 报告问题。 --- ### 安装星火应用商店 -如果你想安装星火应用商店,请打开[Release页面](https://gitee.com/deepin-community-store/spark-store/releases),找到最新版本,并选择适用于当前系统的安装包下载。 +如果你想安装星火应用商店,请打开[Release页面](https://gitee.com/spark-store-project/spark-store/releases),找到最新版本,并选择适用于当前系统的安装包下载。 > ⚠️ 特别提示: 如果你在使用 Debian10/Debian11 或 Ubuntu 20.04,你可能额外下载依赖补充包。您需要在下载完依赖包后,解压多次一直到看到内部的软件使用说明,对于 Ubuntu22.04 以后的操作系统版本,您无需安装依赖包,您需要按照上面的操作直接安装本体程序。 diff --git a/debian/changelog b/debian/changelog index 836aa31..d01ac56 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,10 @@ -spark-store (4.5.1) UNRELEASED; urgency=medium +spark-store (4.5.2) UNRELEASED; urgency=medium + + * 支持安装到 ACE Bookworm + + -- shenmo Tue, 24 Sep 2024 11:27:08 +0800 + + spark-store (4.5.1) UNRELEASED; urgency=medium * 修复 aptss 部分报错 * 重新设计了 Tag 区的展示方式 @@ -200,7 +206,7 @@ spark-store (4.2.7.3) stable; urgency=medium * 修复:aptss现在会正确地透传错误码而不是exit 0 * 修复:下载时如果卡0%(无法下载metalink),会在超时后报错中断而不是一直傻等 - * 修复:排队下载时CPU占满单核的bug https://gitee.com/deepin-community-store/spark-store/issues/I7B91V + * 修复:排队下载时CPU占满单核的bug https://gitee.com/spark-store-project/spark-store/issues/I7B91V * 修复:在终端中打开的icon过大导致无法投稿到UOS * 修复:v23下编译出错 * 薪怎:支持崩溃日志收集系统 @@ -437,7 +443,7 @@ spark-store (4.2.3~test2) stable; urgency=medium spark-store (4.2.3~test1) stable; urgency=medium * 修复:因判断安装状态错误创建多个相同任务的bug - * 测试中:尝试修复安装结束的闪退问题 https://gitee.com/deepin-community-store/spark-store/commit/cb093dcc2bb0a193db89aa0ce5f20ea9cc5d56eb + * 测试中:尝试修复安装结束的闪退问题 https://gitee.com/spark-store-project/spark-store/commit/cb093dcc2bb0a193db89aa0ce5f20ea9cc5d56eb * 修复:Deepin 显示开发者模式未开启 * 修复:从托盘打开主窗口时透明度动画不流畅 * 修复:主窗口关闭后,从托盘打开关于窗口会被主窗口遮挡 @@ -519,8 +525,8 @@ spark-store (4.1.2) stable; urgency=medium * chore: 去除安装依赖:g++ * fix: 修复下载列表中进度提示文字显示不完整的问题 * feat: ssinstall支持从单独文件夹中校验软件包 - * feat: 支持分单文件夹下载。具体内容参见:https://gitee.com/deepin-community-store/repo_auto_update_script/blob/master/mirror-list-for-apt-fast/sources.list.d/sparkstore.list - * info: 非常感谢 @jwyh 对星火商店代码仓库设计了很多标准,参见 https://deepin-community-store.gitee.io/spark-wiki/#/Dev/Spark-Store-Git-Repo?id=%e6%9b%b4%e6%96%b0%e6%97%a5%e5%bf%97%e8%a7%84%e5%88%99 ,不过shenmo是自由的 + * feat: 支持分单文件夹下载。具体内容参见:https://gitee.com/spark-store-project/repo_auto_update_script/blob/master/mirror-list-for-apt-fast/sources.list.d/sparkstore.list + * info: 非常感谢 @jwyh 对星火商店代码仓库设计了很多标准,参见 https://wiki.spark-app.store/#/Dev/Spark-Store-Git-Repo?id=%e6%9b%b4%e6%96%b0%e6%97%a5%e5%bf%97%e8%a7%84%e5%88%99 ,不过shenmo是自由的 * chore: 添加 Application 类,继承 DApplication,将 main 函数中设置属性、关于信息等操作移至 Application 构造函数中进行 @@ -539,8 +545,8 @@ spark-store (4.1.2) stable; urgency=medium spark-store (4.1.2~test2) stable; urgency=medium * feat: ssinstall支持从单独文件夹中校验软件包 - * feat: 支持分单文件夹下载。具体内容参见:https://gitee.com/deepin-community-store/repo_auto_update_script/blob/master/mirror-list-for-apt-fast/sources.list.d/sparkstore.list - * info: 非常感谢 @jwyh 对星火商店代码仓库设计了很多标准,参见 https://deepin-community-store.gitee.io/spark-wiki/#/Dev/Spark-Store-Git-Repo ,不过shenmo是自由的 + * feat: 支持分单文件夹下载。具体内容参见:https://gitee.com/spark-store-project/repo_auto_update_script/blob/master/mirror-list-for-apt-fast/sources.list.d/sparkstore.list + * info: 非常感谢 @jwyh 对星火商店代码仓库设计了很多标准,参见 https://wiki.spark-app.store/#/Dev/Spark-Store-Git-Repo ,不过shenmo是自由的 -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 @@ -751,7 +757,7 @@ spark-store (3.2.4) stable; urgency=medium spark-store (3.2.4~test4) stable; urgency=medium - * 现在在商店启动后点击spk链接仍会正常启动 https://gitee.com/deepin-community-store/spark-store/commit/dd6780d636042bf12d77414e6f1552cc7d1ed24c + * 现在在商店启动后点击spk链接仍会正常启动 https://gitee.com/spark-store-project/spark-store/commit/dd6780d636042bf12d77414e6f1552cc7d1ed24c -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 diff --git a/debian/copyright b/debian/copyright index e212ce7..ac61728 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,6 +1,6 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: spark-store -Source: https://gitee.com/deepin-community-store/spark-store +Source: https://gitee.com/spark-store-project/spark-store Files: * Copyright: The Spark Project Developers diff --git a/patchs/README.md b/patchs/README.md index 2020a5c..f62895d 100644 --- a/patchs/README.md +++ b/patchs/README.md @@ -5,7 +5,7 @@ > 用于 zinface-community-cmake-build-system.patch 补丁化构建方式 ```shell - git clone https://gitee.com/deepin-community-store/spark-store + git clone https://gitee.com/spark-store-project/spark-store cd spark-store git am < patchs/zinface-community-cmake-build-system.patch make package diff --git a/src/assets/assets.qrc b/src/assets/assets.qrc index f2f5df4..348edce 100644 --- a/src/assets/assets.qrc +++ b/src/assets/assets.qrc @@ -45,24 +45,33 @@ icon/light/update.svg icon/logo.svg json/features.json - tags/a2d-small.png + tags/a2d_full.svg tags/a2d.png - tags/community-small.png + tags/a2d.svg + tags/community_full.svg tags/community.png tags/community.svg - tags/deepin-small.png + tags/debian_full.svg + tags/debian.png + tags/debian.svg + tags/deepin_full.svg + tags/deepin.png tags/deepin.svg - tags/dtk-small.png - tags/dwine2-small.png - tags/dwine5-small.png + tags/dtk_full.svg + tags/dtk.png + tags/dtk.svg + tags/dwine2_full.svg + tags/dwine2.png + tags/dwine2.svg + tags/dwine5_full.svg + tags/dwine5.png tags/dwine5.svg - tags/logo_icon.svg - tags/ubuntu-small.png + tags/ubuntu_full.svg tags/ubuntu.png - tags/uos-authorize.svg - tags/uos-small.png + tags/ubuntu.svg + tags/uos_full.svg + tags/uos.png tags/uos.svg translations/qtwebengine_zh.qm - tags/debian.svg diff --git a/src/assets/json/features.json b/src/assets/json/features.json index c771916..8c7772b 100644 --- a/src/assets/json/features.json +++ b/src/assets/json/features.json @@ -20,6 +20,6 @@ "description": "Fix 1 detailed description..." } ], - "linkUrl": "https://gitee.com/deepin-community-store/spark-store/releases/", + "linkUrl": "https://gitee.com/spark-store-project/spark-store/releases/", "linkButtonVisible": true } diff --git a/src/assets/tags/a2d-small.png b/src/assets/tags/a2d-small.png deleted file mode 100644 index e0bf6d0..0000000 Binary files a/src/assets/tags/a2d-small.png and /dev/null differ diff --git a/src/assets/tags/community-small.png b/src/assets/tags/community-small.png deleted file mode 100644 index 6250da5..0000000 Binary files a/src/assets/tags/community-small.png and /dev/null differ diff --git a/src/assets/tags/debian-small.png b/src/assets/tags/debian-small.png deleted file mode 100644 index 955942d..0000000 Binary files a/src/assets/tags/debian-small.png and /dev/null differ diff --git a/src/assets/tags/deepin-small.png b/src/assets/tags/deepin-small.png deleted file mode 100644 index e192bf9..0000000 Binary files a/src/assets/tags/deepin-small.png and /dev/null differ diff --git a/src/assets/tags/dtk-small.png b/src/assets/tags/dtk-small.png deleted file mode 100644 index dc83133..0000000 Binary files a/src/assets/tags/dtk-small.png and /dev/null differ diff --git a/src/assets/tags/dwine2-small.png b/src/assets/tags/dwine2-small.png deleted file mode 100644 index fddaf72..0000000 Binary files a/src/assets/tags/dwine2-small.png and /dev/null differ diff --git a/src/assets/tags/dwine5-small.png b/src/assets/tags/dwine5-small.png deleted file mode 100644 index d1fc71b..0000000 Binary files a/src/assets/tags/dwine5-small.png and /dev/null differ diff --git a/src/assets/tags/logo_icon.svg b/src/assets/tags/logo_icon.svg deleted file mode 100644 index 215d31a..0000000 --- a/src/assets/tags/logo_icon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/tags/ubuntu-small.png b/src/assets/tags/ubuntu-small.png deleted file mode 100644 index ac173fe..0000000 Binary files a/src/assets/tags/ubuntu-small.png and /dev/null differ diff --git a/src/assets/tags/uos-authorize.svg b/src/assets/tags/uos-authorize.svg deleted file mode 100644 index 0636fe9..0000000 --- a/src/assets/tags/uos-authorize.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/tags/uos-small.png b/src/assets/tags/uos-small.png deleted file mode 100644 index be8add4..0000000 Binary files a/src/assets/tags/uos-small.png and /dev/null differ diff --git a/src/pages/appintopage.cpp b/src/pages/appintopage.cpp index 8152db4..4e22bd8 100644 --- a/src/pages/appintopage.cpp +++ b/src/pages/appintopage.cpp @@ -562,7 +562,7 @@ void AppIntoPage::on_pushButton_3_clicked() ui->pushButton_3->setEnabled(false); QProcess uninstall; - uninstall.start("pkexec", QStringList() << "apt" << "autopurge" << "-y" << info["Pkgname"].toString().toLower()); + uninstall.start("pkexec", QStringList() << "/opt/durapps/spark-store/bin/store-helper/uninstaller" << info["Pkgname"].toString().toLower()); uninstall.waitForFinished(-1); uninstall.close(); @@ -595,16 +595,6 @@ void AppIntoPage::on_shareButton_clicked() void AppIntoPage::on_updateButton_clicked() { - QString feedbackSpk = "spk://store/chat/store.spark-app.feedback"; - QFileInfo actionSubmissionClientStatus("/opt/durapps/store.spark-app.feedback"); - if (actionSubmissionClientStatus.exists() && actionSubmissionClientStatus.isDir()) - { - qDebug() << "反馈器存在"; - QProcess::startDetached("sh", QStringList() << "/opt/durapps/store.spark-app.feedback/launch.sh"); - } - else - { - qDebug() << "反馈器不存在,跳转页面"; - openUrl(feedbackSpk); - } -} + QString feedbackURL = "https://bbs.spark-app.store/"; + QProcess::startDetached("xdg-open", QStringList{feedbackURL}); +} \ No newline at end of file diff --git a/src/pages/appintopage.ui b/src/pages/appintopage.ui index 3977dc7..7492a61 100644 --- a/src/pages/appintopage.ui +++ b/src/pages/appintopage.ui @@ -363,6 +363,19 @@ + + + + Qt::Vertical + + + + 20 + 40 + + + + @@ -383,7 +396,7 @@ 40 - 16777215 + 40 @@ -392,8 +405,8 @@ <html><head/><body><p>Capable to Ubuntu 22.04</p></body></html> - - <html><head/><body><p><img src=":/tags/ubuntu.png" height=40 width=40 /></p></body></html> + + :/tags/ubuntu.png @@ -402,7 +415,7 @@ 40 - 16777215 + 40 @@ -411,8 +424,8 @@ <html><head/><body><p>Capable to UOS home 20</p></body></html> - - <html><head/><body><p><img src=":/tags/uos-authorize.svg" height=40 width=40 /></p></body></html> + + :/tags/uos.png @@ -421,7 +434,7 @@ 40 - 16777215 + 40 @@ -430,21 +443,27 @@ <html><head/><body><p>Capable to deepin 23</p></body></html> - - <html><head/><body><p><img src=":/tags/deepin.svg" height=40 width=40 /></p></body></html> + + :/tags/deepin.png + + + 40 + 40 + + <html><head/><body><p>Capable to Debian Stable</p></body></html> <html><head/><body><p>Capable to Debian Stable</p></body></html> - - <html><head/><body><p><img src=":/tags/debian.svg" height=40 width=40 /></p></body></html> + + :/tags/debian.png @@ -463,22 +482,6 @@ - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 20 - 20 - - - - @@ -499,7 +502,7 @@ 40 - 16777215 + 40 @@ -508,8 +511,8 @@ <html><head/><body><p>An Appimage to deb app.</p></body></html> - - <html><head/><body><p><img src=":/tags/a2d.png"height=40 width=40 /></p></body></html> + + :/tags/a2d.png @@ -518,7 +521,7 @@ 40 - 16777215 + 40 @@ -527,8 +530,8 @@ <html><head/><body><p>This app is developed by community user,we give this tag to honor those who contribute to the Linux Ecology</p></body></html> - - <html><head/><body><p><img src=":/tags/community.svg" height=40 width=40 /></p></body></html> + + :/tags/community.png @@ -537,7 +540,7 @@ 40 - 16777215 + 40 @@ -546,8 +549,8 @@ <html><head/><body><p>This is a DTK5 app,which means it would have better effect on Deepin Desktop Environment</p></body></html> - - <html><head/><body><p><img src=":/tags/logo_icon.svg" height=40 width=40 /></p></body></html> + + :/tags/dtk.png @@ -556,7 +559,7 @@ 40 - 16777215 + 40 @@ -565,8 +568,8 @@ <html><head/><body><p>A deepin-wine2 app. Spark Store will automatically configure the wine kit for you.</p></body></html> - - <html><head/><body><p><img src=":/tags/dwine2-small.png" height=40 width=40 ></p></body></html> + + :/tags/dwine2.png @@ -575,7 +578,7 @@ 40 - 16777215 + 40 @@ -584,8 +587,8 @@ <html><head/><body><p>A Wine app.Spark Store will automatically configure the wine kit for you</p></body></html> - - <html><head/><body><p><img src=":/tags/dwine5.svg" height=40 width=40 /></p></body></html> + + :/tags/dwine5.png @@ -1449,6 +1452,8 @@ QListWidget::item::selected - + + + diff --git a/tool/ssaudit b/tool/ssaudit index 711fd4e..06897c9 100755 --- a/tool/ssaudit +++ b/tool/ssaudit @@ -4,6 +4,7 @@ source /opt/durapps/spark-store/bin/bashimport/transhell.amber load_transhell_debug export DEBIAN_FRONTEND=noninteractive +trap 'unlock_file $DEBPATH' EXIT case $(arch) in x86_64) STORE_URL="store" @@ -11,9 +12,13 @@ case $(arch) in aarch64) STORE_URL="aarch64-store" ;; + loongarch64) + STORE_URL="loong64-store" + STORE_LIST_URL="-loong64" + ;; esac -echo "Spark Store Install script. 星火商店审核脚本" +echo "Spark Store Audit script. 星火商店审核脚本" function pkexec_as_current_user() { local user=$(who | awk '{print $1}' | head -n 1) @@ -47,6 +52,7 @@ function exec_create_desktop_file() { } + function zenity() { local user=$(who | awk '{print $1}' | head -n 1) local uid=$(id -u "$user") @@ -54,19 +60,19 @@ function zenity() { } function hash_check() { - if [ ! -e "/var/lib/aptss/lists/cdn.d.store.deepinos.org.cn_${STORE_URL}_Packages" ] && \ + if [ ! -e "/var/lib/aptss/lists/d.spark-app.store_${STORE_URL}_Packages" ] && \ [ ! -e "/var/lib/aptss/lists/d.store.deepinos.org.cn_${STORE_URL}_Packages" ] && \ - [ ! -e "/var/lib/aptss/lists/mirrors.sdu.edu.cn_spark-store-repository_${STORE_URL}_Packages" ]; then + [ ! -e "/var/lib/aptss/lists/mirrors.sdu.edu.cn_spark-store_${STORE_URL}_Packages" ]; then echo "接收星火仓库软件信息中..." aptss ssupdate fi - if [ -e "/var/lib/aptss/lists/cdn.d.store.deepinos.org.cn_${STORE_URL}_Packages" ]; then - PACKAGES_DATA_PATH="/var/lib/aptss/lists/cdn.d.store.deepinos.org.cn_${STORE_URL}_Packages" - echo "星火仓库的Packages位置为 $PACKAGES_DATA_PATH,是星火域名单目录仓库配置" + if [ -e "/var/lib/aptss/lists/d.spark-app.store_${STORE_URL}_Packages" ]; then + PACKAGES_DATA_PATH="/var/lib/aptss/lists/d.spark-app.store_${STORE_URL}_Packages" + echo "星火仓库的Packages位置为 $PACKAGES_DATA_PATH,是星火域名仓库配置" elif [ -e "/var/lib/aptss/lists/d.store.deepinos.org.cn_${STORE_URL}_Packages" ]; then PACKAGES_DATA_PATH="/var/lib/aptss/lists/d.store.deepinos.org.cn_${STORE_URL}_Packages" - echo "星火仓库的Packages位置为 $PACKAGES_DATA_PATH,是星火域名单目录仓库配置" + echo "星火仓库的Packages位置为 $PACKAGES_DATA_PATH,是d域名单目录仓库配置" else PACKAGES_DATA_PATH="/var/lib/aptss/lists/mirrors.sdu.edu.cn_spark-store-repository_${STORE_URL}_Packages" echo "星火仓库的Packages位置为 $PACKAGES_DATA_PATH,是SDU镜像仓库配置" @@ -76,11 +82,47 @@ function hash_check() { echo "Running Spark Package Verify..." DEB_SHA512SUM=$(sha512sum "$1" | cut -d ' ' -f 1) + unset IS_SHA512SUM_CHECKED IS_SHA512SUM_CHECKED=$(cat "$PACKAGES_DATA_PATH" | grep "$DEB_SHA512SUM") } +function lock_file(){ +chattr +i "$1" +} +function unlock_file(){ +chattr -i "$1" +} +function ensure_aptss_exist(){ + + if command -v aptss &>/dev/null; then + aptss update + else + local deb_file="/tmp/spark-store-console-in-container_latest_all.deb" + + # Download package + if ! wget -O "$deb_file" "https://amber-ce-resource.spark-app.store/store/depends/spark-store-console-in-container_latest_all.deb"; then + echo "下载 .deb 安装包失败" >&2 + return 1 + fi + + # Install package + if ! apt install -y "$deb_file"; then + echo "安装 .deb 包失败" >&2 + rm -f "$deb_file" + return 1 + fi + rm -f "$deb_file" + + # Verify installation + if ! command -v aptss &>/dev/null; then + echo "成功安装但未找到 aptss 命令" >&2 + return 1 + fi + fi +} +export -f ensure_aptss_exist #################################### if [ $# -eq 0 ]; then @@ -90,11 +132,7 @@ if [ $# -eq 0 ]; then exit fi -if [ ! -f "$1" ]; then - echo "${TRANSHELL_CONTENT_FILE_NOT_EXIST}" - echo "OMG-IT-GOES-WRONG" - exit 1 -fi + if [ "$(id -u)" != "0" ]; then echo "${TRANSHELL_CONTENT_PLEASE_RUN_AS_ROOT}" @@ -102,28 +140,80 @@ if [ "$(id -u)" != "0" ]; then exit 1 fi -DEBPATH=$(realpath "$1") +if [ ! -f "$1" ]; then + echo "${TRANSHELL_CONTENT_FILE_NOT_EXIST},Trying to redownload" + FILEPATH=$(dirname "$1") + FILENAME=$(basename "$1") + PACKAGE_NAME=$(echo "$FILENAME" | sed -r 's/^([^_]+)_.*$/\1/') + VERSION=$(echo "$FILENAME" | sed -r 's/^[^_]+_([^_]+)_.*$/\1/') + pushd ${FILEPATH} + aptss download ${PACKAGE_NAME} + popd + if [ ! -f "$1" ]; then + echo "OMG-IT-GOES-WRONG" + exit 1 + else + DEBPATH=$(realpath "$1") + fi + else + DEBPATH=$(realpath "$1") +fi +lock_file "$DEBPATH" +IS_SHA512SUM_CHECKED=skipped +if [ ! -z "$IS_SHA512SUM_CHECKED" ]; then + echo "校验跳过,开始安装" + echo "----------------------------------------------------------------------------------" package_name=$(dpkg-deb -f "$DEBPATH" Package) echo "Package name is $package_name" - try_run_output=$(/opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh test-install-app "$DEBPATH") try_run_ret="$?" +# 安装失败后进行 aptss update 刷新,随后尝试安装 if [ "$try_run_ret" -ne 0 ]; then aptss update try_run_output=$(/opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh test-install-app "$DEBPATH") try_run_ret="$?" fi + + if [ "$try_run_ret" -ne 0 ]; then - if [ "$try_run_ret" -ne 0 ]; then - echo "OMG-IT-GOES-WRONG" - echo -e "${try_run_output}" - exit "$try_run_ret" + if [[ "$IS_ACE_ENV" == "" ]];then ## 如果已经在ACE里面则不进入分支 + if command -v bookworm-run ;then + echo "----------------------------------------" + echo "Attention: USING ACE BOOKWORM TO INSTALL" + echo "----------------------------------------" + bookworm-run ensure_aptss_exist + try_run_output=$(bookworm-run aptss install --dry-run "$DEBPATH") + try_run_ret="$?" + if [ "$try_run_ret" -ne 0 ]; then + bookworm-run aptss update + try_run_output=$(bookworm-run aptss install --dry-run "$DEBPATH") + try_run_ret="$?" + fi + if [ "$try_run_ret" -ne 0 ]; then + echo "OMG-IT-GOES-WRONG" + echo -e "${try_run_output}" + echo "----------------------------------------" + echo "Attention: USING ACE BOOKWORM TO INSTALL" + echo "----------------------------------------" + exit "$try_run_ret" + fi + bookworm-run dpkg -i "$DEBPATH" || aptss install "$DEBPATH" -yf + fi + + else + + echo "OMG-IT-GOES-WRONG" + echo -e "${try_run_output}" + exit "$try_run_ret" + fi + else + + dpkg -i "$DEBPATH" || aptss install "$DEBPATH" -yf fi - - dpkg -i "$DEBPATH" || aptss install "$DEBPATH" -yf +### 退出阶段 if [ "$?" = "0" ] && [ "$2" = "--delete-after-install" ]; then if dpkg -s "$package_name" >/dev/null 2>&1; then @@ -147,3 +237,4 @@ DEBPATH=$(realpath "$1") echo "OMG-IT-GOES-WRONG" fi fi +fi diff --git a/tool/ssinstall b/tool/ssinstall index 45fcc1e..2efbc87 100755 --- a/tool/ssinstall +++ b/tool/ssinstall @@ -1,6 +1,7 @@ #!/bin/bash source /opt/durapps/spark-store/bin/bashimport/transhell.amber + load_transhell_debug export DEBIAN_FRONTEND=noninteractive @@ -94,6 +95,35 @@ function unlock_file(){ chattr -i "$1" } +function ensure_aptss_exist(){ + + if command -v aptss &>/dev/null; then + aptss update + else + local deb_file="/tmp/spark-store-console-in-container_latest_all.deb" + + # Download package + if ! wget -O "$deb_file" "https://amber-ce-resource.spark-app.store/store/depends/spark-store-console-in-container_latest_all.deb"; then + echo "下载 .deb 安装包失败" >&2 + return 1 + fi + + # Install package + if ! apt install -y "$deb_file"; then + echo "安装 .deb 包失败" >&2 + rm -f "$deb_file" + return 1 + fi + rm -f "$deb_file" + + # Verify installation + if ! command -v aptss &>/dev/null; then + echo "成功安装但未找到 aptss 命令" >&2 + return 1 + fi + fi +} +export -f ensure_aptss_exist #################################### if [ $# -eq 0 ]; then @@ -153,22 +183,52 @@ if [ ! -z "$IS_SHA512SUM_CHECKED" ]; then echo "Package name is $package_name" try_run_output=$(/opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh test-install-app "$DEBPATH") try_run_ret="$?" - +# 安装失败后进行 aptss update 刷新,随后尝试在主机安装 if [ "$try_run_ret" -ne 0 ]; then aptss update try_run_output=$(/opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh test-install-app "$DEBPATH") try_run_ret="$?" fi - if [ "$try_run_ret" -ne 0 ]; then - echo "OMG-IT-GOES-WRONG" - echo -e "${try_run_output}" - exit "$try_run_ret" - fi + if [ "$try_run_ret" -ne 0 ]; then ## 若安装检测仍然失败 + + if [[ "$IS_ACE_ENV" == "" ]];then ## 如果已经在ACE里面则不进入分支 + + if command -v bookworm-run ;then ## 如果 bookworm-run 可用则进行安装 + echo "----------------------------------------" + echo "Attention: USING ACE BOOKWORM TO INSTALL" + echo "----------------------------------------" + bookworm-run ensure_aptss_exist + try_run_output=$(bookworm-run aptss install --dry-run "$DEBPATH") + try_run_ret="$?" + if [ "$try_run_ret" -ne 0 ]; then + bookworm-run aptss update + try_run_output=$(bookworm-run aptss install --dry-run "$DEBPATH") + try_run_ret="$?" + fi + if [ "$try_run_ret" -ne 0 ]; then + echo "OMG-IT-GOES-WRONG" + echo -e "${try_run_output}" + echo "----------------------------------------" + echo "Attention: USING ACE BOOKWORM TO INSTALL" + echo "----------------------------------------" + exit "$try_run_ret" + fi + bookworm-run dpkg -i "$DEBPATH" || aptss install "$DEBPATH" -yf + fi + + else # 如果在主机安装失败且未安装ACE,报错退出并推荐安装 ACE + + echo "OMG-IT-GOES-WRONG" + echo -e "${try_run_output}" + echo "您可在商店安装 ACE Bookworm 兼容环境后重试安装" + exit "$try_run_ret" + fi + else ## 如果主机安装检测成功了,进入主机安装分支 dpkg -i "$DEBPATH" || aptss install "$DEBPATH" -yf - -unlock_file "$DEBPATH" + fi +### 退出阶段 if [ "$?" = "0" ] && [ "$2" = "--delete-after-install" ]; then if dpkg -s "$package_name" >/dev/null 2>&1; then diff --git a/tool/store-helper/check-is-installed b/tool/store-helper/check-is-installed index febb4ce..ef4d447 100755 --- a/tool/store-helper/check-is-installed +++ b/tool/store-helper/check-is-installed @@ -1,2 +1,10 @@ #!/bin/bash dpkg -l | grep "^ii $1 " > /dev/null +RET="$?" +if [[ "$RET" != "0" ]] && command -v bookworm-run > /dev/null;then + echo "Try ACE Bookworm" + bookworm-run dpkg -l | grep "^ii $1 " > /dev/null + RET="$?" + exit "$RET" +fi +exit "$RET" diff --git a/tool/store-helper/uninstaller b/tool/store-helper/uninstaller new file mode 100755 index 0000000..86cee57 --- /dev/null +++ b/tool/store-helper/uninstaller @@ -0,0 +1,14 @@ +#!/bin/bash +dpkg -l | grep "^ii $1 " > /dev/null +RET="$?" +if [[ "$RET" == "0" ]] ;then +apt autopurge $1 -y +else + +if command -v bookworm-run > /dev/null;then + echo "Try ACE Bookworm" + bookworm-run apt autopurge $1 -y + +fi +fi +exit "$RET"