Home page > Debian > What’s this thing with CDBS ?

What’s this thing with CDBS ?

Friday 16 July 2010, by Toots

What’s this thing with CDBS that makes people so angry at it ? I can understand that one may not like that it is a bunch of makefiles, but, hell, the whole makefile system is obscured all the way, so I guess those people NEVER write (complex) makefile.. :-)

More seriously, I have used CDBS for years, I’ve always been very happy with it. I understand that some people prefer other solutions, but it does not mean that there should be a war between this or that. Those are simply personal options/opinions et c’est tout !

8 Forum messages

  • What’s this thing with CDBS ? Le 16 July 2010 à 06:38 , by Onkar

    I agree with you. I find CDBS quite helpful to quickly create packaging. I usually work with java packages and when they use ant as build tool nothing beats CDBS (with ant rules).

    CDBS existed long before dh7 shaped up and it works well. So even I don’t understand this dislike for CDBS.

    Reply to this message

  • What’s this thing with CDBS ? Le 16 July 2010 à 09:32 , by algernon

    My dislike towards CDBS comes from experience with trying to customize packages for $work.

    Customising plain old debian/rules without DH or CDBS is the easiest thing in the world. Classic debhelper is fairly easy too: it’s well documented, and there’s little DWIM in there.

    DH7 and CDBS are a pain in the backside: a twisty maze of makefiles and black magic. It might be easy for people who understand it, who have worked with it for long.

    But for me, who only wants to tweak the package a little and be done with it - no thanks. I prefer things I can look at and understands two years from now. Things I can understand fairly easily without prior experience.

    CDBS is not like that, unless one keeps using it for those two years, which I certainly don’t plan to, as package customisation is just a tiny part of what I do, something I’d rather avoid in the first place.

    Reply to this message

  • What’s this thing with CDBS ? Le 16 July 2010 à 09:48 , by Mark Purcell

    I have found that cdbs is really useful for simplifying and fixing mistakes in what have been otherwise complex debian/rules. But you are correct people either love it or hate it which I don’t understand.

    What I also don’t understand is that dh 7 also is great for simplifying and fixing mistakes in complex debian/rules files, but it doesn’t seem to have the baggage and is better accepted, although on the face they are both very similar.

    As a result, I, like a lot of Debian am migrating towards dh 7.

    Reply to this message

  • What’s this thing with CDBS ? Le 16 July 2010 à 09:52 , by Enrico Zini

    I also don’t have a problem with CDBS. I even find it simpler to customise than dh7 in some cases, and reading the CDBS makefiles themselves is not particularly hard.

    I guess it is as you say, that people are just not used to complex makefiles.

    Reply to this message

  • What’s this thing with CDBS ? Le 16 July 2010 à 12:01 , by mirabilos

    Well, I *do* hack on complex Makefiles, for example this one:
    https://www.mirbsd.org/cvs.cgi/port...

    Still don’t like cdbs… it’s doing a lot of magic without clearly showing
    what (e.g. with BSD ports, you need to set a lot of variables still).
    And dh5 style is more “obvious”, despite being longer.

    Plus, I’ve seen (not in pkg-mw) a lot of baaaad cdbs using packages,
    and cases where using cdbs made e.g. fixing autoconf *much* harder.

    Reply to this message

  • What’s this thing with CDBS ? Le 16 July 2010 à 20:35 , by Joey Hess

    A package using CDBS can need to use any of 125-odd environment variables. Many of them not documented except for in the code. Some perhaps not intended as user-configurable variables (but how to tell). So the problem is not complex Makefiles, but the submarine complexity of having a special variable that covers every possible use case — iff you only know about it.

    dh 7 reduces that to four commands, one switch (—with) and the concept that dh runs sequences of commands in a good order automatically, and that if you need something unusual in place of any command, you add a dh_override_dh_ target. Try explaining the entirity of cdbs in a sentence like that. While I suppose it’s possible to not want to learn those few things to be able to use dh 7, I don’t think it’s possible to make it any simpler than it is.

    Aside: There are some things to be said against complex Makefiles. Not long Makefiles, or Makefiles with many targets, but truly complex Makefiles suffer from make’s many lacks as a general-purpose programming language. I think it’s important to recognise that Makefiles were intended to be basically simple, and strive to keep them that way.

    Reply to this message

  • What’s this thing with CDBS ? Le 17 July 2010 à 21:54 , by mirabilos

    Another thing… dh5 beats cdbs (don’t know about dh7) in the speed regard
    on slow machines/qemu: for example, in mediawiki-extensions, it calls
    dpkg-* -p«packagename» for every package, whereas with dh5 I usually
    call it dpkg-* once. The overhead of all the dpkg-* commands (which run
    other dpkg-* commands internally, several times shell and/or perl) is
    amazing e.g. with aurel32’s qemu-mips packages.

    Reply to this message

Reply to this article