In cross-platform development with OpenCV, I wanted to separate the Linux development environment from the main body with chroot.
However, I think Docker is the easiest.
Jail for FreeBSD.
MacOS has chroot. It seems that you can do various things with jailkit of brew or brew itself.
For Windows, the UNIX-like development environment, whether Cygwin, MSYS2, WSL1 or WSL2, seems to be separated to some extent, so I will omit it.
https://wiki.archlinux.jp/index.php/Chroot
Debian/Ubuntu Use pbuilder https://www.debian.org/doc/manuals/maint-guide/build.ja.html https://wiki.ubuntu.com/PbuilderHowto
https://hnakamur.github.io/blog/2017/09/02/add-repositories-to-pbuilder-chroot-images/
Fedora/RHEL/CentOS Use mock https://github.com/rpm-software-management/mock/wiki
https://hnakamur.github.io/blog/2015/12/16/how_to_debug_errors_in_rpm_build_using_mock/ https://hnakamur.github.io/blog/2015/12/18/add_third_party_to_build_on_mock_and_copr/ http://manpages.ubuntu.com/manpages/bionic/man1/mock.1.html https://blog.packagecloud.io/eng/2015/05/11/building-rpm-packages-with-mock/
Slackware/Zenwalk/SalixOS Extract and install from the installation CD to the target directory https://docs.slackware.com/howtos:general_admin:setting_up_a_slackware_chroot
Then follow the normal procedure to chroot
Arch Use the pacstrap command https://wiki.archlinux.jp/index.php/インストールガイド#ベースシステムのインストール
Example
pacstrap /var/tmp/chroot base base-devel
Then follow the normal procedure to chroot
Manjaro Use the basestrap command included in extra / manjaro-tools-base https://wiki.manjaro.org/index.php?title=Manjaro-tools
Example
basestrap /var/tmp/chroot base base-devel
Then follow the normal procedure to chroot
Gentoo Extract the stage3 image to the target directory https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Stage/ja
Then follow the normal procedure to chroot
Sabayon
Extract Sabayon_Linux_
Example
mkdir /var/tmp/chroot
cd /var/tmp/chroot
curl -LO http://<Mirror Sabayon directory>/stable/Sabayon_Linux_<Year>.<Month>_amd64_tarball.tar.gz
#The following is for RIKEN mirrors
#curl -LO http://ftp.riken.jp/Linux/sabayon/stable/Sabayon_Linux_19.03_amd64_tarball.tar.gz
tar xpvf Sabayon_Linux_<Year>.<Month>_amd64_tarball.tar.gz --xattrs-include='*.*' --numeric-owner #Deploying the archive
Then follow the normal procedure to chroot
Recommended Posts