Compare commits

..

41 Commits

Author SHA1 Message Date
7f33d2fff7 去除unlink 2024-01-11 23:54:03 +08:00
b93199bb05 feat: 直接在包体提供bin的软链接而不是在postinst做 2024-01-11 23:52:11 +08:00
6b0942d2d5 test: NVIDIA support 2024-01-05 18:57:33 +08:00
de2d84e13a fix: Can not show icons in ACE container.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-12-31 13:12:39 +00:00
8fca595000 update tips-slimize-container.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-12-25 09:35:52 +00:00
ceb863717f update tips-slimize-container.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-12-25 09:27:44 +00:00
f489876185 fix: Can not start app in some desktops
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-12-20 06:13:52 +00:00
1e47004eef !2 chore: modify the category of shortcuts
Merge pull request !2 from pzm9012/master
2023-12-12 15:40:38 +00:00
pzm9012
4afbfab976 chore: modify the category of shortcuts
Signed-off-by: pzm9012 <pzm9012@outlook.com>
2023-12-12 15:33:43 +00:00
866a866d5b 无UOS包支持 2023-12-12 22:57:17 +08:00
2bdfe5c177 update src/DEBIAN/control.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-12-12 09:33:40 +00:00
6b27103c18 提交:1245 2023-12-11 23:36:17 +08:00
00c2772152 change ace integration
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-12-11 15:29:53 +00:00
a8463e9152 1.3
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-12-11 15:28:30 +00:00
0f293864b6 pkexec fix
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-12-11 08:09:11 +00:00
6c853b2bec update src/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/build-container.sh.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-12-11 07:06:13 +00:00
8ce2c31380 修复 部分桌面上无法出现desktop 2023-12-11 10:02:38 +08:00
Anysets
f57e80c61a 删除文件 runsript-arch 2023-12-07 15:34:16 +00:00
Anysets
8140e49602 新建 runsript-arch 2023-12-07 15:33:05 +00:00
bc1d029e64 update src/DEBIAN/control.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-12-04 08:24:47 +00:00
4d51bd9dc4 update src/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bin/bookworm-init.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-11-23 13:11:24 +00:00
5e41a8f9e7 update src/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bin/bookworm-run.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-11-23 13:09:54 +00:00
2949a3df3f 重命名 src/etc/profile.d/bookworm-compatability-mode.sh 为 src/etc/profile.d/ACE-Bookworm.sh 2023-11-23 07:14:13 +00:00
c1030dd35b update src/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bin/bookworm-run.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-11-22 15:13:27 +00:00
8d95934a7d update src/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bin/bookworm-run.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-11-22 15:09:41 +00:00
0f4ae31462 update src/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bin/bookworm-run.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-11-22 15:07:44 +00:00
c04007eccd arch问题 2023-11-21 15:29:26 +08:00
98575a442c 修复:media挂不上去 2023-11-21 15:26:32 +08:00
ddabb804d0 fix: 卸载工具的comment只显示英文 2023-11-17 21:01:58 +08:00
caadd5d785 修复:vim-common卸载失败 2023-11-15 16:55:17 +08:00
f89f92533f 修改: src/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bin/ace-uninstall-helper-gui 2023-11-15 14:10:49 +08:00
a1593ea635 no-pass-auth-uninstaller 2023-11-15 14:06:27 +08:00
d06eaed9e3 修复:错误的环境变量设置 2023-11-14 23:28:46 +08:00
00a12285d9 !1 针对ubuntu发行版本的修正,
Merge pull request !1 from RX6900XT/master
2023-11-13 11:40:06 +00:00
RX6900XT
c26bf5aa06 update src/etc/profile.d/bookworm-compatability-mode.sh.
Signed-off-by: RX6900XT <qq482961502@gmail.com>
2023-11-13 10:57:35 +00:00
RX6900XT
fb8752e0ba !1 update src/etc/profile.d/bookworm-compatability-mode.sh.
Merge pull request !1 from shenmo/N/A
2023-11-13 10:55:57 +00:00
e2769c15d2 update src/etc/profile.d/bookworm-compatability-mode.sh.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-11-13 10:36:46 +00:00
RX6900XT
1e88351964 update src/etc/profile.d/bookworm-compatability-mode.sh.
针对ubuntu发行版本做出修正,在deepin下也能正常工作

Signed-off-by: RX6900XT <qq482961502@gmail.com>
2023-11-13 10:19:37 +00:00
6322718144 更改主机名 2023-11-13 15:09:59 +08:00
60ef6a9893 --setenv IS_ACE_ENV=1 2023-11-12 22:24:55 +08:00
722efa9726 update src/opt/apps/cn.flamescion.bookworm-compatibility-mod
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-11-12 11:07:14 +00:00
29 changed files with 263 additions and 87 deletions

View File

@@ -1,8 +1,8 @@
Package: cn.flamescion.bookworm-compatibility-mode Package: cn.flamescion.bookworm-compatibility-mode
Version: 12.3.4 Version: 12.4.7
Section: misc Section: misc
Priority: optional Priority: optional
Depends: bubblewrap,flatpak,zenity Depends: bubblewrap,flatpak,zenity,policykit-1,gcc
Maintainer: shenmo <shenmo@spark-app.store> Maintainer: shenmo <shenmo@spark-app.store>
Architecture: arm64 Architecture: amd64
Description: bwrap wrapper for install and running debs inside a bookworm container Description: bwrap wrapper for install and running debs inside a bookworm container

View File

@@ -1,8 +1,4 @@
#!/bin/bash #!/bin/bash
export PACKAGE_NAME="$DPKG_MAINTSCRIPT_PACKAGE" export PACKAGE_NAME="$DPKG_MAINTSCRIPT_PACKAGE"
/opt/apps/$PACKAGE_NAME/files/bin/bookworm-init /opt/apps/$PACKAGE_NAME/files/bin/bookworm-init
if [ "$PACKAGE_NAME" = "cn.flamescion.bookworm-compatibility-mode" ];then
ln -sf /opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bin/bookworm-run /usr/bin/bookworm-run
ln -sf /opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bin/ace-uninstall-helper /usr/bin/ace-uninstall-helper
ln -sf /opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bin/ace-uninstall-helper-gui /usr/bin/ace-uninstall-helper-gui
fi

View File

@@ -1,11 +1,7 @@
#!/bin/bash #!/bin/bash
PACKAGE_NAME="$DPKG_MAINTSCRIPT_PACKAGE" PACKAGE_NAME="$DPKG_MAINTSCRIPT_PACKAGE"
if [ "$1" = "remove" ] || [ "$1" = "purge" ];then if [ "$1" = "remove" ] || [ "$1" = "purge" ];then
if [ "$PACKAGE_NAME" = "cn.flamescion.bookworm-compatibility-mode" ];then
unlink /usr/bin/bookworm-run
unlink /usr/bin/ace-uninstall-helper
unlink /usr/bin/ace-uninstall-helper-gui
fi
echo "清理卸载残留" echo "清理卸载残留"
rm -rf /opt/apps/$PACKAGE_NAME rm -rf /opt/apps/$PACKAGE_NAME

View File

@@ -0,0 +1,17 @@
# Ensure base distro defaults xdg path are set if nothing filed up some
# defaults yet.
if [ -z "$XDG_DATA_DIRS" ]; then
export XDG_DATA_DIRS="/usr/local/share:/usr/share"
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/cn.flamescion.bookworm-compatibility-mode/files/bookworm-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

View File

@@ -0,0 +1,16 @@
# Ensure base distro defaults xdg path are set if nothing filed up some
# defaults yet.
if [ -z "$XDG_DATA_DIRS" ]; then
export XDG_DATA_DIRS="/usr/local/share:/usr/share"
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/cn.flamescion.bookworm-compatibility-mode/files/bookworm-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

View File

@@ -1,4 +0,0 @@
export XDG_DATA_DIRS
APP_ROOT="/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env/usr/share"
XDG_DATA_DIRS="${APP_ROOT}:/usr/local/share:/usr/share"
export APP_ROOT

View File

@@ -42,7 +42,7 @@ if [ -f "$DPKG_INFO_PATH/$PKGNAME_GUESS.list" ]; then
elif ls "$DPKG_INFO_PATH/${PKGNAME_GUESS}:*.list" 1> /dev/null 2>&1; then elif ls "$DPKG_INFO_PATH/${PKGNAME_GUESS}:*.list" 1> /dev/null 2>&1; then
DPKG_LIST_FILE=$(ls "$DPKG_INFO_PATH/${PKGNAME_GUESS}:*.list" | head -n 1) DPKG_LIST_FILE=$(ls "$DPKG_INFO_PATH/${PKGNAME_GUESS}:*.list" | head -n 1)
else else
echo "No dpkg list file found for $PKGNAME_GUESS.desktop,try to scan to search for the package" echo "Warn:No dpkg list file found for $PKGNAME_GUESS.desktop,try to scan to search for the package"
fi fi
# 验证文件并执行操作 # 验证文件并执行操作
@@ -53,20 +53,21 @@ if [ -f "$DPKG_LIST_FILE" ]; then
ret=$? ret=$?
if [ "$ret" = "0" ];then if [ "$ret" = "0" ];then
echo "Operation succeeded." echo "Operation succeeded."
exit
else else
echo "Operation failed." echo "Operation failed."
exit $ret exit $ret
fi fi
else else
echo "Error: Path not found in the dpkg list file." echo "Warn: Path not found in the dpkg list file,try to scan to search for the package"
exit 1
fi fi
else fi
# 遍历所有list文件 # 遍历所有list文件 As fallback
for file in "$DPKG_INFO_PATH"/*.list; do for file in "$DPKG_INFO_PATH"/*.list; do
if grep -q "$IN_CONTAINER_PATH" "$file"; then if grep -q "$IN_CONTAINER_PATH" "$file"; then
PKGNAME_GUESS=$(basename "$file" .list | cut -d':' -f1) PKGNAME_GUESS=$(basename "$file" .list | cut -d':' -f1)
echo "Get pkgname $PKGNAME_GUESS, uninstalling..."
bookworm-run apt autopurge $PKGNAME_GUESS -y bookworm-run apt autopurge $PKGNAME_GUESS -y
ret=$? ret=$?
if [ "$ret" = "0" ];then if [ "$ret" = "0" ];then
@@ -81,5 +82,5 @@ else
done done
echo "Error: No matching package found." echo "Error: No matching package found."
exit 1 exit 1
fi

View File

@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
if [ "$UID" != "0" ];then if [ "$UID" != "0" ];then
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY $0 pkexec $0
exit exit
fi fi
# 定义应用列表文件路径 # 定义应用列表文件路径
@@ -23,7 +23,13 @@ for file in "$ACE_dir"/usr/share/applications/*.desktop; do
else else
name=$name_i18n name=$name_i18n
fi fi
comment=$(grep -m 1 '^Comment=' "$file" | cut -d '=' -f 2) comment_orig=$(grep -m 1 '^Comment=' "$file" | cut -d '=' -f 2)
comment_i18n=$(grep -m 1 "^Comment\[${LANGUAGE}\]\=" "$file" | cut -d '=' -f 2)
if [ -z "$comment_i18n" ] ;then
comment=$comment_orig
else
comment=$comment_i18n
fi
# 如果没有简介,则显示"N/A" # 如果没有简介,则显示"N/A"
[[ -z "$comment" ]] && comment="N/A" [[ -z "$comment" ]] && comment="N/A"
# 添加到应用列表数组 # 添加到应用列表数组

View File

@@ -36,9 +36,10 @@ bwrap --dev-bind $chrootEnvPath/ / \
--setenv LC_ALL "$LC_ALL" \ --setenv LC_ALL "$LC_ALL" \
--setenv PULSE_SERVER /run/user/$uid/pulse/native \ --setenv PULSE_SERVER /run/user/$uid/pulse/native \
--setenv PATH /flamescion-container-tools/bin-override:$PATH \ --setenv PATH /flamescion-container-tools/bin-override:$PATH \
--setenv IS_ACE_ENV "1" \
--dev-bind $chrootEnvPath/ / \ --dev-bind $chrootEnvPath/ / \
--dev-bind /media /media \ --dev-bind-try /media /media \
--dev-bind /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 \
--proc /proc \ --proc /proc \
@@ -49,10 +50,10 @@ bwrap --dev-bind $chrootEnvPath/ / \
--bind-try /usr/share/themes /usr/local/share/themes \ --bind-try /usr/share/themes /usr/local/share/themes \
--bind-try /usr/share/icons /usr/local/share/icons \ --bind-try /usr/share/icons /usr/local/share/icons \
--bind-try /usr/share/fonts /usr/local/share/fonts \ --bind-try /usr/share/fonts /usr/local/share/fonts \
--hostname bookworm-compatibility-mode \ --hostname Amber-CE-Bookworm \
--unshare-uts \ --unshare-uts \
--dev-bind /etc/resolv.conf /etc/resolv.conf \ --dev-bind-try /etc/resolv.conf /etc/resolv.conf \
--dev-bind /home /home \ --dev-bind-try /home /home \
$@ $@
@@ -177,14 +178,138 @@ printf "%s:%s" "${container_user_name}" "${temporary_password}" | chpasswd -e
printf "%s:" "root" | chpasswd -e printf "%s:" "root" | chpasswd -e
printf "%s:" "${container_user_name}" | chpasswd -e printf "%s:" "${container_user_name}" | chpasswd -e
mkdir -p /usr/share/fonts
mkdir -p /usr/share/icons
mkdir -p /usr/share/themes
## init host-spawn ## init host-spawn
unlink /flamescion-container-tools/bin-override/host-spawn unlink /flamescion-container-tools/bin-override/host-spawn
ln -sfv /flamescion-container-tools/bin-override/host-spawn-`arch` /flamescion-container-tools/bin-override/host-spawn ln -sfv /flamescion-container-tools/bin-override/host-spawn-$(uname -m) /flamescion-container-tools/bin-override/host-spawn
## install host-integration ## install host-integration
apt install --reinstall /flamescion-container-tools/ace-host-integration.deb apt install --reinstall /flamescion-container-tools/ace-host-integration.deb
### Do NVIDIA Integration
echo "ACE: NVIDIA Integration"
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
EOFFFFFF EOFFFFFF
#####init #####init
@@ -208,9 +333,10 @@ sudo -u $(who | awk '{print $1}' | head -n 1) bwrap --dev-bind $chrootEnvPath/ /
--setenv LC_ALL "$LC_ALL" \ --setenv LC_ALL "$LC_ALL" \
--setenv PULSE_SERVER /run/user/$uid/pulse/native \ --setenv PULSE_SERVER /run/user/$uid/pulse/native \
--setenv PATH /flamescion-container-tools/bin-override:$PATH \ --setenv PATH /flamescion-container-tools/bin-override:$PATH \
--setenv IS_ACE_ENV "1" \
--dev-bind $chrootEnvPath/ / \ --dev-bind $chrootEnvPath/ / \
--dev-bind /media /media \ --dev-bind-try /media /media \
--dev-bind /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 \
--proc /proc \ --proc /proc \
@@ -218,13 +344,13 @@ sudo -u $(who | awk '{print $1}' | head -n 1) bwrap --dev-bind $chrootEnvPath/ /
--dev-bind /run /run \ --dev-bind /run /run \
--dev-bind-try /run/user/$uid/pulse /run/user/$uid/pulse \ --dev-bind-try /run/user/$uid/pulse /run/user/$uid/pulse \
--dev-bind / /host \ --dev-bind / /host \
--ro-bind /usr/share/themes /usr/local/share/themes \ --bind-try /usr/share/themes /usr/local/share/themes \
--ro-bind /usr/share/icons /usr/local/share/icons \ --bind-try /usr/share/icons /usr/local/share/icons \
--ro-bind /usr/share/fonts /usr/local/share/fonts \ --bind-try /usr/share/fonts /usr/local/share/fonts \
--hostname bookworm-compatibility-mode \ --hostname Amber-CE-Bookworm \
--unshare-uts \ --unshare-uts \
--dev-bind /etc/resolv.conf /etc/resolv.conf \ --dev-bind-try /etc/resolv.conf /etc/resolv.conf \
--dev-bind /home /home \ --dev-bind-try /home /home \
locale-gen locale-gen
chown -R root $chrootEnvPath chown -R root $chrootEnvPath

View File

@@ -54,24 +54,25 @@ bwrap --dev-bind / / \
--setenv LC_ALL "$LC_ALL" \ --setenv LC_ALL "$LC_ALL" \
--setenv PULSE_SERVER /run/user/$uid/pulse/native \ --setenv PULSE_SERVER /run/user/$uid/pulse/native \
--setenv PATH /flamescion-container-tools/bin-override:$PATH \ --setenv PATH /flamescion-container-tools/bin-override:$PATH \
--setenv IS_ACE_ENV "1" \
--dev-bind $chrootEnvPath/ / \ --dev-bind $chrootEnvPath/ / \
--dev-bind /media /media \ --dev-bind-try /media /media \
--dev-bind /tmp /tmp \ --dev-bind-try /tmp /tmp \
--dev /dev \ --dev /dev \
--dev-bind /dev/dri /dev/dri \ --dev-bind-try /dev/dri /dev/dri \
--proc /proc \ --proc /proc \
--dev-bind /sys /sys \ --dev-bind /sys /sys \
--dev-bind /run /run \ --dev-bind /run /run \
--dev-bind-try /run/user/$uid/pulse /run/user/$uid/pulse \ --dev-bind-try /run/user/$uid/pulse /run/user/$uid/pulse \
--dev-bind / /host \ --dev-bind / /host \
--ro-bind /usr/share/themes /usr/local/share/themes \ --ro-bind-try /usr/share/themes /usr/local/share/themes \
--ro-bind /usr/share/icons /usr/share/icons \ --ro-bind-try /usr/share/icons /usr/local/share/icons \
--ro-bind /usr/share/fonts /usr/local/share/fonts \ --ro-bind-try /usr/share/fonts /usr/local/share/fonts \
--hostname bookworm-compatibility-mode \ --hostname Amber-CE-Bookworm \
--unshare-uts \ --unshare-uts \
--dev-bind /etc/resolv.conf /etc/resolv.conf \ --dev-bind-try /etc/resolv.conf /etc/resolv.conf \
--cap-add CAP_SYS_ADMIN \ --cap-add CAP_SYS_ADMIN \
--dev-bind /home /home \ --dev-bind-try /home /home \
bash -c "${container_command}" bash -c "${container_command}"

View File

@@ -53,24 +53,25 @@ bwrap --dev-bind / / \
--setenv LC_ALL "$LC_ALL" \ --setenv LC_ALL "$LC_ALL" \
--setenv PULSE_SERVER /run/user/$uid/pulse/native \ --setenv PULSE_SERVER /run/user/$uid/pulse/native \
--setenv PATH /flamescion-container-tools/bin-override:$PATH \ --setenv PATH /flamescion-container-tools/bin-override:$PATH \
--setenv IS_ACE_ENV "1" \
--dev-bind $chrootEnvPath/ / \ --dev-bind $chrootEnvPath/ / \
--dev-bind /media /media \ --dev-bind-try /media /media \
--dev-bind /tmp /tmp \ --dev-bind-try /tmp /tmp \
--dev /dev \ --dev /dev \
--dev-bind /dev/dri /dev/dri \ --dev-bind-try /dev/dri /dev/dri \
--proc /proc \ --proc /proc \
--dev-bind /sys /sys \ --dev-bind /sys /sys \
--dev-bind /run /run \ --dev-bind /run /run \
--dev-bind-try /run/user/$uid/pulse /run/user/$uid/pulse \ --dev-bind-try /run/user/$uid/pulse /run/user/$uid/pulse \
--dev-bind / /host \ --dev-bind / /host \
--ro-bind /usr/share/themes /usr/local/share/themes \ --bind-try /usr/share/themes /usr/local/share/themes \
--ro-bind /usr/share/icons /usr/local/share/icons \ --bind-try /usr/share/icons /usr/local/share/icons \
--ro-bind /usr/share/fonts /usr/local/share/fonts \ --bind-try /usr/share/fonts /usr/local/share/fonts \
--hostname bookworm-compatibility-mode \ --hostname Amber-CE-Bookworm \
--unshare-uts \ --unshare-uts \
--dev-bind /etc/resolv.conf /etc/resolv.conf \ --dev-bind-try /etc/resolv.conf /etc/resolv.conf \
--cap-add CAP_SYS_ADMIN \ --cap-add CAP_SYS_ADMIN \
--dev-bind /home /home \ --dev-bind-try /home /home \
bash -c "${container_command}" bash -c "${container_command}"

View File

@@ -23,7 +23,7 @@ exit 1
fi fi
cd "`dirname $0`" cd "`dirname $0`"
sudo debootstrap --include=apt-utils,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=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 rm -rf bookworm-env/var/cache/apt/archives/*.deb sudo rm -rf bookworm-env/var/cache/apt/archives/*.deb

View File

@@ -1,5 +1,5 @@
Package: ace-host-integration Package: ace-host-integration
Version: 1.2 Version: 1.2.1
Section: misc Section: misc
Priority: optional Priority: optional
Depends: bash Depends: bash

View File

@@ -1,28 +1,6 @@
#!/bin/bash #!/bin/bash
ACE_dir="/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env" ACE_dir="/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env"
function linkDir() {
ensureTargetDir() {
targetFile=$1
t=$(dirname "$targetFile")
mkdir -p "$t"
}
source=$1
target=$2
sourceDir=$(dirname "$source")
targetDir=$(dirname "$target")
find "$source" -type f | while read sourceFile; do
targetFile="$targetDir/${sourceFile#$sourceDir/}"
if [ -L "$targetFile" ] && [ "$(readlink "$targetFile")" = "$sourceFile" ]; then
continue
else
rm -f "$targetFile"
fi
ensureTargetDir "$targetFile"
ln -s "$sourceFile" "$targetFile"
done
}
function do_integrate(){ function do_integrate(){
local file=$1 local file=$1
@@ -44,6 +22,7 @@ local file=$1
fi fi
fi fi
chmod +x $file
} }
@@ -51,9 +30,7 @@ local file=$1
for app_dir in $(ls /opt/apps/); do for app_dir in $(ls /opt/apps/); do
for file in /opt/apps/$app_dir/entries/applications/*.desktop;do for file in /opt/apps/$app_dir/entries/applications/*.desktop;do
do_integrate $file do_integrate $file
DESKTOP_FILE_NAME=$(basename $file)
ln -sf "../../../opt/apps/$app_dir/entries/applications/$DESKTOP_FILE_NAME" "/usr/share/applications/"
linkDir "../../../opt/apps/$app_dir/entries/icons" "/usr/share/icons/"
done done
done done

View File

@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
if [ "$UID" = "0" ];then if [ "$UID" = "0" ];then
pkexec $@ $@
else else
host-spawn pkexec bookworm-run $@ host-spawn pkexec bookworm-run $@
fi fi

View File

@@ -0,0 +1 @@
../../opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bin/ace-uninstall-helper

View File

@@ -0,0 +1 @@
../../opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bin/ace-uninstall-helper-gui

1
src/usr/bin/bookworm-init Symbolic link
View File

@@ -0,0 +1 @@
../../opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bin/bookworm-init

1
src/usr/bin/bookworm-run Symbolic link
View File

@@ -0,0 +1 @@
../../opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bin/bookworm-run

View File

@@ -0,0 +1,17 @@
#!/bin/bash
# Ensure base distro defaults xdg path are set if nothing filed up some
# defaults yet.
if [ -z "$XDG_DATA_DIRS" ]; then
export XDG_DATA_DIRS="/usr/local/share:/usr/share"
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/cn.flamescion.bookworm-compatibility-mode/files/bookworm-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

View File

@@ -4,8 +4,8 @@ Name=ACE Software Uninstaller
Name[zh_CN]=ACE Name[zh_CN]=ACE
Comment=ACE Comment=ACE
Type=Application Type=Application
Exec=/home/shenmo-ikun/Desktop/bookworm-compatibility-mode/src/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bin/ace-uninstall-helper-gui Exec=/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bin/ace-uninstall-helper-gui
Icon=ACE-uninstaller Icon=ACE-uninstaller
Categories=AudioVideo Categories=System
# Generated from the DesktopGenerater component of the z-Tools toolkit # Generated from the DesktopGenerater component of the z-Tools toolkit

View File

@@ -8,3 +8,4 @@ Keywords=BCM,ACE,ace,mode
StartupNotify=true StartupNotify=true
Type=Application Type=Application
Terminal=true Terminal=true
Categories=System

View File

Before

Width:  |  Height:  |  Size: 196 KiB

After

Width:  |  Height:  |  Size: 196 KiB

View File

Before

Width:  |  Height:  |  Size: 134 KiB

After

Width:  |  Height:  |  Size: 134 KiB

View File

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 118 KiB

View File

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 118 KiB

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>
<vendor>cn.flamescion.ace-uninstaller</vendor>
<icon_name>x-package-repository</icon_name>
<action id="cn.flamescion.ace-uninstaller">
<description>运行cn.flamescion.ace-uninstaller需要权限</description>
<message>要使用cn.flamescion.ace-uninstaller需要权限</message>
<defaults>
<allow_any>yes</allow_any>
<allow_inactive>yes</allow_inactive>
<allow_active>yes</allow_active>
</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.allow_gui">true</annotate>
</action>
</policyconfig>

View File

@@ -8,3 +8,5 @@ rm -rf /var/cache/apt/
rm -rf /var/lib/aptss/lists/* rm -rf /var/lib/aptss/lists/*
rm -rf /usr/share/doc rm -rf /usr/share/doc
#apt install ace-integration in init
#tools只保留gio hostspawn和xdg-open