All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Bug#531950: attr: FTBFS on GNU/kFreeBSD
       [not found] <1450746396.6081061244543230576.JavaMail.root@mail-au.aconex.com>
@ 2009-06-09 10:31 ` Nathan Scott
  2009-06-09 11:35   ` Petr Salinger
  0 siblings, 1 reply; 10+ messages in thread
From: Nathan Scott @ 2009-06-09 10:31 UTC (permalink / raw)
  To: Christoph Hellwig, Petr Salinger, agruen; +Cc: xfs


----- "Christoph Hellwig" <hch@infradead.org> wrote:

> On Tue, Jun 09, 2009 at 10:03:28AM +1000, Nathan Scott wrote:
> > Could someone verify and merge this patch?  It looks OK to
> > me.
> 
> Andreas now takes care ot attr.  Btw, the submitter should stop that
> stupid GNU wanking - errnos are defined by the kernel so it's a
> FreeBSD issues and has nothing to do with their glibc abuse.

Hmm, I'm not sure what you mean there.  AIUI, this code
(strerror_ea) is working around Linux's lack of an ENOATTR
error code ... and on FreeBSD there really is an ENOATTR
(and no ENODATA?)  Perhaps a better fix in this case may be
to map strerror_ea directly to strerror for all platforms
except Linux?

  const char *strerror_ea(int err)
  {
-       if (err == ENODATA)
+       if (err == ENOATTR)
                 return _("No such attribute");
         return strerror(err);
  }


BTW, which git tree is the canonical acl/attr tree now Andreas?
Is it one of the kernel.org ones (which path?)?  thanks.

cheers.

-- 
Nathan

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Bug#531950: attr: FTBFS on GNU/kFreeBSD
  2009-06-09 10:31 ` Bug#531950: attr: FTBFS on GNU/kFreeBSD Nathan Scott
@ 2009-06-09 11:35   ` Petr Salinger
  2009-06-09 12:10     ` Christoph Hellwig
  0 siblings, 1 reply; 10+ messages in thread
From: Petr Salinger @ 2009-06-09 11:35 UTC (permalink / raw)
  To: agruen, Christoph Hellwig; +Cc: 531950-quiet, Nathan Scott, xfs

Hello.

>> Andreas now takes care ot attr.  Btw, the submitter should stop that
>> stupid GNU wanking - errnos are defined by the kernel so it's a
>> FreeBSD issues and has nothing to do with their glibc abuse.
>
> Hmm, I'm not sure what you mean there.  AIUI, this code
> (strerror_ea) is working around Linux's lack of an ENOATTR
> error code ... and on FreeBSD there really is an ENOATTR
> (and no ENODATA?)  Perhaps a better fix in this case may be
> to map strerror_ea directly to strerror for all platforms
> except Linux?

The problem is that there is no ENODATA errno value defined
on GNU/kFreeBSD. The errno values are determined by kernel,
they are the same as on plain FreeBSD, used libc
implementation does not change it.

Another possibility is to use patch bellow.
Does it looks acceptable for you ?

Thanks
 	Petr


only in patch2:
unchanged:
--- attr-2.4.43.orig/getfattr/getfattr.c
+++ attr-2.4.43/getfattr/getfattr.c
@@ -93,8 +93,10 @@

  const char *strerror_ea(int err)
  {
+#ifdef ENODATA
         if (err == ENODATA)
                 return _("No such attribute");
+#endif
         return strerror(err);
  }

only in patch2:
unchanged:
--- attr-2.4.43.orig/setfattr/setfattr.c
+++ attr-2.4.43/setfattr/setfattr.c
@@ -66,8 +66,10 @@

  const char *strerror_ea(int err)
  {
+#ifdef ENODATA
         if (err == ENODATA)
                 return _("No such attribute");
+#endif
         return strerror(err);
  }

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Bug#531950: attr: FTBFS on GNU/kFreeBSD
  2009-06-09 11:35   ` Petr Salinger
@ 2009-06-09 12:10     ` Christoph Hellwig
  2009-06-14 16:35       ` Aurelien Jarno
  0 siblings, 1 reply; 10+ messages in thread
From: Christoph Hellwig @ 2009-06-09 12:10 UTC (permalink / raw)
  To: Petr Salinger; +Cc: Christoph Hellwig, 531950-quiet, xfs, Nathan Scott

On Tue, Jun 09, 2009 at 01:35:58PM +0200, Petr Salinger wrote:
> The problem is that there is no ENODATA errno value defined
> on GNU/kFreeBSD. The errno values are determined by kernel,
> they are the same as on plain FreeBSD, used libc
> implementation does not change it.
>
> Another possibility is to use patch bellow.
> Does it looks acceptable for you ?

This one looks better to me, except that I would really make this
an explicit #ifdef __linux__.  The lack of a proper ENOATTR is
a Linux specific quirck and not related to the presence of
non-standard ENODATA.  Maybe also add a little comment why
we're doing this so people don't get confused by it.

Btw, how does libattr actually work for you on FreeBSD?  Last time
I checked FreeBSD had slightly different xattr system calls that (just
like IRIX) used an integer namespace value instead of the string prefix
in Linux.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Bug#531950: attr: FTBFS on GNU/kFreeBSD
  2009-06-09 12:10     ` Christoph Hellwig
@ 2009-06-14 16:35       ` Aurelien Jarno
  2009-06-14 20:33         ` Christoph Hellwig
  0 siblings, 1 reply; 10+ messages in thread
From: Aurelien Jarno @ 2009-06-14 16:35 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: 531950-quiet, xfs, Nathan Scott, Petr Salinger

On Tue, Jun 09, 2009 at 08:10:42AM -0400, Christoph Hellwig wrote:
> On Tue, Jun 09, 2009 at 01:35:58PM +0200, Petr Salinger wrote:
> > The problem is that there is no ENODATA errno value defined
> > on GNU/kFreeBSD. The errno values are determined by kernel,
> > they are the same as on plain FreeBSD, used libc
> > implementation does not change it.
> >
> > Another possibility is to use patch bellow.
> > Does it looks acceptable for you ?
> 
> This one looks better to me, except that I would really make this
> an explicit #ifdef __linux__.  The lack of a proper ENOATTR is
> a Linux specific quirck and not related to the presence of
> non-standard ENODATA.  Maybe also add a little comment why
> we're doing this so people don't get confused by it.
> 
> Btw, how does libattr actually work for you on FreeBSD?  Last time
> I checked FreeBSD had slightly different xattr system calls that (just
> like IRIX) used an integer namespace value instead of the string prefix
> in Linux.
> 

When not on Linux, libattr uses the GNU libc functions instead of the
system calls. The GNU libc then translates that into FreeBSD syscalls
including the integer namespace value.

-- 
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Bug#531950: attr: FTBFS on GNU/kFreeBSD
  2009-06-14 16:35       ` Aurelien Jarno
@ 2009-06-14 20:33         ` Christoph Hellwig
  2009-06-14 20:56           ` Aurelien Jarno
  0 siblings, 1 reply; 10+ messages in thread
From: Christoph Hellwig @ 2009-06-14 20:33 UTC (permalink / raw)
  To: Aurelien Jarno
  Cc: Christoph Hellwig, 531950-quiet, Nathan Scott, Petr Salinger, xfs

On Sun, Jun 14, 2009 at 06:35:17PM +0200, Aurelien Jarno wrote:
> When not on Linux, libattr uses the GNU libc functions instead of the
> system calls. The GNU libc then translates that into FreeBSD syscalls
> including the integer namespace value.

Maybe you'd be better off not doing a double translation by using
the raw syscalls from libattr..

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Bug#531950: attr: FTBFS on GNU/kFreeBSD
  2009-06-14 20:33         ` Christoph Hellwig
@ 2009-06-14 20:56           ` Aurelien Jarno
  2009-06-15  9:42             ` Christoph Hellwig
  0 siblings, 1 reply; 10+ messages in thread
From: Aurelien Jarno @ 2009-06-14 20:56 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: 531950-quiet, Nathan Scott, Petr Salinger, xfs

On Sun, Jun 14, 2009 at 04:33:09PM -0400, Christoph Hellwig wrote:
> On Sun, Jun 14, 2009 at 06:35:17PM +0200, Aurelien Jarno wrote:
> > When not on Linux, libattr uses the GNU libc functions instead of the
> > system calls. The GNU libc then translates that into FreeBSD syscalls
> > including the integer namespace value.
> 
> Maybe you'd be better off not doing a double translation by using
> the raw syscalls from libattr..
> 

Would such a patch be accepted more easily than the ENODATA patch?

-- 
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Bug#531950: attr: FTBFS on GNU/kFreeBSD
  2009-06-14 20:56           ` Aurelien Jarno
@ 2009-06-15  9:42             ` Christoph Hellwig
  2009-06-15 10:26               ` Petr Salinger
  0 siblings, 1 reply; 10+ messages in thread
From: Christoph Hellwig @ 2009-06-15  9:42 UTC (permalink / raw)
  To: Aurelien Jarno
  Cc: Christoph Hellwig, 531950-quiet, Nathan Scott, Petr Salinger, xfs

On Sun, Jun 14, 2009 at 10:56:28PM +0200, Aurelien Jarno wrote:
> Would such a patch be accepted more easily than the ENODATA patch?

I don't think it's an except but in addition.  Wherever we do a strerror
in the attr code we will have to special case ENODATA on Linux and only
there.  Independent of that I think we would better of using the raw
syscalls in platforms already using binary namespaces rather than double
translation.  Note that this is only applicable for the IRIX-heritage
attr_* routines exports by libattr, not the *xattr routines it also
exports.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Bug#531950: attr: FTBFS on GNU/kFreeBSD
  2009-06-15 10:26               ` Petr Salinger
@ 2009-06-15 10:05                 ` Aurelien Jarno
  2009-06-19 15:37                 ` Andreas Gruenbacher
  1 sibling, 0 replies; 10+ messages in thread
From: Aurelien Jarno @ 2009-06-15 10:05 UTC (permalink / raw)
  To: Petr Salinger; +Cc: Christoph Hellwig, 531950-quiet, Nathan Scott, xfs

On Mon, Jun 15, 2009 at 12:26:12PM +0200, Petr Salinger wrote:
>> On Sun, Jun 14, 2009 at 10:56:28PM +0200, Aurelien Jarno wrote:
>>> Would such a patch be accepted more easily than the ENODATA patch?
>>
>> I don't think it's an except but in addition.  Wherever we do a strerror
>> in the attr code we will have to special case ENODATA on Linux and only
>> there.  Independent of that I think we would better of using the raw
>> syscalls in platforms already using binary namespaces rather than double
>> translation.  Note that this is only applicable for the IRIX-heritage
>> attr_* routines exports by libattr, not the *xattr routines it also
>> exports.
>
> We would really appreciate to have either "#ifdef ENODATA" or
> "#ifdef __linux__" applied to current debian version of package.
> The debian maintainer does not want to diverge from (future) upstream,
> which is quite understandable.
>

> Would be possible to special case ENODATA as 1st step and postpone
> adding of syscall support later ?

Fully agreed.

Please find below the __linux_ version of the patch.

--- attr-2.4.43.orig/getfattr/getfattr.c
+++ attr-2.4.43/getfattr/getfattr.c
@@ -93,8 +93,10 @@
 
 const char *strerror_ea(int err)
 {
+#ifdef __linux__
 	if (err == ENODATA)
 		return _("No such attribute");
+#endif
 	return strerror(err);
 }
 
only in patch2:
unchanged:
--- attr-2.4.43.orig/setfattr/setfattr.c
+++ attr-2.4.43/setfattr/setfattr.c
@@ -66,8 +66,10 @@
 
 const char *strerror_ea(int err)
 {
+#ifdef __linux__
 	if (err == ENODATA)
 		return _("No such attribute");
+#endif
 	return strerror(err);
 }
 
-- 
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Bug#531950: attr: FTBFS on GNU/kFreeBSD
  2009-06-15  9:42             ` Christoph Hellwig
@ 2009-06-15 10:26               ` Petr Salinger
  2009-06-15 10:05                 ` Aurelien Jarno
  2009-06-19 15:37                 ` Andreas Gruenbacher
  0 siblings, 2 replies; 10+ messages in thread
From: Petr Salinger @ 2009-06-15 10:26 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: 531950-quiet, Nathan Scott, Aurelien Jarno, xfs

> On Sun, Jun 14, 2009 at 10:56:28PM +0200, Aurelien Jarno wrote:
>> Would such a patch be accepted more easily than the ENODATA patch?
>
> I don't think it's an except but in addition.  Wherever we do a strerror
> in the attr code we will have to special case ENODATA on Linux and only
> there.  Independent of that I think we would better of using the raw
> syscalls in platforms already using binary namespaces rather than double
> translation.  Note that this is only applicable for the IRIX-heritage
> attr_* routines exports by libattr, not the *xattr routines it also
> exports.

We would really appreciate to have either "#ifdef ENODATA" or
"#ifdef __linux__" applied to current debian version of package.
The debian maintainer does not want to diverge from (future) upstream,
which is quite understandable.

Would be possible to special case ENODATA as 1st step and postpone
adding of syscall support later ?

The current situation (unbuildable attr under Bebian) prevents
building of many other packages, namely kdelibs (and whole KDE 3.x),
kde4libs (and whole KDE 4.x) and gnome-vfs (almost whole GNOME) and even
vim editor under Debian GNU/kFreeBSD.

http://bugs.debian.org//cgi-bin/bugreport.cgi?bug=531950

Thanks

 		Petr

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Bug#531950: attr: FTBFS on GNU/kFreeBSD
  2009-06-15 10:26               ` Petr Salinger
  2009-06-15 10:05                 ` Aurelien Jarno
@ 2009-06-19 15:37                 ` Andreas Gruenbacher
  1 sibling, 0 replies; 10+ messages in thread
From: Andreas Gruenbacher @ 2009-06-19 15:37 UTC (permalink / raw)
  To: Petr Salinger, acl-devel
  Cc: Christoph Hellwig, 531950-quiet, Nathan Scott, Aurelien Jarno, xfs

On Monday 15 June 2009 12:26:12 Petr Salinger wrote:
> We would really appreciate to have either "#ifdef ENODATA" or
> "#ifdef __linux__" applied to current debian version of package.
> The debian maintainer does not want to diverge from (future) upstream,
> which is quite understandable.
>
> Would be possible to special case ENODATA as 1st step and postpone
> adding of syscall support later ?

Yes, done.

> The current situation (unbuildable attr under Bebian) prevents
> building of many other packages, namely kdelibs (and whole KDE 3.x),
> kde4libs (and whole KDE 4.x) and gnome-vfs (almost whole GNOME) and even
> vim editor under Debian GNU/kFreeBSD.

Thanks,
Andreas

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-06-19 15:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1450746396.6081061244543230576.JavaMail.root@mail-au.aconex.com>
2009-06-09 10:31 ` Bug#531950: attr: FTBFS on GNU/kFreeBSD Nathan Scott
2009-06-09 11:35   ` Petr Salinger
2009-06-09 12:10     ` Christoph Hellwig
2009-06-14 16:35       ` Aurelien Jarno
2009-06-14 20:33         ` Christoph Hellwig
2009-06-14 20:56           ` Aurelien Jarno
2009-06-15  9:42             ` Christoph Hellwig
2009-06-15 10:26               ` Petr Salinger
2009-06-15 10:05                 ` Aurelien Jarno
2009-06-19 15:37                 ` Andreas Gruenbacher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.