This gets complicated when there may be multiple projects that have different Ubuntu version requirements. For example, consider this workspace structure:
Pwn/Foo - Builds under 22.04
Pwn/Bar - Builds under 16.04
Pwn/Baz - No builder version preference
Let's say that the default Ubuntu version used by a plain pwnmake call from the root directory runs an Ubuntu 18.04 container. This is fine for building Pwn/Baz, as it doesn't have a builder version preference. However, for Pwn/Foo and Pwn/Bar, this will not be okay. Therefore, the all[Pwn/Bar] and all[Pwn/Baz] targets will need to be defined to do a sub-pwnmake build of those directories rather than directly building them. Unfortunately, make's jobserver won't correctly handle job slot sharing automatically, but that can be worried about in a later issue.
I'll probably allow Build.mk files to do something like this:
Pwn/Foo/Build.mk
BUILDER_VERSION := 22.04
Ubuntu aliases such as "jammy" could be used in place of the version number (22.04).
After #21 lands, but before this issue is implemented, challenges which require specific versions can be built manually like pwnmake --tag 22.04 all[Pwn/Foo].
Some challenges, such as https://github.com/SunshineCTF/SunshineCTF-2022-Public/tree/master/Pwn/RII-MagicTheGatheRIIng, need to be built on a specific version of Ubuntu. There should be a properly supported mechanism for
Build.mk
files to set a necessary version of Ubuntu to build it with.This gets complicated when there may be multiple projects that have different Ubuntu version requirements. For example, consider this workspace structure:
Let's say that the default Ubuntu version used by a plain
pwnmake
call from the root directory runs an Ubuntu 18.04 container. This is fine for buildingPwn/Baz
, as it doesn't have a builder version preference. However, forPwn/Foo
andPwn/Bar
, this will not be okay. Therefore, theall[Pwn/Bar]
andall[Pwn/Baz]
targets will need to be defined to do a sub-pwnmake
build of those directories rather than directly building them. Unfortunately, make's jobserver won't correctly handle job slot sharing automatically, but that can be worried about in a later issue.I'll probably allow
Build.mk
files to do something like this:Pwn/Foo/Build.mk
Ubuntu aliases such as "jammy" could be used in place of the version number (22.04).