From nobody Sat Apr 5 15:56:19 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1738051178292216.52809454071496; Mon, 27 Jan 2025 23:59:38 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tcgUj-0001K1-3T; Tue, 28 Jan 2025 02:58:49 -0500 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 1tcgUa-0000HQ-J4; Tue, 28 Jan 2025 02:58:40 -0500 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tcgUY-000128-V8; Tue, 28 Jan 2025 02:58:40 -0500 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id C43E3E1AFC; Tue, 28 Jan 2025 10:54:25 +0300 (MSK) Received: from localhost.tls.msk.ru (mjt.wg.tls.msk.ru [192.168.177.130]) by tsrv.corpit.ru (Postfix) with ESMTP id 3F4A61A62E3; Tue, 28 Jan 2025 10:54:51 +0300 (MSK) Received: by localhost.tls.msk.ru (Postfix, from userid 1000) id EFDFA5205D; Tue, 28 Jan 2025 10:54:50 +0300 (MSK) To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Gerd Hoffmann , Peter Maydell , Michael Tokarev Subject: [Stable-8.2.9 27/45] edk2: get version + date from git submodule Date: Mon, 27 Jan 2025 23:26:08 +0300 Message-Id: <20250127202630.3724367-27-mjt@tls.msk.ru> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Tokarev 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=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -53 X-Spam_score: -5.4 X-Spam_bar: ----- X-Spam_report: (-5.4 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_06_12=1.543, RCVD_IN_DNSWL_HI=-5, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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-ZM-MESSAGEID: 1738051179157019000 Content-Type: text/plain; charset="utf-8" Turned out hard-coding version and date in the Makefile wasn't a bright idea. Updating it on edk2 updates is easily forgotten. Fetch the info from git instead. Store in edk2-version, so this can be committed to the repo and is present in tarballs too. Reviewed-by: Peter Maydell Signed-off-by: Gerd Hoffmann Message-ID: <20240327102448.61877-2-kraxel@redhat.com> (cherry picked from commit 6539c73dccfa8fff1f83d40f1c4477a233876071) Signed-off-by: Michael Tokarev diff --git a/roms/Makefile b/roms/Makefile index 67f709ba2d..3caae36bbb 100644 --- a/roms/Makefile +++ b/roms/Makefile @@ -52,6 +52,8 @@ SEABIOS_EXTRAVERSION=3D"-prebuilt.qemu.org" # EDK2_EFIROM =3D edk2/BaseTools/Source/C/bin/EfiRom =20 +-include edk2-version + default help: @echo "nothing is build by default" @echo "available build targets:" @@ -146,10 +148,19 @@ skiboot: $(MAKE) -C skiboot CROSS=3D$(powerpc64_cross_prefix) cp skiboot/skiboot.lid ../pc-bios/skiboot.lid =20 -efi: +edk2-version: edk2 + if test -e edk2/.git; then \ + echo "EDK2_STABLE =3D $$(cd edk2; git describe --tags --match 'edk2-stab= le*')" > $@; \ + echo "EDK2_DATE =3D $$(cd edk2; git log -1 --pretty=3D'format:%cd' --dat= e=3D'format:%m/%d/%Y')" >> $@; \ + else \ + touch $@; \ + fi + +efi: edk2-version $(PYTHON) edk2-build.py --config edk2-build.config \ - --version-override "edk2-stable202302-for-qemu" \ - --release-date "03/01/2023" + --version-override "$(EDK2_STABLE)-for-qemu" \ + --release-date "$(EDK2_DATE)" \ + --silent --no-logs rm -f ../pc-bios/edk2-*.fd.bz2 bzip2 --verbose ../pc-bios/edk2-*.fd =20 --=20 2.39.5