Building freeradius against mariadb client library
Bill Schoolfield
bill at billmax.com
Fri Jul 21 15:25:28 UTC 2023
On 7/21/2023 8:04 AM, Matthew Newton via Freeradius-Users wrote:
> On 20/07/2023 23:21, Bill Schoolfield wrote:
>> On 7/20/2023 5:05 PM, Matthew Newton via Freeradius-Users wrote:
> >>
>>> dpkg-query won't query the repos, so you'll only see things that are
>>> already installed.
>>
>> Thanks I was using these command interchangeably. Debian is new to me
>> and it seems there are many commands for getting info on packages.
>
> Understood... I've been using Debian ~25 years and I don't think I've
> ever used dpkg-query before. Generally you should stick to the 'apt'
> commands and ignore 'dpkg' until you know what you're doing.
>
>
>>>> I either need the appropriate packages for Debian, or I need to
>>>> alter the build to use the mariadb library and includes. Perhaps
>>>> modifying configure.ac to use mariadb_config?
>>>>
>>>> What is the solution here?
>>>
>>> $ make deb
>>
>> What does this link against? Ideally I'd like mariadb clients and
>> the mariadb server on this host only.
>
> Whatever libraries are installed on the system and satisfy the package
> build dependencies (see debian/control.in). I don't think mysql is
> even available on Debian 12, so you're safe. If you really want to
> check then e.g. spin up a Docker instance and build it in there, then
> the build output will show what's being installed.
>
control.in requires: default-libmysqlclient-dev | libmysqlclient-dev
I did install default-libmysqlclient-dev and freeradius built w/o error
and rlm_sql is working.
So I now have mysql and mariadb client libraries on this host. Our
clients (apps) use the latter, freeradius uses the former to "talk" to a
mariadb server. While I'm sure there are some differences these should
be interchangeable. Seems unnecessary or maybe even ugly to have both
though.
While working this I realized we have the same situation with our perl
scripts elsewhere that use DBI /DBD. They presently use mysql as well.
Bill
>
>>> or the simplest is to just use the packages we provide from Network
>>> RADIUS:
>>>
>>> https://packages.networkradius.com/
>>
>> Considering this. The reason for building was we were a CentOS shop
>> and the packaged FreeRadius was very old. We also (at the time) had
>> our own module (written in C). That module has since been retired.
>
> The main reason why we provide packages is because distros don't
> historically provide very recent FreeRADIUS packages, though the
> situation is a bit better these days. If you've got no custom modules
> and want the latest packages, then the NR packages we build should be
> fine - we build them on every new FR release.
>
> (There are packages for CentOS/RHEL/Rocky etc as well which are also
> up-to-date, but I fully support your move to Debian :) )
>
More information about the Freeradius-Users
mailing list