From: Rasputin Date: 2003-05-08T00:21:54+09:00 Subject: Re: Package management [was Re: A wishlist for a "Ruby Standard Library"] * Aredridel [030507 11:08]: > > Same here. But I think that part of the reason we're moving toward a > > 'fat' distribution (rubysumo) is because we haven't been able to agree on > > an installation standard. There are solutions out there (raainstall and > > rpkg come to mind) but as a community we can't seem to agree on which > > system to use and on how to deal with dependencies. There are proposals > > out there and in some cases people have written 'proof-of-concept' code, > > but nothing much happens in this department. > > What if one takes the same tack that package-managed distributions took > -- apply the packaging externally? I think I mentioned this once before, but the BSD package system approach is simple and elegant, I think. For those who don't know it, you effectively have a directory tree, like : /usr/pkgsrc/editors/vim /usr/pkgsrc/editors/xemacs /usr/pkgsrc/www/mozilla /usr/pkgsrc/www/apache2 etc, etc. Inside each directory there's a Makefile and some patches. TO install apache , you just cd /usr/pkgsrc/www/apache and type 'make install'. That's it. Behind the scenes, make: o retrieves the source from the prjects homepage [ apache.org, *NOT* netbsd.org - you use the original source ] o verifies it against a checksum [ ensures the package tarfile hasn't changed and should therefore build, and also verifies integrity of the source and patches against it ] o figures out dependencies [ e.g. apache needs libmm v.94 or higher, so before building, cd /usr/pkgsrc/devel/mm and install that] o patches the source if needed so it will run on the target platform o builds and configures the source [ with custom options if needed e.g 'make -DWITH-IPv6 install' ] o installs it and updates its version databases [ the installer can even create required users, etc for you ] All of this is handled by a dozen makefiles. pros: - no central site, so traffic is spread evenly around the site - no need for people to use proprietary formats - the system can figure out what platform (and even OS - see bootstrap-pkgsrc project) it is running on, there's no need for 1 package per platform as with precompiled packages) - frankly, anything make can do, ruby could do standing on its head. cons: - if you build this into ruby, how do you handle cases where you install a ruby module that requires a native library? (This isn't a failing in pkgsrc, but needs considering). - you need to find a way to update pkgsrc Probably more in the Ruby-specific case, I don't know. Updating on NetBSD is done via CVS, but there's no reason why each package couldn't load its config from a website rather than a directory. If the functionality was built into a small base distribution of ruby, I don't see why it couldn't even grab modules at runtime if a require failed. If you want to define things like ruby-sumo, it's a piece of cake, you just define a 'meta-pkg' which is nothing but a list of dependencies. Running 'make install' (or 'ruby --install modules/metapkg/sumo') then handles getting the requirements for you using the same framework. Sorry this is off-topic, I just wanted to point out alternatives to CPAN we might want to emulate. I'm not on commission from NetBSD or anything, if you want to use another system feel free (can I vote for BSD license not GPL though) that's fine with me. Again sorry for not implementing this right away, but I am a nooby :) -- Rasputin :: Jack of All Trades - Master of Nuns