Search Results: "ag"

2 March 2008

Stefano Zacchiroli: indeed we should use doc-base more

Long live to doc-base Runa wonders: Why aren't we using doc-base? . It's indeed a good question. In the past I've pushed for using doc-base in several places, including obviously packages of mine, but also recently generating by default doc-base entries from OCaml libraries using debpkg ocamldoc, and finally also more than 100 doc-base entries shipped by w3-recs alone for the contained W3C recommendations. doc-base is based on a good idea, i.e. annotating the doc we ship with metadata so that it can be more easily browsed, and is (potentially) far better than asking our users to dig into /usr/share/doc/foo. Still, it is sadly true that in Debian is way underused. My best bet at the reason is that in the past the tools floating around doc-base were sucky. However, in 2007 some of them has dramatically improved their quality, with the noteworthy example of dhelp which has been rewritten from scratch in Ruby by Esteban Manchado Vel zquez closing tens and tens of bugs. My exhortation: please, maintainers, go back and consider (again, if needed) to register your documentation with doc-base, it is helpful and it does work. The next (needed) step for the doc-base world domination will be decoupling its classification hierarchy from that of the Debian menu system, keeping the 2 bound is nonsense. Update Runa submitted bug #469018; cool, because I was just going to do that by myself :-)

Brice Goglin: Debian X.org notes - Radeon Textured Xvideo in experimental, r128 and mach64 split out

After xf86-video-ati 6.8.0 got released, George Sapountzis split the old r128 and mach64 subdrivers out of the common ati wrapper. So, starting from 6.8.1, the xserver-xorg-video-ati package only contains the radeon subdriver. The other subdrivers have been moved to their own xserver-xorg-video-r128 and -mach64 packages. All of them just landed in experimental. Your existing xorg.conf should work as before. I don't have any Mach or Rage board, so please test these new packages and report back if they don't work. Note that if your xorg.conf contains Driver "ati", you'll need to keep xserver-xorg-video-ati installed. If you only have the mach64 or r128 package installed, you need switch to Driver "mach64" or "r128" in xorg.conf. On the radeon side, the upstream developers are still very active. The last feature that has been added is Textured Xvideo. The Xvideo extension is usually implemented using the hardware overlay, which basically inserts the video on screen at the very end of the rendering. While working very well, this feature conflicts with compositing managers such as Compiz which cannot transform the Xvideo image. The radeon driver now exposes a Texture Xvideo adaptor which is composite-aware, which means you can have wobbly Xvideo players in Compiz. The Overlay adaptor is still the default since the Textured video isn't considered stable enough yet. To enable it, you can use something like:
    mplayer -vo xv:port=74 foo.avi
Where do I get this port 74 from? Just look at the output of xvattr or xvinfo:
    $ xvattr
    Found Xv 2.2
    Adaptor: 0
    Name: ATI Radeon Video Overlay
     Port: 73
     [...]
    Adaptor: 1
    Name: Radeon Textured Video
     Port: 74
     Port: 75
     [...]
    $ xvinfo
    X-Video Extension version 2.2
    screen #0
     Adaptor #0: "ATI Radeon Video Overlay"
      number of ports: 1
      port base: 73
      [...]
     Adaptor #1: "Radeon Textured Video"
      number of ports: 16
      port base: 74
      [...]
(Permanent link) 

Adeodato Sim : Making EnhancedCommentify.vim more useable for me

I use the enhanced commentify script from vim.org to easily comment and decomment parts of code. It knows about comment delimiters in a ton of languages, and it’s generally nice. Lately, I’ve been a bit annoyed about commenting several lines with different indent levels. In particular, given for example this snippet:
  def foo():
      if duck.is_hungry():
          grab_food()
          feed_duck()
If one instructs the script to comment the three last lines, the result is:
  def foo():
      # if duck.is_hungry():
          # grab_food()
          # feed_duck()
When what I would like is:
  def foo():
      # if duck.is_hungry():
      #     grab_food()
      #     feed_duck()
There is one variable one can set to achieve this behavior: EnhCommentifyUseBlockIndent. However, it only works when commenting from visual mode. From normal mode (what I normally use — that is, going to e.g. line 2 above, and pressing 3,c), it doesn’t work, because from normal mode the commenting function does not receive the block, it just gets called three times, once per line. To solve this, the solution I found was to create a custom command that accepts a range, and calls the function exactly once, for the whole block. In particular, this is all my enhanced commentify configuration from ~/.vimrc:
  let EnhCommentifyPretty = "yes"
  let EnhCommentifyUserBindings = "yes"
  let EnhCommentifyRespectIndent = "yes"
  let EnhCommentifyUseBlockIndent = "yes"
  " The MyEnhancedCommentify bit is needed because the normal nmap just
  " calls EnhancedCommentify() <count> times, thus UseBlockIndent can't
  " work.
  nmap <Leader>c :MyEnhancedCommentify<CR>
  vmap <Leader>c <Plug>VisualTraditional
  command! -range MyEnhancedCommentify 
      \ call EnhancedCommentify('', 'guess', <line1>, <line2>)

Meike Reichle: Chemnitz Linux Days 2008

Seems as if the Chemnitz Linux Days somehow turned out to be the only Linux event I still attend regularly. These days I miss out on most of them, simply because of a total lack of spare time, however, I somehow always make the CLT ... no matter how big the hassle may be! They're just worth it :) My talk went well, even though I actually got a bit pressed on time this year and had to cut the Q&A part. The (German) slides for my talk are as usually on my talks page.

1 March 2008

Adam Rosi-Kessel: The Best Movie to Start at 11pm at the End of a Long Trial

Anatomy of a Murder. David Denby put it best:
Otto Preminger s Anatomy of a Murder, from 1959, is still the best courtroom drama ever made in this country, and, in its occasional forays out of the court, among the finest evocations of place an Upper Peninsula Michigan resort area in the off-season, leafless, underpopulated, alcoholic, and forlorn. James Stewart, in one of his wonderful melancholy late performances, plays a former county prosecutor named Biegler, a lifelong bachelor who now spends his time with a non-practicing lawyer (Arthur O Connell) and an unpaid secretary (Eve Arden), who sticks around for the wisecracks. The movie is leisurely, detailed, realistic, intensely companionable; you get a sense of how people exist at the margins of a profession without losing their dignity.
Although there are some distinctions between a murder defense in the 1950’s in the Upper Peninsula of Michigan and modern-day patent litigation, the essence of trial technique is really not all that different. Highly recommended.
Prosecutor: Lieutenant Manion, wasn’t your action against Barney Quill much the same thing as your action against Miller or the Lieutenant you slapped at the cocktail party — all done in the heat of anger, with a willful, conscious desire to hurt or kill?
Defendant: I don’t remember my action against Quill.
Prosecutor: How long had you known your wife was stepping out with Quill?
Defendant: I never knew anything like that. I trust my wife.
Prosecutor: You just occasionally beat her up for the fun of it, I suppose?
Defense Counsel: There has been nothing established to permit a question like that. He keeps trying to insinuate without ever coming to the point. Let him ask the Lieutenant, did he ever beat his wife.
Judge: I will sustain the objection. Do you want to re-phrase your question, Mr. Dancer?
Prosecutor: No thank you, Your Honor. I’ve finished.
Technorati Tags: , ,

Romain Francoise: Fast directory navigation

About a year ago I stumbled upon this post which mentions the following shell keybindings: M-- for pushd .. and M-= for popd. Since the dash and equal signs are very conveniently placed next to each other, this allows fast directory navigation with accessible keystrokes and is especially convenient to move up in the directory hierarchy. Very neat.

Of course I use zsh and not bash, so I had to "port" this hack to zsh, which resulted in somewhat obscure code compared to the bash version:
function up-one-dir   set -E; pushd ..; set +E; zle redisplay; zle -M  pwd   
function back-one-dir set -E; popd; set +E; zle redisplay; zle -M pwd
zle -N up-one-dir
zle -N back-one-dir
bindkey "^[-" up-one-dir
bindkey "^[=" back-one-dir
Not so pretty, but it works. The only problem is that I do most of my shell interaction through shell-mode in Emacs, not in zle-capable terminals. So I also had to write a shell-mode version, which turned out to be even uglier because I basically had to rip off the shell-resync-dirs code to handle comint interaction and directory tracking. Here it is in all its glory:
(defun ore-shell-dirnav (direction)
(interactive)
(let* ((proc (get-buffer-process (current-buffer)))
(pmark (process-mark proc))
(cmd (if (eq direction 'up) "pushd .." "popd")))
(goto-char pmark)
(sit-for 0)
(comint-send-string proc cmd)
(comint-send-string proc "\n")
(set-marker pmark (point))
(let ((pt (point))
(regexp
(concat
(if comint-process-echoes
(concat "\\(" (regexp-quote cmd) "\n\\)")
"\\(\\)")
"\\(.+\n\\)")))
(insert "\n")
(backward-char 1)
(while (not (looking-at regexp))
(accept-process-output proc)
(goto-char pt)))
(goto-char pmark)
(delete-char 1)
(let* ((dl (buffer-substring (match-beginning 2) (1- (match-end 2))))
(dl-len (length dl))
(ds '())
(i 0))
(delete-region (match-beginning 2) (1- (match-end 2)))
(while ( i dl-len)
(string-match "\\s *\\(\\S +\\)\\s *" dl i) ; pick off next dir
(setq ds (cons (concat comint-file-name-prefix
(substring dl (match-beginning 1)
(match-end 1)))
ds))
(setq i (match-end 0)))
(let ((ds (nreverse ds)))
(condition-case nil
(progn (shell-cd (car ds))
(setq shell-dirstack (cdr ds)
shell-last-dir (car shell-dirstack))
(shell-dirstack-message))
(error (message "Couldn't cd")))))))

(defun ore-shell-dirnav-up ()
(interactive)
(ore-shell-dirnav 'up))

(defun ore-shell-dirnav-down ()
(interactive)
(ore-shell-dirnav 'down))

(define-key shell-mode-map (kbd "M--") 'ore-shell-dirnav-up)
(define-key shell-mode-map (kbd "M-=") 'ore-shell-dirnav-down)
Phew. It's a lot of code for a seemingly simple feature, but the time it saves me probably adds up to a few hours per year, so it's worth it.

Anthony Towns: Been a while...

So, sometime over the past few weeks I clocked up ten years as a Debian developer:
From: Anthony Towns <aj@humbug.org.au>
Subject: Wannabe maintainer.
Date: Sun, 8 Feb 1998 18:35:28 +1000 (EST)
To: new-maintainer@debian.org
Hello world,
I'd like to become a debian maintainer.
I'd like an account on master, and for it to be subscribed to the
debian-private list.
My preferred login on master would have been aj, but as that's taken
ajt or atowns would be great.
I've run a debian system at home for half a year, and a system at work
for about two months. I've run Linux for two and a half years at home,
two years at work. I've been active in my local linux users' group for
just over a year. I've written a few programs, and am part way through
packaging the distributed.net personal proxy for Debian (pending
approval for non-free distribution from distributed.net).
I've read the Debian Social Contract.
My PGP public key is attached, and also available as
<http://azure.humbug.org.au/~aj/aj_key.asc>.
If there's anything more you need to know, please email me.
Thanks in advance.
Cheers,
aj
-- 
Anthony Towns <aj@humbug.org.au> <http://azure.humbug.org.au/~aj/>
I don't speak for anyone save myself. PGP encrypted mail preferred.
On Netscape GPLing their browser:  How can you trust a browser that
ANYONE can hack? For the secure choice, choose Microsoft.''
        -- <oryx@pobox.com> in a comment on slashdot.org
Apparently that also means I’ve clocked up ten and a half years as a Debian user; I think my previous two years of Linux (mid-95 to mid-97) were split between Slackware and Red Hat, though I couldn’t say for sure at this point. There’s already been a few other grand ten-year reviews, such as Joey Hess’s twenty-part serial, or LWN’s week-by-week review, or ONLamp’s interview with Bruce Perens, Eric Raymond and Michael Tiemann on ten years of “open source”. I don’t think I’m going to try matching that sort of depth though, so here are some of my highlights (after the break).
Hrm, this is going on longer than I’d hoped. Oh well, to be continued!

David Moreno Garza: As it was expected, I moved from MovableType crazyness into Tumblr. Ha, so this is now a tumblelog...

As it was expected, I moved from MovableType crazyness into Tumblr. Ha, so this is now a tumblelog (the world of Intenet sometimes amazes me :P). And as it was expected I brough Blog::Normalize::Tumblr into life. Blog::Normalize is becoming a nice little toy I like to play with. My imported data came from MovableType which was came from Wordpress. Cleanly enough, I d be able to export Tumblr posts (or categories/tags or anything else in the future) into Wordpress again and that d be a nice circle. B::N::Tumblr was made, differently from the other blogging systems modules I created before, by scrapping, that s the transparency that the model of B::N would give users and developers. After I made the whole scrapping work, and by tracing my HTTP traffic, I realized that Tumblr has an API which allows to read and write posts, lol. I d be starting using it soonish and creating WWW::Tumblr, maybe even today. TextMotion support is also on the way. B::N 0.0rc2 should be mirrored by CPAN soon.

Runa Sandvik: Why arent we using doc-base?

In November 2007 Roberto C. Sanchez filed bug #451690 in irssi: Please include a doc-base registration file. Including this file isn’t that hard, and while reading the Debian doc-base Manual I found out that “Every Debian package that provides online documentation (other than manual pages) will register these documents to doc-base.” So, if a missing doc-base registration file is important enough for someone to file a bug on, why does my /usr/share/doc-base/ only contain 69 files compared to the 1444 files in /usr/share/doc/ ?

Lior Kaplan: Risk report: Three years of Red Hat Enterprise Linux 4


Mark J Cox, the Director of the Red Hat Security Response Team, published an update to RHEL 4 risk report:
Red Hat Enterprise Linux 4 was released on February 15th, 2005. This report takes a look at the state of security for the first three years from
release.
Two of the lines in the conclusion are:
A default installation of Enterprise Linux 4 AS was vulnerable to seven critical security issues over the first three years. A customised installation of Enterprise Linux 4, selecting every package, would have been vulnerable to 76 critical browser security issues, and 11 in non-browser packages in the three years.
But I doubt how many people use the default installation “as is” or are fulish enough in install everything. I would like to know the security effect of RHEL4 minimal installation, as this my way to install RHEL. It will also be interesting to see similar reports from other distributions, especially on the response times, as I guess most security issues are common anyway due to shared applications.

Steve Kemp: Where troubles melt like lemon drops

I've been re-reading RFC 2822 again over the weekend, for obvious reasons, and I'm amused I've not noticed this section in the past:
3.6.5. Informational fields
The informational fields are all optional. The "Keywords:" field contains a comma-separated list of one or more words or quoted-strings. The "Subject:" and "Comments:" fields are unstructured fields as defined in section 2.2.1, and therefore may contain text or folding white space.
subject  = "Subject:" unstructured CRLF
comments = "Comments:" unstructured CRLF
keywords = "Keywords:" phrase *("," phrase) CRLF
Now we all know that emails have subjects, but how many people have ever used the Keywords: header, or the Comments: one? It'd be nice if we could use these fields in mails - I can immediately think of "keywords" as tags, and I'm sure I'm not alone. I've looked at multiple "tags for mutt" systems, but all of them fall down for the same reason. I can add tags to a mail, and limit a folder to those mails that contain a given tag. But I cannot do that for multiple folders and that makes them useless :( Has anybody worked on a multi-folder tag system for Mutt? If so pointers welcome. If not I'd be tempted to create one. I guess implementation would be very simple. There are three caeses: The first two are easy. The second could be done by writing a cronjob to scan messages for Keyword: headers, and writing a simple index. That could then be used to populate an "~/Maildir/.tag-results" folder, via hardlinks, of all matching messages. Better yet you could pre-populate ~/Maildir/.tag-$foo containing each message with a given tag. Then theres no searching required! (Although your cronjob would need to run often enough when the tag were added to a message it would appear there within a reasonable timeframe. Update: I've written the indexer now. It works pretty quickly after the initial run, and is quite neat! tagging messages with mutt.

Neil Williams: Emdebian TDebs

A few clarifications on TDebs in Emdebian:

  1. Emdebian needs TDebs now and although discussed in Debian, there is no implementation at this time. Therefore, Emdebian has had to go ahead and implement what we need from TDebs in a manner that should be compatible with Debian TDebs when they eventually arrive.

  2. .mo files are architecture dependent and this is a problem for embedded devices, therefore the Emdebian TDeb support must take account of these problems whether or not Debian does so as well.

  3. Emdebian will continue to need to cross-build existing Debian packages and if that means regenerating the TDebs to ensure compatibility with embedded devices, that will be done too. It is quite likely as Emdebian will certainly be dropping translated manpages and other content of the proposed Debian TDebs.

  4. Emdebian TDebs - as the only implementation currently available - do not support anything except gettext. Again, Debian is likely to provide such support but it is not important to Emdebian because packages that do not use gettext are not in the package set likely to be useful on an embedded device.

  5. Tests on non-embedded boxes are irrelevant - yes, .mo files work on any Debian architecture that you care to mention. The problem is that the conversion that is so invisible on a desktop machine becomes a real problem on an iPAQ.

  6. I started off thinking that Emdebian TDebs could be Arch:all and the existing packages are Architecture: all but this is set to change. Please don't make the same mistake again and again.


I'm grateful to Frans for his comments during my FOSDEM talk - it will involve extra work to fix the Emdebian TDeb support but it is worthwhile.
Emdebian TDebs are just like Emdebian debs - they are customised versions using Emdebian methods that turn a stock Debian package into something suitable for embedded devices. Debian debs differ from Emdebian debs. Debian TDebs will (when they exist) differ from Emdebian TDebs but the principles of splitting out the .mo files and handling installation etc. are similar.
Packages files
Emdebian needs a different solution to the Debian method, at least initially - principally so that we can have a solution that works now, without extensive changes to the rest of Debian. That solution is available in Emdebian.
Selecting languages
The Debian TDeb proposed method is not implemented currently and GLib includes simple support for retrieving the list of languages selected. Again, Emdebian has implemented a solution that works now, not something that is only a proposal on a wiki page.
Eddy, AFAICT almost nothing has happened to bring TDebs to Debian since Debconf7 and until something concrete exists in Debian, Emdebian simply needs something that works - now.
So:
Q: Are .mo files architecture dependent?
A: Yes.

Q: Does it matter?
A: Yes, for embedded devices.

Q: What about this test or that test?
A: Irrelevant because the tests are done on Debian boxes that convert the data transparently, not an embedded device where the time delay would be problematic.

Q: The packages fill will explode!
A: Yes, it would but both Emdebian and Debian have solutions for this problem.

Q: How to select languages?
A: Normal methods using dpkg and locales, but these are also likely to be customised for embedded usage.

Q: Do tdebs support anything else than gettext?
A: No. Emdebian TDebs only support gettext until such time as Debian has a fully implemented solution that can be customised for embedded devices during the normal Emdebian cross builds.

Eddy Petri&#537;or: TDebs - arch is not important, is it?

Updates:
  1. the arch issue raised by Frans was not the object of my post. Also, not all points are invalid/reiterated, just the ones iterated here. Thanks Frans.
  2. add a note that there is an image that proves that .mo endianness is irelevant - usefull for readers that might miss that



While looking at Neil Williams' talk(hi-res/lo-res) from FOSDEM about cross building and tdebs I was STUNNED about the many (not all, thanks Frans) points that were reiterated during that talk when there were already answered.

Well, I guess you have to repeat yourself a lot to get your ideas through to the other side. So, let's do that.

All (except the first) of the following have been already answered one way or another on the TDebs wiki page.

Q: .mo files are arch independent or not? Neil asks again on his blog.
A: It doesn't matter, does it?


0 eddy@bounty ~ $ file /usr/share/locale/ro/LC_MESSAGES/wormux.mo
/usr/share/locale/ro/LC_MESSAGES/wormux.mo: GNU message catalog (big endian), revision 0, 228 messages
0 eddy@bounty ~ $ uname -a
Linux bounty 2.6.24.2-bounty #1 SMP Wed Feb 13 02:34:09 EET 2008 x86_64 GNU/Linux
(there is a picture here which proves my point, if you can't see it, click here).



Q: The packages file will explode
A: No, that's addressed.

Q: How do you select languages?
A: Simply use what we have and expand on that.

Q: Do tdebs support anything else than gettext?
A: Yes.

Patrick Winnertz: First pics from CLT08 online

After nearly 2 days I'll put some fotos of the CLT08 online. It's a quite cool event which many nice people and I'm pleased to meet them (again). :) In some minutes is the start of the social event, I'll hope it will be as good as the last year, which many very cool drinks ;-) Have fun to view the fotos! (Sorry for some not so good pictures :))

Lucas Nussbaum: mailing list for cross-distributions collaboration

A few months ago, I asked a set of questions on development mailing lists of a few GNU/Linux distributions. This resulted in very interesting discussions. As promised back then, all the answers from all distros I contacted can be read on the web or as an mbox file. Also, Freedesktop.org kindly agreed to host a mailing list to ease discussions between distributions, and act as a central point of contact. You can subscribe, and post to distributions at lists dot freedesktop dot org. This mailing list is for people involved (or interested) in the development of distributions. Questions that are on-topic are both technical and social/organizational issues, like: Off-topic stuff obviously include trolling about which distribution is the best one, or user support. Don’t hesitate to forward this announcement to all interested parties. Let’s make this mailing list something useful together! Also, I really apologize for procastinating announcing this list for sooo long. I’m really good at procastinating interesting stuff, it seems.

Eddy Petri&#537;or: Building in a sarge chroot might not always work

Adeodato correctly points out that building under a Sarge chroot, and expecting the package to work on Sid, might not always[1][2] work mainly because of ABI changes and similar changes. Thus, I am forced to clarify this a little.


Generally, the binaries in the packages we produce do not dynamically link to anything other than libc6, libstdc++5 (yes, 5, not 6) or some internal libraries, so we don't have to worry about ABI changes, at least, not yet.


So, a disclaimer is in order: unless you know what you're doing, you probably are better off building packages for each of the supported Debian distros.

Thanks Adeodato for the heads-up.

[1] unless your package is a special case
[2] or, better said, in most cases


udate: fixed the link to dato's post

Christian Perrier: ITP madness

I'm just back for 45 minutes during this week-end and seeing the ITP madness that currently floods -devel, I'm just getting mad about it. Debian seems to become crazy: we get people popping up and intending to package tons of varous things while dozens of our key packages are rotting in the BTS with bugs piling up over dust because they need new blod to clean them up and keep them alive. Please wake up: what about *maintaining* what we have right now instead of packaging the 42th lightweight HTTP daemon written in <insert obscure programming language name here> while everybody setting up a webserver just installs Apache? :-) PS: I knew I shouldn't have read mail...:-)

David Nusinow: Shell Scripting

I've never bothered to learn the gory details of shell scripting. This is somewhat embarrassing for me, although at the same time I don't feel like I've really suffered for the decision. I know enough of the basics to do some cool things (for loops, if tests and whatnot) but the the syntax is fraught with such problems that it feels like a waste of time to do more. Obviously, others have felt similarly, which is why perl was invented.

I've become more interested in it again recently though, mainly because I've been reading a lot of Kernighan. I don't want to deal with Bourne syntax though, which eliminates the only two shells I've ever spent serious time with in my life, bash and zsh, as well as ksh. I know csh scripting is considered harmful 'n shit, so that's right out.

Since I only want to shell script for local use, I don't need to worry about portability so I can try using more exotic shells. I'm also willing to script in a different language from the shell that I use, so the doors are really open. There's scsh if I want to write scheme, zoidberg if I want to write perl, rush if I want to write ruby.

What looked most appealing is rc though, which has a very nice Bourne-like syntax that's not nearly so warty. It was reimplemented before plan9 was released, and the reimplementation is in Debian, although I ran in to some undocumented differences with the plan9 version very fast. It may be worth trying out the plan9 version at this point to see how that goes.

Any other suggestions from the lazyweb are greatly appreciated. It'd be nice to have this aspect of my toolbox be more solid.

Jose Luis Rivas Contreras: New xscreensaver package!

Last night damog uploaded the latest package of xscreensaver to debian, version 5.04-3. This release comes with a lot of work from the new co-maintainer Tormod Volden who got the time to make the xscreensaver hacks compatible with gnome-screensaver trough desktop files, something I was avoiding because of my actual lack of time and other reasons. There're new split into gl-extra, data and data-extra, with GL hacks that consumes too much, default hacks and hacks that don't need graphic acceleration but consumes too much CPU or there's some reason why shouldn't go as default. You can make your deb package with the sources here, just dget the dsc file and build it inside your machine!

29 February 2008

Eddy Petri&#537;or: sarge + cowbuilder = love

Update:
A disclaimer/warning is needed: UNLESS you KNOW what you're doing, you probably are better off building packages for each of the supported Debian distros.


I know it sounds cheesy, but I couldn't find a better name.


At my workplace we are packaging software to work for as many distros as possible at one time. As a consequence the .deb packages we produce should work fine on all Debian distros: oldstable, stable, testing, sid.

To make sure we achieve that, we are building them in an oldstable chroot. OTOH, using pbuilder is very demanding on I/O, especially when entering the chroot and when exiting it. That slows down a lot the build system and is time to change that.


One reliable alternative is to use cowbuilder (part of cowdancer package). What is interesting is that cowbuilder relies on the existance of /usr/bin/cow-shell inside the chroot, so the cowdancer package needs to be installed both in the chroot and the host machine.

But cowdancer was not a part of sarge, so, if you try to create a new sarge cow directory with cowbuilder, it will fail at the end saying it didn't found the cowdancer package. Also trying to login via cowbuilder --login will complain it didn't found /usr/bin/cow-shell.


The fix for this is simple, once you figured it out and saw that cowdancer is available in sarge as a backport:
cowbuilder --create --distribution sarge --basepath /var/cache/pbuilder/sarge.cow --othermirror 'deb http://www.backports.org/debian sarge-backports main'
You may prefer to be sure that the only thing from backports is cowdancer and use a more hands-on approach[1]. Also, this will eliminate the need to correct later the apt sources to exclude backports[2].

Write the same command as before, but omit everything starting with --othermirror. Then install by hand the package in the chroot.
twix:/home/eddy# cowbuilder --create --distribution sarge --basepath /var/cache/pbuilder/sarge.cow
twix:/home/eddy# chroot /var/cache/pbuilder/sarge.cow
twix:/# wget http://ftp.de.debian.org/backports.org/pool/main/c/cowdancer/cowdancer_0.23~bpo.1_i386.deb
twix:/# dpkg -i cowdancer_0.23~bpo.1_i386.deb
twix:/# rm cowdancer_0.23~bpo.1_i386.deb
twix:/# exit
twix:/home/eddy# cowbuilder --update


Since after the bootstrap all .deb packages will be in the apt cache in the chroot, you might want to save some disk space:
twix:/home/eddy# cowbuilder --login --save-after-login
twix:/# aptitude clean
twix:/# exit

That's it!


If anything is broken somehow, missing or whatnot, cowbuilder --login --save-after-login is your friend.

[1] the initial bootstrap does not pull from backport anything else but cowdancer
[2] since you want to compile for plain sarge, not sarge+backports ;-)

Next.

Previous.