8 Commits

Author SHA1 Message Date
CongTianKong
1a12416ad6 fix markdown layout 2023-07-31 00:09:46 +08:00
CongTianKong
2c4539afc9 update README 2023-07-31 00:08:37 +08:00
CongTianKong
3255067f0b fix markdown layout 2023-07-30 23:59:34 +08:00
CongTianKong
580a27c932 update README 2023-07-30 23:56:35 +08:00
CongTianKong
c242e3949a update notes and complete build script 2023-07-30 23:21:22 +08:00
CongTianKong
b7e9e34833 several bug fix 2023-07-30 22:27:17 +08:00
CongTianKong
8229189ce0 delete old files. 2023-07-30 18:53:23 +08:00
CongTianKong
6b519e0bc3 pack script introduced and several bugs fix. 2023-07-30 18:47:41 +08:00
31 changed files with 264 additions and 253 deletions

View File

@@ -10,11 +10,11 @@ That's because the application build with higher glibc then running. Someone cho
#### License
There's no license restriction with scripts such as ablrun. All the library files are taken from debian 12, their original license should followed.
There's no license restriction with scripts such as ablrun. All the library files are taken from some GNU/Linux distribution, their original license should followed.
#### Notes
1. Tested in deepin, but it's also albe to run on other distro based on debian amd64. And It's easy to port to other GNU/Linux platform.
1. Tested in deepin, but it's also able to run on other distro based on debian. And It's easy to port to other GNU/Linux platform.
2. It use bwrap, as a result, some application may not run, such as ones use there own container or ones need to mount filesystem. But appimages will run, because I designed a special method to support.
3. Also include a single libstdc++ library with glibc, because this problem is as often as that with glibc.
4. You may use LD_LIBRARY_PATH environment variable with ablrun to search libraries in other directories, which may solve some other library problem.
@@ -22,7 +22,7 @@ There's no license restriction with scripts such as ablrun. All the library file
#### Usage
Install additional-base-lib debian package first:
Install additional-base-lib debian package first (You may download from the right side, Releases section.):
`sudo apt install "path/to/package_name.deb"`
Then you can run command, that contains glibc problem, led by ablrun and a space:
@@ -42,3 +42,7 @@ https://bbs.deepin.org/post/256081
A help for someone like to port this script to other GNU/Linux platform (in Chinese):
https://bbs.deepin.org/post/258721
#### Customize
If the released package cannot fit your needs (such as library version, architecture), you may try make-deb.sh to create your own additional base lib. Download the project, and edit the script, change 3 URLs for download packages to which you want. You may found many version and architectures from debian page: https://www.debian.org/distrib/packages , and then run the script make-deb.sh. It will auto-detect architecture of packages, and take corresponding methods.
dependence: bash, coreutils, dpkg, dpkg-dev, grep, wget, patchelf

View File

@@ -10,18 +10,18 @@
#### 许可
ablrun等脚本文件没有许可证限制。附带的glibc等动态库文件源自debian 12,请遵守相应的许可。
ablrun等脚本文件没有许可证限制。附带的glibc等动态库文件都是取自一些GNU/Linux发行版的,请遵守相应的许可。
#### 注意事项
1. 只在deepin测试过但应该能在所有debian系发行版上运行。目前只支持amd64但是移植到其他发行版平台也很容易。
1. 只在deepin测试过但应该能在所有debian系发行版上运行。移植到其他发行版平台也很容易。
2. 由于使用了bwrap容器环境因此有些程序不能运行的比如说在程序内部使用了容器技术或者需要挂载文件系统的程序就不行。appimage是例外因为我专门设计了单独的方案去运行他。
3. 在glibc之外还打包了一个libstdc++的动态库,因为这个问题也比较常见。
4. 你可以在使用ablrun的同时使用LD_LIBRARY_PATH环境变量改变动态库寻找的位置解决一些其他动态库问题。
#### 用法
首先需要安装additional-base-lib的debian包
首先需要安装additional-base-lib的debian包(请在右侧发行版处下载)
`sudo apt install "path/to/package_name.deb"`
此后只需要在出现glibc问题的命令前面加上ablrun和空格即可
@@ -39,4 +39,8 @@ https://bbs.deepin.org/post/256555
https://bbs.deepin.org/post/256081
想要移植程序到其他系统或平台的,可以参考:
https://bbs.deepin.org/post/258721
https://bbs.deepin.org/post/258721
#### 定制
如果这里发布的deb包不符合你的要求库版本、架构你可以使用make-deb.sh创造你自己的附加基础库。你需要将项目下载到本地然后编辑这个脚本把三个包的下载链接改成你想要的即可。你可以在debian的网站找到各种版本和架构的下载链接https://www.debian.org/distrib/packages 然后在当前目录中执行make-deb.sh即可。他会自动识别软件包的架构并采取相应方案。
需要依赖bash, coreutils, dpkg, dpkg-dev, grep, wget, patchelf

Binary file not shown.

View File

@@ -1,9 +0,0 @@
Package: additional-base-lib
Version: 2.36-9-6
Section: utils
Priority: optional
Architecture: amd64
Maintainer: enforcee @ Deepin Technology Community
Depends: bubblewrap, bash, coreutils, shared-mime-info, xdg-utils
Description: A script to run programs with newer libc. (contains GLIBC_2.36 GLIBCXX_3.4.30)

View File

@@ -1,37 +0,0 @@
#!/usr/bin/bash
if [ "$*" = "" ]
then
echo "usage: $0 [command [arguments ...]]"
echo " The script is part of additional-base-lib. The package provides a"
echo " simple way to solve the compatible problem between application and"
echo " glibc, powered by bubblewrap."
echo " All the library files, which distributed with additional-base-lib,"
echo " are taken from debian bookworm. The script itself create by enforcee"
echo " from deepin forum <https://bbs.deepin.org/>. There's no lisence"
echo " nor copyright restriction with The script. Feel free to deal with."
echo
echo " If you're going to run appimage with additional-base-lib, you may"
echo " need ablrun-appimage."
echo " There is a simpler script to handle both normal executable and"
echo " appimage, called ablrun. usage: ablrun [command [arguments ...]]"
exit
fi
ABL_LDSO_PATH=`readlink -e /lib64/ld-linux-x86-64.so.2`
ABL_LIBC_PATH=`readlink -e /usr/lib/x86_64-linux-gnu/libc.so.6`
if [ "$LD_LIBRARY_PATH" = "" ]
then
ABL_LIBRARY_PATH="/usr/lib/x86_64-linux-gnu/additional-base-lib/"
else
ABL_LIBRARY_PATH="$ABL_LIBRARY_PATH;/usr/lib/x86_64-linux-gnu/additional-base-lib"
fi
exec bwrap \
--dev-bind / / \
--bind /usr/lib/x86_64-linux-gnu/additional-base-lib/ld-linux-x86-64.so.2 "$ABL_LDSO_PATH" \
--bind /usr/lib/x86_64-linux-gnu/additional-base-lib/libc.so.6 "$ABL_LIBC_PATH" \
--bind /usr/lib/x86_64-linux-gnu/additional-base-lib/ldd /usr/bin/ldd \
--setenv LD_LIBRARY_PATH "$ABL_LIBRARY_PATH" \
-- "$@"

View File

@@ -1,193 +0,0 @@
#!/bin/bash
# Copyright (C) 1996-2022 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# The GNU C Library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
# You should have received a copy of the GNU Lesser General Public
# License along with the GNU C Library; if not, see
# <https://www.gnu.org/licenses/>.
# This is the `ldd' command, which lists what shared libraries are
# used by given dynamically-linked executables. It works by invoking the
# run-time dynamic linker as a command and setting the environment
# variable LD_TRACE_LOADED_OBJECTS to a non-empty value.
# We should be able to find the translation right at the beginning.
TEXTDOMAIN=libc
TEXTDOMAINDIR=/usr/share/locale
RTLDLIST="/lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2 /libx32/ld-linux-x32.so.2"
warn=
bind_now=
verbose=
while test $# -gt 0; do
case "$1" in
--vers | --versi | --versio | --version)
echo 'ldd (Debian GLIBC 2.36-9) 2.36'
printf $"Copyright (C) %s Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
" "2022"
printf $"Written by %s and %s.
" "Roland McGrath" "Ulrich Drepper"
exit 0
;;
--h | --he | --hel | --help)
echo $"Usage: ldd [OPTION]... FILE...
--help print this help and exit
--version print version information and exit
-d, --data-relocs process data relocations
-r, --function-relocs process data and function relocations
-u, --unused print unused direct dependencies
-v, --verbose print all information
"
printf $"For bug reporting instructions, please see:\\n%s.\\n" \
"<http://www.debian.org/Bugs/>"
exit 0
;;
-d | --d | --da | --dat | --data | --data- | --data-r | --data-re | \
--data-rel | --data-relo | --data-reloc | --data-relocs)
warn=yes
shift
;;
-r | --f | --fu | --fun | --func | --funct | --functi | --functio | \
--function | --function- | --function-r | --function-re | --function-rel | \
--function-relo | --function-reloc | --function-relocs)
warn=yes
bind_now=yes
shift
;;
-v | --verb | --verbo | --verbos | --verbose)
verbose=yes
shift
;;
-u | --u | --un | --unu | --unus | --unuse | --unused)
unused=yes
shift
;;
--v | --ve | --ver)
echo >&2 $"ldd: option \`$1' is ambiguous"
exit 1
;;
--) # Stop option processing.
shift; break
;;
-*)
echo >&2 'ldd:' $"unrecognized option" "\`$1'"
echo >&2 $"Try \`ldd --help' for more information."
exit 1
;;
*)
break
;;
esac
done
nonelf ()
{
# Maybe extra code for non-ELF binaries.
return 1;
}
add_env="LD_TRACE_LOADED_OBJECTS=1 LD_WARN=$warn LD_BIND_NOW=$bind_now"
add_env="$add_env LD_LIBRARY_VERSION=\$verify_out"
add_env="$add_env LD_VERBOSE=$verbose"
if test "$unused" = yes; then
add_env="$add_env LD_DEBUG=\"$LD_DEBUG${LD_DEBUG:+,}unused\""
fi
# The following command substitution is needed to make ldd work in SELinux
# environments where the RTLD might not have permission to write to the
# terminal. The extra "x" character prevents the shell from trimming trailing
# newlines from command substitution results. This function is defined as a
# subshell compound list (using "(...)") to prevent parameter assignments from
# affecting the calling shell execution environment.
try_trace() (
output=$(eval $add_env '"$@"' 2>&1; rc=$?; printf 'x'; exit $rc)
rc=$?
printf '%s' "${output%x}"
return $rc
)
case $# in
0)
echo >&2 'ldd:' $"missing file arguments"
echo >&2 $"Try \`ldd --help' for more information."
exit 1
;;
1)
single_file=t
;;
*)
single_file=f
;;
esac
result=0
for file do
# We don't list the file name when there is only one.
test $single_file = t || echo "${file}:"
case $file in
*/*) :
;;
*) file=./$file
;;
esac
if test ! -e "$file"; then
echo "ldd: ${file}:" $"No such file or directory" >&2
result=1
elif test ! -f "$file"; then
echo "ldd: ${file}:" $"not regular file" >&2
result=1
elif test -r "$file"; then
RTLD=
ret=1
for rtld in ${RTLDLIST}; do
if test -x $rtld; then
dummy=`$rtld --version 2>&1`
if test $? = 0; then
verify_out=`${rtld} --verify "$file"`
ret=$?
case $ret in
[02]) RTLD=${rtld}; break;;
esac
fi
fi
done
case $ret in
1)
# This can be a non-ELF binary or no binary at all.
nonelf "$file" || {
echo $" not a dynamic executable" >&2
result=1
}
;;
0|2)
try_trace "$RTLD" "$file" || result=1
;;
*)
echo 'ldd:' ${RTLD} $"exited with unknown exit code" "($ret)" >&2
exit 1
;;
esac
else
echo 'ldd:' $"error: you do not have read permission for" "\`$file'" >&2
result=1
fi
done
exit $result
# Local Variables:
# mode:ksh
# End:

195
make-deb.sh Executable file
View File

@@ -0,0 +1,195 @@
#!/bin/bash
LIBC6_DOWNLOAD_URL=http://ftp.cn.debian.org/debian/pool/main/g/glibc/libc6_2.36-9+deb12u1_amd64.deb
LIBC_BIN_DOWNLOAD_URL=http://ftp.cn.debian.org/debian/pool/main/g/glibc/libc-bin_2.36-9+deb12u1_amd64.deb
LIBSTDCxx6_DOWNLOAD_URL=http://ftp.cn.debian.org/debian/pool/main/g/gcc-12/libstdc++6_12.2.0-14_amd64.deb
ABL_VERSION=7
check(){
if [ "$1" != 0 ]
then
echo "Error"
exit
fi
}
echo "download packages:"
mkdir ./downloads
echo "download libc6..."
wget "$LIBC6_DOWNLOAD_URL" -c -O ./downloads/libc6.deb
check $?
echo "download libc_bin..."
wget "$LIBC_BIN_DOWNLOAD_URL" -c -O ./downloads/libc-bin.deb
check $?
echo "download libstdc++6..."
wget "$LIBSTDCxx6_DOWNLOAD_URL" -c -O ./downloads/libstdc++6.deb
check $?
echo
echo "extract packages:"
echo "extract libc6..."
dpkg -x ./downloads/libc6.deb ./downloads/libc6
check $?
dpkg -e ./downloads/libc6.deb ./downloads/libc6/DEBIAN
check $?
echo "extract libc-bin..."
dpkg -x ./downloads/libc-bin.deb ./downloads/libc-bin
check $?
dpkg -e ./downloads/libc-bin.deb ./downloads/libc-bin/DEBIAN
check $?
echo "extract libstdc++6..."
dpkg -x ./downloads/libstdc++6.deb ./downloads/libstdc++6
check $?
dpkg -e ./downloads/libstdc++6.deb ./downloads/libstdc++6/DEBIAN
check $?
echo
echo "check packages:"
echo "check version libc6==lib_bin"
LIBC6_VERSION=`cat ./downloads/libc6/DEBIAN/control | grep "^Version: .*"`
check $?
LIBC6_VERSION=${LIBC6_VERSION:9}
LIBC_BIN_VERSION=`cat ./downloads/libc-bin/DEBIAN/control | grep "^Version: .*"`
check $?
LIBC_BIN_VERSION=${LIBC_BIN_VERSION:9}
LIBSTDCxx6_VERSION=`cat ./downloads/libstdc++6/DEBIAN/control | grep "^Version: .*"`
check $?
LIBSTDCxx6_VERSION=${LIBSTDCxx6_VERSION:9}
echo "$LIBC6_VERSION==$LIBC_BIN_VERSION"
[ "$LIBC6_VERSION" = "$LIBC_BIN_VERSION" ]
check $?
echo "check arch libc6==libc_bin"
LIBC6_ARCH=`cat ./downloads/libc6/DEBIAN/control | grep "^Architecture: .*"`
check $?
LIBC6_ARCH=${LIBC6_ARCH:14}
LIBC_BIN_ARCH=`cat ./downloads/libc-bin/DEBIAN/control | grep "^Architecture: .*"`
check $?
LIBC_BIN_ARCH=${LIBC_BIN_ARCH:14}
echo "$LIBC6_ARCH==$LIBC_BIN_ARCH"
[ "$LIBC6_ARCH" = "$LIBC_BIN_ARCH" ]
check $?
echo "check arch libc6==libstdc++6"
LIBSTDCxx6_ARCH=`cat ./downloads/libstdc++6/DEBIAN/control | grep "^Architecture: .*"`
check $?
LIBSTDCxx6_ARCH=${LIBSTDCxx6_ARCH:14}
echo "$LIBC6_ARCH==$LIBSTDCxx6_ARCH"
[ "$LIBC6_ARCH" = "$LIBSTDCxx6_ARCH" ]
check $?
echo
echo "collect information:"
echo "glibc version:"
GLIBC_VERSION=$LIBC6_VERSION
echo "$GLIBC_VERSION"
echo "deb package architecture:"
DEBIAN_DEB_ARCH=$LIBC6_ARCH
echo "$DEBIAN_DEB_ARCH"
echo "debian multiarch directory name:"
DEBIAN_MULTIARCH=`dpkg-architecture -A "$DEBIAN_DEB_ARCH" | grep "^DEB_TARGET_MULTIARCH=.*"`
check $?
DEBIAN_MULTIARCH=${DEBIAN_MULTIARCH:21}
echo "$DEBIAN_MULTIARCH"
echo "ld.so location:"
LD_SO_LOCATION=`patchelf --print-interpreter "./downloads/libc6/lib/${DEBIAN_MULTIARCH}/libc.so.6"`
check $?
echo "$LD_SO_LOCATION"
echo
echo "build package directories..."
mkdir ./deb-contents
mkdir ./deb-contents/DEBIAN
mkdir ./deb-contents/usr
mkdir ./deb-contents/usr/bin
mkdir ./deb-contents/usr/lib
mkdir "./deb-contents/usr/lib/$DEBIAN_MULTIARCH"
echo
echo "create control file..."
echo "Package: additional-base-lib" >> ./deb-contents/DEBIAN/control
echo "Version: $GLIBC_VERSION-$ABL_VERSION" >> ./deb-contents/DEBIAN/control
echo "Section: utils" >> ./deb-contents/DEBIAN/control
echo "Priority: optional" >> ./deb-contents/DEBIAN/control
echo "Architecture: $DEBIAN_DEB_ARCH" >> ./deb-contents/DEBIAN/control
echo "Maintainer: CongTianKong (gitee.com/CongTianKong)" >> ./deb-contents/DEBIAN/control
echo "Depends: bubblewrap, bash, coreutils, shared-mime-info, xdg-utils" >> ./deb-contents/DEBIAN/control
echo "Description: A script to run programs with newer libc." >> ./deb-contents/DEBIAN/control
echo " package built with make-deb.sh from additional-base-lib project." >> ./deb-contents/DEBIAN/control
echo " libc6 download URL: $LIBC6_DOWNLOAD_URL" >> ./deb-contents/DEBIAN/control
echo " libc-bin download URL: $LIBC_BIN_DOWNLOAD_URL" >> ./deb-contents/DEBIAN/control
echo " libstdc++6 download URL: $LIBSTDCxx6_DOWNLOAD_URL" >> ./deb-contents/DEBIAN/control
echo >> ./deb-contents/DEBIAN/control
check $?
echo
echo "gather files:"
echo "copy ablrun script..."
cp ./scripts/ablrun ./deb-contents/usr/bin/ablrun
check $?
echo "copy ablrun-appimage script..."
cp ./scripts/ablrun-appimage ./deb-contents/usr/bin/ablrun-appimage
check $?
echo "generate ablrun-normal script..."
echo "#!/bin/bash" > ./deb-contents/usr/bin/ablrun-normal
echo "ABL_TARGET_LD_SO_PATH=$LD_SO_LOCATION" >> ./deb-contents/usr/bin/ablrun-normal
echo "ABL_ARCH_DIR=$DEBIAN_MULTIARCH" >> ./deb-contents/usr/bin/ablrun-normal
cat ./scripts/ablrun-normal.1 >> ./deb-contents/usr/bin/ablrun-normal
check $?
echo "chmod..."
chmod a+x ./deb-contents/usr/bin/*
check $?
rooted_readlink(){
rrl_result=$1
rrl_root=$2
while [ -h "$rrl_result" ]
do
rrl_result=`readlink "$rrl_result"`
if [ "${rrl_result:0:1}" == "/" ]
then
rrl_result="$rrl_root/$rrl_result"
else
rrl_result=`dirname "$1"`"/$rrl_result"
fi
done
echo -n "$rrl_result"
}
echo "copy many libc6 components..."
cp -r "./downloads/libc6/lib/${DEBIAN_MULTIARCH}/" "./deb-contents/usr/lib/${DEBIAN_MULTIARCH}/additional-base-lib"
check $?
echo "copy ld.so..."
mkdir --parents "./deb-contents/usr/lib/${DEBIAN_MULTIARCH}/additional-base-lib/$LD_SO_LOCATION"
rm -d "./deb-contents/usr/lib/${DEBIAN_MULTIARCH}/additional-base-lib/$LD_SO_LOCATION"
cp `rooted_readlink "./downloads/libc6/$LD_SO_LOCATION" "./downloads/libc6"` "./deb-contents/usr/lib/${DEBIAN_MULTIARCH}/additional-base-lib/$LD_SO_LOCATION"
check $?
echo "copy ldd script..."
cp "./downloads/libc-bin/usr/bin/ldd" "./deb-contents/usr/lib/${DEBIAN_MULTIARCH}/additional-base-lib/ldd"
check $?
echo "copy libstdc++..."
cp `rooted_readlink ./downloads/libstdc++6/usr/lib/${DEBIAN_MULTIARCH}/libstdc++.so.6 ./downloads/libstdc++6/` "./deb-contents/usr/lib/${DEBIAN_MULTIARCH}/additional-base-lib/libstdc++.so.6"
check $?
echo
echo "build deb package:"
dpkg -b ./deb-contents "./additional-base-lib_${GLIBC_VERSION}-${ABL_VERSION}_${DEBIAN_DEB_ARCH}.deb"
check $?
echo
echo "complete with no error!"

View File

@@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/bin/bash
if [ "$*" = "" ]
then
@@ -6,9 +6,11 @@ then
echo " The script is part of additional-base-lib. The package provides a"
echo " simple way to solve the compatible problem between application and"
echo " glibc, powered by bubblewrap."
echo " All the library files, which distributed with additional-base-lib,"
echo " are taken from debian bookworm. The script itself create by enforcee"
echo " from deepin forum <https://bbs.deepin.org/>. There's no lisence"
echo
echo " All the library files, which packed with additional-base-lib,"
echo " are taken from one GNU/Linux distribution. You may found information"
echo " in package control files. The scripts theirselves were created by"
echo " CongTianKong <https://gitee.com/CongTianKong>. There's no lisence"
echo " nor copyright restriction with The script. Feel free to deal with."
echo
echo " This script auto-detects normal executable and appimage, and then"
@@ -36,7 +38,7 @@ else
fi
fi
ABL_FILETYPE=`xdg-mime query filetype $ABL_FILENAME`
ABL_FILETYPE=`xdg-mime query filetype "$ABL_FILENAME"`
if [ "$ABL_FILETYPE" != "application/vnd.appimage" ]
then
if [ "$ABL_FILETYPE" != "application/x-iso9660-appimage" ]

View File

@@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/bin/bash
if [ "$*" = "" ]
then
@@ -8,6 +8,10 @@ then
echo " You have to ensure input file IS an appimage, for this script"
echo " does not check. If you input other files, It will become"
echo " unpredictable."
echo
echo " There is a more convenient script to handle both normal executable"
echo " and appimage, called ablrun."
echo " usage: ablrun [command [arguments ...]]"
exit
fi
@@ -33,6 +37,6 @@ fi
read -u ${COPROC[0]} ABLIMAGE_DIR
ablrun-normal $ABLIMAGE_DIR/AppRun ${ABLIMAGE_PARAMETERS[@]:1}
ablrun-normal "$ABLIMAGE_DIR/AppRun" ${ABLIMAGE_PARAMETERS[@]:1}
cleanup

41
scripts/ablrun-normal.1 Executable file
View File

@@ -0,0 +1,41 @@
#some contents is generated when build package
if [ "$*" = "" ]
then
echo "usage: $0 [command [arguments ...]]"
echo " The script is part of additional-base-lib. The package provides a"
echo " simple way to solve the compatible problem between application and"
echo " glibc, powered by bubblewrap."
echo
echo " All the library files, which packed with additional-base-lib,"
echo " are taken from one GNU/Linux distribution. You may found information"
echo " in package control files. The scripts theirselves were created by"
echo " CongTianKong <https://gitee.com/CongTianKong>. There's no lisence"
echo " nor copyright restriction with The script. Feel free to deal with."
echo
echo " If you're going to run appimage with additional-base-lib, you may"
echo " need ablrun-appimage."
echo
echo " There is a more convenient script to handle both normal executable"
echo " and appimage, called ablrun."
echo " usage: ablrun [command [arguments ...]]"
exit
fi
ABL_LD_SO_PATH=`readlink -e $ABL_TARGET_LD_SO_PATH`
ABL_LIBC_SO_PATH=`readlink -e /lib/${ABL_ARCH_DIR}/libc.so.6`
if [ "$LD_LIBRARY_PATH" = "" ]
then
ABL_LIBRARY_PATH="/usr/lib/${ABL_ARCH_DIR}/additional-base-lib/"
else
ABL_LIBRARY_PATH="$LD_LIBRARY_PATH;/usr/lib/${ABL_ARCH_DIR}/additional-base-lib"
fi
exec bwrap \
--dev-bind / / \
--bind /usr/lib/${ABL_ARCH_DIR}/additional-base-lib/"$ABL_TARGET_LD_SO_PATH" "$ABL_LD_SO_PATH" \
--bind /usr/lib/${ABL_ARCH_DIR}/additional-base-lib/libc.so.6 "$ABL_LIBC_SO_PATH" \
--bind /usr/lib/${ABL_ARCH_DIR}/additional-base-lib/ldd /usr/bin/ldd \
--setenv LD_LIBRARY_PATH "$ABL_LIBRARY_PATH" \
-- "$@"