DragonFly BSD
DragonFly kernel List (threaded) for 2004-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Unionfs etc Re: Packaging


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 11 Mar 2004 18:37:21 -0800 (PST)

:# mkdir /tmp/a
:# mount_union /tmp/a /usr/local
:
:works fine and if I create a file in /usr/local it gets "really"
:created in /tmp and is only visible there after umounting /usr/local
:-- just what I wanted.  However,
:
:# mount_union /tmp/a /
:says 
:mount_union: /tmp/a (/usr/tmp/a) and / (/) are not distinct paths
:
:Is there a way around this?  I ask because I'd rather not assume
:anything about PREFIX, and I'd like this to be usable for
:badly-behaved installers that put stuff into other places like /etc,

    Well, /tmp/a on top of / creates a recursion within unionfs, which is
    why it is not allowed.  Actually, the more interesting mount is:

    mount_union -b / /tmp/a

    Which would create an image of the entire filesystem in /tmp/a, suitable
    for chroot'ing into /tmp/a.   But this is not currently allowed either.

    If you (or someone) would like to fix this, I think it's a fairly simple
    matter to have unionfs detect the recursion (e.g. /tmp/a/tmp/a) and
    disallow access to it.

    This would make unionfs a *very* powerful tool.

:Another question: the FreeBSD porters' handbook requires you to create
:a directory tree first in your temporary install directory when
:building pkg-plist, and add any newly created directories to pkg-plist
:with a @dirrm -- is this really necessary?  It seems to me that we can
:just make pkg_delete (or its successor) remove any empty directories
:it finds after deleting files, including /usr/local/share or other
:"standard" places -- there's no reason to have these directories if
:there's nothing in them.
:
:Rahul

    I don't know the answer to the second question.

					-Matt
					Matthew Dillon 
					<dillon@xxxxxxxxxxxxx>



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