mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-17 01:21:36 +08:00
Compare commits
45 Commits
3.2.2
...
3.2.4test2
| Author | SHA1 | Date | |
|---|---|---|---|
| 3feec88f7b | |||
| c0ffb64a86 | |||
| 8c08b7e995 | |||
| 4d7e766d75 | |||
| 09115c3961 | |||
| 63998bbce4 | |||
| 967f62f825 | |||
| e8ae0325e0 | |||
| 66a4563b51 | |||
| 330ae3eeb8 | |||
| 0534c39ee5 | |||
| 04047c1e44 | |||
| 5e501b9d17 | |||
| 5a434a9b7d | |||
| e554aec98d | |||
| ab0f5e6613 | |||
| 59607f6b34 | |||
| a13f0ddcb7 | |||
| fec604b481 | |||
| 085eddd66f | |||
| 30860802dd | |||
| 30f36ff35d | |||
|
|
81993625ba | ||
| 87b68aca1e | |||
| 10125c5816 | |||
| 21d33ec347 | |||
| ad57aa26ff | |||
| 8902c81b9e | |||
| 0ad4b6c82c | |||
| 189a0b4939 | |||
| c65d7b86df | |||
| e269e6ca57 | |||
| beaeac60a3 | |||
| 11d68fb4b5 | |||
| e7680fe2a0 | |||
| 19dff7fb56 | |||
| 67b314d0d2 | |||
| 63b28adaf8 | |||
| 8741973cca | |||
| 829a08d40a | |||
| 411bbe5935 | |||
| 5d5fbfbad4 | |||
| c93c221cf1 | |||
| afee0966c8 | |||
| 2df5363c2c |
@@ -12,8 +12,10 @@ All packages will be shared in our repository for users to get freely.
|
|||||||
Distrobution supported:Deepin 20 ; Ubuntu 22.04 LTS / Ubuntu 20.04 LTS(May stop support in the future) ; UniontechOS Home 21
|
Distrobution supported:Deepin 20 ; Ubuntu 22.04 LTS / Ubuntu 20.04 LTS(May stop support in the future) ; UniontechOS Home 21
|
||||||
|
|
||||||
|
|
||||||
|
You can track our Issue resoving progress here https://gitee.com/deepin-community-store/spark-store/board
|
||||||
|
|
||||||
I hope people who see here can also join our team,development help or submit applications are welcomed
|
|
||||||
|
We hope people who see here can also join our team,development help or submit applications are welcomed
|
||||||
|
|
||||||
If you want to submit an APP to share with others,Please [Click here](https://upload.deepinos.org/index)
|
If you want to submit an APP to share with others,Please [Click here](https://upload.deepinos.org/index)
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,8 @@
|
|||||||
|
|
||||||
希望看到这里的人也可以加入我们的队伍,开发或者投递应用都很欢迎,共同构建Linux应用生态
|
希望看到这里的人也可以加入我们的队伍,开发或者投递应用都很欢迎,共同构建Linux应用生态
|
||||||
|
|
||||||
|
在这里追踪我们的Issue处理情况 https://gitee.com/deepin-community-store/spark-store/board
|
||||||
|
|
||||||
如果有想要提交的软件包,请 [在这里投稿](https://upload.deepinos.org/index)
|
如果有想要提交的软件包,请 [在这里投稿](https://upload.deepinos.org/index)
|
||||||
|
|
||||||
|
|
||||||
@@ -26,7 +28,7 @@
|
|||||||
Deepin V20/UOS 21 系统下, 安装依赖
|
Deepin V20/UOS 21 系统下, 安装依赖
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo apt install git qt5-default debhelper pkg-config qtchooser libqt5core5a libqt5gui5 libqt5widgets5 libqt5network5 libqt5concurrent5 libdtkcore-dev libdtkgui-dev libdtkwidget-dev qttools5-private-dev libnotify-dev qtwebengine5-dev
|
sudo apt install git qt5-default debhelper pkg-config qtchooser libqt5core5a libqt5gui5 libqt5widgets5 libqt5network5 libqt5concurrent5 libdtkcore-dev libdtkgui-dev libdtkwidget-dev qttools5-private-dev libnotify-dev qtwebengine5-dev fakeroot
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
24
debian/changelog
vendored
24
debian/changelog
vendored
@@ -1,3 +1,27 @@
|
|||||||
|
spark-store (3.2.4~test2) stable; urgency=medium
|
||||||
|
|
||||||
|
* 客户端集成投稿器入口和支持
|
||||||
|
* 修复:安装依赖时间较长时错误地返回“安装完毕”结果
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
|
||||||
|
|
||||||
|
spark-store (3.2.4~test1) stable; urgency=medium
|
||||||
|
|
||||||
|
* 客户端更新时不关闭免密码登录
|
||||||
|
* UOS合并正常aptss中
|
||||||
|
|
||||||
|
|
||||||
|
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
|
||||||
|
|
||||||
|
spark-store (3.2.3) stable; urgency=medium
|
||||||
|
|
||||||
|
* 客户端异常退出时仍然占用资源问题修复
|
||||||
|
* 降低dtk依赖版本,Debian 11 stable可直接安装
|
||||||
|
|
||||||
|
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
|
||||||
|
|
||||||
spark-store (3.2.2) stable; urgency=medium
|
spark-store (3.2.2) stable; urgency=medium
|
||||||
|
|
||||||
* aptss will now refresh the system source before doing install, policy....etc
|
* aptss will now refresh the system source before doing install, policy....etc
|
||||||
|
|||||||
6
debian/control
vendored
6
debian/control
vendored
@@ -11,9 +11,9 @@ Build-Depends:
|
|||||||
libqt5widgets5,
|
libqt5widgets5,
|
||||||
libqt5network5,
|
libqt5network5,
|
||||||
libqt5concurrent5,
|
libqt5concurrent5,
|
||||||
libdtkcore-dev(>=5.2),
|
libdtkcore-dev(>=5.0),
|
||||||
libdtkgui-dev(>=5.2),
|
libdtkgui-dev(>=5.0),
|
||||||
libdtkwidget-dev(>=5.2),
|
libdtkwidget-dev(>=5.0),
|
||||||
qttools5-private-dev,
|
qttools5-private-dev,
|
||||||
libnotify-dev,
|
libnotify-dev,
|
||||||
qtwebengine5-dev
|
qtwebengine5-dev
|
||||||
|
|||||||
6
debian/spark-store.prerm
vendored
6
debian/spark-store.prerm
vendored
@@ -1,5 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ "$1" = "remove" ] || [ "$1" = "purge" ];then
|
||||||
# Remove residual symbol links
|
# Remove residual symbol links
|
||||||
rm /usr/local/bin/spark-store
|
rm /usr/local/bin/spark-store
|
||||||
rm /usr/local/bin/ssinstall
|
rm /usr/local/bin/ssinstall
|
||||||
@@ -39,3 +40,8 @@ fi
|
|||||||
|
|
||||||
apt-key del '9D9A A859 F750 24B1 A1EC E16E 0E41 D354 A29A 440C'
|
apt-key del '9D9A A859 F750 24B1 A1EC E16E 0E41 D354 A29A 440C'
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
echo "非卸载操作,不进行配置清理"
|
||||||
|
|
||||||
|
fi
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ void downloadlist::install(int t)
|
|||||||
|
|
||||||
bool haveError = false;
|
bool haveError = false;
|
||||||
bool notRoot = false;
|
bool notRoot = false;
|
||||||
installer.waitForFinished();
|
installer.waitForFinished(-1); // 不设置超时
|
||||||
out = installer.readAllStandardOutput();
|
out = installer.readAllStandardOutput();
|
||||||
|
|
||||||
QStringList everyOut = out.split("\n");
|
QStringList everyOut = out.split("\n");
|
||||||
@@ -169,7 +169,7 @@ void downloadlist::install(int t)
|
|||||||
|
|
||||||
QProcess isInstall;
|
QProcess isInstall;
|
||||||
isInstall.start("dpkg -s " + pkgName);
|
isInstall.start("dpkg -s " + pkgName);
|
||||||
isInstall.waitForFinished();
|
isInstall.waitForFinished(180); // 默认超时 3 分钟
|
||||||
int error = QString::fromStdString(isInstall.readAllStandardError().toStdString()).length();
|
int error = QString::fromStdString(isInstall.readAllStandardError().toStdString()).length();
|
||||||
if(error == 0)
|
if(error == 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ int main(int argc, char *argv[])
|
|||||||
// 程序内强制添加"-platformtheme deepin"参数喂给Qt让Qt正确使用Deepin主题修复各种奇怪样式问题
|
// 程序内强制添加"-platformtheme deepin"参数喂给Qt让Qt正确使用Deepin主题修复各种奇怪样式问题
|
||||||
|
|
||||||
// 浏览器开启 GPU 支持
|
// 浏览器开启 GPU 支持
|
||||||
qputenv("QTWEBENGINE_CHROMIUM_FLAGS", "--ignore-gpu-blacklist --enable-gpu-rasterization --enable-native-gpu-memory-buffers --enable-accelerated-video-decode");
|
qputenv("QTWEBENGINE_CHROMIUM_FLAGS", "--ignore-gpu-blocklist --enable-gpu-rasterization --enable-native-gpu-memory-buffers --enable-accelerated-video-decode");
|
||||||
|
|
||||||
QVector<char*> fakeArgs(argc + 2);
|
QVector<char*> fakeArgs(argc + 2);
|
||||||
fakeArgs[0] = argv[0];
|
fakeArgs[0] = argv[0];
|
||||||
@@ -34,7 +34,7 @@ int main(int argc, char *argv[])
|
|||||||
DAboutDialog dialog;
|
DAboutDialog dialog;
|
||||||
a.setAboutDialog(&dialog);
|
a.setAboutDialog(&dialog);
|
||||||
dialog.setLicense(QObject::tr("We publish this program under GPL V3"));
|
dialog.setLicense(QObject::tr("We publish this program under GPL V3"));
|
||||||
dialog.setVersion(DApplication::buildVersion("Version 3.2.2"));
|
dialog.setVersion(DApplication::buildVersion("Version 3.2.4"));
|
||||||
dialog.setProductIcon(QIcon::fromTheme("spark-store")); // 设置Logo
|
dialog.setProductIcon(QIcon::fromTheme("spark-store")); // 设置Logo
|
||||||
dialog.setProductName(QLabel::tr("Spark Store"));
|
dialog.setProductName(QLabel::tr("Spark Store"));
|
||||||
dialog.setDescription(
|
dialog.setDescription(
|
||||||
@@ -55,7 +55,7 @@ int main(int argc, char *argv[])
|
|||||||
a.setOrganizationName("spark-union");
|
a.setOrganizationName("spark-union");
|
||||||
a.setOrganizationDomain("https://www.deepinos.org/");
|
a.setOrganizationDomain("https://www.deepinos.org/");
|
||||||
a.setApplicationName("Spark Store"); //不需要翻译,否则 ~/.local/share/ 下文件夹名称也被翻译为中文
|
a.setApplicationName("Spark Store"); //不需要翻译,否则 ~/.local/share/ 下文件夹名称也被翻译为中文
|
||||||
a.setApplicationVersion(DApplication::buildVersion("3.2.2"));
|
a.setApplicationVersion(DApplication::buildVersion("3.2.4"));
|
||||||
a.setApplicationAcknowledgementPage("https://gitee.com/deepin-community-store/spark-store");
|
a.setApplicationAcknowledgementPage("https://gitee.com/deepin-community-store/spark-store");
|
||||||
a.setApplicationDescription(
|
a.setApplicationDescription(
|
||||||
QObject::tr(
|
QObject::tr(
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QGraphicsOpacityEffect>
|
#include <QGraphicsOpacityEffect>
|
||||||
#include <QtConcurrent> // 并发
|
#include <QtConcurrent> // 并发
|
||||||
|
#include <QCloseEvent> // close event
|
||||||
|
|
||||||
#include <DApplication>
|
#include <DApplication>
|
||||||
#include <DGuiApplicationHelper>
|
#include <DGuiApplicationHelper>
|
||||||
@@ -192,6 +193,7 @@ void Widget::initUI()
|
|||||||
|
|
||||||
// 添加菜单项
|
// 添加菜单项
|
||||||
QAction *actionSubmission = new QAction(tr("Submit App"), this);
|
QAction *actionSubmission = new QAction(tr("Submit App"), this);
|
||||||
|
QAction *actionSubmissionWithClient = new QAction(tr("Submit App with client(Recommanded)"), this);
|
||||||
QAction *setting = new QAction(tr("Settings"));
|
QAction *setting = new QAction(tr("Settings"));
|
||||||
QAction *upgrade = new QAction(tr("APP Upgrade and Install Settings"));
|
QAction *upgrade = new QAction(tr("APP Upgrade and Install Settings"));
|
||||||
|
|
||||||
@@ -199,6 +201,7 @@ void Widget::initUI()
|
|||||||
menu->addAction(setting);
|
menu->addAction(setting);
|
||||||
menu->addAction(upgrade);
|
menu->addAction(upgrade);
|
||||||
menu->addAction(actionSubmission);
|
menu->addAction(actionSubmission);
|
||||||
|
menu->addAction(actionSubmissionWithClient);
|
||||||
|
|
||||||
titlebar->setMenu(menu);
|
titlebar->setMenu(menu);
|
||||||
|
|
||||||
@@ -206,6 +209,23 @@ void Widget::initUI()
|
|||||||
connect(setting, &QAction::triggered, this, &Widget::opensetting);
|
connect(setting, &QAction::triggered, this, &Widget::opensetting);
|
||||||
connect(upgrade, &QAction::triggered, this, [=]{QProcess::startDetached("x-terminal-emulator -e /opt/durapps/spark-store/bin/update-upgrade/ss-update-controler.sh");});
|
connect(upgrade, &QAction::triggered, this, [=]{QProcess::startDetached("x-terminal-emulator -e /opt/durapps/spark-store/bin/update-upgrade/ss-update-controler.sh");});
|
||||||
|
|
||||||
|
// 投稿器
|
||||||
|
connect(actionSubmissionWithClient, &QAction::triggered, this, [=]
|
||||||
|
{
|
||||||
|
QString submitterSpk = "spk://store/tools/spark-store-submitter";
|
||||||
|
QFile actionSubmissionClientStatus("/opt/spark-store-submitter/bin/spark-store-submitter");
|
||||||
|
if (actionSubmissionClientStatus.exists())
|
||||||
|
{
|
||||||
|
qDebug() << "投稿器存在";
|
||||||
|
QProcess::startDetached("/opt/spark-store-submitter/bin/spark-store-submitter");
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
qDebug() << "投稿器不存在,跳转页面";
|
||||||
|
openUrl(submitterSpk);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
// 载入自定义字体
|
// 载入自定义字体
|
||||||
int loadedFontID = QFontDatabase::addApplicationFont(":/fonts/fonts/hksnzt.ttf");
|
int loadedFontID = QFontDatabase::addApplicationFont(":/fonts/fonts/hksnzt.ttf");
|
||||||
QStringList loadedFontFamilies = QFontDatabase::applicationFontFamilies(loadedFontID);
|
QStringList loadedFontFamilies = QFontDatabase::applicationFontFamilies(loadedFontID);
|
||||||
@@ -572,14 +592,14 @@ void Widget::chooseLeftMenu(int index)
|
|||||||
|
|
||||||
updateUI();
|
updateUI();
|
||||||
|
|
||||||
if(index <= 12)
|
if (index <= 12)
|
||||||
{
|
{
|
||||||
if(themeIsDark)
|
if (themeIsDark)
|
||||||
{
|
{
|
||||||
QString darkurl = menuUrl[index].toString();
|
QString darkurl = menuUrl[index].toString();
|
||||||
QStringList list = darkurl.split("/");
|
QStringList list = darkurl.split("/");
|
||||||
darkurl.clear();
|
darkurl.clear();
|
||||||
for(int i = 0; i < list.size() - 1; i++)
|
for (int i = 0; i < list.size() - 1; i++)
|
||||||
{
|
{
|
||||||
darkurl += list[i] + "/";
|
darkurl += list[i] + "/";
|
||||||
}
|
}
|
||||||
@@ -687,12 +707,8 @@ void Widget::searchApp(QString text)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// sendNotification(tr("Spark store could only process spk:// links for now. The search feature is coming soon!"));
|
|
||||||
// ui->webView->setUrl(QUrl("http://www.baidu.com/s?wd="+text)); // 这东西对接百度
|
|
||||||
// ui->stackedWidget->setCurrentIndex(0);
|
|
||||||
|
|
||||||
// 禁止同时进行多次搜索
|
// 禁止同时进行多次搜索
|
||||||
if(!mutex.tryLock())
|
if (!mutex.tryLock())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -711,20 +727,24 @@ void Widget::searchApp(QString text)
|
|||||||
mutex.unlock();
|
mutex.unlock();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
displaySearchApp(json);
|
displaySearchApp(json); })
|
||||||
})
|
|
||||||
.onError([this](QString errorStr)
|
.onError([this](QString errorStr)
|
||||||
{
|
{
|
||||||
qDebug() << "请求出错:" << errorStr;
|
qDebug() << "请求出错:" << errorStr;
|
||||||
sendNotification(QString(tr("Request Error: %1")).arg(errorStr));
|
sendNotification(QString(tr("Request Error: %1")).arg(errorStr));
|
||||||
mutex.unlock();
|
mutex.unlock();
|
||||||
return;
|
return; })
|
||||||
})
|
|
||||||
.timeout(10 * 1000)
|
.timeout(10 * 1000)
|
||||||
.exec();
|
.exec();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Widget::closeEvent(QCloseEvent *event)
|
||||||
|
{
|
||||||
|
mutex.unlock();
|
||||||
|
httpClient->deleteLater();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief 展示搜索的APP信息
|
* @brief 展示搜索的APP信息
|
||||||
*/
|
*/
|
||||||
@@ -1108,11 +1128,11 @@ void Widget::on_pushButton_uninstall_clicked()
|
|||||||
|
|
||||||
QProcess uninstall;
|
QProcess uninstall;
|
||||||
uninstall.start("pkexec", QStringList() << "apt" << "purge" << "-y" << pkgName.toLower());
|
uninstall.start("pkexec", QStringList() << "apt" << "purge" << "-y" << pkgName.toLower());
|
||||||
uninstall.waitForFinished();
|
uninstall.waitForFinished(-1); // 默认无限时长
|
||||||
|
|
||||||
QProcess check;
|
QProcess check;
|
||||||
check.start("dpkg", QStringList() << "-s" << pkgName.toLower());
|
check.start("dpkg", QStringList() << "-s" << pkgName.toLower());
|
||||||
check.waitForFinished();
|
check.waitForFinished(180); // 默认超时 3 分钟
|
||||||
|
|
||||||
if (check.readAllStandardOutput().isEmpty())
|
if (check.readAllStandardOutput().isEmpty())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -128,6 +128,7 @@ private:
|
|||||||
void setfoot(int);
|
void setfoot(int);
|
||||||
void updatefoot();
|
void updatefoot();
|
||||||
void updateUI();
|
void updateUI();
|
||||||
|
void closeEvent(QCloseEvent *event);
|
||||||
|
|
||||||
quint64 dirFileSize(const QString &path);
|
quint64 dirFileSize(const QString &path);
|
||||||
|
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ void SpkAppInfoLoaderThread::run()
|
|||||||
QProcess isInstall;
|
QProcess isInstall;
|
||||||
packagename = json["Pkgname"].toString();
|
packagename = json["Pkgname"].toString();
|
||||||
isInstall.start("dpkg -s " + json["Pkgname"].toString());
|
isInstall.start("dpkg -s " + json["Pkgname"].toString());
|
||||||
isInstall.waitForFinished();
|
isInstall.waitForFinished(180); // 默认超时 3 分钟
|
||||||
int error = QString::fromStdString(isInstall.readAllStandardError().toStdString()).length();
|
int error = QString::fromStdString(isInstall.readAllStandardError().toStdString()).length();
|
||||||
if(error == 0)
|
if(error == 0)
|
||||||
{
|
{
|
||||||
@@ -100,12 +100,12 @@ void SpkAppInfoLoaderThread::run()
|
|||||||
|
|
||||||
QProcess isUpdate;
|
QProcess isUpdate;
|
||||||
isUpdate.start("dpkg-query --showformat='${Version}' --show " + json["Pkgname"].toString());
|
isUpdate.start("dpkg-query --showformat='${Version}' --show " + json["Pkgname"].toString());
|
||||||
isUpdate.waitForFinished();
|
isUpdate.waitForFinished(180); // 默认超时 3 分钟
|
||||||
QString localVersion = isUpdate.readAllStandardOutput();
|
QString localVersion = isUpdate.readAllStandardOutput();
|
||||||
localVersion.replace("'", "");
|
localVersion.replace("'", "");
|
||||||
|
|
||||||
isUpdate.start("dpkg --compare-versions " + localVersion + " ge " + json["Version"].toString());
|
isUpdate.start("dpkg --compare-versions " + localVersion + " ge " + json["Version"].toString());
|
||||||
isUpdate.waitForFinished();
|
isUpdate.waitForFinished(180); // 默认超时 3 分钟
|
||||||
if(!isUpdate.exitCode())
|
if(!isUpdate.exitCode())
|
||||||
{
|
{
|
||||||
isUpdated = true;
|
isUpdated = true;
|
||||||
|
|||||||
@@ -14,6 +14,17 @@
|
|||||||
_APTMGR=apt
|
_APTMGR=apt
|
||||||
|
|
||||||
|
|
||||||
|
####
|
||||||
|
#
|
||||||
|
# UOS sources auth config
|
||||||
|
#
|
||||||
|
#
|
||||||
|
if grep -Eqi "UnionTech" /etc/issue || grep -Eq "UnionTech" /etc/*-release;then
|
||||||
|
AUTH_UOS_USER="uos-https://license.chinauos.com-apt"
|
||||||
|
AUTH_UOS_PASSWD="`cat /etc/apt/auth.conf.d/uos.conf | grep home-packages.chinauos.com`"
|
||||||
|
AUTH_UOS_PASSWD=`echo ${AUTH_UOS_PASSWD#*password }`
|
||||||
|
|
||||||
|
fi
|
||||||
# Enable DOWNLOADBEFORE to suppress apt-fast confirmation dialog and download
|
# Enable DOWNLOADBEFORE to suppress apt-fast confirmation dialog and download
|
||||||
# packages directly.
|
# packages directly.
|
||||||
#
|
#
|
||||||
@@ -54,7 +65,7 @@ DOWNLOADBEFORE=true
|
|||||||
#
|
#
|
||||||
# Default: disabled
|
# Default: disabled
|
||||||
#
|
#
|
||||||
MIRRORS=( 'https://d.store.deepinos.org.cn/,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/,http://cdn.dl.uniartisan.com:9000/deepinos/' )
|
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/' )
|
||||||
|
|
||||||
|
|
||||||
# Maximum number of connections
|
# Maximum number of connections
|
||||||
@@ -68,14 +79,10 @@ _MAXNUM=5
|
|||||||
# Maximum number of connections per server
|
# Maximum number of connections per server
|
||||||
# Default: 10
|
# Default: 10
|
||||||
#
|
#
|
||||||
_MAXCONPERSRV=10
|
_MAXCONPERSRV=1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Download file using given number of connections
|
|
||||||
# If more than N URIs are given, first N URIs are used and remaining URIs are used for backup.
|
|
||||||
# If less than N URIs are given, those URIs are used more than once so that N connections total are made simultaneously.
|
|
||||||
#
|
|
||||||
_SPLITCON=8
|
|
||||||
|
|
||||||
|
|
||||||
# Split size i.e. size of each piece
|
# Split size i.e. size of each piece
|
||||||
@@ -93,6 +100,7 @@ _MINSPLITSZ=1M
|
|||||||
_PIECEALGO=default
|
_PIECEALGO=default
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Downloadmanager listfile
|
# Downloadmanager listfile
|
||||||
# You can use this value in _DOWNLOADER command. Escape with ${}: ${DLLIST}
|
# You can use this value in _DOWNLOADER command. Escape with ${}: ${DLLIST}
|
||||||
#
|
#
|
||||||
@@ -118,7 +126,7 @@ DLLIST='/tmp/apt-fast.list'
|
|||||||
#
|
#
|
||||||
# Default: _DOWNLOADER='aria2c --no-conf -c -j ${_MAXNUM} -x ${_MAXCONPERSRV} -s ${_SPLITCON} --min-split-size=${_MINSPLITSZ} --stream-piece-selector=${_PIECEALGO} -i ${DLLIST} --connect-timeout=600 --timeout=600 -m0'
|
# Default: _DOWNLOADER='aria2c --no-conf -c -j ${_MAXNUM} -x ${_MAXCONPERSRV} -s ${_SPLITCON} --min-split-size=${_MINSPLITSZ} --stream-piece-selector=${_PIECEALGO} -i ${DLLIST} --connect-timeout=600 --timeout=600 -m0'
|
||||||
#
|
#
|
||||||
_DOWNLOADER='aria2c --no-conf -c -j ${_MAXNUM} -x ${_MAXCONPERSRV} -s ${_SPLITCON} --min-split-size=${_MINSPLITSZ} --stream-piece-selector=${_PIECEALGO} -i ${DLLIST} --connect-timeout=600 --timeout=600 -m0'
|
_DOWNLOADER='aria2c --no-conf -c -j ${_MAXNUM} -x ${_MAXCONPERSRV} --min-split-size=${_MINSPLITSZ} --stream-piece-selector=${_PIECEALGO} -i ${DLLIST} --connect-timeout=600 --timeout=600 -m0 --http-user ${AUTH_UOS_USER} --http-passwd ${AUTH_UOS_PASSWD}'
|
||||||
|
|
||||||
|
|
||||||
# Download temp folder for Downloadmanager
|
# Download temp folder for Downloadmanager
|
||||||
|
|||||||
@@ -40,8 +40,6 @@ fi
|
|||||||
|
|
||||||
##################apt-fast/metalink测试
|
##################apt-fast/metalink测试
|
||||||
DEPEND="这里一定会安装所以放弃处理"
|
DEPEND="这里一定会安装所以放弃处理"
|
||||||
isuos=`cat /etc/os-release | grep UnionTech`
|
|
||||||
|
|
||||||
|
|
||||||
##############判断是否是root运行,如果是,则正常走;如果不是,则代输密码
|
##############判断是否是root运行,如果是,则正常走;如果不是,则代输密码
|
||||||
if [ "$(id -u)" != "0" ];then
|
if [ "$(id -u)" != "0" ];then
|
||||||
@@ -54,15 +52,8 @@ echo "$upass" | sudo -S aptss ssupdate && echo "$upass" | sudo -S bwrap --dev-bi
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$DEPEND" != "" ] && [ "$isuos" != "" ]; then
|
|
||||||
echo "UOS中系统依赖无法使用第三方下载工具,放弃使用apt-fast"
|
|
||||||
echo ----------------------------------------------------------------------------------
|
|
||||||
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
|
|
||||||
|
|
||||||
|
if [ "$DEPEND" != "" ]; then
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$DEPEND" != "" ] && [ "$isuos" = "" ]; then
|
|
||||||
echo "检测到apt-fast,使用aptss进行多线程下载加速"
|
echo "检测到apt-fast,使用aptss进行多线程下载加速"
|
||||||
echo ----------------------------------------------------------------------------------
|
echo ----------------------------------------------------------------------------------
|
||||||
echo "$upass" | sudo -S dpkg -i $1 || sudo aptss install -yf
|
echo "$upass" | sudo -S dpkg -i $1 || sudo aptss install -yf
|
||||||
@@ -81,13 +72,8 @@ echo "未安装依赖:apt-fast 开始安装"
|
|||||||
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
|
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
|
fi
|
||||||
|
|
||||||
if [ "$DEPEND" != "" ] && [ "$isuos" != "" ]; then
|
|
||||||
echo "UOS中系统依赖无法使用第三方下载工具,放弃使用apt-fast"
|
|
||||||
echo ----------------------------------------------------------------------------------
|
|
||||||
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
|
if [ "$DEPEND" != "" ]; then
|
||||||
echo "检测到apt-fast,使用aptss进行多线程下载加速"
|
echo "检测到apt-fast,使用aptss进行多线程下载加速"
|
||||||
echo ----------------------------------------------------------------------------------
|
echo ----------------------------------------------------------------------------------
|
||||||
dpkg -i $1 || aptss install -yf
|
dpkg -i $1 || aptss install -yf
|
||||||
|
|||||||
@@ -8,33 +8,6 @@ echo "获取更新列表..."
|
|||||||
PKG_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 list --upgradable -o Dir::Etc::sourcelist="sources.list.d/sparkstore.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0" | awk 'BEGIN {FS="/"} {print $1}' | awk NR\>1)"
|
PKG_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 list --upgradable -o Dir::Etc::sourcelist="sources.list.d/sparkstore.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0" | awk 'BEGIN {FS="/"} {print $1}' | awk NR\>1)"
|
||||||
|
|
||||||
|
|
||||||
isuos=`cat /etc/os-release | grep UnionTech`
|
|
||||||
if [ "$isuos" != "" ]; then ###这是确定是否为UOS 如果是
|
|
||||||
echo "UOS中系统依赖无法使用第三方下载工具,使用apt-fast下载本体"
|
|
||||||
|
|
||||||
cd /var/cache/apt/archives
|
|
||||||
for PKG_NAME in $PKG_LIST;
|
|
||||||
do
|
|
||||||
echo "$PKG_NAME 正在下载..."
|
|
||||||
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;
|
|
||||||
then
|
|
||||||
echo "$PKG_NAME 已更新"
|
|
||||||
else
|
|
||||||
echo "WARNING: $PKG_NAME 无法更新"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
else ###这是确定是否为UOS,如果不是
|
|
||||||
|
|
||||||
for PKG_NAME in $PKG_LIST;
|
for PKG_NAME in $PKG_LIST;
|
||||||
do
|
do
|
||||||
echo "$PKG_NAME 正在更新..."
|
echo "$PKG_NAME 正在更新..."
|
||||||
@@ -47,6 +20,5 @@ else ###这是确定是否为UOS,如果不是
|
|||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
fi ###这是确定是否为UOS
|
|
||||||
|
|
||||||
fi ###这是确定是否同意
|
fi ###这是确定是否同意
|
||||||
Reference in New Issue
Block a user