diff --git a/debian/changelog b/debian/changelog index 9066894..f76e8aa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,9 @@ -spark-store (4.2.3.2~Reason4) stable; urgency=medium - * aptss不再使用bwrap - - +spark-store (4.2.3.2~Reason5) stable; urgency=medium + * aptss 不再使用bwrap,去除依赖,支持容器中启动 + * aptss 支持非root模式启动 + * aptss 添加transhell支持 + -- shenmo <shenmo@spark-app.store> Sun, 5 Mar 2022 11:45:14 +0800 spark-store (4.2.3.2~Reason3) stable; urgency=medium * 现在可在x86上编译,使用同一套代码 * 暂时在aarch64上使用旧web----等待柚子 diff --git a/pkg/usr/share/aptss/transhell/aptss_en_US.transhell b/pkg/usr/share/aptss/transhell/aptss_en_US.transhell new file mode 100644 index 0000000..28a9715 --- /dev/null +++ b/pkg/usr/share/aptss/transhell/aptss_en_US.transhell @@ -0,0 +1,4 @@ +#!/bin/bash +TRANSHELL_CONTENT_RUNNING_IN_NOT_ROOT_USER="W:Running in non-root mode! If error occurs, please try to excute me as root." +TRANSHELL_CONTENT_INFO_SOURCES_LIST_D_IS_EMPTY="INFO:sources.list.d directory is empty,will not try to sync" +TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST="Getting server and mirror lists..." diff --git a/pkg/usr/share/aptss/transhell/aptss_zh_CN.transhell b/pkg/usr/share/aptss/transhell/aptss_zh_CN.transhell new file mode 100644 index 0000000..1f16da5 --- /dev/null +++ b/pkg/usr/share/aptss/transhell/aptss_zh_CN.transhell @@ -0,0 +1,4 @@ +#!/bin/bash +TRANSHELL_CONTENT_RUNNING_IN_NOT_ROOT_USER="警告:正在使用非root权限模式启动!若出现问题,请尝试使用root权限执行指令" +TRANSHELL_CONTENT_INFO_SOURCES_LIST_D_IS_EMPTY="信息:sources.list.d文件夹是空的,将不会尝试同步" +TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST="从服务器获取配置和镜像列表..." diff --git a/spark-store-project.pro b/spark-store-project.pro index 1d8995f..4b698fe 100644 --- a/spark-store-project.pro +++ b/spark-store-project.pro @@ -57,6 +57,9 @@ icon.path = /usr/share/icons/hicolor/scalable/apps ssinstall-transhell.files += pkg/usr/share/ssinstall/transhell ssinstall-transhell.path = /usr/share/ssinstall/ +aptss-transhell.files += pkg/usr/share/aptss/transhell +aptss-transhell.path = /usr/share/aptss/ + tmp.files += pkg/tmp/spark-store-install/feedback.sh tmp.path = /tmp/spark-store-install @@ -66,6 +69,7 @@ INSTALLS += \ desktop \ icon \ ssinstall-transhell \ + aptss-transhell \ # sourceslist \ tmp \ service \ diff --git a/tool/aptss b/tool/aptss index f25e1c5..32b8314 100755 --- a/tool/aptss +++ b/tool/aptss @@ -1,5 +1,8 @@ #!/bin/bash +source /opt/durapps/spark-store/bin/bashimport/transhell.amber +load_transhell + case `arch` in x86_64) STORE_URL="store" @@ -10,21 +13,23 @@ case `arch` in STORE_LIST_URL="-aarch64" ;; esac +SS_APT_FAST="/opt/durapps/spark-store/bin/apt-fast/ss-apt-fast" + is_empty_dir(){ return `ls -A $1|wc -w` } -SS_APT_FAST="/opt/durapps/spark-store/bin/apt-fast/ss-apt-fast" + if [ "$(id -u)" != "0" ];then #############################无root权限时 -echo "Please run me as root.请使用root权限启动" -exit 1 -fi +echo "${TRANSHELL_CONTENT_RUNNING_IN_NOT_ROOT_USER}" + +else if is_empty_dir /etc/apt/sources.list.d/ ;then -echo "sourecs.list.d dircetory is empty!" +echo "${TRANSHELL_CONTENT_INFO_SOURCES_LIST_D_IS_EMPTY}" else ln -sf /etc/apt/sources.list.d/* /opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d ###让这里和系统同步,先链接,然后清除无效链接 @@ -37,11 +42,12 @@ for a in `find /opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d -type l done fi +fi + if [ ! -e "/tmp/aptss-conf/apt-fast.conf" ];then ###刷新apt-fast配置 mkdir -p /tmp/aptss-conf/ -echo "从服务器获取配置和镜像列表..." -echo "Getting server and mirror lists..." +echo "${TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST}" echo curl --progress-bar -o /tmp/aptss-conf/apt-fast.conf "https://d.store.deepinos.org.cn/apt-fast.conf" chmod -R 755 /tmp/aptss-conf @@ -50,11 +56,9 @@ fi if [ ! -e "/var/lib/aptss/lists/d.spark-app.store_${STORE_URL}_Packages" ] && [ ! -e "/var/lib/aptss/lists/d.store.deepinos.org.cn_${STORE_URL}_Packages" ] && [ ! -e "/var/lib/aptss/lists/mirrors.sdu.edu.cn_spark-store-repository_${STORE_URL}_Packages" ];then -echo "接收星火仓库软件信息中..." mkdir -p /tmp/aptss-conf/ -echo "从服务器获取配置和镜像列表..." -echo "Getting server and mirror lists..." +echo "${TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST}" echo curl --silent -o /tmp/aptss-conf/apt-fast.conf "https://d.store.deepinos.org.cn/apt-fast.conf" chmod -R 755 /tmp/aptss-conf @@ -97,8 +101,7 @@ elif [ "$1" = "policy" ] || [ "$1" = "search" ];then elif [ "$1" = "ssupdate" ];then mkdir -p /tmp/aptss-conf/ -echo "从服务器获取配置和镜像列表..." -echo "Getting server and mirror lists..." +echo "${TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST}" echo curl --silent -o /tmp/aptss-conf/apt-fast.conf "https://d.store.deepinos.org.cn/apt-fast.conf" chmod -R 755 /tmp/aptss-conf @@ -115,8 +118,7 @@ curl --progress-bar -o /opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d mkdir -p /tmp/aptss-conf/ -echo "从服务器获取配置和镜像列表..." -echo "Getting server and mirror lists..." +echo "${TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST}" echo curl --progress-bar -o /tmp/aptss-conf/apt-fast.conf "https://d.store.deepinos.org.cn/apt-fast.conf" chmod -R 755 /tmp/aptss-conf