From 440b7ea88db436d707e46bea4571840e7c4215dc Mon Sep 17 00:00:00 2001 From: shenmo Date: Fri, 6 Jan 2023 09:49:41 +0000 Subject: [PATCH 01/19] update debian/changelog. Signed-off-by: shenmo --- debian/changelog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/debian/changelog b/debian/changelog index 8b93b8b..7937ac7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ spark-store (4.1.2) stable; urgency=medium * feat: 初步的wayland支持 + * feat: UOS下检测开发者模式是否开启,若未开启则拒绝安装 * fix: 首页的捐赠页面在中文环境下显示中文 * fix: 更新检测模块在aptss ssupdate操作失败后现在会正确地移除锁而不是错误的残留锁。 * chore: ssinstall现在拒绝安装验证失败的包,审核操作现在需要改用ssaudit @@ -29,6 +30,8 @@ spark-store (4.1.2) stable; urgency=medium * chore: 暂时去除没有意义的 DBus 接口,使用 DGuiApplicationHelper::newProcessInstance 获取新进程的启动参数 * chore: 更新翻译文件,去除已经不存在的翻译 + + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 spark-store (4.1.2~test2) stable; urgency=medium @@ -42,6 +45,7 @@ spark-store (4.1.2~test2) stable; urgency=medium spark-store (4.1.2~test1) stable; urgency=medium * feat: 初步的wayland支持 + * feat: UOS下检测开发者模式是否开启,若未开启则拒绝安装 * fix: 首页的捐赠页面在中文环境下显示中文 * fix: 更新检测模块在aptss ssupdate操作失败后现在会正确地移除锁而不是错误的残留锁。 * chore: ssinstall现在拒绝安装验证失败的包,审核操作现在需要改用ssaudit From eb40a32cc22f8b50775b5277a5d39f26237f611d Mon Sep 17 00:00:00 2001 From: shenmo Date: Fri, 6 Jan 2023 10:01:47 +0000 Subject: [PATCH 02/19] =?UTF-8?q?add=20DOCS/=E5=86=85=E7=BD=91=E9=83=A8?= =?UTF-8?q?=E7=BD=B2.md.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shenmo --- DOCS/内网部署.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 DOCS/内网部署.md diff --git a/DOCS/内网部署.md b/DOCS/内网部署.md new file mode 100644 index 0000000..1686d3d --- /dev/null +++ b/DOCS/内网部署.md @@ -0,0 +1,7 @@ +需要修改的内容:商店默认源位置,aptss获取apt-fast.conf和sparkstore.list的地址,ssinstall做安装检查的源位置 + +服务器使用update.sh进行同步。 + +为方便使用(其实是早期屎山使然),请将仓库放置于 `/home/ftp/spark-store` + +仓库管理相关代码请移步 [这里](https://gitee.com/deepin-community-store/repo_auto_update_script),update.sh请联系 @shenmo 获取 \ No newline at end of file From 539a21ccec7c2ea54f15d2c19762ea2c43b19738 Mon Sep 17 00:00:00 2001 From: shenmo Date: Fri, 6 Jan 2023 11:11:16 +0000 Subject: [PATCH 03/19] update DOCS/spk-doc.md. Signed-off-by: shenmo --- DOCS/spk-doc.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/DOCS/spk-doc.md b/DOCS/spk-doc.md index 5f4c7d3..7536602 100644 --- a/DOCS/spk-doc.md +++ b/DOCS/spk-doc.md @@ -13,15 +13,15 @@ | 分类名称 | web分类   | | -------- | -------------- | -| 网络应用 | network | -| 社交沟通 | chat | -| 音乐欣赏 | music | -| 视频播放 | video | -| 图形图像 | image_graphics | -| 游戏娱乐 | games | -| 办公学习 | office | -| 阅读翻译 | reading | -| 编程开发 | development | -| 系统工具 | tools | -| 主题美化 | themes | -| 其他应用 | others | +| 网络 | network | +| 社交 | chat | +| 音乐 | music | +| 视频 | video | +| 图像 | image_graphics | +| 游戏 | games | +| 办公 | office | +| 阅读 | reading | +| 开发 | development | +| 工具 | tools | +| 主题 | themes | +| 其他 | others | From 69b7cbe472b6b61ea412cc55ef76bcddc975109e Mon Sep 17 00:00:00 2001 From: shenmo Date: Fri, 6 Jan 2023 23:30:05 +0800 Subject: [PATCH 04/19] =?UTF-8?q?apt-fast=E7=9B=B8=E5=85=B3=E6=94=B9?= =?UTF-8?q?=E5=8A=A8=EF=BC=9A=E6=94=AF=E6=8C=81=E6=98=BE=E7=A4=BA=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E7=AD=89=20=20=20*=20feat:=20aptss=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: aptss部分提示汉化 * fix: 修复部分情况下ssinstall实际未安装但是错误显示 --- debian/changelog | 8 ++++++++ src/main.cpp | 2 +- tool/apt-fast/ss-apt-fast | 4 +++- tool/ssaudit | 2 +- tool/ssinstall | 2 +- 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 7937ac7..cbcc44c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +spark-store (4.2~test1) stable; urgency=medium + + * feat: aptss支持显示报错 + * feat: aptss部分提示汉化 + * fix: 修复部分情况下ssinstall实际未安装但是错误显示 + + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (4.1.2) stable; urgency=medium * feat: 初步的wayland支持 diff --git a/src/main.cpp b/src/main.cpp index 9846a35..08ca9d2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -15,7 +15,7 @@ DWIDGET_USE_NAMESPACE int main(int argc, char *argv[]) { // Get build time - static const QString version = "4.1.2"; + static const QString version = "4.2~test1"; static const QDate buildDate = QLocale(QLocale::English).toDate(QString(__DATE__).replace(" ", " 0"), "MMM dd yyyy"); static const QTime buildTime = QTime::fromString(__TIME__, "hh:mm:ss"); static const QString buildDateTime = buildDate.toString("yyyy.MM.dd") + "-" + buildTime.toString("hh:mm:ss"); diff --git a/tool/apt-fast/ss-apt-fast b/tool/apt-fast/ss-apt-fast index ba5c28c..40601f5 100755 --- a/tool/apt-fast/ss-apt-fast +++ b/tool/apt-fast/ss-apt-fast @@ -326,7 +326,9 @@ get_uris(){ uris_full_ret="$?" if [ "$uris_full_ret" -ne 0 ] then - msg "Package manager quit with exit code." "warning" + msg "Package manager quit with exit code.Here is the log" "warning" + msg "包管理器以错误代码退出.日志如下" "warning" + msg "${uris_full}" exit "$uris_full_ret" fi while read -r pkg_uri_info diff --git a/tool/ssaudit b/tool/ssaudit index 4402e21..4f9e325 100755 --- a/tool/ssaudit +++ b/tool/ssaudit @@ -28,6 +28,6 @@ fi DEBPATH=`realpath $1` echo ---------------------------------------------------------------------------------- -dpkg -i "$DEBPATH" || aptss install -yf +aptss install -yf --reinstall "$DEBPATH" diff --git a/tool/ssinstall b/tool/ssinstall index 2ff14a8..7cd20e1 100755 --- a/tool/ssinstall +++ b/tool/ssinstall @@ -78,7 +78,7 @@ if [ ! -z "$IS_MD5SUM_CHECKD" ];then echo "校验成功,开始安装" echo ---------------------------------------------------------------------------------- -dpkg -i "$DEBPATH" || aptss install -yf +aptss install -yf --reinstall "$DEBPATH" else From 98c4e8a699955d798921e3b73a711dee7b837b86 Mon Sep 17 00:00:00 2001 From: shenmo Date: Fri, 6 Jan 2023 23:37:34 +0800 Subject: [PATCH 05/19] =?UTF-8?q?=E6=9B=B4=E5=A4=9A=E7=9A=84=E6=B1=89?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tool/apt-fast/ss-apt-fast | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tool/apt-fast/ss-apt-fast b/tool/apt-fast/ss-apt-fast index 40601f5..bcf4ea8 100755 --- a/tool/apt-fast/ss-apt-fast +++ b/tool/apt-fast/ss-apt-fast @@ -207,7 +207,9 @@ fi msg_already_running() { msg "apt-fast already running!" "warning" + msg "apt-fast 已经在运行了" "warning" msg "Verify that all apt-fast processes are finished then remove $LCK_FILE.lock and try again." "hint" + msg "请确认所有的apt-fast进程已经结束,然后删除 $LCK_FILE.lock 后重试." "hint" } # Check if a lock file exists. @@ -246,6 +248,7 @@ cleanup_dllist() if ! rm -f -- "$DLLIST" 2>/dev/null then msg "Could not clean up download list file." "warning" + msg "无法清除下载列表文件." "warning" CLEANUP_STATE=1 fi fi @@ -304,12 +307,14 @@ get_uris(){ if ! mkdir -p -- "$(dirname "$DLLIST")" then msg "Could not create download file directory." "warning" + msg "无法创建下载文件夹" "warning" exit 1 fi elif [ -f "$DLLIST" ]; then if ! rm -f -- "$DLLIST" 2>/dev/null && ! touch -- "$DLLIST" 2>/dev/null then - msg "Unable to write to download file. Try restarting with root permissions or run 'apt-fast clean' first." "warning" + msg "Unable to write to download file. Try restarting with root permissions or run 'aptss clean' first." "warning" + msg "无法下载文件。尝试使用root权限,或者运行 'aptss clean'" "warning" exit 1 fi fi @@ -398,6 +403,7 @@ get_uris(){ checksum="$(echo "$patch_checksum" | cut -d' ' -f2)" else msg "Couldn't get supported checksum for $pkg_name ($pkg_version)." "warning" + msg "无法获得 $pkg_name ($pkg_version) 的受支持的散列验证值" "warning" REMOVE_WORKING_MESSAGE= fi fi @@ -436,6 +442,7 @@ display_downloadfile(){ done <<<"$(echo -e "$DOWNLOAD_DISPLAY" | sort "${DISPLAY_SORT_OPTIONS[@]}")" fi msg "Download size: $(echo "$DOWNLOAD_SIZE" | numfmt --to=iec-i --suffix=B)" "normal" + msg "下载大小: $(echo "$DOWNLOAD_SIZE" | numfmt --to=iec-i --suffix=B)" "normal" } # Create and insert a PID number to lockfile. @@ -479,6 +486,7 @@ if [ "$CMD" == "aria2c" ]; then done if [ -z "$HASH_SUPPORTED" ]; then msg "Couldn't find supported checksum algorithm from aria2c. Checksums disabled." "warning" + msg "无法找到aria2c支持的散列验证算法. 散列验证已被禁用." "warning" fi fi @@ -533,6 +541,7 @@ fi if [ "$option" == "install" ]; then msg msg "Working... this may take a while." "normal" + msg "正在工作中,请稍等" "normal" REMOVE_WORKING_MESSAGE=y get_uris "$@" @@ -600,6 +609,7 @@ elif [ "$option" == "clean" ]; then elif [ "$option" == "download" ]; then msg msg "Working... this may take a while." "normal" + msg "正在工作中,请稍等" "normal" REMOVE_WORKING_MESSAGE=y get_uris "$@" @@ -618,6 +628,7 @@ elif [ "$option" == "download" ]; then elif [ "$option" == "source" ]; then msg msg "Working... this may take a while." "normal" + msg "正在工作中,请稍等" "normal" REMOVE_WORKING_MESSAGE=y get_uris "$@" From d3b303c66cdabf9193be69438fc8b2c47d0259f4 Mon Sep 17 00:00:00 2001 From: shenmo Date: Fri, 6 Jan 2023 15:39:10 +0000 Subject: [PATCH 06/19] update debian/changelog. Signed-off-by: shenmo --- debian/changelog | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index cbcc44c..e35a2f6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ spark-store (4.2~test1) stable; urgency=medium - * feat: aptss支持显示报错 - * feat: aptss部分提示汉化 - * fix: 修复部分情况下ssinstall实际未安装但是错误显示 + * 新增: aptss支持显示报错 + * 新增: aptss部分提示汉化 + * 修复: 修复部分情况下ssinstall实际未安装但是错误显示 -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 From 0538777cebf364c1f5e270c19deab5e93faf84c2 Mon Sep 17 00:00:00 2001 From: shenmo Date: Fri, 6 Jan 2023 23:44:37 +0800 Subject: [PATCH 07/19] =?UTF-8?q?=E5=87=86=E5=A4=87test2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/changelog | 6 ++++++ src/main.cpp | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index cbcc44c..48d2034 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +spark-store (4.2~test2) stable; urgency=medium + + + + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (4.2~test1) stable; urgency=medium * feat: aptss支持显示报错 diff --git a/src/main.cpp b/src/main.cpp index 08ca9d2..ef507a3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -15,7 +15,7 @@ DWIDGET_USE_NAMESPACE int main(int argc, char *argv[]) { // Get build time - static const QString version = "4.2~test1"; + static const QString version = "4.2~test2"; static const QDate buildDate = QLocale(QLocale::English).toDate(QString(__DATE__).replace(" ", " 0"), "MMM dd yyyy"); static const QTime buildTime = QTime::fromString(__TIME__, "hh:mm:ss"); static const QString buildDateTime = buildDate.toString("yyyy.MM.dd") + "-" + buildTime.toString("hh:mm:ss"); From 49829f8d3c3eabe5535ddb2084b5ba498a98fb21 Mon Sep 17 00:00:00 2001 From: shenmo Date: Fri, 6 Jan 2023 23:53:43 +0800 Subject: [PATCH 08/19] =?UTF-8?q?=E7=BB=9F=E4=B8=80=E5=B0=86=E8=8E=B7?= =?UTF-8?q?=E5=8F=96uri=E7=9A=84=E6=94=B9=E6=88=90apt-get?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tool/apt-fast/ss-apt-fast | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tool/apt-fast/ss-apt-fast b/tool/apt-fast/ss-apt-fast index bcf4ea8..165293a 100755 --- a/tool/apt-fast/ss-apt-fast +++ b/tool/apt-fast/ss-apt-fast @@ -323,10 +323,12 @@ get_uris(){ echo "# apt-fast mirror list: $(date)" > "$DLLIST" #NOTE: aptitude doesn't have this functionality, so we use apt-get to get # package URIs. - case "$_APTMGR" in - apt|apt-get) uri_mgr=$_APTMGR;; - *) uri_mgr=apt-get;; - esac +# case "$_APTMGR" in +# apt|apt-get) uri_mgr=$_APTMGR;; +# *) uri_mgr=apt-get;; +# esac + # NOTE:apt可能出现变动,不建议在脚本中使用,因此在此统一改用apt-get +uri_mgr=apt-get uris_full="$("$uri_mgr" "${APT_SCRIPT_WARNING[@]}" -y --print-uris "$@")" uris_full_ret="$?" if [ "$uris_full_ret" -ne 0 ] From f856060d3d27e023a8fe9d1179f594658e63d8e3 Mon Sep 17 00:00:00 2001 From: shenmo Date: Sat, 7 Jan 2023 00:57:54 +0800 Subject: [PATCH 09/19] =?UTF-8?q?=E4=B8=BA=E4=BA=86=E9=81=BF=E5=85=8D?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E4=B8=8B=E8=BD=BD=EF=BC=8C=E6=9A=82=E6=97=B6?= =?UTF-8?q?=E8=AE=A9ssinstall=E5=92=8Cssaudit=E9=87=8D=E6=96=B0=E4=BD=BF?= =?UTF-8?q?=E7=94=A8dpkg?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tool/ssaudit | 2 +- tool/ssinstall | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tool/ssaudit b/tool/ssaudit index 4f9e325..dd917b8 100755 --- a/tool/ssaudit +++ b/tool/ssaudit @@ -28,6 +28,6 @@ fi DEBPATH=`realpath $1` echo ---------------------------------------------------------------------------------- -aptss install -yf --reinstall "$DEBPATH" +dpkg -i "$DEBPATH" || aptss install -yf diff --git a/tool/ssinstall b/tool/ssinstall index 7cd20e1..2d06ad3 100755 --- a/tool/ssinstall +++ b/tool/ssinstall @@ -78,7 +78,7 @@ if [ ! -z "$IS_MD5SUM_CHECKD" ];then echo "校验成功,开始安装" echo ---------------------------------------------------------------------------------- -aptss install -yf --reinstall "$DEBPATH" +dpkg -i "$DEBPATH" || aptss install -yf else From d4e84344c35da398418c597756a7ea897f51e584 Mon Sep 17 00:00:00 2001 From: shenmo Date: Sat, 7 Jan 2023 10:34:59 +0800 Subject: [PATCH 10/19] =?UTF-8?q?=20=20*=20=E4=BF=AE=E5=A4=8D:=20420t1?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E4=B8=ADssinstall=E6=9C=89=E6=97=B6=E4=BC=9A?= =?UTF-8?q?=E9=87=8D=E6=96=B0=E4=B8=8B=E8=BD=BD=E8=BD=AF=E4=BB=B6=E5=8C=85?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 新增: 安装前会对软件包安装进行dry run以判断是否能正确安装 * 调整: aptss在进行任何操作前均检测是否存在包文件 * 调整: 修改apt-fast源代码以指定conf位置为/tmp/apt-fast,这部分不再使用bwrap模拟 --- debian/changelog | 5 ++++- tool/apt-fast/ss-apt-fast | 3 ++- tool/aptss | 25 +++++++++++-------------- tool/ssaudit | 11 +++++++++++ tool/ssinstall | 13 +++++++++++++ 5 files changed, 41 insertions(+), 16 deletions(-) diff --git a/debian/changelog b/debian/changelog index 61e03fb..59fe48c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,9 @@ spark-store (4.2~test2) stable; urgency=medium - + * 修复: 420t1版本中ssinstall有时会重新下载软件包的问题 + * 新增: 安装前会对软件包安装进行dry run以判断是否能正确安装 + * 调整: aptss在进行任何操作前均检测是否存在包文件 + * 调整: 修改apt-fast源代码以指定conf位置为/tmp/apt-fast,这部分不再使用bwrap模拟 -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 diff --git a/tool/apt-fast/ss-apt-fast b/tool/apt-fast/ss-apt-fast index 165293a..7dce20d 100755 --- a/tool/apt-fast/ss-apt-fast +++ b/tool/apt-fast/ss-apt-fast @@ -161,7 +161,8 @@ VERBOSE_OUTPUT= _DOWNLOADER='aria2c --no-conf -c -j ${_MAXNUM} -x ${_MAXCONPERSRV} -s ${_SPLITCON} -i ${DLLIST} --min-split-size=${_MINSPLITSZ} --stream-piece-selector=${_PIECEALGO} --connect-timeout=600 --timeout=600 -m0' # Load config file. -CONFFILE="/etc/apt-fast.conf" +CONFFILE="/tmp/aptss-conf/apt-fast.conf" +#### Spark Store apt-fast conf is in /tmp if [ -e "$CONFFILE" ]; then source "$CONFFILE" fi diff --git a/tool/aptss b/tool/aptss index 563c40f..d877293 100755 --- a/tool/aptss +++ b/tool/aptss @@ -14,42 +14,39 @@ chmod -R 755 /tmp/aptss-conf fi - - -if [ "$1" = "install" ] || [ "$1" = "upgrade" ] || [ "$1" = "full-upgrade" ] ; then - -if [ ! -e "/var/lib/apt/lists/d.store.deepinos.org.cn_Packages" ];then +if [ ! -e "/var/lib/apt/lists/d.store.deepinos.org.cn_Packages" ] && [ ! -e "/var/lib/apt/lists/d.store.deepinos.org.cn_store_Packages" ];then echo "接收星火仓库软件信息中..." aptss ssupdate fi +SS_APT_FAST="/opt/durapps/spark-store/bin/apt-fast/ss-apt-fast" + + + +if [ "$1" = "install" ] || [ "$1" = "upgrade" ] || [ "$1" = "full-upgrade" ] ; then + + + ###执行 bwrap --dev-bind / / \ - --bind '/tmp/aptss-conf/apt-fast.conf' /etc/apt-fast.conf \ --bind '/opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list' /etc/apt/sources.list.d/sparkstore.list \ - /opt/durapps/spark-store/bin/apt-fast/ss-apt-fast "$@" --allow-downgrades + ${SS_APT_FAST} "$@" --allow-downgrades elif [ "$1" = "download" ];then ###执行 bwrap --dev-bind / / \ - --bind '/tmp/aptss-conf/apt-fast.conf' /etc/apt-fast.conf \ --bind '/opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list' /etc/apt/sources.list.d/sparkstore.list \ - /opt/durapps/spark-store/bin/apt-fast/ss-apt-fast "$@" --allow-downgrades + ${SS_APT_FAST} "$@" --allow-downgrades elif [ "$1" = "policy" ] || [ "$1" = "search" ];then -if [ ! -e "/var/lib/apt/lists/d.store.deepinos.org.cn_Packages" ];then -echo "接收星火仓库软件信息中..." -aptss ssupdate -fi ###执行 bwrap --dev-bind / / \ - --bind '/tmp/aptss-conf/apt-fast.conf' /etc/apt-fast.conf \ --bind '/opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list' /etc/apt/sources.list.d/sparkstore.list \ apt "$@" diff --git a/tool/ssaudit b/tool/ssaudit index dd917b8..bd90073 100755 --- a/tool/ssaudit +++ b/tool/ssaudit @@ -28,6 +28,17 @@ fi DEBPATH=`realpath $1` echo ---------------------------------------------------------------------------------- +try_run_output=$(aptss --dry-run install $DEBPATH) +try_run_ret="$?" + + if [ "$try_run_ret" -ne 0 ] + then + echo "Package manager quit with exit code.Here is the log" + echo "包管理器以错误代码退出.日志如下" + echo + echo -e "${try_run_output}" + exit "$try_run_ret" + fi dpkg -i "$DEBPATH" || aptss install -yf diff --git a/tool/ssinstall b/tool/ssinstall index 2d06ad3..e5dbee7 100755 --- a/tool/ssinstall +++ b/tool/ssinstall @@ -78,6 +78,19 @@ if [ ! -z "$IS_MD5SUM_CHECKD" ];then echo "校验成功,开始安装" echo ---------------------------------------------------------------------------------- +try_run_output=$(aptss --dry-run install $DEBPATH) +try_run_ret="$?" + + if [ "$try_run_ret" -ne 0 ] + then + echo "Package manager quit with exit code.Here is the log" + echo "包管理器以错误代码退出.日志如下" + echo + echo -e "${try_run_output}" + exit "$try_run_ret" + fi + + dpkg -i "$DEBPATH" || aptss install -yf else From 05a6af8f86051d530745c96796f6b7aa204aec72 Mon Sep 17 00:00:00 2001 From: shenmo Date: Sat, 7 Jan 2023 10:39:53 +0800 Subject: [PATCH 11/19] =?UTF-8?q?=09=E4=BF=AE=E6=94=B9=EF=BC=9A=20=20=20?= =?UTF-8?q?=20=20debian/changelog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/changelog b/debian/changelog index 59fe48c..a7191b9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ spark-store (4.2~test2) stable; urgency=medium * 新增: 安装前会对软件包安装进行dry run以判断是否能正确安装 * 调整: aptss在进行任何操作前均检测是否存在包文件 * 调整: 修改apt-fast源代码以指定conf位置为/tmp/apt-fast,这部分不再使用bwrap模拟 + * 新增: aptss检测Package文件支持分目录(目前指定为store) -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 From e20572b28d100d51511919872f89b70246a3df07 Mon Sep 17 00:00:00 2001 From: shenmo Date: Sat, 7 Jan 2023 02:50:56 +0000 Subject: [PATCH 12/19] update debian/changelog. Signed-off-by: shenmo --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index a7191b9..38d4720 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,7 +2,7 @@ spark-store (4.2~test2) stable; urgency=medium * 修复: 420t1版本中ssinstall有时会重新下载软件包的问题 * 新增: 安装前会对软件包安装进行dry run以判断是否能正确安装 - * 调整: aptss在进行任何操作前均检测是否存在包文件 + * 调整: aptss在进行任何操作前均检测是否存在Packages文件 * 调整: 修改apt-fast源代码以指定conf位置为/tmp/apt-fast,这部分不再使用bwrap模拟 * 新增: aptss检测Package文件支持分目录(目前指定为store) From 721e6580c95447e3fa06cc0e57fb1fb79b08ff57 Mon Sep 17 00:00:00 2001 From: shenmo Date: Sat, 7 Jan 2023 22:24:22 +0800 Subject: [PATCH 13/19] =?UTF-8?q?aptss=E4=BF=AE=E5=A4=8D=E4=B8=80=E7=9B=B4?= =?UTF-8?q?=E9=87=8D=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/changelog | 2 +- tool/aptss | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 38d4720..1b4f5ff 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,7 +5,7 @@ spark-store (4.2~test2) stable; urgency=medium * 调整: aptss在进行任何操作前均检测是否存在Packages文件 * 调整: 修改apt-fast源代码以指定conf位置为/tmp/apt-fast,这部分不再使用bwrap模拟 * 新增: aptss检测Package文件支持分目录(目前指定为store) - + * 修复: aptss ssupdates -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 spark-store (4.2~test1) stable; urgency=medium diff --git a/tool/aptss b/tool/aptss index d877293..9a4b257 100755 --- a/tool/aptss +++ b/tool/aptss @@ -1,6 +1,6 @@ #!/bin/bash - +SS_APT_FAST="/opt/durapps/spark-store/bin/apt-fast/ss-apt-fast" if [ ! -e "/tmp/aptss-conf/apt-fast.conf" ];then ###刷新apt-fast配置 @@ -16,10 +16,23 @@ fi if [ ! -e "/var/lib/apt/lists/d.store.deepinos.org.cn_Packages" ] && [ ! -e "/var/lib/apt/lists/d.store.deepinos.org.cn_store_Packages" ];then echo "接收星火仓库软件信息中..." -aptss ssupdate + +mkdir -p /tmp/aptss-conf/ +echo "从服务器获取配置和镜像列表..." +echo "Getting server and mirror lists..." +echo +curl --silent -o /tmp/aptss-conf/apt-fast.conf "https://gitee.com/deepin-community-store/repo_auto_update_script/raw/master/mirror-list-for-apt-fast/apt-fast.conf" +chmod -R 755 /tmp/aptss-conf + +sudo curl --silent -o /opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list "https://gitee.com/deepin-community-store/repo_auto_update_script/raw/master/mirror-list-for-apt-fast/sources.list.d/sparkstore.list" +sudo bwrap --dev-bind / / --bind '/opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list' /etc/apt/sources.list.d/sparkstore.list apt update -o Dir::Etc::sourcelist="sources.list.d/sparkstore.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0" + +#只更新星火源 + + fi -SS_APT_FAST="/opt/durapps/spark-store/bin/apt-fast/ss-apt-fast" + From f707fef65b071979613de39239a9f034cf04da0a Mon Sep 17 00:00:00 2001 From: shenmo Date: Sat, 7 Jan 2023 22:30:39 +0800 Subject: [PATCH 14/19] 4.3 --- debian/changelog | 7 ++++++- src/main.cpp | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 1b4f5ff..59a8171 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +spark-store (4.2~test3) stable; urgency=medium + + * 修复: aptss ssupdates + + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (4.2~test2) stable; urgency=medium * 修复: 420t1版本中ssinstall有时会重新下载软件包的问题 @@ -5,7 +11,6 @@ spark-store (4.2~test2) stable; urgency=medium * 调整: aptss在进行任何操作前均检测是否存在Packages文件 * 调整: 修改apt-fast源代码以指定conf位置为/tmp/apt-fast,这部分不再使用bwrap模拟 * 新增: aptss检测Package文件支持分目录(目前指定为store) - * 修复: aptss ssupdates -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 spark-store (4.2~test1) stable; urgency=medium diff --git a/src/main.cpp b/src/main.cpp index ef507a3..b96b5d3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -15,7 +15,7 @@ DWIDGET_USE_NAMESPACE int main(int argc, char *argv[]) { // Get build time - static const QString version = "4.2~test2"; + static const QString version = "4.2~test3"; static const QDate buildDate = QLocale(QLocale::English).toDate(QString(__DATE__).replace(" ", " 0"), "MMM dd yyyy"); static const QTime buildTime = QTime::fromString(__TIME__, "hh:mm:ss"); static const QString buildDateTime = buildDate.toString("yyyy.MM.dd") + "-" + buildTime.toString("hh:mm:ss"); From ce6ded25f29ad279ea445fafeb1cae89e016dffc Mon Sep 17 00:00:00 2001 From: shenmo Date: Sun, 15 Jan 2023 13:59:49 +0000 Subject: [PATCH 15/19] =?UTF-8?q?fix:=20mint=E4=B8=8B=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E6=AD=A3=E5=B8=B8=E8=B0=83=E7=94=A8aptss?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shenmo --- tool/apt-fast-conf/apt-fast.conf | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tool/apt-fast-conf/apt-fast.conf b/tool/apt-fast-conf/apt-fast.conf index eb93e80..9089290 100644 --- a/tool/apt-fast-conf/apt-fast.conf +++ b/tool/apt-fast-conf/apt-fast.conf @@ -13,6 +13,10 @@ # _APTMGR=apt +if grep -Eqi "linuxmint" /etc/os-release;then +_APTMGR=apt-get +fi + #### # @@ -25,6 +29,8 @@ AUTH_UOS_PASSWD="`cat /etc/apt/auth.conf.d/uos.conf | grep home-packages.chinau AUTH_UOS_PASSWD=`echo ${AUTH_UOS_PASSWD#*password }` fi +##### UOS自动读取账号密码以实现使用aptss来加速下载 + # Enable DOWNLOADBEFORE to suppress apt-fast confirmation dialog and download # packages directly. # @@ -65,7 +71,7 @@ DOWNLOADBEFORE=true # # Default: disabled # -MIRRORS=( 'https://d.store.deepinos.org.cn/,https://mirrors.sdu.edu.cn/spark-store-repository/,http://cdn.dl.uniartisan.com:9000/deepinos/,https://d1.store.deepinos.org.cn/,https://d2.store.deepinos.org.cn/,https://d4.store.deepinos.org.cn/,https://d5.store.deepinos.org.cn/' ) +MIRRORS=( 'https://d.store.deepinos.org.cn/,https://zunyun01.store.deepinos.org.cn/,https://mirrors.sdu.edu.cn/spark-store-repository/,http://cdn.dl.uniartisan.com:9000/deepinos/,https://d1.store.deepinos.org.cn/,https://d2.store.deepinos.org.cn/,https://d3.store.deepinos.org.cn/,https://d4.store.deepinos.org.cn/,https://d5.store.deepinos.org.cn/' ) # Maximum number of connections @@ -73,7 +79,7 @@ MIRRORS=( 'https://d.store.deepinos.org.cn/,https://mirrors.sdu.edu.cn/spark-sto # # Default: 5 # -_MAXNUM=5 +_MAXNUM=16 # Maximum number of connections per server From a934373f1e4e8b823828048adabba11cfe604c7b Mon Sep 17 00:00:00 2001 From: shenmo Date: Sun, 15 Jan 2023 23:05:25 +0800 Subject: [PATCH 16/19] =?UTF-8?q?*=20=E8=B0=83=E6=95=B4=EF=BC=9AUOS?= =?UTF-8?q?=E5=BC=80=E5=8F=91=E8=80=85=E6=A8=A1=E5=BC=8F=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E7=8E=B0=E5=9C=A8=E4=B8=8D=E4=BC=9A=E9=82=A3=E4=B9=88=E6=8C=A4?= =?UTF-8?q?=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/changelog | 6 ++++++ src/main.cpp | 2 +- src/mainwindow-dtk.cpp | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 59a8171..8be9f0b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +spark-store (4.2) stable; urgency=medium + + * 调整:UOS开发者模式提示现在不会那么挤了 + + --shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (4.2~test3) stable; urgency=medium * 修复: aptss ssupdates diff --git a/src/main.cpp b/src/main.cpp index b96b5d3..8cc8ba3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -15,7 +15,7 @@ DWIDGET_USE_NAMESPACE int main(int argc, char *argv[]) { // Get build time - static const QString version = "4.2~test3"; + static const QString version = "4.2"; static const QDate buildDate = QLocale(QLocale::English).toDate(QString(__DATE__).replace(" ", " 0"), "MMM dd yyyy"); static const QTime buildTime = QTime::fromString(__TIME__, "hh:mm:ss"); static const QString buildDateTime = buildDate.toString("yyyy.MM.dd") + "-" + buildTime.toString("hh:mm:ss"); diff --git a/src/mainwindow-dtk.cpp b/src/mainwindow-dtk.cpp index cfed349..0fa509a 100644 --- a/src/mainwindow-dtk.cpp +++ b/src/mainwindow-dtk.cpp @@ -335,6 +335,8 @@ void MainWindow::on_pushButton_14_clicked() << "UOS开发者模式未开启,相关功能被禁用" << "--title" << "功能禁用提示" + << "--width" + << "360" ); upgradeP->waitForStarted(); upgradeP->waitForFinished(30); From 7163f8ee80f0068f4a5bd09b5e531a658cb0ca68 Mon Sep 17 00:00:00 2001 From: shenmo Date: Mon, 16 Jan 2023 15:04:04 +0800 Subject: [PATCH 17/19] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=97=B6=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=AD=A3=E5=9C=A8=E5=AE=89=E8=A3=85=E7=9A=84=E5=BA=94?= =?UTF-8?q?=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tool/update-upgrade/ss-do-upgrade-worker.sh | 2 +- tool/update-upgrade/ss-do-upgrade.sh | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tool/update-upgrade/ss-do-upgrade-worker.sh b/tool/update-upgrade/ss-do-upgrade-worker.sh index b76ddc3..04c082c 100755 --- a/tool/update-upgrade/ss-do-upgrade-worker.sh +++ b/tool/update-upgrade/ss-do-upgrade-worker.sh @@ -28,7 +28,7 @@ case $1 in ;; upgrade-app) - aptss install "${@:2}" --only-upgrade 2>&1 | tee /tmp/spark-store-app-upgrade-log.txt + aptss install "${@:2}" --only-upgrade 2>&1 | tee /tmp/spark-store-app-upgrade-log.txt IS_UPGRADE_ERROR=`cat /tmp/spark-store-app-upgrade-log.txt | grep "Package manager quit with exit code."` echo "$IS_UPGRADE_ERROR" > /tmp/spark-store-app-upgrade-status.txt ;; diff --git a/tool/update-upgrade/ss-do-upgrade.sh b/tool/update-upgrade/ss-do-upgrade.sh index 5b5cf95..f87e3b3 100755 --- a/tool/update-upgrade/ss-do-upgrade.sh +++ b/tool/update-upgrade/ss-do-upgrade.sh @@ -64,8 +64,9 @@ done` zenity --info --text "没有选中任何软件\n但是你并没有站在世界之巅" --title "星火商店更新检测服务" --height 150 --width 300 --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg else ### 更新用户选择的应用 - pkexec /opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh upgrade-app $PKG_UPGRADE_LIST -y | zenity --progress --auto-close --no-cancel --pulsate --text="正在更新已选中的应用,请稍候..." --height 70 --width 400 --title="星火商店更新模块" --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg - + for PKG_UPGRADE in $PKG_UPGRADE_LIST;do + pkexec /opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh upgrade-app $PKG_UPGRADE -y | zenity --progress --auto-close --no-cancel --pulsate --text="正在更新 $PKG_UPGRADE ,请稍候..." --height 70 --width 400 --title="星火商店更新模块" --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg + done #### 更新成功 if [ -z "`cat /tmp/spark-store-app-upgrade-status.txt`" ] ; then zenity --info --text "选中的软件已经更新完毕" --title "星火商店更新检测模块" --height 150 --width 300 --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg From eb38f2af05cd4898b459ed3f7fec253906e81410 Mon Sep 17 00:00:00 2001 From: shenmo Date: Mon, 16 Jan 2023 08:52:06 +0000 Subject: [PATCH 18/19] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9Awayland?= =?UTF-8?q?=E4=B8=8B=E6=97=A0=E6=B3=95=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shenmo --- tool/update-upgrade/ss-update-notifier.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tool/update-upgrade/ss-update-notifier.sh b/tool/update-upgrade/ss-update-notifier.sh index 271ea9c..7880ee7 100755 --- a/tool/update-upgrade/ss-update-notifier.sh +++ b/tool/update-upgrade/ss-update-notifier.sh @@ -3,16 +3,15 @@ LANGUAGE=en_US # 发送通知 function notify-send() { - # Detect name of the display in use - local display=":$(ls /tmp/.X11-unix/* | sed 's#/tmp/.X11-unix/X##' | head -n 1)" + # Detect user using the display - local user=$(who | grep '('$display')' | awk '{print $1}' | head -n 1) + local user=$(who | awk '{print $1}' | head -n 1) # Detect uid of the user local uid=$(id -u $user) - sudo -u $user DISPLAY=$display 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 "$@" } # 检测网络链接畅通 @@ -102,4 +101,4 @@ if [ $update_app_number -le 0 ] ; then fi ## 如果都是hold或者版本一致的那就直接退出,否则把剩余的给提醒了 -notify-send -a spark-store "星火更新提醒" "星火商店仓库中有$update_app_number个软件包可以更新啦!请到星火商店的菜单处理" +notify-send -a spark-store "星火更新提醒" "星火商店仓库中有$update_app_number个软件包可以更新啦!请到星火商店的菜单处理" \ No newline at end of file From e4a3a974b5e40facf92cffdcdb54c1db1c742271 Mon Sep 17 00:00:00 2001 From: shenmo Date: Mon, 16 Jan 2023 17:00:09 +0800 Subject: [PATCH 19/19] =?UTF-8?q?dWine5=E6=A0=87=E7=AD=BE=E7=8E=B0?= =?UTF-8?q?=E5=9C=A8=E6=84=8F=E5=91=B3=E7=9D=80=E6=98=AFWine=E5=BA=94?= =?UTF-8?q?=E7=94=A8=E8=80=8C=E4=B8=8D=E6=98=AFDwine5=E5=BA=94=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/appintopage.ui | 4 ++-- translations/spark-store_en.ts | 12 ++++++------ translations/spark-store_fr.ts | 12 ++++++------ translations/spark-store_zh_CN.ts | 10 +++++++--- 4 files changed, 21 insertions(+), 17 deletions(-) diff --git a/src/pages/appintopage.ui b/src/pages/appintopage.ui index 7025166..c9577e6 100644 --- a/src/pages/appintopage.ui +++ b/src/pages/appintopage.ui @@ -540,10 +540,10 @@ - <html><head/><body><p>A deepin-wine5 app.Spark Store will automatically configure the wine kit for you</p></body></html> + <html><head/><body><p>A Wine app.Spark Store will automatically configure the wine kit for you</p></body></html> - <html><head/><body><p>A deepin-wine5 app.Spark Store will automatically configure the wine kit for you</p></body></html> + <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-small.png"/></p></body></html> diff --git a/translations/spark-store_en.ts b/translations/spark-store_en.ts index 4a0c526..5fa26a6 100644 --- a/translations/spark-store_en.ts +++ b/translations/spark-store_en.ts @@ -108,12 +108,6 @@ <html><head/><body><p><img src=":/tags/a2d-small.png"/></p></body></html> - - - - <html><head/><body><p>A deepin-wine5 app.Spark Store will automatically configure the wine kit for you</p></body></html> - - <html><head/><body><p><img src=":/tags/dwine5-small.png"/></p></body></html> @@ -144,6 +138,12 @@ Screen capture + + + + <html><head/><body><p>A Wine app.Spark Store will automatically configure the wine kit for you</p></body></html> + + Update diff --git a/translations/spark-store_fr.ts b/translations/spark-store_fr.ts index 72c7f15..a12364c 100644 --- a/translations/spark-store_fr.ts +++ b/translations/spark-store_fr.ts @@ -108,12 +108,6 @@ <html><head/><body><p><img src=":/tags/a2d-small.png"/></p></body></html> - - - - <html><head/><body><p>A deepin-wine5 app.Spark Store will automatically configure the wine kit for you</p></body></html> - - <html><head/><body><p><img src=":/tags/dwine5-small.png"/></p></body></html> @@ -144,6 +138,12 @@ Screen capture + + + + <html><head/><body><p>A Wine app.Spark Store will automatically configure the wine kit for you</p></body></html> + + Update diff --git a/translations/spark-store_zh_CN.ts b/translations/spark-store_zh_CN.ts index 9065d35..dca880e 100644 --- a/translations/spark-store_zh_CN.ts +++ b/translations/spark-store_zh_CN.ts @@ -109,10 +109,8 @@ - - <html><head/><body><p>A deepin-wine5 app.Spark Store will automatically configure the wine kit for you</p></body></html> - 这是一款 deepin-wine5 应用。星火商店会为你自动配置wine环境 + 这是一款 deepin-wine5 应用。星火商店会为你自动配置wine环境 @@ -139,6 +137,12 @@ Screen capture 屏幕截图 + + + + <html><head/><body><p>A Wine app.Spark Store will automatically configure the wine kit for you</p></body></html> + 这是一款 Wine 应用。星火商店会为你自动配置wine环境 + Introduction