update README

This commit is contained in:
CongTiankong 2023-08-14 13:21:36 +08:00
parent 44a55a4f80
commit e631aa3c6f
3 changed files with 38 additions and 24 deletions

@ -1,6 +1,6 @@
# Additional Base Lib
Solve the common compatible problem of glibc on GNU/Linux, by lightweight container utility bubblewrap. (Support distros based on debian)
Solve the common compatible problem of glibc on GNU/Linux, by lightweight container utility bubblewrap.
#### Introdution
@ -10,27 +10,30 @@ 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 some GNU/Linux distribution, 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 distributions, their original license should followed.
#### Notes
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.
1. You can install it onto many distributions with dpkg or rpm package management system. 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.
4. You may use `LD_LIBRARY_PATH` environment variable with ablrun to search libraries in other directories, which may solve some other library problem.
5. When running applications build from electron, try pass an argument `--no-sandbox` to make it work with `ablrun`.
#### Usage
Install additional-base-lib debian package first (You may download from the right side, Releases section.):
`sudo apt install "path/to/package_name.deb"`
Install additional-base-lib package first. You may download from Releases section on the right side of the page.
If you use debian-based GNU/Linux distribution, install with this command:
`sudo apt install "path/to/package_name.deb"`
If your distribution base on rpm, use package manage command provided by your distribution.
Then you can run command, that contains glibc problem, led by ablrun and a space:
Then you can run command which invokes glibc problem, led by ablrun and a space:
`ablrun [command [arguments ...]]`
Uninstall:
`sudo apt remove additional-base-lib`
When remove, You should also use package management.
If you use debian-based GNU/Linux distribution, install with this command:
`sudo apt remove additional-base-lib`
If your distribution base on rpm, use package manage command provided by your distribution.
#### Resources
@ -44,5 +47,8 @@ A help for someone like to port this script to other GNU/Linux platform (in Chin
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
If the released package cannot fit your needs (such as library version, architecture), for deb package, you may try `make-deb.sh` to create your own additional base lib. Download the project, and edit the script, change 3 package download URLs 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.
Install these packages first: bash, coreutils, dpkg, dpkg-dev, grep, wget, patchelf
For rpm package, you need `make-rpm.sh`. Download the project, and edit the script, change 3 package download URLs to which you want. You may found many versions and architectures from fedora page: https://packages.fedoraproject.org/ , and then run the script `make-tpm.sh`. It will auto-detect architecture of packages, and take corresponding methods. Rpm package will store to `~/rpmbuild/RPMS` directory.
Install these packages first: bash, coreutils, rpm-build, wget, patchelf

@ -1,6 +1,6 @@
# Additional Base Lib 附加基础库
用轻量级容器工具bubblewrap解决GNU/Linux操作系统中常见的glibc不兼容问题。暂时只支持debian系
用轻量级容器工具bubblewrap解决GNU/Linux操作系统中常见的glibc不兼容问题。
#### 概述
@ -10,25 +10,30 @@
#### 许可
ablrun等脚本文件没有许可证限制。附带的glibc等动态库文件都是取自一些GNU/Linux发行版的请遵守相应的许可。
`ablrun`等脚本文件没有许可证限制。附带的glibc等动态库文件都是取自一些GNU/Linux发行版的请遵守相应的许可。
#### 注意事项
1. 只在deepin测试过但应该能在所有debian系发行版上运行。移植到其他发行版平台也很容易。
1. 软件包可以安装在使用dpkg或rpm的发行版上。移植到其他发行版平台也很容易。
2. 由于使用了bwrap容器环境因此有些程序不能运行的比如说在程序内部使用了容器技术或者需要挂载文件系统的程序就不行。appimage是例外因为我专门设计了单独的方案去运行他。
3. 在glibc之外还打包了一个libstdc++的动态库,因为这个问题也比较常见。
4. 你可以在使用ablrun的同时使用LD_LIBRARY_PATH环境变量改变动态库寻找的位置解决一些其他动态库问题。
4. 你可以在使用ablrun的同时使用`LD_LIBRARY_PATH`环境变量改变动态库寻找的位置,解决一些其他动态库问题。
5. 使用electron的应用你可以尝试添加`--no-sandbox`参数让他在`ablrun`中运行。
#### 用法
首先需要安装additional-base-lib的debian包请在右侧发行版处下载
`sudo apt install "path/to/package_name.deb"`
首先需要安装additional-base-lib的软件包可以在右侧发行版处下载。
如果你使用的是debian衍生版使用这个命令安装
`sudo apt install "path/to/package_name.deb"`
基于rpm的发行版请使用相应的包管理命令。
此后只需要在出现glibc问题的命令前面加上ablrun和空格即可
`ablrun [命令 [运行选项 ...]]`
卸载:
`sudo apt remove additional-base-lib`
卸载也需要通过系统的包管理器。
如果使用的是debian衍生版使用这个命令卸载
`sudo apt remove additional-base-lib`
基于rpm的发行版请使用相应的包管理命令。
#### 其他资源
@ -42,5 +47,8 @@ https://bbs.deepin.org/post/256081
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
如果这里发布的deb包不符合你的要求库版本、架构你可以使用`make-deb.sh`创造你自己的附加基础库。你需要将项目下载到本地然后编辑这个脚本把三个包的下载链接改成你想要的即可。你可以在debian的网站找到各种版本和架构的下载链接https://www.debian.org/distrib/packages ,然后在当前目录中执行`make-deb.sh`即可。他会自动识别软件包的架构并采取相应方案。
在这之前你需要安装以下软件包bash, coreutils, dpkg, dpkg-dev, grep, wget, patchelf
对于rpm包你可以使用`make-rpm.sh`你需要将项目下载到本地然后编辑这个脚本把三个包的下载链接改成你想要的即可。你可以在fedora的网站找到各种版本和架构的下载链接https://packages.fedoraproject.org/ ,然后在当前目录中执行`make-rpm.sh`即可。他会自动识别软件包的架构并采取相应方案。rpm包会存储在`~/rpmbuild/RPMS`中。
在这之前你需要安装以下软件包bashcoreutilsrpm-build, wget, patchelf

@ -231,6 +231,6 @@ check $?
echo
echo "complete with no error!"
echo "RPM package may locate in ~/rpmbuild/RPM"
echo "RPM package may locate in ~/rpmbuild/RPMS"
echo "You may clean ~/rpmbuild/BUILD and ./downloads for a new start."