Bug 13780 - Add LUA bindings for libloc (feature request)
Summary: Add LUA bindings for libloc (feature request)
Status: CLOSED FIXED
Alias: None
Product: Location Database
Classification: Unclassified
Component: libloc (show other bugs)
Version: unspecified
Hardware: unspecified Unspecified
: - Unknown - Minor Usability
Assignee: Michael Tremer
QA Contact: Peter Müller
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-26 09:26 UTC by Michael
Modified: 2025-04-15 15:56 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael 2024-09-26 09:26:54 UTC
As asked for in https://community.ipfire.org/t/dump-location-database/12074/6, please add LUA bindings for libloc aka location/GeoIP. 

Those bindings are necessary to access the location database from LUA scripts, in this case from HAProxy. 

For further reference: https://www.ipfire.org/blog/ipfire-location-lua-bindings-for-fun-and-profit

Thanks,
Michael
Comment 1 Michael Tremer 2024-09-26 20:29:14 UTC
Hello,

currently we don't have a release tagged that contains all the changes. A couple of things are still outstanding of which I have fixed a few harder ones today.

We will upgrade and ship the Lua module as soon as possible.
Comment 2 Michael 2024-09-27 08:05:54 UTC
Thanks Michael, I'm looking forward to the release 😀
Comment 3 Michael 2024-09-27 14:31:06 UTC
Are there prerequists, like recompiling the location binaries with LUA interfaces, just curious!

Guess, I cannot simply replace those binaries, right, currently I'm on core 188.
Comment 4 Michael Tremer 2024-09-27 15:17:10 UTC
Yes, there have been loads of changes to the library and functions being added that are only used by Lua. That is to keep the logic in the library and have the bindings as simple as possible.
Comment 5 Michael 2024-10-17 11:27:19 UTC
May I assume that the latest release of IPFire 189 does not include a modified version of libloc to get those LUA bindings?

I know you guys are busy but is there an approx. date when I can expect the bindings to be available?
Comment 6 Michael Tremer 2024-10-17 14:15:02 UTC
(In reply to Michael from comment #5)
> May I assume that the latest release of IPFire 189 does not include a
> modified version of libloc to get those LUA bindings?

No, it was not scheduled to.

> I know you guys are busy but is there an approx. date when I can expect the
> bindings to be available?

If you want a date, then it is probably going to be next year. Unless you want to help me iron out the remaining bugs before we can tag a release.

I think it might be done, I am just not sure what new regressions it might introduce.
Comment 7 Michael 2024-10-18 07:53:20 UTC
Thanks Mike for the job offer ;-)

I doubt that I will be of any help. Programming is no problem at all, however, learning a possible new programming language will be the main barrier right now.

Anyway, I will eagerly wait for your work to be finished sometime in future.

Thanks for your work!
Comment 8 Michael 2025-03-04 13:52:54 UTC
Any news on this? 

I understood the former announcement like it would be no big deal to implement/activate LUA support in libloc anytime soon.

Thought, that someone already did made up his mind and binaries had "just" to be recompiled to get things running.

cu,
Michael
Comment 9 Michael Tremer 2025-03-10 11:10:31 UTC
(In reply to Michael Tremer from comment #6)
> I think it might be done, I am just not sure what new regressions it might
> introduce.

I still have no clue what could have been broken, but there is no good in the code sitting in the repository and not being used at all by anyone.

So I am preparing for a release. Please report any problems that you find.

> https://git.ipfire.org/?p=location/libloc.git;a=commitdiff;h=8cbdc19cda26d37dca354135c2825fa6a4d94ff4