# centos yum or "full" centos install



## Alain De Vos (Sep 4, 2019)

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.


----------



## SirDice (Sep 4, 2019)

Yum is just a fancy wrapper around rpm.


----------



## Alain De Vos (Sep 4, 2019)

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 ?


----------



## shkhln (Sep 4, 2019)

Alain De Vos said:


> 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.



Alain De Vos said:


> 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.


----------



## Alain De Vos (Sep 4, 2019)

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 ...


----------

