deleted file mode 100644
@@ -1,11 +0,0 @@
-# The following UserId and LicenseKey are required placeholders:
-UserId 999999
-LicenseKey 000000000000
-
-# Include one or more of the following ProductIds:
-# * GeoLite2-City - GeoLite 2 City
-# * GeoLite2-Country - GeoLite2 Country
-# * 506 - GeoLite Legacy Country
-# * 517 - GeoLite Legacy ASN
-# * 533 - GeoLite Legacy City
-ProductIds GeoLite2-City GeoLite2-Country 506 517 533
new file mode 100644
@@ -0,0 +1,13 @@
+
+# This file has been generated by go-mod-update-modules.bbclass
+#
+# Do not modify it by hand, as the contents will be replaced when
+# running the update-modules task.
+
+SRC_URI += "\
+ gomod://github.com/cenkalti/backoff/v5;version=v5.0.3;sha256sum=58e4d9014277bc1c5c7ab64539137923964cc3920303a4f771d02a532939bedb \
+ gomod://github.com/gofrs/flock;version=v0.13.0;sha256sum=171560e83110e199cc9f4f8959d442c563c8ab6b26c100dd67b7a2fe265339ce \
+ gomod://github.com/spf13/pflag;version=v1.0.10;sha256sum=a246b8c9d3daa87d6c634cdfee1bdf7fa53d5817eeef4fa0c6da43edd12de4ca \
+ gomod://golang.org/x/sync;version=v0.22.0;sha256sum=4bc67d258ce7867cfc1a43765c43d98b4c49b90c46dd0b86f896a5a4909fade0 \
+ gomod://golang.org/x/sys;version=v0.46.0;sha256sum=36dc83b6bc5884d260cdbd9d09e597b1eed64d15dfdc374ca6e31aef99d533d7 \
+"
new file mode 100644
@@ -0,0 +1,15 @@
+
+# This file has been generated by go-mod-update-modules.bbclass
+#
+# Do not modify it by hand, as the contents will be replaced when
+# running the update-modules task.
+
+LICENSE += "AND BSD-3-Clause AND MIT"
+
+LIC_FILES_CHKSUM += "\
+ file://pkg/mod/github.com/cenkalti/backoff/v5@v5.0.3/LICENSE;md5=1571d94433e3f3aa05267efd4dbea68b;spdx=MIT \
+ file://pkg/mod/github.com/gofrs/flock@v0.13.0/LICENSE;md5=f852ccc601f58d934aff3a71b042ba08;spdx=BSD-3-Clause \
+ file://pkg/mod/github.com/spf13/pflag@v1.0.10/LICENSE;md5=1e8b7dc8b906737639131047a590f21d;spdx=BSD-3-Clause \
+ file://pkg/mod/golang.org/x/sync@v0.22.0/LICENSE;md5=7998cb338f82d15c0eff93b7004d272a;spdx=BSD-3-Clause \
+ file://pkg/mod/golang.org/x/sys@v0.46.0/LICENSE;md5=7998cb338f82d15c0eff93b7004d272a;spdx=BSD-3-Clause \
+"
new file mode 100644
@@ -0,0 +1,12 @@
+# GeoIP.conf for geoipupdate 4.x and later. It only downloads GeoIP2 and
+# GeoLite2 (.mmdb) databases, the legacy GeoIP (.dat) ones are not available.
+# See https://dev.maxmind.com/geoip/updating-databases for the format.
+
+# The following AccountID and LicenseKey are required placeholders:
+AccountID 999999
+LicenseKey 000000000000
+
+# Enter the edition IDs of the databases you would like to update.
+EditionIDs GeoLite2-Country GeoLite2-City
+
+DatabaseDirectory /usr/share/GeoIP
similarity index 59%
rename from meta-networking/recipes-support/geoip/geoipupdate-3.1.1/geoipupdate.cron
rename to meta-networking/recipes-support/geoip/geoipupdate/geoipupdate.cron
@@ -1,5 +1,5 @@
# top of crontab
MAILTO=your@email.com
-32 11 * * 4 /usr/local/bin/geoipupdate
+32 11 * * 4 root /usr/bin/geoipupdate
# end of crontab
deleted file mode 100644
@@ -1,35 +0,0 @@
-SUMMARY = "Crontab entry to provide weekly updates of the GeoIP free databases."
-DESCRIPTION = "update databases for GeoIP"
-
-HOMEPAGE = "http://dev.maxmind.com/geoip/"
-SECTION = "net"
-
-DEPENDS = "zlib curl"
-
-SRC_URI = "https://github.com/maxmind/geoipupdate/releases/download/v3.1.1/geoipupdate-3.1.1.tar.gz \
- file://GeoIP.conf \
- file://geoipupdate.cron \
- "
-SRC_URI[sha256sum] = "3de22e3fe3282024288a00807bbea9a1ffa2d1e8fe9c611f4b14a5b4d8ebe08a"
-
-UPSTREAM_CHECK_URI = "https://github.com/maxmind/geoipupdate/tags"
-UPSTREAM_CHECK_REGEX = "releases/tag/v(?P<pver>\d+(\.\d+)+)"
-
-LICENSE = "GPL-2.0-only"
-
-LIC_FILES_CHKSUM = "\
-file://ChangeLog.md;md5=30029632df335cb696f68ecc2a428987 \
-"
-FILES:${PN} = "/usr/share/GeoIP \
- /etc/GeoIP.conf \
- /etc/cron.d/geoipupdate.cron \
- /usr/bin/geoipupdate \
-"
-inherit autotools
-
-do_install:append() {
- install -d ${D}/${sysconfdir}
- install -d ${D}/${sysconfdir}/cron.d
- install ${UNPACKDIR}/GeoIP.conf ${D}/${sysconfdir}/
- install ${UNPACKDIR}/geoipupdate.cron ${D}/${sysconfdir}/cron.d/
-}
new file mode 100644
@@ -0,0 +1,39 @@
+SUMMARY = "Crontab entry to provide weekly updates of the GeoIP free databases."
+DESCRIPTION = "update databases for GeoIP"
+
+HOMEPAGE = "http://dev.maxmind.com/geoip/"
+SECTION = "net"
+
+LICENSE = "(Apache-2.0 OR MIT)"
+LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE-APACHE;md5=4e168cce331e5c827d4c2b68a6200e1b \
+ file://src/${GO_IMPORT}/LICENSE-MIT;md5=995598bc9de2b4c987c2cb87fc24f341"
+require ${BPN}-licenses.inc
+
+SRC_URI = "git://github.com/maxmind/geoipupdate.git;protocol=https;branch=main;tag=v${PV};destsuffix=${GO_SRCURI_DESTSUFFIX} \
+ file://GeoIP.conf \
+ file://geoipupdate.cron \
+ "
+SRCREV = "07618e0e7cacbe7aaebbc26cafb54c2a9f2f3bc3"
+require ${BPN}-go-mods.inc
+
+UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>\d+(\.\d+)+)$"
+
+GO_IMPORT = "github.com/maxmind/geoipupdate/v8"
+GO_INSTALL = "${GO_IMPORT}/cmd/geoipupdate"
+GO_LINKSHARED = ""
+GO_EXTRA_LDFLAGS = "-X main.version=${PV} \
+ -X main.defaultConfigFile=${sysconfdir}/GeoIP.conf \
+ -X main.defaultDatabaseDirectory=${datadir}/GeoIP"
+
+inherit go-mod go-mod-update-modules
+
+do_install:append() {
+ install -d ${D}${sysconfdir}/cron.d
+ install -m 0644 ${UNPACKDIR}/GeoIP.conf ${D}${sysconfdir}/
+ install -m 0644 ${UNPACKDIR}/geoipupdate.cron ${D}${sysconfdir}/cron.d/
+ install -d ${D}${datadir}/GeoIP
+ # release and docker helper scripts would pull bash and perl into ${PN}-dev
+ rm -rf ${D}${libdir}/go/src/${GO_IMPORT}/dev-bin ${D}${libdir}/go/src/${GO_IMPORT}/docker
+}
+
+FILES:${PN} += "${datadir}/GeoIP"
Upstream rewrote geoipupdate in Go in 4.x (CHANGELOG.md): - Only GeoIP2/GeoLite2 .mmdb databases are downloaded, using a MaxMind account; GeoIP.conf takes AccountID, LicenseKey and EditionIDs instead of UserId and ProductIds. - 7.0.0 switched to new download endpoints (downloads redirect to an R2 storage host) and requires GEOIPUPDATE_VERBOSE to be 0 or 1. - 8.0.0 stops updating on the first error, fixes the Docker config file and no longer retries proxy CONNECT 4xx errors. Replace the autotools recipe with a go-mod one built from the v8.0.0 tag; zlib and curl are no longer needed. The config file and database paths are set at link time to ${sysconfdir}/GeoIP.conf and ${datadir}/GeoIP. Rewrite the shipped GeoIP.conf in the new format and fix the cron entry (it lacked the user field of /etc/cron.d and called /usr/local/bin/geoipupdate). Move the files from the versioned geoipupdate-3.1.1 directory to geoipupdate/. Drop the docker and release helper scripts from the installed Go sources, they would make ${PN}-dev depend on bash and perl. geoipupdate-go-mods.inc and geoipupdate-licenses.inc were produced with the do_update_modules algorithm of go-mod-update-modules.bbclass (go list -deps of cmd/geoipupdate); flock and pflag are marked BSD-3-Clause by hand, as the license finder does not recognise them. geoipupdate 8 no longer updates the legacy GeoIP .dat files that the geoip and geoip-perl recipes use; those keep their bundled databases. Only packagegroup-meta-networking pulls in geoipupdate. License-Update: the C version was GPL-2.0-only (checksummed via ChangeLog.md); the Go version is Apache-2.0 OR MIT (LICENSE-APACHE, LICENSE-MIT), and the Go module dependencies add BSD-3-Clause and MIT. Replace the GitHub tags page check with UPSTREAM_CHECK_GITTAGREGEX matching release tags only. AI-Generated: Uses Claude Code Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com> --- .../geoip/geoipupdate-3.1.1/GeoIP.conf | 11 ------ .../geoip/geoipupdate-go-mods.inc | 13 +++++++ .../geoip/geoipupdate-licenses.inc | 15 +++++++ .../geoip/geoipupdate/GeoIP.conf | 12 ++++++ .../geoipupdate.cron | 2 +- .../geoip/geoipupdate_3.1.1.bb | 35 ----------------- .../geoip/geoipupdate_8.0.0.bb | 39 +++++++++++++++++++ 7 files changed, 80 insertions(+), 47 deletions(-) delete mode 100644 meta-networking/recipes-support/geoip/geoipupdate-3.1.1/GeoIP.conf create mode 100644 meta-networking/recipes-support/geoip/geoipupdate-go-mods.inc create mode 100644 meta-networking/recipes-support/geoip/geoipupdate-licenses.inc create mode 100644 meta-networking/recipes-support/geoip/geoipupdate/GeoIP.conf rename meta-networking/recipes-support/geoip/{geoipupdate-3.1.1 => geoipupdate}/geoipupdate.cron (59%) delete mode 100644 meta-networking/recipes-support/geoip/geoipupdate_3.1.1.bb create mode 100644 meta-networking/recipes-support/geoip/geoipupdate_8.0.0.bb