The package rpms/geoipupdate.git has added or updated architecture specific content in
its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/geoipupdate.git/commit/?id=31b7c7....
Change:
-ExclusiveArch: %{go_arches}
Thanks.
Full change:
============
commit 31b7c702fb0d4ea7152d16e7b9dad73f5192108e
Author: Elliott Sales de Andrade <quantum.analyst(a)gmail.com>
Date: Sat Jul 13 01:51:24 2019 -0400
Update to latest Go macros.
diff --git a/geoipupdate-4.0.3-go-modules.patch b/geoipupdate-4.0.3-go-modules.patch
deleted file mode 100644
index b90c28b..0000000
--- a/geoipupdate-4.0.3-go-modules.patch
+++ /dev/null
@@ -1,172 +0,0 @@
-commit d1dacd72c8171f97dc641f73a38e1608b1c5ab46
-Author: Gregory Oschwald <goschwald(a)maxmind.com>
-Date: Wed Jun 5 15:23:23 2019 -0700
-
- Switch from dep to Go modules
-
-diff --git a/Gopkg.lock b/Gopkg.lock
-deleted file mode 100644
-index 47d965c..0000000
---- a/Gopkg.lock
-+++ /dev/null
-@@ -1,66 +0,0 @@
--# This file is autogenerated, do not edit; changes may be undone by the next 'dep
ensure'.
--
--
--[[projects]]
-- digest =
"1:a2c1d0e43bd3baaa071d1b9ed72c27d78169b2b269f71c105ac4ba34b1be4a39"
-- name = "github.com/davecgh/go-spew"
-- packages = ["spew"]
-- pruneopts = "UT"
-- revision = "346938d642f2ec3594ed81d874461961cd0faa76"
-- version = "v1.1.0"
--
--[[projects]]
-- digest =
"1:70f34ee6d1b188cbd2dfcde62b0e2c600262eb5a03c8a3f3435ecf7c74790470"
-- name = "github.com/gofrs/flock"
-- packages = ["."]
-- pruneopts = "UT"
-- revision = "7f43ea2e6a643ad441fc12d0ecc0d3388b300c53"
-- version = "v0.7.0"
--
--[[projects]]
-- digest =
"1:40e195917a951a8bf867cd05de2a46aaf1806c50cf92eebf4c16f78cd196f747"
-- name = "github.com/pkg/errors"
-- packages = ["."]
-- pruneopts = "UT"
-- revision = "645ef00459ed84a119197bfb8d8205042c6df63d"
-- version = "v0.8.0"
--
--[[projects]]
-- digest =
"1:0028cb19b2e4c3112225cd871870f2d9cf49b9b4276531f03438a88e94be86fe"
-- name = "github.com/pmezard/go-difflib"
-- packages = ["difflib"]
-- pruneopts = "UT"
-- revision = "792786c7400a136282c1664665ae0a8db921c6c2"
-- version = "v1.0.0"
--
--[[projects]]
-- digest =
"1:9424f440bba8f7508b69414634aef3b2b3a877e522d8a4624692412805407bb7"
-- name = "github.com/spf13/pflag"
-- packages = ["."]
-- pruneopts = "UT"
-- revision = "583c0c0531f06d5278b7d917446061adc344b5cd"
-- version = "v1.0.1"
--
--[[projects]]
-- digest =
"1:c40d65817cdd41fac9aa7af8bed56927bb2d6d47e4fea566a74880f5c2b1c41e"
-- name = "github.com/stretchr/testify"
-- packages = [
-- "assert",
-- "require",
-- ]
-- pruneopts = "UT"
-- revision = "f35b8ab0b5a2cef36673838d662e249dd9c94686"
-- version = "v1.2.2"
--
--[solve-meta]
-- analyzer-name = "dep"
-- analyzer-version = 1
-- input-imports = [
-- "github.com/gofrs/flock",
-- "github.com/pkg/errors",
-- "github.com/spf13/pflag",
-- "github.com/stretchr/testify/assert",
-- "github.com/stretchr/testify/require",
-- ]
-- solver-name = "gps-cdcl"
-- solver-version = 1
-diff --git a/Gopkg.toml b/Gopkg.toml
-deleted file mode 100644
-index 59fa533..0000000
---- a/Gopkg.toml
-+++ /dev/null
-@@ -1,42 +0,0 @@
--# Gopkg.toml example
--#
--# Refer to
https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
--# for detailed Gopkg.toml documentation.
--#
--# required = ["github.com/user/thing/cmd/thing"]
--# ignored = ["github.com/user/project/pkgX",
"bitbucket.org/user/project/pkgA/pkgY"]
--#
--# [[constraint]]
--# name = "github.com/user/project"
--# version = "1.0.0"
--#
--# [[constraint]]
--# name = "github.com/user/project2"
--# branch = "dev"
--# source = "github.com/myfork/project2"
--#
--# [[override]]
--# name = "github.com/x/y"
--# version = "2.4.0"
--#
--# [prune]
--# non-go = false
--# go-tests = true
--# unused-packages = true
--
--
--[[constraint]]
-- name = "github.com/pkg/errors"
-- version = "0.8.0"
--
--[[constraint]]
-- name = "github.com/stretchr/testify"
-- version = "1.2.2"
--
--[[constraint]]
-- name = "github.com/gofrs/flock"
-- version = "0.7.0"
--
--[prune]
-- go-tests = true
-- unused-packages = true
-diff --git a/go.mod b/go.mod
-new file mode 100644
-index 0000000..e2a7347
---- /dev/null
-+++ b/go.mod
-@@ -0,0 +1,13 @@
-+module
github.com/maxmind/geoipupdate
-+
-+go 1.12
-+
-+require (
-+
github.com/davecgh/go-spew v1.1.1 // indirect
-+
github.com/gofrs/flock v0.7.1
-+
github.com/kr/pretty v0.1.0 // indirect
-+
github.com/pkg/errors v0.8.1
-+
github.com/spf13/pflag v1.0.3
-+
github.com/stretchr/testify v1.3.0
-+ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
-+)
-diff --git a/go.sum b/go.sum
-new file mode 100644
-index 0000000..aaa33eb
---- /dev/null
-+++ b/go.sum
-@@ -0,0 +1,21 @@
-+github.com/davecgh/go-spew v1.1.0/go.mod
h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-+github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-+github.com/davecgh/go-spew v1.1.1/go.mod
h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-+github.com/gofrs/flock v0.7.1 h1:DP+LD/t0njgoPBvT5MJLeliUIVQR03hiKR6vezdwHlc=
-+github.com/gofrs/flock v0.7.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU=
-+github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
-+github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
-+github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
-+github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
-+github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
-+github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
-+github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
-+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-+github.com/pmezard/go-difflib v1.0.0/go.mod
h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-+github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg=
-+github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
-+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-+github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
-+github.com/stretchr/testify v1.3.0/go.mod
h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-+gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127
h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
-+gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod
h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
diff --git a/geoipupdate.spec b/geoipupdate.spec
index 9edfb6f..75c1c5b 100644
--- a/geoipupdate.spec
+++ b/geoipupdate.spec
@@ -1,22 +1,25 @@
-%global forgeurl
https://github.com/maxmind/geoipupdate
+%bcond_without check
+
+#
https://github.com/maxmind/geoipupdate
+%global goipath
github.com/maxmind/geoipupdate
Version: 4.0.3
-%forgemeta
+
+%gometa
+
Name: geoipupdate
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Update GeoIP2 and GeoIP Legacy binary databases from MaxMind
+
License: ASL 2.0 or MIT
URL:
http://dev.maxmind.com/geoip/geoipupdate/
-Source0: %{forgesource}
+Source0: %{gosource}
Source1: geoipupdate.cron
-Patch0: geoipupdate-4.0.3-go-modules.patch
-ExclusiveArch: %{go_arches}
-BuildRequires: compiler(go-compiler)
+
BuildRequires: coreutils
BuildRequires: crontabs
+BuildRequires:
golang(github.com/gofrs/flock)
BuildRequires:
golang(github.com/pkg/errors)
BuildRequires:
golang(github.com/spf13/pflag)
-BuildRequires:
golang(github.com/stretchr/testify)
-BuildRequires:
golang(github.com/gofrs/flock)
BuildRequires: make
BuildRequires: pandoc
BuildRequires: perl-interpreter
@@ -26,6 +29,12 @@ BuildRequires: sed
# Legacy databases fetched by cron6 sub-package no longer available
Obsoletes: geoipupdate-cron6 < %{version}-%{release}
+%if %{with check}
+# Tests
+BuildRequires:
golang(github.com/stretchr/testify/assert)
+BuildRequires:
golang(github.com/stretchr/testify/require)
+%endif
+
%description
The GeoIP Update program performs automatic updates of GeoIP2 and GeoIP
Legacy binary databases.
@@ -43,36 +52,22 @@ Cron job for weekly updates to GeoIP2 and GeoIP Legacy binary
databases from
MaxMind.
%prep
-%forgesetup
-
-# Remove bundled dependencies
-rm -rf vendor/
-
-# Revert switch to Go Modules as our tooling isn't ready for that yet
-%patch0 -p1 -R
+%goprep
%build
-# Set up temporary build gopath and put our directory there
-mkdir -p ./_build/src/github.com/maxmind
-ln -s $(pwd) ./_build/src/github.com/maxmind/geoipupdate
-export GOPATH=$(pwd)/_build:%{gopath}
-
-# Make the geoipupdate program
-cd cmd/geoipupdate
-export LDFLAGS='-X main.defaultConfigFile=%{_sysconfdir}/GeoIP.conf -X
main.defaultDatabaseDirectory=%{_datadir}/GeoIP'
-%gobuild
-cd -
+export LDFLAGS='-X main.defaultConfigFile=%{_sysconfdir}/GeoIP.conf -X
main.defaultDatabaseDirectory=%{_datadir}/GeoIP '
+%gobuild -o %{gobuilddir}/bin/geoipupdate %{goipath}/cmd/geoipupdate
# Work around hardcoded "build" path in dev-bin/make-man-pages.pl
-ln -s _build build
+ln -s %{gobuilddir} build
# Prepare the config files and documentation
-make BUILDDIR=$(pwd)/_build CONFFILE=%{_sysconfdir}/GeoIP.conf DATADIR=%{_datadir}/GeoIP
data
+make BUILDDIR=%{gobuilddir} CONFFILE=%{_sysconfdir}/GeoIP.conf DATADIR=%{_datadir}/GeoIP
data
%install
# Install the geoipupdate program
install -d %{buildroot}%{_bindir}
-install -p -m 0755 cmd/geoipupdate/geoipupdate %{buildroot}%{_bindir}/geoipupdate
+install -p -m 0755 %{gobuilddir}/bin/geoipupdate %{buildroot}%{_bindir}/geoipupdate
# Install the configuration file
# By default we just use the free GeoIP2 databases
@@ -92,16 +87,15 @@ install -p -m 0644 _build/geoipupdate.1
%{buildroot}%{_mandir}/man1/geoipupdate.
install -d %{buildroot}%{_mandir}/man5
install -p -m 0644 _build/GeoIP.conf.5 %{buildroot}%{_mandir}/man5/GeoIP.conf.5
+%if %{with check}
%check
-export GOPATH=$(pwd)/_build:%{gopath}
-cd cmd/geoipupdate
-go test
-cd -
+%gocheck
+%endif
%files
%license LICENSE-APACHE LICENSE-MIT
%doc conf/GeoIP.conf.default README.md CHANGELOG.md
-%doc doc/GeoIP.conf.md doc/geoipupdate.md Gopkg.lock
+%doc doc/GeoIP.conf.md doc/geoipupdate.md
%config(noreplace) %{_sysconfdir}/GeoIP.conf
%{_bindir}/geoipupdate
%dir %{_datadir}/GeoIP/
@@ -112,6 +106,9 @@ cd -
%config(noreplace) %{_sysconfdir}/cron.weekly/geoipupdate
%changelog
+* Fri Jul 12 2019 Elliott Sales de Andrade <quantum.analyst(a)gmail.com> - 4.0.3-2
+- Update to latest Go macros
+
* Mon Jun 10 2019 Paul Howarth <paul(a)city-fan.org> - 4.0.3-1
- Update to 4.0.3
- Update flock dependency from 'theckman/go-flock' to 'gofrs/flock'
(GH#22)