Skip to contentSkip to conversation

kill warnings when building mandocs

PATCH Superseded Borislav Petkov 3 participants 19 messages Apr 13, 2007 – Apr 25, 2007 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kill warnings when building mandocs

This patch shuts warnings of the sort:

make -C /mnt/samsung_200/sam/kernel/trees/21-rc6/build \
	KBUILD_SRC=/mnt/samsung_200/sam/kernel/trees/21-rc6 \
	KBUILD_EXTMOD="" -f /mnt/samsung_200/sam/kernel/trees/21-rc6/Makefile mandocs

make -f /mnt/samsung_200/sam/kernel/trees/21-rc6/scripts/Makefile.build obj=scripts/basic
make -f /mnt/samsung_200/sam/kernel/trees/21-rc6/scripts/Makefile.build obj=Documentation/DocBook mandocs
SRCTREE=/mnt/samsung_200/sam/kernel/trees/21-rc6/ /mnt/samsung_200/sam/kernel/trees/21-rc6/build/scripts/basic/docproc doc /mnt/samsung_200/sam/kernel/trees/21-rc6/Documentation/DocBook/wanbook.tmpl >Documentation/DocBook/wanbook.xml if grep -q refentry Documentation/DocBook/wanbook.xml; then xmlto man -m /mnt/samsung_200/sam/kernel/trees/21-rc6/Documentation/DocBook/stylesheet.xsl -o Documentation/DocBook/man Documentation/DocBook/wanbook.xml ; gzip -f Documentation/DocBook/man/*.9; fi
Note: meta version: No productnumber or alternative sppp_close
Note: meta version: No refmiscinfo@class=version sppp_close
Note: Writing sppp_close.9
Note: meta version: No productnumber or alternative sppp_open
Note: meta version: No refmiscinfo@class=version sppp_open

by adding a RefMiscInfo xml tag in the form of the current kernel version to the function, struct and enum definitions in files included by kernel-doc when building 'mandocs'. However, the version string appears truncated on the manpage due to some constraints in the xml DTD for the man header, I believe, for the troff output is truncated too.

scripts/kernel-doc +31 -0
Index: 21-rc6/scripts/kernel-doc
===================================================================
@@ -326,6 +326,34 @@ while ($ARGV[0] =~ m/^-(.*)/) {
     }
 }
 
+# get kernel version
+sub get_kernel_version() {
+
+	my $version;
+	open (FILE, "../Makefile") || die "Can't open man kernel Makefile: $!";
+
+	EOF: while (my $line = <FILE>)
+	{
+		if ($line =~ /VERSION\s+=\s+(\d+)/) {
+			$version .= $1;
+			next;
+		}
+		if ($line =~ /PATCHLEVEL\s+=\s+(\d+)/) {
+			$version .= ".$1";
+			next;
+		}
+		if ($line =~ /SUBLEVEL\s+=\s+(\d+)/) {
+			$version .= ".$1";
+			next;
+		}
+		if ($line =~ /EXTRAVERSION\s+=\s+(.*)$/) {
+			$version .= $1;
+			last EOF;
+		}
+	}
+	return $version;
+}
+
 
 # generate a sequence of code that will splice in highlighting information
 # using the s// operator.
@@ -592,6 +620,7 @@ sub output_function_xml(%) {
     print "<refmeta>\n";
     print " <refentrytitle><phrase>".$args{'function'}."</phrase></refentrytitle>\n";
     print " <manvolnum>9</manvolnum>\n";
+    print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n";
     print "</refmeta>\n";
     print "<refnamediv>\n";
     print " <refname>".$args{'function'}."</refname>\n";
@@ -668,6 +697,7 @@ sub output_struct_xml(%) {
     print "<refmeta>\n";
     print " <refentrytitle><phrase>".$args{'type'}." ".$args{'struct'}."</phrase></refentrytitle>\n";
     print " <manvolnum>9</manvolnum>\n";
+    print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n";
     print "</refmeta>\n";
     print "<refnamediv>\n";
     print " <refname>".$args{'type'}." ".$args{'struct'}."</refname>\n";
@@ -752,6 +782,7 @@ sub output_enum_xml(%) {
     print "<refmeta>\n";
     print " <refentrytitle><phrase>enum ".$args{'enum'}."</phrase></refentrytitle>\n";
     print " <manvolnum>9</manvolnum>\n";
+    print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n";
     print "</refmeta>\n";
     print "<refnamediv>\n";
     print " <refname>enum ".$args{'enum'}."</refname>\n";
#1 lore raw

Sorry for the improper whitespaces, here's a correct version.

scripts/kernel-doc +29 -0
Index: 21-rc6/scripts/kernel-doc
===================================================================
@@ -326,6 +326,32 @@ while ($ARGV[0] =~ m/^-(.*)/) {
     }
 }
 
+# get kernel version
+sub get_kernel_version() {
+    my $version;
+    open (FILE, "../Makefile") || die "Can't open man kernel Makefile: $!";
+
+    EOF: while (my $line = <FILE>)
+    {
+	if ($line =~ /VERSION\s+=\s+(\d+)/) {
+	     $version .= $1;
+	     next;
+	}
+	if ($line =~ /PATCHLEVEL\s+=\s+(\d+)/) {
+	     $version .= ".$1";
+	     next;
+	}
+	if ($line =~ /SUBLEVEL\s+=\s+(\d+)/) {
+	     $version .= ".$1";
+	     next;
+	}
+	if ($line =~ /EXTRAVERSION\s+=\s+(.*)$/) {
+	     $version .= $1;
+	     last EOF;
+	}
+    }
+    return $version;
+}
 
 # generate a sequence of code that will splice in highlighting information
 # using the s// operator.
@@ -592,6 +618,7 @@ sub output_function_xml(%) {
     print "<refmeta>\n";
     print " <refentrytitle><phrase>".$args{'function'}."</phrase></refentrytitle>\n";
     print " <manvolnum>9</manvolnum>\n";
+    print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n";
     print "</refmeta>\n";
     print "<refnamediv>\n";
     print " <refname>".$args{'function'}."</refname>\n";
@@ -668,6 +695,7 @@ sub output_struct_xml(%) {
     print "<refmeta>\n";
     print " <refentrytitle><phrase>".$args{'type'}." ".$args{'struct'}."</phrase></refentrytitle>\n";
     print " <manvolnum>9</manvolnum>\n";
+    print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n";
     print "</refmeta>\n";
     print "<refnamediv>\n";
     print " <refname>".$args{'type'}." ".$args{'struct'}."</refname>\n";
@@ -752,6 +780,7 @@ sub output_enum_xml(%) {
     print "<refmeta>\n";
     print " <refentrytitle><phrase>enum ".$args{'enum'}."</phrase></refentrytitle>\n";
     print " <manvolnum>9</manvolnum>\n";
+    print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n";
     print "</refmeta>\n";
     print "<refnamediv>\n";
     print " <refname>enum ".$args{'enum'}."</refname>\n";
#2 lore raw
Quoted 10 lines · On Fri, 13 Apr 2007 11:29:43 +0200 Borislav Petkov wrote:

Sorry for the improper whitespaces, here's a correct version.

Index: 21-rc6/scripts/kernel-doc
===================================================================

scripts/kernel-doc while ($ARGV[0] =~ m/^-(.*)/) { · line 332

Quoted 7 lines
scripts/kernel-doc +4 -0
@@ -326,6 +326,32 @@ while ($ARGV[0] =~ m/^-(.*)/) {
     }
 }
 
+# get kernel version
+sub get_kernel_version() {
+    my $version;
+    open (FILE, "../Makefile") || die "Can't open man kernel Makefile: $!";

How are you running scripts/kernel-doc ?
I had to change "../Makefile" to just "Makefile" when using 'make htmldocs;.

Quoted 41 lines
scripts/kernel-doc +23 -0
+    EOF: while (my $line = <FILE>)
+    {
+	if ($line =~ /VERSION\s+=\s+(\d+)/) {
+	     $version .= $1;
+	     next;
+	}
+	if ($line =~ /PATCHLEVEL\s+=\s+(\d+)/) {
+	     $version .= ".$1";
+	     next;
+	}
+	if ($line =~ /SUBLEVEL\s+=\s+(\d+)/) {
+	     $version .= ".$1";
+	     next;
+	}
+	if ($line =~ /EXTRAVERSION\s+=\s+(.*)$/) {
+	     $version .= $1;
+	     last EOF;
+	}
+    }
+    return $version;
+}
 
 # generate a sequence of code that will splice in highlighting information
 # using the s// operator.
@@ -592,6 +618,7 @@ sub output_function_xml(%) {
     print "<refmeta>\n";
     print " <refentrytitle><phrase>".$args{'function'}."</phrase></refentrytitle>\n";
     print " <manvolnum>9</manvolnum>\n";
+    print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n";
     print "</refmeta>\n";
     print "<refnamediv>\n";
     print " <refname>".$args{'function'}."</refname>\n";
@@ -668,6 +695,7 @@ sub output_struct_xml(%) {
     print "<refmeta>\n";
     print " <refentrytitle><phrase>".$args{'type'}." ".$args{'struct'}."</phrase></refentrytitle>\n";
     print " <manvolnum>9</manvolnum>\n";
+    print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n";
     print "</refmeta>\n";
     print "<refnamediv>\n";
     print " <refname>".$args{'type'}." ".$args{'struct'}."</refname>\n";

scripts/kernel-doc sub output_enum_xml(%) {

Quoted 8 lines
scripts/kernel-doc +1 -1
@@ -752,6 +780,7 @@ sub output_enum_xml(%) {
     print "<refmeta>\n";
     print " <refentrytitle><phrase>enum ".$args{'enum'}."</phrase></refentrytitle>\n";
     print " <manvolnum>9</manvolnum>\n";
+    print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n";
     print "</refmeta>\n";
     print "<refnamediv>\n";
     print " <refname>enum ".$args{'enum'}."</refname>\n";
-

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

#3 lore raw
Quoted 15 lines · Randy Dunlap
Quoted 13 lines · On Fri, 13 Apr 2007 11:29:43 +0200 Borislav Petkov wrote:

Sorry for the improper whitespaces, here's a correct version.

Index: 21-rc6/scripts/kernel-doc
===================================================================

scripts/kernel-doc +0 -0
@@ -326,6 +326,32 @@ while ($ARGV[0] =~ m/^-(.*)/) {
     }
 }
 
Quoted 8 lines

scripts/kernel-doc while ($ARGV[0] =~ m/^-(.*)/) { · line 332

Quoted 4 lines
scripts/kernel-doc +4 -0
+# get kernel version
+sub get_kernel_version() {
+    my $version;
+    open (FILE, "../Makefile") || die "Can't open man kernel Makefile: $!";

How are you running scripts/kernel-doc ?
I had to change "../Makefile" to just "Makefile" when using 'make htmldocs;.

I knew this one would come around and bite me in the a**. My cmd is :
make V=1 O=build/ htmldocs > build.log 2>&1

so man is cd-ing into the O=build directory and then the main Makefile is one level above it. Gonna fix this properly today and get back to you.

Quoted 54 lines
Quoted 42 lines
scripts/kernel-doc +23 -0
+    EOF: while (my $line = <FILE>)
+    {
+	if ($line =~ /VERSION\s+=\s+(\d+)/) {
+	     $version .= $1;
+	     next;
+	}
+	if ($line =~ /PATCHLEVEL\s+=\s+(\d+)/) {
+	     $version .= ".$1";
+	     next;
+	}
+	if ($line =~ /SUBLEVEL\s+=\s+(\d+)/) {
+	     $version .= ".$1";
+	     next;
+	}
+	if ($line =~ /EXTRAVERSION\s+=\s+(.*)$/) {
+	     $version .= $1;
+	     last EOF;
+	}
+    }
+    return $version;
+}
 
 # generate a sequence of code that will splice in highlighting information
 # using the s// operator.
@@ -592,6 +618,7 @@ sub output_function_xml(%) {
     print "<refmeta>\n";
     print " <refentrytitle><phrase>".$args{'function'}."</phrase></refentrytitle>\n";
     print " <manvolnum>9</manvolnum>\n";
+    print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n";
     print "</refmeta>\n";
     print "<refnamediv>\n";
     print " <refname>".$args{'function'}."</refname>\n";
@@ -668,6 +695,7 @@ sub output_struct_xml(%) {
     print "<refmeta>\n";
     print " <refentrytitle><phrase>".$args{'type'}." ".$args{'struct'}."</phrase></refentrytitle>\n";
     print " <manvolnum>9</manvolnum>\n";
+    print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n";
     print "</refmeta>\n";
     print "<refnamediv>\n";
     print " <refname>".$args{'type'}." ".$args{'struct'}."</refname>\n";

scripts/kernel-doc sub output_enum_xml(%) {

Quoted 8 lines
scripts/kernel-doc +1 -1
@@ -752,6 +780,7 @@ sub output_enum_xml(%) {
     print "<refmeta>\n";
     print " <refentrytitle><phrase>enum ".$args{'enum'}."</phrase></refentrytitle>\n";
     print " <manvolnum>9</manvolnum>\n";
+    print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n";
     print "</refmeta>\n";
     print "<refnamediv>\n";
     print " <refname>enum ".$args{'enum'}."</refname>\n";
-

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

Signature · 2 lines
Regards/Gruß,
    Boris.
#4 lore raw

PATCH v2 1/1 kill warnings when building mandocs

A fixed version of the patch shutting up missing version warnings when building mandocs.

scripts/kernel-doc +29 -0
Index: 21-rc7/scripts/kernel-doc
===================================================================
@@ -326,6 +326,32 @@ while ($ARGV[0] =~ m/^-(.*)/) {
     }
 }
 
+# get kernel version
+sub get_kernel_version() {
+    my $version;
+    open (FILE, $ENV{"SRCTREE"}."Makefile") || die "Can't open main kernel Makefile: $!";
+
+    EOF: while (my $line = <FILE>)
+    {
+	if ($line =~ /VERSION\s+=\s+(\d+)/) {
+	     $version .= $1;
+	     next;
+	}
+	if ($line =~ /PATCHLEVEL\s+=\s+(\d+)/) {
+	     $version .= ".$1";
+	     next;
+	}
+	if ($line =~ /SUBLEVEL\s+=\s+(\d+)/) {
+	     $version .= ".$1";
+	     next;
+	}
+	if ($line =~ /EXTRAVERSION\s+=\s+(.*)$/) {
+	     $version .= $1;
+	     last EOF;
+	}
+    }
+    return $version;
+}
 
 # generate a sequence of code that will splice in highlighting information
 # using the s// operator.
@@ -592,6 +618,7 @@ sub output_function_xml(%) {
     print "<refmeta>\n";
     print " <refentrytitle><phrase>".$args{'function'}."</phrase></refentrytitle>\n";
     print " <manvolnum>9</manvolnum>\n";
+    print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n";
     print "</refmeta>\n";
     print "<refnamediv>\n";
     print " <refname>".$args{'function'}."</refname>\n";
@@ -668,6 +695,7 @@ sub output_struct_xml(%) {
     print "<refmeta>\n";
     print " <refentrytitle><phrase>".$args{'type'}." ".$args{'struct'}."</phrase></refentrytitle>\n";
     print " <manvolnum>9</manvolnum>\n";
+    print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n";
     print "</refmeta>\n";
     print "<refnamediv>\n";
     print " <refname>".$args{'type'}." ".$args{'struct'}."</refname>\n";
@@ -752,6 +780,7 @@ sub output_enum_xml(%) {
     print "<refmeta>\n";
     print " <refentrytitle><phrase>enum ".$args{'enum'}."</phrase></refentrytitle>\n";
     print " <manvolnum>9</manvolnum>\n";
+    print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n";
     print "</refmeta>\n";
     print "<refnamediv>\n";
     print " <refname>enum ".$args{'enum'}."</refname>\n";
Signature · 2 lines
Regards/Gruß,
    Boris.
#5 lore raw
Quoted 2 lines · On Thu, 19 Apr 2007 09:19:32 +0200 Borislav Petkov wrote:

A fixed version of the patch shutting up missing version warnings when building mandocs.

http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt ::
Please include a full patch description/changelog in the future.

Review

Quoted 3 lines
(quoted diff) +3 -0
+sub get_kernel_version() {
+    my $version;
+    open (FILE, $ENV{"SRCTREE"}."Makefile") || die "Can't open main kernel Makefile: $!";

This needs to handle the environment variable not being there, as another location in scripts/kernel-doc does. Updated patch below. Is this OK with you?

-----

From: Borislav Petkov <[email protected]>

This patch shuts warnings of the sort:

make -C /mnt/samsung_200/sam/kernel/trees/21-rc6/build \
	KBUILD_SRC=/mnt/samsung_200/sam/kernel/trees/21-rc6 \
	KBUILD_EXTMOD="" -f /mnt/samsung_200/sam/kernel/trees/21-rc6/Makefile mandocs

make -f /mnt/samsung_200/sam/kernel/trees/21-rc6/scripts/Makefile.build obj=scripts/basic
make -f /mnt/samsung_200/sam/kernel/trees/21-rc6/scripts/Makefile.build obj=Documentation/DocBook mandocs
SRCTREE=/mnt/samsung_200/sam/kernel/trees/21-rc6/ /mnt/samsung_200/sam/kernel/trees/21-rc6/build/scripts/basic/docproc doc /mnt/samsung_200/sam/kernel/trees/21-rc6/Documentation/DocBook/wanbook.tmpl >Documentation/DocBook/wanbook.xml if grep -q refentry Documentation/DocBook/wanbook.xml; then xmlto man -m /mnt/samsung_200/sam/kernel/trees/21-rc6/Documentation/DocBook/stylesheet.xsl -o Documentation/DocBook/man Documentation/DocBook/wanbook.xml ; gzip -f Documentation/DocBook/man/*.9; fi
Note: meta version: No productnumber or alternative sppp_close
Note: meta version: No refmiscinfo@class=version sppp_close
Note: Writing sppp_close.9
Note: meta version: No productnumber or alternative sppp_open
Note: meta version: No refmiscinfo@class=version sppp_open

by adding a RefMiscInfo xml tag in the form of the current kernel version to the function, struct and enum definitions in files included by kernel-doc when building 'mandocs'. However, the version string appears truncated on the manpage due to some constraints in the xml DTD for the man header, I believe, for the troff output is truncated too.

---

 scripts/kernel-doc |   36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
scripts/kernel-doc +36 -0
@@ -326,6 +326,39 @@ while ($ARGV[0] =~ m/^-(.*)/) {
     }
 }
 
+# get kernel version
+sub get_kernel_version() {
+    my $version;
+    my $mkfile;
+    if (defined($ENV{'srctree'})) {
+	$mkfile = "$ENV{'srctree'}" . "/Makefile";
+    }
+    else {
+	$mkfile = "Makefile";
+    }
+    open (FILE, "$mkfile") || die "Can't open main kernel Makefile: $!";
+
+    EOF: while (my $line = <FILE>)
+    {
+	if ($line =~ /VERSION\s+=\s+(\d+)/) {
+	     $version .= $1;
+	     next;
+	}
+	if ($line =~ /PATCHLEVEL\s+=\s+(\d+)/) {
+	     $version .= ".$1";
+	     next;
+	}
+	if ($line =~ /SUBLEVEL\s+=\s+(\d+)/) {
+	     $version .= ".$1";
+	     next;
+	}
+	if ($line =~ /EXTRAVERSION\s+=\s+(.*)$/) {
+	     $version .= $1;
+	     last EOF;
+	}
+    }
+    return $version;
+}
 
 # generate a sequence of code that will splice in highlighting information
 # using the s// operator.
@@ -592,6 +625,7 @@ sub output_function_xml(%) {
     print "<refmeta>\n";
     print " <refentrytitle><phrase>".$args{'function'}."</phrase></refentrytitle>\n";
     print " <manvolnum>9</manvolnum>\n";
+    print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n";
     print "</refmeta>\n";
     print "<refnamediv>\n";
     print " <refname>".$args{'function'}."</refname>\n";
@@ -668,6 +702,7 @@ sub output_struct_xml(%) {
     print "<refmeta>\n";
     print " <refentrytitle><phrase>".$args{'type'}." ".$args{'struct'}."</phrase></refentrytitle>\n";
     print " <manvolnum>9</manvolnum>\n";
+    print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n";
     print "</refmeta>\n";
     print "<refnamediv>\n";
     print " <refname>".$args{'type'}." ".$args{'struct'}."</refname>\n";
@@ -752,6 +787,7 @@ sub output_enum_xml(%) {
     print "<refmeta>\n";
     print " <refentrytitle><phrase>enum ".$args{'enum'}."</phrase></refentrytitle>\n";
     print " <manvolnum>9</manvolnum>\n";
+    print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n";
     print "</refmeta>\n";
     print "<refnamediv>\n";
     print " <refname>enum ".$args{'enum'}."</refname>\n";
#6 lore raw
Quoted 7 lines · Randy Dunlap
Quoted 2 lines · On Thu, 19 Apr 2007 09:19:32 +0200 Borislav Petkov wrote:

A fixed version of the patch shutting up missing version warnings when building mandocs.

http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt ::
Please include a full patch description/changelog in the future.

will do

Quoted 7 lines

scripts/kernel-doc while ($ARGV[0] =~ m/^-(.*)/) {

Quoted 3 lines
scripts/kernel-doc +3 -0
+sub get_kernel_version() {
+    my $version;
+    open (FILE, $ENV{"SRCTREE"}."Makefile") || die "Can't open main kernel Makefile: $!";

This needs to handle the environment variable not being there, as another location in scripts/kernel-doc does. Updated patch below. Is this OK with you?

yep, this one is fine.

Quoted 98 lines

-----

From: Borislav Petkov <[email protected]>

This patch shuts warnings of the sort:

make -C /mnt/samsung_200/sam/kernel/trees/21-rc6/build \
	KBUILD_SRC=/mnt/samsung_200/sam/kernel/trees/21-rc6 \
	KBUILD_EXTMOD="" -f /mnt/samsung_200/sam/kernel/trees/21-rc6/Makefile mandocs

make -f /mnt/samsung_200/sam/kernel/trees/21-rc6/scripts/Makefile.build obj=scripts/basic
make -f /mnt/samsung_200/sam/kernel/trees/21-rc6/scripts/Makefile.build obj=Documentation/DocBook mandocs
SRCTREE=/mnt/samsung_200/sam/kernel/trees/21-rc6/ /mnt/samsung_200/sam/kernel/trees/21-rc6/build/scripts/basic/docproc doc /mnt/samsung_200/sam/kernel/trees/21-rc6/Documentation/DocBook/wanbook.tmpl >Documentation/DocBook/wanbook.xml if grep -q refentry Documentation/DocBook/wanbook.xml; then xmlto man -m /mnt/samsung_200/sam/kernel/trees/21-rc6/Documentation/DocBook/stylesheet.xsl -o Documentation/DocBook/man Documentation/DocBook/wanbook.xml ; gzip -f Documentation/DocBook/man/*.9; fi
Note: meta version: No productnumber or alternative sppp_close
Note: meta version: No refmiscinfo@class=version sppp_close
Note: Writing sppp_close.9
Note: meta version: No productnumber or alternative sppp_open
Note: meta version: No refmiscinfo@class=version sppp_open

by adding a RefMiscInfo xml tag in the form of the current kernel version to the function, struct and enum definitions in files included by kernel-doc when building 'mandocs'. However, the version string appears truncated on the manpage due to some constraints in the xml DTD for the man header, I believe, for the troff output is truncated too.

---

 scripts/kernel-doc |   36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
scripts/kernel-doc +36 -0
@@ -326,6 +326,39 @@ while ($ARGV[0] =~ m/^-(.*)/) {
     }
 }
 
+# get kernel version
+sub get_kernel_version() {
+    my $version;
+    my $mkfile;
+    if (defined($ENV{'srctree'})) {
+	$mkfile = "$ENV{'srctree'}" . "/Makefile";
+    }
+    else {
+	$mkfile = "Makefile";
+    }
+    open (FILE, "$mkfile") || die "Can't open main kernel Makefile: $!";
+
+    EOF: while (my $line = <FILE>)
+    {
+	if ($line =~ /VERSION\s+=\s+(\d+)/) {
+	     $version .= $1;
+	     next;
+	}
+	if ($line =~ /PATCHLEVEL\s+=\s+(\d+)/) {
+	     $version .= ".$1";
+	     next;
+	}
+	if ($line =~ /SUBLEVEL\s+=\s+(\d+)/) {
+	     $version .= ".$1";
+	     next;
+	}
+	if ($line =~ /EXTRAVERSION\s+=\s+(.*)$/) {
+	     $version .= $1;
+	     last EOF;
+	}
+    }
+    return $version;
+}
 
 # generate a sequence of code that will splice in highlighting information
 # using the s// operator.
@@ -592,6 +625,7 @@ sub output_function_xml(%) {
     print "<refmeta>\n";
     print " <refentrytitle><phrase>".$args{'function'}."</phrase></refentrytitle>\n";
     print " <manvolnum>9</manvolnum>\n";
+    print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n";
     print "</refmeta>\n";
     print "<refnamediv>\n";
     print " <refname>".$args{'function'}."</refname>\n";
@@ -668,6 +702,7 @@ sub output_struct_xml(%) {
     print "<refmeta>\n";
     print " <refentrytitle><phrase>".$args{'type'}." ".$args{'struct'}."</phrase></refentrytitle>\n";
     print " <manvolnum>9</manvolnum>\n";
+    print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n";
     print "</refmeta>\n";
     print "<refnamediv>\n";
     print " <refname>".$args{'type'}." ".$args{'struct'}."</refname>\n";
@@ -752,6 +787,7 @@ sub output_enum_xml(%) {
     print "<refmeta>\n";
     print " <refentrytitle><phrase>enum ".$args{'enum'}."</phrase></refentrytitle>\n";
     print " <manvolnum>9</manvolnum>\n";
+    print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n";
     print "</refmeta>\n";
     print "<refnamediv>\n";
     print " <refname>enum ".$args{'enum'}."</refname>\n";
Signature · 2 lines
Regards/Gruß,
    Boris.
#7 lore raw
In reply to Borislav Petkov
Quoted 16 lines · On Thu, 19 Apr 2007 09:19:32 +0200 Borislav Petkov <[email protected]> wrote:
scripts/kernel-doc +16 -0
+# get kernel version
+sub get_kernel_version() {
+    my $version;
+    open (FILE, $ENV{"SRCTREE"}."Makefile") || die "Can't open main kernel Makefile: $!";
+
+    EOF: while (my $line = <FILE>)
+    {
+	if ($line =~ /VERSION\s+=\s+(\d+)/) {
+	     $version .= $1;
+	     next;
+	}
+	if ($line =~ /PATCHLEVEL\s+=\s+(\d+)/) {
+	     $version .= ".$1";
+	     next;
+	}
+	if ($line =~ /SUBLEVEL\s+=\s+(\d+)/) {

scripts/kernel-doc while ($ARGV[0] =~ m/^-(.*)/) { · line 354

Quoted 10 lines
scripts/kernel-doc +10 -0
+	     $version .= ".$1";
+	     next;
+	}
+	if ($line =~ /EXTRAVERSION\s+=\s+(.*)$/) {
+	     $version .= $1;
+	     last EOF;
+	}
+    }
+    return $version;
+}

we already did this in the top-level Makefile. It's in $(KERNELVERSION) and is printed by `make kernelversion'.

Cannot we use that info somehow?

#8 lore raw

PATCH v3 1/1 kill warnings when building mandocs

Quoted 6 lines · Andrew Morton

On Thu, 19 Apr 2007 09:19:32 +0200 Borislav Petkov <[email protected]> wrote:

we already did this in the top-level Makefile. It's in $(KERNELVERSION) and is printed by `make kernelversion'.

Cannot we use that info somehow?

Yes, we can. I personally like this one even better.

-----
From: Borislav Petkov <[email protected]>

This patch shuts warnings of the sort:

make -C /mnt/samsung_200/sam/kernel/trees/21-rc6/build \
        KBUILD_SRC=/mnt/samsung_200/sam/kernel/trees/21-rc6 \
        KBUILD_EXTMOD="" -f /mnt/samsung_200/sam/kernel/trees/21-rc6/Makefile mandocs

make -f /mnt/samsung_200/sam/kernel/trees/21-rc6/scripts/Makefile.build obj=scripts/basic
make -f /mnt/samsung_200/sam/kernel/trees/21-rc6/scripts/Makefile.build obj=Documentation/DocBook mandocs
SRCTREE=/mnt/samsung_200/sam/kernel/trees/21-rc6/ /mnt/samsung_200/sam/kernel/trees/21-rc6/build/scripts/basic/docproc doc
/mnt/samsung_200/sam/kernel/trees/21-rc6/Documentation/DocBook/wanbook.tmpl >Documentation/DocBook/wanbook.xml
if grep -q refentry Documentation/DocBook/wanbook.xml; then xmlto man -m /mnt/samsung_200/sam/kernel/trees/21-rc6/Documentation/DocBook/stylesheet.xsl -o
Documentation/DocBook/man Documentation/DocBook/wanbook.xml ; gzip -f Documentation/DocBook/man/*.9; fi
Note: meta version: No productnumber or alternative sppp_close
Note: meta version: No refmiscinfo@class=version sppp_close
Note: Writing sppp_close.9
Note: meta version: No productnumber or alternative sppp_open
Note: meta version: No refmiscinfo@class=version sppp_open

by adding a RefMiscInfo xml tag in the form of the current kernel version to the function, struct and enum definitions in files included by kernel-doc when building 'mandocs'. However, the version string appears truncated on the manpage due to some constraints in the xml DTD for the man header, I believe, for the troff output is truncated too.

The current patch improves upon previous versions by reading the kernel version directly from the enclosing build environment. In order to do so, the KERNELVERSION variable is passed onto the shell from within the Makefile build command string.

---

Documentation/DocBook/Makefile +1 -1
Index: 21-rc7/Documentation/DocBook/Makefile
===================================================================
@@ -147,7 +147,7 @@ quiet_cmd_db2html = HTML   $@
             cp $(PNG-$(basename $(notdir $@))) $(patsubst %.html,%,$@); fi
 
 quiet_cmd_db2man = MAN     $@
-      cmd_db2man = if grep -q refentry $<; then xmlto man $(XMLTOFLAGS) -o $(obj)/man $< ; gzip -f $(obj)/man/*.9; fi
+      cmd_db2man = if grep -q refentry $<; then KERNELVERSION=$(KERNELVERSION) xmlto man $(XMLTOFLAGS) -o $(obj)/man $< ; gzip -f $(obj)/man/*.9; fi
 %.9 : %.xml
 	@(which xmlto > /dev/null 2>&1) || \
 	 (echo "*** You need to install xmlto ***"; \
scripts/kernel-doc +12 -0
Index: 21-rc7/scripts/kernel-doc
===================================================================
@@ -326,6 +326,15 @@ while ($ARGV[0] =~ m/^-(.*)/) {
     }
 }
 
+# get kernel version from env
+sub get_kernel_version() {
+	my $version;
+
+	if (defined($ENV{'KERNELVERSION'})) {
+		$version = $ENV{'KERNELVERSION'};
+	}
+	return $version;
+}
 
 # generate a sequence of code that will splice in highlighting information
 # using the s// operator.
@@ -592,6 +601,7 @@ sub output_function_xml(%) {
     print "<refmeta>\n";
     print " <refentrytitle><phrase>".$args{'function'}."</phrase></refentrytitle>\n";
     print " <manvolnum>9</manvolnum>\n";
+	print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n";
     print "</refmeta>\n";
     print "<refnamediv>\n";
     print " <refname>".$args{'function'}."</refname>\n";
@@ -668,6 +678,7 @@ sub output_struct_xml(%) {
     print "<refmeta>\n";
     print " <refentrytitle><phrase>".$args{'type'}." ".$args{'struct'}."</phrase></refentrytitle>\n";
     print " <manvolnum>9</manvolnum>\n";
+	print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n";
     print "</refmeta>\n";
     print "<refnamediv>\n";
     print " <refname>".$args{'type'}." ".$args{'struct'}."</refname>\n";
@@ -752,6 +763,7 @@ sub output_enum_xml(%) {
     print "<refmeta>\n";
     print " <refentrytitle><phrase>enum ".$args{'enum'}."</phrase></refentrytitle>\n";
     print " <manvolnum>9</manvolnum>\n";
+	print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n";
     print "</refmeta>\n";
     print "<refnamediv>\n";
     print " <refname>enum ".$args{'enum'}."</refname>\n";
Signature · 2 lines
Regards/Gruß,
    Boris.
#9 lore raw

PATCH v3 1/1 kill warnings when building mandocs (fixed whitespaces)

In reply to Andrew Morton

Sorry about the wrong whitespaces again :), here's a correct one

-----
From: Borislav Petkov <[email protected]>

This patch shuts warnings of the sort:

make -C /mnt/samsung_200/sam/kernel/trees/21-rc6/build \
        KBUILD_SRC=/mnt/samsung_200/sam/kernel/trees/21-rc6 \
        KBUILD_EXTMOD="" -f /mnt/samsung_200/sam/kernel/trees/21-rc6/Makefile mandocs

make -f /mnt/samsung_200/sam/kernel/trees/21-rc6/scripts/Makefile.build obj=scripts/basic
make -f /mnt/samsung_200/sam/kernel/trees/21-rc6/scripts/Makefile.build obj=Documentation/DocBook mandocs
SRCTREE=/mnt/samsung_200/sam/kernel/trees/21-rc6/ /mnt/samsung_200/sam/kernel/trees/21-rc6/build/scripts/basic/docproc doc
/mnt/samsung_200/sam/kernel/trees/21-rc6/Documentation/DocBook/wanbook.tmpl >Documentation/DocBook/wanbook.xml
if grep -q refentry Documentation/DocBook/wanbook.xml; then xmlto man -m /mnt/samsung_200/sam/kernel/trees/21-rc6/Documentation/DocBook/stylesheet.xsl -o
Documentation/DocBook/man Documentation/DocBook/wanbook.xml ; gzip -f Documentation/DocBook/man/*.9; fi
Note: meta version: No productnumber or alternative sppp_close
Note: meta version: No refmiscinfo@class=version sppp_close
Note: Writing sppp_close.9
Note: meta version: No productnumber or alternative sppp_open
Note: meta version: No refmiscinfo@class=version sppp_open

by adding a RefMiscInfo xml tag in the form of the current kernel version to the function, struct and enum definitions in files included by kernel-doc when building 'mandocs'. However, the version string appears truncated on the manpage due to some constraints in the xml DTD for the man header, I believe, for the troff output is truncated too.

The current patch improves upon previous versions by reading the kernel version directly from the enclosing build environment. In order to do so, the KERNELVERSION variable is passed onto the shell from within the Makefile build command string.

---

Documentation/DocBook/Makefile +1 -1
Index: 21-rc7/Documentation/DocBook/Makefile
===================================================================
@@ -147,7 +147,7 @@ quiet_cmd_db2html = HTML   $@
             cp $(PNG-$(basename $(notdir $@))) $(patsubst %.html,%,$@); fi
 
 quiet_cmd_db2man = MAN     $@
-      cmd_db2man = if grep -q refentry $<; then xmlto man $(XMLTOFLAGS) -o $(obj)/man $< ; gzip -f $(obj)/man/*.9; fi
+      cmd_db2man = if grep -q refentry $<; then KERNELVERSION=$(KERNELVERSION) xmlto man $(XMLTOFLAGS) -o $(obj)/man $< ; gzip -f $(obj)/man/*.9; fi
 %.9 : %.xml
 	@(which xmlto > /dev/null 2>&1) || \
 	 (echo "*** You need to install xmlto ***"; \
scripts/kernel-doc +12 -0
Index: 21-rc7/scripts/kernel-doc
===================================================================
@@ -326,6 +326,15 @@ while ($ARGV[0] =~ m/^-(.*)/) {
     }
 }
 
+# get kernel version from env
+sub get_kernel_version() {
+    my $version;
+
+    if (defined($ENV{'KERNELVERSION'})) {
+	$version = $ENV{'KERNELVERSION'};
+    }
+    return $version;
+}
 
 # generate a sequence of code that will splice in highlighting information
 # using the s// operator.
@@ -592,6 +601,7 @@ sub output_function_xml(%) {
     print "<refmeta>\n";
     print " <refentrytitle><phrase>".$args{'function'}."</phrase></refentrytitle>\n";
     print " <manvolnum>9</manvolnum>\n";
+    print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n";
     print "</refmeta>\n";
     print "<refnamediv>\n";
     print " <refname>".$args{'function'}."</refname>\n";
@@ -668,6 +678,7 @@ sub output_struct_xml(%) {
     print "<refmeta>\n";
     print " <refentrytitle><phrase>".$args{'type'}." ".$args{'struct'}."</phrase></refentrytitle>\n";
     print " <manvolnum>9</manvolnum>\n";
+    print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n";
     print "</refmeta>\n";
     print "<refnamediv>\n";
     print " <refname>".$args{'type'}." ".$args{'struct'}."</refname>\n";
@@ -752,6 +763,7 @@ sub output_enum_xml(%) {
     print "<refmeta>\n";
     print " <refentrytitle><phrase>enum ".$args{'enum'}."</phrase></refentrytitle>\n";
     print " <manvolnum>9</manvolnum>\n";
+    print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n";
     print "</refmeta>\n";
     print "<refnamediv>\n";
     print " <refname>enum ".$args{'enum'}."</refname>\n";
Signature · 2 lines
Regards/Gruß,
    Boris.
#10 lore raw

PATCH v4 1/1 kill warnings when building mandocs (final)

We were simply reinventing the wheel until now. Here's the final version of the patch which is also the simplest solution (if you hold your eyes open at all time, you'll see that KERNELVERSION is already exported by the main Makefile and there's no need for changing the build string in Documentation/DocBook/Makefile):

-----
From: Borislav Petkov <[email protected]>

This patch shuts warnings of the sort:

make -C /mnt/samsung_200/sam/kernel/trees/21-rc6/build \
        KBUILD_SRC=/mnt/samsung_200/sam/kernel/trees/21-rc6 \
        KBUILD_EXTMOD="" -f /mnt/samsung_200/sam/kernel/trees/21-rc6/Makefile mandocs

make -f /mnt/samsung_200/sam/kernel/trees/21-rc6/scripts/Makefile.build obj=scripts/basic
make -f /mnt/samsung_200/sam/kernel/trees/21-rc6/scripts/Makefile.build obj=Documentation/DocBook mandocs
SRCTREE=/mnt/samsung_200/sam/kernel/trees/21-rc6/ /mnt/samsung_200/sam/kernel/trees/21-rc6/build/scripts/basic/docproc doc
/mnt/samsung_200/sam/kernel/trees/21-rc6/Documentation/DocBook/wanbook.tmpl >Documentation/DocBook/wanbook.xml
if grep -q refentry Documentation/DocBook/wanbook.xml; then xmlto man -m /mnt/samsung_200/sam/kernel/trees/21-rc6/Documentation/DocBook/stylesheet.xsl -o
Documentation/DocBook/man Documentation/DocBook/wanbook.xml ; gzip -f Documentation/DocBook/man/*.9; fi
Note: meta version: No productnumber or alternative sppp_close
Note: meta version: No refmiscinfo@class=version sppp_close
Note: Writing sppp_close.9
Note: meta version: No productnumber or alternative sppp_open
Note: meta version: No refmiscinfo@class=version sppp_open

by adding a RefMiscInfo xml tag in the form of the current kernel version to the function, struct and enum definitions in files included by kernel-doc when building 'mandocs'. However, the version string appears truncated on the manpage due to some constraints in the xml DTD for the man header, I believe, for the troff output is truncated too.

The current patch improves upon previous versions by reading the kernel version directly from the enclosing build environment exported by the main Makefile.

---

scripts/kernel-doc +12 -0
Index: 21-rc7/scripts/kernel-doc
===================================================================
@@ -326,6 +326,15 @@ while ($ARGV[0] =~ m/^-(.*)/) {
     }
 }
 
+# get kernel version from env
+sub get_kernel_version() {
+    my $version;
+
+    if (defined($ENV{'KERNELVERSION'})) {
+	$version = $ENV{'KERNELVERSION'};
+    }
+    return $version;
+}
 
 # generate a sequence of code that will splice in highlighting information
 # using the s// operator.
@@ -592,6 +601,7 @@ sub output_function_xml(%) {
     print "<refmeta>\n";
     print " <refentrytitle><phrase>".$args{'function'}."</phrase></refentrytitle>\n";
     print " <manvolnum>9</manvolnum>\n";
+    print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n";
     print "</refmeta>\n";
     print "<refnamediv>\n";
     print " <refname>".$args{'function'}."</refname>\n";
@@ -668,6 +678,7 @@ sub output_struct_xml(%) {
     print "<refmeta>\n";
     print " <refentrytitle><phrase>".$args{'type'}." ".$args{'struct'}."</phrase></refentrytitle>\n";
     print " <manvolnum>9</manvolnum>\n";
+    print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n";
     print "</refmeta>\n";
     print "<refnamediv>\n";
     print " <refname>".$args{'type'}." ".$args{'struct'}."</refname>\n";
@@ -752,6 +763,7 @@ sub output_enum_xml(%) {
     print "<refmeta>\n";
     print " <refentrytitle><phrase>enum ".$args{'enum'}."</phrase></refentrytitle>\n";
     print " <manvolnum>9</manvolnum>\n";
+    print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n";
     print "</refmeta>\n";
     print "<refnamediv>\n";
     print " <refname>enum ".$args{'enum'}."</refname>\n";
Signature · 2 lines
Regards/Gruß,
    Boris.
#11 lore raw
In reply to Borislav Petkov
Quoted 15 lines · On Fri, 13 Apr 2007 11:14:22 +0200 Borislav Petkov wrote:

This patch shuts warnings of the sort:

make -C /mnt/samsung_200/sam/kernel/trees/21-rc6/build \
	KBUILD_SRC=/mnt/samsung_200/sam/kernel/trees/21-rc6 \
	KBUILD_EXTMOD="" -f /mnt/samsung_200/sam/kernel/trees/21-rc6/Makefile mandocs

make -f /mnt/samsung_200/sam/kernel/trees/21-rc6/scripts/Makefile.build obj=scripts/basic
make -f /mnt/samsung_200/sam/kernel/trees/21-rc6/scripts/Makefile.build obj=Documentation/DocBook mandocs
SRCTREE=/mnt/samsung_200/sam/kernel/trees/21-rc6/ /mnt/samsung_200/sam/kernel/trees/21-rc6/build/scripts/basic/docproc doc /mnt/samsung_200/sam/kernel/trees/21-rc6/Documentation/DocBook/wanbook.tmpl >Documentation/DocBook/wanbook.xml if grep -q refentry Documentation/DocBook/wanbook.xml; then xmlto man -m /mnt/samsung_200/sam/kernel/trees/21-rc6/Documentation/DocBook/stylesheet.xsl -o Documentation/DocBook/man Documentation/DocBook/wanbook.xml ; gzip -f Documentation/DocBook/man/*.9; fi
Note: meta version: No productnumber or alternative sppp_close
Note: meta version: No refmiscinfo@class=version sppp_close
Note: Writing sppp_close.9
Note: meta version: No productnumber or alternative sppp_open
Note: meta version: No refmiscinfo@class=version sppp_open

Quoted 5 lines

by adding a RefMiscInfo xml tag in the form of the current kernel version to the function, struct and enum definitions in files included by kernel-doc when building 'mandocs'. However, the version string appears truncated on the manpage due to some constraints in the xml DTD for the man header, I believe, for the troff output is truncated too.

Hi Borislav,

I cannot reproduce this error (either, a la the tex error). Any hints about how I could do so?

Thanks,
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

#12 lore raw
Quoted 23 lines · Randy Dunlap
Quoted 15 lines · On Fri, 13 Apr 2007 11:14:22 +0200 Borislav Petkov wrote:

This patch shuts warnings of the sort:

make -C /mnt/samsung_200/sam/kernel/trees/21-rc6/build \
	KBUILD_SRC=/mnt/samsung_200/sam/kernel/trees/21-rc6 \
	KBUILD_EXTMOD="" -f /mnt/samsung_200/sam/kernel/trees/21-rc6/Makefile mandocs

make -f /mnt/samsung_200/sam/kernel/trees/21-rc6/scripts/Makefile.build obj=scripts/basic
make -f /mnt/samsung_200/sam/kernel/trees/21-rc6/scripts/Makefile.build obj=Documentation/DocBook mandocs
SRCTREE=/mnt/samsung_200/sam/kernel/trees/21-rc6/ /mnt/samsung_200/sam/kernel/trees/21-rc6/build/scripts/basic/docproc doc /mnt/samsung_200/sam/kernel/trees/21-rc6/Documentation/DocBook/wanbook.tmpl >Documentation/DocBook/wanbook.xml if grep -q refentry Documentation/DocBook/wanbook.xml; then xmlto man -m /mnt/samsung_200/sam/kernel/trees/21-rc6/Documentation/DocBook/stylesheet.xsl -o Documentation/DocBook/man Documentation/DocBook/wanbook.xml ; gzip -f Documentation/DocBook/man/*.9; fi
Note: meta version: No productnumber or alternative sppp_close
Note: meta version: No refmiscinfo@class=version sppp_close
Note: Writing sppp_close.9
Note: meta version: No productnumber or alternative sppp_open
Note: meta version: No refmiscinfo@class=version sppp_open

Quoted 5 lines

by adding a RefMiscInfo xml tag in the form of the current kernel version to the function, struct and enum definitions in files included by kernel-doc when building 'mandocs'. However, the version string appears truncated on the manpage due to some constraints in the xml DTD for the man header, I believe, for the troff output is truncated too.

Quoted 4 lines

Hi Borislav,

I cannot reproduce this error (either, a la the tex error). Any hints about how I could do so?

Hm, this is strange. IIRC, the refmiscinfo version tag is imposed by the docbook xsl stylesheets for manpages, see
http://www.oasis-open.org/archives/docbook-apps/200508/msg00111.html and especially the 'man'-section, subsection 'extra2 field.' According to it, the stylesheets check several different locations for version info to be put in the left footer position in the manpage, and if none is found, they simply state that there's no version info, so this is not an error message but simply a notification which, if nothing else, annoys while building the mandocs.

The URL cites the changelog of docbook-xsl 1.69.1 and this is also the version in SLED 10 you're using so you should be getting this, too. I'll try to dig deeper into this. The relevant packs I use are docbook-xsl:
1.72.0.dfsg.1-1, xmlto: 0.0.18-5.1 on debian unstable.

Signature · 2 lines
Regards/Gruß, 
Boris.
#13 lore raw
Quoted 38 lines · Borislav Petkov
Quoted 23 lines · Randy Dunlap
Quoted 15 lines · On Fri, 13 Apr 2007 11:14:22 +0200 Borislav Petkov wrote:

This patch shuts warnings of the sort:

make -C /mnt/samsung_200/sam/kernel/trees/21-rc6/build \
	KBUILD_SRC=/mnt/samsung_200/sam/kernel/trees/21-rc6 \
	KBUILD_EXTMOD="" -f /mnt/samsung_200/sam/kernel/trees/21-rc6/Makefile mandocs

make -f /mnt/samsung_200/sam/kernel/trees/21-rc6/scripts/Makefile.build obj=scripts/basic
make -f /mnt/samsung_200/sam/kernel/trees/21-rc6/scripts/Makefile.build obj=Documentation/DocBook mandocs
SRCTREE=/mnt/samsung_200/sam/kernel/trees/21-rc6/ /mnt/samsung_200/sam/kernel/trees/21-rc6/build/scripts/basic/docproc doc /mnt/samsung_200/sam/kernel/trees/21-rc6/Documentation/DocBook/wanbook.tmpl >Documentation/DocBook/wanbook.xml if grep -q refentry Documentation/DocBook/wanbook.xml; then xmlto man -m /mnt/samsung_200/sam/kernel/trees/21-rc6/Documentation/DocBook/stylesheet.xsl -o Documentation/DocBook/man Documentation/DocBook/wanbook.xml ; gzip -f Documentation/DocBook/man/*.9; fi
Note: meta version: No productnumber or alternative sppp_close
Note: meta version: No refmiscinfo@class=version sppp_close
Note: Writing sppp_close.9
Note: meta version: No productnumber or alternative sppp_open
Note: meta version: No refmiscinfo@class=version sppp_open

Quoted 5 lines

by adding a RefMiscInfo xml tag in the form of the current kernel version to the function, struct and enum definitions in files included by kernel-doc when building 'mandocs'. However, the version string appears truncated on the manpage due to some constraints in the xml DTD for the man header, I believe, for the troff output is truncated too.

Quoted 4 lines

Hi Borislav,

I cannot reproduce this error (either, a la the tex error). Any hints about how I could do so?

Hm, this is strange. IIRC, the refmiscinfo version tag is imposed by the docbook xsl stylesheets for manpages, see
http://www.oasis-open.org/archives/docbook-apps/200508/msg00111.html and especially the 'man'-section, subsection 'extra2 field.' According to it, the stylesheets check several different locations for version info to be put in the left footer position in the manpage, and if none is found, they simply state that there's no version info, so this is not an error message but simply a notification which, if nothing else, annoys while building the mandocs.

Quoted 4 lines

The URL cites the changelog of docbook-xsl 1.69.1 and this is also the version in SLED 10 you're using so you should be getting this, too. I'll try to dig deeper into this. The relevant packs I use are docbook-xsl:
1.72.0.dfsg.1-1, xmlto: 0.0.18-5.1 on debian unstable.

Hi Randi,

I'm pretty sure the reason you cannot reproduce this warning is the line

<xsl:param name="refentry.version.suppress">1</xsl:param>

which can be found in param.xsl, it being a part of the docbook-xsl distribution. The parameter's name is self-explanatory and a '1' suppresses the version generation. I was able to get this error because in the debian docbook-xsl package this param value is set to 0 by default.

This means, some users will get this warning and some will not, depending on the setting in the param.xsl file. What is the way to go here wrt to a solution dealing with all cases:

1. patch the kernel-doc?
2. issue an info so that the user can suppress the annoying warning by themselves?
3. ...?

Signature · 2 lines
Regards/Gruß,
    Boris.
#14 lore raw
Quoted 46 lines · On Tue, 17 Apr 2007 12:49:07 +0200 Borislav Petkov wrote:
Quoted 38 lines · Borislav Petkov
Quoted 23 lines · Randy Dunlap
Quoted 15 lines · On Fri, 13 Apr 2007 11:14:22 +0200 Borislav Petkov wrote:

This patch shuts warnings of the sort:

make -C /mnt/samsung_200/sam/kernel/trees/21-rc6/build \
	KBUILD_SRC=/mnt/samsung_200/sam/kernel/trees/21-rc6 \
	KBUILD_EXTMOD="" -f /mnt/samsung_200/sam/kernel/trees/21-rc6/Makefile mandocs

make -f /mnt/samsung_200/sam/kernel/trees/21-rc6/scripts/Makefile.build obj=scripts/basic
make -f /mnt/samsung_200/sam/kernel/trees/21-rc6/scripts/Makefile.build obj=Documentation/DocBook mandocs
SRCTREE=/mnt/samsung_200/sam/kernel/trees/21-rc6/ /mnt/samsung_200/sam/kernel/trees/21-rc6/build/scripts/basic/docproc doc /mnt/samsung_200/sam/kernel/trees/21-rc6/Documentation/DocBook/wanbook.tmpl >Documentation/DocBook/wanbook.xml if grep -q refentry Documentation/DocBook/wanbook.xml; then xmlto man -m /mnt/samsung_200/sam/kernel/trees/21-rc6/Documentation/DocBook/stylesheet.xsl -o Documentation/DocBook/man Documentation/DocBook/wanbook.xml ; gzip -f Documentation/DocBook/man/*.9; fi
Note: meta version: No productnumber or alternative sppp_close
Note: meta version: No refmiscinfo@class=version sppp_close
Note: Writing sppp_close.9
Note: meta version: No productnumber or alternative sppp_open
Note: meta version: No refmiscinfo@class=version sppp_open

Quoted 5 lines

by adding a RefMiscInfo xml tag in the form of the current kernel version to the function, struct and enum definitions in files included by kernel-doc when building 'mandocs'. However, the version string appears truncated on the manpage due to some constraints in the xml DTD for the man header, I believe, for the troff output is truncated too.

Quoted 4 lines

Hi Borislav,

I cannot reproduce this error (either, a la the tex error). Any hints about how I could do so?

Hm, this is strange. IIRC, the refmiscinfo version tag is imposed by the docbook xsl stylesheets for manpages, see
http://www.oasis-open.org/archives/docbook-apps/200508/msg00111.html and especially the 'man'-section, subsection 'extra2 field.' According to it, the stylesheets check several different locations for version info to be put in the left footer position in the manpage, and if none is found, they simply state that there's no version info, so this is not an error message but simply a notification which, if nothing else, annoys while building the mandocs.

Quoted 4 lines

The URL cites the changelog of docbook-xsl 1.69.1 and this is also the version in SLED 10 you're using so you should be getting this, too. I'll try to dig deeper into this. The relevant packs I use are docbook-xsl:
1.72.0.dfsg.1-1, xmlto: 0.0.18-5.1 on debian unstable.

Hi Randi,

Quoted 8 lines

I'm pretty sure the reason you cannot reproduce this warning is the line

<xsl:param name="refentry.version.suppress">1</xsl:param>

which can be found in param.xsl, it being a part of the docbook-xsl distribution. The parameter's name is self-explanatory and a '1' suppresses the version generation. I was able to get this error because in the debian docbook-xsl package this param value is set to 0 by default.

Hm, I don't seem to have that file installed (except in /usr/share/xml/docbook/stylesheet/...). Where would it normally be installed?

Quoted 8 lines

This means, some users will get this warning and some will not, depending on the setting in the param.xsl file. What is the way to go here wrt to a solution dealing with all cases:

1. patch the kernel-doc?
2. issue an info so that the user can suppress the annoying warning by themselves?
3. ...?

Are other people seeing these warning messages ??
If so, I think that we should patch the kernel-doc. I don't think that many people would read info about how to avoid the warnings.

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

#15 lore raw

<snip>

Quoted 4 lines
Quoted 4 lines

I'm pretty sure the reason you cannot reproduce this warning is the line

<xsl:param name="refentry.version.suppress">1</xsl:param>

Quoted 8 lines
Quoted 4 lines

which can be found in param.xsl, it being a part of the docbook-xsl distribution. The parameter's name is self-explanatory and a '1' suppresses the version generation. I was able to get this error because in the debian docbook-xsl package this param value is set to 0 by default.

Hm, I don't seem to have that file installed (except in /usr/share/xml/docbook/stylesheet/...). Where would it normally be installed?

/usr/share/xml/docbook/stylesheet/nwalsh/manpages/param.xsl here

Quoted 11 lines
Quoted 8 lines

This means, some users will get this warning and some will not, depending on the setting in the param.xsl file. What is the way to go here wrt to a solution dealing with all cases:

1. patch the kernel-doc?
2. issue an info so that the user can suppress the annoying warning by themselves?
3. ...?

Are other people seeing these warning messages ??

Hm, is anyone building the manpages target at all?

Quoted 2 lines

If so, I think that we should patch the kernel-doc. I don't think that many people would read info about how to avoid the warnings.

Signature · 2 lines
Regards/Gruß,
    Boris.
#16 lore raw
Quoted 10 lines · On Thu, 19 Apr 2007 08:20:59 +0200 Borislav Petkov wrote:

<snip>

Quoted 9 lines
Quoted 8 lines

I'm pretty sure the reason you cannot reproduce this warning is the line

<xsl:param name="refentry.version.suppress">1</xsl:param>

which can be found in param.xsl, it being a part of the docbook-xsl distribution. The parameter's name is self-explanatory and a '1' suppresses the version generation. I was able to get this error because in the debian docbook-xsl package this param value is set to 0 by default.

Quoted 5 lines
Quoted 3 lines

Hm, I don't seem to have that file installed (except in /usr/share/xml/docbook/stylesheet/...). Where would it normally be installed?

/usr/share/xml/docbook/stylesheet/nwalsh/manpages/param.xsl here

OK, I have that one, with a /current/ stuck in there:

/usr/share/xml/docbook/stylesheet/nwalsh/1.69.1/manpages/param.xsl

<xsl:param name="refentry.version.suppress">0</xsl:param>

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

This means, some users will get this warning and some will not, depending on the setting in the param.xsl file. What is the way to go here wrt to a solution dealing with all cases:

Quoted 8 lines
Quoted 7 lines
Quoted 4 lines

1. patch the kernel-doc?
2. issue an info so that the user can suppress the annoying warning by themselves?
3. ...?

Are other people seeing these warning messages ??

Hm, is anyone building the manpages target at all?

Other than the 2 of us... I couldn't say.

Quoted 2 lines
Quoted 2 lines

If so, I think that we should patch the kernel-doc. I don't think that many people would read info about how to avoid the warnings.

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

#17 lore raw
Quoted 16 lines · Randy Dunlap
Quoted 14 lines · On Thu, 19 Apr 2007 08:20:59 +0200 Borislav Petkov wrote:

<snip>

Quoted 12 lines
Quoted 8 lines

I'm pretty sure the reason you cannot reproduce this warning is the line

<xsl:param name="refentry.version.suppress">1</xsl:param>

which can be found in param.xsl, it being a part of the docbook-xsl distribution. The parameter's name is self-explanatory and a '1' suppresses the version generation. I was able to get this error because in the debian docbook-xsl package this param value is set to 0 by default.

Hm, I don't seem to have that file installed (except in /usr/share/xml/docbook/stylesheet/...). Where would it normally be installed?

Quoted 8 lines
Quoted 1 line

/usr/share/xml/docbook/stylesheet/nwalsh/manpages/param.xsl here

OK, I have that one, with a /current/ stuck in there:

/usr/share/xml/docbook/stylesheet/nwalsh/1.69.1/manpages/param.xsl

<xsl:param name="refentry.version.suppress">0</xsl:param>

That's why you don't get the warnings.

Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 8 lines

This means, some users will get this warning and some will not, depending on the setting in the param.xsl file. What is the way to go here wrt to a solution dealing with all cases:

1. patch the kernel-doc?
2. issue an info so that the user can suppress the annoying warning by themselves?
3. ...?

Quoted 4 lines
Quoted 2 lines
Quoted 1 line

Are other people seeing these warning messages ??

Hm, is anyone building the manpages target at all?

Other than the 2 of us... I couldn't say.

By the way, can we consider the item
"- clean up Documentation/DocBook/, fix warnings that occur on make *docs." from the KJ TODO list as now done?

Quoted 7 lines
Quoted 2 lines
Quoted 2 lines

If so, I think that we should patch the kernel-doc. I don't think that many people would read info about how to avoid the warnings.

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

Signature · 2 lines
Regards/Gruß,
    Boris.
#18 lore raw
Quoted 8 lines · On Fri, 20 Apr 2007 08:02:50 +0200 Borislav Petkov wrote:
Quoted 4 lines
Quoted 2 lines
Quoted 1 line

Are other people seeing these warning messages ??

Hm, is anyone building the manpages target at all?

Other than the 2 of us... I couldn't say.

By the way, can we consider the item
"- clean up Documentation/DocBook/, fix warnings that occur on make *docs." from the KJ TODO list as now done?

OK, although a few of them may not be fixed until soon after 2.6.21 is released and pending patches are applied.

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***