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

Re: How to handle multiple versions of binaries



On Sun, Dec 12, 1999 at 05:13:27PM -0800, ferret@phonewave.net wrote:
> > Also, if the minimal game dataset does need to be customized before use,
> > /usr/share/doc/<pckage>/examples sounds right to me -- throwing them in
> > /usr/lib/<package> and requiring customization Just Seems Wrong -- they
> > really *are* examples.
> Thing is, the dataset will be copied in under
> /usr/local/games/<package>/<foo>/
> and a local configuration file generated there. That's why putting it
> under documentation looked wrong to me.

[See also below]

Your package should make no assumptions about the existence of
/usr/local; it's entirely at the discretion of the sysadmin what to
put there.  *If* there is an appropriate file there, it should be used
in preference/addition to the one in /usr, but your package must
function perfectly without it.

Configuration files *must* go in /etc and be marked as conffiles or
otherwise handled carefully (see policy (version >= 3.1.0.0) section 4.7).

Your program cannot assume that /usr/(share/)doc exists.  If it needs
to read these configuration files, they should go in /usr/share/<pkg>
or /usr/lib/<pkg> or /etc (or /etc/<pkg>) depending on whether they
are locally configurable and if not, then whether they are
architecture independent.  Have a look at the FHS
(/usr/share/doc/debian-policy/fhs/fhs*) for details of this.

> > > The script to start the server by hand will go in /usr/bin/, and can also
> > > be started automatically at runlevel. I would like to place the ELF
> > > binaries under /usr/lib/<package>

Yes, that's correct.

> > > I've read through the packaging manual, and might be a little confused,
> > > but it didn't seem quite clear on just where to put these.
> > > If /usr/lib/<package> isn't the right place, where is? They need to be
> > > somewhere not on PATH and under a subdir.

You need to also look at policy, in the debian-policy package, and at
the Filesystem Hierarchy Standard, found in the debian-policy package.
Easy, isn't it?!

> > > Also, I will be packaging up a minimal game dataset for the server, and I
> > > want to have a script the admin can use to copy it somewhere under
> > > /usr/local/games and customise it. Where should I install the sample
> > > dataset? The manual seems to indicate /usr/share/doc/<package>/examples,
> > > but that doesn't seem right to me in this case. My gut feeling is
> > > /usr/lib/<package>/<base dataset> because it isn't meant to be
> > > used before customisation.

If the dataset is architecture independent, as it probably is if it is
modifiable, then you should be using /usr/share/<pkg> and
/usr/local/share/<pkg> rather than the lib directories.

What happens if the sysadmin installs the package and isn't interested
in customising it for the users?  Is there a default dataset?  Is
there a search path to look through?

   Julian

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

  Julian Gilbey, Dept of Maths, QMW, Univ. of London. J.D.Gilbey@qmw.ac.uk
        Debian GNU/Linux Developer,  see http://www.debian.org/~jdg
  Donate free food to the world's hungry: see http://www.thehungersite.com/


Reply to: