Re: How to put files at a location determined at install-time.

2002-01-02 Thread Chad C. Walstrom
On Mon, Dec 31, 2001 at 07:09:41PM +0100, Marc L. de Bruin wrote:
 On my system, I have hde1 (mounted as /), and md0 (hde2+hdg1, mounted as
 /raid1). The home-dirs are on /raid1/home and I have a symlink /home -
 /raid1/home (this probably is a bad thing, I know).

No, this isn't necessarily bad. However, why don't you specify the location of
your home directories for specific accounts in your /etc/passwd, and specify
your default home directory in the user management utilities?  If you use
/raid1/home as your home directory, you won't need to rely upon symbolic links
and your applications will have one less system call to make for each home
directory file access.

Alternatively, look into Linux LVM (http://www.sistina.com/lvm).  It's current
release is quite up to date in the 2.4.16+ kernels, and I believe there's a
current package in Debian for lvm tools.  You can logically manage your raid1
partition into multiple, growable/shrinkable logical paritions/filesystems.

Also, you could use the mount --bind option to use 2.4.x VFS.

bash# mount --bind /raid1/home /home

 So, the root-user might want the files to be physically installed on 
 /raid1, e.g. /raid1/mydata, so that a user blah (/raid1/home/blah) can 
 make a hardlink from /raid1/home/blah/afile to /raid1/mydata/afile.

This sounds like a broken software package if it depends upon hardlinks.
Hardlinks should be used with caution and only under specific circumstances.  A
good example is linking a file under multiple directories on the same
filesystem when the directories are used as a form of data organization.  (For
example, the MH Rand email format.)

Additionally, user home directories should not be touched by a Debian
installation package.  When the user uses this application, why does it not
search a predefined path for files?  Is there no $APPSHARE variable or
configuration option for a user-based RC file (~/.apprc)?  Is there no
default RC file for the application in /etc/package/config?

Could you provide the user with this functionality?  Could upstream?

-- 
Chad Walstrom [EMAIL PROTECTED] | a.k.a. ^chewie
http://www.wookimus.net/| s.k.a. gunnarr
Get my public key, ICQ#, etc.  Send email w/the Subject: get help




Re: How to put files at a location determined at install-time.

2002-01-01 Thread John H. Robinson, IV
On Mon, Dec 31, 2001 at 07:09:41PM +0100, Marc L. de Bruin wrote:
 
 Therefore it is up to the root-user (and his filesystem) where the files 
 should end up after installation.
 
 Is this possible? Thanks again,

if this is the case, then i would strongly recomend distributing it as a
tarball, and allowing the admin to extract wherever it is required. the
drawback is that after an upgrade, the admin would have to manually
extract the tarball.

now, if you debconf from the admin where the tarbal should be extracted
to, you can query that, and extract in post-inst with no further
interaction.

so, i guess the answer is yes: distribute the data as a taball, and
query the admin as to where to extract it to. you may even want to rm
the tarbal after extraction.

-john




Re: How to put files at a location determined at install-time.

2002-01-01 Thread Goswin Brederlow
John H. Robinson, IV [EMAIL PROTECTED] writes:

 On Mon, Dec 31, 2001 at 07:09:41PM +0100, Marc L. de Bruin wrote:
  
  Therefore it is up to the root-user (and his filesystem) where the files 
  should end up after installation.
  
  Is this possible? Thanks again,
 
 if this is the case, then i would strongly recomend distributing it as a
 tarball, and allowing the admin to extract wherever it is required. the
 drawback is that after an upgrade, the admin would have to manually
 extract the tarball.
 
 now, if you debconf from the admin where the tarbal should be extracted
 to, you can query that, and extract in post-inst with no further
 interaction.
 
 so, i guess the answer is yes: distribute the data as a taball, and
 query the admin as to where to extract it to. you may even want to rm
 the tarbal after extraction.

Why not use one directory in a standard place, like
/lib/share/package/. If the admin doesn't like the data there he can
link that dir to another place or mount a partition there.

The problem with having it in a random place is finding it again,
especially when the previous admin runs away to a better paid job and
you are left with the remains.

MfG
Goswin




Re: How to put files at a location determined at install-time.

2002-01-01 Thread Craig Sanders
On Mon, Dec 31, 2001 at 07:09:41PM +0100, Marc L. de Bruin wrote:
 So, the root-user might want the files to be physically installed on
 /raid1, e.g. /raid1/mydata, so that a user blah (/raid1/home/blah)
 can make a hardlink from /raid1/home/blah/afile to
 /raid1/mydata/afile.

if the local sysadmin wants this, then they can move-and-symlink the
directories to wherever they want.

e.g. say your package uses /var/foo, but the sysadmin wants that data to
be in /raid1/home/foo:

mv /var/foo /raid1/home/   # alternatively use cp -af or tar 
   # followed by rm -rf
ln -s /raid1/home/foo /var/


this doesn't require any weird or special-case handling in the package.
it's a fairly normal systems administration task.  for example, it's not
at all uncommon to move-and-symlink /usr/doc and /usr/share/doc to
another partition when the /usr partition is too small.

craig

-- 
craig sanders [EMAIL PROTECTED]

Fabricati Diem, PVNC.
 -- motto of the Ankh-Morpork City Watch




Re: How to put files at a location determined at install-time.

2001-12-31 Thread Alexander Kotelnikov
 On Mon, 31 Dec 2001 02:23:55 +0100
 Marc == Marc L de Bruin [EMAIL PROTECTED] wrote:
Marc 
Marc So, to be more precise: debconf asks the user for that location, and
Marc puts it in the debconf-database at myapp/thelocation. Now, when
Marc installing mydata.deb, it should read the myapp/thelocation variable
Marc and install the files from within mydata.deb at that specific location.
Marc 
Marc The main question is: is it possible and if so, how to do it?

May be you should use symbolic links? I.e. install yourdata to fixed
directory, /usr/share/yourdata/, probably, and  then create symlinks
from there using debconf.

-- 
Alexander Kotelnikov
Saint-Petersburg, Russia




Re: How to put files at a location determined at install-time.

2001-12-31 Thread Marc L. de Bruin
David Z Maze wrote:
Marc L de Bruin [EMAIL PROTECTED] writes:
MLdB What I am trying to build are a couple of packages (let's call one of
MLdB these mydata.deb) containing just ordinary files, related to a
MLdB specific application. All these packages Depend on a generic
MLdB configuration package. This configuration package determines the final
MLdB location of these ordinary files by asking the user via
MLdB debconf.
Why do these files not have a specified location?  

Because their location depends on the lay-out of the filesystem of a 
specific system. It is getting more complicated now, but one of the 
requirements is that the root-user should at least have the choice to 
put these files on the same filesystem as the 'home' filesystem, because 
in that case, users can make hardlinks to these files from their own 
home directories. This is an important feature for the usage of the files.

On my system, I have hde1 (mounted as /), and md0 (hde2+hdg1, mounted as 
/raid1). The home-dirs are on /raid1/home and I have a symlink /home - 
/raid1/home (this probably is a bad thing, I know).

So, the root-user might want the files to be physically installed on 
/raid1, e.g. /raid1/mydata, so that a user blah (/raid1/home/blah) can 
make a hardlink from /raid1/home/blah/afile to /raid1/mydata/afile.

Therefore it is up to the root-user (and his filesystem) where the files 
should end up after installation.

Is this possible? Thanks again,
Marc.



Re: How to put files at a location determined at install-time.

2001-12-30 Thread David Z Maze
Marc L de Bruin [EMAIL PROTECTED] writes:
MLdB What I am trying to build are a couple of packages (let's call one of
MLdB these mydata.deb) containing just ordinary files, related to a
MLdB specific application. All these packages Depend on a generic
MLdB configuration package. This configuration package determines the final
MLdB location of these ordinary files by asking the user via
MLdB debconf.

Why do these files not have a specified location?  The two cases I can
think of are (a) you're installing something that's system-wide, in
which case you can just pick a location as the package maintainer, or
(b) you're installing something that potentially multiple users would
want to use.  In the case of (a), I'd just unpack under
/var/lib/genericpackage, and then use a symlink or Apache
configuration or whatever to tell whatever it is that uses the files
where they actually are.  For something that multiple users could
potentially want to use, really the best thing to do is provide a
tarball in the package, and let the end-user be responsible for
unpacking it where they feel is appropriate; this is the approach the
various kernel module packages use.

-- 
David Maze [EMAIL PROTECTED]  http://people.debian.org/~dmaze/
Theoretical politics is interesting.  Politicking should be illegal.
-- Abra Mitchell




Re: How to put files at a location determined at install-time.

2001-12-30 Thread John H. Robinson, IV
On Sun, Dec 30, 2001 at 11:03:15PM -0500, David Z Maze wrote:

 For something that multiple users could potentially want to use,
 really the best thing to do is provide a tarball in the package, and
 let the end-user be responsible for unpacking it where they feel is
 appropriate; this is the approach the various kernel module packages
 use.

that _some_ of the various kernel module packages use.

-john