From nobody Sat Nov 23 23:01:54 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1728572858; cv=none; d=zohomail.com; s=zohoarc; b=HZHFI5/pqOb+JNtF7i5m4kMVyMbGsXPgaYkC6441McaFkk6dX2V3SA805iDYKMpOSFMnrL7Sr29ZMG41lKEYj7hjVj1zx3q7SzYd5VAEdPz5brPaYHrj/LjQtnykGzsUlpIDRIlw+X0Qz5aYp7vCl3BIeTaWF1+HzhH2EjvUgws= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1728572858; h=Content-Transfer-Encoding:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=wiwq679JEAjrG+n3FKaI9imuyg7RL0s3zXOf/mltAHA=; b=FoKLjFNjzRXx/DjnzHv0SabPyBdDbTQDQI5I5txIzP6xlYcZjCkw7Eu1EtJUQ/6+7+NKxxMoKXUqoNUDhgxa+qbHDZbvSUB8rX7NWA/6sGbLkJd50tnDbGgSL5IwjAtDO99NXUBTCGRR5NxFhADv7MlxMnCt5h0YCRYR3fSBVnM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1728572858589512.6955159358429; Thu, 10 Oct 2024 08:07:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1syukz-0005kE-1i; Thu, 10 Oct 2024 11:07:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1syuks-0005ju-1n for qemu-devel@nongnu.org; Thu, 10 Oct 2024 11:07:06 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1syukq-0003wf-4m for qemu-devel@nongnu.org; Thu, 10 Oct 2024 11:07:05 -0400 Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-402-slJyD2WENVuPFYJsdbRfrQ-1; Thu, 10 Oct 2024 11:06:58 -0400 Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-5c937403b2bso534847a12.1 for ; Thu, 10 Oct 2024 08:06:58 -0700 (PDT) Received: from avogadro.local ([93.56.170.251]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c9370d2251sm894711a12.12.2024.10.10.08.06.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2024 08:06:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728572822; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=wiwq679JEAjrG+n3FKaI9imuyg7RL0s3zXOf/mltAHA=; b=YUuDwOs5hPujyl9NZ3FJPCtJJDfcBrGPE3xBiQh0Y7duhXpLnGLGQ70NSblaEQHSqvQXRX M7dTwRxgEtu6a7VPTAHFr0k+nBthMoWMcAMOXmCHIxqUJv9Ubh3nwU0hkquIWLhenEvyYi GCxXHFb+c/rUDLKNfWn/MCJASHK1w+I= X-MC-Unique: slJyD2WENVuPFYJsdbRfrQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728572817; x=1729177617; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wiwq679JEAjrG+n3FKaI9imuyg7RL0s3zXOf/mltAHA=; b=oGHwMnWs+/ebaToGB3J2vv8PgEI8YID6bZnls1Fw7MNnYok7rT/8yqIL0EBb8NRIKD nx38PW/owRLfJGycHzz2BjbxkY5Ypl016+OIUsgWUKeDTiTRKVF3c8Y2msHIBhakk9C+ sooJAr1MVtsDRPEutKCdcmQlMjJi1NCSfP3KdyUpLpOKJUCHlvDYgP0aYgp8t/uEoO+0 pUCpjGq+cxqfgP7pfCpM3ZjYjIE+rKCUaIh763fZyC/sAQHQ9F/TWeJ85WbyCobShIW7 Jr/Be9AJJPCvyssnOX5rl4YOhTrTqOHlNX1aVF+mdyL87riBSZf2vnHsJNPiCyVd7wAa T6gw== X-Gm-Message-State: AOJu0YyEKgSscqjTRi0CWKs7VA+FKQgxVeuDiYRfM/fLeI6zYrr+de/b xzklqzFZdL1VNzNoNRxmIPJtQ7jmIJzW6FjYDIxYChzNawF+2CVrMyZ0lb0SktICd4jNfcCNooo rJl7nc75XkecmxwwaFnX9Dqh1fKo3nezDmbrFCANp2NYNEGiuhNCZBeR4d4B8z5qjgrn/p+fSdm flTKZGGmnYQq+s/5/lxuAvLeIdj0t8kjcaNo6XoMM= X-Received: by 2002:a05:6402:5d4:b0:5c2:609d:397e with SMTP id 4fb4d7f45d1cf-5c91d59f573mr5242368a12.15.1728572816271; Thu, 10 Oct 2024 08:06:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG9r88dHKSTRwu7E0bYzqdFFOBr2m9VpgLOvIsHb4d4AsGOwmt4dHJC5/Lz21PFM5L1+1Ohbw== X-Received: by 2002:a05:6402:5d4:b0:5c2:609d:397e with SMTP id 4fb4d7f45d1cf-5c91d59f573mr5242322a12.15.1728572815527; Thu, 10 Oct 2024 08:06:55 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH] scripts/archive-source: find directory name for subprojects Date: Thu, 10 Oct 2024 17:06:52 +0200 Message-ID: <20241010150652.1814677-1-pbonzini@redhat.com> X-Mailer: git-send-email 2.46.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.149, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1728572858974116600 Content-Type: text/plain; charset="utf-8" Rust subprojects have the semantic version (followed by -rs) in the subproj= ect name, but the full version (without -rs) is used by crates.io for the root directory of the tarball. Teach scripts/archive-source.sh to look for the root directory name in wrap files. Signed-off-by: Paolo Bonzini --- scripts/archive-source.sh | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh index 65af8063e4b..7c7727eab58 100755 --- a/scripts/archive-source.sh +++ b/scripts/archive-source.sh @@ -48,13 +48,33 @@ function tree_ish() { echo "$retval" } =20 +function subproject_dir() { + if test -f subprojects/$1.wrap; then + # Print the directory key of the wrap file, defaulting to the subpro= ject name + local dir=3D$(sed \ + -ne '/^\[wrap-[a-z][a-z]*\]$/!b' \ + -e ':label' \ + -e 'n' \ + -e 's/^directory *=3D *//p' \ + -e 'tquit' \ + -e '/^\[$/!blabel' \ + -e ':quit' \ + -e 'q' \ + subprojects/$1.wrap) + echo "${dir-$1}" + else + echo "error: scripts/archive-source.sh should only process wrap subp= rojects" 2>&1 + exit 1 + fi +} + git archive --format tar "$(tree_ish)" > "$tar_file" test $? -ne 0 && error "failed to archive qemu" =20 for sp in $subprojects; do meson subprojects download $sp test $? -ne 0 && error "failed to download subproject $sp" - tar --append --file "$tar_file" --exclude=3D.git subprojects/$sp + tar --append --file "$tar_file" --exclude=3D.git subprojects/$(subproj= ect_dir $sp) test $? -ne 0 && error "failed to append subproject $sp to $tar_file" done exit 0 --=20 2.46.2