[Rpm-maint] [rpm-software-management/rpm] Upgrade lua dependencies (#165)
The libraries in 'luaext' are ancient (from 2003!) vendored in versions of [lrexlib](https://rrthomas.github.io/lrexlib/) and [lposix](http://webserver2.tecgraf.puc-rio.br/~lhf/ftp/lua/#lposix) (which was superceded by [luaposix](https://github.com/luaposix/luaposix)) It's time to upgrade. and even more preferable: make rpm depend on those libraries dynamically rather than vendoring them in. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/165___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Upgrade to work with lua 5.3 without compat mode (#166)
Did some work on a branch over here: https://github.com/rpm-software-management/rpm/compare/master...daurnimator:lua5.3-no-compat -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/166#issuecomment-282218302___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
[Rpm-maint] [rpm-software-management/rpm] Upgrade to work with lua 5.3 without compat mode (#166)
rpm currently only works with lua 5.3 if lua is compiled/included in compatibility mode. The code has taken the odd approach of reimplementing deprecated functions in terms of new functions, rather than updating the code to use the new functions (they were deprecated for a reason!), and potentially having backwards compat macros (such as provided by https://github.com/keplerproject/lua-compat-5.3) to still work with 5.1 -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/166___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
[Rpm-maint] [rpm-software-management/rpm] work with lua 5.3 without compat mode (#169)
See #166 PR is currently missing backwards compat shims. They should be taken from https://github.com/keplerproject/lua-compat-5.3/ (or possibly lua-compat-5.3 should become a dependency?) You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/169 -- Commit Summary -- * lib/rpmliblua: Don't use deprecated luaL_pushmodule function * luaext/: Use luaL_newlib and luaL_setfuncs instead of deprecated luaL_openlib * rpmio/rpmlua: Use luaL_requiref instead of manual process -- File Changes -- M lib/rpmliblua.c (8) M luaext/lposix.c (8) M luaext/lrexlib.c (6) M rpmio/rpmlua.c (5) -- Patch Links -- https://github.com/rpm-software-management/rpm/pull/169.patch https://github.com/rpm-software-management/rpm/pull/169.diff -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/169 ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Upgrade lua library dependencies (#165)
> How's the compatibility record of these modules upstream? Rather good incrementally; but 14 years is a lot of incremental changes... -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/165#issuecomment-282983033___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] work with lua 5.3 without compat mode (#169)
@Conan-Kudo in that case there is code that can be stripped out. e.g. the stuff inside ``` #if (LUA_VERSION_NUM < 502) || defined(LUA_COMPAT_MODULE) ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/169#issuecomment-284941483___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] work with lua 5.3 without compat mode (#169)
> In general we want to keep rpm buildable on recent RHEL which in this case > means RHEL-7, and that in turn means Lua 5.1. But compat stuff for older than > that can go, as far as I'm concerned. In that case I recommend you depend on https://github.com/keplerproject/lua-compat-5.3/ there. I'm not sure how you want to introduce that dependency? I often do it with a git subtree. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/169#issuecomment-284964810___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] work with lua 5.3 without compat mode (#169)
@pmatilai ping? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/169#issuecomment-329948924___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] work with lua 5.3 without compat mode (#169)
@Conan-Kudo How should we depend on it without vendoring? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/169#issuecomment-341949996___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] work with lua 5.3 without compat mode (#169)
> What I'd prefer is a patch that adds support for Lua 5.3 without requiring > LUA_COMPAT_MODULE for it, but allowing 5.1-5.2 to keep building without any > extra hassle. That's what compat-5.3 is for. The question in here was how to bring in a new dependency? Is vendoring the best way? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/169#issuecomment-363153092___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] work with lua 5.3 without compat mode (#169)
> And I meant adding the couple of required #ifdef's into the code directly, > without pulling a whole external entity into our codebase for our rather > modest needs. Well I guess it's easy enough to pull ~20 lines out of compat-5.3 and paste them into the start of the file -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/169#issuecomment-363507584___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] work with lua 5.3 without compat mode (#169)
@daurnimator pushed 3 commits. 9c590a2 Squashed 'luaext/compat-5.3/' content from commit bc91f4091 8b7f1dc Use lua-compat-5.3 for backwards compatibility with lua 5.1 2f0130e lib/rpmliblua.c: lua 5.1 compat without compat-5.3 -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/rpm-software-management/rpm/pull/169/files/c2169e607d8f0ff621838ea7fbb4b9a1c74752d2..2f0130e3f127ff569aa0e55eda709b3dbfaaf675 ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] work with lua 5.3 without compat mode (#169)
PR updated with full solution (using lua-compat-5.3) that works with 5.1 and 5.3 on my computer. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/169#issuecomment-380004383___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] work with lua 5.3 without compat mode (#169)
@daurnimator pushed 4 commits. 69dc569 rpmio/rpmlua.c: Use lua_rawlen instead of deprecated luaL_getn 2fb6dc4 rpmio/rpmlua.c: lua_pushglobaltable provided by lua-compat-5.3 ebb545a luaext/userconfig.c: Remove useless file 22d5899 rpmio/rpmlua.c: LUA_PATH global hasn't been used since lua 5.0 -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/rpm-software-management/rpm/pull/169/files/2f0130e3f127ff569aa0e55eda709b3dbfaaf675..22d58996ca9cd3a3c653eb2f205553a9ecab95e2 ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] work with lua 5.3 without compat mode (#169)
> This doesn't even compile against a build of Lua where the compat-stuff is > actually disabled, due to missing port of luaL_openlib() in rpmio/rpmlua.c This was brought up above with the open question of how best to solve the compatibilty issues. > Folks, if you're submitting untested code then at least have the courtesy of > stating so. Sorry, this was meant to be part 1 of a 3 part pull request (I was going to submit the rest after). Looks like I messed up the interim commit. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/169#issuecomment-379982324___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] work with lua 5.3 without compat mode (#169)
Btw, there were a few open questions around the further PRs. e.g. what is the split between rpm and rpmio: the lua library is *mostly* in rpmio, however the `rpmvercmp` (exposed as `rpm.vercmp` in lua) is not in rpmio -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/169#issuecomment-379987989___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] work with lua 5.3 without compat mode (#169)
> Thanks for the update, but I've been asking NOT to drag in the entire > lua-compat thing Right. Which is why I've asked *many* times (including via email and IRC) how to introduce a new dependency for rpm. > If you need a place to stick the actually required "~20 lines" of > compat-macros/inline functions, I suppose rpmio/rpmlua.h could be used for > that, it's an internal header anyway. I don't think this is a good path: it would make it hard to merge in upstream changes of lua-compat-5.3 as well as require that people who change code to use new lua functions add in new definitions. > the integration should be along the lines of "download latest version from , > unpack and (re)run configure, enjoy". Okay. so that's all that is required for adding a dependency? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/169#issuecomment-381785133___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Remove use of obsolete lua_strlen() function (76ab365)
odd indentation here. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/commit/76ab3651be8c6be89c2c42324ec723d5fd97359f#commitcomment-30932184___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] work with lua 5.3 without compat mode (#169)
Closed #169. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/169#event-1908560112___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] work with lua 5.3 without compat mode (#169)
Should I reopen then? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/169#issuecomment-430892851___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] work with lua 5.3 without compat mode (#169)
Reopened #169. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/169#event-1911366930___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] work with lua 5.3 without compat mode (#169)
Thanks for merging @pmatilai. Just had a look through now and code itself is fine. However compared to my branch I noticed the code on master has some mixed whitespace. Have a look through e.g. `rpmlua.c` for leading tabs. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/169#issuecomment-466593910___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint