[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:29:25 +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=9uqRDgd792XOHvvC5OFV3guGWSm0xlxwYJMq7JJ3uSc=; b=lpVi5MseU1gZ3ufEaAQHo2bDjbq4MqpDy1mPMaY8mLOUg+TJdROe1ck7hDs4CfCRmzL+ClQt6Q35ZbahGDWaLc8LiFMBZxuKhv/uIeSCfuWYOg7q0sIRjqC9GZsLinjzip/bzkD0I4z4IwyXIoJgoj0bd/pZTLr8/mpFwESPPCpnacLwa0hCOUqmzerhKC1ADcjXxgpcO+moa4Q5qbb08U9PXS64Ci3jiFynoyIH6rU2VwhyS5Mm5m4LLdkQe5BGK/H64A+iGzWX0YXZ5q+1UnDlF2zKLET6Rf9WcmpooduDyMORY9i111uW3Paei56YsglBxGLlqmtOhSkDps0GJg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=iMTgFBDaZLjOTuShpUXHAcRbTSieiMcZGaCY2WTEJbqRbXGlifQAqDEr28aliVRVvYqe12gzz16LNoYQykeZzSbvNUg/WMjEnkUfPvNNG6fyRirjfzz/HdfL3WgSZh852C5afXGB2gdfs3gKaY47EdYgltkvq6zCJfHPANlfKo2z0VfWcYVT/6fDOXI/mRia42Gp04ypdUwyAxZL8ocg4/vr/bgNxySrn3B9GPbjawQT7tEc4G/DTqVmO+Dre23jWft/UokwDVd/HduarA7V/qz4fLV1LbDxeCDUa9WHrXU/DlZKHhQFhp/Zdhqsifq6/7a9GzeOl11/h+U6UlafLA==
  • 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:29:40 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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 have to admit though ...
>
>> --- a/tools/misc/mktarball
>> +++ b/tools/misc/mktarball
>> @@ -5,14 +5,6 @@
>>  # Takes 2 arguments, the path to the dist directory and the version
>>  set -ex
>>  
>> -function git_archive_into {
>> -    mkdir -p "$2"
>> -
>> -    git --git-dir="$1"/.git \
>> -    archive --format=tar HEAD | \
>> -    tar Cxf "$2" -
> ... that I'm unaware of what the C here does. It can't be the same as -C, and 
> the
> --help output of the GNU tar that I checked doesn't mention anything else at 
> all.

It is -C.  tar has dreadful cmdline syntax.

An equivalent would be tar -C "$2" xf -

~Andrew



 


Rackspace

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