diff mbox series

[v2,for-8.0,5/5] scripts/make-release: Move roms into separate tarball

Message ID 20221128092555.37102-6-thuth@redhat.com (mailing list archive)
State New, archived
Headers show
Series scripts/make-release: Decrease size of the release tarballs | expand

Commit Message

Thomas Huth Nov. 28, 2022, 9:25 a.m. UTC
Our current release tarballs are huge and caused already some trouble
with the server traffic in the past. However, the biggest chunk (~80%)
of the tarball is caused by the firmware sources - which most users
don't need anyway (assuming that they just want to compile QEMU itself
on their own). So we can certainly safe a lot of traffic by moving
the firmware sources into a separate tarball, so that only people who
really want to rebuild the firmware images on their own have to
download it.

This decreases the size of the main QEMU xz tarball from ca. 116 MiB
to only 27 MiB!

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 scripts/make-release | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

Stefan Hajnoczi Nov. 28, 2022, 4:51 p.m. UTC | #1
On Mon, 28 Nov 2022 at 04:28, Thomas Huth <thuth@redhat.com> wrote:
>
> Our current release tarballs are huge and caused already some trouble
> with the server traffic in the past. However, the biggest chunk (~80%)
> of the tarball is caused by the firmware sources - which most users
> don't need anyway (assuming that they just want to compile QEMU itself
> on their own). So we can certainly safe a lot of traffic by moving
> the firmware sources into a separate tarball, so that only people who
> really want to rebuild the firmware images on their own have to
> download it.
>
> This decreases the size of the main QEMU xz tarball from ca. 116 MiB
> to only 27 MiB!
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  scripts/make-release | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/scripts/make-release b/scripts/make-release
> index febeb6cb36..44408c24a2 100755
> --- a/scripts/make-release
> +++ b/scripts/make-release
> @@ -42,6 +42,19 @@ git submodule update --init --single-branch
>          CryptoPkg/Library/OpensslLib/openssl \
>          MdeModulePkg/Library/BrotliCustomDecompressLib/brotli)
>
> +tar --exclude=".git*" -cjf ../qemu-rom-sources-${version}.tar.bz2 roms
> +rm -r roms/*
> +
> +cat > roms/README.rst <<EOF
> +Please download the qemu-rom-sources-${version}.tar.bz2 tarball
> +and unpack it in the topmost directory of the QEMU sources in
> +case you want to recompile the QEMU ROM images.
> +EOF
> +cat > roms/Makefile <<EOF
> +%:
> +       @cat README.rst
> +EOF

Replacing files with different content worries me a little. If someone
is trying to match a git tree with a release these files will be
different and require manual inspection.

How about having no roms/ directory in the main sources tarball and
including a check for an empty directory in the build scripts? Then
there's no need to patch the roms/ directory.

Stefan
Alex Bennée Nov. 28, 2022, 4:58 p.m. UTC | #2
Thomas Huth <thuth@redhat.com> writes:

> Our current release tarballs are huge and caused already some trouble
> with the server traffic in the past. However, the biggest chunk (~80%)
> of the tarball is caused by the firmware sources - which most users
> don't need anyway (assuming that they just want to compile QEMU itself
> on their own). So we can certainly safe a lot of traffic by moving
> the firmware sources into a separate tarball, so that only people who
> really want to rebuild the firmware images on their own have to
> download it.
>
> This decreases the size of the main QEMU xz tarball from ca. 116 MiB
> to only 27 MiB!
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  scripts/make-release | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/scripts/make-release b/scripts/make-release
> index febeb6cb36..44408c24a2 100755
> --- a/scripts/make-release
> +++ b/scripts/make-release
> @@ -42,6 +42,19 @@ git submodule update --init --single-branch
>          CryptoPkg/Library/OpensslLib/openssl \
>          MdeModulePkg/Library/BrotliCustomDecompressLib/brotli)
>  
> +tar --exclude=".git*" -cjf ../qemu-rom-sources-${version}.tar.bz2 roms
> +rm -r roms/*
> +
> +cat > roms/README.rst <<EOF
> +Please download the qemu-rom-sources-${version}.tar.bz2 tarball
> +and unpack it in the topmost directory of the QEMU sources in
> +case you want to recompile the QEMU ROM images.
> +EOF
> +cat > roms/Makefile <<EOF
> +%:
> +	@cat README.rst
> +EOF
> +

Hmmm I guess this is marginally more magic than an exclude file. Anyway
it works:

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>


>  rm -v .*.yml
>  popd
Thomas Huth Nov. 30, 2022, 11:10 a.m. UTC | #3
On 28/11/2022 17.51, Stefan Hajnoczi wrote:
> On Mon, 28 Nov 2022 at 04:28, Thomas Huth <thuth@redhat.com> wrote:
>>
>> Our current release tarballs are huge and caused already some trouble
>> with the server traffic in the past. However, the biggest chunk (~80%)
>> of the tarball is caused by the firmware sources - which most users
>> don't need anyway (assuming that they just want to compile QEMU itself
>> on their own). So we can certainly safe a lot of traffic by moving
>> the firmware sources into a separate tarball, so that only people who
>> really want to rebuild the firmware images on their own have to
>> download it.
>>
>> This decreases the size of the main QEMU xz tarball from ca. 116 MiB
>> to only 27 MiB!
>>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>>   scripts/make-release | 13 +++++++++++++
>>   1 file changed, 13 insertions(+)
>>
>> diff --git a/scripts/make-release b/scripts/make-release
>> index febeb6cb36..44408c24a2 100755
>> --- a/scripts/make-release
>> +++ b/scripts/make-release
>> @@ -42,6 +42,19 @@ git submodule update --init --single-branch
>>           CryptoPkg/Library/OpensslLib/openssl \
>>           MdeModulePkg/Library/BrotliCustomDecompressLib/brotli)
>>
>> +tar --exclude=".git*" -cjf ../qemu-rom-sources-${version}.tar.bz2 roms
>> +rm -r roms/*
>> +
>> +cat > roms/README.rst <<EOF
>> +Please download the qemu-rom-sources-${version}.tar.bz2 tarball
>> +and unpack it in the topmost directory of the QEMU sources in
>> +case you want to recompile the QEMU ROM images.
>> +EOF
>> +cat > roms/Makefile <<EOF
>> +%:
>> +       @cat README.rst
>> +EOF
> 
> Replacing files with different content worries me a little. If someone
> is trying to match a git tree with a release these files will be
> different and require manual inspection.
> 
> How about having no roms/ directory in the main sources tarball and
> including a check for an empty directory in the build scripts?

Not sure where to add such a check - do we have a way to build the roms from 
the main build machinery yet? ... last time I asked, I was told that "make 
-C roms ..." is the way to go...

  Thomas
diff mbox series

Patch

diff --git a/scripts/make-release b/scripts/make-release
index febeb6cb36..44408c24a2 100755
--- a/scripts/make-release
+++ b/scripts/make-release
@@ -42,6 +42,19 @@  git submodule update --init --single-branch
         CryptoPkg/Library/OpensslLib/openssl \
         MdeModulePkg/Library/BrotliCustomDecompressLib/brotli)
 
+tar --exclude=".git*" -cjf ../qemu-rom-sources-${version}.tar.bz2 roms
+rm -r roms/*
+
+cat > roms/README.rst <<EOF
+Please download the qemu-rom-sources-${version}.tar.bz2 tarball
+and unpack it in the topmost directory of the QEMU sources in
+case you want to recompile the QEMU ROM images.
+EOF
+cat > roms/Makefile <<EOF
+%:
+	@cat README.rst
+EOF
+
 rm -v .*.yml
 popd