From 0bbaaea422b363b2ccad92910e48f431c5282f69 Mon Sep 17 00:00:00 2001 From: shenmo Date: Sat, 23 Mar 2024 15:39:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E7=9B=AE=E5=BD=95=E4=B8=BAac?= =?UTF-8?q?e-env?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- src/DEBIAN/preinst | 3 ++- src/etc/X11/Xsession.d/20ACE-Bookworm | 2 +- src/etc/profile.d/ACE-Bookworm.sh | 2 +- .../files/bin/ace-bookworm-uninstall-helper | 2 +- .../bin/ace-bookworm-uninstall-helper-gui | 2 +- .../apps/amber-ce-bookworm/files/bin/ace-init | 2 +- .../amber-ce-bookworm/files/bin/bookworm-run | 2 +- .../files/bin/bookworm-run-bwrap | 2 +- .../files/build-container.sh | 23 ++++++++++++------- .../60-ACE-Bookworm | 2 +- 11 files changed, 26 insertions(+), 18 deletions(-) diff --git a/.gitignore b/.gitignore index fc9d160..fad24c6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ *.deb -src/opt/apps/amber-ce-bookworm/files/bookworm-env.tar.xz +src/opt/apps/amber-ce-bookworm/files/ace-env.tar.xz diff --git a/src/DEBIAN/preinst b/src/DEBIAN/preinst index 934d27b..0b09cd9 100755 --- a/src/DEBIAN/preinst +++ b/src/DEBIAN/preinst @@ -3,7 +3,8 @@ if [ "${PACKAGE_NAME}" = "amber-ce-bookworm" ];then if [ -e /opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env ];then if [ "$(arch)" != "loongarch64" ];then -mv /opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env /opt/apps/amber-ce-bookworm/files/bookworm-env +mv /opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env /opt/apps/amber-ce-bookworm/files/ace-env +rm -rf /opt/apps/cn.flamescion.bookworm-compatibility-mode fi fi fi diff --git a/src/etc/X11/Xsession.d/20ACE-Bookworm b/src/etc/X11/Xsession.d/20ACE-Bookworm index 9402dd6..c2cb0a9 100755 --- a/src/etc/X11/Xsession.d/20ACE-Bookworm +++ b/src/etc/X11/Xsession.d/20ACE-Bookworm @@ -10,7 +10,7 @@ fi # Desktop files (used by desktop environments within both X11 and Wayland) are # looked for in XDG_DATA_DIRS; make sure it includes the relevant directory for ACE -ACE_path="/opt/apps/amber-ce-bookworm/files/bookworm-env/usr/share/" +ACE_path="/opt/apps/amber-ce-bookworm/files/ace-env/usr/share/" if [ -n "${XDG_DATA_DIRS##*${ACE_path}}" ] && [ -n "${XDG_DATA_DIRS##*${ACE_path}:*}" ]; then export XDG_DATA_DIRS="${ACE_path}:${XDG_DATA_DIRS}" fi diff --git a/src/etc/profile.d/ACE-Bookworm.sh b/src/etc/profile.d/ACE-Bookworm.sh index 5349701..844e792 100755 --- a/src/etc/profile.d/ACE-Bookworm.sh +++ b/src/etc/profile.d/ACE-Bookworm.sh @@ -9,7 +9,7 @@ fi # Desktop files (used by desktop environments within both X11 and Wayland) are # looked for in XDG_DATA_DIRS; make sure it includes the relevant directory for ACE -ACE_path="/opt/apps/amber-ce-bookworm/files/bookworm-env/usr/share/" +ACE_path="/opt/apps/amber-ce-bookworm/files/ace-env/usr/share/" if [ -n "${XDG_DATA_DIRS##*${ACE_path}}" ] && [ -n "${XDG_DATA_DIRS##*${ACE_path}:*}" ]; then export XDG_DATA_DIRS="${ACE_path}:${XDG_DATA_DIRS}" fi diff --git a/src/opt/apps/amber-ce-bookworm/files/bin/ace-bookworm-uninstall-helper b/src/opt/apps/amber-ce-bookworm/files/bin/ace-bookworm-uninstall-helper index bdffd97..c7b8e30 100755 --- a/src/opt/apps/amber-ce-bookworm/files/bin/ace-bookworm-uninstall-helper +++ b/src/opt/apps/amber-ce-bookworm/files/bin/ace-bookworm-uninstall-helper @@ -8,7 +8,7 @@ fi unset ABSOLUTE_PATH IN_CONTAINER_PATH PKGNAME_GUESS DPKG_LIST_FILE ACE_ENV_PATH # 定义环境路径变量 -ACE_ENV_PATH="/opt/apps/amber-ce-bookworm/files/bookworm-env" +ACE_ENV_PATH="/opt/apps/amber-ce-bookworm/files/ace-env" # 检查参数个数 if [ "$#" -ne 1 ]; then diff --git a/src/opt/apps/amber-ce-bookworm/files/bin/ace-bookworm-uninstall-helper-gui b/src/opt/apps/amber-ce-bookworm/files/bin/ace-bookworm-uninstall-helper-gui index ba1b593..76c7826 100755 --- a/src/opt/apps/amber-ce-bookworm/files/bin/ace-bookworm-uninstall-helper-gui +++ b/src/opt/apps/amber-ce-bookworm/files/bin/ace-bookworm-uninstall-helper-gui @@ -4,7 +4,7 @@ pkexec $0 exit fi # 定义应用列表文件路径 -ACE_dir="/opt/apps/amber-ce-bookworm/files/bookworm-env" +ACE_dir="/opt/apps/amber-ce-bookworm/files/ace-env" # 读取所有.desktop文件,并构造应用列表 app_list=() diff --git a/src/opt/apps/amber-ce-bookworm/files/bin/ace-init b/src/opt/apps/amber-ce-bookworm/files/bin/ace-init index 161de75..41449a9 100755 --- a/src/opt/apps/amber-ce-bookworm/files/bin/ace-init +++ b/src/opt/apps/amber-ce-bookworm/files/bin/ace-init @@ -13,7 +13,7 @@ PKGNAME=`basename $ppparent_dir` else PKGNAME=$PACKAGE_NAME fi -chrootEnvPath=/opt/apps/$PKGNAME/files/bookworm-env +chrootEnvPath=/opt/apps/$PKGNAME/files/ace-env if [ ! -e $chrootEnvPath ];then echo "Uncompress the env...." tar -xvf $chrootEnvPath.tar.xz -C /opt/apps/$PKGNAME/files/ diff --git a/src/opt/apps/amber-ce-bookworm/files/bin/bookworm-run b/src/opt/apps/amber-ce-bookworm/files/bin/bookworm-run index fa996a5..4bf466c 100755 --- a/src/opt/apps/amber-ce-bookworm/files/bin/bookworm-run +++ b/src/opt/apps/amber-ce-bookworm/files/bin/bookworm-run @@ -6,7 +6,7 @@ pparent_dir=`dirname $parent_dir` ppparent_dir=`dirname $pparent_dir` PKGNAME=`basename $ppparent_dir` export PACKAGE_NAME=$PKGNAME -chrootEnvPath=/opt/apps/$PKGNAME/files/bookworm-env +chrootEnvPath=/opt/apps/$PKGNAME/files/ace-env if [ ! -e $chrootEnvPath/finish.flag ];then diff --git a/src/opt/apps/amber-ce-bookworm/files/bin/bookworm-run-bwrap b/src/opt/apps/amber-ce-bookworm/files/bin/bookworm-run-bwrap index 3bd9054..f7e6488 100755 --- a/src/opt/apps/amber-ce-bookworm/files/bin/bookworm-run-bwrap +++ b/src/opt/apps/amber-ce-bookworm/files/bin/bookworm-run-bwrap @@ -6,7 +6,7 @@ pparent_dir=`dirname $parent_dir` ppparent_dir=`dirname $pparent_dir` PKGNAME=`basename $ppparent_dir` export PACKAGE_NAME=$PKGNAME -chrootEnvPath=/opt/apps/$PKGNAME/files/bookworm-env +chrootEnvPath=/opt/apps/$PKGNAME/files/ace-env if [ ! -e $chrootEnvPath/finish.flag ];then diff --git a/src/opt/apps/amber-ce-bookworm/files/build-container.sh b/src/opt/apps/amber-ce-bookworm/files/build-container.sh index 93a8c52..7433aab 100755 --- a/src/opt/apps/amber-ce-bookworm/files/build-container.sh +++ b/src/opt/apps/amber-ce-bookworm/files/build-container.sh @@ -14,22 +14,29 @@ fi if [ "$1" = "amd64" ] || [ "$1" = "x64" ];then ARCH="amd64" ARCH_ANOTHERWAY="x64" +cd "`dirname $0`" +sudo debootstrap --include=libnotify-bin,apt-utils,bash-completion,bc,curl,dialog,diffutils,findutils,gnupg2,less,libnss-myhostname,libvte-common,lsof,ncurses-base,passwd,pinentry-curses,procps,sudo,time,util-linux,wget,libegl1-mesa,libgl1-mesa-glx,libvulkan1,mesa-vulkan-drivers,locales,libglib2.0-bin --arch=${ARCH} bookworm ./ace-env https://mirrors.ustc.edu.cn/debian/ + elif [ "$1" = "arm64" ] || [ "$1" = "arm" ];then ARCH="arm64" ARCH_ANOTHERWAY="arm64" -else -echo "Invalid architecture! Exit" -exit 1 -fi cd "`dirname $0`" -sudo debootstrap --include=libnotify-bin,apt-utils,bash-completion,bc,curl,dialog,diffutils,findutils,gnupg2,less,libnss-myhostname,libvte-common,lsof,ncurses-base,passwd,pinentry-curses,procps,sudo,time,util-linux,wget,libegl1-mesa,libgl1-mesa-glx,libvulkan1,mesa-vulkan-drivers,locales,libglib2.0-bin --arch=${ARCH} bookworm ./bookworm-env https://mirrors.ustc.edu.cn/debian/ +sudo debootstrap --include=libnotify-bin,apt-utils,bash-completion,bc,curl,dialog,diffutils,findutils,gnupg2,less,libnss-myhostname,libvte-common,lsof,ncurses-base,passwd,pinentry-curses,procps,sudo,time,util-linux,wget,libegl1-mesa,libgl1-mesa-glx,libvulkan1,mesa-vulkan-drivers,locales,libglib2.0-bin --arch=${ARCH} bookworm ./ace-env https://mirrors.ustc.edu.cn/debian/ +elif [ "$1" = "loong" ] || [ "$1" = "loong64" ];then +ARCH="loong64" +ARCH_ANOTHERWAY="loong64" +sudo debootstrap --no-check-gpg --include=libnotify-bin,apt-utils,bash-completion,bc,curl,dialog,diffutils,findutils,gnupg2,less,libnss-myhostname,libvte-common,lsof,ncurses-base,passwd,pinentry-curses,procps,sudo,time,util-linux,wget,libegl1,libgl1-mesa-dri,libvulkan1,mesa-vulkan-drivers,locales,libglib2.0-bin --arch=${ARCH} --variant=buildd sid ./ace-env http://lauosc.cn:11232/debian +else +echo "Need to point out architecture" +exit +fi -sudo rm -rf bookworm-env/var/cache/apt/archives/*.deb +sudo rm -rf ace-env/var/cache/apt/archives/*.deb -sudo tar -I 'xz -T0' -cvf bookworm-env.tar.xz bookworm-env/* -sudo rm -rf bookworm-env +sudo tar -I 'xz -T0' -cvf ace-env.tar.xz ace-env/* +sudo rm -rf ace-env pushd flamescion-container-tools/ace-host-integration diff --git a/src/usr/lib/systemd/user-environment-generators/60-ACE-Bookworm b/src/usr/lib/systemd/user-environment-generators/60-ACE-Bookworm index 5075421..3af584c 100755 --- a/src/usr/lib/systemd/user-environment-generators/60-ACE-Bookworm +++ b/src/usr/lib/systemd/user-environment-generators/60-ACE-Bookworm @@ -10,7 +10,7 @@ fi # Desktop files (used by desktop environments within both X11 and Wayland) are # looked for in XDG_DATA_DIRS; make sure it includes the relevant directory for ACE -ACE_path="/opt/apps/amber-ce-bookworm/files/bookworm-env/usr/share/" +ACE_path="/opt/apps/amber-ce-bookworm/files/ace-env/usr/share/" if [ -n "${XDG_DATA_DIRS##*${ACE_path}}" ] && [ -n "${XDG_DATA_DIRS##*${ACE_path}:*}" ]; then export XDG_DATA_DIRS="${ACE_path}:${XDG_DATA_DIRS}" fi