Re: Debian packaging

From: Christian Holm Christensen <cholm_at_nbi.dk>
Date: Tue, 26 Jul 2005 22:59:46 +0200


Hi Ricardo,

On Sat, 2005-07-23 at 09:19 -0400, Ricardo Yanez wrote:
> Hi Christian,
>
> I have the 4.04.02 source, downloaded CVS-wise yesterday. I ran,
>
> build/package/lib/makedebdir.sh
> fakeroot debian/rules debian/control
>
> Next I do a
>
> fakeroot debian/rules binary

...
> This is clearly NOT related to your automatic debianization script.
>
> Nevertheless, I've been trying to compile and debianize your way to put
> ready-to-ship packages in my site, but the error above has prevented me
> from doing so.

Fair enough.

> Question. Why don't YOU make packages and put them in a site for
> distribution?

I don't have the publicly available disk space to host an APT mirror of ROOT. Simple as that.

> Sorry to say, but the scripts are cumbersome. You need to
> figure out libraries and such needed for compilation. Moreover, you need
> to have some experience debianizing. For example, the package debhelper
> needs to be installed, which is not installed in your system by default.

The package `debhelper' is a package that is used by almost all source packages in the Debian archives, so it's fair to assume that exists on a Debian system that wants to make packages. I think it's actually documented in README/INSTALL file. If not, it should be.

> Just to make a point, I uninstalled from my system all develepment
> packages and additional libraries not part of my normal system. Then I
> tryed to compile root, using the scripts.
>
> -----
> $ build/package/lib/makedebdir.sh
> $ fakeroot debian/rules debian/control
> Making debian/control (special)
> $ fakeroot debian/rules binary
> Making debian/libroot.postinst from debian/libroot.postinst.in
> Making debian/root-bin.menu from debian/root-bin.menu.in
> Making debian/root-cint.postinst from debian/root-cint.postinst.in
> Making debian/root-cint.postrm from debian/root-cint.postrm.in
> Making debian/root-cint.prerm from debian/root-cint.prerm.in
> Making debian/root-proofd.init from debian/root-proofd.init.in
> Making debian/root-proofd.postinst from debian/root-proofd.postinst.in
> Making debian/root-rootd.init from debian/root-rootd.init.in
> Making debian/root-rootd.postinst from debian/root-rootd.postinst.in
> Making debian/root-xrootd.init from debian/root-xrootd.init.in
> Making debian/ttf-root-installer.postinst from
> debian/ttf-root-installer.postinst.in
> Making debian/ttf-root-installer.prerm from
> debian/ttf-root-installer.prerm.in
> dh_testdir
> # Add here commands to configure the package.
> ./configure --prefix=/usr \
> --mandir=/usr/share/man/man1 \
> --docdir=/usr/share/doc/root \
> --cintincdir=/usr/lib/root/cint \
> --etcdir=/etc/root \
> --with-sys-iconpath=/usr/share/pixmaps \
> --enable-table --enable-ruby --enable-qt --enable-pythia
> --enable-xrootd --enable-shared --enable-soversion --enable-explicitlink
> --disable-rpath --disable-afs --disable-srp --disable-builtin-freetype
> --disable-builtin-afterimage
> Configuring for linux
> Disabling enable_rpath
> Disabling enable_afs
> Disabling enable_srp
> Disabling enable_builtin_freetype
> Disabling enable_builtin_afterimage
> Checking for libX11 ... no
> configure: libX11 (package x11-devel) MUST be installed
> make: *** [config.status] Error 1
> -----
>
> I figure out the dev packages I need by an iterative try-and-fail
> procedure. The packages, in sequence, I need to pass the fist hurdle,
> that is configure, are:
>
> libx11-dev, libgd2-xpm-dev
>
> and dependencies. I don't know the outcome of this yet because of the
> compilation error mentioned above. Point is though that you need some
> experience packaging.

When you do

	build/package/lib/makedebdir.sh
	fakeroot debian/rules debian/control

The directory `debian' is made, and the file `debian/rules' contains the field `Build-depends', which lists the packages you need to install on your system. Note, that what exactly is in that field, and exactly which packages are listed in `debian/control' depends on what you have on your system. For example, if you have `-lmysqlclient' on your system, and `configure' would find it, then the package `libmysqlclient-dev' will be listed in the field `Build-depends', and there'll be a stanza for the package `root-plugin-mysql' in `debian/control'. If, on the other hand, `-lmysqlclient' isn't found by `configure', the package `libmysqlclient-dev' will not be in the Build-depends field, nor will there be a stanza for `root-plugin-mysql'.

To see exactly what packages would be build at a given system, do

        ./configure --pkglist

That'll give you a list of the packages possible to build on your system.

If, for some reason, configure has determind that it can build a package, but it has picked up a library from somewhere non-standard, the line

        fakeroot debian/rules binary

should complain about missing packages, and list exactly which packages is missing. If that doesn't do it, try

        dpkg-buildpackage -r fakeroot

(actually, `make debian' uses `dpkg-buildpackage', which is part of `dpkg').

I don't see how that requires any particular knowledge about building Debian packages. You need to know how to install packages, and how to issue

        make debian

That's it. :-) From that, you get the largest sub-set of available packages, possible to make on your system.

> So, my proposal is: What if you made the packaging and ask people around
> the world to distribute your packages?

That could work.

> I'll be happy to accomodate your
> packages in my site, any way you want them, as I'm sure a lot of people
> out there also would.

Tell me where to FTP/SCP/... them!

> You could have a master site from which Root
> mirrors sync. You could even ask people to make special DNS entries like
> root.myown.domain (I could) and maintain an official list of mirrors for
> people to consult before installing.

Why not just add entries to `apt-get.org'? :-)

Of course, in the long run, it would be better if someone (me?) became an official Debian maintainer, and uploaded ROOT into Debian proper. If only there was 25 hours to a day.

> A happy thought.

Sure is. :-)

Yours,

-- 
 ___  |  Christian Holm Christensen 
  |_| |  -------------------------------------------------------------
    | |  Address: Sankt Hansgade 23, 1. th.  Phone:  (+45) 35 35 96 91
     _|           DK-2200 Copenhagen N       Cell:   (+45) 24 61 85 91
    _|            Denmark                    Office: (+45) 353  25 404
 ____|   Email:   cholm_at_nbi.dk               Web:    www.nbi.dk/~cholm
 | |
Received on Tue Jul 26 2005 - 23:00:08 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:11 MET