[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-9.2.1 39/41] make-release: only leave tarball of wrap-file subpr
From: |
Michael Tokarev |
Subject: |
[Stable-9.2.1 39/41] make-release: only leave tarball of wrap-file subprojects |
Date: |
Mon, 27 Jan 2025 17:17:53 +0300 |
From: Paolo Bonzini <pbonzini@redhat.com>
The QEMU source archive is including the sources downloaded from crates.io
in both tarball form (in subprojects/packagecache) and expanded/patched
form (in the subprojects directory). The former is the more authoritative
form, as it has a hash that can be verified in the wrap file and checked
against the download URL, so keep that one only. This works also with
--disable-download; when building QEMU for the first time from the
tarball, Meson will print something like
Using proc-macro2-1-rs source from cache.
for each subproject, and then go on to extract the tarball and apply the
overlay or the patches in subprojects/packagefiles.
Reported-by: Michael Tokarev <mjt@tls.msk.ru>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2719
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit be27b5149c86f81531f8fc609baf3480fc4d9ca0)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/scripts/make-release b/scripts/make-release
index 8dc939124c..2885e87210 100755
--- a/scripts/make-release
+++ b/scripts/make-release
@@ -10,6 +10,27 @@
# This work is licensed under the terms of the GNU GPLv2 or later.
# See the COPYING file in the top-level directory.
+function subproject_dir() {
+ if test ! -f "subprojects/$1.wrap"; then
+ error "scripts/archive-source.sh should only process wrap subprojects"
+ fi
+
+ # Print the directory key of the wrap file, defaulting to the
+ # subproject name. The wrap file is in ini format and should
+ # have a single section only. There should be only one section
+ # named "[wrap-*]", which helps keeping the script simple.
+ local dir
+ dir=$(sed -n \
+ -e '/^\[wrap-[a-z][a-z]*\]$/,/^\[/{' \
+ -e '/^directory *= */!b' \
+ -e 's///p' \
+ -e 'q' \
+ -e '}' \
+ "subprojects/$1.wrap")
+
+ echo "${dir:-$1}"
+}
+
if [ $# -ne 2 ]; then
echo "Usage:"
echo " $0 gitrepo version"
@@ -51,5 +72,13 @@ meson subprojects download $SUBPROJECTS
CryptoPkg/Library/OpensslLib/openssl \
MdeModulePkg/Library/BrotliCustomDecompressLib/brotli)
popd
-tar --exclude=.git -cJf ${destination}.tar.xz ${destination}
+
+exclude=(--exclude=.git)
+# include the tarballs in subprojects/packagecache but not their expansion
+for sp in $SUBPROJECTS; do
+ if grep -xqF "[wrap-file]" subprojects/$sp.wrap; then
+ exclude+=(--exclude=subprojects/"$(subproject_dir $sp)")
+ fi
+done
+tar "${exclude[@]}" -cJf ${destination}.tar.xz ${destination}
rm -rf ${destination}
--
2.39.5
- [Stable-9.2.1 22/41] migration: Rename vmstate_info_nullptr, (continued)
- [Stable-9.2.1 22/41] migration: Rename vmstate_info_nullptr, Michael Tokarev, 2025/01/27
- [Stable-9.2.1 16/41] migration/multifd: Fix compile error caused by page_size usage, Michael Tokarev, 2025/01/27
- [Stable-9.2.1 20/41] migration: Fix parsing of s390 stream, Michael Tokarev, 2025/01/27
- [Stable-9.2.1 19/41] migration: Remove unused argument in vmsd_desc_field_end, Michael Tokarev, 2025/01/27
- [Stable-9.2.1 18/41] migration: Add more error handling to analyze-migration.py, Michael Tokarev, 2025/01/27
- [Stable-9.2.1 21/41] s390x: Fix CSS migration, Michael Tokarev, 2025/01/27
- [Stable-9.2.1 24/41] migration: Fix arrays of pointers in JSON writer, Michael Tokarev, 2025/01/27
- [Stable-9.2.1 02/41] tcg: Reset free_temps before tcg_optimize, Michael Tokarev, 2025/01/27
- [Stable-9.2.1 23/41] migration: Dump correct JSON format for nullptr replacement, Michael Tokarev, 2025/01/27
- [Stable-9.2.1 25/41] multifd: bugfix for migration using compression methods, Michael Tokarev, 2025/01/27
- [Stable-9.2.1 39/41] make-release: only leave tarball of wrap-file subprojects,
Michael Tokarev <=
- [Stable-9.2.1 27/41] multifd: bugfix for incorrect migration data with qatzip compression, Michael Tokarev, 2025/01/27
- [Stable-9.2.1 28/41] tests/functional/test_rx_gdbsim: Use stable URL for test_linux_sash, Michael Tokarev, 2025/01/27
- [Stable-9.2.1 26/41] multifd: bugfix for incorrect migration data with QPL compression, Michael Tokarev, 2025/01/27
- [Stable-9.2.1 38/41] hw/cxl: Fix msix_notify: Assertion `vector < dev->msix_entries_nr`, Michael Tokarev, 2025/01/27
- [Stable-9.2.1 36/41] pci: acpi: Windows 'PCI Label Id' bug workaround, Michael Tokarev, 2025/01/27
- [Stable-9.2.1 40/41] i386/cpu: Mark avx10_version filtered when prefix is NULL, Michael Tokarev, 2025/01/27
- [Stable-9.2.1 37/41] tests: acpi: update expected blobs, Michael Tokarev, 2025/01/27
- [Stable-9.2.1 41/41] crypto: fix bogus error benchmarking pbkdf on fast machines, Michael Tokarev, 2025/01/27