I wonder who is acting like a moron…

It is often surprising how some people can really lose control of a situation.

Take this example http://dev.gentoo.org/~ferdy/tmp/seemant-moron.log . It is actually sad having to deal with that kind of thing. I asked three times for an apology and (surprise surprise) I didn’t get one. One publicly in IRC, another one in a /query and a third one by mail.

Besides wondering who is the one acting like a moron, I really wonder why people have the feeling that Gentoo is oh so nice and friendly.

No love.

— ferdy

PS: Despite of his attitude, I still can’t be bothered with personal issues. So if he wanted me to have an issue with him, I’m thankful he failed.

Mutt macro trick

So Greg KH wonders how to fix his macro in mutt.

Here you have something that works. Doesn’t do anything fancy (in fact it is useless), but I guess you could adapt it to suit your needs:

macro index T "<enter-command>unset wait_key\n \
                <pipe-message>cat - > /home/ferdy/foo.blah\n \
                <shell-escape>vim -c 'set ft=mail' /home/ferdy/foo.blah\n \
                <enter-command>set wait_key\n"

I tried using ‘decode-save’ and/or ‘save-message’ but for some reason it didn’t work. I guess you could replace ‘x.sh’ or almost all of it with a mutt macro like the one above.


Solving the Missionaries and Cannibals puzzle

There is a traditional puzzle where 3 missionaries and 3 cannibals have to cross a river using a small canoe. Rules are:

* You cannot have more cannibals than missionaries in either bank because cannibals will eat missionaries.
* The canoe can be run by either one or two persons. Both cannibals and missionaries know how to run it.

This puzzle is really easy to solve either by hand or programming. However, hacking a script to solve it is always more challenging than solving it by hand. Juanjo proposes a solution using Ruby in Misioneros y can

Status update (alpha,haskell,ctags,…)

So It’s been a long time since I wrote anything, not because I’ve done much for Gentoo but because Uni starts sucking once again.

However I found some time to do a couple of (maybe) interesting things:

I added some base-system binary packages for alpha. So if you screwed your alpha instalation doing something brave (or stupid) just take a look at http://dev.gentoo.org/~ferdy/bins/alpha/. You should be able to recover your system if you have a working busybox (which you SHOULD have).

I also managed to build ‘The Glorious Glasgow Haskell Compiler’ under alpha. Even if it is an unregisterised build, the result binaries are pretty usable (although they are HUGE). I built darcs with it and works perfectly. If you want to give it a try, get it from the url above, and put it in /usr/portage/packages/. You should be able to ’emerge -k’ it by just removing the <virtual/ghc-6.5 dependency in dev-lang/ghc-6.4.1-r1.

I’ll work with the gentoo-haskell guys to get it into the portage tree soon. Since I’m learning haskell, expect more haskell-related alpha porting 🙂

I also hacked a portage atom parser in haskell for a script I’ve been meaning to do for a long time. Doesn’t do anything fancy yet since I’m still implementing the Ord class operators. However it is considerably fast, it parses ~71000 lines in less than 1.5 seconds. Get AtomParser.hs and see a proof of concept showing its use in parser-test.hs. ( I’m still learning haskell so yes, it is really easy to improve my code ).

Since ctags is almost unmaintained upstream I’ve been collecting some useful patches around the net and might consider give it a big bump in the near future. The patches series are (in order):

  • Haskell support [by me]
  • Very basic ObjC support (ObjC hackers are welcome to send me ideas and code to improve the regexes) [by me]
  • Add patch to make Ruby class names in the form Foo::Bar work [by Ciaran McCreesh]
  • Add patch to improve C handling [by vim hackers, pointed out by Ciaran McCreesh]
  • Add support for Java 5 generics [found somewhere in the ctags forums]
  • Ebuild syntax support [by Ciaran McCreesh]

If you have an interesting and useful patch for ctags, please send it my way so I can integrate it in the next bump if I ever manage to do it. I’m maintaining all those patches in a stgit repository that I might share if anybody asks me to do it.

Also the Alpha Arch Testers project is reaching its final stage. We’ve got a quiz and we are giving the final touches to a policy document describing how we should behave (i.e. herd and arch-testers) one to each other.

Also I’m looking forward to Stephen Bennett‘s SELinux work under alpha. He kind of promised to test the hardened-sources; it’ll rock if he gets them work; because since the grsec-sources were removed we’ve got no ‘secure’ sources in the tree.

And last (and probably least) I wrote a dirty bash script some time ago and thought I might share. It simply lists the files that are no longer ‘claimed’ by any package installed under /usr/portage/distfiles. I know there are some nice python scripts around but I found this one to be way faster than those. WARNING: It is a hack, it won’t work without gnu-sed and will probably miss some files. However, it seems to work great here. If you want to give it a try, it is here (distfiles-clean). ( More scripts in http://gentoo-es.org/~ferdy/git/?p=gentoo-scripts.git;a=summary )

Ok time to get back to the mips assembly University work…


Multiple git enhancements

I’ve been working on dev-util/git and git-related software for a week and today I committed the following git related packages and enhancements:

dev-util/git – An init script to use git-daemon. It is way faster than HTTP for ‘clone’ and ‘fetch’ (and thus ‘pull’). A really nice way to share repositories if you don’t have lots of bandwidth.

dev-util/stgit – Stacked GIT is a SCM on top of GIT that works a la quilt. Lets you manage a series of patches in a stack fashion.

www-apps/gitweb – Gitweb is a handy cgi script to show git repositories ‘via Web’. It uses webapp.eclass. I’ve added this one to package.mask because I think it needs a bit more testing before going to ~arch. Unmask it, test it, and send feedback please 🙂

I started using git a month ago and I’ve migrated almost all my code to git. The documentation is good enough and git’s layout is in fact very easy. Moreover, there are scripts to import both cvs and arch repositories (git-cvsimport and git-archimport). Both of them work pretty good as far as I know.

Test and enjoy them 😉

New mutt and maildrop versions

Yesterday I added a new mutt version to the tree (1.5.11, ~arch). Except from a bug regarding SASL that I fixed a couple of hours after adding it; should work fine.

I also added maildrop-2.0.0 to the tree AND package.mask. This version comes with nice features such as fam integration and uses libpcre for pattern matching. Please test it and send bugs if you find any. I’m using it without problems so it shouldn’t break too badly 🙂

A simple:

# echo '>=mail-filter/maildrop-2.0.0' >> /etc/portage/package.unmask
# emerge -va maildrop

should do it.


I voted, too!

I also voted for the council2005 election as Grant did. It is really important that every developer takes at least 5 minutes to vote. So either vote or don’t complain if you don’t like the council (or its decissions) when the election closes !

Have you voted? If not, what are you waiting for ?



Hi !

I’ve been using part of the ciaranm‘s bashrc (most of the Gentoo-related functions) and though it’s great I thought that something was missing. I needed something to extrackt the depend atoms on a package. I played a bit with sed and finally wrote something useful:

edeps() { 
    local FILES e
    if [ ! -z "${1}" ] ; then
        FILES=$(equery which ${1})
        FILES=$(ls *.ebuild)
    for e in ${FILES};
        echo -ne "\033[01;32m * \033[00m"
        echo -n "Depend atoms on: "
        echo -e "\033[01;38m${e##*/}\033[00m"
        sed -ne '/^[RP]\?DEPEND=\"[^\"]*$/,/^.*\" *$/p' \
            -e '/^[RP]\?DEPEND=\"[^\"]*\"$/p' ${e}

PD: BTW this is my very first post on the Gentoo Planet. I hope you’ll forgive my language mistakes since english is not my mother tongue. (I’m spanish).

1777 is not ‘protection’

The last few days we’ve been having a bit of discussion in #-netmail about uw apps. They display a *really* bogus message if the mail spool directory (/var/spool/mail) is not protected with 1777 (*sigh*):

Mailbox vulnerable - directory /var/spool/mail must have 1777 protection

Of course mailbase creates /var/spool/mail and sets 0775 on it. Thats a real protection since it prevents someone from doing:

for i in /var/spool/mail/* ; do touch ${i}.lock; done

and mess the mail system.

Quoting from the UW IMAP FAQ:

Directory protection 1777 is secure enough on most well-managed systems. If you can’t trust your users with a 1777 mail spool (petty harassment is about the limit of the abuse exposure), then you have much worse problems then that.

It sounds ridiculous to me. I think we will finally adopt the workaround in https://bugzilla.redhat.com/beta/show_bug.cgi?id=103479#c8 or probably patch the sources to remove that annoying message.

I wonder how 1777 on the mail spool directory should be used for security reasons (*sigh*) Maybe someone will explain it to me…

Any ideas on how to solve this ?


GLEP 34 also speaks spanish

Spanish translations for per-category metadata.xml files are almost finished. araujo is doing: dev-* media-* app-* and x11-*. And I just commited the rest: games-* gnome-* gnustep-* kde-* net-* mail-* rox-* sci-* sys-* www-* xfce-* and sec-policy.

It’s been boring… but anyway, we did it hehe

It took me like 1 hour to update, check, translate, check and commit around 70 files… but feels like a wasted hour 🙁 At least I hope it will get integrated in packages.g.o

PD: Hey ! bugs.g.o is now ssl enabled, now I can access bugzilla in networks I don’t trust (i.e university, work, … all of them but mines i think :P). So infra++