public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: marco atzeri <marco.atzeri@gmail.com>
To: Philippe Cerfon <philcerf@gmail.com>
Cc: cygwin@cygwin.com
Subject: Re: set XATTR_SIZE_MAX and XATTR_LIST_MAX in cygwin/limits.h (was: python + XATTRs under cygwin?)
Date: Tue, 30 May 2023 13:42:56 +0200	[thread overview]
Message-ID: <CAB8Xom83mVNt54-MZKj7dV8Q-7+Lm=5vN1ijdahorjK6R1L9UA@mail.gmail.com> (raw)
In-Reply-To: <CAN+za=PnQ7NiZ1mBngz_2YYhqLGXguE7CymAHc274d_a0oCOjA@mail.gmail.com>

On Tue, May 30, 2023 at 1:29 PM Philippe Cerfon via Cygwin wrote:
>
> Just for the records:
>
> I've made a PR against CPython that would enable XATTRs with Cygwin:
> https://github.com/python/cpython/pull/105075
>
> and sent a patch against newlib, which is AFAICS the right place to
> have the XATTR_*_MAX exported:
> https://sourceware.org/pipermail/newlib/2023/020347.html
>
> Thanks,
> Philippe
>
> On Tue, May 30, 2023 at 3:37 AM Philippe Cerfon <philcerf@gmail.com> wrote:
> >
> > Hey.
> >
> > I did some further tests as described in detail at
> > https://github.com/python/cpython/issues/90026#issuecomment-1567631574
> > and it turns out that Python's code would already support XATTRs on
> > Cygwin if the necessary defines were in place.
> >
> > Currently, the most recent version of Python in cygwin is 3.9.9, which

latest is 3.9.16
https://cygwin.com/packages/summary/python39-src.html

> > uses the following check in cpython/Modules/posixmodule.c:
> >    #if defined(HAVE_SYS_XATTR_H) && defined(__GLIBC__) &&
> > !defined(__FreeBSD_kernel__) && !defined(__GNU__)
> >
> > in order to determine whether the XATTR code should be compiled or not.
> >
> > In CPython’s master this was changed to:
> >    #if defined(HAVE_SYS_XATTR_H) && defined(__linux__) &&
> > !defined(__FreeBSD_kernel__) && !defined(__GNU__)
> >
> > I plan on making a PR against CPython, which would also set the
> > necessary symbol, if __CYGWIN__ is defined.
> >
> >
> > There are however two problems:
> > 1) Compilation then fails, as the code needs the symbols
> > XATTR_SIZE_MAX and XATTR_LIST_MAX, which on Linux are defined in
> > linux/limits.h as:
> >    #define XATTR_SIZE_MAX 65536    /* size of an extended attribute
> > value (64k) */
> >    #define XATTR_LIST_MAX 65536    /* size of extended attribute
> > namelist (64k) */
> >
> > This would need to be added to cygwin/limits.h with whichever values
> > are proper for Cygwin (not sure how to find out?)
> >
> >
> > 2) I guess the changes in CPython won't be backported (and it's not
> > even merged)... so Cygwin's Python maintainer will hopefully find the
> > time to package newer versions.
> > So there will probably quite some time, until it finally works in Python.
> >
> >
> > Anyway, whom can I ask or (1)?
> >
> >
> > Thanks,
> > Philippe.

I will look on that, but do not expect anything in short term

Regards
Marco

  reply	other threads:[~2023-05-30 11:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-16 21:06 python + XATTRs under cygwin? Philippe Cerfon
2023-05-30  1:37 ` set XATTR_SIZE_MAX and XATTR_LIST_MAX in cygwin/limits.h (was: python + XATTRs under cygwin?) Philippe Cerfon
2023-05-30 11:28   ` Philippe Cerfon
2023-05-30 11:42     ` marco atzeri [this message]
2023-05-30 12:04       ` Philippe Cerfon
2023-12-22  4:45     ` set XATTR_SIZE_MAX and XATTR_LIST_MAX in cygwin/limits.h Marco Atzeri
2023-12-22 20:33       ` Philippe Cerfon
2023-12-23  3:56         ` Marco Atzeri

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAB8Xom83mVNt54-MZKj7dV8Q-7+Lm=5vN1ijdahorjK6R1L9UA@mail.gmail.com' \
    --to=marco.atzeri@gmail.com \
    --cc=cygwin@cygwin.com \
    --cc=philcerf@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).