Bug 234658

Summary: net/ipxe: improvements to Makefile
Product: Ports & Packages Reporter: keve
Component: Individual Port(s)Assignee: Tobias Kortkamp <tobik>
Status: Closed FIXED    
Severity: Affects Some People Flags: tobik: maintainer-feedback+
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
ipxe Makefile patch tobik: maintainer-approval-

Description keve 2019-01-06 10:25:12 UTC
Created attachment 200828 [details]
ipxe Makefile patch

To whom it may concern, 

please find attached small improvements to the Makefile for net/ipxe.

Currently the makefile builds iPXE for two use-cases, booting a full iPXE image or chain-loading via PXE. This is just a subset of the use cases for iPXE.
See https://ipxe.org/download, https://ipxe.org/docs and the bullets under "Starting iPXE".

The diff improves the port to cover all use cases.

* Introduce "BOOT" option to toggle creating boot images. (default on, for continuity)
* Introduce "UNDIONLY" option to toggle creating chain loadable image. (default on, for continuity)
* Introduce "VMWARE" option to toggle creating ROMs for VMware. (prominent use-case)
* ${IPXE_ALL_TARGET} global scoped variable to enable further customization of the build (i.e. adding additional ROM targets)

Patch tested with poudriere against FreeBSD 11.2 and FreeBSD 12.

I am looking forward to getting this merged.

Cheers,

Keve
Comment 1 Tobias Kortkamp freebsd_committer 2019-01-06 11:19:24 UTC
Comment on attachment 200828 [details]
ipxe Makefile patch

We can build the VMWare ROMs unconditionally.  I'd rather not add
more options to the port.

IPXE_MAKE_ARGS was a mistake, so no to adding IPXE_ALL_TARGET.
Customization should happen via Makefile.local.  If you need to
build custom images put

ALL_TARGET+=	bin/foobar.rom

in Makefile.local, or to disable specific images

ALL_TARGET:=	${ALL_TARGET:Nbin/undionly.kpxe}
Comment 2 commit-hook freebsd_committer 2019-01-06 11:51:15 UTC
A commit references this bug:

Author: tobik
Date: Sun Jan  6 11:50:46 UTC 2019
New revision: 489461
URL: https://svnweb.freebsd.org/changeset/ports/489461

Log:
  net/ipxe: Build VMware ROMs

  PR:		234658

Changes:
  head/net/ipxe/Makefile
  head/net/ipxe/files/pkg-message.in
Comment 3 keve 2019-01-07 09:45:05 UTC
Dear Tobias, 

your proposed workaround to customize the port with Makefile.local does not work in an automated build environment like poudriere, where the ports tree is mounted read-only.
How does your Makefile.local work with poudriere?

I don't see your point in avoiding the number of options in the port. According to 

https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefile-options.html
 Users may need a different configuration than the default, so the ports system provides hooks the port author can use to control which variant will be built. Supporting these options properly will make users happy, and effectively provide two or more ports for the price of one.

iPXE can be used in many different ways and the options directly reflect these ways. Not building the BOOT options reduces build time considerably.

Please advice.

Cheers,

Keve
Comment 4 Tobias Kortkamp freebsd_committer 2019-01-11 12:31:28 UTC
(In reply to keve from comment #3)
> Dear Tobias, 
> 
> your proposed workaround to customize the port with Makefile.local does not
> work in an automated build environment like poudriere, where the ports tree
> is mounted read-only.
> How does your Makefile.local work with poudriere?

This has nothing to do with Poudriere or how it mounts the ports tree
read-only in builder jails.  You can still edit the ports tree Poudriere
checks out just fine on the build host.