libloc (0.9.18-1) unstable; urgency=medium

  [ Michael Tremer ]
  * python: Make AS objects hashable
  * network: Fix bit length check when merging networks
  * network: Fix deduplication not looking far enough
  * network-tree: Split into a separate file
  * tools: Import the copy script
  * network-tree: Run deduplication once for each family
  * network-tree: Use the raw prefix to place networks onto the tree
  * network: Tidy up some code
  * tests: Add a simple test for deduplication
  * python: Make Country hashable
  * python: Fix rich comparison function for Country
  * tests: Add some tests for the Country object
  * country: Return NULL/None for unset attributes
  * python: Fix rich comparison for AS objects
  * python: Implement rich comparison for Network objects
  * tests: Build out more dedup tests
  * tests: Show even large diffs in dedup tests
  * tests: Add more dedup/merge tests
  * tests: Make the new tests executable
  * importer: Fix Python syntax error
  * importer: Refactor ARIN importer
  * importer: Drop previously imported AS names, too
  * importer: Tidy up SQL queries
  * configure: Require Lua
  * lua: Create scaffolding for a module
  * .gitignore: Ignore some more temporary files
  * lua: Add version() function
  * lua: Initialize location context
  * lua: Add a Database object with a dummy lookup function
  * lua: Add a Network object
  * lua: Actually return a network after lookup()
  * lua: database: Rename the __gc method for consistency
  * lua: database: Add __close method
  * lua: network: Add a __close method
  * lua: Fix calling methods that belong to an object
  * lua: Check if we can read the network's properties
  * lua: Force garbage collection to test those methods
  * lua: Create Country objects
  * lua: Force testing garbage collection for countries
  * lua: Don't try to free memory that was allocated by Lua
  * lua: country: Export remaining properties
  * lua: Add AS object
  * lua: database: Implementing fetching AS objects
  * lua: database: Implement fetching countries
  * lua: database: Export description/license/vendor
  * lua: database: Implement verify()
  * configure: Check for luaunit
  * lua: Export default database path
  * lua: Export network flags
  * lua: network: Implement checking flags
  * configure: Don't check for Lua when --disable-lua is passed
  * importer: Pass downloader to the ARIN import
  * importer: Create an extra table for feeds
  * importer: Import the Spamhaus ASN feed into the new feeds table
  * importer: Create a feeds table for networks, too
  * importer: Don't import any AS names from Spamhaus
  * importer: Import Spamhaus DROP feeds into the new feeds table
  * importer: Import AWS IP feed into the new feeds table
  * importer: Fix typo in SQL query
  * importer: Reformat the large SQL query
  * importer: Create a new subcommand to import feeds
  * importer: Refactor feed parsing
  * importer: Simplify fetching countries
  * importer: Reformat AWS dictionary
  * importer: Completely rewrite the AWS parser
  * importer: Add the option to only update one feed
  * importer: Refactor parsing Spamhaus DROP feeds
  * importer: Refactor parsing Spamhaus ASNDROP
  * importer: Drop source field from overrides table
  * importer: Drop any data from feeds we no longer support
  * importer: Use the downloader to import Geofeeds
  * importer: Remove superfluous function call
  * importer: Fail if no countries have been imported, yet
  * importer: Ignore certain country codes
  * importer: Make translating country codes more extensible
  * importer: Return known countries as a set()
  * importer: When storing country codes, make the code more straight-
    forward
  * importer: Skip any countries that we don't know
  * importer: Change country code logic
  * importer: Improve check for network objects
  * importer: Improve checks for unspecified networks
  * importer: Also import networks that are smaller than /48 or /24
  * importer: Add option to only import specific RIRs
  * importer: Create a better structure to import RIRs
  * importer: Drop the geofeed sources when updating RIR data
  * importer: No longer import Geofeeds concurrently
  * database: Migrate to psycopg3
  * importer: Move the split functions into the main importer
  * importer: Merge the downloader into our main downloader
  * Update translations
  * Add README.md
  * tree: Fix memory leak in dedup code
  * tree: Be smarter when removing networks from the stack
  * tree: Don't check if we need to fill the stack
  * importer: Add structure to add Geofeed overrides
  * importer: Check imported Geofeed override URLs
  * importer: Ignore comments in Geofeeds
  * database: Create a connection pool for async operation
  * importer: Wrap everything into asyncio
  * importer: Timeout if fetching a Geofeed takes longer than 5 seconds
  * importer: Use database pipelining when parsing feeds
  * importer: Fix incorrect variable name
  * importer: Fix another incorrect variable name
  * importer: Skip ASN lines in extended format
  * importer: Fix another variable error in CSV parser
  * importer: Convert the file handle to text before passing to the CSV
    parser
  * importer: Remove a debugging line
  * importer: Import Geofeed overrides with other Geofeeds
  * importer: Unify the way we check Geofeed URLs
  * importer: Currently update the source when encountering a conflict
  * importer: Allow storing multiple Geofeeds for the same network
  * importer: Convert networks back to string
  * importer: Remove more traces of the Geofeed overrides table
  * importer: ANALYZE all tables before we are running the export
  * importer: Replace all GIST indexes with SP-GIST
  * importer: Make the export 200x faster
  * importer: Drop any indexes we no longer need
  * importer: Drop even more indexes
  * importer: Permit Geofeeds for everything instead of ignoring
  * address: Fix bit length calculation
  * network: Fix handling bit length on merge
  * tests: Add tests for #13236
  * lua: Add compatibility function to compile with Lua >= 5.1
  * lua: Don't raise an error if a network cannot be found
  * tests: Fix bit length tests
  * lua: Create a simple iterator for all networks
  * lua: Cleanup any database iterators
  * address: Add functions to access a specific byte/nibble in an
    address
  * network: Add function to return a reverse pointer for networks
  * lua: Add function that returns subnets of a network
  * lua: Add method to access database creation time
  * importer: Drop EDROP as it has been merged into DROP
  * configure: Use pkg-config to find OpenSSL
  * writer: Fail if the header could not be written successfully
  * writer: Move the cursor back to end when finished writing
  * database: Re-open the file handle in r+ mode
  * configure: Scan for multiple Lua versions
  * lua: Initialize the database object pointer
  * Revert "database: Re-open the file handle in r+ mode"
  * libloc: Allow passing a pointer to the log callback
  * lua: Implement setting a log callback function
  * database: Have the lookup function return 0 even if nothing was
    found
  * lua: Fix raising an exception if no network was found
  * importer: Ensure that we set timestamps in the announcements table
  * lua: Check if we got returned something on some tests
  * lua: Ensure that the testsuite is being executed with the correct
    version
  * tests: lua: Set a variable to true if we are checking for a boolean
    later
  * libloc: Refactor summarizing IP address ranges
  * perl: Fix a couple of NULL-pointer derefences in the module
  * importer: Update a few AWS locations
  * importer: Ignore any sudden disconnects when we fetch a Geofeed
  * importer: Don't import /4 or /10 networks from the routing table
  * po: Update POTFILES.in
  * data: Import today's database
  * jenkins: Initial import
  * configure: Don't automatically detect systemdunitdir
  * configure: Check syntax of Lua check
  * jenkins: Always Lua extension, too
  * jenkins: Don't expect any tests to fail
  * jenkins: Remove extra tests we currently don't support
  * configure: Fail if Lua was enabled, but not found
  * jenkins: Add all supported Debian architectures
  * jenkins: Actually install Lua when we want to build against it
  * configure: Don't run Lua tests if luaunit is not available
  * jenkins: Install lua-unit wherever available
  * configure: Make Lua check work on Fedora, too
  * tree: Add network to the stack after we have tried again
  * tree: Try harder to merge networks
  * jenkins: Upload logs from tests in src/, too
  * tests: Make bit length mismatch message clearer
  * Fix all sorts of string formatting issues
  * configure: Enable more compiler warnings
  * address: Never pass zero to __builtin_ctz
  * tests: Constify path to open in database test
  * jenkins: Install perl(Test::More) on Fedora
  * log: Perform formatting string sanitation when logging to stderr
  * tree: Replace bitfields with flags to mark deleted nodes
  * lua: Perform formatting string sanitization
  * jenkins: Fix syntax to install perl(Test::More)
  * python: Fix type for keyword lists
  * python: Fix unintended fallthrough
  * Fix string formatting issues on 32 bit systems
  * network: Remove dead assignment
  * database: Correctly check return value of dup()

  [ Peter Müller ]
  * location-importer: Add missing area code for AWS
  * location-importer: Fix Spamhaus ASN-DROP parsing
  * location-importer: Replace ARIN AS names source with one that offers
    human-readable names

  [ Stefan Schantl ]
  * perl: Return nothing in case invalid data has been passed to libloc

 -- Michael Tremer <michael.tremer@ipfire.org>  Mon, 10 Mar 2025 11:04:29 +0000

libloc (0.9.17-1) unstable; urgency=medium

  [ Michael Tremer ]
  * importer: Store geofeed URLs from RIR data
  * importer: Add command to import geofeeds into the database
  * importer: Just fetch any exception from the executor
  * importer: Sync geofeeds
  * importer: Use geofeeds for country assignment
  * importer: Use a GIST index for networks from geofeeds
  * importer: Add a search index match geofeed networks quicker
  * importer: Fix reading Geofeeds from remarks
  * importer: Ensure that we only use HTTPS URLs for Geofeeds
  * importer: Validate country codes from Geofeeds
  * importer: Fix parsing gzipped content on invalid Content-Type header
  * po: Update translations
  * network: Drop an unused function to count all networks
  * location: Fix correct set name when family is selected
  * export: Raise an error when trying to export ipset for both families
  * Merge remote-tracking branch 'origin/geofeed'
  * importer: Drop method to import routing information from route
    servers
  * importer: Silently ignore any empty country codes in Geofeeds
  * importer: Convert country codes to uppercase from Geofeeds
  * importer: Skip lines we cannot decode
  * importer: Silence invalid country code warning
  * importer: Catch TimeoutError when loading Geofeeds
  * importer: Log any errors to the database
  * geofeeds: Delete any data on 404
  * geofeeds: Delete any data that did not update within two weeks
  * geofeeds: Catch any invalid URLs
  * database: Log query execution time in debug mode
  * importer: Improve performance of AS name export query
  * geofeed: Parse and normalize any URLs
  * importer: AWS: Add country code of NZ for ap-southeast-5
  * importer: Don't write AS without names into the database
  * importer: Decrease the log level if Spamhaus' files are empty
  * tree: Add flag to delete nodes
  * writer: Cleanup networks before writing
  * tree: Actually delete any deleted nodes
  * Merge networks before writing the database
  * networks: Delete networks from the tree on merge
  * tree: More elegantly prevent deleting the root node
  * network: Decreate log level when deleting networks
  * data: Update database to 2023-07-31
  * configure: Bump version to 0.9.17

  [ Temuri Doghonadze ]
  * po: Add Georgian translation

  [ Hans-Christoph Steiner ]
  * Add bash-completion file for the location command.

  [ Stefan Schantl ]
  * Install bash-completion files.

  [ Petr Písař ]
  * Fix string escaping in location tool

 -- Michael Tremer <michael.tremer@ipfire.org>  Mon, 31 Jul 2023 16:59:38 +0000

libloc (0.9.16-1) unstable; urgency=medium

  [ Peter Müller ]
  * location-importer.in: Conduct sanity checks per DROP list
  * location-importer.in: Add new Amazon region codes

  [ Michael Tremer ]
  * importer: Fix potential SQL command injection
  * configure: Fix incorrect database path
  * python: Export __version__ in location module
  * writer: Add an empty string to the stringpool
  * export: Fix generating file names for ipset output
  * database: Ship a recent default database
  * tests: Drop the test database and use the distributed one
  * database: Correct error code on verification
  * writer: Fix typo in signature variable
  * writer: Assign correct file descriptor for private keys
  * database: Fix check if a signature is set
  * configure: Drop superfluous bracket
  * configure: Bump version to 0.9.16

  [ Petr Písař ]
  * Move location manual from section 8 to section 1
  * Remove shebangs from Python modules
  * Move location manual from section 8 to section 1 in location-
    update.service
  * Install Perl files to Perl vendor directory

 -- Michael Tremer <michael.tremer@ipfire.org>  Sat, 29 Oct 2022 13:25:36 +0000

libloc (0.9.15-1) unstable; urgency=medium

  [ Peter Müller ]
  * Non-maintainer upload.
  * location-importer.in: Fix dangling variable

  [ Michael Tremer ]
  * Replace strerror(errno) with %m in format string throughout
  * Don't abuse errno as return code
  * country: Refactor storing country code and continent code
  * *_unref: Always expect a valid pointer
  * cron: Add a cronjob if systemd is not available
  * Check return value of fread() when reading header
  * configure: Replace obsolete AC_PROG_CC_STDC macro
  * writer: Check if stringpool has been initialized before free
  * database: Use MAP_PRIVATE with mmap()
  * database: Do not try to unmap failed mappings
  * database: Log any errors when mmap() fails
  * database: Increase page size to 64k
  * python: Correctly raise any errors when opening the database
  * database: Improve error reporting when the magic cannot be read
  * python: Fix errors for Database.lookup()
  * stringpool: Implement mmap as optional
  * database: Fall back when mmap() isn't available
  * tests: Add some simple database tests
  * stringpool: Drop function to find next offset
  * database: country: Return better error codes
  * python: Export DatabaseEnumerator type
  * tests: database: Expand test coverage
  * database: Refactor error handling on create
  * database: Break opening procedure into smaller parts
  * database: Refactor checking magic
  * database: Check if this version of libloc supports the database
    format
  * database: Map the entire database into memory as a whole
  * database: Read header from mapped data
  * hexdump: Don't try to dump any empty memory
  * database: Read all data from the large mmap()
  * database: Call madvise() to tell the kernel that we will randomly
    access the data
  * database: Encourage the compiler to inline some functions
  * database: Drop unused offset variable in objects
  * database: Drop debug line
  * database: Initialize r on create
  * tests: Add signing key to verify signatures
  * configure: Check for madvise
  * Fix compilation on MacOS X
  * country: Drop unused CC_LEN
  * tests: country: Don't crash when a country could not be found
  * Revert "database: Increase page size to 64k"
  * writer: Flush everything to disk after writing finishes
  * configure: Make the default database path configurable
  * python: Add new open() interface to easily open a database

 -- Michael Tremer <michael.tremer@ipfire.org>  Mon, 26 Sep 2022 15:36:44 +0000

libloc (0.9.14-1) unstable; urgency=medium

  [ Michael Tremer ]
  * Revert "configure: Require Python >= 3.9"
  * Make sources around that we can run tests without location installed
  * downloader: Fetch __version__ from C module
  * export: Drop using functools
  * verify: Show message on success
  * export: Don't fail when output stream isn't seekable
  * importer: Actually perform the Spamhaus sanity check
  * importer: Change download behaviour
  * importer: Move importing extended sources/ARIN into transaction
  * python: database: Return None if no description/vendor/license set
  * importer: Try to make parsing blocks faster
  * importer: Import each source individually
  * python: Fix missing bracket
  * importer: Tolerate that data might exist from other RIRs
  * importer: Import all sources in alphabetical order

  [ Peter Müller ]
  * location-importer: Only delete override data if we are sure to have
    a valid replacement
  * location-importer: AS names starting with "DNIC" actually are valid

 -- Michael Tremer <michael.tremer@ipfire.org>  Sun, 14 Aug 2022 12:24:16 +0000

libloc (0.9.13-1) unstable; urgency=medium

  [ Michael Tremer ]
  * tests: Add a simple test that lists all networks
  * database: Allocate subnets list only once
  * network: Log a more useful message on invalid prefix
  * network: Add more debugging output when running exclude
  * network: loc_network_subnets: Use correct prefix
  * tests: Break after exporting 1000 networks
  * configure: Require Python >= 3.9
  * export: Enable flattening for everything
  * .gitignore: Ignore *.db files only in main directory
  * tests: Import test database
  * configure: Bump version to 0.9.13

 -- Michael Tremer <michael.tremer@ipfire.org>  Tue, 12 Apr 2022 12:15:34 +0000

libloc (0.9.12-1) unstable; urgency=medium

  [ Michael Tremer ]
  * importer: Parse aggregated networks
  * database: Return something when no filter criteria is configured
  * importer: Correctly hande response codes from Bird
  * importer: Silently ignore any table headers
  * importer: Skip empty lines
  * location: Fix output of list-* commands
  * network: Move a couple of helper functions into headers
  * network: Add function that counts the bit length of an addres
  * network: Drop functions moved in an earlier commit
  * network-list: Rewrite summarize algorithm
  * network: Allow creating any valid networks
  * network: Implement bit length function for IPv4
  * addresses: Implement subtraction for IPv4
  * bogons: Refactor algorithms
  * network-list: Cap prefix length based on family
  * address: Correctly subtract IPv4 addresses
  * bogons: Reset after we have reached the end
  * bogons: Don't consider a network legitimate without a country code
  * Move all address convenience functions into their own header
  * address: Rename in6_addr_cmp into loc_address_cmp
  * address: Rename in6_addr_get_bit/in6_addr_set_bit to loc_address_*
  * addresses: Use loc_address_family which is now available
  * address: Rename increment/decrement functions and modify address in
    place
  * network: Pass prefix in native length
  * strings: Statically allocate all address/network strings
  * address: Initialize all bits of IP addresses
  * address: Prevent under/overflow when incrementing/decrementing
  * network-list: Simplify debugging output on summarize
  * network-list: summarize: Break when we exhausted the network range
  * network-list: Remove debugging line
  * address: Simplify functions
  * address: Fix decrementing IP addresses
  * address: Fix buffer overwrite
  * address: Add some simple tests
  * bogons: Add gaps that are only one address wide
  * bogons: Skip any subnets of former networks
  * as-list: Grow faster to avoid too many re-allocations
  * writer: Use AS list internally
  * network-list: Grow just like the AS list
  * country-list: Grow like AS list
  * writer: Use country list internally
  * importer: Improve performance of network export query
  * writer: I forgot to initalize the country list
  * Refactor parsing IP addresses
  * address: Set default prefix if none is given

 -- Michael Tremer <michael.tremer@ipfire.org>  Wed, 23 Mar 2022 20:11:29 +0000

libloc (0.9.11-1) unstable; urgency=medium

  [ Stefan Schantl ]
  * export: Remove prefix when exporting countries.

  [ Michael Tremer ]
  * ipset: Optimise hash table size
  * ipset: Fix hash type for IPv6
  * ipset: Set maxelem to a fixed size
  * export: Conditionally enable flattening
  * location: Print proper error message for any uncaught exceptions
  * export: Allow exporting to stdout
  * ipset: The minimum hashsize is 64
  * export: Fix filtering logic
  * export: Sightly refactor export logic
  * Bump release to 0.9.11

  [ Peter Müller ]
  * location-importer: Fix parsing LACNIC-flavoured inetnums

 -- Michael Tremer <michael.tremer@ipfire.org>  Thu, 03 Mar 2022 10:44:44 +0000

libloc (0.9.10-1) unstable; urgency=medium

  [ Peter Müller ]
  * Non-maintainer upload.
  * location-importer: Set "is_drop" to "True" even in case of conflicts
  * Process LACNIC geofeed as well
  * location-importer: Improve regex for catching historic/orphaned data
  * location-importer: Replace "UK" with "GB"
  * location-importer.in: Add country code for AWS's "il-central-1" zone
  * location-importer.in: Do not make things more complicated than they
    are

  [ Michael Tremer ]
  * man: Add pages for top level functions
  * man: Add man page for loc_database_new
  * man: Add man pages for all loc_database_* functions
  * export: Make ipset files easily reloadable

 -- Michael Tremer <michael.tremer@ipfire.org>  Wed, 16 Feb 2022 08:53:48 +0000

libloc (0.9.9-2) unstable; urgency=medium

  * Fix broken Debian build

 -- Michael Tremer <michael.tremer@ipfire.org>  Tue, 23 Nov 2021 11:07:22 +0000

libloc (0.9.9-1) unstable; urgency=medium

  [ Michael Tremer ]
  * database: Make IP address const for lookup
  * configure: Enable -fno-semantic-interposition by default
  * network: Drop redundant loc_network_match_flag
  * network: Drop useless loc_network_match_asn function
  * stringpool: Make functions properly private
  * Make loc_network_tree_* functions propertly private
  * Remove LOC_EXPORT from
    loc_network_to_database_v1/loc_network_new_from_database_v1
  * country: Add function that returns flags for special country
  * country: Make country codes beginning with X invalid
  * network: Make loc_network_match_country_code match special countries
  * network: Rename "match" functions to "matches"

  [ Peter Müller ]
  * location.txt: Improve manpage
  * importer.py: Import JPNIC feed as well
  * location-importer: Introduce auxiliary function to sanitise ASNs
  * location-importer.in: Add Spamhaus DROP lists

 -- Michael Tremer <michael.tremer@ipfire.org>  Sat, 20 Nov 2021 15:12:28 +0000

libloc (0.9.8-1) unstable; urgency=medium

  [ Michael Tremer ]
  * importer: Do not try to initialise a column that cannot be NULL with
    NULL
  * configure: Add option to enable GCC's -fanalyzer
  * writer: Break when a network cound not be allocated
  * stringpool: Allow adding empty strings
  * stringpool: Do not call strlen() on potential NULL pointer
  * stringpool: Slightly refactor initialization to help the compiler
    understand
  * stringpool: Avoid memory leak if mmap() fails
  * network: Move some helper functions into network.h
  * python: Permit passing family to database enumerator
  * location: Implement listing bogons
  * Move include files to /usr/include/libloc

  [ Peter Müller ]
  * location-importer.in: Attempt to provide meaningful AS names if
    organisation handles are missing
  * location-importer.in: Braindead me accidentally forgot a "break"
    statement

 -- Michael Tremer <michael.tremer@ipfire.org>  Tue, 21 Sep 2021 10:29:11 +0000

libloc (0.9.7-1) unstable; urgency=medium

  [ Valters Jansons ]
  * po: Update translations
  * systemd: Add Documentation= to location-update

  [ Peter Müller ]
  * location-importer.in: emit warnings due to unknown country code for
    valid networks only
  * location.in: fix search_networks() function call
  * location-importer.in: keep track of sources for networks, ASNs, and
    organisations
  * importer.py: add source information for RIR data feeds
  * location-importer.in: track original countries as well
  * location-importer.in: track original countries more pythonic
  * Implement an additional flag for hostile networks safe to drop
  * location-importer.in: Import (technical) AS names from ARIN
  * location-importer.in: add source column for overrides as well
  * location-importer.in: import additional IP information for Amazon
    AWS IP networks
  * location-import.in: optimise regular expression for filtering ASN
    allocations to other RIRs when parsing ARIN AS names file

  [ Michael Tremer ]
  * countries: Fix matching invalid country codes
  * Bump version to 0.9.7

 -- Michael Tremer <michael.tremer@ipfire.org>  Fri, 09 Jul 2021 17:16:59 +0000

libloc (0.9.6-1) unstable; urgency=medium

  [ Michael Tremer ]
  * location: Fix list-networks-by-as
  * database: Free mmapped countries section

  [ Peter Müller ]
  * location-importer.in: fix typo
  * location-importer.in: delete 6to4 IPv6 space as well
  * location-importer.in: reduce log noise for unusable networks
  * location-importer.in: process unaligned IP ranges in RIR data files
    correctly
  * location-importer.in: skip networks with unknown country codes

 -- Michael Tremer <michael.tremer@ipfire.org>  Wed, 31 Mar 2021 14:06:00 +0100

libloc (0.9.5-1) unstable; urgency=medium

  * Initial release.

 -- Stefan Schantl <stefan.schantl@ipfire.org>  Sun, 27 Oct 2019 18:55:44 +0100
