[vtkusers] Improving VTK packages: some suggestions. [long]

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Fri Nov 24 03:38:00 EST 2000


hi,

This whole discussion between David and me made me think about the way
VTK is packaged for linux (I dont know about the other Unices).  I
have a few thoughts to share.

Since I am familiar with making both debs and rpms I will first
mention some things about packaging

  (1) It is relatively easy to package software that builds cleanly
  using configure/make and that has a correctly configured make
  install.  One justs does the appropriate configure with the right
  switches, and does make install with the appropriate --prefix tag
  (so one does not stomp over files in /usr etc.).  Then one splits
  all the files into logically grouped packages (fairly straight
  forward).

  (2) For large packages it is a little more painful because one has
  to split the files for each package.

  (3) For things like python/java bindings additional care has to be
  taken.  Similarly for the examples and html docs.

  (4) Finally, one has to do ldconfig and other things _after_ the
  installation is finished.  Usually accomplished by postinst scripts
  in debian and in %post <package> in rpms.


The current problems with packaging VTK:

   (1) VTK is a huge package and requires quite a few things to be
   installed before one can compile it _completely_.  This is normally
   handled by adding BuildPrereq's (already done - so not really a
   problem).

   (2) Each packaging format has its idiosyncrasies.  But they share
   the same philosophy and building a package with good self
   configuration and make install is relatively painless.

   (3) VTK, currently, is designed to compile relatively easily (if
   the required components are installed and user.make is correct).
   But is not at all designed to *install* cleanly.  This is just as
   important as building the sources.  Consequently, the package
   maintainer has to figure out lots of things for {him,her}self,
   usually at the cost of a fresh build which normally takes quite a
   few hours.  Each mistake costs a rebuild which is why it is a such
   a pain to maintain large packages and which is why no one save a
   few have bothered to package VTK.


The ideal situation that any packager would like with VTK:

   (1) Fix VTK's makefile install rules to do everything correctly.
   To accomplish this in a "portable" manner we could do the
   following:

       (a) Just as we ask for PYTHON_INCLUDES etc. in user.make we
       should have other variables that tell make where to install the
       libraries etc.  Like 

       PYTHON_VER=1.5
       PYTHON_PACKAGE_DIR=lib/python$(PYTHON_VER)/site-packages/
       PYTHON_LIB_DIR=lib

       DOC_DIR=share/doc/vtk/
       EXAMPLE_DIR=share/doc/vtk/

       etc.  Leaving out the trailing /usr/ would enable "Build
       Rooting".  So normal users would just say 

       ./configure --prefix=/usr/local/  --with-blah-blah

       And make install would install stuff where necessary.
       Packagers would change the prefix to the temporary dir.  Other
       Unix users would also appreciate this kind of feature.

       By doing this we have one user.make file that is user
       configurable which does *everything* correctly - just as the
       user requests.  This makes packaging very easy.

       (b) Add rules to the make files to 

	   (i) install examples appropriately.

	   (ii) make proper html documentation - we could add
	   Sebastien Barre et. al.'s excellent scripts (his doxyfile
	   is already in CVS) to the source tree and use it for a make
	   docs.  Or use vtkHTML. 

	   (iii) Add rules to extract the directory info from
	   user.make and install the docs, examples also
	   appropriately.

	   (iv) Add rules to make install each library and its modules
	   correctly as desired in user.make

	   (v) Fix all permission related problems etc.

       
Since I just finished making debs from the CVS source tree I remember
the changes that I made, so it would be easy for me to help with this
task.  It should not be too hard to do it correctly.  I dont have CVS
write access but could collaborate with David or anyone else on this.

I just want to ask the powers that be if the above plan sounds ok.  If
it does I will certainly be glad to help.

Looking forward to making make install, clean. ;)

thanks,
prabhu




More information about the vtkusers mailing list