[packages/mmdbctl] Rel 2; fix i686 build

arekm arekm at pld-linux.org
Fri Aug 28 11:28:35 CEST 2026


commit 4b5776cabe5c06ec42a29b17c0e6dba260cc2ba1
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Fri Aug 28 11:28:23 2026 +0200

    Rel 2; fix i686 build

 mmdbctl-mmdbwriter-32bit.patch | 14 ++++++++++++++
 mmdbctl.spec                   |  4 +++-
 2 files changed, 17 insertions(+), 1 deletion(-)
---
diff --git a/mmdbctl.spec b/mmdbctl.spec
index 2bfd158..a8d0abc 100644
--- a/mmdbctl.spec
+++ b/mmdbctl.spec
@@ -6,7 +6,7 @@ Summary:	Command line tool for working with MaxMind DB (mmdb) files
 Summary(pl.UTF-8):	Narzędzie wiersza poleceń do pracy z plikami MaxMind DB (mmdb)
 Name:		mmdbctl
 Version:	1.4.10
-Release:	1
+Release:	2
 License:	Apache v2.0
 Group:		Applications/Networking
 #Source0Download: https://github.com/ipinfo/mmdbctl/releases
@@ -17,6 +17,7 @@ Source0:	https://github.com/ipinfo/mmdbctl/archive/refs/tags/%{name}-%{version}/
 # tar cJf ../%{name}-vendor-%{version}.tar.xz vendor
 Source1:	%{name}-vendor-%{version}.tar.xz
 # Source1-md5:	a5ae2906955b181d4be625702b32da1d
+Patch0:		%{name}-mmdbwriter-32bit.patch
 URL:		https://github.com/ipinfo/mmdbctl
 BuildRequires:	golang >= 1.24
 BuildRequires:	rpmbuild(macros) >= 2.009
@@ -41,6 +42,7 @@ dwie bazy oraz sprawdzać poprawność pliku.
 
 %prep
 %setup -q -n %{name}-%{name}-%{version} -a1
+%patch -P0 -p1
 
 %{__mkdir_p} .go-cache
 
diff --git a/mmdbctl-mmdbwriter-32bit.patch b/mmdbctl-mmdbwriter-32bit.patch
new file mode 100644
index 0000000..268d495
--- /dev/null
+++ b/mmdbctl-mmdbwriter-32bit.patch
@@ -0,0 +1,14 @@
+; from upstream
+--- a/vendor/github.com/maxmind/mmdbwriter/tree.go
++++ b/vendor/github.com/maxmind/mmdbwriter/tree.go
+@@ -588,8 +588,8 @@
+ 		return err
+ 	}
+ 
+-	maxRecord := 1 << t.recordSize
+-	if left >= maxRecord || right >= maxRecord {
++	maxRecord := int64(1) << t.recordSize
++	if int64(left) >= maxRecord || int64(right) >= maxRecord {
+ 		return fmt.Errorf(
+ 			"exceeded record capacity by attempting to write (%d, %d) to node with %d bit record size; "+
+ 				"try increasing RecordSize or reducing the size of the database",
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mmdbctl.git/commitdiff/4b5776cabe5c06ec42a29b17c0e6dba260cc2ba1



More information about the pld-cvs-commit mailing list