View previous topic :: View next topic |
Author |
Message |
BigBaaadBob Guru
Joined: 19 Apr 2003 Posts: 342 Location: Swampscott, MA USA
|
Posted: Thu Aug 07, 2003 5:28 pm Post subject: Using portage as a system builder instead of system updater? |
|
|
This is touched on in https://forums.gentoo.org/viewtopic.php?t=28559.
I'd like to use portage to build system images for various kinds of systems (where "system" means a Linux-based computer-based thing that needs a complete set of software like the kernel, apps, libraries, etc). This is different from using it to [i]update[/] systems because:I need to direct the built stuff to different areas depending on what system is being built.
I need to cross compile stuff depending on what system is being built. Has anone done any work in this area? Presumably I would need to parameterize where stuff gets installed (instead of /) and where the portage configuration comes from (instead of /etc) and things like that. I might want to also redefine the pseudo targets like "system" and "world".
Pointers or tips? |
|
Back to top |
|
|
orb9 Tux's lil' helper
Joined: 02 Sep 2002 Posts: 82 Location: Germany
|
Posted: Mon Aug 11, 2003 3:58 pm Post subject: |
|
|
This thread might be helpful:
https://forums.gentoo.org/viewtopic.php?t=58231&highlight=installing+gentoo
I did something similiar when compiling gentoo for my server (=pentium3) on my desktop machine(=athlon xp). Simply said: I just bootstrapped a second gentoo in a temporary directory (on a separate harddisc) and chroot'ed into it. Then is set compiler flags in make.conf of the chroot-environment and compiled. Finally I put the harddisc in the target system and did some final configuration. Worked perfectly for me. _________________ "Without music, life would be a mistake - I would only believe in a god who knew how to dance." (Nietzsche) |
|
Back to top |
|
|
BigBaaadBob Guru
Joined: 19 Apr 2003 Posts: 342 Location: Swampscott, MA USA
|
Posted: Mon Aug 11, 2003 8:13 pm Post subject: Is portage available by anonymous CVS? |
|
|
Since I'm going to be whacking portage, I'd like to get it directly from CVS so I can update it more easily. Is it accessible via anon CVS? (The portage code, not the porgages, of course!) |
|
Back to top |
|
|
BigBaaadBob Guru
Joined: 19 Apr 2003 Posts: 342 Location: Swampscott, MA USA
|
Posted: Tue Aug 12, 2003 9:53 pm Post subject: Progress note 1 |
|
|
Starting with portage-2.0.49_pre17, I've added new variable (confdir) and a corresponding environment var (CONFDIR). By default, confdir has the value "/etc/", and it is used to access all of the portage stuff that was previously hardcoded in /etc/, like /etc/make.conf, /etc/make.globals, etc. Doing this and setting some environment variables (PATH, PYTHONPATH, CONFDIR, and ROOT) I can successfully build self-targed stuff completely disconnected from the existing system, without resorting to chroot hacks. (Toolchain stuff like GCC and friends excepted for now.)
There is a little problem with "profiles" (profiledir) because this isn't cleanly handled in portage.py (some places hardcoded, some not) and because it conflicts a little with what I envision the usage model to be in this mode of operation. My use case is that I want to build a number of different products (with differents sets of software and using different architectures), which is somewhat like the "profiles" feature is intended for, but I expect each of these products to be using a different confdir. I'd rather have the option of having profiledir==confdir. It isn't a big deal though. Cleaning up the use of profiledir is more important.
Another problem is that everything in the portages pretty much depends (transitively) on baselayout. I expect each of these products i'm building to have a different baselayout, but baselayout isn't virtual. Maybe it is just as simple as changing the glibc and baselayout ebuilds and adding a baselayout virtual? I doubt it. This will need some thought.
Also, I wonder about the handling of "root". In some places it appears that the code wants to handle multiple roots and in other cases it is hard coded to "/". For example: Code: | #the auxcache is the only /var/cache/edb/ entry that stays at / even when "root" changes. | and Code: | self.installcache = portage.db["/"]["vartree"] |
I don't understand exactly the value of this unless it is intended that the roots be incremental updates of that already in the system... Anyway, in my case this is completely wrong because the stuff being built should have absolutely no connection with the stuff installed on the build system. I'll need to change the code to completely ignore the build system's caches and DB if root!="/".
It appears, also, that one might want to have the option to locate the cache someplace other than "root", so I'll probably create a variable for that also.
My next step is to try non self-targeted stuff (i.e. cross compiled stuff). I suspect the story won't be quite so fun![/code] |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|