[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Dropping emsource and replacing emdebuild

The experimental way of building packages for Crush is intended to use
more standard Debian methods and emdebian-tools can be slimmed down if
we agree that using standard Debian methods means that the tools do
little or no hand-holding apart from the small areas where Emdebian
differs from Debian. This should dramatically reduce the dependencies
of the emdebian-tools packages.

It means more tools, each one smaller than the previous ones and doing
only one part of the job. This could / should make it easier to build
new wrappers around our tools as well as easier to omit certain tools
as appropriate. However, it also means that there won't be a single
just-build-it script - there isn't one for Debian either. (The tools
that do something like it just use apt-get source and that is the
way Crush is heading too.)

Having the entire debian/ (or for native entire source) in SVN means
that emsource doesn't need to do complicated things, so it could be
much smaller:

# fail if parsechangelog fails
parsechangelog >/dev/null
SRC=`LC_ALL=C parsechangelog |grep Source|sed -e 's/Source: //';`
VER=`LC_ALL=C parsechangelog |grep Version|sed -e 's/Version: \(.*\)\(em1\)*$/\1/'|sed -e 's/\-.*//'`
# call our own build-dep check based on dpkg-checkbuilddeps
if [ ! -d ../tarballs/ ]; then
	svn mkdir ../tarballs
	svn propset svn:ignore * ../tarballs/
if [ ! -f "../tarballs/${SRC}_${VER}*orig.tar.gz" ]; then
# this script always builds with the source
svn-buildpackage -sa -uc -us ${ORIG} --svn-postbuild=${WRAP} --svn-rm-prev-dir

That ../tarballs conditional is only needed when the script is being
used with packages that are new to this method.

The build is also native at this stage - the cross-building I aim to do
by using normal Debian tools in a special chroot. The source itself can
be obtained using apt-get source or routine pbuilder methods. I don't
intend to use svn-buildpackage or the above wrapper when cross-building
although svn-buildpackage can cross-build OK. It's just too many
dependencies inside the chroot.

The script itself doesn't handle SVN directly (that added a lot of code
to the old version) - that is left entirely to the developer. This
means that Crush will no longer insist on a "trunk" directory -
wherever you choose to checkout the Emdebian SVN is where the package
gets built. You can choose to checkout all packages for Crush or just
the ones you want.

The wrap-lintian tool actually does two things;

1. Processes the built packages using emgrip with vendor support.
2. Runs lintian with (updated) lintian support just for our Policy.

(That could end up as two scripts itself but the majority of the code
in the tool is actually to identify the .changes file and that would
need to be duplicated or put into a library/module.) The svn version of
wrap-lintian.pl may get renamed so that there's a simple way of tacking
it onto dpkg-buildpackage to post-process a normal build for Crush.
(That will be needed in the cross-chroot too but it's fairly trivial -
just pass the .changes file to emgrip and move the files around.)

Also new is embuilddeps which takes the code out of emdebuild
--build-deps to make it easier to use with svn-buildpackage and

emdebuild itself could be dropped or could be retained (in /usr/share)
to retain the wrappers that some packages may still need. However,
there's no guarantee that any of such packages will still build.

This should dramatically reduce the amount of code in the
Emdebian::Tools module and drop all the debconf questions along
with /etc/emsource.conf.

I'll use Debian experimental for this transition. Various stages will
need experimental support from multistrap and the cross stuff will
depend on Goswin's apt changes which I'll try and package and upload
into the Emdebian toolchain repository. Maybe this will remove the
apt-cross dependency too.

So a minor update of emdebian-tools heading into unstable (2.1.3), a
major update with lots of breakage heading into experimental (2.2.x).

I'll put embuilddeps and wrap-lintian.pl (or whatever it ends up being
named) into unstable (2.1.3) so that people can start to migrate away
from emdebuild - use emdebuilddeps instead of emdebuild --build-deps
and then use dpkg-buildpackage -a $arch instead of emdebuild -a $arch.

(Note the lack of a space in the command line option.)


Neil Williams

Attachment: pgpghARktscAx.pgp
Description: PGP signature

Reply to: