mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-06-07 07:29:49 +08:00
aptss支持非root模式启动,添加transhell支持
This commit is contained in:
parent
cd581d4de9
commit
bcb399dc30
9
debian/changelog
vendored
9
debian/changelog
vendored
@ -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----等待柚子
|
||||
|
4
pkg/usr/share/aptss/transhell/aptss_en_US.transhell
Normal file
4
pkg/usr/share/aptss/transhell/aptss_en_US.transhell
Normal file
@ -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..."
|
4
pkg/usr/share/aptss/transhell/aptss_zh_CN.transhell
Normal file
4
pkg/usr/share/aptss/transhell/aptss_zh_CN.transhell
Normal file
@ -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="从服务器获取配置和镜像列表..."
|
@ -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 \
|
||||
|
30
tool/aptss
30
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user