[linux] 02/02: Documentation: Avoid creating man pages in source tree

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Fri Aug 21 22:50:07 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 13be7e1afd9cade852b8ce27b2eec9793e7e35be
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Fri Aug 21 18:13:33 2015 +0200

    Documentation: Avoid creating man pages in source tree
    
    kernel-doc can currently generate dummy DocBook files using
    absolute paths as their titles, which results in man pages being
    created in the source tree (and thus going into linux-headers
    and linux-source packages).
---
 debian/changelog                                   |  1 +
 ...n-avoid-creating-man-pages-in-source-tree.patch | 50 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 52 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 66972c7..caf17e3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,7 @@ linux (4.2~rc7-1~exp1) UNRELEASED; urgency=medium
   * debian/control: Correct build-dependency on xz-utils, needed on all arches
   * Fix more issues that prevent a reproducible build:
     - Set LC_ALL=C.UTF-8
+    - Avoid creating man pages in source tree
 
  -- Ben Hutchings <ben at decadent.org.uk>  Mon, 17 Aug 2015 10:28:46 +0200
 
diff --git a/debian/patches/bugfix/all/documentation-avoid-creating-man-pages-in-source-tree.patch b/debian/patches/bugfix/all/documentation-avoid-creating-man-pages-in-source-tree.patch
new file mode 100644
index 0000000..1b6a23a
--- /dev/null
+++ b/debian/patches/bugfix/all/documentation-avoid-creating-man-pages-in-source-tree.patch
@@ -0,0 +1,50 @@
+From: Ben Hutchings <ben at decadent.org.uk>
+Date: Fri, 21 Aug 2015 18:06:56 +0200
+Subject: Documentation: Avoid creating man pages in source tree
+
+Currently kernel-doc generates a dummy DocBook file when asked to
+convert a C source file with no structured comments.  For an
+out-of-tree build (objtree != srctree), the title of the output file
+is the absolute path name of the C source file, which later results
+in a manual page being created alongside the C source file.
+
+Change the title to be a relative path.
+
+Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
+---
+--- a/scripts/kernel-doc
++++ b/scripts/kernel-doc
+@@ -2351,12 +2351,13 @@ sub process_file($) {
+     my $descr;
+     my $in_purpose = 0;
+     my $initial_section_counter = $section_counter;
++    my ($orig_file) = @_;
+ 
+     if (defined($ENV{'SRCTREE'})) {
+-	$file = "$ENV{'SRCTREE'}" . "/" . "@_";
++	$file = "$ENV{'SRCTREE'}" . "/" . $orig_file;
+     }
+     else {
+-	$file = "@_";
++	$file = $orig_file;
+     }
+     if (defined($source_map{$file})) {
+ 	$file = $source_map{$file};
+@@ -2565,7 +2566,7 @@ sub process_file($) {
+ 	    print "<refentry>\n";
+ 	    print " <refnamediv>\n";
+ 	    print "  <refname>\n";
+-	    print "   ${file}\n";
++	    print "   ${orig_file}\n";
+ 	    print "  </refname>\n";
+ 	    print "  <refpurpose>\n";
+ 	    print "   Document generation inconsistency\n";
+@@ -2579,7 +2580,7 @@ sub process_file($) {
+ 	    print "   <para>\n";
+ 	    print "    The template for this document tried to insert\n";
+ 	    print "    the structured comment from the file\n";
+-	    print "    <filename>${file}</filename> at this point,\n";
++	    print "    <filename>${orig_file}</filename> at this point,\n";
+ 	    print "    but none was found.\n";
+ 	    print "    This dummy section is inserted to allow\n";
+ 	    print "    generation to continue.\n";
diff --git a/debian/patches/series b/debian/patches/series
index eaa0aca..ac586be 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -75,6 +75,7 @@ bugfix/all/docbook-don-t-store-mtime-or-name-in-compressed-man-.patch
 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
 
 # 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