diff -Nru geoipupdate-4.0.6/debian/changelog geoipupdate-4.0.6/debian/changelog --- geoipupdate-4.0.6/debian/changelog 2019-09-14 17:30:31.000000000 +0000 +++ geoipupdate-4.0.6/debian/changelog 2019-10-30 19:46:20.000000000 +0000 @@ -1,3 +1,13 @@ +geoipupdate (4.0.6-2) unstable; urgency=high + + * Do not attempt to build PIE binaries on mips architectures, as this is not + supported by Go yet. + * Ship with an empty /var/lib/GeoIP for geoipupdate to place the databases. + (Closes: #943849) + * Bump Standards-Version to 4.4.1, no changes needed. + + -- Faidon Liambotis Wed, 30 Oct 2019 21:46:20 +0200 + geoipupdate (4.0.6-1) unstable; urgency=medium * New upstream release. diff -Nru geoipupdate-4.0.6/debian/control geoipupdate-4.0.6/debian/control --- geoipupdate-4.0.6/debian/control 2019-09-14 17:30:31.000000000 +0000 +++ geoipupdate-4.0.6/debian/control 2019-10-30 19:46:20.000000000 +0000 @@ -13,7 +13,7 @@ golang-github-stretchr-testify-dev, pandoc, XS-Go-Import-Path: github.com/maxmind/geoipupdate -Standards-Version: 4.4.0 +Standards-Version: 4.4.1 Homepage: https://dev.maxmind.com/geoip/geoipupdate/ Vcs-Git: https://salsa.debian.org/debian/geoipupdate.git Vcs-Browser: https://salsa.debian.org/debian/geoipupdate diff -Nru geoipupdate-4.0.6/debian/dirs geoipupdate-4.0.6/debian/dirs --- geoipupdate-4.0.6/debian/dirs 1970-01-01 00:00:00.000000000 +0000 +++ geoipupdate-4.0.6/debian/dirs 2019-10-30 19:41:34.000000000 +0000 @@ -0,0 +1 @@ +var/lib/GeoIP diff -Nru geoipupdate-4.0.6/debian/rules geoipupdate-4.0.6/debian/rules --- geoipupdate-4.0.6/debian/rules 2019-09-14 17:30:31.000000000 +0000 +++ geoipupdate-4.0.6/debian/rules 2019-10-30 19:40:54.000000000 +0000 @@ -2,18 +2,23 @@ include /usr/share/dpkg/pkg-info.mk +# Golang does not support PIE on mips +# cf. https://github.com/golang/go/issues/21222 +ifeq ($(filter $(DEB_HOST_ARCH),mips mipsel mips64el),) +GO_FLAGS += -buildmode=pie +endif + +# pass the right paths & version number (see upstream Makefile) CONFFILE=/etc/GeoIP.conf DATADIR=/var/lib/GeoIP VERSION=$(DEB_VERSION_UPSTREAM) +GO_FLAGS += -ldflags '-X main.defaultConfigFile=$(CONFFILE) -X main.defaultDatabaseDirectory=$(DATADIR) -X "main.version=$(VERSION)"' %: dh $@ --builddirectory=build --buildsystem=golang --with=golang override_dh_auto_build: - # build the Go program, passing the right paths (see upstream Makefile) - dh_auto_build --builddirectory=build --buildsystem=golang -- \ - -buildmode=pie\ - -ldflags '-X main.defaultConfigFile=$(CONFFILE) -X main.defaultDatabaseDirectory=$(DATADIR) -X "main.version=$(VERSION)"' + dh_auto_build --builddirectory=build --buildsystem=golang -- $(GO_FLAGS) # build the manpages CONFFILE=$(CONFFILE) DATADIR=$(DATADIR) make data