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

Re: Starting packaging VistA (Re: LSM in Geneva)

Hi Andreas,

Here is an update on the status of packaging VistA.

Short version :

                        It is almost done !    :-)

Long version:

0) First needs to install the fis-gtm package.

1) get-orig-source is doing:

   Getting two tar files:

  - One with the source code and data from VistA-FOIA
  - Another with the build infrastructure of OSEHRA

Then it puts both together into a single "vista" directory,
and adds two files:

   - One with all the VistA routines ( "routines.ro" )
   - Another one with the list of globals ( "globals.lst" )

Finally, it packages all into a single file:


where the broad structure is

    vista/                     <--  OSEHRA support files
    vista/VistA-FOIA  <--  Actual VistA Sources
    vista/VistA-FOIA/Packages/  <--- The bulk of it.

The "routines.ro" file is a bit redundant with the
actual .m files that are in the Packages subdirectory,
but... putting in the source vista_1.0.orig.tar.gz  file
makes a lot easier the subsequent steps.

In any case, routines.ro is only 93Mb,
out of the 1.1Gb size of what will be packaged...   :-)

2) Expanding this file, and copying inside of  it,
    the "debian" directory, we can now build the
    package by doing the usual.


3) The build process goes as follows:

3.1)  In dh_auto_configure it uses CMake,
        and sets the location of:

    - the VistA instance ( var/lib/vista )
    - the VistA-FOIA sources
    - the binary dir for CMake

3.2)  In dh_auto_install, it invokes python scripts
         from the OSEHRA infrastructure, that import
         into the VistA instance, the routines and globals.

        This results in instance of size:

881M    var/lib/vista/g
146M    var/lib/vista/r
4.0K    var/lib/vista/inet/Logs
8.0K    var/lib/vista/inet
992K    var/lib/vista/o
1.1G    var/lib/vista
1.1G    var/lib
1.1G    var

3.3)  Then the debuild process creates the package:




A)  Getting the source tar files was timing out for me
      when using wget to get them from github, so,
      just to move faster, I put two copies in a pub file
      server at Kitware, and kept downloading from it.
      This is a temporary solution.

      We could simply post these two file at OSEHRA,
      or we could figure out how to make wget behave
      more reliably when downloading from github.

      We could also release the files in Sourceforge.

      Other ideas / options are welcome...

B)  The build takes long... but it is justified, it moves
      around ~1.5Gb of routines and data a couple
      of times.  So, expect 30min to 1hour to build.

C)  The final package:


       Is not including the "var/lib/vista" directory.     :-(

       Here is what I get with the command

          sudo dpkg --contents vista_1.0_amd64.deb

drwxr-xr-x root/root         0 2012-07-07 16:14 ./
drwxr-xr-x root/root         0 2012-07-07 16:14 ./usr/
drwxr-xr-x root/root         0 2012-07-07 16:14 ./usr/share/
drwxr-xr-x root/root         0 2012-07-07 16:14 ./usr/share/doc/
drwxr-xr-x root/root         0 2012-07-07 16:15 ./usr/share/doc/vista/
-rw-r--r-- root/root      1028 2012-07-07 15:41 ./usr/share/doc/vista/changelog.gz
-rw-r--r-- root/root      3045 2012-07-07 14:43 ./usr/share/doc/vista/README.Debian
-rw-r--r-- root/root       707 2012-07-07 14:43 ./usr/share/doc/vista/copyright

I'm probably missing to specify that "/var/lib/vista"
must be included in the package...

Any hints on how I could do that ?

D)  GTM when compiling .m files, includes the full path
      to the .m file in the resulting .o files. This is done to
      support a function called $TEXT(...), that in M returns
      the lines of code of a routine (sort of introspection).


      Given that some .o files are created during the
      packaging process, they have the full path of
      the build directory, not the one of the directory
      where they will be installed (/var/lib/vista/r)

      We faced that challenge when packaging fis-gtm,
      and it was addressed by Brad King adding a feature
      to the gtm command line, to make possible to provide
      an extra path to be inserted in the .o file.

      We now need to figure out how to take advantage
      of that added feature, when we compile .o file during
      the process of packaging VistA.

       The good news here is that:

         a) The feature if already there (Thanks Brad !)

         b) During the packaging only 60 files (.o) are
              compiled. Not all the 25,130 routines...    :-)

       We can add this as a final step of the auto_install

E)    I haven't done anything on the front of creating
        a "vista" Linux user, and a "vista" Linux group.

        I need to learn how to do that. (pointers or
       examples to other packages that do such things
       will be appreciated.



Reply to: