From e6d3b035db6a7052d4d5b4ad590855b5ceb7421e Mon Sep 17 00:00:00 2001 From: shenmo Date: Tue, 9 Aug 2022 19:26:59 +0800 Subject: [PATCH 01/18] =?UTF-8?q?=09=E4=BF=AE=E6=94=B9=EF=BC=9A=20=20=20?= =?UTF-8?q?=20=20debian/spark-store.prerm=20=09=E6=96=B0=E6=96=87=E4=BB=B6?= =?UTF-8?q?=EF=BC=9A=20=20=20tool/apt-fast-conf/sources.list.d/.keep=20=09?= =?UTF-8?q?=E5=88=A0=E9=99=A4=EF=BC=9A=20=20=20=20=20tool/apt-fast-conf/so?= =?UTF-8?q?urces.list.d/sparkstore.list?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/spark-store.prerm | 1 + tool/apt-fast-conf/sources.list.d/.keep | 0 tool/apt-fast-conf/sources.list.d/sparkstore.list | 1 - 3 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 tool/apt-fast-conf/sources.list.d/.keep delete mode 100644 tool/apt-fast-conf/sources.list.d/sparkstore.list diff --git a/debian/spark-store.prerm b/debian/spark-store.prerm index a71edca..6998d1a 100755 --- a/debian/spark-store.prerm +++ b/debian/spark-store.prerm @@ -8,6 +8,7 @@ rm /usr/local/bin/ussinstall rm /usr/local/bin/ussremove rm /usr/local/bin/ss-apt-fast + # Remove residual symbol links to stop upgrade detect if exist if [ -f /etc/xdg/autostart/spark-update-notifier.desktop ];then rm /etc/xdg/autostart/spark-update-notifier.desktop diff --git a/tool/apt-fast-conf/sources.list.d/.keep b/tool/apt-fast-conf/sources.list.d/.keep new file mode 100644 index 0000000..e69de29 diff --git a/tool/apt-fast-conf/sources.list.d/sparkstore.list b/tool/apt-fast-conf/sources.list.d/sparkstore.list deleted file mode 100644 index 0563772..0000000 --- a/tool/apt-fast-conf/sources.list.d/sparkstore.list +++ /dev/null @@ -1 +0,0 @@ -deb [by-hash=force] https://d.store.deepinos.org.cn / From 8054f85adaaeb0c8f4d32c5678120ffc1fc27353 Mon Sep 17 00:00:00 2001 From: Pluto Date: Wed, 17 Aug 2022 15:15:19 +0000 Subject: [PATCH 02/18] =?UTF-8?q?!78=20fix:=20=E4=B8=8D=E5=86=8D=E4=BD=BF?= =?UTF-8?q?=E7=94=A8http=E5=A4=B4=E8=AF=B7=E6=B1=82=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=A4=A7=E5=B0=8F=20Merge=20pull=20request=20!78=20from=20Plut?= =?UTF-8?q?o/dev?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/downloadworker.cpp | 49 ++++++------------------------------------ 1 file changed, 6 insertions(+), 43 deletions(-) diff --git a/src/downloadworker.cpp b/src/downloadworker.cpp index 460fb1d..0b33d35 100644 --- a/src/downloadworker.cpp +++ b/src/downloadworker.cpp @@ -1,14 +1,8 @@ #include "downloadworker.h" #include -#include -#include -#include -#include #include #include -#include #include -#include #include DownloadController::DownloadController(QObject *parent) @@ -36,13 +30,6 @@ void DownloadController::setFilename(QString filename) this->filename = filename; } -void timeSleeper(int time) -{ - QElapsedTimer t1; - t1.start(); - while(t1.elapsed()readAllStandardOutput().data(); - //qDebug() << message; - message = message.replace(" ", "").replace("\n", "").replace("-", ""); - message = message.replace("*", "").replace("=", ""); + // qDebug() << message; + message = message.replace(" ", ""); QStringList list; qint64 downloadSize = 0; int downloadSizePlace1 = message.indexOf("("); @@ -174,10 +159,10 @@ void DownloadController::startDownload(const QString &url) { int percentInfoNumber = percentInfo.toUInt(); - downloadSize = (percentInfoNumber + 1) * fileSize / 100; + downloadSize = percentInfoNumber * fileSize / 100; } } - if (speedPlace1 != -1 && speedPlace2 != -1) + if (speedPlace1 != -1 && speedPlace2 != -1 && speedPlace2 - speedPlace1 <= 15) { speedInfo = message.mid(speedPlace1 + 3, speedPlace2 - speedPlace1 - 3); speedInfo += "/s"; @@ -227,30 +212,8 @@ void DownloadController::stopDownload() qint64 DownloadController::getFileSize(const QString &url) { - QEventLoop event; - QNetworkAccessManager requestManager; - QNetworkRequest request; - request.setUrl(QUrl(url)); - request.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true); - QNetworkReply *reply = requestManager.head(request); - connect(reply, static_cast(&QNetworkReply::error), - [this, reply](QNetworkReply::NetworkError error) - { - if (error != QNetworkReply::NoError) - { - emit errorOccur(reply->errorString()); - } - }); - connect(reply, &QNetworkReply::finished, &event, &QEventLoop::quit); - event.exec(); - - qint64 fileSize = 0; - if (reply->rawHeader("Accept-Ranges") == QByteArrayLiteral("bytes") && reply->hasRawHeader(QString("Content-Length").toLocal8Bit())) - { - fileSize = reply->header(QNetworkRequest::ContentLengthHeader).toUInt(); - } - qDebug() << "文件大小为:" << fileSize; - reply->deleteLater(); + // 已经无需使用 qtnetwork 再获取 filesize,完全交给 aria2 来计算进度。 为保证兼容性,故保留此函数。 + qint64 fileSize = 10000; return fileSize; } From bda0426a3b483a7aac5201efac0510d244bb38ed Mon Sep 17 00:00:00 2001 From: shenmo Date: Thu, 18 Aug 2022 09:12:10 +0800 Subject: [PATCH 03/18] =?UTF-8?q?changelog=E5=92=8C=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/changelog | 8 ++++++++ src/main.cpp | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 624b891..86d8906 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +spark-store (3.1.5-2) stable; urgency=medium + + * 下载软件时跳过获取大小,修复部分软件无法下载的问题 + + + +-- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (3.1.5-1) stable; urgency=medium * 改变更新策略,UOS也下载加速,但是安装不加速 diff --git a/src/main.cpp b/src/main.cpp index be581da..6b31ec6 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.1.5-1")); + dialog.setVersion(DApplication::buildVersion("Version 3.1.5-2")); 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.1.5-1")); + a.setApplicationVersion(DApplication::buildVersion("3.1.5-2")); a.setApplicationAcknowledgementPage("https://gitee.com/deepin-community-store/spark-store"); a.setApplicationDescription( QObject::tr( From 5be7923e607dd1e5f13c51b815ff3a1e530f20a6 Mon Sep 17 00:00:00 2001 From: shenmo Date: Thu, 18 Aug 2022 08:39:36 +0000 Subject: [PATCH 04/18] =?UTF-8?q?!80=20http2=E4=B8=8Bcurl=E5=AE=B9?= =?UTF-8?q?=E6=98=93=E6=8A=A5=E9=94=99=E5=AF=BC=E8=87=B4pubkey=E9=94=99?= =?UTF-8?q?=E8=AF=AF=20*=20update=20debian/spark-store.postinst.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/spark-store.postinst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/spark-store.postinst b/debian/spark-store.postinst index 3649a43..380d72f 100755 --- a/debian/spark-store.postinst +++ b/debian/spark-store.postinst @@ -16,7 +16,7 @@ case "$1" in # Download and install key - curl --progress-bar -o /tmp/spark-store-install/spark-store.asc https://d.store.deepinos.org.cn/dcs-repo.gpg-key.asc + curl --http1.1 --progress-bar -o /tmp/spark-store-install/spark-store.asc https://d.store.deepinos.org.cn/dcs-repo.gpg-key.asc gpg --dearmor /tmp/spark-store-install/spark-store.asc cp -f /tmp/spark-store-install/spark-store.asc.gpg /etc/apt/trusted.gpg.d/spark-store.gpg From 5220b886de59afa5e1526845cc38c978568837cd Mon Sep 17 00:00:00 2001 From: shenmo Date: Thu, 18 Aug 2022 08:44:13 +0000 Subject: [PATCH 05/18] =?UTF-8?q?!81=20=E9=87=8D=E6=96=B0=E5=8F=91?= =?UTF-8?q?=E5=B8=833152=20*=20update=20debian/changelog.=20*=20update=20d?= =?UTF-8?q?ebian/spark-store.postinst.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 86d8906..c878651 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,7 @@ spark-store (3.1.5-2) stable; urgency=medium * 下载软件时跳过获取大小,修复部分软件无法下载的问题 - + * 修复 获取key时出错,指定使用http1.1 -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 From 52af8a8229b57ff56a240742cd1e061e804bb1c5 Mon Sep 17 00:00:00 2001 From: shenmo Date: Thu, 18 Aug 2022 09:31:33 +0000 Subject: [PATCH 06/18] !82 modified: debian/changelog modified: debian/spark-store.postinst new file: tool/spark-store.asc * modified: debian/changelog --- debian/changelog | 7 +++++++ debian/spark-store.postinst | 6 +++--- tool/spark-store.asc | 41 +++++++++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 3 deletions(-) create mode 100644 tool/spark-store.asc diff --git a/debian/changelog b/debian/changelog index c878651..f115a35 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +spark-store (3.1.5-3) stable; urgency=medium + + * 包内自带密钥 + + +-- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (3.1.5-2) stable; urgency=medium * 下载软件时跳过获取大小,修复部分软件无法下载的问题 diff --git a/debian/spark-store.postinst b/debian/spark-store.postinst index 380d72f..07ab894 100755 --- a/debian/spark-store.postinst +++ b/debian/spark-store.postinst @@ -16,14 +16,14 @@ case "$1" in # Download and install key - curl --http1.1 --progress-bar -o /tmp/spark-store-install/spark-store.asc https://d.store.deepinos.org.cn/dcs-repo.gpg-key.asc - gpg --dearmor /tmp/spark-store-install/spark-store.asc + mkdir -p /tmp/spark-store-install/ + cp -f /opt/durapps/spark-store/bin/spark-store.asc /tmp/spark-store-install/spark-store.asc + gpg --dearmor /opt/durapps/spark-store/bin/spark-store.asc cp -f /tmp/spark-store-install/spark-store.asc.gpg /etc/apt/trusted.gpg.d/spark-store.gpg # Remove existing source file rm -f /etc/apt/preferences.d/sparkstore - rm -f /etc/apt/sources.list.d/sparkstore.list # Run apt update to avoid users being fucked up by the non-exist dependency problem diff --git a/tool/spark-store.asc b/tool/spark-store.asc new file mode 100644 index 0000000..9333af9 --- /dev/null +++ b/tool/spark-store.asc @@ -0,0 +1,41 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQGNBF7sGtgBDADKux63RQqGjbilEBErDjbGH+/sya9VjNBZdge1G/kK+8SEU7x9 +QFkSoprS7MN9qEtLhdN4+jqKDwwwlB0kjOK/L3BTsSjeP1fonY+Foprnc5sBBNDq +2g4SQr1joafJq/d/E1GzCFCtUeo1/g8siEB9O2A8LFAqKB0ti6cXFQBc7QrRKNqb +mUQYYkva5TeyYXwg8dV/jlQ1HkRftHO+mDOlxhSZxjH8o/3cHpVB/Ef7LUbUfzTL +jT4Lxu5k6jFYeNI9EmIl36Nfz6o4T+iG19PQjv0d9aZe+4ceFeRQNPPqeubGJO9Z +STNhHBFisgr/NdCKDVimR9wR7NSDceO+NswgMZzzo2xIFCsTB+JrMpTkDEBF1eFC +F2RHwi6T4vJmFdt1rHhBfufgHrGNekZytgZw6tL9WDvDCiCKKZSGetfuBfaNYy63 +QNVszRVT5IOf6Rg2vtBIWM/iiAI6E9RsNhElRQj/cQLriIzuwHfgdHx8gPsRSgVx +ZgizW0/2u4ZkrHUAEQEAAbQiRENTdG9yZSA8amlmZW5nc2hlbm1vQG91dGxvb2su +Y29tPokBzgQTAQoAOAIbAwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgBYhBJ2aqFn3 +UCSxoezhbg5B01SimkQMBQJirsYKAAoJEA5B01SimkQMCx0L/2OvTYmOr4y4wC7i +oC/uCZpWt9eCMEkC1kB2a9xjPX2GbxTnzvrdkiqHDD8uR2gfO7NkHyoGies+zeCT +LcHH1Li+8KnGy3wye1KWgGTpxS3OV1gHawXi2w6OVhoQvod0y3cbGAOtOWpnbg1n +SiJdDy3cjC+BNYSNPuF3qoY6YEdIfE9SaXANxe/57TUbN0TaiQFYdRd7GyyevjtC +KNW8R06QKQ/zNqJSaoMHVVtDICXDCR4yvzmqXJppfMJKwHW9sPLC2c1xVx3pmyXc +yFzIPOyeu3CDvdbXlh1gfoMTnUfWQyB7oIZxmCfFJGdodZwoxA+pkAcyhx87JYpE +L4gy3SERvAog+/dD47gCb5alGYvyk9t7PQAAvwY8yr/6gf7f1U7DzxuT386LefW7 +6p5ET/R7xcuNLwRH0ZOp/eQECj72A7KXhQ5IL47Rfdh7VzCkf0MGKBFEIET9OV0G +zv1q/z281pt08wHPGM3CetPWUFWUD9/H/UvBUSmpoSLgBsMhdbkBjQRe7BrYAQwA +mAKDNHieo2P1WGNBMi4pPuhhgv8JyBzk8yrSOU+8s1ZTI4mI82iBEy5zAnAx3W1k +unXVlDyq1/LfzL2Nt8Apr5aQdyEqSu4zN/6JBETB0LIkdrwdwBciAHzAKPfJWCR8 +t+Ox76I2MNeVsVQFAjGeb/7QR1Ge6Sx/sgSG7NTWYD6PmQtqmH0xKJsfXYfgayRG +RF1rfu6CV0b2rPFfXOwB+3qQ8YInrPlI/9dswZiVElGGmbQTo3fGqk3T5iShqSnZ +wCYDj2ODDknoPrfE1uUkF7CoYEkGrPbrUMwFK/SHvvG6cUz0EFUENPg7nECPmHGm +GPWByBx/Yo0Jg68JavIeX7q9mnnlTP/3sp1JFLAQpR8q4S9lFOv6uYKJNUxQeBF+ +lBUkiafHzeHxJNP3ymDkrRRi640TubEZfVGjp5cskLY+U6KIpAXK/kCp42uPY7ob +cuc3vAZ+5EcYCOY+LI80urQ5a+iMqo2ZTxL7C0BAX79QLgTDmH/FW4ejkSbrXH8v +ABEBAAGJAbYEGAEKACACGwwWIQSdmqhZ91AksaHs4W4OQdNUoppEDAUCYq7GEwAK +CRAOQdNUoppEDOm8C/9w3/Qtd14531O+ZsrQkfQ+ByIvGFKrnz4BIqD/99lR7UXj +3Z2/bN7IGbwNUrBpgFqzlWAzpX9tiGhnwDphwSVeYNsvwepKmtmMAaPkP+ujR95E +62UKpdVVrHH/VOCT4ZsSddwEVOLeI9LltO6RmPr54e3bpBXv6bijGnjhgRyJU2Jg +DVE+UOU3m26fTQZZf3G9W55TBNdtpA1gggppJ7SgbwmuWcFjeF1gaEOeW2P5jaYe ++Nx4Xpc4uf341elTfym8NQ/CfEfgAn3zs0ZOmnCX3JlmFh7gPW8fOSIDTC0NkJtU +6LlguuprKhAUCSPKDlod7f7SmiwMsqvaAH+6Hi402tFnIwA1zjQk4BoCsUAVXVQx +l2LC2UD3zBZw9WO6Y/YDgzM6Q2TlI9l1IjmkMHBWHalZ2afA7Uutv4JeNm0joT1D +O5TmDYkkjjfu/+t+QnmBt5KgN2+HwF83ceJOqbPETvEviG5Wh+RXIT5kSgqgRPuV +44jA/CTiR2VibEJ22D0= +=mGFM +-----END PGP PUBLIC KEY BLOCK----- From bc897969f8cfa6cbb0326a07a6af898fb632774f Mon Sep 17 00:00:00 2001 From: shenmo Date: Thu, 18 Aug 2022 09:37:11 +0000 Subject: [PATCH 07/18] =?UTF-8?q?!83=20=09=E4=BF=AE=E6=94=B9=EF=BC=9A=20?= =?UTF-8?q?=20=20=20=20debian/spark-store.postinst=20*=20=09=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=EF=BC=9A=20=20=20=20=20debian/spark-store.postinst?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/spark-store.postinst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/spark-store.postinst b/debian/spark-store.postinst index 07ab894..723d775 100755 --- a/debian/spark-store.postinst +++ b/debian/spark-store.postinst @@ -18,7 +18,7 @@ case "$1" in # Download and 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 - gpg --dearmor /opt/durapps/spark-store/bin/spark-store.asc + gpg --dearmor /tmp/spark-store-install/spark-store.asc cp -f /tmp/spark-store-install/spark-store.asc.gpg /etc/apt/trusted.gpg.d/spark-store.gpg From 855b18cfa6ba16c76a422bf4cfa95fb81444c5fd Mon Sep 17 00:00:00 2001 From: shenmo Date: Thu, 18 Aug 2022 09:41:14 +0000 Subject: [PATCH 08/18] =?UTF-8?q?!84=20=09=E4=BF=AE=E6=94=B9=EF=BC=9A=20?= =?UTF-8?q?=20=20=20=20src/main.cpp=20*=20=09=E4=BF=AE=E6=94=B9=EF=BC=9A?= =?UTF-8?q?=20=20=20=20=20src/main.cpp=20*=20Merge=20branch=20'master'=20o?= =?UTF-8?q?f=20https://gitee.com/deepin-community-store/spark-store=20*=20?= =?UTF-8?q?=09=E4=BF=AE=E6=94=B9=EF=BC=9A=20=20=20=20=20debian/spark-store?= =?UTF-8?q?.postinst?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 6b31ec6..ca51496 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.1.5-2")); + dialog.setVersion(DApplication::buildVersion("Version 3.1.5-3")); 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.1.5-2")); + a.setApplicationVersion(DApplication::buildVersion("3.1.5-3")); a.setApplicationAcknowledgementPage("https://gitee.com/deepin-community-store/spark-store"); a.setApplicationDescription( QObject::tr( From 238c43b79e9159f0aa320399ea7d8f1f9294b981 Mon Sep 17 00:00:00 2001 From: shenmo Date: Fri, 19 Aug 2022 07:28:10 +0000 Subject: [PATCH 09/18] =?UTF-8?q?!85=20=09=E4=BF=AE=E6=94=B9=EF=BC=9A=20?= =?UTF-8?q?=20=20=20=20debian/spark-store.postinst=20=E9=87=8D=E5=91=BD?= =?UTF-8?q?=E5=90=8D=EF=BC=9A=20=20=20tool/ss-apt-fast=20->=20tool/aptss?= =?UTF-8?q?=20*=20=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20spark-wine7-devel?= =?UTF-8?q?=5F7.14~spark-1=5Famd64.deb=20*=20final=20*=20=09=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=EF=BC=9A=20=20=20=20=20debian/spark-store.postinst=20?= =?UTF-8?q?*=20=09=E4=BF=AE=E6=94=B9=EF=BC=9A=20=20=20=20=20tool/update-up?= =?UTF-8?q?grade/ss-update-controler.sh=20*=20=09=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=EF=BC=9A=20=20=20=20=20debian/spark-store.postinst=20*=20?= =?UTF-8?q?=E5=8F=AA=E9=A2=9D=E5=A4=96=E7=94=9F=E6=88=90=E4=B8=80=E4=BB=BD?= =?UTF-8?q?=E7=BB=99aptss=20*=20=09=E4=BF=AE=E6=94=B9=EF=BC=9A=20=20=20=20?= =?UTF-8?q?=20debian/spark-store.postinst=20*=20=20=E8=A6=81=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E7=9A=84=E5=8F=98=E6=9B=B4=EF=BC=9A=20*=20=09?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=20=20=20=20=20tool/aptss=20*=20=09?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=20=20=20=20=20debian/changelog=20*?= =?UTF-8?q?=20=09=E4=BF=AE=E6=94=B9=EF=BC=9A=20=20=20=20=20pkg/usr/share/b?= =?UTF-8?q?ash-completion/completions/aptss=20*=20=09=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=EF=BC=9A=20=20=20=20=20pkg/usr/share/bash-completion/completio?= =?UTF-8?q?ns/aptss=20*=20=09=E4=BF=AE=E6=94=B9=EF=BC=9A=20=20=20=20=20deb?= =?UTF-8?q?ian/spark-store.postinst=20*=20aa=20*=20Merge=20branch=20'maste?= =?UTF-8?q?r'=20of=20https://gitee.com/deepin-community-store/spark-store?= =?UTF-8?q?=20*=20=09=E4=BF=AE=E6=94=B9=EF=BC=9A=20=20=20=20=20src/main.cp?= =?UTF-8?q?p=20*=20Merge=20branch=20'master'=20of=20https://gitee.com/deep?= =?UTF-8?q?in-community-store/spark-store=20*=20=09=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=EF=BC=9A=20=20=20=20=20debian/spark-store.postinst?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/changelog | 9 + debian/spark-store.postinst | 21 +- debian/spark-store.prerm | 9 +- .../sources.list.d/sparkstore.list | 0 .../system/spark-update-notifier.service | 2 +- .../share/bash-completion/completions/aptss | 228 ++++++++++++++++++ spark-store-project.pro | 15 +- src/main.cpp | 4 +- tool/aptss | 73 ++++++ tool/ss-apt-fast | 42 ---- tool/ssinstall | 16 +- .../autostart/spark-update-notifier.desktop | 5 - tool/update-upgrade/ss-do-upgrade.sh | 6 +- tool/update-upgrade/ss-update-controler.sh | 11 +- ...notify-placer.sh => ss-update-notifier.sh} | 22 +- tool/update-upgrade/ss-update-notify.sh | 28 --- tool/update-upgrade/ss-upgrade-list.sh | 2 +- tool/ussinstall | 91 ------- tool/ussremove | 142 ----------- 19 files changed, 366 insertions(+), 360 deletions(-) rename pkg/etc/{apt => aptss}/sources.list.d/sparkstore.list (100%) create mode 100644 pkg/usr/share/bash-completion/completions/aptss create mode 100755 tool/aptss delete mode 100755 tool/ss-apt-fast delete mode 100644 tool/update-upgrade/autostart/spark-update-notifier.desktop rename tool/update-upgrade/{ss-update-notify-placer.sh => ss-update-notifier.sh} (65%) delete mode 100755 tool/update-upgrade/ss-update-notify.sh delete mode 100755 tool/ussinstall delete mode 100755 tool/ussremove diff --git a/debian/changelog b/debian/changelog index f115a35..cd87366 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +spark-store (3.1.5-4) stable; urgency=medium + + * 更改ss-apt-fast策略,现在只会在update,ssupdate和没有检测到配置文件的时候更新配置文件 + * 新增ss-apt-fast别名:aptss + * 更新检测服务优化:从分体改为一体 + * aptss 支持自动补全 + +-- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (3.1.5-3) stable; urgency=medium * 包内自带密钥 diff --git a/debian/spark-store.postinst b/debian/spark-store.postinst index 723d775..d561a6d 100755 --- a/debian/spark-store.postinst +++ b/debian/spark-store.postinst @@ -2,6 +2,12 @@ case "$1" in configure) + + # config for aptss + mkdir -p /etc/aptss/sources.list.d + ln -s -f /etc/apt/sources.list /etc/aptss/sources.list + + # Check if /usr/local/bin existed mkdir -p /usr/local/bin @@ -11,7 +17,9 @@ case "$1" in ln -s -f /opt/durapps/spark-store/bin/spark-store /usr/local/bin/spark-store ln -s -f /opt/durapps/spark-store/bin/ssinstall /usr/local/bin/ssinstall ln -s -f /opt/durapps/spark-store/bin/spark-dstore-patch /usr/local/bin/spark-dstore-patch - ln -s -f /opt/durapps/spark-store/bin/ss-apt-fast /usr/local/bin/ss-apt-fast + ln -s -f /opt/durapps/spark-store/bin/aptss /usr/local/bin/ss-apt-fast + + ln -s -f /opt/durapps/spark-store/bin/aptss /usr/bin/aptss @@ -22,21 +30,12 @@ case "$1" in cp -f /tmp/spark-store-install/spark-store.asc.gpg /etc/apt/trusted.gpg.d/spark-store.gpg - # Remove existing source file - rm -f /etc/apt/preferences.d/sparkstore - # Run apt update to avoid users being fucked up by the non-exist dependency problem - curl --progress-bar -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" - # 下载源列表 - 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" - # 更新 + aptss ssupdate - # Create symbo links to start upgrade detect - ln -s /opt/durapps/spark-store/bin/update-upgrade/autostart/spark-update-notifier.desktop /etc/xdg/autostart/spark-update-notifier.desktop - # Start upgrade detect service systemctl enable spark-update-notifier service spark-update-notifier start diff --git a/debian/spark-store.prerm b/debian/spark-store.prerm index 6998d1a..2d7f696 100755 --- a/debian/spark-store.prerm +++ b/debian/spark-store.prerm @@ -7,10 +7,12 @@ rm /usr/local/bin/spark-dstore-patch rm /usr/local/bin/ussinstall rm /usr/local/bin/ussremove rm /usr/local/bin/ss-apt-fast +rm /usr/bin/aptss +rm -rf /etc/aptss/ # Remove residual symbol links to stop upgrade detect if exist -if [ -f /etc/xdg/autostart/spark-update-notifier.desktop ];then +if [ -e /etc/xdg/autostart/spark-update-notifier.desktop ];then rm /etc/xdg/autostart/spark-update-notifier.desktop fi @@ -22,11 +24,6 @@ systemctl disable spark-update-notifier -# Clean the update-number service place file if exist -if [ -d "/tmp/spark-store-updatenum/" ] ; then - rm -rf /tmp/spark-store-updatenum/ -fi - # Clean the auto install polkit file if exist if [ -f "/usr/share/polkit-1/actions/store.spark-app.ssinstall.policy" ] ; then rm /usr/share/polkit-1/actions/store.spark-app.ssinstall.policy diff --git a/pkg/etc/apt/sources.list.d/sparkstore.list b/pkg/etc/aptss/sources.list.d/sparkstore.list similarity index 100% rename from pkg/etc/apt/sources.list.d/sparkstore.list rename to pkg/etc/aptss/sources.list.d/sparkstore.list diff --git a/pkg/usr/lib/systemd/system/spark-update-notifier.service b/pkg/usr/lib/systemd/system/spark-update-notifier.service index 90f6841..de8f8fa 100644 --- a/pkg/usr/lib/systemd/system/spark-update-notifier.service +++ b/pkg/usr/lib/systemd/system/spark-update-notifier.service @@ -6,7 +6,7 @@ After=apt-daily.service network.target network-online.target systemd-networkd.se [Service] Type=simple RemainAfterExit=yes -ExecStart=/opt/durapps/spark-store/bin/update-upgrade/ss-update-notify-placer.sh +ExecStart=/opt/durapps/spark-store/bin/update-upgrade/ss-update-notifier.sh Restart=on-failure RestartSec=10 diff --git a/pkg/usr/share/bash-completion/completions/aptss b/pkg/usr/share/bash-completion/completions/aptss new file mode 100644 index 0000000..4afc938 --- /dev/null +++ b/pkg/usr/share/bash-completion/completions/aptss @@ -0,0 +1,228 @@ +# Debian apt(8) completion -*- shell-script -*- + +_aptss() +{ + local sourcesdir="/etc/apt/sources.list.d" + local cur prev words cword + _init_completion || return + + local GENERIC_APT_GET_OPTIONS=' + -d --download-only + -y --assume-yes + --assume-no + -u --show-upgraded + -m --ignore-missing + -t --target-release + --download + --fix-missing + --ignore-hold + --upgrade + --only-upgrade + --allow-change-held-packages + --allow-remove-essential + --allow-downgrades + --print-uris + --trivial-only + --remove + --arch-only + --allow-unauthenticated + --allow-insecure-repositories + --install-recommends + --install-suggests + --no-install-recommends + --no-install-suggests + --fix-policy + ' + + # see if the user selected a command already + local COMMANDS=( + "ssupdate" + "list" + "search" + "show" "showsrc" + "install" "remove" "purge" "autoremove" + "update" + "upgrade" "full-upgrade" "dist-upgrade" + "edit-sources" + "help" + "source" "build-dep" + "clean" "autoclean" + "download" "changelog" + "moo" + "depends" "rdepends" + "policy") + + local command i + for (( i=0; i < ${#words[@]}-1; i++ )); do + if [[ ${COMMANDS[@]} =~ ${words[i]} ]]; then + command=${words[i]} + break + fi + done + + # Complete a -t + case $prev in + -t|--target-release) + COMPREPLY=( $( compgen -W "$( apt-cache policy -o Dir::Cache="/etc/aptss/" | egrep -o 'a=[^,]*|n=[^,]*' | cut -f2- -d= | sort -u)" -- "$cur" ) ) + return 0 + ;; + esac + + # supported options per command + if [[ "$cur" == -* ]]; then + case $command in + install|remove|purge|upgrade|dist-upgrade|full-upgrade|autoremove) + COMPREPLY=( $( compgen -W '--show-progress + --fix-broken --purge --verbose-versions --auto-remove + -s --simulate --dry-run + --download + --fix-missing + --fix-policy + --ignore-hold + --force-yes + --trivial-only + --reinstall --solver + -t --target-release'"$GENERIC_APT_GET_OPTIONS" -- "$cur" ) ) + return 0 + ;; + update) + COMPREPLY=( $( compgen -W '--list-cleanup + --print-uris + --allow-insecure-repositories + ' -- "$cur" ) ) + return 0 + ;; + list) + COMPREPLY=( $( compgen -W '--installed --upgradable + --manual-installed + -v --verbose + -a --all-versions + -t --target-release + ' -- "$cur" ) ) + return 0 + ;; + show) + COMPREPLY=( $( compgen -W '-a --all-versions + ' -- "$cur" ) ) + return 0 + ;; + depends|rdepends) + COMPREPLY=( $( compgen -W '-i + --important + --installed + --pre-depends + --depends + --recommends + --suggests + --replaces + --breaks + --conflicts + --enhances + --recurse + --implicit' -- "$cur" ) ) + return 0 + ;; + search) + COMPREPLY=( $( compgen -W ' + -n --names-only + -f --full' -- "$cur" ) ) + return 0 + ;; + showsrc) + COMPREPLY=( $( compgen -W ' + --only-source' -- "$cur" ) ) + return 0 + ;; + source) + COMPREPLY=( $( compgen -W ' + -s --simulate --dry-run + -b --compile --build + -P --build-profiles + --diff-only --debian-only + --tar-only + --dsc-only + -t --target-release + '"$GENERIC_APT_GET_OPTIONS" -- "$cur" ) ) + return 0 + ;; + build-dep) + COMPREPLY=( $( compgen -W ' + -a --host-architecture + -s --simulate --dry-run + -P --build-profiles + -t --target-release + --purge --solver + '"$GENERIC_APT_GET_OPTIONS" -- "$cur" ) ) + return 0 + ;; + moo) + COMPREPLY=( $( compgen -W ' + --color + ' -- "$cur" ) ) + return 0 + ;; + clean|autoclean) + COMPREPLY=( $( compgen -W ' + -s --simulate --dry-run + ' -- "$cur" ) ) + return 0 + ;; + esac + fi + + # specific command arguments + if [[ -n $command ]]; then + case $command in + remove|purge|autoremove) + if [[ -f /etc/debian_version ]]; then + # Debian system + COMPREPLY=( $( \ + _xfunc dpkg _comp_dpkg_installed_packages $cur ) ) + else + # assume RPM based + _xfunc rpm _rpm_installed_packages + fi + return 0 + ;; + show|list|download|changelog|depends|rdepends) + COMPREPLY=( $( apt-cache --no-generate pkgnames "$cur" -o Dir::Cache="/etc/aptss/" \ + 2> /dev/null ) ) + return 0 + ;; + install) + COMPREPLY=( $( apt-cache --no-generate pkgnames "$cur" -o Dir::Cache="/etc/aptss/" \ + 2> /dev/null ) ) + if [[ "$cur" == ./* || "$cur" == /* ]]; then + _filedir "deb" + fi + return 0 + ;; + source|build-dep|showsrc|policy) + COMPREPLY=( $( apt-cache --no-generate pkgnames "$cur" -o Dir::Cache="/etc/aptss/" \ + 2> /dev/null ) $( apt-cache dumpavail -o Dir::Cache="/etc/aptss/" | \ + command grep "^Source: $cur" | sort -u | cut -f2 -d" " ) ) + return 0 + ;; + edit-sources) + COMPREPLY=( $( compgen -W '$( command ls $sourcesdir )' \ + -- "$cur" ) ) + return 0 + ;; + moo) + COMPREPLY=( $( compgen -W 'moo' \ + -- "$cur" ) ) + return 0 + ;; + esac + fi + + # no command yet, show what commands we have + if [ "$command" = "" ]; then + COMPREPLY=( $( compgen -W '${COMMANDS[@]}' -- "$cur" ) ) + fi + + return 0 +} && +complete -F _aptss aptss + +# ex: ts=4 sw=4 et filetype=sh diff --git a/spark-store-project.pro b/spark-store-project.pro index 59a3657..b3d5916 100644 --- a/spark-store-project.pro +++ b/spark-store-project.pro @@ -21,11 +21,14 @@ tool.path = /opt/durapps/$${TARGET}/bin qm.files += translations/*.qm qm.path = /usr/share/spark-store/translations -preferences.files += pkg/etc/apt/preferences.d/sparkstore -preferences.path = /etc/apt/preferences.d +#preferences.files += pkg/etc/apt/preferences.d/sparkstore +#preferences.path = /etc/apt/preferences.d -sourceslist.files += pkg/etc/apt/sources.list.d/sparkstore.list -sourceslist.path = /etc/apt/sources.list.d +#sourceslist.files += pkg/etc/apt/sources.list.d/sparkstore.list +#sourceslist.path = /etc/apt/sources.list.d + +bash_completion.files += pkg/usr/share/bash-completion/completions/aptss +bash_completion.path = /usr/share/bash-completion/completions desktop.files += pkg/usr/share/applications/spark-store.desktop desktop.path = /usr/share/applications @@ -49,9 +52,9 @@ INSTALLS += \ qm \ desktop \ icon \ - sourceslist \ preferences \ tmp \ - service + service \ + bash_completion # polkit-1 # 暂时不添加 diff --git a/src/main.cpp b/src/main.cpp index ca51496..044cc9d 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.1.5-3")); + dialog.setVersion(DApplication::buildVersion("Version 3.1.5-4")); 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.1.5-3")); + a.setApplicationVersion(DApplication::buildVersion("3.1.5-4")); a.setApplicationAcknowledgementPage("https://gitee.com/deepin-community-store/spark-store"); a.setApplicationDescription( QObject::tr( diff --git a/tool/aptss b/tool/aptss new file mode 100755 index 0000000..a485080 --- /dev/null +++ b/tool/aptss @@ -0,0 +1,73 @@ +#/bin/bash + + + + + +if [ "$1" = "install" ] || [ "$1" = "upgrade" ] || [ "$1" = "full-upgrade" ] || [ "$1" = "download" ] ; then + +if [ ! -e "/tmp/aptss-conf/apt-fast.conf" ];then +###刷新apt-fast配置 +mkdir -p /tmp/aptss-conf/ +echo "从服务器获取配置和镜像列表..." +echo "Getting server and mirror lists..." +echo +curl --progress-bar -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 + +fi + +DEPEND=`which apt-fast` +if [ "$DEPEND" = "" ] ; then +echo "未安装依赖:apt-fast 开始安装" +sudo aptss ssupdate && 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 install apt-fast -y +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-fast "$@" --allow-downgrades + + +elif [ "$1" = "ssupdate" ];then + +mkdir -p /tmp/aptss-conf/ +echo "从服务器获取配置和镜像列表..." +echo "Getting server and mirror lists..." +echo +curl --progress-bar -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 --progress-bar -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" +### 额外一份拿来给aptss自动补全用 +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" +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 Dir::Cache="/etc/aptss/" -o APT::Get::List-Cleanup="0" +#只更新星火源 + +elif [ "$1" = "update" ];then +sudo curl --progress-bar -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" + + +mkdir -p /tmp/aptss-conf/ +echo "从服务器获取配置和镜像列表..." +echo "Getting server and mirror lists..." +echo +curl --progress-bar -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 +### 额外一份拿来给aptss自动补全用 +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 "$@" -o APT::Get::List-Cleanup="0" + +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 "$@" -o APT::Get::List-Cleanup="0" -o Dir::Cache="/etc/aptss/" + +else + 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 "$@" +fi + + diff --git a/tool/ss-apt-fast b/tool/ss-apt-fast deleted file mode 100755 index 8e3299f..0000000 --- a/tool/ss-apt-fast +++ /dev/null @@ -1,42 +0,0 @@ -#/bin/bash - - - - -if [ "$1" = "install" ] || [ "$1" = "upgrade" ] || [ "$1" = "full-upgrade" ] || [ "$1" = "download" ] ; then - -###刷新apt-fast配置 -mkdir -p /tmp/ss-apt-fast-conf/sources.list.d -# 创建文件夹 -echo "从服务器获取配置和镜像列表..." -echo "Getting server and mirror lists..." -echo -curl --progress-bar -o /tmp/ss-apt-fast-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/ss-apt-fast-conf - - -DEPEND=`which apt-fast` -if [ "$DEPEND" = "" ] ; then -echo "未安装依赖:apt-fast 开始安装" -sudo ss-apt-fast ssupdate && 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 install apt-fast -y -fi -###执行安装 -bwrap --dev-bind / / \ - --bind '/tmp/ss-apt-fast-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-fast "$@" --allow-downgrades - -rm -rf /tmp/ss-apt-fast-conf - -elif [ "$1" = "ssupdate" ];then -sudo curl --progress-bar -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" -#只更新星火源 - -else - 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 "$@" -fi - - diff --git a/tool/ssinstall b/tool/ssinstall index 34d0932..db7ee0a 100755 --- a/tool/ssinstall +++ b/tool/ssinstall @@ -50,22 +50,22 @@ if [ "$(id -u)" != "0" ];then IS_INSTALLED=`which apt-fast` if [ "$IS_INSTALLED" = "" ] ; then echo "未安装依赖:apt-fast 开始安装" -echo "$upass" | sudo -S /usr/local/bin/ss-apt-fast ssupdate && echo "$upass" | sudo -S 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 install apt-fast -y +echo "$upass" | sudo -S aptss ssupdate && echo "$upass" | sudo -S 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 install apt-fast -y fi if [ "$DEPEND" != "" ] && [ "$isuos" != "" ]; then echo "UOS中系统依赖无法使用第三方下载工具,放弃使用apt-fast" echo ---------------------------------------------------------------------------------- -echo "$upass" | sudo -S dpkg -i $1 || sudo /usr/local/bin/ss-apt-fast ssupdate && 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 install -yf +echo "$upass" | sudo -S dpkg -i $1 || sudo aptss ssupdate && 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 install -yf fi if [ "$DEPEND" != "" ] && [ "$isuos" = "" ]; then -echo "检测到apt-fast,使用/usr/local/bin/ss-apt-fast进行多线程下载加速" +echo "检测到apt-fast,使用aptss进行多线程下载加速" echo ---------------------------------------------------------------------------------- -echo "$upass" | sudo -S dpkg -i $1 || sudo /usr/local/bin/ss-apt-fast ssupdate && sudo /usr/local/bin/ss-apt-fast install -yf +echo "$upass" | sudo -S dpkg -i $1 || sudo aptss ssupdate && sudo aptss install -yf fi @@ -78,19 +78,19 @@ else IS_INSTALLED=`which apt-fast` if [ "$IS_INSTALLED" = "" ] ; then echo "未安装依赖:apt-fast 开始安装" -/usr/local/bin/ss-apt-fast ssupdate && 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 install apt-fast -y +aptss ssupdate && 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 install apt-fast -y fi if [ "$DEPEND" != "" ] && [ "$isuos" != "" ]; then echo "UOS中系统依赖无法使用第三方下载工具,放弃使用apt-fast" echo ---------------------------------------------------------------------------------- -dpkg -i $1 || /usr/local/bin/ss-apt-fast ssupdate && 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 && 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 install -yf +dpkg -i $1 || aptss ssupdate && 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 install -yf fi if [ "$DEPEND" != "" ] && [ "$isuos" = "" ]; then -echo "检测到apt-fast,使用/usr/local/bin/ss-apt-fast进行多线程下载加速" +echo "检测到apt-fast,使用aptss进行多线程下载加速" echo ---------------------------------------------------------------------------------- -dpkg -i $1 || /usr/local/bin/ss-apt-fast ssupdate && /usr/local/bin/ss-apt-fast install -yf +dpkg -i $1 || aptss ssupdate && aptss install -yf fi diff --git a/tool/update-upgrade/autostart/spark-update-notifier.desktop b/tool/update-upgrade/autostart/spark-update-notifier.desktop deleted file mode 100644 index d458c3b..0000000 --- a/tool/update-upgrade/autostart/spark-update-notifier.desktop +++ /dev/null @@ -1,5 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Type=Application -Exec=/opt/durapps/spark-store/bin/update-upgrade/ss-update-notify.sh -Name=spark-update-notifier diff --git a/tool/update-upgrade/ss-do-upgrade.sh b/tool/update-upgrade/ss-do-upgrade.sh index e599646..3e10b0c 100755 --- a/tool/update-upgrade/ss-do-upgrade.sh +++ b/tool/update-upgrade/ss-do-upgrade.sh @@ -16,14 +16,14 @@ echo "UOS中系统依赖无法使用第三方下载工具,使用apt-fast下载 for PKG_NAME in $PKG_LIST; do echo "$PKG_NAME 正在下载..." - sudo /usr/local/bin/ss-apt-fast download "$PKG_NAME" -y >/dev/null 2>&1; + sudo aptss download "$PKG_NAME" -y >/dev/null 2>&1; done echo "----开始安装" for PKG_NAME in $PKG_LIST; do echo "$PKG_NAME 正在准备更新..." - if 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 install "$PKG_NAME" -y >/dev/null 2>&1; + if 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 install "$PKG_NAME" -y >/dev/null 2>&1; then echo "$PKG_NAME 已更新" else @@ -38,7 +38,7 @@ else ###这是确定是否为UOS for PKG_NAME in $PKG_LIST; do echo "$PKG_NAME 正在准备更新..." - if sudo /usr/local/bin/ss-apt-fast install "$PKG_NAME" -y >/dev/null 2>&1; + if sudo aptss install "$PKG_NAME" -y >/dev/null 2>&1; then echo "$PKG_NAME 已更新" else diff --git a/tool/update-upgrade/ss-update-controler.sh b/tool/update-upgrade/ss-update-controler.sh index bcd8c46..3bc5134 100755 --- a/tool/update-upgrade/ss-update-controler.sh +++ b/tool/update-upgrade/ss-update-controler.sh @@ -51,20 +51,15 @@ case $option in ;; 1) echo "执行以下操作需要授权..." - if [ -f /etc/xdg/autostart/spark-update-notifier.desktop ];then + if [ -e /etc/systemd/system/multi-user.target.wants/spark-update-notifier.service ];then echo "---检测到已经启动了自动更新检测,执行关闭" sudo systemctl disable spark-update-notifier - sudo rm /etc/xdg/autostart/spark-update-notifier.desktop sleep 3 reset else echo "---未检测到自动更新检测,执行启动" sudo systemctl enable spark-update-notifier sudo service spark-update-notifier start -# ln -s /opt/durapps/spark-store/bin/update-upgrade/autostart/spark-update-notifier.desktop $XDG_CONFIG_HOME/autostart -# - sudo ln -s /opt/durapps/spark-store/bin/update-upgrade/autostart/spark-update-notifier.desktop /etc/xdg/autostart - /opt/durapps/spark-store/bin/update-upgrade/ss-update-notify.sh now sleep 3 reset fi @@ -72,8 +67,8 @@ case $option in 2) echo "执行以下操作需要授权..." - sudo ss-apt-fast ssupdate - /opt/durapps/spark-store/bin/update-upgrade/ss-upgrade-list.sh + sudo aptss ssupdate + /opt/durapps/spark-store/bin/update-upgrade/ss-upgrade-list.sh /opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade.sh echo "---请按回车返回" read diff --git a/tool/update-upgrade/ss-update-notify-placer.sh b/tool/update-upgrade/ss-update-notifier.sh similarity index 65% rename from tool/update-upgrade/ss-update-notify-placer.sh rename to tool/update-upgrade/ss-update-notifier.sh index 4cd29f4..9850b19 100755 --- a/tool/update-upgrade/ss-update-notify-placer.sh +++ b/tool/update-upgrade/ss-update-notifier.sh @@ -1,9 +1,19 @@ #!/bin/bash set -e -rm -rf /tmp/spark-store-updatenum/number LANG=en.US -#!/bin/bash +function notify-send() { + #Detect the name of the display in use + local display=":$(ls /tmp/.X11-unix/* | sed 's#/tmp/.X11-unix/X##' | head -n 1)" + + #Detect the user using such display + local user=$(who | grep '('$display')' | awk '{print $1}' | head -n 1) + + #Detect the id 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 "$@" +} #检测网络链接畅通 function network() @@ -39,7 +49,7 @@ fi curl --progress-bar -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" # 每日更新星火源文件 -updatetext=`ss-apt-fast ssupdate` +updatetext=`aptss ssupdate` mkdir -p /tmp/spark-store-updatenum/ @@ -47,14 +57,14 @@ mkdir -p /tmp/spark-store-updatenum/ isupdate=`echo ${updatetext: -5}` if [ "$isupdate" = "date." ];then -sudo echo "0" > /tmp/spark-store-updatenum/number exit 0 fi update_app_number=`echo ${updatetext%package*} #从右向左截取第一个 src 后的字符串` update_app_number=`echo ${update_app_number##*information...}` -sudo echo "$update_app_number" > /tmp/spark-store-updatenum/number - + +notify-send -i spark-store "星火更新提醒" "星火商店仓库中有$update_app_number个软件包可以更新啦!请到星火商店的菜单处理" + diff --git a/tool/update-upgrade/ss-update-notify.sh b/tool/update-upgrade/ss-update-notify.sh deleted file mode 100755 index ab8d13c..0000000 --- a/tool/update-upgrade/ss-update-notify.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash -set -e -isexistnumber=0 -if [ "$1" = "now" ];then - if [ -f /tmp/spark-store-updatenum/number ];then - update_app_number=`cat /tmp/spark-store-updatenum/number` - echo "$update_app_number" - if [ "$update_app_number" = "0" ];then - exit 0 - fi - notify-send -i spark-store "星火更新提醒" "星火商店仓库中有$update_app_number个软件包可以更新啦!请到星火商店的菜单处理" - fi -exit 0 -fi - -until [ $isexistnumber -eq 1 ];do -if [ -f /tmp/spark-store-updatenum/number ];then - sleep 10 - update_app_number=`cat /tmp/spark-store-updatenum/number` - echo "$update_app_number" - if [ "$update_app_number" = "0" ];then - exit 0 - fi - notify-send -i spark-store "星火更新提醒" "星火商店仓库中有$update_app_number个软件包可以更新啦!请到星火商店的菜单处理" - isexistnumber=1 -fi -sleep 10 -done diff --git a/tool/update-upgrade/ss-upgrade-list.sh b/tool/update-upgrade/ss-upgrade-list.sh index d708adc..83d62a8 100755 --- a/tool/update-upgrade/ss-upgrade-list.sh +++ b/tool/update-upgrade/ss-upgrade-list.sh @@ -3,4 +3,4 @@ set -e echo "---可更新的应用有:" -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 list --upgradable -o Dir::Etc::sourcelist="sources.list.d/sparkstore.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0" +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 list --upgradable -o Dir::Etc::sourcelist="sources.list.d/sparkstore.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0" diff --git a/tool/ussinstall b/tool/ussinstall deleted file mode 100755 index 600c97e..0000000 --- a/tool/ussinstall +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/bash - -reset - -echo "Copyright (c) 2019-2021 The Spark Project" - -if [ -x "/usr/bin/deepin-deb-installer" ] ; then - echo "深度软件包安装器已安装,开始检测证书" -else - echo "未安装深度软件包安装器,拒绝执行" - echo "UOS需要深度软件包安装器来认证签名" - echo "如果你用的是UOS,你能卸载这玩意说明你已经开了开发者模式......悄悄告诉你,放屁是不用脱裤子的!" - echo "如果你用的不是统信系发行版......所以你为什么要打开这个脚本?" - exit 1 -fi - -if [ -f "/usr/share/ca-certificates/deepin/private/priv.crt" ] ; then - echo "检测到已经生成过证书,直接跳过询问" -else - until [ -f "/usr/bin/cert-tool" ] ; do - #强制未安装证书工具的不通过 - echo "该工具的原理是利用UOS的自签名安装包免开发者的特性,需要您的UOS ID账号和密码,请在使用工具前确保在应用商店中已安装过“证书工具”这个应用" - echo "如果没有安装,则无法使用。请确认安装后再进行下一步操作" - sleep 3 - echo "如果你确认已经安装了该应用,请按回车" - read renyijian - - #检测是否在说谎签名文件 - if [ -f "/usr/bin/cert-tool" ] ; then - echo "成功检测到cert-tool存在,开始检测证书\n" - else - echo "没有检测到该应用,请您再次确认“证书工具”已经安装!" - sleep 3 - clear - fi - done - - until [ -f "/usr/share/ca-certificates/deepin/private/priv.crt" ] ; do - echo "没有检测到证书,准备调用证书工具生成证书,请输入您的UOS账号/密码。本脚本不会上传任何信息" - echo "请在此行输入您的UOS账号用户名/电话号/邮箱" - read -e account - echo "请在此行输入您的UOS账号密码" - read -e passwd - echo "即将安装证书,请在弹出的窗口安装" - cert-tool -username="$account" -password="$passwd" - done - echo "检测到已经生成过证书,准备签名" -fi -#这个if是判断是否已经有证书 - -unset account -unset passwd -unset renyijian - -debpath="" -cd /tmp - -until [ -f "$debpath" ] ; do - if [ ! $1 ] ; then - echo "没有检测到参数,以交互式安装运行" - echo "请输入deb文件的绝对路径或直接拖入deb文件(仅限支持的文件管理器,比如深度文管),结束后回车" - echo "生成的签名过的deb将保存在/tmp/signed_deb" - read debpath - else - echo "参数存在,直接开始签名\n生成的签名过的deb保存在/tmp/signed_deb" - debpath="$1" - echo "读取到的deb路径为:$debpath" - fi - debpath=`echo "$debpath" | sed $'s/\'//g'` - echo "去除可能的单引号后得到:$debpath" - - if [ -f $debpath ] ; then - echo "文件有效,开始签名" - echo "------------以下为签名工具输出------------" - deepin-elf-sign-deb "$debpath" - echo "------------签名工具输出已结束------------" - echo "签名结束,启动深度软件包管理器" - else - echo "路径出错,请确认你输入了正确的路径!" - sleep 3 - clear - fi -done - -file_name=$(basename "$debpath") - -echo "--------以下为深度软件包安装器输出--------" -deepin-deb-installer "/tmp/signed_deb/$file_name" -echo "--------深度软件包安装器输出已结束--------" -echo "删除临时文件" -rm /tmp/signed_deb/$file_name \ No newline at end of file diff --git a/tool/ussremove b/tool/ussremove deleted file mode 100755 index 3f5ce26..0000000 --- a/tool/ussremove +++ /dev/null @@ -1,142 +0,0 @@ -#!/bin/bash - -reset - -echo "Copyright (c) 2019-2021 The Spark Project" - -if [ -x "/usr/bin/deepin-deb-installer" ] ; then - echo "深度软件包安装器已安装,开始检测证书" -else - echo "未安装深度软件包安装器,拒绝执行" - echo "UOS需要深度软件包安装器来认证签名" - echo "如果你用的是UOS,你能卸载这玩意说明你已经开了开发者模式......悄悄告诉你,放屁是不用脱裤子的!" - echo "如果你用的不是统信系发行版......所以你为什么要打开这个脚本?" - exit 1 -fi - -if [ -f "/usr/share/ca-certificates/deepin/private/priv.crt" ] ; then - echo "检测到已经生成过证书,直接跳过询问" -else - until [ -f "/usr/bin/cert-tool" ] ; do - #强制未安装证书工具的不通过 - echo "该工具的原理是利用UOS的自签名安装包免开发者的特性,需要您的UOS ID账号和密码,请在使用工具前确保在应用商店中已安装过“证书工具”这个应用" - echo "如果没有安装,则无法使用。请确认安装后再进行下一步操作" - echo "如果你确认已经安装了该应用,请按回车" - read renyijian - - #检测是否在说谎签名文件 - if [ -f "/usr/bin/cert-tool" ] ; then - echo "成功检测到cert-tool存在,开始检测证书\n" - else - echo "没有检测到该应用,请您再次确认“证书工具”已经安装!" - sleep 3 - clear - fi - done - - until [ -f "/usr/share/ca-certificates/deepin/private/priv.crt" ] ; do - echo "没有检测到证书,准备调用证书工具生成证书,请输入您的UOS账号/密码。本脚本不会上传任何信息" - echo "请在此行输入您的UOS账号用户名/电话号/邮箱" - read account - echo "请在此行输入您的UOS账号密码" - read passwd - echo "即将安装证书,请在弹出的窗口安装" - cert-tool -username="$account" -password="$passwd" - done - echo "检测到已经生成过证书,准备签名" -fi -#这个if是判断是否已经有证书 - -unset account -unset passwd -unset renyijian - -mkdir -p /tmp/spark-store-appremover -cd /tmp/spark-store-appremover -#工作目录应当为 /tmp/spark-store-appremover - -while [ ! $pkgname ] ; do - if [ ! $1 ] ; then - echo "没有检测到包名,以交互式模式运行" - echo "请输入你要卸载的软件包名,输入结束后回车" - read pkgname - else - echo "检测到包名,跳过获取" - pkgname="$1" - echo "读取到的包名为:$pkgname" - fi - - if [ ! $pkgname ] ; then - echo "没有检测到包名,请重新输入!" - sleep 3 - clear - else - echo "包名读取成功,进入下一步" - fi -done - -#while [ ! $version ] ; do -# if [ ! $2 ] ; then -# echo "没有检测到版本号,以交互式模式运行" -# echo "请输入你要卸载的软件包版本号,输入结束后回车" -# read version -# else -# echo "检测到包名,跳过获取" -# version="$2" -# echo "读取到的版本号为:$version" -# fi -# -# if [ ! $version ] ; then -# echo "没有检测到版本号,请重新输入!" -# sleep 3 -# clear -# else -# echo "版本号读取成功,进入下一步" -# fi -#done - -#发现版本号不一定一致也可以卸载 -version="1.0" -echo "开始生成deb包" -echo "输出的control文件为" -echo "" -echo "Package: $pkgname" -echo "Version: $version" -echo "Depends: " -echo "Maintainer: spark-store" -echo "Description: 这是一个假软件包,请点击卸载" -echo "Architecture: $(arch)" -echo "-----------------------开始生成-----------------------" -workdir=$(pwd) -echo "工作目录为$workdir" -mkdir DEBIAN -cd DEBIAN -touch control -echo "Package: $pkgname" >> ./control -echo "Version: $version" >> ./control -echo "Depends: " >> ./control -echo "Maintainer: spark-store" >> ./control -echo "Description: 这是一个假软件包,请点击卸载" >> ./control -echo "Architecture: $(arch)" >> ./control - -echo "-----------------------开始打包-----------------------" -cd .. -workdir=$(pwd) -echo "回退到工作目录,当前目录位于$workdir" -fakeroot dpkg -b . ./uninstall.deb -echo "-----------------------打包结束-----------------------" - -cd /tmp - -echo "-----------------------开始签名-----------------------" -deepin-elf-sign-deb "/tmp/spark-store-appremover/uninstall.deb" -echo "-----------------------签名结束-----------------------" -echo "-----------------启动深度软件包管理器-------------------" - -deepin-deb-installer "/tmp/signed_deb/uninstall.deb" - -file_name=$(basename "/tmp/signed_deb/uninstall.deb") -echo "---------------以上为深度软件包管理器输出----------------" -echo "删除临时包" -rm "/tmp/signed_deb/$file_name" -rm -r /tmp/spark-store-appremover From b856734843ea3f818cc65e62a54e13f552c510a1 Mon Sep 17 00:00:00 2001 From: shenmo Date: Fri, 19 Aug 2022 11:41:10 +0000 Subject: [PATCH 10/18] =?UTF-8?q?!86=20=09=E4=BF=AE=E6=94=B9=E6=96=87?= =?UTF-8?q?=E6=A1=88=20=20=20=20=20tool/update-upgrade/ss-do-upgrade.sh=20?= =?UTF-8?q?*=20=09=E4=BF=AE=E6=94=B9=E6=96=87=E6=A1=88=20=20=20=20=20tool/?= =?UTF-8?q?update-upgrade/ss-do-upgrade.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tool/update-upgrade/ss-do-upgrade.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tool/update-upgrade/ss-do-upgrade.sh b/tool/update-upgrade/ss-do-upgrade.sh index 3e10b0c..be5a580 100755 --- a/tool/update-upgrade/ss-do-upgrade.sh +++ b/tool/update-upgrade/ss-do-upgrade.sh @@ -22,7 +22,7 @@ echo "UOS中系统依赖无法使用第三方下载工具,使用apt-fast下载 echo "----开始安装" for PKG_NAME in $PKG_LIST; do - echo "$PKG_NAME 正在准备更新..." + echo "$PKG_NAME 正在更新..." if 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 install "$PKG_NAME" -y >/dev/null 2>&1; then echo "$PKG_NAME 已更新" @@ -33,11 +33,11 @@ echo "UOS中系统依赖无法使用第三方下载工具,使用apt-fast下载 -else ###这是确定是否为UOS +else ###这是确定是否为UOS,如果不是 for PKG_NAME in $PKG_LIST; do - echo "$PKG_NAME 正在准备更新..." + echo "$PKG_NAME 正在更新..." if sudo aptss install "$PKG_NAME" -y >/dev/null 2>&1; then echo "$PKG_NAME 已更新" From 3b349d43ad0725313cc03a973439421b63dce1ba Mon Sep 17 00:00:00 2001 From: shenmo Date: Mon, 22 Aug 2022 02:38:28 +0000 Subject: [PATCH 11/18] =?UTF-8?q?!87=20=E6=B5=81=E6=B0=B4=E7=BA=BF=20*=20u?= =?UTF-8?q?pdate=20dtk-build-commit-20220425.yml=20*=20update=20dtk-build-?= =?UTF-8?q?commit-20220425.yml=20*=20update=20dtk-build-commit-20220425.ym?= =?UTF-8?q?l=20*=20update=20dtk-build-commit-20220425.yml=20*=20update=20d?= =?UTF-8?q?tk-build-commit-20220425.yml=20*=20update=20dtk-build-commit-20?= =?UTF-8?q?220425.yml=20*=20update=20dtk-build-commit-20220425.yml=20*=20u?= =?UTF-8?q?pdate=20dtk-build-commit-20220425.yml=20*=20create=20dtk-build-?= =?UTF-8?q?commit-20220425.yml=20*=20=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6?= =?UTF-8?q?=20.workflow/master-pipeline.yml=20*=20=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=96=87=E4=BB=B6=20.workflow/dtk-build-commit-20220425.yml=20?= =?UTF-8?q?*=20update=20.workflow/dtk-build-commit-20220425.yml.=20*=20upd?= =?UTF-8?q?ate=20dtk-build-commit-20220425.yml=20*=20update=20dtk-build-co?= =?UTF-8?q?mmit-20220425.yml=20*=20update=20dtk-build-commit-20220425.yml?= =?UTF-8?q?=20*=20update=20dtk-build-commit-20220425.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .workflow/dtk-build-commit-20220425.yml | 42 +++++++++++++++++++++++++ .workflow/master-pipeline.yml | 35 --------------------- 2 files changed, 42 insertions(+), 35 deletions(-) create mode 100644 .workflow/dtk-build-commit-20220425.yml delete mode 100644 .workflow/master-pipeline.yml diff --git a/.workflow/dtk-build-commit-20220425.yml b/.workflow/dtk-build-commit-20220425.yml new file mode 100644 index 0000000..0d83aa5 --- /dev/null +++ b/.workflow/dtk-build-commit-20220425.yml @@ -0,0 +1,42 @@ +version: '1.0' +name: dtk-build-commit-20220425 +displayName: dtk-build-commit +triggers: + trigger: manual + push: + branches: + prefix: + - master + tags: + prefix: + - '' +stages: + - name: stage-4e566164 + displayName: build + strategy: naturally + trigger: auto + executor: [] + steps: + - step: execute@docker + name: execute_by_docker + displayName: 基于镜像的脚本执行 + certificate: '' + image: docker.io/debian:buster-slim + command: + - sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list + - '# 换源' + - apt update + - export DEBIAN_FRONTEND=noninteractive + - echo "安装git devscripts equivs ..." + - apt install git devscripts equivs curl -y >/dev/null 2>&1 + - git clone https://gitlink.org.cn/shenmo7192/dtk-old-bundle.git + - cd dtk-old-bundle + - apt install ./*.deb -y + - cd .. + - rm -rf dtk-old-bundle + - 'mk-build-deps --install --tool "apt-get -o Debug::pkgProblemResolver=yes -y" ' + - dpkg-buildpackage -b -us -uc + - cd .. + - ls -all + - pwd + strategy: {} diff --git a/.workflow/master-pipeline.yml b/.workflow/master-pipeline.yml deleted file mode 100644 index 72fe4cb..0000000 --- a/.workflow/master-pipeline.yml +++ /dev/null @@ -1,35 +0,0 @@ -version: '1.0' -name: dtk-build-commit-20220425 -displayName: dtk-build-commit -triggers: - trigger: manual - push: - branches: - prefix: - - master - tags: - prefix: - - '' -stages: - - name: stage-4e566164 - displayName: build - strategy: naturally - trigger: auto - executor: [] - steps: - - step: execute@docker - name: execute_by_docker - displayName: 基于镜像的脚本执行 - certificate: d3a72e50-a6b5-013a-3031-5e77c3ac149e - image: hub.docker.com/r/shenmo7192/uos-21-dtk5.4 - command: - - git clone https://gitee.com/deepin-community-store/spark-store - - mkdir debs - - cd spark-store - - dpkg-buildpackage - - mv *.deb ../debs - - cd ../debs - - curl -s --url "smtp://smtp.163.com" --mail-from "sparkstorefeedback@163.com" --mail-rcpt "shenmo@spark-app.store" --upload-file ./*.deb --user "sparkstorefeedback@163.com:YWYGLQNOPLWNNJJY" -permissions: - - role: admin - members: [] From 379c5a857df3bf474cbfa3ef934770368b9aa6e8 Mon Sep 17 00:00:00 2001 From: shenmo Date: Mon, 22 Aug 2022 03:08:46 +0000 Subject: [PATCH 12/18] =?UTF-8?q?!88=20=E4=BF=AE=E6=94=B9ci=E7=AD=96?= =?UTF-8?q?=E7=95=A5=EF=BC=9A=E8=87=AA=E5=8A=A8=E8=A7=A6=E5=8F=91=20*=20up?= =?UTF-8?q?date=20dtk-build-commit-20220425.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .workflow/dtk-build-commit-20220425.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.workflow/dtk-build-commit-20220425.yml b/.workflow/dtk-build-commit-20220425.yml index 0d83aa5..5e773f4 100644 --- a/.workflow/dtk-build-commit-20220425.yml +++ b/.workflow/dtk-build-commit-20220425.yml @@ -2,7 +2,7 @@ version: '1.0' name: dtk-build-commit-20220425 displayName: dtk-build-commit triggers: - trigger: manual + trigger: auto push: branches: prefix: From 0da714b35a31088a45c9f4c763e7e9e53d6096a2 Mon Sep 17 00:00:00 2001 From: shenmo Date: Mon, 22 Aug 2022 08:43:47 +0000 Subject: [PATCH 13/18] !90 modified: .workflow/dtk-build-commit-20220425.yml * modified: .workflow/dtk-build-commit-20220425.yml --- .workflow/dtk-build-commit-20220425.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.workflow/dtk-build-commit-20220425.yml b/.workflow/dtk-build-commit-20220425.yml index 5e773f4..4dcd9a6 100644 --- a/.workflow/dtk-build-commit-20220425.yml +++ b/.workflow/dtk-build-commit-20220425.yml @@ -3,13 +3,11 @@ name: dtk-build-commit-20220425 displayName: dtk-build-commit triggers: trigger: auto - push: + pr: branches: - prefix: - - master - tags: prefix: - '' + stages: - name: stage-4e566164 displayName: build From 8cefdbaca0cb56624b70ecda973de8dc5892fb3a Mon Sep 17 00:00:00 2001 From: shenmo Date: Mon, 22 Aug 2022 08:48:55 +0000 Subject: [PATCH 14/18] !92 ci release * new file: .workflow/dtk-build-release-tag.yml --- .workflow/dtk-build-release-tag.yml | 63 +++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .workflow/dtk-build-release-tag.yml diff --git a/.workflow/dtk-build-release-tag.yml b/.workflow/dtk-build-release-tag.yml new file mode 100644 index 0000000..a8c2247 --- /dev/null +++ b/.workflow/dtk-build-release-tag.yml @@ -0,0 +1,63 @@ +version: '1.0' +name: dtk-build-release-tag-20220425 +displayName: dtk-build-release-tag +triggers: + trigger: manual + push: + tags: + prefix: + - '' +stages: + - name: stage-4e566164 + displayName: build + strategy: naturally + trigger: auto + executor: [] + steps: + - step: build@gcc + name: build_gcc + displayName: GCC 构建 + gccVersion: '9.4' + commands: + - sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list + - '# 换源' + - apt update + - echo "正在准备Debian 10环境..." + - apt install git -y >/dev/null 2>&1 + - git clone https://gitlink.org.cn/shenmo7192/debian-10-container.git + - mv debian-10-container/Debian-10.tar.xz /mnt + - cd /mnt/ + - tar -xf Debian-10.tar.xz + - cd Debian-10 + - wget https://gitee.com/deepin-community-store/repo_auto_update_script/raw/master/spark-build.sh + - chmod +x spark-build.sh + - echo "进入Debian 10环境" + - chroot /mnt/Debian-10 /bin/bash /spark-build.sh + - cd /mnt/Debian-10/build-spark + - 'mkdir target ' + - for f in $(find . -type f -name "*.deb") + - do + - ' mv $f target' + - done + artifacts: + - name: BUILD_ARTIFACT + path: + - /mnt/Debian-10/build-spark/target + caches: [] + notify: [] + strategy: + retry: '0' + - name: stage-29f3ffbb + displayName: 上传 + strategy: naturally + trigger: auto + executor: [] + steps: + - step: publish@general_artifacts + name: publish_general_artifacts + displayName: 上传制品 + dependArtifact: BUILD_ARTIFACT + artifactName: output + notify: [] + strategy: + retry: '0' From fecda522944cbc22a092693780738b8b908049f8 Mon Sep 17 00:00:00 2001 From: shenmo Date: Mon, 22 Aug 2022 08:57:58 +0000 Subject: [PATCH 15/18] =?UTF-8?q?!93=20=E9=87=8D=E6=96=B0=E4=BB=A5commit?= =?UTF-8?q?=E4=B8=BA=E8=A7=A6=E5=8F=91=E6=9D=A1=E4=BB=B6=E8=B5=B0ci?= =?UTF-8?q?=EF=BC=8Cgitee=20go=E6=97=A0=E6=B3=95=E4=BB=8Epr=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=20*=20create=20dtk-build-commit-20220425.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .workflow/dtk-build-commit-20220425.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.workflow/dtk-build-commit-20220425.yml b/.workflow/dtk-build-commit-20220425.yml index 4dcd9a6..5e0f8c8 100644 --- a/.workflow/dtk-build-commit-20220425.yml +++ b/.workflow/dtk-build-commit-20220425.yml @@ -3,11 +3,10 @@ name: dtk-build-commit-20220425 displayName: dtk-build-commit triggers: trigger: auto - pr: + push: branches: prefix: - - '' - + - master stages: - name: stage-4e566164 displayName: build From 2f94e78c32d2b44b00b2c962bceba84c8230fc28 Mon Sep 17 00:00:00 2001 From: shenmo Date: Mon, 22 Aug 2022 09:03:45 +0000 Subject: [PATCH 16/18] =?UTF-8?q?!94=20=E5=8F=91tag=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E8=A7=A6=E5=8F=91=E6=9E=84=E5=BB=BA=20*=20update=20dtk-build-r?= =?UTF-8?q?elease-tag-20220425.yml=20*=20create=20dtk-build-commit-2022042?= =?UTF-8?q?5.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .workflow/dtk-build-release-tag-20220425.yml | 63 ++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .workflow/dtk-build-release-tag-20220425.yml diff --git a/.workflow/dtk-build-release-tag-20220425.yml b/.workflow/dtk-build-release-tag-20220425.yml new file mode 100644 index 0000000..53e307a --- /dev/null +++ b/.workflow/dtk-build-release-tag-20220425.yml @@ -0,0 +1,63 @@ +version: '1.0' +name: dtk-build-release-tag-20220425 +displayName: dtk-build-release-tag +triggers: + trigger: auto + push: + tags: + prefix: + - '' +stages: + - name: stage-4e566164 + displayName: build + strategy: naturally + trigger: auto + executor: [] + steps: + - step: build@gcc + name: build_gcc + displayName: GCC 构建 + gccVersion: '9.4' + commands: + - sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list + - '# 换源' + - apt update + - echo "正在准备Debian 10环境..." + - apt install git -y >/dev/null 2>&1 + - git clone https://gitlink.org.cn/shenmo7192/debian-10-container.git + - mv debian-10-container/Debian-10.tar.xz /mnt + - cd /mnt/ + - tar -xf Debian-10.tar.xz + - cd Debian-10 + - wget https://gitee.com/deepin-community-store/repo_auto_update_script/raw/master/spark-build.sh + - chmod +x spark-build.sh + - echo "进入Debian 10环境" + - chroot /mnt/Debian-10 /bin/bash /spark-build.sh + - cd /mnt/Debian-10/build-spark + - 'mkdir target ' + - for f in $(find . -type f -name "*.deb") + - do + - ' mv $f target' + - done + artifacts: + - name: BUILD_ARTIFACT + path: + - /mnt/Debian-10/build-spark/target + caches: [] + notify: [] + strategy: + retry: '0' + - name: stage-29f3ffbb + displayName: 上传 + strategy: naturally + trigger: auto + executor: [] + steps: + - step: publish@general_artifacts + name: publish_general_artifacts + displayName: 上传制品 + dependArtifact: BUILD_ARTIFACT + artifactName: output + notify: [] + strategy: + retry: '0' From 6318b5f51d20cbff7e81cccfe6692e654dca7a49 Mon Sep 17 00:00:00 2001 From: shenmo Date: Mon, 22 Aug 2022 09:05:27 +0000 Subject: [PATCH 17/18] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20.w?= =?UTF-8?q?orkflow/dtk-build-release-tag.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .workflow/dtk-build-release-tag.yml | 63 ----------------------------- 1 file changed, 63 deletions(-) delete mode 100644 .workflow/dtk-build-release-tag.yml diff --git a/.workflow/dtk-build-release-tag.yml b/.workflow/dtk-build-release-tag.yml deleted file mode 100644 index a8c2247..0000000 --- a/.workflow/dtk-build-release-tag.yml +++ /dev/null @@ -1,63 +0,0 @@ -version: '1.0' -name: dtk-build-release-tag-20220425 -displayName: dtk-build-release-tag -triggers: - trigger: manual - push: - tags: - prefix: - - '' -stages: - - name: stage-4e566164 - displayName: build - strategy: naturally - trigger: auto - executor: [] - steps: - - step: build@gcc - name: build_gcc - displayName: GCC 构建 - gccVersion: '9.4' - commands: - - sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list - - '# 换源' - - apt update - - echo "正在准备Debian 10环境..." - - apt install git -y >/dev/null 2>&1 - - git clone https://gitlink.org.cn/shenmo7192/debian-10-container.git - - mv debian-10-container/Debian-10.tar.xz /mnt - - cd /mnt/ - - tar -xf Debian-10.tar.xz - - cd Debian-10 - - wget https://gitee.com/deepin-community-store/repo_auto_update_script/raw/master/spark-build.sh - - chmod +x spark-build.sh - - echo "进入Debian 10环境" - - chroot /mnt/Debian-10 /bin/bash /spark-build.sh - - cd /mnt/Debian-10/build-spark - - 'mkdir target ' - - for f in $(find . -type f -name "*.deb") - - do - - ' mv $f target' - - done - artifacts: - - name: BUILD_ARTIFACT - path: - - /mnt/Debian-10/build-spark/target - caches: [] - notify: [] - strategy: - retry: '0' - - name: stage-29f3ffbb - displayName: 上传 - strategy: naturally - trigger: auto - executor: [] - steps: - - step: publish@general_artifacts - name: publish_general_artifacts - displayName: 上传制品 - dependArtifact: BUILD_ARTIFACT - artifactName: output - notify: [] - strategy: - retry: '0' From 4c7d50d117723cc9e879731b985a31db86d6d8f1 Mon Sep 17 00:00:00 2001 From: shenmo Date: Tue, 23 Aug 2022 05:26:12 +0000 Subject: [PATCH 18/18] =?UTF-8?q?!95=20=E6=94=B9=E4=B8=BAcommit=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E6=9E=84=E5=BB=BA=E4=B8=BAPr=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E6=9E=84=E5=BB=BA=E6=B5=8B=E8=AF=95/=E6=9B=B4=E6=96=B0readme?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E4=BE=9D=E8=B5=96=E5=8C=85=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E5=9C=B0=E5=9D=80=20*=20update=20dtk-build-commit-20220425.yml?= =?UTF-8?q?=20*=20update=20README.md.=20*=20=E6=9B=B4=E6=96=B0=E4=BE=9D?= =?UTF-8?q?=E8=B5=96=E5=8C=85=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .workflow/dtk-build-commit-20220425.yml | 4 ++-- README.md | 2 +- README.zh.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.workflow/dtk-build-commit-20220425.yml b/.workflow/dtk-build-commit-20220425.yml index 5e0f8c8..db95113 100644 --- a/.workflow/dtk-build-commit-20220425.yml +++ b/.workflow/dtk-build-commit-20220425.yml @@ -3,10 +3,10 @@ name: dtk-build-commit-20220425 displayName: dtk-build-commit triggers: trigger: auto - push: + pr: branches: prefix: - - master + - '' stages: - name: stage-4e566164 displayName: build diff --git a/README.md b/README.md index 1436a74..4fb8576 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ If you want to submit an APP to share with others,Please [Click here](https:// If you simply want to install the Spark Store,just enter the [Release] page, find the version you want and install. -If you are using Debian11/Ubuntu 20.04, you will need extra dependency package. Available [here](https://d.store.deepinos.org.cn/spark-store-dependencies-kylin.zip) +If you are using Debian11/Ubuntu 20.04, you will need extra dependency package. Available [here](https://code.gitlink.org.cn/shenmo7192/spark-store-dependencies/raw/branch/master/spark-store-dependencies-kylin.zip) --- #### Compile and developement diff --git a/README.zh.md b/README.zh.md index 1be7343..fb2f7bf 100644 --- a/README.zh.md +++ b/README.zh.md @@ -17,7 +17,7 @@ 如果想安装 `星火应用商店` ,请打开右侧的 [Release] 页面,找到最新版本,并选择适用于当前系统的安装包下载。 -如果你在使用 `Debian 11/Ubuntu 20.04`,你需要额外下载[依赖补充包](https://d.store.deepinos.org.cn/spark-store-dependencies-kylin.zip) +如果你在使用 `Debian 11/Ubuntu 20.04`,你需要额外下载[依赖补充包](https://code.gitlink.org.cn/shenmo7192/spark-store-dependencies/raw/branch/master/spark-store-dependencies-kylin.zip) --- #### 编译安装