From: Peter Maydell <peter.maydell@linaro.org>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org, "Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: [PATCH v2 1/3] edk2: get version + date from git submodule
Date: Tue, 9 Apr 2024 15:23:29 +0100 [thread overview]
Message-ID: <CAFEAcA_4SJFozGAprmMy4AM8Lvp9M2+aZjz3zwNaA2bdkuHKSw@mail.gmail.com> (raw)
In-Reply-To: <20240327102448.61877-2-kraxel@redhat.com>
On Wed, 27 Mar 2024 at 10:26, Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> 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.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> roms/Makefile | 17 ++++++++++++++---
> 1 file changed, 14 insertions(+), 3 deletions(-)
>
> diff --git a/roms/Makefile b/roms/Makefile
> index edc234a0e886..783a5cab4f4c 100644
> --- a/roms/Makefile
> +++ b/roms/Makefile
> @@ -52,6 +52,8 @@ SEABIOS_EXTRAVERSION="-prebuilt.qemu.org"
> #
> EDK2_EFIROM = edk2/BaseTools/Source/C/bin/EfiRom
>
> +-include edk2-version
> +
> default help:
> @echo "nothing is build by default"
> @echo "available build targets:"
> @@ -147,10 +149,19 @@ skiboot:
> $(MAKE) -C skiboot CROSS=$(powerpc64_cross_prefix)
> cp skiboot/skiboot.lid ../pc-bios/skiboot.lid
>
> -efi:
> +edk2-version: edk2
> + if test -e edk2/.git; then \
> + echo "EDK2_STABLE = $$(cd edk2; git describe --tags --match 'edk2-stable*')" > $@; \
> + echo "EDK2_DATE = $$(cd edk2; git log -1 --pretty='format:%cd' --date='format:%m/%d/%Y')" >> $@; \
> + else \
> + touch $@; \
> + fi
> +
> +efi: edk2-version
Do we actually need this dependency, by the way? I think Make
will rebuild edk2-version regardless because it's included
(and it would be too late to rebuild it as merely a dependency
of 'efi' here).
> $(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
>
> --
> 2.44.0
-- PMM
next prev parent reply other threads:[~2024-04-09 14:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-27 10:24 [PATCH v2 0/3] edk2: get version + date from git submodule Gerd Hoffmann
2024-03-27 10:24 ` [PATCH v2 1/3] " Gerd Hoffmann
2024-04-09 14:23 ` Peter Maydell [this message]
2024-03-27 10:24 ` [PATCH v2 2/3] edk2: commit version info Gerd Hoffmann
2024-03-27 10:24 ` [PATCH v2 3/3] edk2/seabios: use common extra version Gerd Hoffmann
2024-04-09 14:20 ` [PATCH v2 0/3] edk2: get version + date from git submodule Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFEAcA_4SJFozGAprmMy4AM8Lvp9M2+aZjz3zwNaA2bdkuHKSw@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=kraxel@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).