premake-core icon indicating copy to clipboard operation
premake-core copied to clipboard

Allow bootstrapping with system lua

Open seragh opened this issue 2 months ago • 2 comments

What problem will this solve?

Allows removing contrib dir before bootstrapping premake, this is so distribution packager can feel comfortable knowing they don't use vendored deps.

Anything else we should know? The major part of https://bugs.gentoo.org/773475 got addressed recently, so premake can avoid being dropped. Now I'd like the cherry on top :D

seragh avatar Nov 13 '25 15:11 seragh

I wonder if update contrib would not also solve the issue (I suppose last versions don't have vulnerabilities reported).

Jarod42 avatar Nov 14 '25 16:11 Jarod42

I wonder if update contrib would not also solve the issue (I suppose last versions don't have vulnerabilities reported).

Linux distribution typically have a policy of no vendored libraries and unbundle them whenever possible. The reason is its easier for them to track vulnerabilities and updating a single shared lib may solve the issue distro wide in contrast to packages in question statically linking some old vulnerable library shipped with it's tarball.

Updating the vulnerable libraries in contrib would be a good thing for many user, but the linked bug is actually better addressed by the somewhat recent addition of the options "curl-src" and friends. So a bump in Gentoo should fix the direct and known security concerns.

This bug is meant to asked to make it possible to run

$ git clone <...>
$ cd premake-core
$ rm -rf contrib/
$ make -f Bootstrap.mak PREMAKE_OPTS="<all switches needed for not using contrib>" linux

and as such making premake "clean" in this regard.

seragh avatar Nov 15 '25 06:11 seragh

So to confirm, your issue is not in the premake binary itself, but the bootstrap binary that generates the final binary?

nickclark2016 avatar Dec 22 '25 00:12 nickclark2016

Yes, yes that would allow to just delete contrib at the start of the package build and clearly communicate I'm not a problematic package.

seragh avatar Dec 29 '25 13:12 seragh

Hi,

Even when manually editing the Bootstrap.mak to no longer require contrib and use an external lua the src/host/debug_prompt.c has a

#include "../../contrib/lua/src/lua.c"

So that file and all its transitive includes are currently also neccessary.

Dariqq avatar Jan 03 '26 22:01 Dariqq