Alistair Leslie-Hughes wrote:
As always, if you find a bug, please report it via https://bugs.winehq.org
I did that with https://bugs.winehq.org/show_bug.cgi?id=49829 ("file.c:237:37: error: 'EXTATTR_NAMESPACE_USER' undeclared on FreeBSD") and even have debugged this and found a first fix.
Alas the instructions at https://wiki.winehq.org/Wine-Staging do not really apply: The link provided goes into Bugzilla.
Anyway, here is that first step towards fixing things up on FreeBSD.
Gerald
Properly include sys/extattr.h when available.
dlls/ntdll/unix/file.c special cases when sys/extattr.h is available, alas failed to actually include that file.
Signed-off-by: Gerald Pfeifer gerald@pfeifer.com
--- dlls/ntdll/unix/file.c.orig 2020-10-14 19:03:39.476740000 +0000 +++ dlls/ntdll/unix/file.c 2020-10-14 19:49:03.226593000 +0000 @@ -112,6 +112,9 @@ #elif defined(HAVE_SYS_XATTR_H) #include <sys/xattr.h> #endif +#ifdef HAVE_SYS_EXTATTR_H +#include <sys/extattr.h> +#endif #include <time.h> #ifdef HAVE_UNISTD_H # include <unistd.h>
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=80438
Your paranoid android.
=== debiant (build log) ===
error: patch failed: dlls/ntdll/unix/file.c:112 Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/ntdll/unix/file.c:112 Task: Patch failed to apply
Hello Gerald,
On 10/14/20 3:11 PM, Gerald Pfeifer wrote:
Alistair Leslie-Hughes wrote:
As always, if you find a bug, please report it via https://bugs.winehq.org
I did that with https://bugs.winehq.org/show_bug.cgi?id=49829 ("file.c:237:37: error: 'EXTATTR_NAMESPACE_USER' undeclared on FreeBSD") and even have debugged this and found a first fix.
This should be fixed by https://github.com/wine-staging/wine-staging/commit/6d726da3ba0130385e352be0c534399d5c7eb29d; sorry for the delay.
Alas the instructions at https://wiki.winehq.org/Wine-Staging do not really apply: The link provided goes into Bugzilla.
Which link is that? I can't seem to find any.
Anyway, here is that first step towards fixing things up on FreeBSD.
Gerald
Properly include sys/extattr.h when available.
dlls/ntdll/unix/file.c special cases when sys/extattr.h is available, alas failed to actually include that file.
Signed-off-by: Gerald Pfeifer gerald@pfeifer.com
--- dlls/ntdll/unix/file.c.orig 2020-10-14 19:03:39.476740000 +0000 +++ dlls/ntdll/unix/file.c 2020-10-14 19:49:03.226593000 +0000 @@ -112,6 +112,9 @@ #elif defined(HAVE_SYS_XATTR_H) #include <sys/xattr.h> #endif +#ifdef HAVE_SYS_EXTATTR_H +#include <sys/extattr.h> +#endif #include <time.h> #ifdef HAVE_UNISTD_H # include <unistd.h>
Digging into this further, I noticed Zebediah's commit https://github.com/wine-staging/wine-staging/commit/1d149ff59d6d4b400ad53eb5... was the one breaking FreeBSD here.
The
#ifndef XATTR_USER_PREFIX_LEN # define XATTR_USER_PREFIX_LEN (sizeof(XATTR_USER_PREFIX) - 1) #endif
bit plus defining xattr_valid_namespace() both of which they removed from libs/port/xattr.c are still missing to completely restore the build on FreeBSD.
Should those bits be moved to dlls/ntdll/unix/file.c by adding them to patches/ntdll-DOS_Attributes/0006-libport-Add-support-for-FreeBSD-style-extended-attri.patch too?
Zebediah, can you help, please?
Thank you, Gerald
On Wed, 14 Oct 2020, Gerald Pfeifer wrote:
Alistair Leslie-Hughes wrote:
As always, if you find a bug, please report it via https://bugs.winehq.org
I did that with https://bugs.winehq.org/show_bug.cgi?id=49829 ("file.c:237:37: error: 'EXTATTR_NAMESPACE_USER' undeclared on FreeBSD") and even have debugged this and found a first fix.
Alas the instructions at https://wiki.winehq.org/Wine-Staging do not really apply: The link provided goes into Bugzilla.
Anyway, here is that first step towards fixing things up on FreeBSD.
Gerald
Properly include sys/extattr.h when available.
dlls/ntdll/unix/file.c special cases when sys/extattr.h is available, alas failed to actually include that file.
Signed-off-by: Gerald Pfeifer gerald@pfeifer.com
--- dlls/ntdll/unix/file.c.orig 2020-10-14 19:03:39.476740000 +0000 +++ dlls/ntdll/unix/file.c 2020-10-14 19:49:03.226593000 +0000 @@ -112,6 +112,9 @@ #elif defined(HAVE_SYS_XATTR_H) #include <sys/xattr.h> #endif +#ifdef HAVE_SYS_EXTATTR_H +#include <sys/extattr.h> +#endif #include <time.h> #ifdef HAVE_UNISTD_H # include <unistd.h>
On Fri, 16 Oct 2020, Gerald Pfeifer wrote:
Digging into this further, I noticed Zebediah's commit https://github.com/wine-staging/wine-staging/commit/1d149ff59d6d4b400ad53eb5... was the one breaking FreeBSD here.
Wine Staging 5.20 still is broken, sadly, after Zebediah's change.
Here is a patch on top (of the Wine Staging patchset) that is required.
Can you please include that? Thank you!
Gerald
--- dlls/ntdll/unix/file.c.orig 2020-10-24 12:22:03.186448000 +0000 +++ dlls/ntdll/unix/file.c 2020-10-24 12:55:07.253137000 +0000 @@ -390,6 +390,10 @@ #define XATTR_USER_PREFIX "user." #endif
+#ifndef XATTR_USER_PREFIX_LEN +#define XATTR_USER_PREFIX_LEN (sizeof(XATTR_USER_PREFIX) - 1) +#endif + static int xattr_fremove( int filedes, const char *name ) { #if defined(XATTR_ADDITIONAL_OPTIONS)
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=80969
Your paranoid android.
=== debiant (build log) ===
error: patch failed: dlls/ntdll/unix/file.c:390 Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/ntdll/unix/file.c:390 Task: Patch failed to apply
On 10/24/20 8:01 AM, Gerald Pfeifer wrote:
On Fri, 16 Oct 2020, Gerald Pfeifer wrote:
Digging into this further, I noticed Zebediah's commit https://github.com/wine-staging/wine-staging/commit/1d149ff59d6d4b400ad53eb5... was the one breaking FreeBSD here.
Wine Staging 5.20 still is broken, sadly, after Zebediah's change.
Here is a patch on top (of the Wine Staging patchset) that is required.
Can you please include that? Thank you!
This hunk already seems to be present, as of 7e7e0bbe3eb, or am I missing something?
Gerald
--- dlls/ntdll/unix/file.c.orig 2020-10-24 12:22:03.186448000 +0000 +++ dlls/ntdll/unix/file.c 2020-10-24 12:55:07.253137000 +0000 @@ -390,6 +390,10 @@ #define XATTR_USER_PREFIX "user." #endif
+#ifndef XATTR_USER_PREFIX_LEN +#define XATTR_USER_PREFIX_LEN (sizeof(XATTR_USER_PREFIX) - 1) +#endif
static int xattr_fremove( int filedes, const char *name ) { #if defined(XATTR_ADDITIONAL_OPTIONS)
On Sat, 24 Oct 2020, Gerald Pfeifer wrote:
Here is a patch on top (of the Wine Staging patchset) that is required.
Can you please include that? Thank you!
Thanks to (I believe Zebediah) for addressing those issues!
I have to confess there is one snippet I missed. With the additional patch below Wine 5.22 + Staging patchset builds on FreeBSD 11 out of the box.
Thank you for considering that; for now I'm carrying it as part of the FreeBSD emulators/wine-devel port.
Gerald
--- dlls/ntdll/unix/file.c.orig 2020-11-07 09:33:27.083812000 +0000 +++ dlls/ntdll/unix/file.c 2020-11-07 09:53:55.641522000 +0000 @@ -394,6 +394,18 @@ #define XATTR_USER_PREFIX_LEN (sizeof(XATTR_USER_PREFIX) - 1) #endif
+#ifdef HAVE_SYS_EXTATTR_H +static inline int xattr_valid_namespace( const char *name ) +{ + if (strncmp( XATTR_USER_PREFIX, name, XATTR_USER_PREFIX_LEN ) != 0) + { + errno = EPERM; + return 0; + } + return 1; +} +#endif + static int xattr_fremove( int filedes, const char *name ) { #if defined(XATTR_ADDITIONAL_OPTIONS)
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=83152
Your paranoid android.
=== debiant (build log) ===
error: patch failed: dlls/ntdll/unix/file.c:394 Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/ntdll/unix/file.c:394 Task: Patch failed to apply
On 12/4/20 8:44 AM, Gerald Pfeifer wrote:
On Sat, 24 Oct 2020, Gerald Pfeifer wrote:
Here is a patch on top (of the Wine Staging patchset) that is required.
Can you please include that? Thank you!
Thanks to (I believe Zebediah) for addressing those issues!
I have to confess there is one snippet I missed. With the additional patch below Wine 5.22 + Staging patchset builds on FreeBSD 11 out of the box.
Thank you for considering that; for now I'm carrying it as part of the FreeBSD emulators/wine-devel port.
Thanks for the report; this should hopefully be fixed by 2dc013940d2aae1b2e9de887d9ddb490e8a7a6fc.
Gerald
--- dlls/ntdll/unix/file.c.orig 2020-11-07 09:33:27.083812000 +0000 +++ dlls/ntdll/unix/file.c 2020-11-07 09:53:55.641522000 +0000 @@ -394,6 +394,18 @@ #define XATTR_USER_PREFIX_LEN (sizeof(XATTR_USER_PREFIX) - 1) #endif
+#ifdef HAVE_SYS_EXTATTR_H +static inline int xattr_valid_namespace( const char *name ) +{
- if (strncmp( XATTR_USER_PREFIX, name, XATTR_USER_PREFIX_LEN ) != 0)
- {
errno = EPERM;
return 0;
- }
- return 1;
+} +#endif
static int xattr_fremove( int filedes, const char *name ) { #if defined(XATTR_ADDITIONAL_OPTIONS)
On 10/16/20 2:05 AM, Gerald Pfeifer wrote:
Digging into this further, I noticed Zebediah's commit https://github.com/wine-staging/wine-staging/commit/1d149ff59d6d4b400ad53eb5... was the one breaking FreeBSD here.
The
#ifndef XATTR_USER_PREFIX_LEN # define XATTR_USER_PREFIX_LEN (sizeof(XATTR_USER_PREFIX) - 1) #endif
bit plus defining xattr_valid_namespace() both of which they removed from libs/port/xattr.c are still missing to completely restore the build on FreeBSD.
Should those bits be moved to dlls/ntdll/unix/file.c by adding them to patches/ntdll-DOS_Attributes/0006-libport-Add-support-for-FreeBSD-style-extended-attri.patch too?
Zebediah, can you help, please?
Sorry for the (further) delay; hopefully both of these are fixed as of 411aeb239.
Thank you, Gerald
On Wed, 14 Oct 2020, Gerald Pfeifer wrote:
Alistair Leslie-Hughes wrote:
As always, if you find a bug, please report it via https://bugs.winehq.org
I did that with https://bugs.winehq.org/show_bug.cgi?id=49829 ("file.c:237:37: error: 'EXTATTR_NAMESPACE_USER' undeclared on FreeBSD") and even have debugged this and found a first fix.
Alas the instructions at https://wiki.winehq.org/Wine-Staging do not really apply: The link provided goes into Bugzilla.
Anyway, here is that first step towards fixing things up on FreeBSD.
Gerald
Properly include sys/extattr.h when available.
dlls/ntdll/unix/file.c special cases when sys/extattr.h is available, alas failed to actually include that file.
Signed-off-by: Gerald Pfeifer gerald@pfeifer.com
--- dlls/ntdll/unix/file.c.orig 2020-10-14 19:03:39.476740000 +0000 +++ dlls/ntdll/unix/file.c 2020-10-14 19:49:03.226593000 +0000 @@ -112,6 +112,9 @@ #elif defined(HAVE_SYS_XATTR_H) #include <sys/xattr.h> #endif +#ifdef HAVE_SYS_EXTATTR_H +#include <sys/extattr.h> +#endif #include <time.h> #ifdef HAVE_UNISTD_H # include <unistd.h>