libmaxminddb/libmaxminddb.spec

111 lines
3.4 KiB
RPMSpec
Raw Permalink Normal View History

- update to 1.10.0: * The reader can now lookup records on a database with a search tree that is greater than 4 gigabytes without sometimes returning erroneous results due to an integer overflow. * Four additional fields were added to the end of the MMDB_search_node_s struct returned by MMDB_read_node. These making undocumented assumptions about how this library works internally and without knowing the specific details of the database * Previously, reading a database with a pointer in the metadata would cause an MMDB_INVALID_METADATA_ERROR to be returned. This was due to an invalid offset being used when calculating the pointer. The data_section and metadata_section fields now both point to the beginning of the data section. Previously, data_section pointed to the beginning of the data separator. This will not affect * MMDB_lookup_sockaddr will set mmdb_error to MMDB_IPV6_LOOKUP_IN_IPV4_DATABASE_ERROR if an IPv6 sockaddr is looked up in an IPv4-only database. Previously only * When resolving an address, this library now relies on getaddrinfo * Packaging fixes. The 1.1.3 tarball release contained a lot of extra past the end of the databases's data section. GitHub #103 * When searching for the database metadata, there was a bug that caused the code to think it had found valid metadata when none existed. In database entirely. Finally, if there are multiple metadata markers in the database, we treat the final one as the start of the metdata, * Don't attempt to mmap a file that is too large to be mmapped on the system. * Added a missing out of memory check when reading a file's metadata. * Added several additional checks to make sure that we never attempt to malloc more than SIZE_MAX memory, which would lead to integer overflow. This could only happen with pathological databases. OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libmaxminddb?expand=0&rev=31
2024-07-20 20:04:46 +02:00
#
# spec file for package libmaxminddb
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2023 Andreas Stieger <Andreas.Stieger@gmx.de>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define lname libmaxminddb0
Name: libmaxminddb
Version: 1.10.0
Release: 0
Summary: C library for the MaxMind DB file format
License: Apache-2.0
URL: https://dev.maxmind.com/
Source: https://github.com/maxmind/libmaxminddb/releases/download/%{version}/%{name}-%{version}.tar.gz
Source99: baselibs.conf
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: pkgconfig
%description
The libmaxminddb library provides a C library for reading MaxMind DB
files, including the GeoIP2 databases from MaxMind. This is a
custom binary format designed to facilitate fast lookups of IP
addresses while allowing for great flexibility in the type of
data associated with an address.
%package -n %{lname}
Summary: C library for the MaxMind DB file format
%description -n %{lname}
The libmaxminddb library provides a C library for reading MaxMind DB
files, including the GeoIP2 databases from MaxMind. This is a
custom binary format designed to facilitate fast lookups of IP
addresses while allowing for great flexibility in the type of
data associated with an address.
%package -n mmdblookup
Summary: An utility to look up an IP address in a MaxMind DB file
%description -n mmdblookup
The libmaxminddb library provides a C library for reading MaxMind DB
files, including the GeoIP2 databases from MaxMind. This is a
custom binary format designed to facilitate fast lookups of IP
addresses while allowing for great flexibility in the type of
data associated with an address.
This package contains the mmdblookup binary.
%package devel
Summary: Development files for the MaxMind DB file format library
Requires: %{lname} = %{version}
%description devel
The libmaxminddb library provides a C library for reading MaxMind DB
files, including the GeoIP2 databases from MaxMind. This is a
custom binary format designed to facilitate fast lookups of IP
addresses while allowing for great flexibility in the type of
data associated with an address.
This package contains the development files for %{name}.
%prep
%autosetup -p1
%build
%configure --disable-static
%make_build
%check
%make_build check
%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print
%fdupes -s %{buildroot}/%{_prefix}
%ldconfig_scriptlets -n %{lname}
%files -n %{lname}
%license LICENSE
%{_libdir}/%{name}.so.*
%files -n mmdblookup
%license LICENSE
%doc doc/mmdblookup.md
%{_bindir}/mmdblookup
%{_mandir}/man1/mmdblookup.*
%files devel
%doc Changes.md NOTICE README.md doc/mmdblookup.md doc/libmaxminddb.md
%license LICENSE
%{_includedir}/*
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/%{name}.pc
%{_mandir}/man3/*
%changelog