[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC] stowfs translators architecture and parameters
From: |
Gianluca Guida |
Subject: |
[RFC] stowfs translators architecture and parameters |
Date: |
Fri, 17 Dec 2004 21:33:27 +0000 |
Hello,
after a week spent on thinking about the way we could sanely develop
the stowfs translators, I came up with the following idea, which I am
going to implement if people reading this will like it.
In my thoughts, stowfs will be a translator to be set in /stow or any
directory containing links to packages directory.
We could run an example stowfs like this:
# settrans -capfg /stow /hurd/stowfs -T /hurd/unionfs \
-d /bin bin -d /sbin sbin -d /lib lib local/lib
With this command line, the stowfs translator will set three other
translators:
1) in /bin: /hurd/unionfs /stow/pkg1/bin /stow/pkg2/bin ...
2) in /sbin: /hurd/unionfs /stow/pkg1/sbin /stow/pkg2/sbin ...
3) in /lib: /hurd/unionfs /stow/pkg1/lib /stow/pkg1/local/lib /stow/pkg...
where pkg1, pkg2, ... are the packages installed on the system.
When a new package is installed, new directories to merge will be
added runtime as argument to the translators in /bin, /sbin, /lib.
When removed we can add the option -r followed by the name of
the directory to be removed. Unionfs support this syntax already.
That's not all. On previous threads there was a talking about the
need to do smarter-than-just-union merge on certain files, like the
ones in /etc.
As Alfred suggested, it would be much better to have a smarter and
specific translator, e.g. "/hurd/etcfs" than include these rules in a
generic stowfs.
This "etcfs" could accept a syntax compatible with the unionfs one,
so that we could set our stowfs to resolve in a clever way conflicts
on /etc files with this:
# settrans -capfg /stow /hurd/stowfs -T /hurd/unionfs \
-d /bin bin -d /sbin sbin -d /lib lib \
-T /hurd/etcfs -d /etc etc
This will infact set -- together with all the others -- the /hurd/etcfs
translator in /etc, passing it as arguments the etc directory entries
in the packages tree.
What I like of this approach is that makes the stowfs a
not-so-complicated translator with a very specific goal and that
other specific translators can be added to manage special
directories or even single files.
I hope I had been clear enough.
Gianluca
--
It was a type of people I did not know, I found them very strange and
they did not inspire confidence at all. Later I learned that I had been
introduced to electronic engineers.
E. W. Dijkstra
- [RFC] stowfs translators architecture and parameters,
Gianluca Guida <=