diff --git a/debian/changelog b/debian/changelog index 069025f..332d487 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ spark-store (3.2.4) stable; urgency=medium * 客户端更新时不关闭免密码登录 + * UOS合并正常aptss中 -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 diff --git a/tool/apt-fast-conf/apt-fast.conf b/tool/apt-fast-conf/apt-fast.conf index 0139d67..47f2576 100644 --- a/tool/apt-fast-conf/apt-fast.conf +++ b/tool/apt-fast-conf/apt-fast.conf @@ -14,6 +14,15 @@ _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="a=SHEDW8U8E8SDHP5A&aa=&ab=v1&ad=8c584d561897bb0cfaed06448d2c00db&ae=4d06bb476c4b49299bf61131adf74d9e&af=4&ag=UNKNOW:ec529f04c7dffb7bd5859f561259aebc&ah=000C292C00DB&b=v2&c=62b2b266c66f30000167448b&d=N7AADCAAYHAKM54KZJQKMPEBV&e=8aa2da8715ffe6f0b01c4a6bba1d8c91&f=7568a02ccfda9af6a3a4b73094daf161&g=AA2SAA&h=21.3.1&i=101&j=422f2415ea7d14119aae28d80aad4695&k=245f-5674-f133-2b01&l=93a6-0ba8-5d84-a21a&m=245f-5674-f133-2b01&n=,|&o=VMwareVirtualS|VMwareVirtualS&p=ec529f04c7dffb7bd5859f561259aebc&q=19e1fe0a654af0eccca498848d024e64&r=000C292C00DB&s=1&t=2&v=5.6.30&w=&x=6&y=-1&z=v3/vm" +fi # Enable DOWNLOADBEFORE to suppress apt-fast confirmation dialog and download # packages directly. # @@ -54,7 +63,7 @@ DOWNLOADBEFORE=true # # 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 @@ -68,14 +77,10 @@ _MAXNUM=5 # Maximum number of connections per server # 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 @@ -93,6 +98,7 @@ _MINSPLITSZ=1M _PIECEALGO=default + # Downloadmanager listfile # You can use this value in _DOWNLOADER command. Escape with ${}: ${DLLIST} # @@ -118,7 +124,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' # -_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 diff --git a/tool/ssinstall b/tool/ssinstall index 749d336..d361c71 100755 --- a/tool/ssinstall +++ b/tool/ssinstall @@ -40,8 +40,6 @@ fi ##################apt-fast/metalink测试 DEPEND="这里一定会安装所以放弃处理" -isuos=`cat /etc/os-release | grep UnionTech` - ##############判断是否是root运行,如果是,则正常走;如果不是,则代输密码 if [ "$(id -u)" != "0" ];then @@ -54,15 +52,8 @@ echo "$upass" | sudo -S aptss ssupdate && echo "$upass" | sudo -S bwrap --dev-bi 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 - -fi - -if [ "$DEPEND" != "" ] && [ "$isuos" = "" ]; then +if [ "$DEPEND" != "" ]; then echo "检测到apt-fast,使用aptss进行多线程下载加速" echo ---------------------------------------------------------------------------------- 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 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 ---------------------------------------------------------------------------------- dpkg -i $1 || aptss install -yf diff --git a/tool/update-upgrade/ss-do-upgrade.sh b/tool/update-upgrade/ss-do-upgrade.sh index be5a580..990a0c8 100755 --- a/tool/update-upgrade/ss-do-upgrade.sh +++ b/tool/update-upgrade/ss-do-upgrade.sh @@ -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)" -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; do echo "$PKG_NAME 正在更新..." @@ -47,6 +20,5 @@ else ###这是确定是否为UOS,如果不是 done -fi ###这是确定是否为UOS fi ###这是确定是否同意 \ No newline at end of file