[Reproducible-builds] Bug#824808: gdal: please make the build reproducible (fileordering)
Alexis Bienvenüe
pado at passoire.fr
Thu May 19 23:28:00 UTC 2016
Source: gdal
Version: 2.1.0+dfsg-2
Severity: wishlist
Tags: patch upstream
User: reproducible-builds at lists.alioth.debian.org
Usertags: fileordering
X-Debbugs-Cc: reproducible-builds at lists.alioth.debian.org
Dear Maintainer,
While working on the “reproducible builds” effort [1], we have noticed
that 'gdal' could not be built reproducibly.
Either one of the two attached patches fixes the order files are passed
to libtool — but I don't know if one of them could be an acceptable
solution.
One applied, gdal can be built reproducibly in our current experimental
framework.
Regards,
Alexis Bienvenüe.
[1]: https://wiki.debian.org/ReproducibleBuilds
-------------- next part --------------
Description: Sort files
Sort files passed as arguments to make the build reproducible.
Author: Alexis Bienvenüe <pado at passoire.fr>
Index: gdal-2.1.0+dfsg/GNUmakefile
===================================================================
--- gdal-2.1.0+dfsg.orig/GNUmakefile
+++ gdal-2.1.0+dfsg/GNUmakefile
@@ -53,7 +53,7 @@ $(GDAL_SLIB): $(GDAL_OBJ) $(GDAL_LIB)
-o $(GDAL_SLIB)
$(LIBGDAL): $(GDAL_OBJ:.o=.lo)
- $(LD) $(LDFLAGS) $(LIBS) -o $@ $(GDAL_OBJ:.o=.lo) \
+ $(LD) $(LDFLAGS) $(LIBS) -o $@ `LC_ALL=C ls $(GDAL_OBJ:.o=.lo) 2>/dev/null` \
-rpath $(INST_LIB) \
-no-undefined \
-version-info $(LIBGDAL_CURRENT):$(LIBGDAL_REVISION):$(LIBGDAL_AGE)
-------------- next part --------------
Description: Sort files
Sort files passed as arguments to make the build reproducible.
Author: Alexis Bienvenüe <pado at passoire.fr>
Index: gdal-2.1.0+dfsg/GNUmakefile
===================================================================
--- gdal-2.1.0+dfsg.orig/GNUmakefile
+++ gdal-2.1.0+dfsg/GNUmakefile
@@ -53,7 +53,11 @@ $(GDAL_SLIB): $(GDAL_OBJ) $(GDAL_LIB)
-o $(GDAL_SLIB)
$(LIBGDAL): $(GDAL_OBJ:.o=.lo)
- $(LD) $(LDFLAGS) $(LIBS) -o $@ $(GDAL_OBJ:.o=.lo) \
+ $(MAKE) $(LIBGDAL).buildit
+
+.PHONY: $(LIBGDAL).buildit
+$(LIBGDAL).buildit:
+ $(LD) $(LDFLAGS) $(LIBS) -o $(LIBGDAL) $(sort $(wildcard $(GDAL_OBJ:.o=.lo))) \
-rpath $(INST_LIB) \
-no-undefined \
-version-info $(LIBGDAL_CURRENT):$(LIBGDAL_REVISION):$(LIBGDAL_AGE)
More information about the Reproducible-builds
mailing list