X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D94853858417 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1685447027; bh=nvPjE4bR6OjPbfFhbCRO6zY+oYBI6Mgxy7i5veCAKkk=; h=References:In-Reply-To:Date:Subject:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=BtCIgDgQBh0gCOp6S7BZ6bzxmsx9MgWj43upz0XQ9Clre8A3a/h5jyttCMBPAifDJ gUhCwXr8L43bdSV+DicaJgADowY+gxu8yyEipZ5IZGzx9R+XT7CMx82wVqZXctz8J+ PCzesmdO8rvUrtSZS3Yjz4MCbBTWUBPItMNPvW5o= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2BCC53857704 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685446987; x=1688038987; h=content-transfer-encoding:cc: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=CbYBhuI2FnOQyP5aMRWfrPu6T2awYs4xZ/Ow7/Kge0s=; b=eMu1XXvqI1/CuPGc9B2Z6+uGtn5S9NLxXHOP/q22RYd9xsYL5LsxA72Z8eh0+f07Pq +DyjT3qp5Bznm76dUQqF2xpUVu0ThaGTMpHVwgKEbIGPmENcDAIf5pNqskGowrbbGv3k cWuyik0+d23zKiCMlYXvcuw+47UJ5OCgapGCLofV0JzNSV6o3QZzZcZidLtrysuPynxd CI+9K9IqAl+D2eEa/MmJmj9FvRV44riwWqUbKXNH7nRvDX0fXRTZKTRWb7jhHbPVYMUe IESTkdm529usXYsOE29g6M0NMn5VQ6yf8vaXMaenP6FYqZhfWJTcwPcHCJLiQLz/ZPty BspA== X-Gm-Message-State: AC+VfDzmJUAk0CFMDTmuu79mvvjPHLOV81reGlzEAZ8xe4bPMCqp1lE/ LuITVrjYLZlxIQ/YYGaZD6+avVKjqKNkCNH/UVD54ppoHzA= X-Google-Smtp-Source: ACHHUZ7Woj644uOC7BGdW4mu+hC1ELotHsTlVin4ICbRlNnUy9bRTaquip9QNI86+OqWFCHAAPsIlLWXjZi+Rc/rBGc= X-Received: by 2002:a0d:d54a:0:b0:561:aa98:1a99 with SMTP id x71-20020a0dd54a000000b00561aa981a99mr1774413ywd.45.1685446987395; Tue, 30 May 2023 04:43:07 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 30 May 2023 13:42:56 +0200 Message-ID: Subject: Re: set XATTR_SIZE_MAX and XATTR_LIST_MAX in cygwin/limits.h (was: python + XATTRs under cygwin?) To: Philippe Cerfon Cc: cygwin AT cygwin DOT com X-Spam-Status: No, score=0.5 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 List-Archive: List-Post: List-Help: List-Subscribe: , From: marco atzeri via Cygwin Reply-To: marco atzeri Content-Type: text/plain; charset="utf-8" Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 34UBiB8G018497 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 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 -- 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