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

Re: xattr.h wonkiness



On Fri, Mar 7, 2014 at 12:31 AM, Serge Hallyn <serge.hallyn@ubuntu.com> wrote:
> Quoting Carlos O'Donell (carlos@systemhalted.org):
>> On Thu, Mar 6, 2014 at 6:06 PM, Serge Hallyn <serge.hallyn@ubuntu.com> wrote:
>> > Quoting Carlos O'Donell (carlos@systemhalted.org):
>> >> On Fri, Feb 21, 2014 at 6:42 PM, Serge Hallyn <serge.hallyn@ubuntu.com> wrote:
>> >> > Hi, would a simple patchl ike this to misc/sys/xattr.h be
>> >> > acceptable?  This showed up in a failure to build (of at least
>> >> > qemu, and aiui lots of other pkgs) after merging a new libcap2
>> >> > where sys/capability.h #included linux/xattr.h.  It's being
>> >> > worked around by patching libcap2 to #include sys/xattr.h
>> >> > first, but presumably this will cause other breakages.
>> >>
>> >> Please follow the accepted practice for fixing coordination between
>> >> userspace and Linux kernel headers.
>> >>
>> >> Upstream glibc and the Linux kernel have already worked out a
>> >> mechanical solution to this problem, and we need people to work out
>> >> the patches and post them upstream.
>> >>
>> >> The solution is to coordinate the conflicting headers following this template:
>> >> https://sourceware.org/glibc/wiki/Synchronizing_Headers
>> >
>> > Thanks for the information.  I tested the two patches at
>> > http://people.canonical.com/~serge/xattr-kernel-libc-fix/ and they
>> > seem to do the right thing.  I'll send them out if they look ok.
>>
>> Let me warn you that the glibc patch won't get accepted as-is.
>>
>> You are adding a #ifdef for a Linux-specific define in OS-agnostic code.
>>
>> Look at: https://sourceware.org/ml/libc-alpha/2013-08/msg00209.html
>>
>> See how we adjust a Linux-specific header to define an OS-agnostic
>> variable to use in the OS-agnostic code e.g. __USE_FOO.
>
> There isn't currently a bits/xattr.h file.  Would it be preferred that
> I create one, or that I just set __USE_KERNEL_XATTR_DEFS in the
> linux kernel header?

I don't know, you'll have to take a stab at an implementation and see
what upstream likes.

I haven't reviewed this thoroughly so I can't comment yet.

Cheers,
Carlos.


Reply to: