Fernando J. Pereda’s blag

June 28, 2008

Shame

Filed under: blag — Tags: , , — Fernando J. Pereda @ 4:57 pm

I can’t find a different word to describe this situation. I’m usually very proud of being part of Gentoo, even if I don’t agree with every single thing Gentoo does (hey, unlike others, I’m able to live with people disagreeing). But what happened yesterday is really really sad and shameful.

The explanation is long but, fortunately, Alexander wrote a nice blag post explaining what happened:

Attack on Exherbo.org Machine

Do read it. It is important to know the kind of people you work with, and the kind of people you trust certain resources to. I hope Gentoo does something about this. It is of such a bad taste that I don’t want to get started… You can follow the process here: https://bugs.gentoo.org/229895 . I really do hope Gentoo does something.

— ferdy

June 21, 2008

Sometimes, stuff goes wrong

Filed under: blag — Tags: , , — Fernando J. Pereda @ 4:55 pm

While doing some hacking on a virtual machine, VMWare decided to crash. After rebooting the computer (its kernel part was screwed up too) and restarting the virtual machine nothing seemed to work; rm, tr, sort and friends segfaulted.

The most interesting bit, however, was cat:

cat running parts of paludis?

Well, apparently paludis is to blame for this one too.

I ended up hardlinking lots of stuff to /bin/busybox and was able to rebuild paludis, coreutils and some other stuff. Everything seems to be working again. It is not the first time that an static build of busybox has saved me lots of pain.

— ferdy

June 9, 2008

Getting rid of ChangeLog files

Filed under: blag — Tags: , — Fernando J. Pereda @ 10:34 pm

There’s been some discussion on exherbo’s development list about getting rid of ChangeLog files. With the move of our repositories to git this would be easy.

This doesn’t mean users won’t see ChangeLog files, it means we won’t have to manually generate them. It has some improvements:

  • Maintaining ChangeLog files by hand is a PITA
  • People can’t void ChangeLog files, if you commit, it automagically goes to the ChangeLog.
  • We can easily link ChangeLog entries with Git history (by including commit hashes)
  • Cross-package/category commits become less annoying (because of the two bullets above)
  • The repository size doesn’t increase stupidly

Generatiing ChangeLog files is quite easy using Git, and can be done incrementally.

The cons…. I really don’t know whether those exist in this particular case :) If you can think of any, I’m all ears (or eyes in this case).

— ferdy

May 29, 2008

Exherbo Workflow

Filed under: blag — Tags: , — Fernando J. Pereda @ 12:27 pm

I’ve found myself using these functions a lot while working on exherbo (which are suitable for Gentoo overlays using git too):


 1 # Fernando J. Pereda
 2 # exherbo workflow
 3
 4 reponame()
 5 {
 6     local reponame=$1
 7     if [[ -z ${reponame} ]] ; then
 8         local t=$(git rev-parse --git-dir)
 9         t=${t//\.git}
10         if [[ -z ${t} ]] ; then
11             t=${PWD}
12         else
13             t=${t%/}
14         fi
15         reponame=${t##*/}
16     fi
17     echo ${reponame}
18 }
19
20 repoclean()
21 {
22     local n=$(reponame $1)
23     (
24         cd /var/repositories/"${n}"
25         sudo git clean -fd
26         sudo git checkout -f
27     )
28 }
29
30 repoexport()
31 {
32     local n=$(reponame $1) rhead repo
33     repo=/var/repositories/"${n}"
34     rhead=$(git --git-dir="${repo}"/.git rev-parse HEAD)
35     if ! git cat-file -t ${rhead} >/dev/null 2>&1 ; then
36         echo >&2 "Remote HEAD not found. Need 'git pull --rebase'?"
37         return 127
38     fi
39     GIT_PAGER=cat git log --pretty=format:'- %s' ${rhead}..
40     echo
41     git diff ${rhead}.. | ( cd ${repo} ; sudo git apply - )
42 }

I usually work in my own clones of the repositories I have configured in paludis, for instance:

$ for repo in x11 arbor ; do git clone --reference /var/repository/${repo} git://git.exherbo.org/${repo} ; done

Then I work on topic branches until they are ready:

$ git checkout -b mybranch
[ gvim + git commit + ... ]
$ repoclean
$ repoexport
$ sudo paludis ...... # try the package(s) I'm working on until I'm happy

At that point, I do:

$ git fetch
$ git rebase origin/master
$ git checkout master
$ git merge mybranch
$ git push

— ferdy

Update: As rbrown points out. The clone command was wrong.

May 27, 2008

Shipping default configurations

Filed under: blag — Tags: — Fernando J. Pereda @ 1:08 am

I’ve spent a couple of days getting postfix into arbor. At some point, I got to decide what to provide our users with with respect to configurations.

Postfix has two main configuration files, main.cf and master.cf. The former controls general postfix settings like “who do I accept mail from?” (mynetworks), “for which hosts am I going to receive mail?” (mydestination), “who do I send mail to?” (relayhost) and so on. While the latter specifies which servers (postfix works by doing different tasks in different servers) are going to be run and whith which parameters.

In Exherbo, we are going to follow upstream unless when we can’t. In this particular case, upstream’s wording isn’t particularly clear to me. They discourage providing a big file full of comments by default (which is what Gentoo does) so that people don’t tinker with stuff they don’t understand. And they encourage packagers to provide a small configuration. Turns out this isn’t exactly possible since there are several different use cases for a software package like postfix.

I also hate what Debian does, they usually provide a default configuration and automagically start the service. Leaving you potentially open to security attacks.

In the end, I decided to ship a simple example configuration file that postfix won’t see and let users provide their own configuration. I, for instance, expect people using postfix to know what they are doing and to be able to configure it themselves. For the master.cf, I ended up copying the one in the source distribution since that one seems simple enough.

What do you think about this? Do you expect software to be configured for you upfront?

It is not like it is going to change what we do in Exherbo, but I got curious.

— ferdy

May 22, 2008

Awesome is awesome

Filed under: blag — Tags: , — Fernando J. Pereda @ 1:02 am

To work on exherbo I needed a comfortable environment. After tinkering around packaging open-vm-tools (which took a fair bit to get working) I tried to install fluxbox, which didn’t seem to compile for me. At this point I remembered I wanted to try awesome.

Most of its deps where already available in our x11 repository, except for confuse and awesome itself. In less than fifteen minutes I was using it. It seems that my usual workflow fits quite nicely in how awesome works. I had already tried some tiling window managers and always ended up switching back to fluxbox and my rusty set of shortcuts. Today, I’ve just looked at awesome’s Command Reference a couple of times. And I’m really eager to install it on my main box (when I get that screen back from repair).

I’ve also found the time to package mutt and do a couple of fixes here and there. Some of the stuff is in arbor, some in x11, and some more in my supplemental repository for exherbo at git://git.ferdyx.org/ferdy-supplemental.git.

— ferdy

May 19, 2008

Excitement

Filed under: blag — Tags: — Fernando J. Pereda @ 4:13 pm

This is really exciting. Nothing interesting to see, yet lots of interesting stuff to expect in the not so distant future.

Good luck everyone and congratulations.

— ferdy

Blog at WordPress.com.