centos yum or "full" centos install

Is it possible to make centos 7.6.1810 yum work within /compat/linux , with or without chroot ?
If you can make yum work a world of easy install linux packages goes open.
 
Dependencies can always be painfull.
I'll try to explain what I experimented next to yum.

First downloaded all packages :
wget -r -np http://mirror.centos.org/centos/7.6.1810/os/x86_64/Packages/

Then unpacked everyting in to a directory /centos:
#!/usr/local/bin/zsh -x
for a in /home/x/centos/mirror.centos.org/centos/7.6.1810/os/x86_64/Packages/*.rpm
do
echo $a
rpm2cpio $a | cpio -idmv
done

Now I have linux software in /centos and in /compat/linux and somehow i tried these two to work but don't now how to integrate ... For instance LD_LIBRARY_PATH etc ... Do I copy one in the other or what could be a way to proceed ?
 
If you can make yum work a world of easy install linux packages goes open.

That's not as easy as you think. Some of linux-c* packages actually do have FreeBSD-specific adjustments. They also occasionally reference non-linux packages for dependency management reasons.

Now I have linux software in /centos and in /compat/linux and somehow i tried these two to work but don't now how to integrate ... For instance LD_LIBRARY_PATH etc ... Do I copy one in the other or what could be a way to proceed ?

I believe the /compat/linux path is hardcoded in the Linux subsystem. There is no way to proceed.
 
Thanks for the explanation. I'll copy /compat/linux into /centos and this into /compat/linux placing the freebsd-linux files in the right place. The other centos files might in this case work as far as compatibility has implemented.
Many paths in centos are absolute which means you need to do chroot to make stuff work, but for chroot you need to be root which is not secure, so you end up with a jail ...
 
Back
Top