From: MikkelFJ Date: 2003-02-07T05:32:51+09:00 Subject: The way of the Gentoo I recently tried (as in not yet succeeded) to step into the world of Linux, which let me to the way of the Gentoo. Gentoo www.gentoo.org is a Linux distro that has a friendly (as in not /.) community http://forums.gentoo.org/ but more to the point it has an amazing distribution system called portage: http://www.gentoo.org/doc/en/portage-user.xml Someone mentioned he preferred Gentoo mostly because of the nice colours (and there may be some truth in that, looking at their documentation). It downloads and synchronizes a list of available packages. It installs software on demand including all dependencies. Say you want VI: "emerge VI" and VI gets downloaded, build and installed in the most recent stable version unless it's already installed. "emerge KDE" and you can wait for long time first installing and building X unless you have it installed. Actually a lot of Gentoo mirrors are currently bogged down due to the recent KDE 3.1 release. Gentoo has a number of mirrors and a clear policy for synchronizing existing mirrors and adding new mirrors. Essentially if you have sufficent diskspace and a T1 uplink, you can be a mirror if you sync a specific times (to avoid out of sync mirrors). The happy user attaches to arbitrary mirrors due to a round robin DNS feature, but you can also specify a mirror. When new software enters gentoo for download (or a new version), an ebuild is written specifying the requirements. I don't know the details, but apparently it's easy to add your own ebuild if necessary. Therefore the gentoo community is cabable of downloading new packages much earlier than other distributions that need rpm packages or debian packages. So what is my point? Of course you have already guessed what I'm hinting at: Wouldn't it by out of the ordinary cool if Ruby had it's package system working the same way as Gentoo? Possible even blatantly stealing the source code for the purpose? Obviously .rb files need no compilation but would still benefit from the dedependency system. Binary packages do require compilation. My major concern is that this approach in nature is Linux based. However, I do not see what should prevent clients from running different operating systems. The download protocol is http (wget) or ftp, or even local files. Since Ruby already has decent configuration scripts to build .so modules on various system (native Windows MSVC, mingw, cygwin, linux etc.) I reckon this could be integrated into the client build system. Actually I reckon the client could easily be written in Ruby - I suspect it's currently written in Python although I havent investigated. Gentoo also has various install stages for gentoo including boot strapping gcc, installing precompiled gcc but compiling all other linux sources, installing most of the system binary and only updating new version through builds. Likewise, Ruby could be distrubuted this way - I reckon it already is on Gentoo (but I'm not that far into the install yet). The next step would be integrating this system with FreeRide GUI. I believe such a system would be an very significant part of moving Ruby to a wider audience. It would make it much more reliable to deploy Ruby solutions (even private ones) becuase you'd only need a small script to emerge all the dependencies of you app and a network of mirrors would ensure you could always get the required package. Currently RAA is a link to a number of small unstable servers and at best links to source forge projects where each dependency most tediously be downloaded. Furthermore, the core Ruby installation could be smaller because each user could easily add to the core. Authors of Ruby applications no longer need to reimplement functionality because it would be bad to depend on some mysterious package that would annoy potential users. It would be easier to add mirrors than Gentoo: Gentoo requires about 256MB of diskspace and T1, but Ruby would require much less space and any ADSL uplink would be fast enough, provided there is an sufficient number of mirrors. Thus the average Linux Ruby user could dedicate som diskspace if they have a home server running. Anyway, Gentoo proves that it is possible. All else being equal it should be simpler for Ruby than for an entire bootstrapped OS. This is just an idea for anyone to pick up. I know nothing of Linux or Gentoo beside just trying to install it and I doubt I'll find the time to work on it myself. I have noticed the discussion of a Ruby version of CPAN. I don't know exactly how CPAN works wrt. dependencies. But being able to easily add mirrors is apparently a feature of both CPAN and Gentoo. Speaking of dependency checking like Gentoo's system: I have been working with SCons 0.9 alpha - it's pretty good at only building the necessary stuff although it has it's rough edges. I saw a benchmark where builds were much faster than using make. SCons is written in Python. Mikkel