CDBS help/short tutorial wanted

Cesare Tirabassi norsetto at ubuntu.com
Wed Oct 24 20:47:15 BST 2007


On Wednesday 24 October 2007 18:02:43 Kyle Elbert wrote:

> Hello, I'm interested on becoming a packager and keep hearing about cdbs,
> I've checked out some of the documentation and controls and rules files
> from some packages but havn't really found out how to use it.

Perhaps its not really helping you, but I think that to really understand cdbs 
it helps to consider what is under the hood.
If you look at the files that we include with the usual statements, those in 
the /usr/share/cdbs/1/ directories, you will see that these are the usual 
makefiles, and contain no less/no more than:

1) a list of specific variables, that might be used from debian/rules to 
control the behaviour of cdbs

2) a list of rules, which are automatically called at appropriate steps

What these rules will do depends on the specifics, but in general they will:

- check some pre-requisites or variables
- call a number of debhelper scripts

For instance, if you check the /usr/share/cdbs/1/rules/debhelper.mk file, you 
will see:

A list of variables, first general, second specific to this makefile.
You will find some very good comments about what each of these variables will 
contain and usually the effect they will have. Suppose that you have a 
problem with the way cdbs calls dh_shlibdeps for a certain foo package in 
your source package. By looking at the list you will find a nice variable, 
DEB_DH_SHLIBDEPS_ARGS_foo, that you can use to pass specific argument to this 
call which will hopefully solve your problem.

After this, you will basically find a general purpose debian/rules, a bit like 
what dh_make will make, but with a logic already implemented.

Cesare



More information about the Ubuntu-motu-mentors mailing list