Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2b311fe7ef | |||
| 97726bebf8 | |||
| 0e8e4ecf0f | |||
| e79923c206 | |||
| 36b2ea2ced | |||
| e9f2ebd9e5 | |||
| 99268485c4 | |||
| ca582467dc | |||
| 92f87a3f62 | |||
| 6d76dc98aa | |||
| fd1d9dded0 | |||
| 488c2f038f | |||
| 1b531a75b1 | |||
| 73e3bec9c3 | |||
| 0bbaaea422 | |||
| 24fe84d5be | |||
| d74b603469 | |||
| 903788732c | |||
| c976b58920 |
2
.gitignore
vendored
@@ -1,2 +1,2 @@
|
|||||||
*.deb
|
*.deb
|
||||||
src/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env.tar.xz
|
src/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/ace-env.tar.xz
|
||||||
|
|||||||
@@ -27,6 +27,13 @@ Please use `git clone --recurse-submodules` to obtain the env
|
|||||||
|
|
||||||
https://share.shenmo.tech:23333/index.php?share/folder&user=1&sid=kr8z6Fqf
|
https://share.shenmo.tech:23333/index.php?share/folder&user=1&sid=kr8z6Fqf
|
||||||
|
|
||||||
|
(Dependencies are needed to upgrade for Ubuntu 18.04/deepin 15)
|
||||||
|
|
||||||
|
https://cdn.d.store.deepinos.org.cn/store/depends/bubblewrap_0.3.1-4_amd64.deb x86
|
||||||
|
|
||||||
|
https://cdn.d.store.deepinos.org.cn/aarch64-store/depends/bubblewrap_0.3.1-4_arm64.deb arm64
|
||||||
|
|
||||||
|
|
||||||
## Build Guide
|
## Build Guide
|
||||||
|
|
||||||
### Debian
|
### Debian
|
||||||
|
|||||||
@@ -21,6 +21,12 @@
|
|||||||
|
|
||||||
https://share.shenmo.tech:23333/index.php?share/folder&user=1&sid=kr8z6Fqf
|
https://share.shenmo.tech:23333/index.php?share/folder&user=1&sid=kr8z6Fqf
|
||||||
|
|
||||||
|
(Ubuntu 18.04/deepin 15需要先安装依赖)
|
||||||
|
|
||||||
|
https://cdn.d.store.deepinos.org.cn/store/depends/bubblewrap_0.3.1-4_amd64.deb x86
|
||||||
|
|
||||||
|
https://cdn.d.store.deepinos.org.cn/aarch64-store/depends/bubblewrap_0.3.1-4_arm64.deb arm64
|
||||||
|
|
||||||
## 构建指南
|
## 构建指南
|
||||||
|
|
||||||
### Debian
|
### Debian
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
Package: cn.flamescion.bookworm-compatibility-mode
|
Package: cn.flamescion.bookworm-compatibility-mode
|
||||||
Version: 12.4.10
|
Version: 12.4.11
|
||||||
Section: misc
|
Section: misc
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Depends: bubblewrap,flatpak,zenity,policykit-1,gcc,systemd
|
Depends: bubblewrap,flatpak,zenity,policykit-1,gcc,systemd
|
||||||
Maintainer: shenmo <shenmo@spark-app.store>
|
Maintainer: shenmo <shenmo@spark-app.store>
|
||||||
Architecture: amd64
|
Architecture: arm64
|
||||||
Description: bwrap wrapper for install and running debs inside a bookworm container
|
Description: bwrap wrapper for install and running debs inside a bookworm container
|
||||||
|
|||||||
@@ -1,9 +1,20 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
export PACKAGE_NAME="$DPKG_MAINTSCRIPT_PACKAGE"
|
export PACKAGE_NAME="$DPKG_MAINTSCRIPT_PACKAGE"
|
||||||
/opt/apps/$PACKAGE_NAME/files/bin/bookworm-init
|
|
||||||
|
if [ "${PACKAGE_NAME}" = "cn.flamescion.bookworm-compatibility-mode" ];then
|
||||||
|
if [ -d /opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env ];then
|
||||||
|
|
||||||
|
mv /opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env /opt/apps/cn.flamescion.bookworm-compatibility-mode/files/ace-env
|
||||||
|
ln -sfv /opt/apps/cn.flamescion.bookworm-compatibility-mode/files/ace-env /opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env
|
||||||
|
|
||||||
|
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
/opt/apps/$PACKAGE_NAME/files/bin/ace-init
|
||||||
|
|
||||||
if [ "${PACKAGE_NAME}" = "cn.flamescion.bookworm-compatibility-mode" ];then
|
if [ "${PACKAGE_NAME}" = "cn.flamescion.bookworm-compatibility-mode" ];then
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
systemctl enable ace-auto-upgrade
|
systemctl enable ace-bookworm-auto-upgrade
|
||||||
systemctl start ace-auto-upgrade
|
systemctl start ace-bookworm-auto-upgrade
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
PACKAGE_NAME="$DPKG_MAINTSCRIPT_PACKAGE"
|
PACKAGE_NAME="$DPKG_MAINTSCRIPT_PACKAGE"
|
||||||
|
|
||||||
if [ "${PACKAGE_NAME}" = "cn.flamescion.bookworm-compatibility-mode" ];then
|
if [ "${PACKAGE_NAME}" = "cn.flamescion.bookworm-compatibility-mode" ];then
|
||||||
systemctl stop ace-auto-upgrade
|
systemctl stop ace-bookworm-auto-upgrade
|
||||||
systemctl disable ace-auto-upgrade
|
systemctl disable ace-bookworm-auto-upgrade
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ fi
|
|||||||
|
|
||||||
# Desktop files (used by desktop environments within both X11 and Wayland) are
|
# 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
|
# looked for in XDG_DATA_DIRS; make sure it includes the relevant directory for ACE
|
||||||
ACE_path="/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env/usr/share/"
|
ACE_path="/opt/apps/amber-ce-bookworm/files/ace-env/flamescion-container-tools/data-dir/"
|
||||||
if [ -n "${XDG_DATA_DIRS##*${ACE_path}}" ] && [ -n "${XDG_DATA_DIRS##*${ACE_path}:*}" ]; then
|
if [ -n "${XDG_DATA_DIRS##*${ACE_path}}" ] && [ -n "${XDG_DATA_DIRS##*${ACE_path}:*}" ]; then
|
||||||
export XDG_DATA_DIRS="${ACE_path}:${XDG_DATA_DIRS}"
|
export XDG_DATA_DIRS="${ACE_path}:${XDG_DATA_DIRS}"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ fi
|
|||||||
|
|
||||||
# Desktop files (used by desktop environments within both X11 and Wayland) are
|
# 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
|
# looked for in XDG_DATA_DIRS; make sure it includes the relevant directory for ACE
|
||||||
ACE_path="/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env/usr/share/"
|
ACE_path="/opt/apps/amber-ce-bookworm/files/ace-env/flamescion-container-tools/data-dir/"
|
||||||
if [ -n "${XDG_DATA_DIRS##*${ACE_path}}" ] && [ -n "${XDG_DATA_DIRS##*${ACE_path}:*}" ]; then
|
if [ -n "${XDG_DATA_DIRS##*${ACE_path}}" ] && [ -n "${XDG_DATA_DIRS##*${ACE_path}:*}" ]; then
|
||||||
export XDG_DATA_DIRS="${ACE_path}:${XDG_DATA_DIRS}"
|
export XDG_DATA_DIRS="${ACE_path}:${XDG_DATA_DIRS}"
|
||||||
fi
|
fi
|
||||||
|
|||||||
1
src/opt/apps/amber-ce-bookworm
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
./cn.flamescion.bookworm-compatibility-mode/
|
||||||
|
Before Width: | Height: | Size: 196 KiB After Width: | Height: | Size: 196 KiB |
|
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 134 KiB |
|
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 118 KiB |
@@ -8,7 +8,7 @@ fi
|
|||||||
unset ABSOLUTE_PATH IN_CONTAINER_PATH PKGNAME_GUESS DPKG_LIST_FILE ACE_ENV_PATH
|
unset ABSOLUTE_PATH IN_CONTAINER_PATH PKGNAME_GUESS DPKG_LIST_FILE ACE_ENV_PATH
|
||||||
|
|
||||||
# 定义环境路径变量
|
# 定义环境路径变量
|
||||||
ACE_ENV_PATH="/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env"
|
ACE_ENV_PATH="/opt/apps/amber-ce-bookworm/files/ace-env"
|
||||||
|
|
||||||
# 检查参数个数
|
# 检查参数个数
|
||||||
if [ "$#" -ne 1 ]; then
|
if [ "$#" -ne 1 ]; then
|
||||||
@@ -4,7 +4,7 @@ pkexec $0
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
# 定义应用列表文件路径
|
# 定义应用列表文件路径
|
||||||
ACE_dir="/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env"
|
ACE_dir="/opt/apps/amber-ce-bookworm/files/ace-env"
|
||||||
|
|
||||||
# 读取所有.desktop文件,并构造应用列表
|
# 读取所有.desktop文件,并构造应用列表
|
||||||
app_list=()
|
app_list=()
|
||||||
@@ -44,7 +44,7 @@ selected_apps=$(zenity --list --title "应用列表" --column "是否卸载" --c
|
|||||||
if [ -n "$selected_apps" ]; then
|
if [ -n "$selected_apps" ]; then
|
||||||
# 卸载选中的应用
|
# 卸载选中的应用
|
||||||
(for app_desktop_path in $selected_apps; do
|
(for app_desktop_path in $selected_apps; do
|
||||||
ace-uninstall-helper "$app_desktop_path"
|
ace-bookworm-uninstall-helper "$app_desktop_path"
|
||||||
ret=$?
|
ret=$?
|
||||||
if [ "$ret" != "0" ];then
|
if [ "$ret" != "0" ];then
|
||||||
zenity --error --width 768 --text "$app_desktop_path 卸载失败,中止操作\n请手动执行\nsudo ace-uninstall-helper $app_desktop_path \n查看报错!"
|
zenity --error --width 768 --text "$app_desktop_path 卸载失败,中止操作\n请手动执行\nsudo ace-uninstall-helper $app_desktop_path \n查看报错!"
|
||||||
@@ -13,7 +13,7 @@ PKGNAME=`basename $ppparent_dir`
|
|||||||
else
|
else
|
||||||
PKGNAME=$PACKAGE_NAME
|
PKGNAME=$PACKAGE_NAME
|
||||||
fi
|
fi
|
||||||
chrootEnvPath=/opt/apps/$PKGNAME/files/bookworm-env
|
chrootEnvPath=/opt/apps/$PKGNAME/files/ace-env
|
||||||
if [ ! -e $chrootEnvPath ];then
|
if [ ! -e $chrootEnvPath ];then
|
||||||
echo "Uncompress the env...."
|
echo "Uncompress the env...."
|
||||||
tar -xvf $chrootEnvPath.tar.xz -C /opt/apps/$PKGNAME/files/
|
tar -xvf $chrootEnvPath.tar.xz -C /opt/apps/$PKGNAME/files/
|
||||||
@@ -76,6 +76,9 @@ export container_user_uid="$(sudo -u $non_root_user id -ru)"
|
|||||||
|
|
||||||
|
|
||||||
bookworm-run bash /flamescion-container-tools/container-init/init.sh
|
bookworm-run bash /flamescion-container-tools/container-init/init.sh
|
||||||
|
rm $chrootEnvPath/etc/localtime
|
||||||
|
cp $(realpath /etc/localtime) $chrootEnvPath/etc/localtime
|
||||||
|
chmod 777 $chrootEnvPath/etc/localtime
|
||||||
bookworm-run cp /host/etc/locale.gen /etc/locale.gen && locale-gen
|
bookworm-run cp /host/etc/locale.gen /etc/locale.gen && locale-gen
|
||||||
bookworm-run touch /finish.flag
|
bookworm-run touch /finish.flag
|
||||||
bookworm-run apt clean
|
bookworm-run apt clean
|
||||||
@@ -110,6 +113,6 @@ sudo -u $(who | awk '{print $1}' | head -n 1) bwrap --dev-bind $chrootEnvPath/ /
|
|||||||
--dev-bind-try /etc/resolv.conf /etc/resolv.conf \
|
--dev-bind-try /etc/resolv.conf /etc/resolv.conf \
|
||||||
--dev-bind-try /home /home \
|
--dev-bind-try /home /home \
|
||||||
locale-gen
|
locale-gen
|
||||||
|
bookworm-run update-locale LANG=$LANG
|
||||||
chown -R root $chrootEnvPath
|
chown -R root $chrootEnvPath
|
||||||
chmod 777 -R $chrootEnvPath /usr/share/icons
|
chmod 777 -R $chrootEnvPath /usr/share/icons
|
||||||
@@ -6,14 +6,14 @@ pparent_dir=`dirname $parent_dir`
|
|||||||
ppparent_dir=`dirname $pparent_dir`
|
ppparent_dir=`dirname $pparent_dir`
|
||||||
PKGNAME=`basename $ppparent_dir`
|
PKGNAME=`basename $ppparent_dir`
|
||||||
export PACKAGE_NAME=$PKGNAME
|
export PACKAGE_NAME=$PKGNAME
|
||||||
chrootEnvPath=/opt/apps/$PKGNAME/files/bookworm-env
|
chrootEnvPath=/opt/apps/$PKGNAME/files/ace-env
|
||||||
|
|
||||||
if [ ! -e $chrootEnvPath/finish.flag ];then
|
if [ ! -e $chrootEnvPath/finish.flag ];then
|
||||||
|
|
||||||
if [ "$(id -u)" = "0" ]; then
|
if [ "$(id -u)" = "0" ]; then
|
||||||
`dirname $chrootEnvPath`/bin/bookworm-init
|
`dirname $chrootEnvPath`/bin/ace-init
|
||||||
else
|
else
|
||||||
pkexec `dirname $chrootEnvPath`/bin/bookworm-init
|
pkexec `dirname $chrootEnvPath`/bin/ace-init
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@@ -103,6 +103,7 @@ ENV_VARS=(
|
|||||||
BIND_DIRS=(
|
BIND_DIRS=(
|
||||||
"--dev-bind $chrootEnvPath/ /"
|
"--dev-bind $chrootEnvPath/ /"
|
||||||
"--dev-bind-try /media /media"
|
"--dev-bind-try /media /media"
|
||||||
|
"--dev-bind-try /mnt /mnt"
|
||||||
"--dev-bind-try /tmp /tmp"
|
"--dev-bind-try /tmp /tmp"
|
||||||
"--dev /dev"
|
"--dev /dev"
|
||||||
"--dev-bind-try /dev/dri /dev/dri"
|
"--dev-bind-try /dev/dri /dev/dri"
|
||||||
|
|||||||
@@ -6,14 +6,14 @@ pparent_dir=`dirname $parent_dir`
|
|||||||
ppparent_dir=`dirname $pparent_dir`
|
ppparent_dir=`dirname $pparent_dir`
|
||||||
PKGNAME=`basename $ppparent_dir`
|
PKGNAME=`basename $ppparent_dir`
|
||||||
export PACKAGE_NAME=$PKGNAME
|
export PACKAGE_NAME=$PKGNAME
|
||||||
chrootEnvPath=/opt/apps/$PKGNAME/files/bookworm-env
|
chrootEnvPath=/opt/apps/$PKGNAME/files/ace-env
|
||||||
|
|
||||||
if [ ! -e $chrootEnvPath/finish.flag ];then
|
if [ ! -e $chrootEnvPath/finish.flag ];then
|
||||||
|
|
||||||
if [ "$(id -u)" = "0" ]; then
|
if [ "$(id -u)" = "0" ]; then
|
||||||
`dirname $chrootEnvPath`/bin/bookworm-init
|
`dirname $chrootEnvPath`/bin/ace-init
|
||||||
else
|
else
|
||||||
pkexec `dirname $chrootEnvPath`/bin/bookworm-init
|
pkexec `dirname $chrootEnvPath`/bin/ace-init
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -14,22 +14,29 @@ fi
|
|||||||
if [ "$1" = "amd64" ] || [ "$1" = "x64" ];then
|
if [ "$1" = "amd64" ] || [ "$1" = "x64" ];then
|
||||||
ARCH="amd64"
|
ARCH="amd64"
|
||||||
ARCH_ANOTHERWAY="x64"
|
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
|
elif [ "$1" = "arm64" ] || [ "$1" = "arm" ];then
|
||||||
ARCH="arm64"
|
ARCH="arm64"
|
||||||
ARCH_ANOTHERWAY="arm64"
|
ARCH_ANOTHERWAY="arm64"
|
||||||
else
|
|
||||||
echo "Invalid architecture! Exit"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd "`dirname $0`"
|
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 tar -I 'xz -T0' -cvf ace-env.tar.xz ace-env/*
|
||||||
sudo rm -rf bookworm-env
|
sudo rm -rf ace-env
|
||||||
|
|
||||||
pushd flamescion-container-tools/ace-host-integration
|
pushd flamescion-container-tools/ace-host-integration
|
||||||
|
|
||||||
|
|||||||
@@ -49,12 +49,12 @@ local file=$1
|
|||||||
echo "$file is detected. Processing host system integration..."
|
echo "$file is detected. Processing host system integration..."
|
||||||
sed -i 's|^Exec=\(.*\)|Exec=bookworm-run \1|' "$file"
|
sed -i 's|^Exec=\(.*\)|Exec=bookworm-run \1|' "$file"
|
||||||
sed -i '/^TryExec=/d' "$file"
|
sed -i '/^TryExec=/d' "$file"
|
||||||
sed -i '/^Name=/ s/$/ (ACE-Integration)/' "$file"
|
sed -i '/^Name=/ s/$/ (Bookworm)/' "$file"
|
||||||
sed -i "/^Name\[${LANGUAGE}\]=/ s/\$/ (ACE-Integration)/" "$file"
|
sed -i "/^Name\[${LANGUAGE}\]=/ s/\$/ (Bookworm)/" "$file"
|
||||||
icon_line=$(grep "^Icon=" "$file")
|
icon_line=$(grep "^Icon=" "$file")
|
||||||
if [[ "$icon_line" == "Icon=/"* ]]; then
|
if [[ "$icon_line" == "Icon=/"* ]]; then
|
||||||
# 如果Icon=后面接的是/,则添加前缀
|
# 如果Icon=后面接的是/,则添加前缀
|
||||||
sed -i 's|^Icon=/|Icon=/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env/|' "$file"
|
sed -i 's|^Icon=/|Icon=/opt/apps/amber-ce-bookworm/files/bookworm-env/|' "$file"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -166,10 +166,10 @@ fi
|
|||||||
|
|
||||||
user=$(who | awk '{print $1}' | head -n 1)
|
user=$(who | awk '{print $1}' | head -n 1)
|
||||||
|
|
||||||
log.info "ACE环境中有 $update_app_number 个软件包可升级,正在自动升级"
|
log.info "ACE Bookworm环境中有 $update_app_number 个软件包可升级,正在自动升级"
|
||||||
notify-send -a cn.flamescion.bookworm-compatibility-mode "ACE兼容环境" "ACE环境中有${update_app_number}个软件包可升级,执行自动升级..."
|
notify-send -a amber-ce-bookworm "ACE兼容环境" "ACE环境中有${update_app_number}个软件包可升级,执行自动升级..."
|
||||||
|
|
||||||
${APT_COMMAND} clean
|
${APT_COMMAND} clean
|
||||||
${APT_COMMAND} full-upgrade -y
|
${APT_COMMAND} full-upgrade -y
|
||||||
${APT_COMMAND} clean
|
${APT_COMMAND} clean
|
||||||
notify-send -a cn.flamescion.bookworm-compatibility-mode "ACE兼容环境" "自动升级结束"
|
notify-send -a amber-ce-bookworm "ACE兼容环境" "自动升级结束"
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
host-spawn /opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bin/bookworm-run-bwrap $@
|
host-spawn /opt/apps/amber-ce-bookworm/files/bin/bookworm-run-bwrap $@
|
||||||
|
|||||||
@@ -17,6 +17,10 @@ fi
|
|||||||
printf "\"%s\" ALL = (root) NOPASSWD:ALL\n" "${container_user_name}" >> /etc/sudoers.d/sudoers
|
printf "\"%s\" ALL = (root) NOPASSWD:ALL\n" "${container_user_name}" >> /etc/sudoers.d/sudoers
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
chmod 440 /etc/sudo.conf
|
||||||
|
chmod 440 /etc/sudoers
|
||||||
|
chmod 440 /etc/sudoers.d
|
||||||
|
|
||||||
|
|
||||||
printf "ACE: Setting up groups...\n"
|
printf "ACE: Setting up groups...\n"
|
||||||
# If not existing, ensure we have a group for our user.
|
# If not existing, ensure we have a group for our user.
|
||||||
@@ -121,125 +125,8 @@ ln -sfv /flamescion-container-tools/bin-override/host-spawn-$(uname -m) /flamesc
|
|||||||
|
|
||||||
apt install --reinstall /flamescion-container-tools/ace-host-integration.deb
|
apt install --reinstall /flamescion-container-tools/ace-host-integration.deb
|
||||||
|
|
||||||
|
cd /
|
||||||
|
mkdir -p /flamescion-container-tools/data-dir
|
||||||
### Do NVIDIA Integration
|
cd /flamescion-container-tools/data-dir/
|
||||||
|
ln -sfv ../../usr/share/applications/ .
|
||||||
echo "ACE: NVIDIA Integration"
|
ln -sfv ../../usr/share/icons/ .
|
||||||
|
|
||||||
ensureTargetDir() {
|
|
||||||
targetFile=$1
|
|
||||||
t=$(dirname "$targetFile")
|
|
||||||
mkdir -p "$t"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
lib32_dir="/usr/lib/"
|
|
||||||
lib64_dir="/usr/lib/"
|
|
||||||
if [ -e "/usr/lib/x86_64-linux-gnu" ]; then
|
|
||||||
lib64_dir="/usr/lib/x86_64-linux-gnu/"
|
|
||||||
elif [ -e "/usr/lib64" ]; then
|
|
||||||
lib64_dir="/usr/lib64/"
|
|
||||||
fi
|
|
||||||
if [ -e "/usr/lib/i386-linux-gnu" ]; then
|
|
||||||
lib32_dir="/usr/lib/i386-linux-gnu/"
|
|
||||||
elif [ -e "/usr/lib32" ]; then
|
|
||||||
lib32_dir="/usr/lib32/"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# First we find all non-lib files we need, this includes
|
|
||||||
# - binaries
|
|
||||||
# - confs
|
|
||||||
# - egl files
|
|
||||||
# - icd files
|
|
||||||
# Excluding here the libs, we will threat them later specifically
|
|
||||||
NVIDIA_FILES="$(find /host/etc/ /host/usr/ \
|
|
||||||
-path "/host/usr/lib/i386-linux-gnu/*" -prune -o \
|
|
||||||
-path "/host/usr/lib/x86_64-linux-gnu/*" -prune -o \
|
|
||||||
-path "/host/usr/lib32/*" -prune -o \
|
|
||||||
-path "/host/usr/lib64/*" -prune -o \
|
|
||||||
-iname "*nvidia*" -not -type d -print 2> /dev/null || :)"
|
|
||||||
for nvidia_file in ${NVIDIA_FILES}; do
|
|
||||||
dest_file="$(printf "%s" "${nvidia_file}" | sed 's|/host||g')"
|
|
||||||
ensureTargetDir ${dest_file}
|
|
||||||
cp -r "${nvidia_file}" "${dest_file}"
|
|
||||||
done
|
|
||||||
|
|
||||||
# Then we find all directories with nvidia in the name and just mount them
|
|
||||||
NVIDIA_DIRS="$(find /host/etc /host/usr -iname "*nvidia*" -type d 2> /dev/null || :)"
|
|
||||||
for nvidia_dir in ${NVIDIA_DIRS}; do
|
|
||||||
# /usr/lib64 is common in Arch or RPM based distros, while /usr/lib/x86_64-linux-gnu is
|
|
||||||
# common on Debian derivatives, so we need to adapt between the two nomenclatures.
|
|
||||||
if printf "%s" "${nvidia_dir}" | grep -Eq "lib32|lib64|x86_64-linux-gnu|i386-linux-gnu"; then
|
|
||||||
|
|
||||||
# Remove origin so we plug our own
|
|
||||||
dest_dir="$(printf "%s" "${nvidia_dir}" |
|
|
||||||
sed "s|/host/usr/lib/x86_64-linux-gnu/|${lib64_dir}|g" |
|
|
||||||
sed "s|/host/usr/lib/i386-linux-gnu/|${lib32_dir}|g" |
|
|
||||||
sed "s|/host/usr/lib64/|${lib64_dir}|g" |
|
|
||||||
sed "s|/host/usr/lib32/|${lib32_dir}|g")"
|
|
||||||
else
|
|
||||||
dest_dir="$(printf "%s" "${nvidia_dir}" | sed 's|/host||g')"
|
|
||||||
fi
|
|
||||||
ensureTargetDir ${dest_file}
|
|
||||||
cp -r "${nvidia_dir}" "${dest_file}"
|
|
||||||
done
|
|
||||||
|
|
||||||
# Then we find all the ".so" libraries, there are searched separately
|
|
||||||
# because we need to extract the relative path to mount them in the
|
|
||||||
# correct path based on the guest's setup
|
|
||||||
#
|
|
||||||
# /usr/lib64 is common in Arch or RPM based distros, while /usr/lib/x86_64-linux-gnu is
|
|
||||||
# common on Debian derivatives, so we need to adapt between the two nomenclatures.
|
|
||||||
NVIDIA_LIBS="$(find \
|
|
||||||
/host/usr/lib/i386-linux-gnu/ \
|
|
||||||
/host/usr/lib/x86_64-linux-gnu/ \
|
|
||||||
/host/usr/lib32/ \
|
|
||||||
/host/usr/lib64/ \
|
|
||||||
-iname "*nvidia*.so*" \
|
|
||||||
-o -iname "libcuda*.so*" \
|
|
||||||
-o -iname "libnvcuvid*.so*" \
|
|
||||||
-o -iname "libnvoptix*.so*" 2> /dev/null || :)"
|
|
||||||
for nvidia_lib in ${NVIDIA_LIBS}; do
|
|
||||||
dest_file="$(printf "%s" "${nvidia_lib}" |
|
|
||||||
sed "s|/host/usr/lib/x86_64-linux-gnu/|${lib64_dir}|g" |
|
|
||||||
sed "s|/host/usr/lib/i386-linux-gnu/|${lib32_dir}|g" |
|
|
||||||
sed "s|/host/usr/lib64/|${lib64_dir}|g" |
|
|
||||||
sed "s|/host/usr/lib32/|${lib32_dir}|g")"
|
|
||||||
|
|
||||||
# If file exists, just continue
|
|
||||||
# this may happen for directories like /usr/lib/nvidia/xorg/foo.so
|
|
||||||
# where the directory is already bind mounted (ro) and we don't need
|
|
||||||
# to mount further files in it.
|
|
||||||
if [ -e "${dest_file}" ]; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
type="file"
|
|
||||||
if [ -L "${nvidia_lib}" ]; then
|
|
||||||
type="link"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${type}" = "link" ]; then
|
|
||||||
mkdir -p "$(dirname "${dest_file}")"
|
|
||||||
cp -d "${nvidia_lib}" "${dest_file}"
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
ensureTargetDir ${dest_file}
|
|
||||||
cp -r "${nvidia_lib}" "${dest_file}"
|
|
||||||
|
|
||||||
done
|
|
||||||
|
|
||||||
# Refresh ldconfig cache, also detect if there are empty files remaining
|
|
||||||
# and clean them.
|
|
||||||
# This could happen when upgrading drivers and changing versions.
|
|
||||||
empty_libs="$(ldconfig 2>&1 | grep -Eo "File.*is empty" | cut -d' ' -f2)"
|
|
||||||
if [ -n "${empty_libs}" ]; then
|
|
||||||
# shellcheck disable=SC2086
|
|
||||||
find ${empty_libs} -delete 2> /dev/null || :
|
|
||||||
find /usr/ /etc/ -empty -iname "*nvidia*" -delete 2> /dev/null || :
|
|
||||||
fi
|
|
||||||
echo "ACE: Timezone Integration"
|
|
||||||
rm /etc/localtime
|
|
||||||
cp $(realpath /host/etc/localtime) /etc/localtime
|
|
||||||
chmod 777 /etc/localtime
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"appid": "cn.flamescion.bookworm-compatibility-mode",
|
"appid": "amber-ce-bookworm",
|
||||||
"name": "cn.flamescion.bookworm-compatibility-mode",
|
"name": "cn.flamescion.bookworm-compatibility-mode",
|
||||||
"version": "12.1.4",
|
"version": "12.1.4",
|
||||||
"arch": ["amd64"],
|
"arch": ["amd64"],
|
||||||
|
|||||||
1
src/usr/bin/ace-bookworm-uninstall-helper
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../../opt/apps/amber-ce-bookworm/files/bin/ace-bookworm-uninstall-helper
|
||||||
1
src/usr/bin/ace-bookworm-uninstall-helper-gui
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../../opt/apps/amber-ce-bookworm/files/bin/ace-bookworm-uninstall-helper-gui
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bin/ace-uninstall-helper
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bin/ace-uninstall-helper-gui
|
|
||||||
@@ -1 +1 @@
|
|||||||
../../opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bin/bookworm-run
|
../../opt/apps/amber-ce-bookworm/files/bin/bookworm-run
|
||||||
@@ -10,7 +10,7 @@ fi
|
|||||||
|
|
||||||
# Desktop files (used by desktop environments within both X11 and Wayland) are
|
# 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
|
# looked for in XDG_DATA_DIRS; make sure it includes the relevant directory for ACE
|
||||||
ACE_path="/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env/usr/share/"
|
ACE_path="/opt/apps/amber-ce-bookworm/files/ace-env/flamescion-container-tools/data-dir/"
|
||||||
if [ -n "${XDG_DATA_DIRS##*${ACE_path}}" ] && [ -n "${XDG_DATA_DIRS##*${ACE_path}:*}" ]; then
|
if [ -n "${XDG_DATA_DIRS##*${ACE_path}}" ] && [ -n "${XDG_DATA_DIRS##*${ACE_path}:*}" ]; then
|
||||||
export XDG_DATA_DIRS="${ACE_path}:${XDG_DATA_DIRS}"
|
export XDG_DATA_DIRS="${ACE_path}:${XDG_DATA_DIRS}"
|
||||||
fi
|
fi
|
||||||
|
|||||||
11
src/usr/share/applications/ACE-bookworm-uninstaller.desktop
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Name=ACE Bookworm Software Uninstaller
|
||||||
|
Name[zh_CN]=ACE Bookworm软件卸载器
|
||||||
|
Comment=用于卸载ACE容器的应用
|
||||||
|
Type=Application
|
||||||
|
Exec=/opt/apps/amber-ce-bookworm/files/bin/ace-bookworm-uninstall-helper-gui
|
||||||
|
Icon=ACE-bookworm-uninstaller
|
||||||
|
Categories=System
|
||||||
|
|
||||||
|
# Generated from the DesktopGenerater component of the z-Tools toolkit
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
[Desktop Entry]
|
|
||||||
Version=1.0
|
|
||||||
Name=ACE Software Uninstaller
|
|
||||||
Name[zh_CN]=ACE软件卸载器
|
|
||||||
Comment=用于卸载ACE容器的应用
|
|
||||||
Type=Application
|
|
||||||
Exec=/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bin/ace-uninstall-helper-gui
|
|
||||||
Icon=ACE-uninstaller
|
|
||||||
Categories=System
|
|
||||||
|
|
||||||
# Generated from the DesktopGenerater component of the z-Tools toolkit
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Categories=utils
|
Categories=utils
|
||||||
Exec=bookworm-run %U
|
Exec=bookworm-run %U
|
||||||
Icon=cn.flamescion.bookworm-compatibility-mode
|
Icon=amber-ce-bookworm
|
||||||
Name=Amber CE
|
Name=Amber CE Bookworm
|
||||||
Name[zh_CN]=ACE兼容环境
|
Name[zh_CN]=ACE Bookworm兼容环境
|
||||||
Keywords=BCM,ACE,ace,mode
|
Keywords=BCM,ACE,ace,mode
|
||||||
StartupNotify=true
|
StartupNotify=true
|
||||||
Type=Application
|
Type=Application
|
||||||
|
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 134 KiB |
@@ -2,17 +2,17 @@
|
|||||||
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
|
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
|
||||||
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
|
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
|
||||||
<policyconfig>
|
<policyconfig>
|
||||||
<vendor>cn.flamescion.ace-uninstaller</vendor>
|
<vendor>amber-ce-bookworm.ace-uninstaller</vendor>
|
||||||
<icon_name>x-package-repository</icon_name>
|
<icon_name>x-package-repository</icon_name>
|
||||||
<action id="cn.flamescion.ace-uninstaller">
|
<action id="amber-ce-bookworm.ace-uninstaller">
|
||||||
<description>运行cn.flamescion.ace-uninstaller需要权限</description>
|
<description>运行amber-ce-bookworm.ace-uninstaller需要权限</description>
|
||||||
<message>要使用cn.flamescion.ace-uninstaller需要权限</message>
|
<message>要使用amber-ce-bookworm.ace-uninstaller需要权限</message>
|
||||||
<defaults>
|
<defaults>
|
||||||
<allow_any>yes</allow_any>
|
<allow_any>yes</allow_any>
|
||||||
<allow_inactive>yes</allow_inactive>
|
<allow_inactive>yes</allow_inactive>
|
||||||
<allow_active>yes</allow_active>
|
<allow_active>yes</allow_active>
|
||||||
</defaults>
|
</defaults>
|
||||||
<annotate key="org.freedesktop.policykit.exec.path">/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bin/ace-uninstall-helper-gui</annotate>
|
<annotate key="org.freedesktop.policykit.exec.path">/opt/apps/amber-ce-bookworm/files/bin/ace-bookworm-uninstall-helper-gui</annotate>
|
||||||
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
|
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
|
||||||
</action>
|
</action>
|
||||||
</policyconfig>
|
</policyconfig>
|
||||||