A busybox system comes with a rpm command on glibc-2.24. How can programs from Fedora Core (FC) and/or later versions get run on this system?
I've figured out FC25 comes with the same glibc version. If I download FC25 rpm packages and install them, sometimes they'll just run. Some others will fail. I'd like to run FC30 or other versions, too.
The problem comes with FC packages overwrite existing libraries in the same directory. I've figured out to run a bash, you only need to install bash
, glibc
, glibc-common
, ncurses-base
, ncurses-libs
, libgcc
. Bash would run after installing these packages. Since these are a small number of libries, installing them with FC versions should bring in minor differences that does not affect bash. But the minor difference might affect other programs, or installing more packages may bring in more differences thus to impact more programs.
How this can be solved?
I've read about linux namespaces. Thus one path to start with is to create a namespace thus to isolate the host filesystems. I tried this to create a namespace filesystem:
cd /root
mkdir root-fc30
cd root-fc30
mkdir dev proc tmp var
cp -a /bin /sbin /lib /usr ./
mount -o bind /proc proc
mount -o bind /dev dev
mkdir root-old
Then get into the namespace:
unshare -m --propagation slave
pivot_root . root-old
After this point, the new packages can be installed. But still it will overwrite existing libraries. How further steps can be taken to solve this in the isolated namespace?
What other cleaner solutions exist?