FS#72024 - [luarocks] Add CFLAGS to env variables passed to builds
Attached to Project:
Community Packages
Opened by Caleb Maclennan (alerque) - Saturday, 04 September 2021, 14:46 GMT
Last edited by Caleb Maclennan (alerque) - Thursday, 07 April 2022, 17:34 GMT
Opened by Caleb Maclennan (alerque) - Saturday, 04 September 2021, 14:46 GMT
Last edited by Caleb Maclennan (alerque) - Thursday, 07 April 2022, 17:34 GMT
|
Details
As discussed on IRC...
Luarocks should be instructed to pass at least RELRO related flags, but potentially other/all CFLAGS that are set by default in `makepkg`, along to builds. |
This task depends upon
Closed by Caleb Maclennan (alerque)
Thursday, 07 April 2022, 17:34 GMT
Reason for closing: Upstream
Additional comments about closing: Upstream dealt with this so we don't need to mess with hacking it into the configs. Just waiting on a release...
Thursday, 07 April 2022, 17:34 GMT
Reason for closing: Upstream
Additional comments about closing: Upstream dealt with this so we don't need to mess with hacking it into the configs. Just waiting on a release...
2021-09-04 13:56:03⇥alerque⇥daurnimator: Any tips on getting full FULL RELRO on Luarocks builtin builds?
2021-09-04 15:53:25⇥daurnimator⇥alerque: you can pass CFLAGS/LIBFLAGS via either the luarocks command line; or via the luarocks config file
2021-09-04 15:53:56⇥daurnimator⇥so we can either pass them in build() step to luarocks; or we can modify the default luarocks config file as-shipped to include relro
2021-09-04 15:54:22⇥daurnimator⇥I think the latter is the better option; but I recall running into some issue?
2021-09-04 16:31:15⇥alerque⇥daurnimator: Any examples of doing that in build()?
2021-09-04 16:31:41⇥alerque⇥daurnimator: This does seem like something we should pass through by default in the luarocks config.
2021-09-04 16:31:43⇥daurnimator⇥alerque: hmm? my suggestion was that we modify the default luarocks config we ship as part of the luarocks package
2021-09-04 16:40:43⇥daurnimator⇥the question then becomes: do we A) have luarocks config respect env vars? or B) hardcode CPPFLAGS from build() time into the luarocks config
2021-09-04 16:41:15⇥daurnimator⇥alerque: for A) consider this /etc/luarocks/config-5.1.lua : http://sprunge.us/9oEESq
2021-09-04 16:46:59⇥alerque⇥daurnimator: I would have expected it to respect env vars by default. I was surprised to find it wasn't.
2021-09-04 16:47:17⇥daurnimator⇥alerque: even weirder; but default it only respects them on freebsd
2021-09-04 16:47:26⇥alerque⇥Oh lovely.
2021-09-04 16:48:54⇥daurnimator⇥alerque: perhaps worth sending a PR upstream to make the freebsd behaviour the same everywhere?
I assume this bug is to make that the default so we don't have to pass it any more?
https://github.com/luarocks/luarocks/commit/7e8058bc399ede42b8eb57d62694015b4c0401e0
It isn't realeased yet, but rather than hacking it into our current packaging lets just hope for an early-ish release. One this lands then we can go through and rebuild packages that need it and remove the manual hacks from where they were used.