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

Re: Bug#29454: libtricks does not support lchown+alpha fix



 > 
 > Thanks for bringing that to my attention.
 > I'm not sure what to do -- will Debian-potato come with the new
 > (2.2) Kernel and latest glibc, or will we still use 2.0 etc?

I overlooked the situation in the bug report: the Debian/Alpha for
various reasons has already changed chown to lchown in relevant
programs (mostly dpkg for instance), and modified chown
semantic in the libc to follow POSIX semantics (thus breaking binary
compatibility, but for Alpha that was not judged so important), thus
we have diverge from the i386 port as to what means chown.

 > Your lchown function I can add without any damage. But if we
 > use the old kernel/glibc in potato, the chown function should
 > do xstat().

Do you mean lxstat instead (as it was until now)?

I guess the current situation is:
i386 needs lxstat in chown
i386 apps do not use yet lchown (but it is best to add it now)
alpha needs lxstat in lchown
alpha needs xstat in chown ( if we leave it to the same as
lchown, most application would still works, but that would
introduce an semantic difference which is bad).

Would Is is possible at this point to make the chown behaviour depend on:
"#ifdef __alpha__".

That would ensure the right property which is:
" on  every arch, libtricks is consistent with the behaviour of the
libc"


Regards,

Loic

P.S: I am not sure how the transition will be done on i386:

The transition will probably be smooth:

- All apps use chown for now.

- The libc will make lchown and chown have identical behaviour for a
while (detecting at compilation-time if it is build with 2.0 or 2.1
headers to make the right syscall, on Alpha the checks are at runtime
ecause the syscalls numbers changed for OSF compatibility reasons).
 libtricks will be consistent by having a lchown function identical to 
chown.

- When such a libc has been generalized, applications can be converted
to lchown when it is actually what they where meaning.

- When this in turn is done, chown can be converted inside the libc to
the real POSIX chown behaviour. At this point the chown behaviour of
libtricks should be changed to use xstat (but for Alpha this is needed
now). If this last step is done at the same time than 2.1, this would
avoid ever breaking binary compatibility (maybe doing the same thing
on Alpha would have avoided some headaches, POSIX is important in
general, but for the particular case of chown which is used by just a
couple of programsm binary compatibility is far more important).





Regards,

Loic


Reply to: