From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jochen Sprickerhof To: location@lists.ipfire.org Subject: Re: Upload libloc to Debian Date: Wed, 06 Jul 2022 09:41:25 +0200 Message-ID: In-Reply-To: <1A4374F1-A42A-4A64-8787-BC14BDEDD7E3@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4009966261690936896==" List-Id: --===============4009966261690936896== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable * Michael Tremer [2022-07-05 15:28]: >The license is part of the database file. That is however not very human-fri= eldy to read. > >I added the file to the directory: https://location.ipfire.org/databases/COP= YING Nice, thanks. >> Sounds great, I see that the updated puts the file in >> >> /var/lib/location/database.db >> >> But I don't see where it is used. The libloc-database package would probab= ly install to /usr/share/libloc-database/database.db. Would it be easier if l= ibloc uses that path as a backup if the one in /var is not there or should th= e package add a symlink to be overwritten by the updater? > >The updater would overwrite that symlink since it downloads the file to a te= mporary location, verifies it with the key, and then replaces the old file. S= o that would work. > >We could also search in a backup location. That would not be a lot of extra = work. I am just wondering whether that is very intuitive or whether that woul= d lead to confusion? I guess that depends on how well known the location is and if users=20 could mess with the file such that it would be good to have some program=20 logic with a fall back. >Does the build system not support overwriting that file at all? In principal you can overwrite the file if you have the rights on the=20 system (for example the updater running as root) but you should not=20 modify (non configuration) files installed though a package manager. For one dpkg --verify would complain and also it could produce non=20 deterministic results if a new package version would overwrite the file=20 again with a maybe older version. I guess the symlink should work, will test it. >>>> - According to the Debian Python policy the Python package needs to be r= enamed to python3-location. It would simplify the transition if you could do = the same in your package repo and add a transition package [3]. >>> >>> Oh, I named it that way because that is how Python packages were usually = named in Debian. We can of course absolutely change this. >>> >>> Would you be up for sending a patch for this? >> >> Sure, as a patch to the list or a pull request on Github? > >Please use this list only. We have our tools integrated to it, and GitHub do= es not allow us to host the database on there since it is too large - so we t= ry to keep the home of the project on our own infrastructure. Patch attached. >>> That might be a lot easier since you are already an expert with the Debia= n packaging system. We have been fighting a couple of problems that we couldn= =E2=80=99t really solve. Maybe you can help us with those, too: https://bugzi= lla.ipfire.org/show_bug.cgi?id=3D12468 >> >> I was not able to reproduce this, could you send me a log of when this hap= pens? >> How do you build the package? With the debian/build.sh? > >Yes, we wrote a little helper script to do this. > >As mentioned before, I personally have very limited experience with the Debi= an build system and so this is what we put together :) Any improvements are g= reatly appreciated. debian/build.sh uses sbuild so there could be logs from the old runs on=20 your system, still. If you could have a look for one with the problem,=20 that would help a lot. >>>> - Similar I would propose to merge the location-importer package into th= e python package (for the library part) and the location package (for the bin= ary). >>> >>> We tried to keep the main package as small as possible. The importer part= is not very large, but it does have a dependency to PostgreSQL. Hence we spl= it it, because regular users won=E2=80=99t need it. >> >> Oh, that does not seem to be modeled in the package. Is the location-impor= ter by normal users of libloc? Otherwise I would propose to add a suggest to = PostgreSQL only. > >That is true. We use a database wrapper around psycopg2 which is what should= be added here: > > https://git.ipfire.org/?p=3Dlocation/libloc.git;a=3Dblob;f=3Dsrc/python/lo= cation/database.py;h=3D5d79941515cf830f81d4aff4a1897c4525d99e82;hb=3DHEAD Ah, that's much easier, you can add python3-psycopg2 to the Depends:=20 field of the location-importer package in debian/control. For Debian I would still propose to merge the packages, should we do=20 that in your packages as well? Cheers Jochen --===============4009966261690936896== Content-Type: text/x-diff Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="0001-Rename-Python-package-to-python3-location.patch" MIME-Version: 1.0 RnJvbSBjZjYyN2M3MTAxMTMxZDcyMGVjMGUyMjk2ZWRiZmRjMzQzZWQ2NWI2IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBKb2NoZW4gU3ByaWNrZXJob2YgPGdpdEBqb2NoZW4uc3ByaWNr ZXJob2YuZGU+CkRhdGU6IFR1ZSwgNSBKdWwgMjAyMiAyMzozMDoyOSArMDIwMApTdWJqZWN0OiBb UEFUQ0hdIFJlbmFtZSBQeXRob24gcGFja2FnZSB0byBweXRob24zLWxvY2F0aW9uCgpUbyBjb21w bHkgd2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dGlvbi1weXRob24vdXNyL2xp Yi9weXRob24zKi9zaXRlLXBhY2thZ2VzL19sb2NhdGlvbi5sYQorCXJtIGRlYmlhbi9weXRob24z LWxvY2F0aW9uL3Vzci9saWIvcHl0aG9uMyovc2l0ZS1wYWNrYWdlcy9fbG9jYXRpb24ubGEKIAkj IGxpbml0YW46IGJpbmFyaWVzLWhhdmUtZmlsZS1jb25mbGljdCAoZC9sb2NhdGlvbi1pbXBvcnRl ci5pbnN0YWxsKQotCXJtIGRlYmlhbi9sb2NhdGlvbi1weXRob24vdXNyL2xpYi9weXRob24zKi9z aXRlLXBhY2thZ2VzL2xvY2F0aW9uL2RhdGFiYXNlLnB5Ci0Jcm0gZGViaWFuL2xvY2F0aW9uLXB5 dGhvbi91c3IvbGliL3B5dGhvbjMqL3NpdGUtcGFja2FnZXMvbG9jYXRpb24vaW1wb3J0ZXIucHkK KwlybSBkZWJpYW4vcHl0aG9uMy1sb2NhdGlvbi91c3IvbGliL3B5dGhvbjMqL3NpdGUtcGFja2Fn ZXMvbG9jYXRpb24vZGF0YWJhc2UucHkKKwlybSBkZWJpYW4vcHl0aG9uMy1sb2NhdGlvbi91c3Iv bGliL3B5dGhvbjMqL3NpdGUtcGFja2FnZXMvbG9jYXRpb24vaW1wb3J0ZXIucHkKLS0gCjIuMzYu MQoK --===============4009966261690936896== Content-Type: application/pgp-signature Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="signature.asc" MIME-Version: 1.0 LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0KCmlRSXpCQUFCQ2dBZEZpRUVjN0taeTlUdXJk ekFGK2g2Vy8vY3dsam1sRE1GQW1MRlBLRUFDZ2tRVy8vY3dsam0KbERPK3l4QUFwNE50SlJ0RUNV dUZJZzNWd09mOVFLeXB2Z3IxY3Z1MVJWUGREZm81T25LdmJoTUY0UGIvY0tEMApjUGRvUGYvR3g3 UXdTbnJrb0RJV1R6bW92c2E5dk85aVJTUGtiWHFtWGtUSnRM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