[Gnewsense-dev] MIT SIPB IAP 2009 Debian Packaging course notes
From:
Daniel Clark
Subject:
[Gnewsense-dev] MIT SIPB IAP 2009 Debian Packaging course notes
Date:
Wed, 7 Jan 2009 10:53:31 -0500
Possibly interesting to gNewSense developers because MIT has something called debathena, which is an MIT-specific (graphics, alternative packages, the whole 9 yards) layer on top of several Debian and Ubuntu GNU/Linux distributions. So on a technical level it is very simular to gNewSense in a few ways.
In theory I'll clean this up when I get back from vacation and post it somewhere publically wiki-rific... Until then most useful are probably just the http:// references to their doc / the class slide show.
One thing specifically gNewSense-related that came out of this is that if we want to do better tracking of upstream packages, we really need version numbers like -XubuntuYgnewsenseZ (where X is the debian revision, or "0" if the package isn't in debian; "Y" is the ubuntu change number against the debian revision or "0" if the package isn't in ubuntu; and "Z" is the gnewsense change number).
To build a package: debuild -us -uc "-i -I" -- don't include version control files (.svn etc) -- See also debathena doc.
Can ignire changelog-should-mention-nmu and source-nmu-had-incorrect-version-number
"missing-build-dependancy" *does* matter
aptitude show build-essential --> shows what the packages are that you prob don't need to specify in depends.
dpkg -c -->> what does this do?
make file not installing your files? Use dh_install 1: use the command line: dh_install yada.so lib/security 2: look at file to do it - more normal (in man page of the debhelper util - "man dh_install") - so
debian/packagename.install looks like:
pam_afs_session.so lib/security
man page install: dh_installman ; so packagname.manpages like:
man_page_name.5
invirt - behind xvm invirt-vnc-client
(has patches dir under debian - via quilt) - handles a series of patches that should be installed in a certain order. ~/.quiltrc need certain line - see debathena doc
quilt new {patchname} quilt edit (to edit a file under a certain patch) -- IMPORTANT
quilt pop (-a for all) quilt push (-a for all)
other trick you need to use: add include /usr/share/cdbs/1/rules/patchsys-quilt.mk in your debian/rules file
install/yada:
(look in it) -- to doa mod before deiified
DEB_PYTHON_SYSTEM=pysupport (sipb prefers this to pycentral - may be push to merge the 2)
debathena-quota
DEB_AUTO_UPDATE_DEBIAN_CONTROL = 1 (need to have a control.in file with @cdbs@)
- catch is that it is very frowned upon by debian archive maintainers because it changs source package at build time. debathena may be removing it soon. DO NOT USE - ENDS UP JUST BEING CONFUSING
if confifure.in but no configure - DEB_AUTO_UPDATE_AUTOCONF = 1 - has to be *before* include
ALSO debhelper.mk needs to be included before other things.
common-install-impl:: target (reference cdbs doc)
---> buildcore.png -- get a massive poster of this
In debathena, clean:: target is often used to try to restore orignial package state - eg rm configure
To see if got right: use debdiff (two .deb files), will tell you how they differ.
Can also diffstat - see if need to work on clean target.
debathena often has ~debian4.0 to end of string to make them all be able to be in same apt repository. ~ = binary nmus -- WEIRD sorting in debian on tilde. Followed by other things also strange. Odd.
+ = specific to env version
QUESTION: how does debuild differ from dpkg-buildpackage?
debuild creates all the files necessary for uploading a Debian package. It first runs dpkg-buildpackage, then runs lintian and/or linda on the
.changes file created (assuming that lintian and/or linda is installed), and finally signs the .changes and/or .dsc files as appro- priate (using debsign(1) to do this instead of dpkg-buildpackage(1)
itself; all relevant key-signing options are passed on). Parameters
Double colon rule can have multiple times - cdbs only uses :: rules so you can always add more. </pre>