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

Re: Geant4 unofficial Debian package repository rearranged



Brett Viren wrote:
"Kevin B. McCarty" <kmccarty@Princeton.EDU> writes:

Sorry, Geant4 release 8.2 has not yet been packaged.

Not to give you pressure, but do you have an estimate when you might
package it?

Hi Brett,

I really cannot say -- it depends both on how much free time I have in the coming weeks, and on how different the source tree is between 8.1.p02 and 8.2. (For the latter point, it seems that upstream has rewritten at least the hadronic physics lists build infrastructure completely.)

Also, how difficult would it be to allow multiple versions to be
installed, including the -dev and -header packages?  For example, you
could install headers and libraries in versioned directories and use
the /etc/alternatives mechanism to point to the default?

The thought has occurred to me but I hadn't yet done any detailed thinking about how to arrange this. So the following is all off the top of my head.

As you say, it seems that to install all the packages in parallel, they would need to put libs and headers in versioned directories (with each library directory adding itself to /etc/ld.so.conf), and the best objects to control via /etc/alternatives would be the scripts /usr/share/geant4/sh-scripts.d/g4base.sh which sets $G4INSTALL, and /usr/share/geant4/sh-scripts.d/g4include.sh which sets $G4INCLUDE. I guess I would have to break up the geant4-common package into a non-version-dependent component (that would keep the same package name) and a version-dependent package such as "geant4-8.2-common".

The other thing that would require some care is the /usr/sbin/install-geant4-data script. If one invokes it, it tries to install the optional data files (such as G4EMLOW, etc.) based on versioning information given in /etc/install-geant4-data.conf. I have no idea how backward-compatible these data files are; the default data file versions used by Geant4 change between Geant4 versions.

An additional difficulty is that different Geant4 versions depend upon different CLHEP2 versions, and those packages (which I am not the maintainer of) are not currently parallel-installable either. No idea how to fix this without asking the CLHEP2 unofficial package maintainer to make aesthetically ugly changes that are unlikely ever to be accepted in Debian. (OK, there are some *really* hideous hacks that I could do, such as having geant4 postinst scripts copy CLHEP2 libraries and headers to a private Geant4 location, and in the postrm delete the private copy ...)

Thinking ahead a bit farther in the future, if we ever want to see Geant4 in Debian proper (or at least non-free), the basic long-term issues are these:

1) Making Geant4 versions installable in parallel unavoidably requires aesthetically ugly packaging changes in both Geant4 and CLHEP2. 2) Debian, if Geant4 is ever accepted into it, is unlikely to tolerate more than a single Geant4 (or CLHEP2) version in the repository at once. At absolute most they may tolerate two versions at a time if it is hard for users to transition between them (e.g. see exim3 and exim4). 3) Because of (2), I suspect Debian (specifically, FTP masters) is not going to be convinced that the ugly changes in (1) are necessary. 4) Therefore, to have Geant4 in Debian and simultaneously have differently-versioned parallel-installable unofficial Geant4 packages, I would need to maintain two sets of package infrastructure. 5) I don't even want to imagine the complications that will be needed to make sure it is possible to switch cleanly between the "official" Debian version and the unofficial versioned packages ...

The reason I ask is that when a new version comes out we want to
validate that it hasn't changed in an unknown way.  This typically
means compiling simulations code against both versions and running
them side-by-side.

Completely understood. Making it possible to track different Geant4 releases by switching lines in /etc/apt/sources.list was at least a first step toward this goal.

Let me suggest a couple of hacks for the moment that you're probably already well-aware of.

First possibility. Suppose you're initially using Geant4 8.1.p02 and intend to keep using it for a while. With the rearrangement I made to the Geant4 unofficial repo, your /etc/apt/sources.list line should probably read:

deb http://borex.princeton.edu/~kmccarty/ unstable geant4-8.1.p02

(If it reads "geant4" instead of "geant4-8.1.p02", you are probably not as concerned with backward compatibility and repeatability.)

You run all the tests you need to, saving the results somewhere safe.

Once you start looking into upgrading Geant4, you change the sources.list line to the newer version, e.g. (once the 8.2 packages are ready)

deb http://borex.princeton.edu/~kmccarty/ unstable geant4-8.2

then apt-get update, install the new 8.2 packages, and run the same tests. (be sure to recompile all the test programs first!) Now you can compare the sets of test results.

Granted, it is quite annoying to keep installing huge .debs every time you switch between versions. The easiest fix would be to save the .deb files locally or install them via an apt-proxy server. The recompilation step has to be done in any case, of course.

The second possibility is of course to install one of the two Geant4 versions on each of two otherwise-identical machines. If they both have /home mounted by NFS (or whatever), it's pretty easy to work on one and have an ssh session running on the other simultaneously.

Hope this is somewhat helpful.

best regards,

--
Kevin B. McCarty <kmccarty@princeton.edu>   Physics Department
WWW: http://www.princeton.edu/~kmccarty/    Princeton University
GPG: public key ID 4F83C751                 Princeton, NJ 08544



Reply to: