Backport patches to fix reproducibility issues 79/7279/1
authorLuca Boccassi <luca.boccassi@gmail.com>
Thu, 22 Jun 2017 14:40:17 +0000 (15:40 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 22 Jun 2017 14:40:17 +0000 (15:40 +0100)
These patches make the documentation and linker script generation
fully reproducible.

Change-Id: Iec5a3578d54f810edd0a0bf1551cacf394e4af32
Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
debian/patches/mk-fix-excluding-.doctrees-when-installing-docs.patch [new file with mode: 0644]
debian/patches/mk-sort-list-of-files-in-examples.dox.patch [new file with mode: 0644]
debian/patches/mk-sort-list-of-shared-objects-in-linker-script.patch [new file with mode: 0644]
debian/patches/mk-use-make-silent-flag-to-print-HTML-doc-version.patch [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/mk-fix-excluding-.doctrees-when-installing-docs.patch b/debian/patches/mk-fix-excluding-.doctrees-when-installing-docs.patch
new file mode 100644 (file)
index 0000000..b658d26
--- /dev/null
@@ -0,0 +1,30 @@
+Description: mk: fix excluding .doctrees when installing docs
+
+The --exclude parameter must be passed before the input directory to
+tar, otherwise it's silently ignored and the .doctrees directory is
+installed by make install-doc.
+
+Origin: http://dpdk.org/dev/patchwork/patch/25632/
+Forwarded: yes
+Author: Luca Boccassi <luca.boccassi@gmail.com>
+Last-Update: 2017-06-22
+---
+ mk/rte.sdkinstall.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk
+index dbac2a277..4e97feff9 100644
+--- a/mk/rte.sdkinstall.mk
++++ b/mk/rte.sdkinstall.mk
+@@ -162,7 +162,7 @@ install-sdk:
+ install-doc:
+ ifneq ($(wildcard $O/doc/html),)
+       $(Q)$(call rte_mkdir, $(DESTDIR)$(docdir))
+-      $(Q)tar -cf -      -C $O/doc html --exclude 'html/guides/.*' | \
++      $(Q)tar -cf -      -C $O/doc --exclude 'html/guides/.*' html | \
+           tar -xf -      -C $(DESTDIR)$(docdir) --strip-components=1 \
+               --keep-newer-files
+ endif
+-- 
+2.11.0
+
diff --git a/debian/patches/mk-sort-list-of-files-in-examples.dox.patch b/debian/patches/mk-sort-list-of-files-in-examples.dox.patch
new file mode 100644 (file)
index 0000000..afe1b19
--- /dev/null
@@ -0,0 +1,31 @@
+Description: mk: sort list of files in examples.dox
+
+The result of find might not be stable depending on external
+conditions.
+Pipe it through LC_ALL=C sort to ensure reproducible results when
+generating examples.dox.
+
+Origin: http://dpdk.org/dev/patchwork/patch/25634/
+Forwarded: yes
+Author: Luca Boccassi <luca.boccassi@gmail.com>
+Last-Update: 2017-06-22
+---
+ mk/rte.sdkdoc.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mk/rte.sdkdoc.mk b/mk/rte.sdkdoc.mk
+index c0eaa3502..de31b78cf 100644
+--- a/mk/rte.sdkdoc.mk
++++ b/mk/rte.sdkdoc.mk
+@@ -93,7 +93,7 @@ $(API_EXAMPLES): api-html-clean
+       $(Q)mkdir -p $(@D)
+       @printf '/**\n' > $(API_EXAMPLES)
+       @printf '@page examples DPDK Example Programs\n\n' >> $(API_EXAMPLES)
+-      @find examples -type f -name '*.c' -printf '@example %p\n' >> $(API_EXAMPLES)
++      @find examples -type f -name '*.c' -printf '@example %p\n' | LC_ALL=C sort >> $(API_EXAMPLES)
+       @printf '*/\n' >> $(API_EXAMPLES)
+ guides-pdf-clean: guides-pdf-img-clean
+-- 
+2.11.0
+
diff --git a/debian/patches/mk-sort-list-of-shared-objects-in-linker-script.patch b/debian/patches/mk-sort-list-of-shared-objects-in-linker-script.patch
new file mode 100644 (file)
index 0000000..52e6b5a
--- /dev/null
@@ -0,0 +1,32 @@
+Description: mk: sort list of shared objects in linker script
+
+The output of wildcard might not be stable and depend on the
+filesystem and other factors.
+This means the content libdpdk.so linker script might change between
+builds from the same sources.
+Run the list through sort to ensure reproducibility.
+
+Origin: http://dpdk.org/dev/patchwork/patch/25633/
+Forwarded: yes
+Author: Luca Boccassi <luca.boccassi@gmail.com>
+Last-Update: 2017-06-22
+---
+ mk/rte.combinedlib.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mk/rte.combinedlib.mk b/mk/rte.combinedlib.mk
+index 449358b33..2ab7ee8a1 100644
+--- a/mk/rte.combinedlib.mk
++++ b/mk/rte.combinedlib.mk
+@@ -42,7 +42,7 @@ endif
+ RTE_LIBNAME := dpdk
+ COMBINEDLIB := lib$(RTE_LIBNAME)$(EXT)
+-LIBS := $(filter-out $(COMBINEDLIB), $(notdir $(wildcard $(RTE_OUTPUT)/lib/*$(EXT))))
++LIBS := $(filter-out $(COMBINEDLIB), $(sort $(notdir $(wildcard $(RTE_OUTPUT)/lib/*$(EXT)))))
+ all: FORCE
+       $(Q)echo "GROUP ( $(LIBS) )" > $(RTE_OUTPUT)/lib/$(COMBINEDLIB)
+-- 
+2.11.0
+
diff --git a/debian/patches/mk-use-make-silent-flag-to-print-HTML-doc-version.patch b/debian/patches/mk-use-make-silent-flag-to-print-HTML-doc-version.patch
new file mode 100644 (file)
index 0000000..14a8688
--- /dev/null
@@ -0,0 +1,36 @@
+Description: mk: use make silent flag to print HTML doc version
+
+Depending on the environment, make might echo the command being ran.
+In mk/rte.sdkdoc.mk make is used to print the DPDK version to be
+piped to doxygen. This causes the following to be written:
+
+<div id="projectname">DPDK
+&#160;<span id="projectnumber">/usr/bin/make-f/build/dpdk-jYjqnr/dpdk-16.11.2/mk/rte.sdkconfig.mkshowversion</span>
+</div>
+
+Use -s (--silent) to prevent echoing.
+
+Origin: http://dpdk.org/dev/patchwork/patch/25631/
+Forwarded: yes
+Author: Luca Boccassi <luca.boccassi@gmail.com>
+Last-Update: 2017-06-22
+---
+ mk/rte.sdkdoc.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mk/rte.sdkdoc.mk b/mk/rte.sdkdoc.mk
+index fb8f91555..c0eaa3502 100644
+--- a/mk/rte.sdkdoc.mk
++++ b/mk/rte.sdkdoc.mk
+@@ -73,7 +73,7 @@ api-html: $(API_EXAMPLES)
+       $(Q)mkdir -p $(RTE_OUTPUT)/doc/html
+       $(Q)(cat $(RTE_SDK)/doc/api/doxy-api.conf     && \
+           printf 'PROJECT_NUMBER = '                && \
+-                            $(MAKE) -rR showversion && \
++                           $(MAKE) -rRs showversion && \
+           echo INPUT           += $(API_EXAMPLES)   && \
+           echo OUTPUT_DIRECTORY = $(RTE_OUTPUT)/doc && \
+           echo HTML_OUTPUT      = html/api          && \
+-- 
+2.11.0
+
index ed0b6e9..78e2ae1 100644 (file)
@@ -1,2 +1,6 @@
 fix-vhost-user-socket-permission.patch
 fix-power-default-config.patch
+mk-use-make-silent-flag-to-print-HTML-doc-version.patch
+mk-fix-excluding-.doctrees-when-installing-docs.patch
+mk-sort-list-of-shared-objects-in-linker-script.patch
+mk-sort-list-of-files-in-examples.dox.patch