[ANN] Rubyx - A first look

A

Andrew Walrond

Rubyx is a ruby based linux distro. It is also the name of the script which
creates Rubyx the distro and handles the package management

In light of the recent rubyx/lunar threads, I thought it sensible to make the
rubyx source available for scrutiny by the ruby community. You can get it
using Bitkeeper like this:

bk clone bk://ftp.rubyx.org/rubyx
cd rubyx
bk co

You'll see three files;

rubyx The man script
init The ruby based init script
strfile.rb Some code shared by rubyx and init

as root, ./rubyx --help should give you

-----------------------------------------------------------------------------------------------------------------
Rubyx v0.1
--help I guess you know about this

ENVIRONMENT:
--read <file> Read options from a file
--select <pkg> <version> List/specify package version
--thread-library <name> List/specify thread library
--kernel-config <file> Supply kernel .config file
--gcc-compilers <language ...> List/specify gcc compilers
--cpu <cpu> List or set target cpu
--cflags options Specify default c flags
--cxxflags options Specify default c++ flags
--dj jobs Set maximum parallel downloads
--dt jobs Set download download tries
--bj jobs Set maximum parallel build jobs
--mj jobs Set maximum parallel make jobs
--root path Select root directory

QUERY:
--config Show build settings
--group <pattern|regex> List matching groups
--package <pattern|regex> List matching packages

COMMANDS:
--download grp|pkg ... Download selected packages/groups
--install grp|pkg ... Build and install packages
--upgrade grp|pkg ... Upgrade packages
--uninstall grp|pkg ... Uninstall packages
--makedev Recreate any missing device nodes
--distro <grp|pkg ...> Build a complete distro
--chroot <command> Chroot into distro, optional command
--backup dest directory Backup configuration ans state files
--clean Remove old package versions

MODIFIERS:
--bindsrc Use existing sources
--check Do 'make check' or equivalents
--distcc Use distcc to speed things up
--force Force reinstall
--pretend To see what would happen...
--pull Update repositories
--strip Strip binaries
--keep Keep any original config and state
--verbose Display more information

USEFUL STUFF:
gcc languages: ada f77 java objc (c and c++ are implied)
thread libraries: linuxthreads nptl
Tag examples: v2.4.21-rc7 date:yesterday date:2003-01-24

Important! The build machine must be capable of running the generated code,
For example;
You need a pentium4 build machine to use --cpu pentium4
You need an athlon64/opteron build machine to use --cpu opteron
(but its ok to build 64 bit distro from operton running 32bit os as long as
kernel is 64bit)

-----------------------------------------------------------------------------------------------------------------

How it all works will require further discussion, but if you want to get
involved, it would be a good idea to ask rubyx to download the sources. To
get everything, you'll need 4Gb and broadband ;) For just the basics, it's a
fraction of that but I don't have the figure to hand. Do this as root...

mkdir /my/rubyx/dir (or something like)
./rubyx --root /my/rubyx/dir --download base net disk (for the basics)
./rubyx --root /my/rubyx/dir --download all (for everything)

If you don't have broadband, you might want to use --dj 1 to reduce the number
of parallel downloads.

I wrote this in part to learn ruby, so any comments/suggestions on the code or
style are welcomed. Although I am writing this in Kmail on my laptop running
Rubyx, rubyx is still very much work in progress, so don't expect too much.
Lots more to discuss, but this will do for starters :)

Andrew Walrond
 
A

Andrew Walrond

I have been asked some questions off-list which might be generally useful, so
I have paraphrased the questions and replies here;

Where are the ebuild equivalents?
How do I create a distro?
How does package management work?
Can I create binary packages?

The rubyx script does everything. The ebuild equivalents are included in the
script; search for Pkg_ and have a look for yourself

You can create a distro with something like

rubyx --root my/distro/root --cpu pentium4  --cflags -O2 --distro kde xemacs
apache

Once you've got it installed and booted, you can install/uninstall extra
packages like this

rubyx --install samba
rubyx --uninstall apache

And when a you get a new version of rubyx, you can upgrade your packages like
this

rubyx --upgrade all --keep

Rubyx doesn't have any binary package support built in as it builds everything
from source, but you can create a binary package easily like this

tar -cjf samba.tar.bz2 /pkg/samba

and install it on another machine like this

cd /pkg
tar -xjf samba.tar.bz2 /pkg/
rubyx --relink

Hope that clarifies things abit.

Andrew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,814
Latest member
SpicetreeDigital

Latest Threads

Top