Re: rsync over lan
On Wed, 10 Sep 2008 15:17:57 +0000
Tzafrir Cohen <tzafrir@cohens.org.il> wrote:
> Be careful with fakeroot:
> tzafrir@sweetmorn:~$ ls -l /etc/ | grep -v root
> total 2156
> -rw-r----- 1 asterisk asterisk 4500 2008-08-12 23:31 amportal.conf
> drwxrwxr-x 4 asterisk asterisk 4096 2008-09-10 13:57 asterisk
> -rw-r----- 1 mpd audio 8037 2008-01-30 05:25 mpd.conf
> drwxr-x--- 2 partimag partimag 4096 2008-08-31 21:02 partimaged
> tzafrir@sweetmorn:~$ fakeroot ls -l /etc/ | grep -v root
> total 2156
You're pointing out that within fakeroot, all files that have been
created normally (before fakeroot has started) will show up as
root:root; this is explained in the manpage, IIUC:
> LIMITATIONS
...
> open()/create()
> fakeroot doesn’t wrap open(), create(), etc. So, if user joost does either
>
> touch foo
> fakeroot
> ls -al foo
>
> or the other way around,
>
> fakeroot
> touch foo
> ls -al foo
>
> fakeroot has no way of knowing that in the first case, the owner of foo really should be joost
> while the second case it should have been root. For the Debian packaging, defaulting to giv‐
> ing all "unknown" files uid=gid=0, is always OK. The real way around this is to wrap open()
> and create(), but that creates other problems, as demonstrated by the libtricks package. This
> package wrapped many more functions, and tried to do a lot more than fakeroot . It turned out
> that a minor upgrade of libc (from one where the stat() function didn’t use open() to one with
> a stat() function that did (in some cases) use open()), would cause unexplainable segfaults
> (that is, the libc6 stat() called the wrapped open(), which would then call the libc6 stat(),
> etc). Fixing them wasn’t all that easy, but once fixed, it was just a matter of time before
> another function started to use open(), never mind trying to port it to a different operating
> system. Thus I decided to keep the number of functions wrapped by fakeroot as small as possi‐
> ble, to limit the likelihood of ‘collisions’.
In any event, the file I mentioned in my OP, the fakeroot README.saving,
specifically discusses using fakeroot with rsync, and some pitfalls
associated with doing so.
> Tzafrir Cohen | tzafrir@jabber.org | VIM is
Celejar
--
mailmin.sourceforge.net - remote access via secure (OpenPGP) email
ssuds.sourceforge.net - A Simple Sudoku Solver and Generator
Reply to: