Page MenuHomeFreeBSD

sysutils/edk2: Add bhyve as a new FLAVOR of edk2
ClosedPublic

Authored by bcran on May 8 2022, 2:07 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 20, 2:14 PM
Unknown Object (File)
Tue, Nov 19, 7:31 AM
Unknown Object (File)
Fri, Nov 8, 2:13 PM
Unknown Object (File)
Fri, Nov 8, 2:13 PM
Unknown Object (File)
Fri, Nov 8, 2:13 PM
Unknown Object (File)
Fri, Nov 8, 2:13 PM
Unknown Object (File)
Fri, Nov 8, 2:13 PM
Unknown Object (File)
Fri, Nov 8, 2:13 PM
Subscribers

Details

Summary

Instead of having a separate sysutils/uefi-edk2-bhyve port, add bhyve
as a FLAVOR of edk2.

To support existing users who depend on firmware in /usr/local/share/uefi-firmware
create compatibility symlinks. The packaging list appears to be generated
correctly, however the code as it is doesn't install the files under uefi-firmware.

Update sysutils/bhyve-firmware to depend on edk2@bhyve .

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 45588
Build 42476: arc lint + arc unit

Event Timeline

bcran requested review of this revision.May 8 2022, 2:07 AM
bcran created this revision.

As I mentioned in the summary, the following code doesn't do what I want it to: it doesn't create /usr/local/share/uefi-firmware.

sysutils/edk2/Makefile
162

I would prefer .if defined

165

Same

169

With the blank line above it's not part of do-install, probably your problem.

sysutils/edk2/Makefile
169

Even when I have the following, the files still aren't being installed.

do-install:
        ${MKDIR} ${STAGEDIR}/${PREFIX}/share/${PORTNAME}-${PLAT}/
        ${INSTALL_DATA} -v ${WRKDIR}/Build/${PLAT_RESULT} ${STAGEDIR}/${PREFIX}/share/${PORTNAME}-${PLAT}/${PLAT_FILENAME}
        ${INSTALL_DATA} -v ${WRKDIR}/Build/${PLAT_RESULT_CODE} ${STAGEDIR}/${PREFIX}/share/${PORTNAME}-${PLAT}/${PLAT_FILENAME_CODE}
        ${INSTALL_DATA} -v ${WRKDIR}/Build/${PLAT_RESULT_VARS} ${STAGEDIR}/${PREFIX}/share/${PORTNAME}-${PLAT}/${PLAT_FILENAME_VARS}
        ${MKDIR} ${STAGEDIR}/${PREFIX}/share/uefi-firmware/
        ${RLN} -v ${STAGEDIR}/${PREFIX}/share/${PORTNAME}-${PLAT}/${PLAT_FILENAME} ${STAGEDIR}/${PREFIX}/share/uefi-firmware/${PLAT_FILENAME}
        ${RLN} -v ${STAGEDIR}/${PREFIX}/share/${PORTNAME}-${PLAT}/${PLAT_FILENAME_CODE} ${STAGEDIR}/${PREFIX}/share/uefi-firmware/${PLAT_FILENAME_CODE}
        ${RLN} -v ${STAGEDIR}/${PREFIX}/share/${PORTNAME}-${PLAT}/${PLAT_FILENAME_VARS} ${STAGEDIR}/${PREFIX}/share/uefi-firmware/${PLAT_FILENAME_VARS}

I don't need to do something to refresh the packaging list apart from running make FLAVOR=bhyve clean followed by make FLAVOR=bhyve do I?

sysutils/edk2/Makefile
169

You need to add those the PLIST_FILES too, sorry I've missed that earlier.

bcran marked 3 inline comments as done.May 9 2022, 1:09 AM
bcran marked an inline comment as done.
bcran added inline comments.
sysutils/edk2/Makefile
169

Oh of course! Thanks.

You probably need a CONFLICT too for this flavor this you install links at the place of the other port.

bcran marked an inline comment as done.

Deleted sysutils/uefi-edk2-bhyve and added an entry to MOVED.

In D35148#797304, @manu wrote:

You probably need a CONFLICT too for this flavor this you install links at the place of the other port.

It probably makes sense to just delete the other port.

Deleted sysutils/uefi-edk2-bhyve and added an entry to MOVED.

I don't see this in the diff.

Actually deleted sysutils/uefi-edk2-bhyve this time.

LGTM but don't forget to add the MOVED entry too.

This revision is now accepted and ready to land.May 16 2022, 1:11 PM
This revision now requires review to proceed.May 16 2022, 1:12 PM
This revision is now accepted and ready to land.May 16 2022, 1:17 PM

Urgh, I remembered just in time about sysutils/bhyve-firmware that will also need updated.

@bcran: I have read that this patch supersedes https://reviews.freebsd.org/D35053, which should have addressed bug https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=263546 according to comment 2. However, I see that this patch is about uefi-edk2-bhyve and sysutils/edk2, not about sysutils/uefi-edk2-qemu: my knowledge about these ports is close to zero, but could you please confirm if this patch still fixes the build of sysutils/uefi-edk2-qemu with GCC 11?

Also, please note that we also have bug https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=263543 about sysutils/edk2 not building with GCC 11: since you are already touching this port, it might be a good idea to fix that bug too.

Finally, as I worked on other bugs related to the GCC default version update, I found that I was unable to reproduce some of them: the results of the exp-run are old and outdated, so, before doing complicate stuff to fix things, you might want to check if things are indeed broken.

Thanks.

Updated sysutils/bhyve-firmware to depend on edk2@bhyve

This revision now requires review to proceed.May 25 2022, 2:09 AM
This revision is now accepted and ready to land.May 25 2022, 7:25 AM