Source: geoip-database Version: 20150512-1 Severity: wishlist Tags: patch User: [email protected] Usertags: timestamps X-Debbugs-Cc: [email protected]
Hi! While working on the “reproducible builds” effort [1], we have noticed that geoip-database could not be built reproducibly. The attached patch sets the embedded timestamp to the date from the latest changelog entry and normalizes the used timezone to UTC. Once applied, geoip-database can be built reproducibly in our current experimental framework. Regards, Reiner [1]: https://wiki.debian.org/ReproducibleBuilds
diff --git a/debian/rules b/debian/rules index a8d620d..be3c3a1 100755 --- a/debian/rules +++ b/debian/rules @@ -1,5 +1,7 @@ #!/usr/bin/make -f +BUILD_DATE := $(shell dpkg-parsechangelog -S Date) + %: dh $@ @@ -7,7 +9,7 @@ override_dh_install: mkdir -p $(CURDIR)/tmp/ # Building geoip v4 country database. /usr/lib/geoip/geoip-generator -v -4 \ - --info="$$(date +'GEO-106FREE %Y%m%d Build')" \ + --info="$$(date -u +'GEO-106FREE %Y%m%d Build' -d '$(BUILD_DATE)')" \ -o $(CURDIR)/tmp/GeoIP.dat GeoIPCountryWhois.csv # Convert the v4 csv layout to the v6 one. perl /usr/lib/geoip/v4-to-v6-layout.pl \ @@ -18,18 +20,18 @@ override_dh_install: > $(CURDIR)/tmp/v4v6merged.csv # Building geoip v6 country database. /usr/lib/geoip/geoip-generator -v -6 \ - --info="$$(date +'GEO-106FREE %Y%m%d Build')" \ + --info="$$(date -u +'GEO-106FREE %Y%m%d Build' -d '$(BUILD_DATE)')" \ -o $(CURDIR)/tmp/GeoIPv6.dat $(CURDIR)/tmp/v4v6merged.csv # Building geoip v4 city database. /usr/lib/geoip/geoip-generator -v -4 \ - --info="$$(date +'GEO-106FREE %Y%m%d Build')" \ + --info="$$(date -u +'GEO-106FREE %Y%m%d Build' -d '$(BUILD_DATE)')" \ -t GEOIP_CITY_EDITION_REV1 \ -l GeoLiteCity-Location.csv \ -o $(CURDIR)/tmp/GeoIPCity.dat \ GeoLiteCity-Blocks.csv # Building ASN database. /usr/lib/geoip/geoip-generator-asn -v -4 \ - --info="$$(date +'GEO-106FREE %Y%m%d Build')" \ + --info="$$(date -u +'GEO-106FREE %Y%m%d Build' -d '$(BUILD_DATE)')" \ -o $(CURDIR)/tmp/GeoIPASNum.dat GeoIPASNum2.csv dh_install
signature.asc
Description: Digital signature

