* [PATCH] edk2: get version + date from git submodule
@ 2024-03-25 14:44 Gerd Hoffmann
2024-03-25 14:55 ` Peter Maydell
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Gerd Hoffmann @ 2024-03-25 14:44 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
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.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
roms/Makefile | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/roms/Makefile b/roms/Makefile
index edc234a0e886..534eba17ebd0 100644
--- a/roms/Makefile
+++ b/roms/Makefile
@@ -51,6 +51,8 @@ SEABIOS_EXTRAVERSION="-prebuilt.qemu.org"
# efi ia32, efi x64) into a single rom binary.
#
EDK2_EFIROM = edk2/BaseTools/Source/C/bin/EfiRom
+EDK2_STABLE = $(shell cd edk2; git describe --tags --match 'edk2-stable*')
+EDK2_DATE = $(shell cd edk2; git show --pretty='format:%cd' --date='format:%m/%d/%Y'| head -1)
default help:
@echo "nothing is build by default"
@@ -149,8 +151,9 @@ skiboot:
efi:
$(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
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] edk2: get version + date from git submodule
2024-03-25 14:44 [PATCH] edk2: get version + date from git submodule Gerd Hoffmann
@ 2024-03-25 14:55 ` Peter Maydell
2024-03-26 15:59 ` Gerd Hoffmann
2024-04-09 13:10 ` Peter Maydell
2024-04-09 17:46 ` Michael Tokarev
2 siblings, 1 reply; 9+ messages in thread
From: Peter Maydell @ 2024-03-25 14:55 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel
On Mon, 25 Mar 2024 at 14:45, 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.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> roms/Makefile | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/roms/Makefile b/roms/Makefile
> index edc234a0e886..534eba17ebd0 100644
> --- a/roms/Makefile
> +++ b/roms/Makefile
> @@ -51,6 +51,8 @@ SEABIOS_EXTRAVERSION="-prebuilt.qemu.org"
> # efi ia32, efi x64) into a single rom binary.
> #
> EDK2_EFIROM = edk2/BaseTools/Source/C/bin/EfiRom
> +EDK2_STABLE = $(shell cd edk2; git describe --tags --match 'edk2-stable*')
> +EDK2_DATE = $(shell cd edk2; git show --pretty='format:%cd' --date='format:%m/%d/%Y'| head -1)
I don't think there's any guarantee that the user has 'git'
installed. scripts/qemu-version avoids using "git describe"
unless it's building in a git tree.
You can avoid the "| head -1" by using
git log -1 --pretty='format:%cd' --date='format:%m/%d/%Y'
I think.
Also, does EDK2 really want month/day/year? Typically silly
choice if so :-)
thanks
-- PMM
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] edk2: get version + date from git submodule
2024-03-25 14:55 ` Peter Maydell
@ 2024-03-26 15:59 ` Gerd Hoffmann
0 siblings, 0 replies; 9+ messages in thread
From: Gerd Hoffmann @ 2024-03-26 15:59 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-devel
On Mon, Mar 25, 2024 at 02:55:11PM +0000, Peter Maydell wrote:
> On Mon, 25 Mar 2024 at 14:45, 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.
> >
> > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> > ---
> > roms/Makefile | 7 +++++--
> > 1 file changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/roms/Makefile b/roms/Makefile
> > index edc234a0e886..534eba17ebd0 100644
> > --- a/roms/Makefile
> > +++ b/roms/Makefile
> > @@ -51,6 +51,8 @@ SEABIOS_EXTRAVERSION="-prebuilt.qemu.org"
> > # efi ia32, efi x64) into a single rom binary.
> > #
> > EDK2_EFIROM = edk2/BaseTools/Source/C/bin/EfiRom
> > +EDK2_STABLE = $(shell cd edk2; git describe --tags --match 'edk2-stable*')
> > +EDK2_DATE = $(shell cd edk2; git show --pretty='format:%cd' --date='format:%m/%d/%Y'| head -1)
>
> I don't think there's any guarantee that the user has 'git'
> installed. scripts/qemu-version avoids using "git describe"
> unless it's building in a git tree.
Hmm. Have to figure something else then I guess.
> You can avoid the "| head -1" by using
> git log -1 --pretty='format:%cd' --date='format:%m/%d/%Y'
> I think.
Works. Thanks.
> Also, does EDK2 really want month/day/year? Typically silly
> choice if so :-)
Yes.
It's the smbios spec being silly btw, this lands more or less
directly in /sys/class/dmi/id/bios_date. edk2 itself doesn't
care.
take care,
Gerd
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] edk2: get version + date from git submodule
2024-03-25 14:44 [PATCH] edk2: get version + date from git submodule Gerd Hoffmann
2024-03-25 14:55 ` Peter Maydell
@ 2024-04-09 13:10 ` Peter Maydell
2024-04-09 14:14 ` Gerd Hoffmann
2024-04-09 17:46 ` Michael Tokarev
2 siblings, 1 reply; 9+ messages in thread
From: Peter Maydell @ 2024-04-09 13:10 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel
On Mon, 25 Mar 2024 at 14:45, 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.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> roms/Makefile | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/roms/Makefile b/roms/Makefile
> index edc234a0e886..534eba17ebd0 100644
> --- a/roms/Makefile
> +++ b/roms/Makefile
> @@ -51,6 +51,8 @@ SEABIOS_EXTRAVERSION="-prebuilt.qemu.org"
> # efi ia32, efi x64) into a single rom binary.
> #
> EDK2_EFIROM = edk2/BaseTools/Source/C/bin/EfiRom
> +EDK2_STABLE = $(shell cd edk2; git describe --tags --match 'edk2-stable*')
> +EDK2_DATE = $(shell cd edk2; git show --pretty='format:%cd' --date='format:%m/%d/%Y'| head -1)
>
> default help:
> @echo "nothing is build by default"
> @@ -149,8 +151,9 @@ skiboot:
>
> efi:
> $(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
Hi -- I've just noticed that we never made this change to
automate the date/version for EDK2 ROMs, but we also never
updated the version by hand. So at the moment we ship an
EDK2 blob that wrongly claims to be an older version.
See this bug report by a user:
https://gitlab.com/qemu-project/qemu/-/issues/2233
Is it possible to fix this for 9.0?
thanks
-- PMM
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] edk2: get version + date from git submodule
2024-04-09 13:10 ` Peter Maydell
@ 2024-04-09 14:14 ` Gerd Hoffmann
2024-04-09 14:19 ` Peter Maydell
0 siblings, 1 reply; 9+ messages in thread
From: Gerd Hoffmann @ 2024-04-09 14:14 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-devel
Hi,
> > + --version-override "$(EDK2_STABLE)-for-qemu" \
> > + --release-date "$(EDK2_DATE)" \
>
> Hi -- I've just noticed that we never made this change to
> automate the date/version for EDK2 ROMs, but we also never
> updated the version by hand. So at the moment we ship an
> EDK2 blob that wrongly claims to be an older version.
> See this bug report by a user:
>
> https://gitlab.com/qemu-project/qemu/-/issues/2233
>
> Is it possible to fix this for 9.0?
I've posted v2 (series) a while back, no feedback so far.
https://lore.kernel.org/qemu-devel/20240327102448.61877-1-kraxel@redhat.com/
If there are no objections I can do a PR for these three patches plus an
edk2 binary rebuild (which shouldn't change anything but the version
string).
take care,
Gerd
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] edk2: get version + date from git submodule
2024-04-09 14:14 ` Gerd Hoffmann
@ 2024-04-09 14:19 ` Peter Maydell
2024-04-09 15:13 ` Peter Maydell
0 siblings, 1 reply; 9+ messages in thread
From: Peter Maydell @ 2024-04-09 14:19 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel
On Tue, 9 Apr 2024 at 15:14, Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> Hi,
>
> > > + --version-override "$(EDK2_STABLE)-for-qemu" \
> > > + --release-date "$(EDK2_DATE)" \
> >
> > Hi -- I've just noticed that we never made this change to
> > automate the date/version for EDK2 ROMs, but we also never
> > updated the version by hand. So at the moment we ship an
> > EDK2 blob that wrongly claims to be an older version.
> > See this bug report by a user:
> >
> > https://gitlab.com/qemu-project/qemu/-/issues/2233
> >
> > Is it possible to fix this for 9.0?
>
> I've posted v2 (series) a while back, no feedback so far.
>
> https://lore.kernel.org/qemu-devel/20240327102448.61877-1-kraxel@redhat.com/
>
> If there are no objections I can do a PR for these three patches plus an
> edk2 binary rebuild (which shouldn't change anything but the version
> string).
I guess that's safe enough, though the very-conservative
choice would be to take just the EDK2 rebuild for 9.0.
thanks
-- PMM
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] edk2: get version + date from git submodule
2024-04-09 14:19 ` Peter Maydell
@ 2024-04-09 15:13 ` Peter Maydell
2024-04-09 16:33 ` Gerd Hoffmann
0 siblings, 1 reply; 9+ messages in thread
From: Peter Maydell @ 2024-04-09 15:13 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel
On Tue, 9 Apr 2024 at 15:19, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Tue, 9 Apr 2024 at 15:14, Gerd Hoffmann <kraxel@redhat.com> wrote:
> >
> > Hi,
> >
> > > > + --version-override "$(EDK2_STABLE)-for-qemu" \
> > > > + --release-date "$(EDK2_DATE)" \
> > >
> > > Hi -- I've just noticed that we never made this change to
> > > automate the date/version for EDK2 ROMs, but we also never
> > > updated the version by hand. So at the moment we ship an
> > > EDK2 blob that wrongly claims to be an older version.
> > > See this bug report by a user:
> > >
> > > https://gitlab.com/qemu-project/qemu/-/issues/2233
> > >
> > > Is it possible to fix this for 9.0?
> >
> > I've posted v2 (series) a while back, no feedback so far.
> >
> > https://lore.kernel.org/qemu-devel/20240327102448.61877-1-kraxel@redhat.com/
> >
> > If there are no objections I can do a PR for these three patches plus an
> > edk2 binary rebuild (which shouldn't change anything but the version
> > string).
>
> I guess that's safe enough, though the very-conservative
> choice would be to take just the EDK2 rebuild for 9.0.
Would you be able to get a pullreq in for this before rc3?
(I can delay rc3 by a day or so if necessary; I'd rather
not have to do an rc4 if we can avoid it...)
thanks
-- PMM
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] edk2: get version + date from git submodule
2024-04-09 15:13 ` Peter Maydell
@ 2024-04-09 16:33 ` Gerd Hoffmann
0 siblings, 0 replies; 9+ messages in thread
From: Gerd Hoffmann @ 2024-04-09 16:33 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-devel
On Tue, Apr 09, 2024 at 04:13:34PM +0100, Peter Maydell wrote:
> On Tue, 9 Apr 2024 at 15:19, Peter Maydell <peter.maydell@linaro.org> wrote:
> >
> > On Tue, 9 Apr 2024 at 15:14, Gerd Hoffmann <kraxel@redhat.com> wrote:
> > >
> > > Hi,
> > >
> > > > > + --version-override "$(EDK2_STABLE)-for-qemu" \
> > > > > + --release-date "$(EDK2_DATE)" \
> > > >
> > > > Hi -- I've just noticed that we never made this change to
> > > > automate the date/version for EDK2 ROMs, but we also never
> > > > updated the version by hand. So at the moment we ship an
> > > > EDK2 blob that wrongly claims to be an older version.
> > > > See this bug report by a user:
> > > >
> > > > https://gitlab.com/qemu-project/qemu/-/issues/2233
> > > >
> > > > Is it possible to fix this for 9.0?
> > >
> > > I've posted v2 (series) a while back, no feedback so far.
> > >
> > > https://lore.kernel.org/qemu-devel/20240327102448.61877-1-kraxel@redhat.com/
> > >
> > > If there are no objections I can do a PR for these three patches plus an
> > > edk2 binary rebuild (which shouldn't change anything but the version
> > > string).
> >
> > I guess that's safe enough, though the very-conservative
> > choice would be to take just the EDK2 rebuild for 9.0.
>
> Would you be able to get a pullreq in for this before rc3?
> (I can delay rc3 by a day or so if necessary; I'd rather
> not have to do an rc4 if we can avoid it...)
https://lore.kernel.org/qemu-devel/20240409162942.454419-1-kraxel@redhat.com/T/
take care,
Gerd
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] edk2: get version + date from git submodule
2024-03-25 14:44 [PATCH] edk2: get version + date from git submodule Gerd Hoffmann
2024-03-25 14:55 ` Peter Maydell
2024-04-09 13:10 ` Peter Maydell
@ 2024-04-09 17:46 ` Michael Tokarev
2 siblings, 0 replies; 9+ messages in thread
From: Michael Tokarev @ 2024-04-09 17:46 UTC (permalink / raw)
To: Gerd Hoffmann, qemu-devel
25.03.2024 17:44, Gerd Hoffmann:
> 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.
Fixes: https://gitlab.com/qemu-project/qemu/-/issues/2233
Thanks,
/mjt
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2024-04-09 17:47 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-25 14:44 [PATCH] edk2: get version + date from git submodule Gerd Hoffmann
2024-03-25 14:55 ` Peter Maydell
2024-03-26 15:59 ` Gerd Hoffmann
2024-04-09 13:10 ` Peter Maydell
2024-04-09 14:14 ` Gerd Hoffmann
2024-04-09 14:19 ` Peter Maydell
2024-04-09 15:13 ` Peter Maydell
2024-04-09 16:33 ` Gerd Hoffmann
2024-04-09 17:46 ` Michael Tokarev
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.