delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2023/05/30/07:29:47

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 67EFA3856614
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1685446147;
bh=KpYWKTpwgqySfLX3aKAqBfh8zm1tgU4Utcd/44WG2PY=;
h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=erTl0wcuuuTL2QegORjoKdn+UWpd4syh03IB6FClZvmXFW7vBYMyNl14pMRpa+Y9a
XjXhmIU9VZZplMt1Uzua45IgEHmmzauXPX+wm45/89Vdh9QdrlRP5YRw8yl9FHHcPi
Kk83CYz5Rdvh1Iq6nbLxt40+yNAK3/+05UytlwBs=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 360803856965
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20221208; t=1685446131; x=1688038131;
h=content-transfer-encoding:to:subject:message-id:date:from
:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=Aw4VPbuCgeCRIEqIFV+mm5z76d9u3SNazhXBXja2gyM=;
b=Rh+kwDmfIYexBxJ1UQ0SRtYMouFdpVFCZDdedbgvCAm2eCsePiZvP4mNGVBHXcYJNV
YhMHb+kWHjL4E5/+5WGooarhIbIk1zib9SzNVcg+kSG3SB9fJGofhCDfbOqFzRx6oICZ
LT0OXYLr08BGL00I8LuAuqV69qb1cq2yO7JutNNt5ZkcFVK1P/EN0gMsFcR4AngVOWDa
BLjobF4a9tLgiDYvyAa/hFwGUTz7jaJvDy90kRyUt3il4rNSklHwDjQ8Cmu23IyLrHDy
vTJpN2I5/6UMARYdY9p1AmRC8Mn/p/XEqDpmtw7sKAZoZi2zOrhhhZxQKMHybldUs0zj
c2OA==
X-Gm-Message-State: AC+VfDy484vqZj2Qv3YT8jCxUbOfddFTlBMdYf3HHRP9HBdskboDDufc
PwuLXw8IT+H5ca8HDvu+Fyoxpvbx3gGB+PvS9OrBgs7jAA0=
X-Google-Smtp-Source: ACHHUZ42Lx0+xNvprOtauv2qrmZje4hgOSIg7Cic1sT5l7rfBz3A/dUgakkYr8rhY9QyCm+a8YQK5KvtdTOpiWsNeGk=
X-Received: by 2002:a17:902:ba8d:b0:1b0:577c:2cb with SMTP id
k13-20020a170902ba8d00b001b0577c02cbmr2023017pls.25.1685446131245; Tue, 30
May 2023 04:28:51 -0700 (PDT)
MIME-Version: 1.0
References: <CAN+za=Oxko-2a2BMDYtt7ETATPS35Aez5+5zJsN8D6XJTPvXPw AT mail DOT gmail DOT com>
<CAN+za=Nr==L6trRMF0nvfigU238o0JJ_C2C5YbXbA_4gxA35zA AT mail DOT gmail DOT com>
In-Reply-To: <CAN+za=Nr==L6trRMF0nvfigU238o0JJ_C2C5YbXbA_4gxA35zA@mail.gmail.com>
Date: Tue, 30 May 2023 13:28:40 +0200
Message-ID: <CAN+za=PnQ7NiZ1mBngz_2YYhqLGXguE7CymAHc274d_a0oCOjA@mail.gmail.com>
Subject: Re: set XATTR_SIZE_MAX and XATTR_LIST_MAX in cygwin/limits.h (was:
python + XATTRs under cygwin?)
To: cygwin AT cygwin DOT com
X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,
SPF_HELO_NONE, SPF_PASS, TXREP,
T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Philippe Cerfon via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Philippe Cerfon <philcerf AT gmail DOT com>
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 34UBTVd9016060

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 AT gmail DOT 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
> 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.

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019