Valters Jansons [Sun, 12 Jul 2026 09:12:29 +0000 (18:12 +0900)]
libloc: Drop loc_database_add_as symbol definition
This database_add_as function was superseded by writer_add_as back
in c182393, however the `libloc.sym` file was never updated. This
commit cleans up the exported functions list.
On GNU's ld, this stray function definition gets ignored, but other
linkers could refuse to link (such as LLD 16+), as they would assume
a misconfiguration has taken place.
Signed-off-by: Valters Jansons <valter.jansons@gmail.com> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Valters Jansons [Sun, 12 Jul 2026 08:46:33 +0000 (17:46 +0900)]
man: Clean up existing documentation
While generating the `location-importer` manual page, tooling flagged
supplemental fixes for location(1) and other man3 pages. Some are minor
style and grammar fixes, as well as AsciiDoc markup fixes, but most of
the changes proposed are gradual drift resulting from codebase changes.
This commit incorporates those suggestions.
In addition to existing manpages being cleaned up, loc_set_log_callback
man3 page is being added, as loc_set_log_fn has been deprecated, and
previously had a manpage created. Without the new page, the existing
manpage would just be a dead-end.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Valters Jansons <valter.jansons@gmail.com> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Valters Jansons [Sun, 12 Jul 2026 08:46:14 +0000 (17:46 +0900)]
man: Add manual page for `location-importer`
Currently, the `location-importer` binary gets installed without
a manual page. It's expected that all tools installed get manpages.
This commit proposes a generated manpage, introspecting the script's
handlers and considering the structure of the other existing AsciiDoc
files.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Valters Jansons <valter.jansons@gmail.com> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Valters Jansons [Wed, 24 Jun 2026 17:31:54 +0000 (02:31 +0900)]
debian: Update copyright references
The `tests/data` directory effectively migrated to `data`.
Copyrights entry for these assets is now updated accordingly.
Additionally, Perl licensing "Artistic-or-GPL" stanza currently
points at /usr/share/common-licenses/GPL for "any GPL version".
However, it should be a reference to GPL-1, as plain GPL always
symlinks to the latest available GPL (currently GPL-3).
While we are at it, the IPFire Development Team copyright years
can be updated to reflect that development has continued through
the years.
Signed-off-by: Valters Jansons <valter.jansons@gmail.com> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Valters Jansons [Wed, 24 Jun 2026 17:01:31 +0000 (02:01 +0900)]
configure: Remove AC_PATH_PROG call for pkg-config
We already use PKG_PROG_PKG_CONFIG macro higher up in configure.ac,
and it populates PKG_CONFIG variable already. This AC_PATH_PROG use
is redundant at best, and breaks cross-compilation support in specific
cases. The legacy left-over is safe to drop.
Signed-off-by: Valters Jansons <valter.jansons@gmail.com> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Valters Jansons [Wed, 24 Jun 2026 13:49:01 +0000 (22:49 +0900)]
Makefile: Avoid installing libtool control files
This project currently uses autoconf, automake, and libtool for
building. During build process, libtool creates `.la` control files
with metadata about the `.so` library. On modern systems, shipping
these files is now strongly discouraged.
The `.la` files are generally not used on live systems. The only
scenario where they would be used is if someone loads the library using
libltdl (libtool's `dlopen` wrapper). However, both Python and Lua just
load the library directly using a `dlopen("location.so")` instead of
calling `lt_dlopen("location.la")`. This project does not reference
`lt_dlopen` or `ltdl` as such.
Moreover, the `.la` files include redundant dependency chain
information. For example, the Lua module depends on libloc. Even though
OpenSSL is a transitive dependency (`src/database.c` and `src/writer.c`,
not `src/lua/`), libtool anyway adds `-lssl` (as well as `-lcrypto
-lresolv`) directly to `dependency_libs` of Lua's `location.la`.
Listing these transitive dependencies muddies the chain. If someone is
consuming the Lua module downstream, then libtool would force the full
dependency chain onto them directly, which is not needed.
Additionally, due to hardcoded dependencies, rebuild propagation is
a concern. An upstream library updating their soname requires all
downstream `.la` files to be rebuilt, even if libloc's ABI has not
changed. This is especially painful at distro packaging scale.
As a result, modern packaging is pushing towards removing these `.la`
files. In cases where some libltdl consumers exist, the fallback route
is emptying out the dependency_libs metadata field. This is visible in
Debian Lintian as error `non-empty-dependency_libs-in-la-file`.
We can go the whole way and drop these files outright. The `.la` files
reference each other; therefore, when one is being removed, all of them
should be removed, to avoid dangling references.
Valters Jansons [Wed, 24 Jun 2026 13:39:14 +0000 (22:39 +0900)]
Makefile: Install Lua in `exec` stage, not `data`
Automake installation has two stages:
* `exec` for platform-specific files,
* `data` for platform-agnostic files.
Automake separates the install stages based on the directory (target)
variable name. Built-in targets have known stages. Any custom-defined
ones check simply whether the target name contains `exec` substring.
Currently, the Lua module is installed in the `data` stage, because
`lua` is not considered an `exec` stage name. However, the Lua module
contains C code (it is architecture-specific).
Similar to how Python is installed via `pyexec`, Lua should be
installed via `luaexec`. That way Automake splits it into `exec` stage
correctly.
Internally, the installation target directory is `LUA_INSTALL_CMOD`
which also signals that this is a platform/architecture-specific
installation. This logic remains unchanged, and the Lua `.so` gets
installed to the same target as a result.
This change is also important to allow libtool cleanup to be done in
`install-exec-hook` consistently. Without this change, part of la-files
cleanup would need to be moved to `install-data-hook`.
Valters Jansons [Fri, 5 Jun 2026 10:50:29 +0000 (19:50 +0900)]
configure: Update `location.ipfire.org` links
Since original configuration of these links, some changes have been
made to the website. Now the old location.ipfire.org landing page
redirects users to ipfire.org/location/ instead. This commit makes
sure listed links are direct links, instead of pointing at redirects.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Valters Jansons [Fri, 5 Jun 2026 10:50:28 +0000 (19:50 +0900)]
debian: Update `location.ipfire.org` links
Since original configuration of these links, some changes have been
made to the website. Now the old location.ipfire.org landing page
redirects users to ipfire.org/location/ instead. This commit makes
sure listed links are direct links, instead of pointing at redirects.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Valters Jansons [Wed, 3 Jun 2026 12:47:07 +0000 (21:47 +0900)]
debian: Point at GNU website for full GPL text
The FSF mailing address is outdated and should not be referenced in
copyright license text, as no response will be received from it.
Instead, the GNU website can be used for obtaining license text.
Ref: https://lintian.debian.org/tags/old-fsf-address-in-copyright-file.html Signed-off-by: Valters Jansons <valter.jansons@gmail.com> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 2 Jun 2026 15:53:22 +0000 (15:53 +0000)]
jenkins: Remove Debian package builds for armel
This does not build on forky any more and I am not sure anyone would be
using it:
+ apt-get build-dep -y -aarmel .
Note, using directory '.' to get the build dependencies
Reading package lists...
Building dependency tree...
Reading state information...
Solving dependencies...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
builddeps:.:armel : Depends: debhelper-compat:armel (= 13)
Depends: dh-sequence-python3:armel
Depends: intltool:armel
Depends: liblua5.4-dev:armel but it is not installable
Depends: libssl-dev:armel but it is not installable
Depends: libsystemd-dev:armel but it is not installable
Depends: pkg-config:armel but it is not installable
Depends: python3-all-dev:armel but it is not installable
Depends: xsltproc:armel
Depends: docbook-xsl:armel
E: Unable to satisfy dependencies. Reached two conflicting assignments:
1. builddeps:.:armel=1 is selected for install
2. builddeps:.:armel Depends liblua5.4-dev:armel
but none of the choices are installable:
[no choices]
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 2 Mar 2026 15:03:10 +0000 (15:03 +0000)]
importer: Add some more AWS regions
It does not seem to be very plausible that me-west-1 is in Israel, as
there seems to be a separate region called il-central-1 already. This is
just the best information I have right now.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 20 Nov 2025 16:30:23 +0000 (16:30 +0000)]
importer: Accept ASNs larger than PostgreSQL's integer
We seem to be importing some garbage here which makes the temporary
table overflow. Therefore we are increase the maximum size of the ASN
field to be able to render the database.
Any invalid data is being filtered out regardless.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 27 Jun 2025 13:40:12 +0000 (13:40 +0000)]
database: Fix backtracking after no match was found at the end of the tree
This is a rare bug which only appears if the tree has not been 100%
optimised which might happen because it would not be worth the effort to
remove all dead ends all of the time.
Therefore, we could be reaching a node which is not an actual leaf but
still not find our network. In that case, we will have to go backwards
slightly to check if there has been a less specific match (but a match
nonetheless).
Fixes: #13861 - libloc-0.9.18 fails to find some ASN info Reported-by: Adolf Belka <adolf.belka@ipfire.org> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Valters Jansons [Mon, 7 Apr 2025 01:29:29 +0000 (04:29 +0300)]
tests: Ensure loc_database_lookup finds a match
Commit 9e72b8a modified the lookup function to return 0 even if no
matches are found. As result, the test case could pass even if the
database lookup did not find any matches.
This commit restores the original intent of the test case, by adding
a failure condition when `network1` is NULL. This is similar to how
the subsequent test case was modified for the inverse condition.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 10 Mar 2025 15:28:47 +0000 (15:28 +0000)]
jenkins: Okay, drop Alma Linux again
This thing just seems to be too ancient and does not have packages for
Lua. Instead of creating too many if/else blocks to cover this, let's
remove it again. As far as I am aware, we don't have any known users on
this distribution.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 6 Mar 2025 21:13:49 +0000 (21:13 +0000)]
debian: Don't build man pages
This is not great, but I currently don't have any better option.
Installing asciidoc conflicts with python3-all-dev when cross-compiling.
Since asciidoc is optional and Python isn't this at least generates a
package at the end.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>