psi-4ward / docker-powerdns

PowerDNS Docker Image based on Alpine
106 stars 110 forks source link

adds support for lua #33

Closed djaenecke closed 4 years ago

djaenecke commented 4 years ago

Enables lua for powerdns

manwe-pl commented 4 years ago

+1 for this one, it's not "PowerDNS with all Backends" until you include Lua

Compiles fines, I've checked.

psi-4ward commented 4 years ago

is lua-dev and curl-dev required on runtime? I assume it's not so let's add it to build-deps, they are removed from the final image.

psi-4ward commented 4 years ago

Pls give it a try, I've upgraded pdns to 4.3

manwe-pl commented 4 years ago

Unfortunately powerdns people changed something in 4.3 and this PR doesn't work with this version. There's still no lua support.

# ls -la /usr/lib/pdns/*so
-rwxr-xr-x    1 root     root        272376 Jun 23 13:55 /usr/lib/pdns/libbindbackend.so
-rwxr-xr-x    1 root     root        129056 Jun 23 13:55 /usr/lib/pdns/libgmysqlbackend.so
-rwxr-xr-x    1 root     root        108504 Jun 23 13:55 /usr/lib/pdns/libgpgsqlbackend.so
-rwxr-xr-x    1 root     root         71640 Jun 23 13:55 /usr/lib/pdns/libgsqlite3backend.so
-rwxr-xr-x    1 root     root        116704 Jun 23 13:55 /usr/lib/pdns/libpipebackend.so

After quick lookup, looks like you have to add lua2 into --with-modules parameter. After this:

# ls -la /usr/lib/pdns/*so
-rwxr-xr-x    1 root     root        272376 Jun 23 14:07 /usr/lib/pdns/libbindbackend.so
-rwxr-xr-x    1 root     root        129056 Jun 23 14:07 /usr/lib/pdns/libgmysqlbackend.so
-rwxr-xr-x    1 root     root        108504 Jun 23 14:07 /usr/lib/pdns/libgpgsqlbackend.so
-rwxr-xr-x    1 root     root         71640 Jun 23 14:07 /usr/lib/pdns/libgsqlite3backend.so
-rwxr-xr-x    1 root     root        333784 Jun 23 14:07 /usr/lib/pdns/liblua2backend.so
-rwxr-xr-x    1 root     root        116704 Jun 23 14:07 /usr/lib/pdns/libpipebackend.so

# pdns_server --launch=lua2
Jun 23 14:08:18 Guardian is launching an instance
Jun 23 14:08:18 UDP server bound to 0.0.0.0:53
Jun 23 14:08:18 TCP server bound to 0.0.0.0:53
Jun 23 14:08:18 Master/slave communicator launching
Jun 23 14:08:18 Creating backend connection for TCP
Jun 23 14:08:18 Unable to read configuration file from 'powerdns-luabackend.lua': No such file or directory
Jun 23 14:08:18 Unable to read configuration file from 'powerdns-luabackend.lua': No such file or directory
manwe-pl commented 4 years ago

@psi-4ward This ticket is closed, you want me to open another one for this?