From patchwork Tue Mar 11 16:36:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 8516 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R10" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4ZBzt12xffz3xDt for ; Tue, 11 Mar 2025 16:36:25 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "E5" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4ZBzt06hv5z7lV for ; Tue, 11 Mar 2025 16:36:24 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4ZBzt05xSHz371D for ; Tue, 11 Mar 2025 16:36:24 +0000 (UTC) X-Original-To: development@lists.ipfire.org Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R10" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4ZBzsx4kCTz30VM for ; Tue, 11 Mar 2025 16:36:21 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4ZBzsw6d7Gz7gn; Tue, 11 Mar 2025 16:36:20 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1741710981; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cw5Wnmn8RNwlATZ/3dM6viUm/RGSDLhqIzx5XcmetTs=; b=4l5t3qexkVnR+z4ypdb49p3/ZnwE8bMAfB2yMtOJHbbzP3TvNQqcBZqVTBnLb/eo3d2bfs ORobxsPa6HlgfhAA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1741710981; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cw5Wnmn8RNwlATZ/3dM6viUm/RGSDLhqIzx5XcmetTs=; b=SxHVIwbZNNkC24M/YoMhTVQF/JlOoKuauv9qPO7oCKKqzToBboXgkyB4sTuTAQ/a56NKCG w2V7HseiEcXj9opVG8IaIO8hRHGaWFFENQxyGfFBBDdNiNLHQrzMEiKxsnclE69xC+vLMN w+29OQVW7s934upiO1c0YjUlCSiY/w0hDagJ+ohk2cJVExMCR7pmH1Ae2dglO2+ep9DHK9 /kdH+P+/RQBxSI5jBzjSpJt4s/l/Ill2c8XrLAHA6l0jNTPJ3J6xh9WuaCvc7ycCqIebvu kYumAeyH5Z8+hCWYgK86+HHYnUPGeKz7NPVoSfQHxaNC2BZ2mzGYCElPB3a7kQ== From: Adolf Belka To: development@lists.ipfire.org Cc: Adolf Belka Subject: [PATCH] libloc: Update to version 0.9.18 Date: Tue, 11 Mar 2025 17:36:17 +0100 Message-ID: <20250311163617.3335337-1-adolf.belka@ipfire.org> Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: MIME-Version: 1.0 - Update libloc from version 0.9.17 to 0.9.18 - Update of rootfile - Update of patch to revert installing of perl files into perl vendor directory as source file has changed enough. - Changelog 0.9.18 * A new Lua module has been added as announced here: https://www.ipfire.org/blog/ipfire-location-lua-bindings-for-fun-and-profit * The algorithm to detect bogons and duplicates in the tree have massively been improved and should be nearing their theoretical maximum in terms of performance. * A large number of stability and correctness fixes have been rolled out. These mostly affect the code generating the database. * We now have a small Jenkins pipeline which will check if the library still builds for a couple of major Linux distributions and various architectures. Python: * AS and Country objects are now hashable and support rich comparison operations Importer: * Exporting the database is around 200x faster due to eliminating any excessive joins. Instead a new temporary table will be created and a temporary index will be used to apply various updates to the data from various sources inside the database. That allows us to create the export iteratively instead of having one large query that runs for forever. An export that formerly took around 17-20 hrs(!) will now take only ~5 mins. * A new source for human-friendly names for Autonomous Systems registered with ARIN has been added * Importing feeds from AWS and Spamhaus has been split off into separate database tables. This will allow us to import them separately and prioritise our own rewrites over them. * The ARIN parser has been refactored based on csv.DictReader(), parsers for the AWS and Spamhaus feeds have been rewritten, too * Geofeeds are now fetched concurrently with a unified downloader * Certain country codes will be entirely ignored. Currently this is YU for former Yugoslavia and ZZ which is used to say “no country” * Country codes can now be corrected on the fly. This is used to change UK to GB as only the latter is the valid country code for the United Kingdom. * Countries that are not on our list will not be imported any more. * Networks larger than /4 for IPv6, and /10 for IPv4 won’t be imported any more. This avoids that we propagate any issues in the global routing table into the database. Signed-off-by: Adolf Belka --- config/rootfiles/common/libloc | 4 +- lfs/libloc | 12 +-- ...Perl-files-to-Perl-vendor-directory.patch} | 86 ++++++++----------- 3 files changed, 44 insertions(+), 58 deletions(-) rename src/patches/{libloc-0.9.17-Revert-Install-Perl-files-to-Perl-vendor-directory.patch => libloc-0.9.18-Revert-Install-Perl-files-to-Perl-vendor-directory.patch} (70%) diff --git a/config/rootfiles/common/libloc b/config/rootfiles/common/libloc index f6481ccd6..3317173d9 100644 --- a/config/rootfiles/common/libloc +++ b/config/rootfiles/common/libloc @@ -13,6 +13,7 @@ usr/bin/location #usr/include/libloc/format.h #usr/include/libloc/libloc.h #usr/include/libloc/network-list.h +#usr/include/libloc/network-tree.h #usr/include/libloc/network.h #usr/include/libloc/private.h #usr/include/libloc/resolv.h @@ -22,6 +23,8 @@ usr/bin/location #usr/lib/libloc.so usr/lib/libloc.so.1 usr/lib/libloc.so.1.0.3 +#usr/lib/lua/5.4/location.la +usr/lib/lua/5.4/location.so usr/lib/perl5/site_perl/5.36.0/xxxMACHINExxx-linux-thread-multi/Location.pm #usr/lib/perl5/site_perl/5.36.0/xxxMACHINExxx-linux-thread-multi/auto/Location #usr/lib/perl5/site_perl/5.36.0/xxxMACHINExxx-linux-thread-multi/auto/Location/.packlist @@ -35,7 +38,6 @@ usr/lib/python3.10/site-packages/location/__init__.py usr/lib/python3.10/site-packages/location/downloader.py usr/lib/python3.10/site-packages/location/export.py usr/lib/python3.10/site-packages/location/i18n.py -#usr/lib/python3.10/site-packages/location/importer.py usr/lib/python3.10/site-packages/location/logger.py usr/share/bash-completion/completions/location #usr/share/locale/de/LC_MESSAGES/libloc.mo diff --git a/lfs/libloc b/lfs/libloc index 8e753672a..8e438b50d 100644 --- a/lfs/libloc +++ b/lfs/libloc @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2024 IPFire Team # +# Copyright (C) 2007-2025 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -24,8 +24,8 @@ include Config -VER = 0.9.17 -DB_DATE = 2024-04-16 +VER = 0.9.18 +DB_DATE = 2025-03-11 DB_TIME = 03:45 THISAPP = libloc-$(VER) @@ -44,8 +44,8 @@ objects = $(DL_FILE) \ $(DL_FILE) = https://source.ipfire.org/releases/libloc/$(DL_FILE) location-$(DB_DATE).db.xz = https://location.ipfire.org/databases/1/archive/location-$(DB_DATE)-$(DB_TIME).db.xz -$(DL_FILE)_BLAKE2 = b0bf860ebaccd3cb49c58c066c430f7a1f936a2029957db9b88e22c04240af0268a8f6388e8ca512102f14033037a2ab8bbb93fe83e525b9859c790c5c382df4 -location-$(DB_DATE).db.xz_BLAKE2 = f60ca7c2e3ac7cb7e6dc94501f0028dfb76f65330ba4f35934addc65bac8af9b3ce0149956aa3ca9211c9843b34d94255328af840d250f1e4612d9af90e7b6e9 +$(DL_FILE)_BLAKE2 = ccb730684c98756ef318f0cd5698b42ee4a997083811025ac5bf650798efb70dca97e1638b3f20da5d7b38a204fe5214a87fa7b61b8b70d71e6c8ad0577b0839 +location-$(DB_DATE).db.xz_BLAKE2 = adce971179f19c28906842ac08e5b90d55f73d91e0ffa27f98777c1ce8882dc9c4d1df1e9d45e06cf829e010a927f973d98830105c3aca58a86be7a172974861 install : $(TARGET) @@ -80,7 +80,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar xvf $(DIR_DL)/$(DL_FILE) # https://lists.ipfire.org/pipermail/development/2022-November/014763.html - cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/libloc-0.9.17-Revert-Install-Perl-files-to-Perl-vendor-directory.patch + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/libloc-0.9.18-Revert-Install-Perl-files-to-Perl-vendor-directory.patch cd $(DIR_APP) && ./autogen.sh cd $(DIR_APP) && ./configure \ diff --git a/src/patches/libloc-0.9.17-Revert-Install-Perl-files-to-Perl-vendor-directory.patch b/src/patches/libloc-0.9.18-Revert-Install-Perl-files-to-Perl-vendor-directory.patch similarity index 70% rename from src/patches/libloc-0.9.17-Revert-Install-Perl-files-to-Perl-vendor-directory.patch rename to src/patches/libloc-0.9.18-Revert-Install-Perl-files-to-Perl-vendor-directory.patch index 90f756e53..37793fd17 100644 --- a/src/patches/libloc-0.9.17-Revert-Install-Perl-files-to-Perl-vendor-directory.patch +++ b/src/patches/libloc-0.9.18-Revert-Install-Perl-files-to-Perl-vendor-directory.patch @@ -1,19 +1,37 @@ -From e80f2517a230b73b1de554e6fe19e81947c2b665 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Peter=20M=C3=BCller?= -Date: Tue, 31 Jan 2023 10:04:31 +0000 -Subject: [PATCH] Revert "Install Perl files to Perl vendor directory" - -This reverts commit b26c2109eaf229d8c297266f12cd4757d7f14eb8. ---- - Makefile.am | 17 ++++++++--------- - configure.ac | 12 +----------- - 2 files changed, 9 insertions(+), 20 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 7f0d8d0..049832f 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -241,8 +241,7 @@ build-perl: src/libloc.la +diff -Naur libloc-0.9.18.orig/configure.ac libloc-0.9.18/configure.ac +--- libloc-0.9.18.orig/configure.ac 2025-03-10 12:07:35.000000000 +0100 ++++ libloc-0.9.18/configure.ac 2025-03-11 12:38:58.112546283 +0100 +@@ -265,18 +265,10 @@ + AC_PATH_PROG(PERL, perl, no) + AC_SUBST(PERL) + +-AX_PROG_PERL_MODULES(Config ExtUtils::MakeMaker,, AC_MSG_WARN(Need some Perl modules)) ++AX_PROG_PERL_MODULES(ExtUtils::MakeMaker,, AC_MSG_WARN(Need some Perl modules)) + + AC_ARG_ENABLE(perl, AS_HELP_STRING([--disable-perl], [do not build the perl modules]), [],[enable_perl=yes]) + AM_CONDITIONAL(ENABLE_PERL, test "$enable_perl" = "yes") +-AS_IF([test "$enable_perl" = "yes"], +- [ +- PERL_MODPATH=$($PERL -MConfig -e 'print $Config{installvendorarch}') +- PERL_MANPATH=$($PERL -MConfig -e 'print $Config{installvendorman3dir}') +- AC_SUBST(PERL_MODPATH) +- AC_SUBST(PERL_MANPATH) +- ], +-) + + dnl Checking for libresolv + case "${host}" in +@@ -323,6 +315,4 @@ + Lua shared path: ${LUA_INSTALL_LMOD} + Lua module path: ${LUA_INSTALL_CMOD} + Perl: ${enable_perl} +- Perl module path: ${PERL_MODPATH} +- Perl manual path: ${PERL_MANPATH} + ]) +diff -Naur libloc-0.9.18.orig/Makefile.am libloc-0.9.18/Makefile.am +--- libloc-0.9.18.orig/Makefile.am 2025-03-10 12:07:35.000000000 +0100 ++++ libloc-0.9.18/Makefile.am 2025-03-11 12:47:38.043250613 +0100 +@@ -325,8 +325,7 @@ @test -e $(builddir)/src/perl/t/Location.t || ln -s --relative $(srcdir)/src/perl/t/Location.t $(builddir)/src/perl/t/ @test -e $(builddir)/src/perl/typemap || ln -s --relative $(srcdir)/src/perl/typemap $(builddir)/src/perl/ @@ -23,7 +41,7 @@ index 7f0d8d0..049832f 100644 INC="-I$(abs_srcdir)/src" LIBS="-L$(abs_builddir)/src/.libs -lloc" cd $(builddir)/src/perl && $(MAKE) touch build-perl -@@ -254,20 +253,20 @@ check-perl: testdata.db build-perl +@@ -338,20 +337,20 @@ .PHONY: install-perl install-perl: build-perl @@ -51,37 +69,3 @@ index 7f0d8d0..049832f 100644 bin_SCRIPTS = \ src/scripts/location \ -diff --git a/configure.ac b/configure.ac -index 96e6b0e..f6d30f7 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -175,18 +175,10 @@ PKG_CHECK_MODULES([PYTHON], [python-${PYTHON_VERSION}]) - AC_PATH_PROG(PERL, perl, no) - AC_SUBST(PERL) - --AX_PROG_PERL_MODULES(Config ExtUtils::MakeMaker,, AC_MSG_WARN(Need some Perl modules)) -+AX_PROG_PERL_MODULES(ExtUtils::MakeMaker,, AC_MSG_WARN(Need some Perl modules)) - - AC_ARG_ENABLE(perl, AS_HELP_STRING([--disable-perl], [do not build the perl modules]), [],[enable_perl=yes]) - AM_CONDITIONAL(ENABLE_PERL, test "$enable_perl" = "yes") --AS_IF([test "$enable_perl" = "yes"], -- [ -- PERL_MODPATH=$($PERL -MConfig -e 'print $Config{installvendorarch}') -- PERL_MANPATH=$($PERL -MConfig -e 'print $Config{installvendorman3dir}') -- AC_SUBST(PERL_MODPATH) -- AC_SUBST(PERL_MANPATH) -- ], --) - - dnl Checking for libresolv - case "${host}" in -@@ -232,6 +224,4 @@ AC_MSG_RESULT([ - - Bindings: - Perl: ${enable_perl} -- Perl module path: ${PERL_MODPATH} -- Perl manual path: ${PERL_MANPATH} - ]) --- -2.35.3 -