[linux] 01/01: DocBook: Use a fixed encoding for output
debian-kernel at lists.debian.org
debian-kernel at lists.debian.org
Thu Aug 27 08:45:06 UTC 2015
This is an automated email from the git hooks/post-receive script.
benh pushed a commit to branch master
in repository linux.
commit 32fff0de75a42990e771b57814ae3e7797453e4f
Author: Ben Hutchings <ben at decadent.org.uk>
Date: Thu Aug 27 02:06:30 2015 +0100
DocBook: Use a fixed encoding for output
This was the last blocker for reproduciblity, so close that bug.
---
debian/changelog | 2 +
.../docbook-use-a-fixed-encoding-for-output.patch | 78 ++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 81 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 87b04b0..0cf49ec 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,8 @@ linux (4.2~rc8-1~exp2) UNRELEASED; urgency=medium
- [x86] COMEDI_8255_SA replaced COMEDI_8255
* [sparc] Remove linux-image, linux-header and udeb packages, as they
are redundant with sparc64 and neither is an official port
+ * Fix last issue that prevents a reproducible build (Closes: #769844):
+ - DocBook: Use a fixed encoding for output
-- Ben Hutchings <ben at decadent.org.uk> Tue, 25 Aug 2015 18:50:57 +0100
diff --git a/debian/patches/bugfix/all/docbook-use-a-fixed-encoding-for-output.patch b/debian/patches/bugfix/all/docbook-use-a-fixed-encoding-for-output.patch
new file mode 100644
index 0000000..c20cdc1
--- /dev/null
+++ b/debian/patches/bugfix/all/docbook-use-a-fixed-encoding-for-output.patch
@@ -0,0 +1,78 @@
+From: Ben Hutchings <ben at decadent.org.uk>
+Date: Thu, 27 Aug 2015 01:56:46 +0100
+Subject: DocBook: Use a fixed encoding for output
+
+Currently the encoding of documents generated by DocBook depends on
+the current locale. Make the output reproducible independently of
+the locale, by setting the encoding to UTF-8 (LC_CTYPE=C.UTF-8) by
+preference, or ASCII (LC_CTYPE=C) as a fallback.
+
+LC_CTYPE can normally be overridden by LC_ALL, but the top-level
+Makefile unsets that.
+
+Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
+---
+--- a/Documentation/DocBook/Makefile
++++ b/Documentation/DocBook/Makefile
+@@ -68,6 +68,12 @@ installmandocs: mandocs
+ #External programs used
+ KERNELDOC = $(srctree)/scripts/kernel-doc
+ DOCPROC = $(objtree)/scripts/docproc
++CHECK_LC_CTYPE = $(objtree)/scripts/check-lc_ctype
++
++# Use a fixed encoding - UTF-8 if the C library has support built-in
++# or ASCII if not
++LC_CTYPE := $(call try-run, LC_CTYPE=C.UTF-8 $(CHECK_LC_CTYPE), C.UTF-8, C)
++export LC_CTYPE
+
+ XMLTOFLAGS = -m $(srctree)/$(src)/stylesheet.xsl
+ XMLTOFLAGS += --skip-validation
+--- a/Makefile
++++ b/Makefile
+@@ -1361,7 +1361,7 @@ $(help-board-dirs): help-%:
+ # Documentation targets
+ # ---------------------------------------------------------------------------
+ %docs: scripts_basic FORCE
+- $(Q)$(MAKE) $(build)=scripts build_docproc
++ $(Q)$(MAKE) $(build)=scripts build_docproc build_check-lc_ctype
+ $(Q)$(MAKE) $(build)=Documentation/DocBook $@
+
+ else # KBUILD_EXTMOD
+--- a/scripts/Makefile
++++ b/scripts/Makefile
+@@ -7,6 +7,7 @@
+ # conmakehash: Create chartable
+ # conmakehash: Create arrays for initializing the kernel console tables
+ # docproc: Used in Documentation/DocBook
++# check-lc_ctype: Used in Documentation/DocBook
+
+ HOST_EXTRACFLAGS += -I$(srctree)/tools/include
+
+@@ -23,14 +24,16 @@ HOSTCFLAGS_asn1_compiler.o = -I$(srctree
+ always := $(hostprogs-y) $(hostprogs-m)
+
+ # The following hostprogs-y programs are only build on demand
+-hostprogs-y += unifdef docproc
++hostprogs-y += unifdef docproc check-lc_ctype
+
+ # These targets are used internally to avoid "is up to date" messages
+-PHONY += build_unifdef build_docproc
++PHONY += build_unifdef build_docproc build_check-lc_ctype
+ build_unifdef: $(obj)/unifdef
+ @:
+ build_docproc: $(obj)/docproc
+ @:
++build_check-lc_ctype: $(obj)/check-lc_ctype
++ @:
+
+ subdir-$(CONFIG_MODVERSIONS) += genksyms
+ subdir-y += mod
+--- /dev/null
++++ b/scripts/check-lc_ctype.c
+@@ -0,0 +1,6 @@
++#include <locale.h>
++
++int main(void)
++{
++ return !setlocale(LC_CTYPE, "");
++}
diff --git a/debian/patches/series b/debian/patches/series
index abc5a43..85425ff 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -75,6 +75,7 @@ bugfix/all/docbook-generate-consistent-ids.patch
bugfix/all/docbook-fix-non-determinstic-installation-of-duplica.patch
bugfix/all/scripts-kernel-doc-use-kbuild_build_timestamp-as-man.patch
bugfix/all/documentation-avoid-creating-man-pages-in-source-tree.patch
+bugfix/all/docbook-use-a-fixed-encoding-for-output.patch
# Miscellaneous features
features/all/efi-autoload-efi-pstore.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git
More information about the Kernel-svn-changes
mailing list