[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH for-4.20] mktarball: Drop double-processing of the archive


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Thu, 13 Nov 2025 13:42:57 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ntNAH0tx0QE9hqZHs7iYwSjyvb1lqboGJjbYOOLn2jQ=; b=ryh5+56H9pmQzJyOquEqKAwS0yAATWwkEhWzGfGh3tapesS+x3M/e8GP9U9n8v8iscQdGNtbCP0umkm50fozY3NVgELjqGY7AMj6X4E08pP0DScDbRdtJZjRSrwGWO81gbxT9+wW6d2gdxyhY6lUhzwM4yEkFYHEKmf95F/JFczz+4LC+A//kLTgpA8IShax5ZlCFU7w4hDKgtRxJUx6doNFtM5osCp0huqiGY7+YoE8AHkYJexawnZLE3DFGMESevKKAsVBf7U8CtM8QlslBolt5Ed52UywGQMDECM9HPjR83ee48nbfix93h8DM/tnXBrhU8mrO4oXXyWQMJN+8Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=VDuyMiDa2AEUy520JwpATxt5jTjzIUzUm/yP2UYm/4FenczzyIwyVFo08wJFRi3mpKlPNuwZBguH0rNP/VaVIQR+krxVke9aybok0hN1SsM1vAsfTEp8tr03uKvxmn8TMtN1yVtUlQ28/HNIxbxrvZiJLqITVDDBd6QKqyY6xzMFME4bYH2Mi5C+5ndySHTvvhS3SnK6NsGDs8A4SQg6ATe37XWs2NwuUkByPumHDp4XOsfEwwgTVot/nUpeFMCIc59r2IiJ3AeoWF1ROKHDnoIQuXOhgwz2YhthW7MH2c3923WDOljkmyOm+3uDRHtg8wrAtGgh9qRs6fcm7Tc8Wg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 13 Nov 2025 13:43:16 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 13/11/2025 1:34 pm, Jan Beulich wrote:
> On 13.11.2025 14:29, Andrew Cooper wrote:
>> On 13/11/2025 1:12 pm, Jan Beulich wrote:
>>> On 13.11.2025 14:01, Andrew Cooper wrote:
>>>> This is a partial backport of commit 63ebd0e9649e ("releases: use newer
>>>> compression methods for tarballs"), but keeping gz as the only compression
>>>> method.
>>>>
>>>> In addition to efficiency, this causes the tarball to use root/root 
>>>> ownership,
>>>> rather than leak whomever produced the tarball.
>>> I don't understand this part. Isn't the ownership whatever "git archive" 
>>> reports?
>> This is fixing the issue you noticed about internal ownership:
>>
>> xen.org.cvs/oss-xen/release$ tar tf 4.20.1/xen-4.20.1.tar.gz --verbose | head
>> drwxrwxr-x andrew/andrew     0 2025-07-10 12:28 xen-4.20.1/
>> drwxrwxr-x andrew/andrew     0 2025-07-09 14:57 xen-4.20.1/.github/
>> drwxrwxr-x andrew/andrew     0 2025-07-09 14:57 xen-4.20.1/.github/workflows/
>> -rw-rw-r-- andrew/andrew  1362 2025-07-09 14:57 
>> xen-4.20.1/.github/workflows/coverity.yml
>> -rw-rw-r-- andrew/andrew    96 2025-07-09 14:57 xen-4.20.1/.gitarchive-info
>> -rw-rw-r-- andrew/andrew  9668 2025-07-09 14:57 xen-4.20.1/Makefile
>> drwxrwxr-x andrew/andrew     0 2025-07-09 14:57 xen-4.20.1/stubdom/
>> -rw-rw-r-- andrew/andrew 24220 2025-07-09 14:57 xen-4.20.1/stubdom/Makefile
>> drwxrwxr-x andrew/andrew     0 2025-07-09 14:57 xen-4.20.1/stubdom/grub/
>> -rw-rw-r-- andrew/andrew  2252 2025-07-09 14:57 
>> xen-4.20.1/stubdom/grub/Makefile
>>
>> xen.org.cvs/oss-xen/release$ tar tf 4.20.2/xen-4.20.2.tar.gz --verbose | head
>> drwxrwxr-x root/root         0 2025-11-13 09:51 xen-4.20.2/
>> -rw-rw-r-- root/root      4781 2025-11-13 09:51 xen-4.20.2/.cirrus.yml
>> -rw-rw-r-- root/root        97 2025-11-13 09:51 xen-4.20.2/.gitarchive-info
>> -rw-rw-r-- root/root        30 2025-11-13 09:51 xen-4.20.2/.gitattributes
>> drwxrwxr-x root/root         0 2025-11-13 09:51 xen-4.20.2/.github/
>> drwxrwxr-x root/root         0 2025-11-13 09:51 xen-4.20.2/.github/workflows/
>> -rw-rw-r-- root/root      1362 2025-11-13 09:51 
>> xen-4.20.2/.github/workflows/coverity.yml
>> -rw-rw-r-- root/root      7035 2025-11-13 09:51 xen-4.20.2/.gitignore
>> -rw-rw-r-- root/root       798 2025-11-13 09:51 xen-4.20.2/.gitlab-ci.yml
>> -rw-rw-r-- root/root     15298 2025-11-13 09:51 xen-4.20.2/CHANGELOG.md
> I guess my reply was ambiguous. I did understand that's the effect, but I
> wasn't able to tell why such a difference would result. It's all "git
> archive", before and after the change.

Ah.  The first git archive does the right thing, but the result gets
expanded into the regular filesystem and takes local ownership.

Then, nothing is merged, and the result is re-tar'd using:

GZIP=-9v tar cz -f $xen_root/dist/xen-$desc.tar.gz -C $tdir xen-$desc

which retains local ownership into the resulting archive.

For 4.19 and earlier, I propose to add '--owner 0 --group 0' to this tar
invocation.

~Andrew



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.