From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gisle Vanem To: location@lists.ipfire.org Subject: Re: What generates database.db from database.txt? Date: Wed, 21 Oct 2020 13:07:36 +0200 Message-ID: <30238400-7580-8c9e-2cc8-27d648680f41@gmail.com> In-Reply-To: <339DD4F5-353D-4466-A59F-DCB43289F22B@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0384757121976585277==" List-Id: --===============0384757121976585277== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Michael Tremer wrote: > This probably requires some more debugging and log output. >=20 > You can set LOC_LOG=3D7 as an environment variable and then run test/test-c= ountry. With this, test-country only reports an extra: libloc: loc_new: ctx 05021298 created But with '-DENABLE_DEBUG' there's way too much trace to be useful. > I pulled the database last week because we had some issue with some data in= it that triggered some bugs. >=20 > You can download it from the archive still until the updater works again: >=20 > https://location.ipfire.org/databases/1/archive/location-2020-10-16.db.xz > Yes, I assumed so. There are some tools that use but they might potentially= just bundle it with their own software which I want to avoid. >=20 > It probably is possible to #ifdef the Windows crypto library here and check= the signature that way. But since I have never worked with it, I do not know= how to do that. Mac OS X has the same issue. An issue with OpenSSL and 'loc_database_verify()'? > Have you ever worked with it? Yes, but 'test-signature' works fine. It's just when calling 'EVP_VerifyXX()' functions from a .dll (like a Python module), it fails with 'no OPENSSL_AppLink". Ref: =20 https://stackoverflow.com/questions/38933943/openssl-code-works-natively-but-= as-dll-causes-openssl-uplink-no-openssl-applink With your URL above, set loc_log=3D7 & py -3 location.py --database location-2020-10-16.db verif= y: libloc: loc_new: ctx 0FDACEE8 created libloc: loc_database_read_as_section_v1: Read 48148 ASes from the database libloc: loc_database_read_network_nodes_section_v1: Read 2628939 network node= s from the database libloc: loc_database_read_networks_section_v1: Read 1318972 networks from the= database libloc: loc_database_read_countries_section_v1: Read 253 countries from the d= atabase libloc: loc_database_read: Opened database in 16.0000ms libloc: loc_database_read_as_section_v1: Read 48148 ASes from the database libloc: loc_database_read_network_nodes_section_v1: Read 2628939 network node= s from the database libloc: loc_database_read_networks_section_v1: Read 1318972 networks from the= database libloc: loc_database_read_countries_section_v1: Read 253 countries from the d= atabase libloc: loc_database_read: Opened database in 27.0000ms OPENSSL_Uplink(640BC6B0,08): no OPENSSL_Applink BUT, with 'location-2020-05-15.db', there is this error: libloc: loc_new: ctx 0FA35190 created libloc: loc_database_read_header: Incompatible database version: 0 Traceback (most recent call last): File "F:\gv\VC_project\ws_trace\src\Geo-IP\IPFire\libloc\src\py3_install\l= ocation.py", line 618, in main() File "F:\gv\VC_project\ws_trace\src\Geo-IP\IPFire\libloc\src\py3_install\l= ocation.py", line 616, in main c.run() File "F:\gv\VC_project\ws_trace\src\Geo-IP\IPFire\libloc\src\py3_install\l= ocation.py", line 200, in run db =3D location.Database(args.database) SystemError: returned NULL without setting an err= or libloc: loc_unref: context 0FA35190 released ---- Check yourself if the 'location-2020-05-15.db.xz' is still in the archive. --=20 --gv --===============0384757121976585277==--