On Mon, Apr 8, 2013 at 10:01 AM, Roger Oberholtzer <roger@opq.se> wrote:
Back in the day, I used to maintain a Gentoo tree in a directory in a different Linux distro (possibly Caldera, or an early SUSE). Then, when I wanted to build software in the Gentoo tree using Gentoo tools and all, I would:
cd /where/one/finds/gentoo-20XX.1 export g=`pwd`
mount -t proc proc $g/proc
cp -p /$g/etc/resolv.conf $g/etc/resolv.conf.keep cp /etc/resolv.conf $g/etc/resolv.conf
chroot $g /bin/bash
env-update
source /etc/profile
Mainly, I copied the name resolution stuff, mounted /proc in the gentoo tree, and updated the environment. Then, I could pretty much act as though I had booted Gentoo. It worked great.
My question is if I could go do something similar today with openSUSE, but with some other version of openSUSE in the 'foreign' tree. I think my biggest concern is /run and /var/run. And which versions would play nice together. I am primarily compiling things in this environment. No kernel stuff. It is a bit like cross compiling, but without setting up cross compilers. Just a copy of the target environment.
I know many people suggest just using a VM for this. It may result in that. But I just have to try the chroot method as it is much easier to access from make files and such places. Just curious if there are some show stoppers that would render my time trying this wasted.
I finally have the disk space I need to do these foolish things...
Yours sincerely,
Roger Oberholtzer
Roger, You should get up to speed on osc. As a dev, it is one of the crown jewels of opensuse. In general it works best if tied into OBS (opensuse build service), but it works standalone as well. I mostly use it in conjunction with OBS. Once you have the osc setup, you can do: osc build => build the current package for factory in a chroot environment osc build openSUSE_12.3 => build current package for opensuse 12.3 If you are working with OBS, when you build for a new distro for the first time, you will see a lot of packages pulled down to a local osc specific repo, but from then on they should just come from the local osc repo. Working with OSC/OBS so that you only pull down what you actually need to build, not the full distro is much more space efficient than I think you are assuming. Here's my to main working sub-folders for osc:
sudo du -sh build-root/ osbuild-packagecache/ 442M build-root/ 347M osbuild-packagecache/
"osc dists" will tell you the set of distros that osc is attempting to support:
osc dists distribution project repository reponame
-------- openSUSE Factory openSUSE:Factory snapshot openSUSE_Factory openSUSE 12.3 openSUSE:12.3 standard openSUSE_12.3 openSUSE 12.2 openSUSE:12.2 standard openSUSE_12.2 openSUSE 12.1 openSUSE:12.1 standard openSUSE_12.1 openSUSE Tumbleweed openSUSE:Tumbleweed standard openSUSE_Tumbleweed SUSE SLE-11 SP 2 SUSE:SLE-11:SP2 standard SLE_11_SP2 SUSE SLE-11 SP 1 SUSE:SLE-11:SP1 standard SLE_11_SP1 SUSE SLE-11 SUSE:SLE-11 standard SLE_11 SUSE SLE-10 SUSE:SLE-10:SDK standard SLE_10_SDK Debian 6.0 Debian:6.0 standard Debian_6.0 Fedora 18 Fedora:18 standard Fedora_18 Fedora 17 Fedora:17 standard Fedora_17 RedHat RHEL-6 RedHat:RHEL-6 standard RedHat_RHEL-6 RedHat RHEL-5 RedHat:RHEL-5 standard RedHat_RHEL-5 RedHat RHEL-4 RedHat:RHEL-4 standard RedHat_RHEL-4 CentOS CentOS-6 CentOS:CentOS-6 standard CentOS_CentOS-6 CentOS CentOS-5 CentOS:CentOS-5 standard CentOS_CentOS-5 Mandriva 2011 Mandriva:2011 standard Mandriva_2011 Mandriva 2010.1 Mandriva:2010.1 standard Mandriva_2010.1 Mandriva 2010 Mandriva:2010 standard Mandriva_2010 Mandriva 2009.1 Mandriva:2009.1 standard Mandriva_2009.1 Ubuntu 12.10 Ubuntu:12.10 standard xUbuntu_12.10 Ubuntu 12.04 Ubuntu:12.04 standard xUbuntu_12.04 Ubuntu 11.10 Ubuntu:11.10 standard xUbuntu_11.10 Ubuntu 11.04 Ubuntu:11.04 standard xUbuntu_11.04 Ubuntu 10.04 Ubuntu:10.04 standard xUbuntu_10.04 Greg -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org