Gentoo Administration

This isn’t really worth an [ANN], so I’m not making it one.

I know that a certain amount of interest has come up in this group for
Ruby-based system administration.

This is of concern to me as well, and since I know that several people on this
list use Gentoo Linux (as do I), I make the following small offering.

http://blog.codedbliss.com/archives/gentoo-check_updates-0.5b.rb

What I’ve come up with is a small cron script that will update rsync and then
e-mail you a listing of any updated packages that are available (via a parsed
emerge -u world --pretend), to include descriptions, links to package
homepages, and versioning. You can set this up for whatever interval you
like-- I chose to throw it in /etc/cron.weekly.

This script requires YAML4R (http://yaml4r.sf.net), as YAML is the output
format. Why? Because Gentoo + Ruby + YAML rocks.

Cheers,

// Bruce

PS: In the event this is actually useful to anyone but myself, I may package
this with a few other Gentoo admin scripts for the RAA. Comments welcome.

···

author: Bruce R. Williams
url: http://codedbliss.com
irc: { nick: iusris, channels: [ ruby-lang, yaml ], server: irc.freenode.net }
quote: >
It does not require a majority to prevail, but rather an irate,
tireless minority keen to set brush fires in people’s minds.’
– Samuel Adams

In article 200303120505.30305.bruce@codedbliss.com,

This isn’t really worth an [ANN], so I’m not making it one.

I know that a certain amount of interest has come up in this group for
Ruby-based system administration.

This is of concern to me as well, and since I know that several people on this
list use Gentoo Linux (as do I), I make the following small offering.

http://blog.codedbliss.com/archives/gentoo-check_updates-0.5b.rb

What I’ve come up with is a small cron script that will update rsync and then
e-mail you a listing of any updated packages that are available (via a parsed
emerge -u world --pretend), to include descriptions, links to package
homepages, and versioning. You can set this up for whatever interval you
like-- I chose to throw it in /etc/cron.weekly.

This would be very useful.

This script requires YAML4R (http://yaml4r.sf.net), as YAML is the output
format. Why? Because Gentoo + Ruby + YAML rocks.

Indeed!

Cheers,

// Bruce

PS: In the event this is actually useful to anyone but myself, I may package
this with a few other Gentoo admin scripts for the RAA. Comments welcome.

I plan to give it a try. Please do consider putting your package on the
RAA.

Phil

···

Bruce Williams bruce@codedbliss.com wrote:

Haven’t looked at this script yet, but being an avid and active Gentoo
user myself I had following idea some days ago:

I’m new to Ruby, but I like it very much. I’m not new to Gentoo, and
like it a lot to. As learning a new language is more fun working on a
real project, I was thinking on doing some Gentooified adminscripts
using Ruby. Maybe other Gentoo+Ruby users want to participate so we
could start sort of a “project” for this, maybe even going so far as
creating a Rubyinterface to Portage (as someone else is trying to do for
Perl as I read on gentoo-dev).

Also an avid Gentoo-Ruby community could help advocate the use of the
language in the project, like doing ebuilds for Ruby 1.6.8, FreeRIDE and
additional packages.

Just some random thoughts,
Michael

···

On Wed, 12 Mar 2003 19:05:33 +0900 Bruce Williams bruce@codedbliss.com wrote:

PS: In the event this is actually useful to anyone but myself, I may
package this with a few other Gentoo admin scripts for the RAA.
Comments welcome.


www.cargal.org
GnuPG-key-ID: 0x90CA09E3
Jabber-ID: citizen428 [at] cargal [dot] org
Registered Linux User #278726

Michael,

Actually, Tom Payne has done some work in this regard-- at least as a package
DB reader (he doesn’t suggest using it for writing, obviously). At some
point I’d like to extend this, though I’m not sure to what bounds at the
moment.

I’ve been surprised w/ how many Gentoo users I’ve seen within the Ruby
community, and I’ll agree with you by saying that the idea (of a Gentoo-Ruby
advocacy group) is one I would definitely support.

To date I’ve already been quite pleased w/ the number of Ruby packages in the
Gentoo repositories. Of course I’d like to see more. :wink:

// Bruce

···

On Sunday 16 March 2003 12:37 am, Michael Kohl wrote:

On Wed, 12 Mar 2003 19:05:33 +0900 > > Bruce Williams bruce@codedbliss.com wrote:

PS: In the event this is actually useful to anyone but myself, I may
package this with a few other Gentoo admin scripts for the RAA.
Comments welcome.

Haven’t looked at this script yet, but being an avid and active Gentoo
user myself I had following idea some days ago:

I’m new to Ruby, but I like it very much. I’m not new to Gentoo, and
like it a lot to. As learning a new language is more fun working on a
real project, I was thinking on doing some Gentooified adminscripts
using Ruby. Maybe other Gentoo+Ruby users want to participate so we
could start sort of a “project” for this, maybe even going so far as
creating a Rubyinterface to Portage (as someone else is trying to do for
Perl as I read on gentoo-dev).

Also an avid Gentoo-Ruby community could help advocate the use of the
language in the project, like doing ebuilds for Ruby 1.6.8, FreeRIDE and
additional packages.

Just some random thoughts,
Michael


author: Bruce R. Williams
url: http://codedbliss.com
irc: { nick: iusris, channels: [ruby-lang, yaml], server: irc.freenode.net }
quote: >
It does not require a majority to prevail, but rather an irate,
tireless minority keen to set brush fires in people’s minds.’
– Samuel Adams

I would also like a Gentoo-ruby advocacy group. I don’t see much support
of ruby in gentoo, imo. Base install is ok, but not much else. Moreover, I
submitted some ebuilds (strscan, eruby), and I still don’t see them in
portage. However, I know I should polish them, they ain’t very good, and
not up to date now.

However, I’m not sure what to think of a ruby portage. I think, it would
be better to rewrite the whole portage in C, so noonehas to install a
script language (tcl, perl, python, ruby …). But, it would also be a big
work, and harder to debug/modify. C is a bitch at times :).

I’m a big fan of both Gentoo and Ruby, but…

“Simon ARNAUD” Maz@nawak-online.org wrote in message news:pan.2003.03.17.22.11.27.304557@nawak-online.org

I would also like a Gentoo-ruby advocacy group. I don’t see much support
of ruby in gentoo, imo. Base install is ok, but not much else. Moreover, I
submitted some ebuilds (strscan, eruby), and I still don’t see them in
portage. However, I know I should polish them, they ain’t very good, and
not up to date now.

Well, it’s up to us to fix this. Gentoo has ruby-1.6.8, and when 1.8.0
is finally released that’ll be in there quickly. I wrote a ruby-cvs
ebuild, but it’s generally more hassle than it’s worth.

As for Ruby packges from the RAA they still vary a lot in their build
mechanisms, which is a shame. Specifically, most don’t support the
“make DESTDIR=/x/y/z install” idiom which makes writing correct and
up-to-date ebuilds a chore.

I suggest that when 1.8.0 comes out we contribute ebuilds for it and
the commonly used RAA packages. In my experience, ebuilds are MUCH
more likely to be accepted if they are 100% correct. Partial or buggy
ebuilds are a real pain for the portage maintainers.

However, I’m not sure what to think of a ruby portage. I think, it would
be better to rewrite the whole portage in C, so noonehas to install a
script language (tcl, perl, python, ruby …). But, it would also be a big
work, and harder to debug/modify. C is a bitch at times :).

I don’t think this is a good idea. Maintaining parallel Ruby and
Python versions of portage would be a nightmare: portage changes
regularly and keeping both versions in sync would be problematic. The
portage hackers already know Python and reasonably would see no reason
to change. As for re-writing in C: why? The slow parts of emerge are
fetching, unpacking, and compiling, none of which would be speeded up
by using C. It would just make it much much harder to modify and
improve the program.

IIRC there is a Gentoo like distribution that uses Ruby rather than
Python, but I can’t remember it’s name.

One of the many great things about Gentoo is that both the portage
tree and the package database are stored in plain text (unlike, for
example, RPM). This makes querying it really easy even from the
command line (e.g. you can list installed packages by typing “ls
/var/db/pkg///*.ebuild | cut -d/ -f5-6”). This makes writing a Ruby
query tool really easy too.

Regards,

Tom

I don’t think this is a good idea. Maintaining parallel Ruby and
Python versions of portage would be a nightmare: portage changes
regularly and keeping both versions in sync would be problematic.

I never meant to replace the current Portage by a Ruby one.

One of the many great things about Gentoo is that both the portage
tree and the package database are stored in plain text (unlike, for
example, RPM). This makes querying it really easy even from the
command line (e.g. you can list installed packages by typing “ls
/var/db/pkg///*.ebuild | cut -d/ -f5-6”). This makes writing a Ruby
query tool really easy too.

That is what I meant by “Ruby-Portage-Interface”. I guess I was a little
unclear in my first post, sorry!

Michael

···

On 18 Mar 2003 02:07:54 -0800 google@tompayne.org (Tom Payne) wrote:


www.cargal.org
GnuPG-key-ID: 0x90CA09E3
Jabber-ID: citizen428 [at] cargal [dot] org
Registered Linux User #278726

As for Ruby packges from the RAA they still vary a lot in their build
mechanisms, which is a shame. Specifically, most don’t support the
“make DESTDIR=/x/y/z install” idiom which makes writing correct and
up-to-date ebuilds a chore.

Agreed completly. However, we could help on making most use this schema.
If devs are inclined to accept changes. Also, some use make, some use
setup.rb (or install.rb), and some just need copying.

I suggest that when 1.8.0 comes out we contribute ebuilds for it and
the commonly used RAA packages. In my experience, ebuilds are MUCH
more likely to be accepted if they are 100% correct. Partial or buggy
ebuilds are a real pain for the portage maintainers.

Agreed too. What about having a parallel dev-ruby tree which we could work
on, and submit already tested ebuilds by a handfull of people ?
We could organize a #gentoo-ruby, or something like that, and a cvs tree
somewhere.

I don’t think this is a good idea. Maintaining parallel Ruby and
Python versions of portage would be a nightmare: portage changes
regularly and keeping both versions in sync would be problematic. The
portage hackers already know Python and reasonably would see no reason
to change.

Re-read my point, we do agree on this one :).

As for re-writing in C: why? The slow parts of emerge are
fetching, unpacking, and compiling, none of which would be speeded up
by using C. It would just make it much much harder to modify and
improve the program.

The only reason I see in rewriting it in C is getting rid of python in
‘system’. Otherwise, I do agree, speed improvement would not be tremendous
(if any), and maintenance would be a lot harder.
The reason I would like this is to get small gentoo (hd space wise) up and
running, but I guess it would be even better if they splitted ‘system’
into ‘running system’ (eg: kernel, binutils, glibc …) and ‘building
system’ (eg: gcc, python, portage).

One of the many great things about Gentoo is that both the portage
tree and the package database are stored in plain text (unlike, for
example, RPM). This makes querying it really easy even from the
command line (e.g. you can list installed packages by typing “ls
/var/db/pkg///*.ebuild | cut -d/ -f5-6”). This makes writing a Ruby
query tool really easy too.

Agreed

Regards,

Tom

cheers,

Maz

···

On Tue, 18 Mar 2003 02:07:54 -0800, Tom Payne wrote:

I think this is very good idea :slight_smile:

···

On Wed, 19 Mar 2003 08:49:36 +0100, Simon ARNAUD wrote:

I suggest that when 1.8.0 comes out we contribute ebuilds for it and
the commonly used RAA packages. In my experience, ebuilds are MUCH
more likely to be accepted if they are 100% correct. Partial or buggy
ebuilds are a real pain for the portage maintainers.
Agreed too. What about having a parallel dev-ruby tree which we could work
on, and submit already tested ebuilds by a handfull of people ?
We could organize a #gentoo-ruby, or something like that, and a cvs tree
somewhere.


Marek Janukowicz