[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: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 13 Nov 2025 14:45:17 +0100
  • Autocrypt: addr=jbeulich@xxxxxxxx; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNLpLgAGVRMZGaGoJObGf72s6TeIqKJo/LtggAS9qAUiuKVnygo 3wjfkS9A3DRO+SpU7JqWdsveeIQyeyEJ/8PTowmSQLakF+3fote9ybzd880fSmFuIEJldWxp Y2ggPGpiZXVsaWNoQHN1c2UuY29tPsJgBBMRAgAgBQJZN5xEAhsDBgsJCAcDAgQVAggDBBYC AwECHgECF4AACgkQoDSui/t3IH4J+wCfQ5jHdEjCRHj23O/5ttg9r9OIruwAn3103WUITZee e7Sbg12UgcQ5lv7SzsFNBFk3nEQQCACCuTjCjFOUdi5Nm244F+78kLghRcin/awv+IrTcIWF hUpSs1Y91iQQ7KItirz5uwCPlwejSJDQJLIS+QtJHaXDXeV6NI0Uef1hP20+y8qydDiVkv6l IreXjTb7DvksRgJNvCkWtYnlS3mYvQ9NzS9PhyALWbXnH6sIJd2O9lKS1Mrfq+y0IXCP10eS FFGg+Av3IQeFatkJAyju0PPthyTqxSI4lZYuJVPknzgaeuJv/2NccrPvmeDg6Coe7ZIeQ8Yj t0ARxu2xytAkkLCel1Lz1WLmwLstV30g80nkgZf/wr+/BXJW/oIvRlonUkxv+IbBM3dX2OV8 AmRv1ySWPTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 13 Nov 2025 13:45:22 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 13.11.2025 14:42, Andrew Cooper wrote:
> 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.

Oh, I see - because of --no-same-owner being the default for non-root.

Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

Jan

> 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®.