Subject: /usr/local (again)

From: Richard Kaszeta <[email-masked]>
Date: Mon, 26 Aug 1996 14:06:03 -0500

Just an idea, no flames, etc intended:

Could maintainers who have packages that create directories/etc in
/usr/local make sure they do it in a way that is friendly to
nfs-mounted /usr/local?

Example:

On all of our debian 1.1 machines, /usr/local is an nfs mounted
directory, and on all but one of these machines it is mounted
root-squash for security reasons.  Attempting to install packages
with components in /usr/local (usually empty directories) fails on
these machines:

bash# dpkg -i emacs*
(Reading database ... 23142 files and directories currently installed.)
Preparing to replace emacs (using emacs-19.34-1.i386.deb) ...
Unpacking replacement emacs ...
dpkg: error processing emacs-19.34-1.i386.deb (--install):
 failed to rmdir/unlink `/usr/local/lib.dpkg-new': Permission denied
Setting up emacs-el (19.34-1) ...
Errors were encountered while processing:
 emacs-19.34-1.i386.deb

Since packages generally don't install anything other than empty dirs
in /usr/local, can't this be handled in a way that makes it easier for
those of us trying to maintain many debian machines?

-- 
Richard W Kaszeta 			Graduate Student/Sysadmin
[email-masked]			University of MN, ME Dept
http://www.menet.umn.edu/~kaszeta

---

From: Dominik Kubla <[email-masked]>
Date: Tue, 27 Aug 1996 15:49:43 +0200

>>>>> Richard Kaszeta writes:

> Just an idea, no flames, etc intended: Could maintainers who have
> packages that create directories/etc in /usr/local make sure they do
> it in a way that is friendly to nfs-mounted /usr/local?

I second that! AMOF i did bring that up some time ago, but somehow we
couldn't find a common policy.

Dominik
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Visit the FAN SITE of the WORLD LEAGUE OF AMERICAN FOOTBALL:
<A HREF="http://www.uni-mainz.de/~kubla/WLAF/Welcome.html>HTTP</A> or
<A HREF="file:/afs/zdv.uni-mainz.de/homes/UFO/kubla/public_html/WLAF/Welcome.html">AFS file</A> access.

---

From: Rob Browning <[email-masked]>
Date: 27 Aug 1996 11:30:42 -0500

> couldn't find a common policy.

I was under the impression that either:

a) The package would ask about touching /usr/local the first time it
was installed.  After that it would know better :>

b) The package would provide a small script "foo-pkg-setup-local" that
could be run by hand to set up /usr/local.

c) There would be an /etc/usr-local or /etc/default/usr-local file that
would indicate what should always be done about /usr/local/ for this
machine.

I sort of thought we had settled on (a).  Although I would normally
expect /usr/*local* to be local, I don't see any reason not to be
friendly to unusual setups especially in the case of (c) where it
doesn't cost anything, assuming the base package puts in a reasonable
default.

(Plus there's always the restriction from the file system standard
that /usr/local be left alone.)

--
Rob

---

From: Richard Kaszeta <[email-masked]>
Date: Tue, 27 Aug 1996 12:47:00 -0500

>doesn't cost anything, assuming the base package puts in a reasonable

Well, in my case it is local, as in "local to the site".  On many unix
installations it is not uncommon for /usr/local to be a nfs mount.

Besides, aren't we supposed not make assumptions about /usr/local at
all (according to FSSTND/FHS)?

---

From: Ian Jackson <[email-masked]>
Date: Sat, 31 Aug 96 14:15 BST

Richard Kaszeta writes ("/usr/local (again)"):
...
> those of us trying to maintain many debian machines?

Section 3.2.9 of the policy manual may be informative.

I haven't implemented the required feature for dpkg yet.

Ian.

  3.2.9 /usr/local - for the use of the system administrator           
   
   As mandated by the FSSTND no package should place any files in        
   /usr/local, either by putting them in the filesystem archive to be 
   unpacked by dpkg or by manipulating them in their maintainer scripts.
   
   Every package that searches a number of directories or files for     
   something (for example, looking for shared libraries in /lib or       
   /usr/lib) should search an appropriate directory in /usr/local too.   
   
   In order that the system administrator may know where to place   
   additional files a package should create an empty directory in the    
   appropriate place in /usr/local by supplying it in the filesystem
   archive for unpacking by dpkg. The /usr/local directory itself and all
   the subdirectories created by the package should have permissions 2775
   (group-writeable and set-group-id) and be owned by root.staff.        

   In the future it will be possible to tell dpkg not to unpack files 
   matching certain patterns, so that system administrators who do not
   wish these directories in /usr/local do not need to have them.