LINBIT / csync2

file synchronization tool using librsync and current state databases
GNU General Public License v2.0
145 stars 39 forks source link

Fix so-names for additional libraries #7

Open krig opened 6 years ago

krig commented 6 years ago

Commit 36e738e fixed the name passed to dlopen for libsqlite3.so. This patch fixes the names for other libraries as well.

rck commented 6 years ago

Hi Kristoffer,

Holiday season... LGTM, but let me have a closer look. Lars or me will merge/comment soon. If this does not happen till the end of the week, feel free to kick us.

Thanks, rck

krig commented 6 years ago

No problem, same here :)

lge commented 6 years ago

On Wed, Aug 15, 2018 at 07:32:07AM -0700, Kristoffer Grönlund wrote: Subject: [PATCH] Fix so-names for additional libraries

Commit 36e738e fixed the name passed to dlopen for libsqlite3.so. This patch fixes the names for other libraries as well.

db_mysql.c | 8 ++++---- db_postgres.c | 8 ++++---- db_sqlite2.c | 11 ++++-------

Not that easy.

Probably needs to have a configure.ac replacement define there somehow, because distributions/distribution versions ship different versions of these libraries. You hardcode .18, but others may be at older versions still, or are at newer versions already (debian/ubuntu are .20 afaics). Similar with libpq.

That was not a problem with sqlite3, there (currently) is only the .0 out there, so I was Same with sqlite2 (if someone really still wants to use that):

But if "someone" was to fix the other instances, that should be fixed properly for sqlite2/3 as well.

Note: csync2 with postgres and mysql would likely need a bit polish on the table creation, index definition and probably SQL queries in general to work "as intended" in all situations.

Cheers, Lars

krig commented 6 years ago

Yeah, this is clearly not a proper fix, but we've had this patch laying around forever so I thought I should at least submit it for review :)